diff --git a/.cocos-project.json b/.cocos-project.json
new file mode 100644
index 0000000..53aa444
--- /dev/null
+++ b/.cocos-project.json
@@ -0,0 +1,6 @@
+{
+ "engine_type": "prebuilt",
+ "engine_version": "cocos2d-x-3.10",
+ "has_native": true,
+ "project_type": "lua"
+}
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..a9fc210
--- /dev/null
+++ b/.project
@@ -0,0 +1,13 @@
+
+
+ TestLua
+
+
+
+
+
+
+ org.ccdt.cocosproject
+ org.eclipse.koneki.ldt.nature
+
+
diff --git a/.settings/version.json b/.settings/version.json
new file mode 100644
index 0000000..f6ae91c
--- /dev/null
+++ b/.settings/version.json
@@ -0,0 +1,5 @@
+{
+ "engineVersion": "cocos2d-x-3.10",
+ "runtimeVersion": "2.0",
+ "templateVersion": "2.0"
+}
\ No newline at end of file
diff --git a/TestLua.ccs b/TestLua.ccs
new file mode 100644
index 0000000..bd216cb
--- /dev/null
+++ b/TestLua.ccs
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestLua.cfg b/TestLua.cfg
new file mode 100644
index 0000000..dcbe6d3
--- /dev/null
+++ b/TestLua.cfg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TestLua.udf b/TestLua.udf
new file mode 100644
index 0000000..f8a99ca
--- /dev/null
+++ b/TestLua.udf
@@ -0,0 +1,19 @@
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cocosstudio/HelloWorld.png b/cocosstudio/HelloWorld.png
new file mode 100644
index 0000000..92ae713
Binary files /dev/null and b/cocosstudio/HelloWorld.png differ
diff --git a/cocosstudio/MainScene.csd b/cocosstudio/MainScene.csd
new file mode 100644
index 0000000..66610c4
--- /dev/null
+++ b/cocosstudio/MainScene.csd
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..d46258c
--- /dev/null
+++ b/config.json
@@ -0,0 +1,59 @@
+{
+ "init_cfg": {
+ "isLandscape": true,
+ "isWindowTop": false,
+ "name": "TestLua",
+ "width": 960,
+ "height": 640,
+ "entry": "src/main.lua",
+ "consolePort": 6050,
+ "uploadPort": 6060
+ },
+ "simulator_screen_size": [
+ {
+ "title": "iPhone 3Gs (480x320)",
+ "width": 480,
+ "height": 320
+ },
+ {
+ "title": "iPhone 4 (960x640)",
+ "width": 960,
+ "height": 640
+ },
+ {
+ "title": "iPhone 5 (1136x640)",
+ "width": 1136,
+ "height": 640
+ },
+ {
+ "title": "iPad (1024x768)",
+ "width": 1024,
+ "height": 768
+ },
+ {
+ "title": "iPad Retina (2048x1536)",
+ "width": 2048,
+ "height": 1536
+ },
+ {
+ "title": "Android (800x480)",
+ "width": 800,
+ "height": 480
+ },
+ {
+ "title": "Android (854x480)",
+ "width": 854,
+ "height": 480
+ },
+ {
+ "title": "Android (1280x720)",
+ "width": 1280,
+ "height": 720
+ },
+ {
+ "title": "Android (1920x1080)",
+ "width": 1920,
+ "height": 1080
+ }
+ ]
+}
\ No newline at end of file
diff --git a/frameworks/runtime-src/Classes/AppDelegate.cpp b/frameworks/runtime-src/Classes/AppDelegate.cpp
new file mode 100644
index 0000000..7c999af
--- /dev/null
+++ b/frameworks/runtime-src/Classes/AppDelegate.cpp
@@ -0,0 +1,103 @@
+#include "AppDelegate.h"
+#include "CCLuaEngine.h"
+#include "SimpleAudioEngine.h"
+#include "cocos2d.h"
+#include "lua_module_register.h"
+
+#if (CC_TARGET_PLATFORM != CC_PLATFORM_LINUX)
+#include "ide-support/CodeIDESupport.h"
+#endif
+
+#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+#include "runtime/Runtime.h"
+#include "ide-support/RuntimeLuaImpl.h"
+#endif
+
+using namespace CocosDenshion;
+
+USING_NS_CC;
+using namespace std;
+
+AppDelegate::AppDelegate()
+{
+}
+
+AppDelegate::~AppDelegate()
+{
+ SimpleAudioEngine::end();
+
+#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+ // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
+ RuntimeEngine::getInstance()->end();
+#endif
+
+}
+
+//if you want a different context,just modify the value of glContextAttrs
+//it will takes effect on all platforms
+void AppDelegate::initGLContextAttrs()
+{
+ //set OpenGL context attributions,now can only set six attributions:
+ //red,green,blue,alpha,depth,stencil
+ GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8};
+
+ GLView::setGLContextAttrs(glContextAttrs);
+}
+
+// If you want to use packages manager to install more packages,
+// don't modify or remove this function
+static int register_all_packages()
+{
+ return 0; //flag for packages manager
+}
+
+bool AppDelegate::applicationDidFinishLaunching()
+{
+ // set default FPS
+ Director::getInstance()->setAnimationInterval(1.0 / 60.0f);
+
+ // register lua module
+ auto engine = LuaEngine::getInstance();
+ ScriptEngineManager::getInstance()->setScriptEngine(engine);
+ lua_State* L = engine->getLuaStack()->getLuaState();
+ lua_module_register(L);
+ engine->executeString("print = release_print");
+ register_all_packages();
+
+ LuaStack* stack = engine->getLuaStack();
+ stack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));
+
+ //register custom function
+ //LuaStack* stack = engine->getLuaStack();
+ //register_custom_function(stack->getLuaState());
+
+#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+ // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
+ auto runtimeEngine = RuntimeEngine::getInstance();
+ runtimeEngine->addRuntime(RuntimeLuaImpl::create(), kRuntimeEngineLua);
+ runtimeEngine->start();
+#else
+ if (engine->executeScriptFile("src/main.lua"))
+ {
+ return false;
+ }
+#endif
+
+ return true;
+}
+
+// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
+void AppDelegate::applicationDidEnterBackground()
+{
+ Director::getInstance()->stopAnimation();
+
+ SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
+}
+
+// this function will be called when the app is active again
+void AppDelegate::applicationWillEnterForeground()
+{
+ Director::getInstance()->startAnimation();
+
+ SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
+}
diff --git a/frameworks/runtime-src/Classes/AppDelegate.h b/frameworks/runtime-src/Classes/AppDelegate.h
new file mode 100644
index 0000000..a2699dc
--- /dev/null
+++ b/frameworks/runtime-src/Classes/AppDelegate.h
@@ -0,0 +1,40 @@
+#ifndef __APP_DELEGATE_H__
+#define __APP_DELEGATE_H__
+
+#include "cocos2d.h"
+
+/**
+@brief The cocos2d Application.
+
+The reason for implement as private inheritance is to hide some interface call by Director.
+*/
+class AppDelegate : private cocos2d::Application
+{
+public:
+ AppDelegate();
+ virtual ~AppDelegate();
+
+ virtual void initGLContextAttrs();
+
+ /**
+ @brief Implement Director and Scene init code here.
+ @return true Initialize success, app continue.
+ @return false Initialize failed, app terminate.
+ */
+ virtual bool applicationDidFinishLaunching();
+
+ /**
+ @brief The function be called when the application enter background
+ @param the pointer of the application
+ */
+ virtual void applicationDidEnterBackground();
+
+ /**
+ @brief The function be called when the application enter foreground
+ @param the pointer of the application
+ */
+ virtual void applicationWillEnterForeground();
+};
+
+#endif // __APP_DELEGATE_H__
+
diff --git a/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h b/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h
new file mode 100644
index 0000000..134ca6f
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/CodeIDESupport.h
@@ -0,0 +1,7 @@
+#ifndef __CODE_IDE_SUPPORT_H__
+#define __CODE_IDE_SUPPORT_H__
+
+// define 1 to open Cocos Code IDE support, 0 to disable
+#define CC_CODE_IDE_DEBUG_SUPPORT 0
+
+#endif /* __CODE_IDE_SUPPORT_H__ */
diff --git a/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp b/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp
new file mode 100644
index 0000000..0167380
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp
@@ -0,0 +1,342 @@
+//
+// RuntimeLuaImpl.cpp
+// Simulator
+//
+//
+
+#include "RuntimeLuaImpl.h"
+
+#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+
+#include
+#include
+
+#include "lua_debugger.h"
+#include "CCLuaEngine.h"
+#include "LuaBasicConversions.h"
+#include "lua_module_register.h"
+
+#include "runtime/Runtime.h"
+#include "runtime/ConfigParser.h"
+#include "runtime/FileServer.h"
+
+USING_NS_CC;
+using namespace std;
+
+static void resetLuaModule(const string& fileName)
+{
+ if (fileName.empty())
+ {
+ return;
+ }
+ auto engine = LuaEngine::getInstance();
+ LuaStack* luaStack = engine->getLuaStack();
+ lua_State* stack = luaStack->getLuaState();
+ lua_getglobal(stack, "package"); /* L: package */
+ lua_getfield(stack, -1, "loaded"); /* L: package loaded */
+ lua_pushnil(stack); /* L: lotable ?-.. nil */
+ while (0 != lua_next(stack, -2)) /* L: lotable ?-.. key value */
+ {
+ //CCLOG("%s - %s \n", tolua_tostring(stack, -2, ""), lua_typename(stack, lua_type(stack, -1)));
+ std::string key = tolua_tostring(stack, -2, "");
+ std::string tableKey = key;
+ size_t found = tableKey.rfind(".lua");
+ if (found != std::string::npos)
+ tableKey = tableKey.substr(0, found);
+ tableKey = replaceAll(tableKey, ".", "/");
+ tableKey = replaceAll(tableKey, "\\", "/");
+ tableKey.append(".lua");
+ found = fileName.rfind(tableKey);
+ if (0 == found || (found != std::string::npos && fileName.at(found - 1) == '/'))
+ {
+ lua_pushstring(stack, key.c_str());
+ lua_pushnil(stack);
+ if (lua_istable(stack, -5))
+ {
+ lua_settable(stack, -5);
+ }
+ }
+ lua_pop(stack, 1);
+ }
+ lua_pop(stack, 2);
+}
+
+bool reloadScript(const string& file)
+{
+ auto director = Director::getInstance();
+ FontFNT::purgeCachedData();
+ if (director->getOpenGLView())
+ {
+ SpriteFrameCache::getInstance()->removeSpriteFrames();
+ director->getTextureCache()->removeAllTextures();
+ }
+ FileUtils::getInstance()->purgeCachedEntries();
+ string modulefile = file;
+
+ if (! modulefile.empty())
+ {
+ resetLuaModule(modulefile);
+ }
+ else
+ {
+ modulefile = ConfigParser::getInstance()->getEntryFile().c_str();
+ }
+
+ auto engine = LuaEngine::getInstance();
+ LuaStack* luaStack = engine->getLuaStack();
+ std::string require = "require \'" + modulefile + "\'";
+ return luaStack->executeString(require.c_str());
+}
+
+int lua_cocos2dx_runtime_addSearchPath(lua_State* tolua_S)
+{
+ int argc = 0;
+ cocos2d::FileUtils* cobj = nullptr;
+ bool ok = true;
+
+#if COCOS2D_DEBUG >= 1
+ tolua_Error tolua_err;
+#endif
+
+
+#if COCOS2D_DEBUG >= 1
+ if (!tolua_isusertype(tolua_S,1,"cc.FileUtils",0,&tolua_err)) goto tolua_lerror;
+#endif
+
+ cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0);
+
+#if COCOS2D_DEBUG >= 1
+ if (!cobj)
+ {
+ tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_addSearchPath'", nullptr);
+ return 0;
+ }
+#endif
+
+ argc = lua_gettop(tolua_S)-1;
+ if (argc == 1 || argc == 2)
+ {
+ std::string arg0;
+ bool arg1 = false;
+
+ ok &= luaval_to_std_string(tolua_S, 2,&arg0);
+
+ if (argc == 2)
+ {
+ ok &= luaval_to_boolean(tolua_S, 3, &arg1);
+ }
+
+ if(!ok)
+ return 0;
+
+ if (! FileUtils::getInstance()->isAbsolutePath(arg0))
+ {
+ // add write path to search path
+ if (FileServer::getShareInstance()->getIsUsingWritePath())
+ {
+ cobj->addSearchPath(FileServer::getShareInstance()->getWritePath() + arg0, arg1);
+ } else
+ {
+ cobj->addSearchPath(arg0, arg1);
+ }
+
+#if(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
+ // add project path to search path
+ cobj->addSearchPath(g_projectPath + arg0, arg1);
+#endif
+ }
+ return 0;
+ }
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "addSearchPath",argc, 1);
+ return 0;
+
+#if COCOS2D_DEBUG >= 1
+tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_addSearchPath'.",&tolua_err);
+#endif
+
+ return 0;
+}
+
+int lua_cocos2dx_runtime_setSearchPaths(lua_State* tolua_S)
+{
+ int argc = 0;
+ cocos2d::FileUtils* cobj = nullptr;
+ bool ok = true;
+
+#if COCOS2D_DEBUG >= 1
+ tolua_Error tolua_err;
+#endif
+
+
+#if COCOS2D_DEBUG >= 1
+ if (!tolua_isusertype(tolua_S,1,"cc.FileUtils",0,&tolua_err)) goto tolua_lerror;
+#endif
+
+ cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0);
+
+#if COCOS2D_DEBUG >= 1
+ if (!cobj)
+ {
+ tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_runtime_setSearchPaths'", nullptr);
+ return 0;
+ }
+#endif
+
+ argc = lua_gettop(tolua_S)-1;
+ if (argc == 1)
+ {
+ std::vector vecPaths, writePaths;
+
+ ok &= luaval_to_std_vector_string(tolua_S, 2, &vecPaths);
+ if(!ok)
+ return 0;
+ std::vector originPath; // for IOS platform.
+ std::vector projPath; // for Desktop platform.
+ for (size_t i = 0; i < vecPaths.size(); i++)
+ {
+ if (!FileUtils::getInstance()->isAbsolutePath(vecPaths[i]))
+ {
+ originPath.push_back(vecPaths[i]); // for IOS platform.
+ projPath.push_back(g_projectPath + vecPaths[i]); //for Desktop platform.
+ writePaths.push_back(FileServer::getShareInstance()->getWritePath() + vecPaths[i]);
+ }
+ }
+
+#if(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
+ vecPaths.insert(vecPaths.end(), projPath.begin(), projPath.end());
+#endif
+ if (FileServer::getShareInstance()->getIsUsingWritePath())
+ {
+ vecPaths.insert(vecPaths.end(), writePaths.begin(), writePaths.end());
+ } else
+ {
+ vecPaths.insert(vecPaths.end(), originPath.begin(), originPath.end());
+ }
+
+ cobj->setSearchPaths(vecPaths);
+ return 0;
+ }
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setSearchPaths",argc, 1);
+ return 0;
+
+#if COCOS2D_DEBUG >= 1
+tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_runtime_setSearchPaths'.",&tolua_err);
+#endif
+
+ return 0;
+}
+
+static void register_runtime_override_function(lua_State* tolua_S)
+{
+ lua_pushstring(tolua_S, "cc.FileUtils");
+ lua_rawget(tolua_S, LUA_REGISTRYINDEX);
+ if (lua_istable(tolua_S,-1)){
+ tolua_function(tolua_S,"addSearchPath",lua_cocos2dx_runtime_addSearchPath);
+ tolua_function(tolua_S,"setSearchPaths",lua_cocos2dx_runtime_setSearchPaths);
+ }
+ lua_pop(tolua_S, 1);
+}
+
+static void luaScriptLoader(std::string strDebugArg)
+{
+
+}
+
+////////////////////////////////////////
+
+RuntimeLuaImpl *RuntimeLuaImpl::create()
+{
+ auto instance = new RuntimeLuaImpl();
+ return instance;
+}
+
+void RuntimeLuaImpl::onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse)
+{
+ // Lua
+ char szDebugArg[1024] = {0};
+ sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(), "");
+ startScript(szDebugArg);
+ dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator());
+}
+
+void RuntimeLuaImpl::onReload(const rapidjson::Document &dArgParse, rapidjson::Document &dReplyParse)
+{
+ // lua
+ if (dArgParse.HasMember("modulefiles"))
+ {
+ auto& allocator = dReplyParse.GetAllocator();
+ rapidjson::Value bodyvalue(rapidjson::kObjectType);
+ const rapidjson::Value& objectfiles = dArgParse["modulefiles"];
+ for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++)
+ {
+ if (!reloadScript(objectfiles[i].GetString()))
+ {
+ bodyvalue.AddMember(rapidjson::Value(objectfiles[i].GetString(), allocator)
+ , rapidjson::Value(1)
+ , allocator);
+ }
+ }
+ if (0 == objectfiles.Size())
+ {
+ reloadScript("");
+ }
+ dReplyParse.AddMember("body", bodyvalue, dReplyParse.GetAllocator());
+ }
+
+ dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator());
+}
+
+void RuntimeLuaImpl::startScript(const std::string& strDebugArg)
+{
+ init();
+ auto engine = LuaEngine::getInstance();
+ auto stack = engine->getLuaStack();
+
+ const ProjectConfig &project = RuntimeEngine::getInstance()->getProjectConfig();
+
+ // set search path
+ string path = FileUtils::getInstance()->fullPathForFilename(project.getScriptFileRealPath().c_str());
+ size_t pos;
+ while ((pos = path.find_first_of("\\")) != std::string::npos)
+ {
+ path.replace(pos, 1, "/");
+ }
+ size_t p = path.find_last_of("/");
+ string workdir;
+ if (p != path.npos)
+ {
+ workdir = path.substr(0, p);
+ stack->addSearchPath(workdir.c_str());
+ FileUtils::getInstance()->addSearchPath(workdir);
+ }
+
+ // register lua engine
+ if (!strDebugArg.empty())
+ {
+ // open debugger.lua module
+ cocos2d::log("debug args = %s", strDebugArg.c_str());
+ luaopen_lua_debugger(engine->getLuaStack()->getLuaState());
+ engine->executeString(strDebugArg.c_str());
+ }
+ std::string code("require \"");
+ code.append(ConfigParser::getInstance()->getEntryFile().c_str());
+ code.append("\"");
+ engine->executeString(code.c_str());
+}
+
+//
+// private
+//
+
+void RuntimeLuaImpl::init()
+{
+ auto engine = LuaEngine::getInstance();
+ ScriptEngineManager::getInstance()->setScriptEngine(engine);
+ lua_module_register(engine->getLuaStack()->getLuaState());
+ register_runtime_override_function(engine->getLuaStack()->getLuaState());
+ engine->getLuaStack()->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));
+}
+
+#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
\ No newline at end of file
diff --git a/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h b/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h
new file mode 100644
index 0000000..d67c923
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.h
@@ -0,0 +1,32 @@
+//
+// RuntimeLuaImpl.h
+// Simulator
+//
+//
+
+#ifndef __Simulator__RuntimeLuaImpl__
+#define __Simulator__RuntimeLuaImpl__
+
+#include "CodeIDESupport.h"
+#include "cocos2d.h"
+
+#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+
+#include "runtime/RuntimeProtocol.h"
+
+class RuntimeLuaImpl : public RuntimeProtocol
+{
+public:
+ static RuntimeLuaImpl *create();
+
+ void onStartDebuger(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse);
+ void onReload(const rapidjson::Document& dArgParse, rapidjson::Document& dReplyParse);
+ void startScript(const std::string& strDebugArg);
+
+private:
+ void init();
+};
+
+#endif // (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
+
+#endif /* defined(__Simulator__RuntimeLua__) */
diff --git a/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp b/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp
new file mode 100644
index 0000000..af4e6ff
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.cpp
@@ -0,0 +1,70 @@
+
+#include "json/document.h"
+#include "json/filestream.h"
+#include "json/stringbuffer.h"
+#include "json/writer.h"
+#include "SimpleConfigParser.h"
+
+// SimpleConfigParser
+SimpleConfigParser *SimpleConfigParser::s_sharedSimpleConfigParserInstance = NULL;
+SimpleConfigParser *SimpleConfigParser::getInstance(void)
+{
+ if (!s_sharedSimpleConfigParserInstance)
+ {
+ s_sharedSimpleConfigParserInstance = new SimpleConfigParser();
+ s_sharedSimpleConfigParserInstance->readConfig();
+ }
+ return s_sharedSimpleConfigParserInstance;
+}
+
+void SimpleConfigParser::purge()
+{
+ CC_SAFE_DELETE(s_sharedSimpleConfigParserInstance);
+}
+
+void SimpleConfigParser::readConfig(const string &filepath)
+{
+ string fullPathFile = filepath;
+
+ // read config file
+ if (fullPathFile.empty())
+ {
+ fullPathFile = FileUtils::getInstance()->fullPathForFilename(CONFIG_FILE);
+ }
+ string fileContent = FileUtils::getInstance()->getStringFromFile(fullPathFile);
+
+ if(fileContent.empty())
+ return;
+
+ if (_docRootjson.Parse<0>(fileContent.c_str()).HasParseError()) {
+ cocos2d::log("read json file %s failed because of %d", fullPathFile.c_str(), _docRootjson.GetParseError());
+ return;
+ }
+
+ if (_docRootjson.HasMember("init_cfg"))
+ {
+ if(_docRootjson["init_cfg"].IsObject())
+ {
+ const rapidjson::Value& objectInitView = _docRootjson["init_cfg"];
+ if (objectInitView.HasMember("isLandscape") && objectInitView["isLandscape"].IsBool())
+ {
+ _isLandscape = objectInitView["isLandscape"].GetBool();
+ }
+ }
+ }
+}
+
+SimpleConfigParser::SimpleConfigParser(void) :
+_isLandscape(true)
+{
+}
+
+rapidjson::Document& SimpleConfigParser::getConfigJsonRoot()
+{
+ return _docRootjson;
+}
+
+bool SimpleConfigParser::isLanscape()
+{
+ return _isLandscape;
+}
diff --git a/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h b/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h
new file mode 100644
index 0000000..2dc1aa0
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/SimpleConfigParser.h
@@ -0,0 +1,31 @@
+#ifndef __SIMPLE_CONFIG_PARSER_H__
+#define __SIMPLE_CONFIG_PARSER_H__
+
+#include
+#include
+#include "cocos2d.h"
+#include "json/document.h"
+using namespace std;
+USING_NS_CC;
+
+#define CONFIG_FILE "config.json"
+
+class SimpleConfigParser
+{
+public:
+ static SimpleConfigParser *getInstance(void);
+ static void purge();
+
+ void readConfig(const string &filepath = "");
+ bool isLanscape();
+ rapidjson::Document& getConfigJsonRoot();
+private:
+ SimpleConfigParser(void);
+ static SimpleConfigParser *s_sharedSimpleConfigParserInstance;
+ bool _isLandscape;
+
+ rapidjson::Document _docRootjson;
+};
+
+#endif // __SIMPLE_CONFIG_PARSER_H__
+
diff --git a/frameworks/runtime-src/Classes/ide-support/lang b/frameworks/runtime-src/Classes/ide-support/lang
new file mode 100644
index 0000000..1c13dac
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/lang
@@ -0,0 +1,29 @@
+{
+ "zh-CN": {
+ "View": "视图(&V)",
+ "Exit": "退出(&X)",
+ "File": "文件(&F)",
+ "Portrait": "竖屏",
+ "Landscape": "横屏",
+ "Refresh": "刷新(重启)",
+ "Zoom Out": "缩放",
+ "Simulator": "模拟器",
+ "Open File": "打开文件",
+ "Open Project": "打开工程",
+ "Error": "错误",
+ "Help": "帮助(&H)",
+ "About": "关于(&A)"
+ },
+ "zh-Hans": {
+ "View": "视图",
+ "Exit": "退出",
+ "File": "文件",
+ "Portrait": "竖屏",
+ "Landscape": "横屏",
+ "Refresh": "刷新(重启)",
+ "Zoom Out": "缩放",
+ "Simulator": "模拟器",
+ "Help": "帮助(&H)",
+ "About": "关于(&A)"
+ }
+}
\ No newline at end of file
diff --git a/frameworks/runtime-src/Classes/ide-support/lua_debugger.c b/frameworks/runtime-src/Classes/ide-support/lua_debugger.c
new file mode 100644
index 0000000..2b695a1
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/lua_debugger.c
@@ -0,0 +1,8673 @@
+
+/* lua_debugger.c */
+
+#if __cplusplus
+extern "C" {
+#endif
+
+#include "lua.h"
+#include "lauxlib.h"
+#include "lua_debugger.h"
+
+/* debugger */
+static const char lua_m_debugger[] = {
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,
+ 0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,
+ 0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,
+ 0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,
+ 0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,
+ 0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,
+ 0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,
+ 0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,
+ 0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,
+ 0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,
+ 0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,
+ 0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,
+ 0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,
+ 0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,
+ 0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,
+ 0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,
+ 0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,
+ 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,
+ 0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,
+ 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x20,0x75,0x73,0x69,0x6e,0x67,0x20,0x44,0x42,0x47,0x70,0x20,
+ 0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,
+ 0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,
+ 0x61,0x20,0x73,0x69,0x6e,0x67,0x6c,0x65,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x74,0x61,0x6b,
+ 0x65,0x73,0x20,0x36,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73,0x20,
+ 0x28,0x49,0x44,0x45,0x48,0x4f,0x53,0x54,0x2c,0x20,0x49,0x44,0x45,0x50,0x4f,0x52,
+ 0x54,0x2c,0x20,0x49,0x44,0x45,0x4b,0x45,0x59,0x2c,0x20,0x54,0x52,0x41,0x4e,0x53,
+ 0x50,0x4f,0x52,0x54,0x2c,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x2c,0x20,
+ 0x57,0x4f,0x52,0x4b,0x49,0x4e,0x47,0x44,0x49,0x52,0x29,0x2e,0x0a,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x49,0x44,0x45,0x48,0x4f,0x53,0x54,0x3a,0x20,0x74,0x68,0x65,0x20,
+ 0x68,0x6f,0x73,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x6f,0x72,0x20,0x74,0x68,0x65,
+ 0x20,0x69,0x70,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x20,0x6f,0x66,0x20,0x74,
+ 0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x28,
+ 0x73,0x6f,0x20,0x79,0x6f,0x75,0x72,0x20,0x69,0x64,0x65,0x29,0x0a,0x2d,0x2d,0x20,
+ 0x69,0x66,0x20,0x48,0x4f,0x53,0x54,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,
+ 0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x48,0x4f,0x53,0x54,
+ 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20,
+ 0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,
+ 0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x31,
+ 0x32,0x37,0x2e,0x30,0x2e,0x30,0x2e,0x31,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,
+ 0x64,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x44,0x45,0x50,0x4f,0x52,0x54,
+ 0x3a,0x20,0x74,0x68,0x65,0x20,0x70,0x6f,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,
+ 0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x20,0x28,0x6d,
+ 0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x63,0x6f,0x6e,0x66,0x69,0x67,0x75,0x72,0x65,
+ 0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20,
+ 0x69,0x66,0x20,0x50,0x4f,0x52,0x54,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,
+ 0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x50,0x4f,0x52,0x54,
+ 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20,
+ 0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,
+ 0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x31,
+ 0x30,0x30,0x30,0x30,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x44,0x45,0x49,0x44,0x45,0x4b,0x45,0x59,0x3a,0x20,
+ 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,
+ 0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,
+ 0x6e,0x20,0x6b,0x65,0x79,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x49,0x44,0x45,0x4b,
+ 0x45,0x59,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,
+ 0x42,0x47,0x50,0x5f,0x49,0x44,0x45,0x4b,0x45,0x59,0x20,0x65,0x6e,0x76,0x20,0x76,
+ 0x61,0x72,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,
+ 0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,
+ 0x20,0x6e,0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,
+ 0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x27,0x6c,0x75,0x61,0x69,0x64,0x65,0x6b,
+ 0x65,0x79,0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x3a,0x20,0x28,0x61,
+ 0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,
+ 0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x29,0x20,0x74,0x68,0x65,0x20,
+ 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x6f,0x66,0x20,0x77,
+ 0x68,0x69,0x63,0x68,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x20,0x69,0x6e,0x74,
+ 0x65,0x72,0x66,0x61,0x63,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x64,
+ 0x6f,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x73,0x65,0x72,0x76,0x65,0x72,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,
+ 0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x75,0x73,0x65,
+ 0x20,0x61,0x6e,0x20,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x69,0x6d,
+ 0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x62,0x61,0x73,
+ 0x65,0x64,0x20,0x6f,0x6e,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2c,
+ 0x20,0x62,0x75,0x74,0x20,0x69,0x66,0x20,0x63,0x61,0x6e,0x20,0x6e,0x6f,0x74,0x20,
+ 0x75,0x73,0x65,0x20,0x69,0x74,0x2c,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c,
+ 0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x6f,0x72,0x20,0x75,
+ 0x73,0x65,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x72,0x61,0x6e,0x73,
+ 0x70,0x6f,0x72,0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x20,0x69,0x6d,0x70,0x6c,0x65,
+ 0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,
+ 0x20,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x20,0x69,0x73,0x20,0x6e,0x69,
+ 0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x54,0x52,0x41,0x4e,
+ 0x53,0x50,0x4f,0x52,0x54,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,
+ 0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,
+ 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,
+ 0x75,0x65,0x20,0x27,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,
+ 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,
+ 0x27,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x3a,0x20,0x74,0x68,0x69,0x73,
+ 0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,
+ 0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x62,
+ 0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,
+ 0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,
+ 0x4d,0x3a,0x20,0x28,0x61,0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20,0x6f,0x70,0x74,
+ 0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x29,
+ 0x20,0x27,0x75,0x6e,0x69,0x78,0x27,0x20,0x6f,0x72,0x20,0x27,0x77,0x69,0x6e,0x33,
+ 0x32,0x27,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x77,0x68,0x69,0x63,0x68,0x20,
+ 0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x20,0x6b,0x69,0x6e,0x64,0x20,
+ 0x6f,0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x6f,0x6e,0x20,0x77,
+ 0x68,0x69,0x63,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,
+ 0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x69,0x73,0x20,0x65,0x78,0x65,
+ 0x63,0x75,0x74,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66,
+ 0x61,0x75,0x6c,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,
+ 0x65,0x73,0x73,0x20,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x75,0x72,0x65,0x6c,
+ 0x79,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x69,0x66,0x20,0x66,0x6f,
+ 0x72,0x20,0x73,0x6f,0x6d,0x65,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x73,0x20,0x69,
+ 0x74,0x20,0x66,0x61,0x69,0x6c,0x73,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c,
+ 0x64,0x20,0x68,0x65,0x6c,0x70,0x20,0x69,0x74,0x20,0x62,0x79,0x20,0x70,0x72,0x65,
+ 0x63,0x69,0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,
+ 0x6f,0x6e,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x0a,0x2d,0x2d,0x20,
+ 0x69,0x66,0x20,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x20,0x69,0x73,0x20,0x6e,
+ 0x69,0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x50,0x4c,0x41,
+ 0x54,0x46,0x4f,0x52,0x4d,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,
+ 0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,0x2c,
+ 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,
+ 0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73,0x20,
+ 0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x57,0x4f,0x52,0x4b,0x49,0x4e,
+ 0x47,0x44,0x49,0x52,0x3a,0x20,0x28,0x61,0x64,0x76,0x61,0x6e,0x63,0x65,0x64,0x20,
+ 0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,
+ 0x65,0x72,0x29,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,
+ 0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x69,0x6e,0x20,0x77,0x68,0x69,
+ 0x63,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x74,
+ 0x6f,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x69,0x73,0x20,0x65,0x78,0x65,0x63,0x75,
+ 0x74,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x62,0x79,0x20,0x64,0x65,0x66,0x61,0x75,
+ 0x6c,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,
+ 0x77,0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,
+ 0x73,0x20,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x75,0x72,0x65,0x6c,0x79,0x20,
+ 0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x69,0x66,0x20,0x66,0x6f,0x72,0x20,
+ 0x73,0x6f,0x6d,0x65,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x73,0x20,0x69,0x74,0x20,
+ 0x66,0x61,0x69,0x6c,0x73,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,
+ 0x68,0x65,0x6c,0x70,0x20,0x69,0x74,0x20,0x62,0x79,0x20,0x70,0x72,0x65,0x63,0x69,
+ 0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x64,
+ 0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,
+ 0x57,0x4f,0x52,0x4b,0x49,0x4e,0x47,0x44,0x49,0x52,0x20,0x69,0x73,0x20,0x6e,0x69,
+ 0x6c,0x2c,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,0x50,0x5f,0x57,0x4f,0x52,0x4b,
+ 0x49,0x4e,0x47,0x44,0x49,0x52,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,
+ 0x73,0x20,0x75,0x73,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x69,0x66,0x20,0x74,0x68,
+ 0x65,0x20,0x65,0x6e,0x76,0x20,0x76,0x61,0x72,0x20,0x69,0x73,0x20,0x6e,0x69,0x6c,
+ 0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,
+ 0x69,0x6c,0x6c,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73,
+ 0x20,0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4b,0x6e,0x6f,0x77,0x6e,
+ 0x20,0x49,0x73,0x73,0x75,0x65,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,
+ 0x46,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,
+ 0x20,0x62,0x65,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x75,0x73,0x69,0x6e,
+ 0x67,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x61,
+ 0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x69,
+ 0x6e,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x62,0x65,0x63,0x61,0x75,0x73,
+ 0x65,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,
+ 0x65,0x6e,0x74,0x20,0x69,0x73,0x20,0x6d,0x61,0x70,0x70,0x65,0x64,0x20,0x64,0x69,
+ 0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x74,0x6f,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x69,0x6e,0x74,0x65,
+ 0x72,0x6e,0x61,0x6c,0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x20,0x77,
+ 0x68,0x69,0x63,0x68,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x70,
+ 0x65,0x72,0x73,0x69,0x73,0x74,0x65,0x64,0x20,0x28,0x69,0x2e,0x65,0x2e,0x20,0x75,
+ 0x73,0x65,0x64,0x20,0x6f,0x75,0x74,0x73,0x69,0x64,0x65,0x20,0x6f,0x66,0x20,0x74,
+ 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x68,0x6f,0x6f,0x6b,0x29,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68,0x65,0x20,0x44,0x4c,0x54,0x4b,0x20,
+ 0x63,0x6c,0x69,0x65,0x6e,0x74,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,
+ 0x61,0x74,0x69,0x6f,0x6e,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x68,
+ 0x61,0x6e,0x64,0x6c,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x66,0x6f,
+ 0x72,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x2e,0x20,0x41,0x73,
+ 0x20,0x61,0x20,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75,0x6e,0x64,0x2c,0x20,0x74,
+ 0x68,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x65,0x6e,
+ 0x63,0x6f,0x64,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x61,
+ 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x6f,0x66,0x20,0x65,0x61,0x63,0x68,
+ 0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,
+ 0x20,0x75,0x73,0x65,0x64,0x20,0x6c,0x69,0x6b,0x65,0x77,0x69,0x73,0x65,0x20,0x69,
+ 0x6e,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x20,0x63,
+ 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2e,0x20,0x54,0x68,0x65,0x20,0x73,0x79,0x6e,
+ 0x74,0x61,0x78,0x20,0x69,0x73,0x20,0x22,0x3c,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x20,0x49,0x44,0x3e,0x7c,0x3c,0x66,0x75,0x6c,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x3e,
+ 0x22,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x44,0x79,0x6e,0x61,0x6d,0x69,0x63,
+ 0x20,0x63,0x6f,0x64,0x65,0x20,0x28,0x63,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x64,0x20,
+ 0x77,0x69,0x74,0x68,0x20,0x6c,0x6f,0x61,0x64,0x20,0x6f,0x72,0x20,0x6c,0x6f,0x61,
+ 0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x68,0x61,0x6e,0x64,0x6c,0x65,0x64,0x20,0x28,0x74,0x68,0x65,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x73,0x74,0x65,0x70,0x20,
+ 0x6f,0x76,0x65,0x72,0x20,0x69,0x74,0x2c,0x20,0x6c,0x69,0x6b,0x65,0x20,0x43,0x20,
+ 0x63,0x6f,0x64,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x73,0x69,0x67,0x6e,0x20,
+ 0x6e,0x6f,0x74,0x65,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68,
+ 0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x69,0x73,0x20,0x6b,0x65,0x70,0x74,0x20,0x69,
+ 0x6e,0x20,0x61,0x20,0x28,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x79,0x29,0x20,
+ 0x75,0x6e,0x69,0x71,0x75,0x65,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f,
+ 0x20,0x65,0x61,0x73,0x65,0x20,0x65,0x76,0x65,0x6e,0x74,0x75,0x61,0x6c,0x20,0x61,
+ 0x64,0x61,0x70,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x61,0x20,0x6d,
+ 0x75,0x6c,0x74,0x69,0x2d,0x74,0x68,0x72,0x65,0x61,0x64,0x65,0x64,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x20,0x20,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x2c,0x20,0x61,0x73,0x20,0x44,
+ 0x42,0x47,0x70,0x20,0x6e,0x65,0x65,0x64,0x73,0x20,0x6f,0x6e,0x65,0x20,0x63,0x6f,
+ 0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x65,0x72,0x20,0x74,0x68,0x72,
+ 0x65,0x61,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x46,0x75,0x6c,0x6c,
+ 0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,
+ 0x74,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,
+ 0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,0x20,
+ 0x74,0x68,0x65,0x79,0x20,0x63,0x61,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,
+ 0x20,0x61,0x72,0x62,0x69,0x74,0x72,0x61,0x72,0x79,0x20,0x64,0x61,0x74,0x61,0x20,
+ 0x28,0x73,0x70,0x61,0x63,0x65,0x73,0x2c,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x20,
+ 0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,
+ 0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x61,0x6b,0x65,0x73,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x70,0x61,0x72,0x73,
+ 0x69,0x6e,0x67,0x20,0x6d,0x75,0x6e,0x63,0x68,0x20,0x65,0x61,0x73,0x69,0x65,0x72,
+ 0x20,0x61,0x6e,0x64,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x2a,0x20,0x54,0x68,0x69,0x73,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x73,0x20,0x61,0x73,0x79,0x6e,0x63,0x68,
+ 0x72,0x6f,0x6e,0x6f,0x75,0x73,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x3a,
+ 0x20,0x61,0x6e,0x79,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x63,0x61,0x6e,
+ 0x20,0x62,0x65,0x20,0x64,0x6f,0x6e,0x65,0x20,0x61,0x74,0x20,0x61,0x6e,0x79,0x20,
+ 0x74,0x69,0x6d,0x65,0x2c,0x20,0x62,0x75,0x74,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6f,
+ 0x66,0x20,0x74,0x68,0x65,0x6d,0x20,0x28,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61,
+ 0x74,0x69,0x6f,0x6e,0x73,0x29,0x20,0x63,0x61,0x6e,0x20,0x6c,0x65,0x61,0x64,0x20,
+ 0x74,0x6f,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x63,0x6f,0x6e,0x73,
+ 0x69,0x73,0x74,0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x74,0x65,0x73,0x2e,0x20,0x49,
+ 0x6e,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x68,0x69,0x73,
+ 0x20,0x68,0x61,0x76,0x65,0x20,0x61,0x20,0x71,0x75,0x69,0x74,0x65,0x20,0x62,0x69,
+ 0x67,0x20,0x6f,0x76,0x65,0x72,0x68,0x65,0x61,0x64,0x20,0x28,0x7e,0x36,0x36,0x25,
+ 0x29,0x2c,0x20,0x69,0x66,0x20,0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,
+ 0x65,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x73,0x73,0x75,0x65,0x2c,0x20,0x61,
+ 0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,
+ 0x74,0x6f,0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x20,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x20,0x63,0x6f,0x75,
+ 0x6c,0x64,0x20,0x62,0x65,0x20,0x64,0x6f,0x6e,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x2a,0x20,0x41,0x6c,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,
+ 0x61,0x72,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x65,0x64,0x20,
+ 0x69,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x6d,0x6d,
+ 0x65,0x6e,0x74,0x73,0x20,0x6f,0x6e,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x61,0x62,
+ 0x6c,0x65,0x20,0x74,0x6f,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,
+ 0x20,0x64,0x65,0x74,0x61,0x69,0x6c,0x73,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x63,
+ 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,
+ 0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x54,0x68,
+ 0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x73,0x20,0x69,
+ 0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x72,0x65,0x20,0x65,0x76,0x61,0x6c,
+ 0x75,0x61,0x74,0x65,0x64,0x20,0x75,0x73,0x65,0x72,0x20,0x63,0x6f,0x64,0x65,0x20,
+ 0x28,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x61,0x6e,0x64,0x20,
+ 0x65,0x76,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2c,0x20,0x63,
+ 0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x62,0x72,0x65,0x61,0x6b,
+ 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x69,0x73,0x20,
+ 0x61,0x20,0x72,0x65,0x61,0x64,0x2f,0x77,0x72,0x69,0x74,0x65,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x74,
+ 0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,
+ 0x6d,0x65,0x6e,0x74,0x20,0x6f,0x66,0x20,0x61,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,
+ 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x63,0x61,0x6e,
+ 0x20,0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x65,0x64,0x20,0x77,0x69,0x74,
+ 0x68,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,
+ 0x29,0x2e,0x20,0x53,0x65,0x65,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x66,
+ 0x6f,0x72,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x64,0x65,
+ 0x74,0x61,0x69,0x6c,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x43,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74,
+ 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x70,0x6f,0x6f,0x6c,0x65,0x64,0x20,0x69,0x6e,
+ 0x73,0x69,0x64,0x65,0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x69,0x6e,0x67,
+ 0x20,0x6c,0x6f,0x6f,0x70,0x20,0x77,0x69,0x74,0x68,0x20,0x43,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x20,0x28,0x65,0x61,0x63,0x68,0x20,
+ 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x69,
+ 0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,
+ 0x20,0x6f,0x6e,0x63,0x65,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x4f,
+ 0x75,0x74,0x70,0x75,0x74,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e,0x65,0x20,0x62,0x79,0x20,0x72,0x65,0x64,
+ 0x65,0x66,0x69,0x6e,0x69,0x6e,0x67,0x20,0x70,0x72,0x69,0x6e,0x74,0x20,0x61,0x6e,
+ 0x64,0x20,0x73,0x6f,0x6d,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x69,0x6e,
+ 0x73,0x69,0x64,0x65,0x20,0x74,0x68,0x65,0x20,0x69,0x6f,0x20,0x74,0x61,0x62,0x6c,
+ 0x65,0x2e,0x20,0x53,0x65,0x65,0x20,0x22,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x72,
+ 0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61,0x6e,0x64,0x6c,
+ 0x69,0x6e,0x67,0x22,0x20,0x66,0x6f,0x72,0x20,0x64,0x65,0x74,0x61,0x69,0x6c,0x73,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x6f,0x64,0x6f,0x20,0x6c,0x69,0x73,0x74,0x3a,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x4f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x20,
+ 0x49,0x2f,0x4f,0x20,0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,
+ 0x6f,0x6e,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x6c,0x6f,0x61,0x64,0x69,0x6e,
+ 0x67,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x41,0x6c,0x6c,0x6f,0x77,0x20,
+ 0x74,0x6f,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,
+ 0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x20,0x28,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x62,0x72,0x65,0x61,0x6b,0x28,0x29,0x29,0x2e,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x2a,0x20,0x42,0x72,0x65,0x61,0x6b,0x2d,0x6f,0x6e,0x2d,0x65,0x72,0x72,
+ 0x6f,0x72,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x28,0x62,0x72,0x65,0x61,
+ 0x6b,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69,0x73,
+ 0x20,0x74,0x68,0x72,0x6f,0x77,0x6e,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x72,
+ 0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x70,0x63,0x61,0x6c,0x6c,0x20,0x69,0x6e,
+ 0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x74,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,
+ 0x20,0x69,0x74,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x55,0x73,0x65,
+ 0x20,0x6e,0x65,0x77,0x20,0x35,0x2e,0x32,0x20,0x66,0x61,0x63,0x69,0x6c,0x69,0x74,
+ 0x69,0x65,0x73,0x20,0x74,0x6f,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x20,0x69,
+ 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x61,0x62,0x6f,0x75,
+ 0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x61,0x72,0x67,0x75,
+ 0x6d,0x65,0x6e,0x74,0x73,0x20,0x6e,0x61,0x6d,0x65,0x73,0x2c,0x20,0x76,0x61,0x72,
+ 0x61,0x72,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,
+ 0x20,0x41,0x6c,0x6c,0x6f,0x77,0x20,0x74,0x6f,0x20,0x73,0x65,0x65,0x20,0x2e,0x2e,
+ 0x2e,0x20,0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x76,0x61,
+ 0x72,0x61,0x72,0x67,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x28,
+ 0x35,0x2e,0x32,0x20,0x6f,0x6e,0x6c,0x79,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x2a,
+ 0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54,0x20,
+ 0x43,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6c,
+ 0x75,0x61,0x2d,0x75,0x73,0x65,0x72,0x73,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x69,0x73,
+ 0x74,0x73,0x2f,0x6c,0x75,0x61,0x2d,0x6c,0x2f,0x32,0x30,0x31,0x31,0x2d,0x30,0x32,
+ 0x2f,0x6d,0x73,0x67,0x30,0x31,0x30,0x31,0x32,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x2d,
+ 0x2d,0x20,0x2f,0x21,0x5c,0x20,0x54,0x68,0x69,0x73,0x20,0x66,0x69,0x6c,0x65,0x20,
+ 0x69,0x73,0x20,0x61,0x75,0x74,0x6f,0x2d,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x64,0x2e,0x20,0x44,0x6f,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6c,0x74,0x65,0x72,0x20,
+ 0x6d,0x61,0x6e,0x75,0x61,0x6c,0x6c,0x79,0x20,0x2f,0x21,0x5c,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x53,0x75,0x62,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x73,0x20,0x62,0x6f,
+ 0x64,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,
+ 0x72,0x74,0x2e,0x61,0x70,0x72,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,
+ 0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x61,0x70,0x72,0x22,0x5d,
+ 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,
+ 0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,
+ 0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,
+ 0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,
+ 0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,
+ 0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,
+ 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,
+ 0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,
+ 0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,
+ 0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,
+ 0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,
+ 0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,
+ 0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,
+ 0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,
+ 0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,
+ 0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,
+ 0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,
+ 0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,
+ 0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,
+ 0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,
+ 0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,
+ 0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,
+ 0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x41,0x70,0x61,
+ 0x63,0x68,0x65,0x20,0x50,0x6f,0x72,0x74,0x61,0x62,0x6c,0x65,0x20,0x52,0x75,0x6e,
+ 0x74,0x69,0x6d,0x65,0x20,0x62,0x61,0x63,0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72,
+ 0x20,0x44,0x42,0x47,0x50,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x70,0x72,0x20,0x3d,0x20,0x72,0x65,0x71,
+ 0x75,0x69,0x72,0x65,0x20,0x22,0x61,0x70,0x72,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x62,
+ 0x61,0x73,0x65,0x20,0x36,0x34,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x62,0x36,0x34,0x5f,0x77,0x72,0x61,
+ 0x70,0x28,0x73,0x72,0x63,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,
+ 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x36,
+ 0x34,0x5f,0x73,0x72,0x63,0x20,0x3d,0x20,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34,
+ 0x28,0x73,0x72,0x63,0x29,0x0a,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,
+ 0x20,0x23,0x62,0x36,0x34,0x5f,0x73,0x72,0x63,0x2c,0x20,0x37,0x36,0x20,0x64,0x6f,
+ 0x20,0x74,0x5b,0x23,0x74,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x62,0x36,0x34,0x5f,0x73,
+ 0x72,0x63,0x3a,0x73,0x75,0x62,0x28,0x69,0x2c,0x20,0x69,0x2b,0x37,0x35,0x29,0x2e,
+ 0x2e,0x22,0x5c,0x72,0x5c,0x6e,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,
+ 0x74,0x28,0x74,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x69,0x6d,0x70,
+ 0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x20,0x73,0x75,0x62,0x73,0x65,0x74,
+ 0x20,0x6f,0x66,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x41,0x50,
+ 0x49,0x20,0x75,0x73,0x69,0x6e,0x67,0x20,0x41,0x50,0x52,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x0a,
+ 0x20,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x64,0x64,0x72,0x65,
+ 0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63,
+ 0x74,0x28,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,
+ 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x20,
+ 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,
+ 0x20,0x6e,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,
+ 0x72,0x65,0x61,0x64,0x28,0x6e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x20,0x2d,0x2d,0x20,
+ 0x6f,0x6e,0x6c,0x79,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x20,0x72,0x65,0x61,
+ 0x64,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x0a,0x20,0x20,0x73,0x65,0x6e,0x64,
+ 0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,
+ 0x73,0x6b,0x74,0x3a,0x77,0x72,0x69,0x74,0x65,0x28,0x64,0x61,0x74,0x61,0x29,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x3d,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x29,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x63,
+ 0x6c,0x6f,0x73,0x65,0x28,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x73,0x65,
+ 0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x73,0x65,0x63,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x63,0x20,0x3d,0x3d,
+ 0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,
+ 0x6b,0x74,0x3a,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x5f,0x73,0x65,0x74,0x28,0x74,
+ 0x72,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,
+ 0x73,0x65,0x63,0x20,0x3d,0x3d,0x20,0x30,0x20,0x20,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,
+ 0x5f,0x73,0x65,0x74,0x28,0x66,0x61,0x6c,0x73,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,
+ 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x5f,0x73,0x65,0x74,0x28,0x6d,0x61,0x74,0x68,
+ 0x2e,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x73,0x65,0x63,0x20,0x2a,0x20,0x31,0x30,0x30,
+ 0x30,0x30,0x30,0x30,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x7d,0x0a,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x2e,0x5f,0x5f,0x69,
+ 0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,
+ 0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63,
+ 0x72,0x65,0x61,0x74,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,
+ 0x6b,0x74,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e,0x73,0x6f,
+ 0x63,0x6b,0x65,0x74,0x5f,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x27,0x74,0x63,0x70,
+ 0x27,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x73,0x6b,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,
+ 0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x73,0x6b,0x74,0x20,0x3d,0x20,0x73,0x6b,
+ 0x74,0x7d,0x2c,0x20,0x53,0x4f,0x43,0x4b,0x45,0x54,0x5f,0x4d,0x54,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x6c,0x65,0x65,
+ 0x70,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e,0x73,0x6c,0x65,
+ 0x65,0x70,0x2c,0x20,0x2d,0x2d,0x20,0x65,0x78,0x61,0x63,0x74,0x20,0x73,0x61,0x6d,
+ 0x65,0x20,0x41,0x50,0x49,0x20,0x61,0x73,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,
+ 0x65,0x74,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x42,0x61,0x73,0x65,0x36,
+ 0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,
+ 0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,
+ 0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x77,0x69,0x74,0x68,0x20,0x6c,0x69,
+ 0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20,
+ 0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,
+ 0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,
+ 0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,
+ 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,
+ 0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x61,0x70,0x72,
+ 0x2e,0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x65,0x6e,0x63,0x6f,0x64,0x65,0x28,0x64,
+ 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,
+ 0x20,0x69,0x3d,0x31,0x2c,0x20,0x23,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x2c,
+ 0x20,0x37,0x36,0x20,0x64,0x6f,0x20,0x74,0x5b,0x23,0x74,0x2b,0x31,0x5d,0x20,0x3d,
+ 0x20,0x62,0x36,0x34,0x5f,0x64,0x61,0x74,0x61,0x3a,0x73,0x75,0x62,0x28,0x69,0x2c,
+ 0x20,0x69,0x2b,0x37,0x35,0x29,0x2e,0x2e,0x22,0x5c,0x72,0x5c,0x6e,0x22,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x74,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,
+ 0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,0x79,0x20,0x65,0x78,
+ 0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x20,0x28,0x77,0x72,0x61,
+ 0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20,
+ 0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x72,0x61,0x77,0x62,0x36,0x34,0x20,
+ 0x3d,0x20,0x61,0x70,0x72,0x2e,0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x65,0x6e,0x63,
+ 0x6f,0x64,0x65,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x65,
+ 0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x64,0x61,0x74,
+ 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,
+ 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x62,0x61,
+ 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x64,0x61,0x74,
+ 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,
+ 0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x61,0x70,0x72,0x2e,
+ 0x62,0x61,0x73,0x65,0x36,0x34,0x5f,0x64,0x65,0x63,0x6f,0x64,0x65,0x2c,0x0a,0x7d,
+ 0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,
+ 0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,
+ 0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x61,0x70,0x72,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,
+ 0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,
+ 0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,
+ 0x73,0x6f,0x63,0x6b,0x65,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,
+ 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,
+ 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,
+ 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,
+ 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,
+ 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,
+ 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,
+ 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,
+ 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,
+ 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,
+ 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,
+ 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,
+ 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,
+ 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,
+ 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,
+ 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,
+ 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,
+ 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x62,
+ 0x61,0x63,0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72,0x20,0x44,0x42,0x47,0x50,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20,0x69,0x6e,
+ 0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x61,0x73,0x20,
+ 0x6c,0x69,0x67,0x68,0x74,0x77,0x65,0x69,0x67,0x68,0x74,0x20,0x61,0x73,0x20,0x70,
+ 0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x4c,0x75,0x61,
+ 0x73,0x6f,0x63,0x6b,0x65,0x74,0x2c,0x20,0x63,0x6f,0x72,0x65,0x20,0x41,0x50,0x49,
+ 0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x64,0x69,0x72,0x65,
+ 0x63,0x74,0x6c,0x79,0x20,0x28,0x74,0x6f,0x20,0x6e,0x6f,0x20,0x61,0x64,0x64,0x20,
+ 0x79,0x65,0x74,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x6c,0x61,0x79,0x65,
+ 0x72,0x29,0x0a,0x0a,0x2d,0x2d,0x46,0x49,0x58,0x4d,0x45,0x3a,0x20,0x72,0x65,0x6d,
+ 0x6f,0x76,0x65,0x20,0x74,0x68,0x69,0x73,0x20,0x68,0x61,0x63,0x6b,0x20,0x61,0x73,
+ 0x20,0x73,0x6f,0x6f,0x6e,0x20,0x61,0x73,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,
+ 0x65,0x74,0x20,0x6f,0x66,0x66,0x69,0x63,0x69,0x61,0x6c,0x6c,0x79,0x20,0x73,0x75,
+ 0x70,0x70,0x6f,0x72,0x74,0x20,0x35,0x2e,0x32,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45,
+ 0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,
+ 0x32,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,
+ 0x67,0x65,0x74,0x6e,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x20,0x61,0x6e,0x64,0x20,
+ 0x23,0x74,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,
+ 0x72,0x65,0x20,0x22,0x73,0x6f,0x63,0x6b,0x65,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x6d,0x69,0x6d,0x65,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,
+ 0x72,0x65,0x20,0x22,0x6d,0x69,0x6d,0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x6c,0x74,0x6e,0x31,0x32,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,
+ 0x20,0x22,0x6c,0x74,0x6e,0x31,0x32,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,
+ 0x65,0x67,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x72,0x65,
+ 0x67,0x69,0x73,0x74,0x72,0x79,0x28,0x29,0x0a,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x3d,
+ 0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x74,0x63,0x70,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x73,0x6c,0x65,0x65,0x70,0x20,0x20,0x3d,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,
+ 0x2e,0x73,0x6c,0x65,0x65,0x70,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65,0x64,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x77,0x69,
+ 0x74,0x68,0x20,0x6c,0x69,0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,
+ 0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,
+ 0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x36,
+ 0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x0a,0x20,0x20,0x20,0x20,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x74,0x65,0x72,0x20,0x3d,
+ 0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x66,0x69,0x6c,0x74,0x65,0x72,0x2e,0x63,0x68,
+ 0x61,0x69,0x6e,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x65,0x6e,0x63,0x6f,0x64,0x65,0x28,
+ 0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x2c,0x20,0x6d,0x69,0x6d,0x65,0x2e,
+ 0x77,0x72,0x61,0x70,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,
+ 0x6e,0x6b,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x3d,0x20,0x6c,0x74,0x6e,
+ 0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x74,0x61,0x62,0x6c,0x65,0x28,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x70,0x75,
+ 0x6d,0x70,0x2e,0x61,0x6c,0x6c,0x28,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x64,0x61,0x74,0x61,0x29,
+ 0x2c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x63,0x68,0x61,
+ 0x69,0x6e,0x28,0x66,0x69,0x6c,0x74,0x65,0x72,0x2c,0x20,0x73,0x69,0x6e,0x6b,0x29,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x6f,0x75,
+ 0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,
+ 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,
+ 0x73,0x65,0x36,0x34,0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x61,0x6e,
+ 0x79,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x20,
+ 0x28,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x64,0x61,
+ 0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,0x61,0x74,0x61,
+ 0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65,
+ 0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x72,0x61,0x77,
+ 0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,
+ 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34,0x28,0x64,0x61,
+ 0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,
+ 0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d,
+ 0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,
+ 0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x65,
+ 0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x64,0x61,0x74,
+ 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,
+ 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x62,0x61,
+ 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x64,0x61,0x74,
+ 0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,
+ 0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e,
+ 0x75,0x6e,0x62,0x36,0x34,0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20,
+ 0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20,
+ 0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68,
+ 0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,
+ 0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,
+ 0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,
+ 0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,
+ 0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x5f,0x73,0x63,0x68,
+ 0x65,0x64,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,
+ 0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,
+ 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,
+ 0x5f,0x73,0x63,0x68,0x65,0x64,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,
+ 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,
+ 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,
+ 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,
+ 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,
+ 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,
+ 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,
+ 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,
+ 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,
+ 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,
+ 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,
+ 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,
+ 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,
+ 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,
+ 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,
+ 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,
+ 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,
+ 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x77,
+ 0x69,0x74,0x68,0x20,0x4c,0x75,0x61,0x53,0x63,0x68,0x65,0x64,0x20,0x62,0x61,0x63,
+ 0x6b,0x65,0x6e,0x64,0x20,0x66,0x6f,0x72,0x20,0x44,0x42,0x47,0x50,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20,0x41,0x73,0x20,0x4c,
+ 0x75,0x61,0x53,0x68,0x65,0x64,0x20,0x74,0x6f,0x74,0x61,0x6c,0x6c,0x79,0x20,0x68,
+ 0x69,0x64,0x65,0x73,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x6f,
+ 0x64,0x75,0x6c,0x65,0x20,0x4d,0x55,0x53,0x54,0x20,0x62,0x65,0x20,0x6c,0x6f,0x61,
+ 0x64,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x76,0x65,0x72,0x79,0x20,
+ 0x73,0x74,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x0a,0x2d,0x2d,0x20,0x28,0x62,0x65,0x66,0x6f,0x72,0x65,0x20,
+ 0x6c,0x6f,0x61,0x64,0x69,0x6e,0x67,0x20,0x73,0x63,0x68,0x65,0x64,0x29,0x20,0x74,
+ 0x6f,0x20,0x63,0x61,0x74,0x63,0x68,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,
+ 0x65,0x73,0x20,0x74,0x6f,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65,0x20,0x3d,0x20,0x72,0x65,
+ 0x71,0x75,0x69,0x72,0x65,0x22,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x63,0x6f,0x72,
+ 0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,
+ 0x65,0x62,0x75,0x67,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x67,0x20,
+ 0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x72,0x65,0x67,0x69,0x73,
+ 0x74,0x72,0x79,0x28,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,
+ 0x63,0x6b,0x69,0x6e,0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x20,0x3d,0x20,0x73,
+ 0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65,0x2e,0x74,0x63,0x70,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x6c,0x65,0x65,
+ 0x70,0x20,0x20,0x20,0x3d,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x63,0x6f,0x72,0x65,
+ 0x2e,0x73,0x6c,0x65,0x65,0x70,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,
+ 0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x20,0x20,
+ 0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x6d,0x61,0x73,0x74,
+ 0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x63,0x6f,
+ 0x6e,0x6e,0x65,0x63,0x74,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,
+ 0x6b,0x69,0x6e,0x67,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x20,0x20,0x20,0x20,0x3d,
+ 0x20,0x72,0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x63,0x6c,0x69,0x65,0x6e,0x74,
+ 0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x72,0x65,0x63,0x65,
+ 0x69,0x76,0x65,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,
+ 0x6e,0x67,0x73,0x65,0x6e,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72,
+ 0x65,0x67,0x5b,0x22,0x74,0x63,0x70,0x7b,0x63,0x6c,0x69,0x65,0x6e,0x74,0x7d,0x22,
+ 0x5d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x73,0x65,0x6e,0x64,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x65,0x74,
+ 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22,0x74,
+ 0x63,0x70,0x7b,0x6d,0x61,0x73,0x74,0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f,0x69,
+ 0x6e,0x64,0x65,0x78,0x2e,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6c,
+ 0x6f,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x67,0x5b,0x22,
+ 0x74,0x63,0x70,0x7b,0x6d,0x61,0x73,0x74,0x65,0x72,0x7d,0x22,0x5d,0x2e,0x5f,0x5f,
+ 0x69,0x6e,0x64,0x65,0x78,0x2e,0x63,0x6c,0x6f,0x73,0x65,0x0a,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x65,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x73,0x65,0x74,0x20,0x61,0x20,
+ 0x6e,0x65,0x77,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x64,0x69,
+ 0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x6f,0x6e,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,
+ 0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x2c,0x20,0x73,0x6f,0x20,0x77,0x72,0x61,0x70,
+ 0x20,0x69,0x74,0x20,0x69,0x6e,0x74,0x6f,0x20,0x61,0x20,0x6e,0x65,0x77,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x66,0x6f,0x72,0x77,
+ 0x61,0x72,0x64,0x20,0x61,0x6c,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x73,0x2e,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70,
+ 0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x20,
+ 0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,
+ 0x66,0x2c,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,
+ 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,
+ 0x67,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,
+ 0x74,0x2c,0x20,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x2c,0x20,0x70,0x6f,0x72,0x74,
+ 0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x72,0x65,0x63,0x65,0x69,0x76,0x65,
+ 0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x6e,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,
+ 0x69,0x6e,0x67,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x28,0x73,0x65,0x6c,0x66,0x2e,
+ 0x73,0x6b,0x74,0x2c,0x20,0x6e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x73,
+ 0x65,0x6e,0x64,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,0x65,0x6e,0x64,0x28,0x73,0x65,
+ 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x20,0x65,0x6e,
+ 0x64,0x2c,0x0a,0x20,0x20,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x20,
+ 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,
+ 0x20,0x73,0x65,0x63,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x73,
+ 0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,
+ 0x6b,0x74,0x2c,0x20,0x73,0x65,0x63,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,
+ 0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x29,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x6c,0x6f,0x73,0x65,0x28,
+ 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,
+ 0x0a,0x0a,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70,0x2e,0x5f,0x5f,
+ 0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,
+ 0x74,0x63,0x70,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x69,0x6d,0x65,0x20,
+ 0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x6d,0x69,0x6d,0x65,
+ 0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x20,0x3d,0x20,
+ 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x6c,0x74,0x6e,0x31,0x32,0x22,0x0a,
+ 0x0a,0x2d,0x2d,0x20,0x76,0x65,0x72,0x69,0x66,0x79,0x20,0x74,0x68,0x61,0x74,0x20,
+ 0x74,0x68,0x65,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x61,0x72,0x65,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c,
+ 0x20,0x6f,0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x73,0x63,
+ 0x68,0x65,0x64,0x20,0x6e,0x6f,0x74,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,
+ 0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x73,0x0a,0x61,0x73,0x73,0x65,0x72,0x74,
+ 0x28,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x62,
+ 0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x22,
+ 0x53,0x22,0x29,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x43,0x22,0x2c,
+ 0x20,0x22,0x54,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6e,
+ 0x65,0x65,0x64,0x73,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c,0x20,0x73,0x6f,
+ 0x63,0x6b,0x65,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x21,
+ 0x22,0x29,0x0a,0x2d,0x2d,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x20,0x74,0x68,
+ 0x65,0x20,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64,0x65,0x64,
+ 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x28,0x73,0x6f,0x63,0x6b,0x65,0x74,0x2e,0x63,
+ 0x6f,0x72,0x65,0x20,0x61,0x64,0x64,0x73,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,
+ 0x66,0x69,0x65,0x6c,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74,0x29,0x0a,0x70,
+ 0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64,0x65,0x64,0x2e,0x73,0x6f,
+ 0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20,
+ 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,
+ 0x28,0x7b,0x20,0x73,0x6b,0x74,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,0x6e,
+ 0x67,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x29,0x20,0x7d,0x2c,0x20,0x62,0x6c,0x6f,
+ 0x63,0x6b,0x69,0x6e,0x67,0x74,0x63,0x70,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x73,0x6c,0x65,0x65,0x70,0x20,0x20,0x3d,0x20,0x62,0x6c,0x6f,0x63,
+ 0x6b,0x69,0x6e,0x67,0x73,0x6c,0x65,0x65,0x70,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x20,0x72,0x65,0x6c,0x61,0x74,0x65,
+ 0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x42,0x61,0x73,0x65,0x36,0x34,
+ 0x20,0x77,0x69,0x74,0x68,0x20,0x6c,0x69,0x6e,0x65,0x20,0x77,0x72,0x61,0x70,0x70,
+ 0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,
+ 0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,
+ 0x64,0x61,0x74,0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,
+ 0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x74,0x65,
+ 0x72,0x20,0x3d,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x66,0x69,0x6c,0x74,0x65,0x72,
+ 0x2e,0x63,0x68,0x61,0x69,0x6e,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x65,0x6e,0x63,0x6f,
+ 0x64,0x65,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x29,0x2c,0x20,0x6d,0x69,
+ 0x6d,0x65,0x2e,0x77,0x72,0x61,0x70,0x28,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,
+ 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x73,0x69,0x6e,0x6b,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x3d,0x20,
+ 0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,0x74,0x61,0x62,0x6c,0x65,
+ 0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x74,0x6e,0x31,0x32,
+ 0x2e,0x70,0x75,0x6d,0x70,0x2e,0x61,0x6c,0x6c,0x28,0x6c,0x74,0x6e,0x31,0x32,0x2e,
+ 0x73,0x6f,0x75,0x72,0x63,0x65,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x64,0x61,
+ 0x74,0x61,0x29,0x2c,0x20,0x6c,0x74,0x6e,0x31,0x32,0x2e,0x73,0x69,0x6e,0x6b,0x2e,
+ 0x63,0x68,0x61,0x69,0x6e,0x28,0x66,0x69,0x6c,0x74,0x65,0x72,0x2c,0x20,0x73,0x69,
+ 0x6e,0x6b,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,
+ 0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,
+ 0x65,0x73,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,
+ 0x20,0x42,0x61,0x73,0x65,0x36,0x34,0x2c,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,
+ 0x20,0x61,0x6e,0x79,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x70,0x61,0x72,0x73,0x69,
+ 0x6e,0x67,0x20,0x28,0x77,0x72,0x61,0x70,0x70,0x69,0x6e,0x67,0x2c,0x20,0x2e,0x2e,
+ 0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,
+ 0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x64,
+ 0x61,0x74,0x61,0x20,0x74,0x6f,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x63,
+ 0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,
+ 0x72,0x61,0x77,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,0x6d,0x65,0x2e,0x62,0x36,0x34,
+ 0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,
+ 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,
+ 0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e,0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x20,0x44,0x65,0x63,0x6f,0x64,0x65,0x73,0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,
+ 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,
+ 0x20,0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,
+ 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x64,0x65,0x63,0x6f,0x64,0x65,0x64,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x6d,0x69,
+ 0x6d,0x65,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x64,0x61,0x74,0x61,0x29,0x29,0x20,
+ 0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,
+ 0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x77,0x2d,0x6c,0x65,0x76,0x65,0x6c,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x66,0x69,0x6e,
+ 0x65,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,
+ 0x7d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,
+ 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,
+ 0x63,0x6b,0x65,0x74,0x5f,0x73,0x63,0x68,0x65,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x0a,0x70,0x61,0x63,0x6b,0x61,
+ 0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x22,0x5d,0x20,
+ 0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,
+ 0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,
+ 0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,
+ 0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,
+ 0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,
+ 0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,
+ 0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,
+ 0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,
+ 0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,
+ 0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,
+ 0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,
+ 0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,
+ 0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,
+ 0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,
+ 0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,
+ 0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,
+ 0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,
+ 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,
+ 0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,
+ 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6d,0x6d,
+ 0x61,0x6e,0x64,0x73,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x73,0x20,0x66,0x6f,
+ 0x72,0x20,0x44,0x42,0x47,0x70,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x2e,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x20,
+ 0x45,0x61,0x63,0x68,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61,
+ 0x6e,0x64,0x6c,0x65,0x20,0x61,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x74,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x20,0x63,
+ 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x69,0x73,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x33,
+ 0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x31,0x2e,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x73,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x20,0x32,0x2e,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,
+ 0x64,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x73,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x33,0x2e,0x20,0x74,0x68,0x65,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x64,0x61,0x74,0x61,0x2c,0x20,0x69,
+ 0x66,0x20,0x61,0x6e,0x79,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x72,0x65,0x73,
+ 0x75,0x6c,0x74,0x20,0x69,0x73,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x3a,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x74,0x72,0x75,0x65,0x20,0x28,0x6f,0x72,0x20,
+ 0x61,0x6e,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x65,0x76,0x61,0x6c,0x75,0x61,
+ 0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x72,0x75,0x65,0x29,0x20,0x3a,0x20,0x74,
+ 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c,
+ 0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63,
+ 0x75,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61,0x70,0x70,
+ 0x6c,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28,0x63,0x6f,0x6e,0x74,0x69,0x6e,
+ 0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x29,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x66,0x61,0x6c,0x73,0x65,0x20,0x3a,0x20,0x6f,
+ 0x6e,0x6c,0x79,0x20,0x69,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,
+ 0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,
+ 0x57,0x49,0x4c,0x4c,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20,0x66,0x75,
+ 0x72,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69,
+ 0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,
+ 0x75,0x69,0x6e,0x67,0x20,0x28,0x74,0x79,0x70,0x69,0x63,0x61,0x6c,0x6c,0x79,0x2c,
+ 0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x29,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x2a,0x20,0x6e,0x69,0x6c,0x2f,0x6e,0x6f,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x3a,0x20,0x69,0x6e,0x20,0x73,0x79,0x6e,0x63,0x20,0x6d,
+ 0x6f,0x64,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x20,0x77,0x69,0x6c,0x6c,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20,
+ 0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e,
+ 0x20,0x49,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x20,0x74,
+ 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x77,0x69,0x6c,0x6c,
+ 0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,
+ 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,
+ 0x6f,0x77,0x72,0x61,0x70,0x2c,0x20,0x63,0x6f,0x79,0x69,0x65,0x6c,0x64,0x20,0x3d,
+ 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x2c,
+ 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69,0x65,0x6c,0x64,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72,
+ 0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x65,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72,0x65,0x22,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x64,0x62,0x67,0x70,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,
+ 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,
+ 0x6e,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,
+ 0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x3d,0x20,
+ 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x67,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x6d,0x61,
+ 0x6e,0x64,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x73,0x20,0x74,0x61,0x62,0x6c,
+ 0x65,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x74,0x73,0x20,0x74,0x68,0x65,0x20,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x62,0x65,0x68,0x69,0x6e,0x64,
+ 0x20,0x61,0x6e,0x20,0x69,0x64,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x72,0x6f,0x77,0x73,
+ 0x20,0x65,0x72,0x72,0x6f,0x72,0x73,0x20,0x6f,0x6e,0x20,0x75,0x6e,0x6b,0x6e,0x6f,
+ 0x77,0x6e,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x73,0x0a,0x2d,
+ 0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69,
+ 0x64,0x20,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6f,0x72,0x20,0x6e,0x69,
+ 0x6c,0x29,0x20,0x43,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x64,0x65,
+ 0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x28,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x43,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,
+ 0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x28,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f,
+ 0x5f,0x69,0x64,0x20,0x77,0x61,0x73,0x20,0x6e,0x69,0x6c,0x20,0x6f,0x72,0x20,0x69,
+ 0x66,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x74,
+ 0x68,0x65,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x63,0x6f,0x72,0x6f,0x75,
+ 0x74,0x69,0x6e,0x65,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,
+ 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x39,0x39,0x2c,0x20,0x63,0x6f,0x72,0x65,
+ 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x5b,0x74,0x6f,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,0x29,0x5d,0x2c,0x20,0x22,
+ 0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x39,0x39,0x2c,0x20,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x63,0x6f,
+ 0x72,0x6f,0x29,0x20,0x7e,0x3d,0x20,0x22,0x64,0x65,0x61,0x64,0x22,0x2c,0x20,0x22,
+ 0x43,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x64,0x65,0x61,
+ 0x64,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,
+ 0x6f,0x72,0x6f,0x20,0x7e,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,
+ 0x5b,0x31,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x75,0x74,0x69,0x6c,0x2e,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65,
+ 0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,
+ 0x5b,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x20,
+ 0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x73,0x65,0x6e,0x64,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x74,
+ 0x6f,0x20,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x20,0x63,0x6f,0x6d,0x6d,0x61,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,
+ 0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x73,0x65,0x20,0x74,0x6f,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x63,0x6f,
+ 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x69,0x74,0x73,0x65,0x6c,0x66,0x0a,0x20,0x20,0x20,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,
+ 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,
+ 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,
+ 0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,
+ 0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,
+ 0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x20,0x7d,0x20,
+ 0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,
+ 0x61,0x6c,0x73,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x73,0x65,0x6c,0x66,
+ 0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,
+ 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x74,0x75,0x73,0x22,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x22,0x6f,
+ 0x6b,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x74,
+ 0x75,0x73,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,
+ 0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x6f,0x70,0x28,0x73,0x65,0x6c,0x66,
+ 0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,
+ 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x20,0x3d,0x20,0x22,0x73,0x74,0x6f,0x70,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x22,0x6f,0x6b,0x22,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x74,0x75,0x73,
+ 0x20,0x3d,0x20,0x22,0x73,0x74,0x6f,0x70,0x70,0x65,0x64,0x22,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,
+ 0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,
+ 0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,
+ 0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x6f,0x73,0x2e,
+ 0x65,0x78,0x69,0x74,0x28,0x31,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,
+ 0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,
+ 0x20,0x61,0x72,0x67,0x73,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d,0x20,0x75,0x74,0x69,
+ 0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,
+ 0x20,0x6f,0x72,0x20,0x28,0x6e,0x6f,0x74,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x5b,0x6e,
+ 0x61,0x6d,0x65,0x5d,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,
+ 0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,
+ 0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,
+ 0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x20,0x3d,0x20,0x22,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x67,0x65,0x74,0x22,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x65,0x61,0x74,
+ 0x75,0x72,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x70,0x70,0x6f,
+ 0x72,0x74,0x65,0x64,0x20,0x3d,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,
+ 0x61,0x6e,0x64,0x20,0x22,0x31,0x22,0x20,0x6f,0x72,0x20,0x22,0x30,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,
+ 0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,
+ 0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x20,
+ 0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x73,0x65,0x74,0x28,
+ 0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6e,0x2c,0x20,0x61,0x72,0x67,0x73,
+ 0x2e,0x76,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75,0x63,
+ 0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,
+ 0x74,0x75,0x72,0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,
+ 0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,
+ 0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,
+ 0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,
+ 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,
+ 0x64,0x20,0x3d,0x20,0x22,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x5f,0x73,0x65,0x74,
+ 0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x65,0x61,0x74,0x75,
+ 0x72,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x73,0x75,0x63,
+ 0x63,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x31,0x20,0x6f,0x72,0x20,0x30,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,
+ 0x0a,0x20,0x20,0x20,0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x74,0x79,0x70,0x65,0x6d,
+ 0x61,0x70,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,
+ 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x6e,0x61,
+ 0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x78,0x73,0x64,0x74,0x79,0x70,
+ 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x6d,0x61,0x70,0x22,0x2c,
+ 0x20,0x61,0x74,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,
+ 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x79,
+ 0x70,0x65,0x2c,0x20,0x5b,0x22,0x78,0x73,0x69,0x3a,0x74,0x79,0x70,0x65,0x22,0x5d,
+ 0x20,0x3d,0x20,0x78,0x73,0x64,0x74,0x79,0x70,0x65,0x20,0x7d,0x20,0x7d,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,
+ 0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x74,0x79,0x70,0x65,0x6d,0x61,0x70,0x5f,
+ 0x67,0x65,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,
+ 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,
+ 0x73,0x69,0x22,0x5d,0x20,0x3d,0x20,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
+ 0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x32,0x30,0x30,0x31,0x2f,0x58,
+ 0x4d,0x4c,0x53,0x63,0x68,0x65,0x6d,0x61,0x2d,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,
+ 0x65,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x5b,0x22,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x73,0x64,0x22,0x5d,0x20,0x3d,0x20,
+ 0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,
+ 0x72,0x67,0x2f,0x32,0x30,0x30,0x31,0x2f,0x58,0x4d,0x4c,0x53,0x63,0x68,0x65,0x6d,
+ 0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,
+ 0x6e,0x69,0x6c,0x22,0x2c,0x20,0x22,0x6e,0x75,0x6c,0x6c,0x22,0x29,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,
+ 0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,
+ 0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x29,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,
+ 0x65,0x28,0x22,0x6e,0x75,0x6d,0x62,0x65,0x72,0x22,0x2c,0x20,0x22,0x66,0x6c,0x6f,
+ 0x61,0x74,0x22,0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x66,0x6c,0x6f,0x61,0x74,0x22,
+ 0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,
+ 0x70,0x65,0x28,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x22,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x22,0x78,0x73,0x64,0x3a,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x22,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,
+ 0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x22,
+ 0x2c,0x20,0x22,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,
+ 0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x22,0x2c,0x20,0x22,0x72,0x65,0x73,0x6f,
+ 0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x74,0x68,0x72,0x65,0x61,0x64,0x22,
+ 0x2c,0x20,0x22,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x29,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,
+ 0x74,0x61,0x62,0x6c,0x65,0x22,0x2c,0x20,0x22,0x68,0x61,0x73,0x68,0x22,0x29,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,
+ 0x28,0x22,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x22,0x2c,0x20,0x22,0x61,0x72,
+ 0x72,0x61,0x79,0x22,0x29,0x2c,0x20,0x2d,0x2d,0x20,0x61,0x72,0x74,0x69,0x66,0x69,
+ 0x63,0x69,0x61,0x6c,0x20,0x74,0x79,0x70,0x65,0x20,0x74,0x6f,0x20,0x72,0x65,0x70,
+ 0x72,0x65,0x73,0x65,0x6e,0x74,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x73,
+ 0x20,0x28,0x31,0x2d,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x6f,0x75,0x73,
+ 0x20,0x69,0x6e,0x64,0x65,0x78,0x65,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x67,0x65,0x6e,0x74,0x79,0x70,0x65,0x28,0x22,0x6d,0x75,0x6c,0x74,0x69,
+ 0x76,0x61,0x6c,0x22,0x2c,0x20,0x22,0x61,0x72,0x72,0x61,0x79,0x22,0x29,0x2c,0x20,
+ 0x2d,0x2d,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x72,0x65,0x70,0x72,0x65,
+ 0x73,0x65,0x6e,0x74,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x72,0x75,0x6e,0x28,0x73,
+ 0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,
+ 0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,
+ 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,
+ 0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x6f,0x76,0x65,0x72,0x28,0x73,0x65,
+ 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,
+ 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x6f,0x76,
+ 0x65,0x72,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x6f,0x75,0x74,0x28,0x73,0x65,
+ 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,
+ 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x6f,0x75,
+ 0x74,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,
+ 0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x28,0x73,0x65,
+ 0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,
+ 0x6e,0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x22,0x69,0x6e,
+ 0x74,0x6f,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x4d,0x2e,0x65,0x76,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x67,0x28,0x22,0x44,0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x47,0x6f,
+ 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x65,0x76,0x61,0x6c,0x20,0x22,0x2e,0x2e,0x64,
+ 0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,
+ 0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x65,0x72,0x72,0x2c,0x20,0x73,0x75,0x63,0x63,
+ 0x65,0x73,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e,
+ 0x76,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,0x6b,0x28,0x73,
+ 0x65,0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,0x2c,0x20,0x74,0x72,0x79,0x20,0x74,
+ 0x6f,0x20,0x6c,0x6f,0x61,0x64,0x20,0x61,0x73,0x20,0x65,0x78,0x70,0x72,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x42,0x47,0x70,
+ 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,
+ 0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x68,0x65,
+ 0x72,0x65,0x2c,0x20,0x73,0x65,0x65,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x62,
+ 0x75,0x67,0x73,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x73,0x74,0x61,0x74,0x65,0x2e,
+ 0x63,0x6f,0x6d,0x2f,0x73,0x68,0x6f,0x77,0x5f,0x62,0x75,0x67,0x2e,0x63,0x67,0x69,
+ 0x3f,0x69,0x64,0x3d,0x38,0x31,0x31,0x37,0x38,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,
+ 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x22,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x64,0x61,0x74,0x61,0x2c,0x20,0x65,0x6e,0x76,
+ 0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x66,0x20,0x69,0x74,0x20,
+ 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6e,0x20,0x65,0x78,0x70,0x72,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x72,0x79,0x20,0x61,0x73,0x20,0x73,0x74,0x61,
+ 0x74,0x65,0x6d,0x65,0x6e,0x74,0x20,0x28,0x61,0x73,0x73,0x69,0x67,0x6e,0x6d,0x65,
+ 0x6e,0x74,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x6f,0x74,0x20,0x66,0x75,0x6e,0x63,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x72,0x72,0x20,
+ 0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x64,0x61,
+ 0x74,0x61,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x75,0x6e,0x63,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x63,0x63,0x65,
+ 0x73,0x73,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x70,0x63,0x61,
+ 0x6c,0x6c,0x28,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x2e,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x28,0x66,0x75,0x6e,0x63,
+ 0x28,0x29,0x29,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x72,0x65,0x73,0x75,0x6c,
+ 0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x65,0x76,0x61,0x6c,
+ 0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,
+ 0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x65,0x72,0x72,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3d,0x20,0x72,0x65,0x73,0x75,
+ 0x6c,0x74,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3d,0x3d,0x20,0x31,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x72,0x65,0x73,0x75,
+ 0x6c,0x74,0x5b,0x31,0x5d,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x74,0x6f,0x72,0x65,0x20,0x72,0x65,0x73,0x75,
+ 0x6c,0x74,0x20,0x66,0x6f,0x72,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x75,
+ 0x73,0x65,0x20,0x28,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,
+ 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x6f,
+ 0x70,0x74,0x69,0x6d,0x69,0x7a,0x65,0x64,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x69,
+ 0x73,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x66,0x6f,0x72,0x20,
+ 0x45,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x20,0x76,0x69,0x65,0x77,
+ 0x20,0x61,0x6e,0x64,0x20,0x74,0x6f,0x74,0x61,0x6c,0x6c,0x79,0x20,0x75,0x73,0x65,
+ 0x6c,0x65,0x73,0x73,0x20,0x66,0x6f,0x72,0x20,0x69,0x6e,0x74,0x65,0x72,0x61,0x63,
+ 0x74,0x69,0x76,0x65,0x20,0x63,0x6f,0x6e,0x73,0x6f,0x6c,0x65,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,
+ 0x6f,0x20,0x73,0x74,0x6f,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,
+ 0x20,0x6f,0x72,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,
+ 0x20,0x73,0x65,0x74,0x20,0x62,0x79,0x20,0x61,0x6e,0x20,0x61,0x72,0x67,0x75,0x6d,
+ 0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x69,0x64,0x78,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x6e,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x3e,0x20,0x30,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x3d,0x20,0x65,0x6e,0x76,
+ 0x5b,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x5b,0x2d,0x31,0x5d,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,0x23,0x63,0x61,0x63,0x68,0x65,0x20,0x2b,
+ 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,
+ 0x61,0x63,0x68,0x65,0x5b,0x69,0x64,0x78,0x5d,0x20,0x3d,0x20,0x72,0x65,0x73,0x75,
+ 0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x41,0x73,0x20,0x6f,0x66,
+ 0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x2c,0x20,0x74,0x68,0x65,0x20,0x6d,0x61,
+ 0x78,0x69,0x6d,0x75,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x73,0x69,0x7a,0x65,
+ 0x20,0x28,0x61,0x6e,0x64,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x63,0x6f,0x75,
+ 0x6e,0x74,0x29,0x20,0x69,0x73,0x20,0x38,0x30,0x30,0x30,0x2c,0x20,0x74,0x68,0x69,
+ 0x73,0x20,0x6c,0x69,0x6d,0x69,0x74,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,
+ 0x74,0x6f,0x20,0x66,0x69,0x74,0x20,0x61,0x6c,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,
+ 0x74,0x73,0x20,0x69,0x6e,0x20,0x6f,0x6e,0x65,0x20,0x70,0x61,0x67,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x5b,
+ 0x31,0x5d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,
+ 0x28,0x2d,0x31,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x69,0x64,0x78,
+ 0x20,0x6f,0x72,0x20,0x22,0x22,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x31,0x2c,0x20,
+ 0x38,0x30,0x30,0x30,0x2c,0x20,0x30,0x2c,0x20,0x6e,0x69,0x6c,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,
+ 0x74,0x74,0x72,0x2e,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x0a,
+ 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x73,
+ 0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x5b,0x31,0x5d,0x20,0x3d,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72,
+ 0x28,0x32,0x30,0x36,0x2c,0x20,0x65,0x72,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,
+ 0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x72,
+ 0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x5f,0x73,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,
+ 0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,
+ 0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,
+ 0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x5b,
+ 0x61,0x72,0x67,0x73,0x2e,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,
+ 0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x30,0x2c,0x20,0x22,0x49,0x6e,
+ 0x76,0x61,0x6c,0x69,0x64,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,
+ 0x69,0x6f,0x6e,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x3a,0x20,0x22,0x2e,
+ 0x2e,0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x66,
+ 0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,
+ 0x6e,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x69,0x66,0x20,0x69,0x74,0x20,0x69,
+ 0x73,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,
+ 0x20,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x20,0x70,0x61,0x74,0x68,0x2c,0x20,0x69,
+ 0x67,0x6e,0x6f,0x72,0x65,0x20,0x74,0x68,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,
+ 0x6f,0x69,0x6e,0x74,0x5f,0x73,0x65,0x74,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x2c,0x20,0x73,0x65,0x6e,0x64,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x20,0x74,0x6f,0x20,0x61,0x76,0x6f,0x69,0x64,0x20,0x62,
+ 0x6c,0x6f,0x63,0x6b,0x69,0x6e,0x67,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20,
+ 0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,
+ 0x6f,0x74,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x3a,0x66,0x69,0x6e,0x64,
+ 0x28,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,
+ 0x69,0x72,0x2c,0x31,0x2c,0x74,0x72,0x75,0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,
+ 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,
+ 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,
+ 0x6e,0x74,0x5f,0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,
+ 0x7d,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d,
+ 0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x20,
+ 0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x74,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x73,
+ 0x20,0x6f,0x72,0x20,0x22,0x65,0x6e,0x61,0x62,0x6c,0x65,0x64,0x22,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x79,
+ 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x72,0x20,0x3d,0x3d,0x20,0x22,0x31,0x22,
+ 0x2c,0x20,0x2d,0x2d,0x20,0x22,0x30,0x22,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,
+ 0x6d,0x61,0x6b,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x70,0x65,
+ 0x72,0x74,0x79,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x3d,0x20,0x30,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,
+ 0x65,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x6c,
+ 0x69,0x6e,0x65,0x6e,0x6f,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,
+ 0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x68,0x20,0x6f,0x72,0x20,0x30,0x29,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,
+ 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,
+ 0x20,0x6f,0x72,0x20,0x22,0x3e,0x3d,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e,0x74,0x20,0x3d,
+ 0x3d,0x20,0x22,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,
+ 0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x64,0x61,0x74,
+ 0x61,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,
+ 0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x63,
+ 0x6f,0x6d,0x70,0x69,0x6c,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x6f,0x6e,0x63,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x63,0x6f,0x6e,
+ 0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,
+ 0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x37,0x2c,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x22,0x20,
+ 0x2e,0x2e,0x20,0x64,0x61,0x74,0x61,0x20,0x2e,0x2e,0x20,0x22,0x29,0x22,0x29,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x61,0x72,0x67,0x73,
+ 0x2e,0x74,0x20,0x7e,0x3d,0x20,0x22,0x6c,0x69,0x6e,0x65,0x22,0x20,0x74,0x68,0x65,
+ 0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x31,
+ 0x2c,0x20,0x22,0x42,0x50,0x20,0x74,0x79,0x70,0x65,0x20,0x22,0x20,0x2e,0x2e,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x74,0x20,0x2e,0x2e,0x20,0x22,0x20,0x6e,0x6f,0x74,0x20,
+ 0x79,0x65,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x65,0x64,0x22,0x29,0x20,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,
+ 0x70,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,
+ 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x62,0x70,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,
+ 0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,
+ 0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,
+ 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,
+ 0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,
+ 0x5f,0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,
+ 0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,
+ 0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x62,0x70,0x2e,0x73,0x74,0x61,0x74,0x65,
+ 0x2c,0x20,0x69,0x64,0x20,0x3d,0x20,0x62,0x70,0x69,0x64,0x20,0x7d,0x20,0x7d,0x20,
+ 0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x67,0x65,0x74,
+ 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,
+ 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,
+ 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x20,
+ 0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,
+ 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20,
+ 0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,
+ 0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,
+ 0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x35,0x2c,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,
+ 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x5f,0x78,
+ 0x6d,0x6c,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,
+ 0x2e,0x64,0x29,0x29,0x29,0x20,0x7d,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x5f,0x6c,0x69,0x73,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,
+ 0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,
+ 0x70,0x73,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,
+ 0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,
+ 0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,
+ 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x6c,0x69,0x73,0x74,0x22,0x2c,0x20,0x74,
+ 0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,
+ 0x6f,0x72,0x20,0x69,0x64,0x2c,0x20,0x62,0x70,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,
+ 0x72,0x73,0x28,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,
+ 0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x28,0x29,0x29,0x20,0x64,0x6f,0x20,0x62,0x70,
+ 0x73,0x5b,0x23,0x62,0x70,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x63,0x6f,
+ 0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,
+ 0x65,0x74,0x5f,0x78,0x6d,0x6c,0x28,0x69,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,
+ 0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x62,0x70,0x73,0x29,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,
+ 0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x75,0x70,0x64,0x61,0x74,
+ 0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d,0x20,0x63,0x6f,0x72,
+ 0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65,
+ 0x74,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,
+ 0x64,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62,
+ 0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,
+ 0x72,0x28,0x32,0x30,0x35,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x70,0x69,0x6e,0x74,0x20,0x22,0x2e,0x2e,0x61,0x72,0x67,
+ 0x73,0x2e,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x63,
+ 0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,
+ 0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x5b,0x61,
+ 0x72,0x67,0x73,0x2e,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x32,0x30,0x30,0x2c,0x20,0x22,0x49,0x6e,0x76,
+ 0x61,0x6c,0x69,0x64,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,
+ 0x6f,0x6e,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x3a,0x20,0x22,0x2e,0x2e,
+ 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d,
+ 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,
+ 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x5f,0x75,0x70,0x64,0x61,0x74,0x65,0x22,0x2c,0x20,0x74,0x72,0x61,
+ 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,
+ 0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74,0x65,0x20,0x3d,0x20,
+ 0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x62,0x70,0x2e,0x6c,0x69,0x6e,
+ 0x65,0x6e,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x6f,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e,0x29,0x20,0x7e,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,
+ 0x6f,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x62,0x70,
+ 0x2e,0x73,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x73,0x20,
+ 0x6f,0x72,0x20,0x62,0x70,0x2e,0x73,0x74,0x61,0x74,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,
+ 0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e,0x20,0x6f,0x72,0x20,0x62,
+ 0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x62,0x70,
+ 0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e,
+ 0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x68,0x20,0x6f,0x72,0x20,
+ 0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,
+ 0x6f,0x6e,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x20,0x6f,0x72,0x20,0x62,
+ 0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x65,0x65,0x64,0x55,0x70,0x64,0x61,0x74,
+ 0x65,0x20,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,
+ 0x2e,0x75,0x70,0x64,0x61,0x74,0x65,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x2c,
+ 0x20,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,
+ 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x4d,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x72,0x65,
+ 0x6d,0x6f,0x76,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,
+ 0x6e,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,
+ 0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,
+ 0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x72,0x65,0x6d,0x6f,0x76,0x65,0x22,
+ 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,
+ 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6d,0x61,0x79,0x20,
+ 0x62,0x65,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,0x20,
+ 0x74,0x68,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x64,
+ 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x6c,0x6f,0x6e,0x67,0x20,0x74,
+ 0x6f,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70,0x72,0x6f,0x6a,0x65,0x63,
+ 0x74,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,
+ 0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,
+ 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,
+ 0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x29,
+ 0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,
+ 0x72,0x28,0x32,0x30,0x35,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x70,0x69,0x6e,0x74,0x20,0x22,0x2e,0x2e,0x61,0x72,0x67,
+ 0x73,0x2e,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,
+ 0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,
+ 0x73,0x6b,0x74,0x2c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x29,0x0a,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x73,
+ 0x74,0x61,0x63,0x6b,0x5f,0x64,0x65,0x70,0x74,0x68,0x28,0x73,0x65,0x6c,0x66,0x2c,
+ 0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,
+ 0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x30,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,
+ 0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,
+ 0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c,
+ 0x20,0x22,0x53,0x74,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x65,0x6e,0x64,
+ 0x20,0x6f,0x66,0x20,0x73,0x74,0x61,0x63,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74,0x68,0x20,
+ 0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,
+ 0x6e,0x66,0x6f,0x2e,0x69,0x73,0x74,0x61,0x69,0x6c,0x63,0x61,0x6c,0x6c,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74,
+ 0x68,0x20,0x2b,0x20,0x31,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x61,0x20,0x27,
+ 0x66,0x61,0x6b,0x65,0x27,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x61,
+ 0x64,0x64,0x65,0x64,0x20,0x69,0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x73,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,
+ 0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20,
+ 0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c,0x73,0x20,0x62,0x65,0x6c,0x6f,0x77,0x20,
+ 0x6d,0x61,0x69,0x6e,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x61,0x72,0x65,0x20,0x6e,
+ 0x6f,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,0x65,0x73,0x74,0x69,0x6e,0x67,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,
+ 0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,
+ 0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,
+ 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b,
+ 0x5f,0x64,0x65,0x70,0x74,0x68,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,
+ 0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,0x70,0x74,0x68,0x7d,
+ 0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x4d,0x2e,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x20,0x2d,0x2d,0x20,0x54,0x4f,
+ 0x44,0x4f,0x3a,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20,
+ 0x55,0x52,0x49,0x73,0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x79,
+ 0x20,0x75,0x6e,0x72,0x65,0x61,0x63,0x68,0x61,0x62,0x6c,0x65,0x20,0x73,0x74,0x61,
+ 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x77,0x68,0x61,0x74,0x32,0x75,0x72,0x69,0x20,0x3d,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x69,0x6c,0x20,0x3d,0x20,
+ 0x22,0x74,0x61,0x69,0x6c,0x72,0x65,0x74,0x75,0x72,0x6e,0x3a,0x2f,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x43,0x20,0x20,0x20,0x20,0x3d,0x20,0x22,
+ 0x63,0x63,0x6f,0x64,0x65,0x3a,0x2f,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x69,
+ 0x6e,0x66,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,
+ 0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x2c,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,
+ 0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,
+ 0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x75,0x72,0x69,0x20,0x61,0x6e,0x64,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x63,0x75,0x72,
+ 0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,
+ 0x20,0x72,0x65,0x61,0x63,0x68,0x61,0x62,0x6c,0x65,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,
+ 0x72,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x75,0x72,0x69,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,
+ 0x72,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f,0x2e,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,
+ 0x6d,0x65,0x20,0x3d,0x20,0x77,0x68,0x61,0x74,0x32,0x75,0x72,0x69,0x5b,0x69,0x6e,
+ 0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x5d,0x20,0x6f,0x72,0x20,0x22,0x75,0x6e,0x6b,
+ 0x6e,0x6f,0x77,0x6e,0x3a,0x2f,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x20,
+ 0x3d,0x20,0x2d,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b,0x22,0x2c,
+ 0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20,0x7d,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x6e,0x6f,0x64,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,
+ 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,
+ 0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,
+ 0x22,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,
+ 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,
+ 0x67,0x73,0x2e,0x69,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,
+ 0x73,0x2e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,
+ 0x73,0x2e,0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,
+ 0x65,0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,
+ 0x67,0x73,0x2e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6e,0x6f,
+ 0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x6d,0x61,
+ 0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,
+ 0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,
+ 0x6c,0x2c,0x20,0x22,0x6e,0x53,0x6c,0x22,0x29,0x2c,0x20,0x73,0x74,0x61,0x63,0x6b,
+ 0x5f,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x30,
+ 0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,
+ 0x69,0x6e,0x66,0x6f,0x28,0x69,0x2c,0x20,0x22,0x6e,0x53,0x6c,0x74,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,
+ 0x6f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,
+ 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6e,0x6f,0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d,
+ 0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x69,0x6e,
+ 0x66,0x6f,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x64,0x64,0x20,0x61,0x20,0x66,0x61,0x6b,0x65,
+ 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x66,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,
+ 0x66,0x6f,0x72,0x20,0x74,0x61,0x69,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x73,0x20,0x28,
+ 0x74,0x65,0x6c,0x6c,0x73,0x20,0x75,0x73,0x65,0x72,0x20,0x74,0x68,0x61,0x74,0x20,
+ 0x74,0x68,0x65,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,0x61,0x73,
+ 0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,
+ 0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6c,0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x69,
+ 0x73,0x74,0x61,0x69,0x6c,0x63,0x61,0x6c,0x6c,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6e,
+ 0x6f,0x64,0x65,0x5b,0x23,0x6e,0x6f,0x64,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x7b,
+ 0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x73,0x74,0x61,0x63,0x6b,0x22,0x2c,0x20,
+ 0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3d,0x69,
+ 0x2c,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x20,0x66,
+ 0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x74,0x61,0x69,0x6c,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x3a,0x2f,0x22,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x3d,0x2d,
+ 0x31,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,
+ 0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x73,0x20,0x62,0x65,0x6c,0x6f,0x77,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x68,0x75,
+ 0x6e,0x6b,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x74,0x65,0x72,
+ 0x65,0x73,0x74,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,
+ 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x6e,0x6f,0x64,0x65,0x29,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4c,0x69,0x73,0x74,0x73,0x20,0x61,0x6c,0x6c,
+ 0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,
+ 0x20,0x6c,0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x20,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x77,0x69,0x74,0x68,0x20,
+ 0x74,0x68,0x65,0x69,0x72,0x20,0x69,0x64,0x20,0x28,0x61,0x6e,0x20,0x61,0x72,0x62,
+ 0x69,0x74,0x72,0x61,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x20,0x74,
+ 0x6f,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x61,0x6e,
+ 0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x2e,0x20,0x54,0x68,
+ 0x65,0x20,0x69,0x64,0x20,0x69,0x73,0x0a,0x2d,0x2d,0x20,0x67,0x75,0x61,0x72,0x61,
+ 0x6e,0x74,0x65,0x65,0x64,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x75,0x6e,0x69,0x71,
+ 0x75,0x65,0x20,0x61,0x6e,0x64,0x20,0x73,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,
+ 0x72,0x20,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,
+ 0x6c,0x69,0x66,0x65,0x20,0x28,0x74,0x68,0x65,0x79,0x20,0x63,0x61,0x6e,0x20,0x62,
+ 0x65,0x20,0x72,0x65,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x6c,0x6f,0x6e,0x67,
+ 0x20,0x61,0x73,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x65,0x78,
+ 0x69,0x73,0x74,0x73,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x4f,0x74,0x68,0x65,0x72,0x73,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x61,
+ 0x73,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x67,0x65,0x74,0x20,0x6f,0x72,0x20,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,
+ 0x64,0x73,0x20,0x74,0x61,0x6b,0x65,0x73,0x20,0x61,0x6e,0x20,0x61,0x64,0x64,0x69,
+ 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x2d,0x6f,0x20,0x73,0x77,0x69,0x74,0x63,0x68,
+ 0x20,0x74,0x6f,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x61,0x20,0x70,0x61,0x72,0x74,
+ 0x69,0x63,0x75,0x6c,0x61,0x72,0x20,0x63,0x4f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x66,0x20,0x74,0x68,0x65,0x20,0x73,0x77,0x69,0x74,
+ 0x63,0x68,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x69,0x76,0x65,0x6e,0x2c,
+ 0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x2e,
+ 0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x63,0x61,0x73,0x65,0x20,0x6f,0x66,0x20,0x65,
+ 0x72,0x72,0x6f,0x72,0x20,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x20,0x28,0x6d,0x6f,0x73,0x74,0x20,0x6c,0x69,0x6b,0x65,0x6c,0x79,0x20,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,
+ 0x75,0x6e,0x64,0x20,0x6f,0x72,0x20,0x64,0x65,0x61,0x64,0x29,0x2c,0x20,0x61,0x6e,
+ 0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x33,0x39,0x39,0x20,0x69,0x73,0x20,0x74,0x68,
+ 0x72,0x6f,0x77,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x65,0x20,0x74,0x68,
+ 0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x6d,0x70,0x6f,0x72,0x74,
+ 0x61,0x6e,0x74,0x20,0x6c,0x69,0x6d,0x69,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x64,
+ 0x75,0x65,0x20,0x74,0x6f,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x63,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,
+ 0x74,0x61,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x79,0x6f,0x75,0x20,0x63,0x61,0x6e,0x6e,
+ 0x6f,0x74,0x20,0x71,0x75,0x65,0x72,0x79,0x20,0x6d,0x61,0x69,0x6e,0x20,0x22,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22,0x20,0x66,0x72,0x6f,0x6d,0x0a,0x2d,
+ 0x2d,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x6f,0x6e,0x65,0x2c,0x20,0x73,
+ 0x6f,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x65,0x64,0x20,0x6c,0x69,0x73,0x74,0x20,0x28,0x74,0x68,0x69,0x73,0x20,0x77,
+ 0x69,0x6c,0x6c,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x20,0x77,0x69,0x74,0x68,0x20,
+ 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x29,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x6e,0x6f,0x6e,0x2d,0x73,0x74,
+ 0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x2e,0x20,
+ 0x54,0x68,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x58,0x4d,0x4c,
+ 0x20,0x68,0x61,0x73,0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,
+ 0x6e,0x67,0x20,0x73,0x74,0x72,0x75,0x63,0x75,0x74,0x75,0x72,0x65,0x3a,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,
+ 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x3d,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x22,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x3d,0x22,0x30,0x22,0x3e,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x3c,0x73,0x6f,0x6d,0x65,0x20,0x70,0x72,0x69,
+ 0x6e,0x74,0x74,0x61,0x62,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x3e,0x22,0x20,0x69,
+ 0x64,0x3d,0x22,0x3c,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x64,
+ 0x3e,0x22,0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x3d,0x22,0x30,0x7c,0x31,0x22,
+ 0x20,0x2f,0x3e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2e,0x2e,0x2e,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x73,0x65,0x3e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x28,0x73,0x65,
+ 0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x20,0x3d,0x20,0x73,0x65,
+ 0x6c,0x66,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x0a,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,
+ 0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,
+ 0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,
+ 0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x5f,0x6c,0x69,0x73,0x74,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,
+ 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,
+ 0x2e,0x69,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x73,
+ 0x20,0x61,0x6e,0x79,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,
+ 0x6e,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x20,0x77,0x69,0x6c,0x6c,0x20,0x66,0x61,0x69,0x6c,0x2c,0x20,0x69,0x74,0x20,0x69,
+ 0x73,0x20,0x6e,0x6f,0x74,0x20,0x79,0x65,0x74,0x20,0x6c,0x69,0x73,0x74,0x65,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,
+ 0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22,0x2c,0x20,0x61,0x74,
+ 0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x69,0x64,0x20,0x3d,0x20,0x30,0x2c,0x20,0x6e,
+ 0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x2c,0x20,0x72,0x75,
+ 0x6e,0x6e,0x69,0x6e,0x67,0x20,0x3d,0x20,0x28,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,
+ 0x20,0x3d,0x3d,0x20,0x6e,0x69,0x6c,0x29,0x20,0x61,0x6e,0x64,0x20,0x22,0x31,0x22,
+ 0x20,0x6f,0x72,0x20,0x22,0x30,0x22,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x6f,0x72,0x20,0x69,0x64,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20,
+ 0x70,0x61,0x69,0x72,0x73,0x28,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,
+ 0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,
+ 0x6d,0x5f,0x69,0x64,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x69,0x64,0x20,0x7e,0x3d,0x20,0x22,0x6e,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x5b,0x23,0x63,0x6f,0x72,0x6f,0x75,
+ 0x74,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74,
+ 0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x22,
+ 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x69,0x64,0x20,0x3d,0x20,
+ 0x69,0x64,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x63,0x6f,0x72,0x6f,0x29,0x2c,0x20,0x72,0x75,0x6e,0x6e,0x69,
+ 0x6e,0x67,0x20,0x3d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x3d,0x20,0x72,0x75,
+ 0x6e,0x6e,0x69,0x6e,0x67,0x29,0x20,0x61,0x6e,0x64,0x20,0x22,0x31,0x22,0x20,0x6f,
+ 0x72,0x20,0x22,0x30,0x22,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,
+ 0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x6e,0x61,
+ 0x6d,0x65,0x73,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,
+ 0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6f,
+ 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,
+ 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,
+ 0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x22,0x66,0x22,0x29,0x20,0x6f,
+ 0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x31,
+ 0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x73,0x74,0x61,0x63,0x6b,
+ 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x20,
+ 0x61,0x72,0x65,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x70,0x61,0x73,0x73,0x65,
+ 0x64,0x2c,0x20,0x65,0x76,0x65,0x6e,0x20,0x69,0x66,0x20,0x65,0x6d,0x70,0x74,0x79,
+ 0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x68,0x6f,0x77,0x20,0x44,0x4c,
+ 0x54,0x4b,0x20,0x65,0x78,0x70,0x65,0x63,0x74,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x2c,0x20,0x77,0x68,0x61,0x74,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x6f,0x74,
+ 0x68,0x65,0x72,0x73,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,
+ 0x65,0x78,0x74,0x5f,0x6e,0x61,0x6d,0x65,0x73,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,
+ 0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,
+ 0x73,0x2e,0x69,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
+ 0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22,
+ 0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,0x65,0x20,
+ 0x3d,0x20,0x22,0x4c,0x6f,0x63,0x61,0x6c,0x22,0x2c,0x20,0x20,0x20,0x69,0x64,0x20,
+ 0x3d,0x20,0x30,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e,0x61,0x6d,
+ 0x65,0x20,0x3d,0x20,0x22,0x55,0x70,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c,0x20,0x69,
+ 0x64,0x20,0x3d,0x20,0x32,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x74,
+ 0x65,0x78,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x6e,
+ 0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x22,0x2c,0x20,
+ 0x20,0x69,0x64,0x20,0x3d,0x20,0x31,0x20,0x7d,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,
+ 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,
+ 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,
+ 0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,
+ 0x72,0x67,0x73,0x2e,0x63,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,
+ 0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63,
+ 0x78,0x74,0x5f,0x6e,0x75,0x6d,0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,
+ 0x65,0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,
+ 0x75,0x63,0x68,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,
+ 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,
+ 0x67,0x73,0x2e,0x64,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x63,0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,
+ 0x63,0x6b,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x65,
+ 0x72,0x74,0x69,0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,
+ 0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,
+ 0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x22,
+ 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x67,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,
+ 0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,
+ 0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,
+ 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x69,0x74,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x76,0x65,
+ 0x72,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66,
+ 0x65,0x72,0x65,0x6e,0x74,0x20,0x28,0x74,0x68,0x69,0x73,0x20,0x63,0x6f,0x75,0x6c,
+ 0x64,0x20,0x62,0x65,0x20,0x75,0x6e,0x69,0x66,0x69,0x65,0x64,0x20,0x69,0x6e,0x20,
+ 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x74,0x68,0x61,0x6e,0x6b,0x73,0x20,0x74,
+ 0x6f,0x20,0x5f,0x5f,0x70,0x61,0x69,0x72,0x73,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,
+ 0x74,0x68,0x6f,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6e,0x61,
+ 0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x28,0x63,0x78,0x74,0x5f,
+ 0x6e,0x75,0x6d,0x20,0x3d,0x3d,0x20,0x31,0x20,0x61,0x6e,0x64,0x20,0x6e,0x65,0x78,
+ 0x74,0x20,0x6f,0x72,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x28,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x69,0x64,0x5d,0x29,0x2e,0x69,
+ 0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x29,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78,
+ 0x74,0x5f,0x69,0x64,0x5d,0x2c,0x20,0x6e,0x69,0x6c,0x20,0x64,0x6f,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x44,0x42,0x47,
+ 0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
+ 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6c,0x65,0x61,0x72,0x20,0x61,0x62,0x6f,
+ 0x75,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x6f,0x66,0x20,
+ 0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x67,0x65,0x74,0x2c,0x20,0x62,
+ 0x75,0x74,0x20,0x61,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x76,0x65,0x20,0x67,
+ 0x65,0x74,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x2a,0x72,0x65,0x61,
+ 0x6c,0x6c,0x79,0x2a,0x20,0x73,0x6c,0x6f,0x77,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x69,0x65,0x73,0x5b,0x23,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x20,
+ 0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,
+ 0x74,0x69,0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72,
+ 0x74,0x79,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c,0x20,0x76,0x61,0x6c,0x2c,
+ 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x30,0x2c,0x20,0x75,
+ 0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x6d,0x61,0x78,
+ 0x5f,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x2c,0x20,0x30,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e,
+ 0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x2c,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,
+ 0x6d,0x20,0x7e,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,
+ 0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x70,0x72,0x6f,
+ 0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x2a,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x73,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x6e,
+ 0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,
+ 0x20,0x69,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,
+ 0x74,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x67,0x65,0x74,0x20,0x6f,0x72,0x20,
+ 0x73,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x74,0x20,0x6e,0x6f,0x74,0x61,0x62,
+ 0x6c,0x79,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x20,0x61,0x20,0x63,0x6f,0x6c,
+ 0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x78,0x79,
+ 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x68,0x61,0x6e,
+ 0x64,0x6c,0x65,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x65,
+ 0x6c,0x79,0x20,0x67,0x65,0x74,0x2f,0x73,0x65,0x74,0x20,0x6f,0x70,0x65,0x72,0x61,
+ 0x74,0x69,0x6f,0x6e,0x73,0x20,0x6f,0x6e,0x20,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,
+ 0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x74,
+ 0x68,0x65,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x6f,0x66,0x20,0x63,0x6f,0x6d,0x70,
+ 0x6c,0x65,0x78,0x20,0x6b,0x65,0x79,0x73,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,
+ 0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,
+ 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,
+ 0x65,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,
+ 0x6e,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x74,
+ 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,
+ 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,
+ 0x2c,0x20,0x74,0x62,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,
+ 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x74,0x62,0x6c,0x29,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x6e,
+ 0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x74,0x62,0x6c,0x2c,0x20,0x6d,0x74,
+ 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,
+ 0x74,0x61,0x62,0x6c,0x65,0x28,0x74,0x62,0x6c,0x2c,0x20,0x6d,0x74,0x29,0x20,0x65,
+ 0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x75,0x74,
+ 0x69,0x6c,0x2e,0x65,0x76,0x61,0x6c,0x5f,0x65,0x6e,0x76,0x2c,0x0a,0x7d,0x0a,0x2d,
+ 0x2d,0x20,0x74,0x6f,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x74,0x6f,0x20,0x62,
+ 0x65,0x20,0x73,0x65,0x74,0x20,0x61,0x73,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,
+ 0x6c,0x65,0x0a,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,
+ 0x75,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,
+ 0x6e,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x70,0x72,0x6f,
+ 0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,
+ 0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x0a,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x79,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x20,0x42,0x55,0x47,
+ 0x20,0x45,0x43,0x4c,0x49,0x50,0x53,0x45,0x20,0x54,0x4f,0x4f,0x4c,0x53,0x4c,0x49,
+ 0x4e,0x55,0x58,0x2d,0x39,0x39,0x20,0x33,0x35,0x32,0x33,0x31,0x36,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c,
+ 0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x75,
+ 0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x61,0x72,0x67,0x73,0x2e,0x6e,
+ 0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28,0x25,0x2d,0x3f,0x25,0x64,
+ 0x2b,0x29,0x7c,0x28,0x2e,0x2a,0x29,0x24,0x22,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,
+ 0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x6f,0x72,0x20,0x63,0x78,0x74,
+ 0x5f,0x6e,0x75,0x6d,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,
+ 0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,
+ 0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x64,0x20,0x6f,
+ 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,
+ 0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2e,0x6f,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65,
+ 0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,
+ 0x2e,0x6d,0x20,0x6f,0x72,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,
+ 0x72,0x65,0x73,0x2e,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x73,0x69,0x7a,0x65,0x20,0x3c,0x20,0x30,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,
+ 0x64,0x20,0x2d,0x2d,0x20,0x63,0x61,0x6c,0x6c,0x20,0x66,0x72,0x6f,0x6d,0x20,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x67,0x65,0x20,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x70,0x20,0x6f,
+ 0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,
+ 0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,0x6b,0x28,
+ 0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x3d,0x20,0x64,
+ 0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20,
+ 0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x22,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x70,0x72,0x6f,
+ 0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,
+ 0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x29,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,
+ 0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,
+ 0x73,0x73,0x65,0x72,0x74,0x28,0x33,0x30,0x30,0x2c,0x20,0x70,0x63,0x61,0x6c,0x6c,
+ 0x28,0x63,0x68,0x75,0x6e,0x6b,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,
+ 0x69,0x64,0x5d,0x29,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,
+ 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x2c,
+ 0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6e,0x61,0x6d,
+ 0x65,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,
+ 0x2e,0x6d,0x61,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x75,0x74,0x69,0x6c,
+ 0x2e,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x6d,0x61,0x78,0x5f,0x63,0x68,
+ 0x69,0x6c,0x64,0x72,0x65,0x6e,0x2c,0x20,0x70,0x61,0x67,0x65,0x2c,0x20,0x73,0x69,
+ 0x7a,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6d,0x61,0x6b,0x65,0x5f,
+ 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x66,0x6c,0x61,0x67,0x20,0x73,0x70,0x65,
+ 0x63,0x69,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x20,0x61,
+ 0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x77,0x68,0x65,0x6e,0x20,0x74,0x68,0x65,0x79,
+ 0x20,0x61,0x72,0x65,0x20,0x61,0x74,0x20,0x72,0x6f,0x6f,0x74,0x20,0x6f,0x66,0x20,
+ 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,
+ 0x73,0x20,0x71,0x75,0x65,0x72,0x69,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x69,0x6e,
+ 0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x72,0x6d,0x20,0x22,0x3c,0x70,0x72,0x6f,0x78,
+ 0x79,0x20,0x6e,0x61,0x6d,0x65,0x3e,0x5b,0x28,0x2e,0x2e,0x2e,0x29,0x5b,0x61,0x5d,
+ 0x5b,0x62,0x5d,0x3c,0x2e,0x2e,0x2e,0x3e,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x73,0x75,0x63,0x68,0x20,0x70,0x61,0x72,
+ 0x73,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x66,0x61,0x72,0x20,0x66,0x72,0x6f,0x6d,
+ 0x20,0x70,0x65,0x72,0x66,0x65,0x63,0x74,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x61,0x6d,0x65,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x5b,0x25,0x77,
+ 0x5f,0x5d,0x2b,0x25,0x5b,0x2e,0x2d,0x25,0x62,0x5b,0x5d,0x25,0x5d,0x24,0x22,0x29,
+ 0x20,0x3d,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,
+ 0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65,
+ 0x20,0x3d,0x20,0x22,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x22,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,
+ 0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,
+ 0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,
+ 0x3d,0x20,0x22,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x22,
+ 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,
+ 0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x7d,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,
+ 0x70,0x6f,0x6e,0x73,0x65,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,
+ 0x74,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,
+ 0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73,0x2e,0x6d,0x20,
+ 0x3d,0x20,0x2d,0x31,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,
+ 0x72,0x74,0x79,0x5f,0x67,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,
+ 0x67,0x73,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x73,0x65,0x74,
+ 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,
+ 0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,
+ 0x5f,0x6e,0x75,0x6d,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x61,0x73,0x73,
+ 0x65,0x72,0x74,0x28,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,0x61,
+ 0x72,0x67,0x73,0x2e,0x6e,0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28,
+ 0x25,0x2d,0x3f,0x25,0x64,0x2b,0x29,0x7c,0x28,0x2e,0x2a,0x29,0x24,0x22,0x29,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x6f,
+ 0x72,0x20,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5b,0x63,0x78,
+ 0x74,0x5f,0x6e,0x75,0x6d,0x5d,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,
+ 0x72,0x72,0x6f,0x72,0x28,0x33,0x30,0x32,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,
+ 0x63,0x68,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74,
+ 0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x6e,0x75,0x6d,0x29,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,
+ 0x6c,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,
+ 0x73,0x2e,0x64,0x20,0x6f,0x72,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,
+ 0x72,0x67,0x73,0x2e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x63,0x78,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,
+ 0x6b,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x65,0x20,
+ 0x74,0x68,0x65,0x20,0x6e,0x65,0x77,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69,0x6e,
+ 0x20,0x74,0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x6c,
+ 0x75,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64,
+ 0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20,
+ 0x70,0x63,0x61,0x6c,0x6c,0x28,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,
+ 0x74,0x28,0x32,0x30,0x36,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,
+ 0x69,0x6e,0x28,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x2e,0x2e,0x64,0x61,
+ 0x74,0x61,0x2c,0x20,0x63,0x78,0x74,0x29,0x29,0x29,0x29,0x29,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x68,0x75,0x6e,0x6b,0x20,0x3d,0x20,
+ 0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,
+ 0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x61,0x64,0x69,0x6e,0x28,0x6e,0x61,0x6d,
+ 0x65,0x20,0x2e,0x2e,0x20,0x22,0x20,0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c,
+ 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,
+ 0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x7d,0x2c,
+ 0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x5f,0x65,0x76,0x61,0x6c,0x75,0x61,
+ 0x74,0x69,0x6f,0x6e,0x5f,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,
+ 0x29,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x61,0x73,0x73,
+ 0x65,0x72,0x74,0x28,0x32,0x30,0x36,0x2c,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x63,
+ 0x68,0x75,0x6e,0x6b,0x2c,0x20,0x63,0x78,0x74,0x5b,0x63,0x78,0x74,0x5f,0x69,0x64,
+ 0x5d,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,
+ 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,
+ 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x73,0x75,0x63,
+ 0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,
+ 0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,
+ 0x69,0x20,0x7d,0x20,0x7d,0x20,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x54,
+ 0x4f,0x44,0x4f,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65,
+ 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,
+ 0x20,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74,
+ 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6c,0x65,0x61,0x72,
+ 0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,0x6e,0x65,0x20,
+ 0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x6d,0x65,0x61,0x6e,0x69,0x6e,0x67,0x2c,0x20,
+ 0x74,0x68,0x69,0x73,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,
+ 0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x31,0x2d,0x62,0x61,0x73,0x65,0x64,0x20,0x61,
+ 0x6e,0x64,0x20,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0x20,0x61,0x72,0x65,0x20,0x69,
+ 0x6e,0x63,0x6c,0x75,0x73,0x69,0x76,0x65,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,
+ 0x20,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x70,0x61,0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,
+ 0x73,0x2e,0x66,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,
+ 0x2e,0x67,0x65,0x74,0x5f,0x70,0x61,0x74,0x68,0x28,0x61,0x72,0x67,0x73,0x2e,0x66,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x63,
+ 0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x30,0x2c,0x20,0x22,
+ 0x53,0x22,0x29,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x70,0x61,0x74,0x68,0x3a,0x73,
+ 0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,
+ 0x61,0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,
+ 0x65,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x6f,0x70,0x65,0x6e,
+ 0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,
+ 0x74,0x20,0x66,0x69,0x6c,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,
+ 0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x31,0x30,0x30,0x2c,0x20,0x65,0x72,0x72,0x2c,
+ 0x20,0x7b,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x30,0x20,0x7d,
+ 0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x72,0x79,
+ 0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x79,0x20,0x63,0x6f,0x6d,
+ 0x70,0x69,0x6c,0x65,0x64,0x20,0x66,0x69,0x6c,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x66,0x69,0x6c,0x65,0x3a,0x72,0x65,0x61,0x64,0x28,0x31,0x29,0x20,
+ 0x3d,0x3d,0x20,0x22,0x5c,0x30,0x33,0x33,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,
+ 0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,0x31,0x30,0x30,0x2c,0x20,0x61,
+ 0x72,0x67,0x73,0x2e,0x66,0x2e,0x2e,0x22,0x20,0x69,0x73,0x20,0x62,0x79,0x74,0x65,
+ 0x63,0x6f,0x64,0x65,0x22,0x2c,0x20,0x7b,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,
+ 0x20,0x3d,0x20,0x30,0x20,0x7d,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x69,0x6c,0x65,0x3a,0x73,0x65,0x65,0x6b,0x28,0x22,0x73,0x65,0x74,0x22,0x2c,
+ 0x20,0x30,0x29,0x0a,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x65,0x67,0x69,0x6e,0x6c,0x69,
+ 0x6e,0x65,0x2c,0x20,0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x63,0x75,0x72,
+ 0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,0x62,0x20,0x6f,0x72,0x20,0x30,0x29,
+ 0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x61,0x72,0x67,0x73,0x2e,
+ 0x65,0x20,0x6f,0x72,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x29,0x2c,
+ 0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6c,0x69,0x6e,0x65,0x20,
+ 0x69,0x6e,0x20,0x66,0x69,0x6c,0x65,0x3a,0x6c,0x69,0x6e,0x65,0x73,0x28,0x29,0x20,
+ 0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x75,0x72,0x72,0x65,
+ 0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,
+ 0x6c,0x69,0x6e,0x65,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,
+ 0x3e,0x3d,0x20,0x62,0x65,0x67,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x61,0x6e,0x64,
+ 0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,0x6e,0x65,0x20,0x3c,0x3d,0x20,
+ 0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,
+ 0x73,0x5b,0x23,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,
+ 0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x69,
+ 0x6e,0x65,0x20,0x3e,0x3d,0x20,0x65,0x6e,0x64,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x3a,0x63,0x6c,
+ 0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x6c,0x69,0x6e,
+ 0x65,0x73,0x5b,0x23,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x20,0x2b,0x20,0x31,
+ 0x5d,0x20,0x3d,0x20,0x22,0x22,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x61,0x64,0x64,
+ 0x20,0x61,0x20,0x74,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x20,0x5c,0x6e,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,
+ 0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,
+ 0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,
+ 0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,
+ 0x20,0x22,0x73,0x6f,0x75,0x72,0x63,0x65,0x22,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,
+ 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,
+ 0x2e,0x69,0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x31,0x7d,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,
+ 0x6f,0x6e,0x63,0x61,0x74,0x28,0x73,0x72,0x63,0x6c,0x69,0x6e,0x65,0x73,0x2c,0x20,
+ 0x22,0x5c,0x6e,0x22,0x29,0x29,0x20,0x7d,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,
+ 0x2d,0x20,0x46,0x61,0x63,0x74,0x6f,0x72,0x79,0x20,0x66,0x6f,0x72,0x20,0x62,0x6f,
+ 0x74,0x68,0x20,0x73,0x74,0x64,0x6f,0x75,0x74,0x20,0x61,0x6e,0x64,0x20,0x73,0x74,
+ 0x64,0x65,0x72,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2c,0x20,0x63,
+ 0x68,0x61,0x6e,0x67,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x64,0x65,0x73,0x63,0x72,
+ 0x69,0x70,0x74,0x6f,0x72,0x20,0x69,0x6e,0x20,0x69,0x6f,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x75,0x74,0x70,0x75,
+ 0x74,0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,
+ 0x72,0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x6d,0x6f,0x64,0x65,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x72,0x67,0x73,0x2e,
+ 0x63,0x20,0x3d,0x3d,0x20,0x22,0x30,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,
+ 0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x20,0x3d,0x20,
+ 0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x5b,0x6d,0x6f,0x64,0x65,0x5d,0x20,
+ 0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,
+ 0x20,0x73,0x6b,0x74,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,
+ 0x20,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x6d,0x6f,0x64,0x65,0x20,0x7d,0x2c,0x20,
+ 0x61,0x72,0x67,0x73,0x2e,0x63,0x20,0x3d,0x3d,0x20,0x22,0x31,0x22,0x20,0x61,0x6e,
+ 0x64,0x20,0x63,0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70,
+ 0x75,0x74,0x20,0x6f,0x72,0x20,0x63,0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,
+ 0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,
+ 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,
+ 0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,
+ 0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x6d,
+ 0x6f,0x64,0x65,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,
+ 0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x2c,0x20,0x73,0x75,
+ 0x63,0x63,0x65,0x73,0x73,0x20,0x3d,0x20,0x22,0x31,0x22,0x20,0x7d,0x20,0x7d,0x20,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,
+ 0x2e,0x73,0x74,0x64,0x6f,0x75,0x74,0x20,0x3d,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,
+ 0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,
+ 0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x22,0x73,0x74,0x64,0x6f,0x75,0x74,
+ 0x22,0x29,0x0a,0x4d,0x2e,0x73,0x74,0x64,0x65,0x72,0x72,0x20,0x3d,0x20,0x6f,0x75,
+ 0x74,0x70,0x75,0x74,0x5f,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x5f,0x68,0x61,0x6e,
+ 0x64,0x6c,0x65,0x72,0x5f,0x66,0x61,0x63,0x74,0x6f,0x72,0x79,0x28,0x22,0x73,0x74,
+ 0x64,0x65,0x72,0x72,0x22,0x29,0x0a,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,
+ 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,
+ 0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,
+ 0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,
+ 0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,
+ 0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,
+ 0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,
+ 0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,
+ 0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,
+ 0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,
+ 0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,
+ 0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,
+ 0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,
+ 0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,
+ 0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,
+ 0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,
+ 0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,
+ 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,
+ 0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,
+ 0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,
+ 0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,
+ 0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,
+ 0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x3a,0x20,0x61,0x6c,0x6c,0x6f,
+ 0x77,0x73,0x20,0x74,0x6f,0x20,0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x65,0x20,0x63,
+ 0x6f,0x64,0x65,0x20,0x73,0x6e,0x69,0x70,0x70,0x65,0x74,0x73,0x20,0x69,0x6e,0x20,
+ 0x74,0x68,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x6f,0x66,0x20,0x61,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x64,0x62,0x67,0x70,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,
+ 0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,
+ 0x69,0x6c,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x61,0x6b,0x65,0x20,0x75,0x6e,0x69,
+ 0x71,0x75,0x65,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x61,0x63,
+ 0x63,0x65,0x73,0x73,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x4c,0x4f,0x43,0x41,0x4c,0x2c,0x20,0x55,0x50,0x56,0x41,0x4c,
+ 0x2c,0x20,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x2c,0x20,0x45,0x56,0x41,0x4c,0x2c,0x20,
+ 0x53,0x54,0x4f,0x52,0x45,0x2c,0x20,0x48,0x41,0x4e,0x44,0x4c,0x45,0x20,0x3d,0x20,
+ 0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x2c,0x20,
+ 0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65,
+ 0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,
+ 0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,
+ 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x67,0x6c,
+ 0x6f,0x62,0x61,0x6c,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x66,0x65,
+ 0x6e,0x76,0x28,0x66,0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6c,0x73,0x65,0x69,0x66,
+ 0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,
+ 0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x67,0x65,0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x66,0x2c,0x20,0x63,0x78,0x74,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x27,0x67,0x6c,0x6f,0x62,0x61,0x6c,
+ 0x27,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x3a,0x20,0x74,
+ 0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x74,0x68,
+ 0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x5f,0x45,0x4e,0x56,0x20,0x6f,0x72,0x20,
+ 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x5f,0x45,0x4e,0x56,0x2e,0x20,0x41,0x20,
+ 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x20,0x63,0x61,0x73,0x65,0x20,0x68,0x61,0x70,
+ 0x70,0x65,0x6e,0x20,0x77,0x68,0x65,0x6e,0x20,0x61,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x64,
+ 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,
+ 0x65,0x20,0x61,0x6e,0x79,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x76,0x61,0x72,
+ 0x69,0x61,0x62,0x6c,0x65,0x3a,0x20,0x74,0x68,0x65,0x20,0x75,0x70,0x76,0x61,0x6c,
+ 0x75,0x65,0x20,0x5f,0x45,0x4e,0x56,0x20,0x6d,0x61,0x79,0x20,0x6e,0x6f,0x74,0x20,
+ 0x65,0x78,0x69,0x73,0x74,0x20,0x61,0x74,0x20,0x61,0x6c,0x6c,0x2e,0x20,0x49,0x6e,
+ 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x61,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x65,0x6e,
+ 0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,
+ 0x20,0x72,0x65,0x6c,0x65,0x76,0x61,0x6e,0x74,0x20,0x73,0x6f,0x20,0x69,0x74,0x20,
+ 0x69,0x73,0x20,0x66,0x69,0x78,0x65,0x64,0x20,0x74,0x6f,0x20,0x61,0x6e,0x20,0x65,
+ 0x6d,0x70,0x74,0x79,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x20,0x41,0x6e,0x6f,0x74,
+ 0x68,0x65,0x72,0x20,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20,0x77,0x6f,0x75,
+ 0x6c,0x64,0x20,0x62,0x65,0x20,0x74,0x6f,0x20,0x73,0x65,0x74,0x20,0x69,0x74,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x74,0x68,
+ 0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x66,0x72,
+ 0x6f,0x6d,0x20,0x61,0x62,0x6f,0x76,0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,
+ 0x65,0x76,0x65,0x6c,0x20,0x62,0x75,0x74,0x20,0x69,0x74,0x20,0x77,0x6f,0x75,0x6c,
+ 0x64,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6f,
+ 0x76,0x65,0x72,0x68,0x65,0x61,0x64,0x20,0x28,0x65,0x73,0x70,0x65,0x63,0x69,0x61,
+ 0x6c,0x6c,0x79,0x20,0x69,0x66,0x20,0x6d,0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x73,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,
+ 0x74,0x69,0x61,0x74,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x63,0x78,0x74,0x5b,0x4c,0x4f,0x43,0x41,0x4c,
+ 0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x78,0x74,
+ 0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63,
+ 0x78,0x74,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,
+ 0x5b,0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x63,0x78,0x74,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,
+ 0x22,0x5f,0x45,0x4e,0x56,0x22,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x7b,0x20,0x7d,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x20,0x43,0x61,0x70,0x74,0x75,0x72,0x65,0x73,0x20,0x76,0x61,
+ 0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65,
+ 0x6e,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2e,0x20,0x54,
+ 0x68,0x65,0x20,0x63,0x61,0x70,0x74,0x75,0x72,0x65,0x20,0x63,0x6f,0x6e,0x74,0x61,
+ 0x69,0x6e,0x73,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x2c,0x20,0x75,0x70,0x76,0x61,0x6c,
+ 0x75,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x76,
+ 0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,
+ 0x20,0x63,0x61,0x70,0x74,0x75,0x72,0x65,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,
+ 0x73,0x65,0x65,0x6e,0x20,0x61,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x78,0x79,0x20,
+ 0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x61,
+ 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x61,0x6e,0x79,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x71,0x75,0x65,0x72,0x69,
+ 0x65,0x64,0x20,0x6f,0x72,0x20,0x73,0x65,0x74,0x20,0x6e,0x6f,0x20,0x6d,0x61,0x74,
+ 0x74,0x65,0x72,0x0a,0x2d,0x2d,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x61,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x6f,0x72,0x20,0x61,0x6e,0x20,0x75,0x70,0x76,0x61,0x6c,
+ 0x75,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x69,0x6e,0x64,0x69,0x76,
+ 0x69,0x64,0x75,0x61,0x6c,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x6e,0x64,0x20,
+ 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x20,0x61,0x72,0x65,0x20,0x61,0x6c,0x73,0x6f,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,
+ 0x62,0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x71,
+ 0x75,0x65,0x72,0x69,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x6d,0x6f,0x64,0x69,0x66,
+ 0x69,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x69,0x6e,0x64,0x65,0x78,0x65,0x64,
+ 0x20,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x6f,0x2e,0x0a,0x2d,
+ 0x2d,0x20,0x54,0x68,0x65,0x73,0x65,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20,
+ 0x61,0x72,0x65,0x20,0x4e,0x4f,0x54,0x20,0x70,0x65,0x72,0x73,0x69,0x73,0x74,0x61,
+ 0x6e,0x74,0x20,0x61,0x6e,0x64,0x20,0x6d,0x75,0x73,0x74,0x20,0x6e,0x6f,0x74,0x20,
+ 0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x6f,0x75,0x74,0x73,0x69,0x64,0x65,0x20,
+ 0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,
+ 0x70,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x69,
+ 0x61,0x74,0x65,0x64,0x20,0x74,0x68,0x65,0x6d,0x20,0x21,0x0a,0x4d,0x2e,0x43,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,
+ 0x69,0x65,0x72,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x61,0x63,0x63,0x65,
+ 0x73,0x73,0x65,0x64,0x20,0x62,0x79,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x44,0x42,
+ 0x47,0x70,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x49,0x44,0x0a,0x20,0x20,
+ 0x20,0x20,0x5b,0x30,0x5d,0x20,0x3d,0x20,0x4c,0x4f,0x43,0x41,0x4c,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x2c,
+ 0x20,0x2d,0x2d,0x20,0x44,0x4c,0x54,0x4b,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,
+ 0x6c,0x20,0x49,0x44,0x20,0x66,0x6f,0x72,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,
+ 0x20,0x69,0x73,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x5b,0x32,0x5d,0x20,0x3d,0x20,
+ 0x55,0x50,0x56,0x41,0x4c,0x2c,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x45,0x56,
+ 0x41,0x4c,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6b,0x65,
+ 0x65,0x70,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20,
+ 0x65,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x69,0x6e,
+ 0x20,0x6f,0x72,0x64,0x65,0x72,0x20,0x74,0x6f,0x20,0x62,0x72,0x6f,0x77,0x73,0x65,
+ 0x20,0x6f,0x72,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x74,0x68,0x65,0x6d,0x2c,
+ 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x73,0x20,0x61,0x72,0x65,0x20,0x73,0x74,0x6f,
+ 0x72,0x65,0x64,0x20,0x61,0x73,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x5b,0x2d,0x31,0x5d,0x20,0x3d,0x20,0x45,0x56,0x41,0x4c,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x53,0x54,0x4f,0x52,0x45,0x20,0x3d,0x20,0x53,0x54,0x4f,
+ 0x52,0x45,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x73,
+ 0x20,0x61,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x20,0x62,0x79,0x20,0x6e,
+ 0x61,0x6d,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74,
+ 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x4c,0x75,0x61,
+ 0x20,0x73,0x63,0x6f,0x70,0x65,0x20,0x63,0x68,0x61,0x69,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x6f,0x72,0x20,0x63,0x68,0x61,0x69,0x6e,
+ 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x77,0x6f,0x72,0x6b,0x20,0x68,
+ 0x65,0x72,0x65,0x20,0x62,0x65,0x61,0x63,0x61,0x75,0x73,0x65,0x20,0x5f,0x5f,0x69,
+ 0x6e,0x64,0x65,0x78,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,
+ 0x77,0x6f,0x75,0x6c,0x64,0x20,0x72,0x61,0x69,0x73,0x65,0x20,0x61,0x6e,0x20,0x65,
+ 0x72,0x72,0x6f,0x72,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x69,0x6e,0x67,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,
+ 0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,
+ 0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,
+ 0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,
+ 0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x73,0x65,0x6c,
+ 0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,
+ 0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,
+ 0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x73,0x65,0x6c,0x66,0x5b,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x5d,0x5b,0x6b,
+ 0x5d,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,
+ 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,
+ 0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,
+ 0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20,
+ 0x76,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,
+ 0x20,0x73,0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,
+ 0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x6c,0x66,
+ 0x5b,0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x73,0x65,0x6c,0x66,
+ 0x5b,0x47,0x4c,0x4f,0x42,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6f,0x6e,0x6c,0x79,0x20,
+ 0x21,0x21,0x0a,0x20,0x20,0x20,0x20,0x5f,0x5f,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,
+ 0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x62,0x75,0x66,0x20,0x3d,0x20,0x7b,0x20,0x22,0x4c,0x6f,0x63,0x61,0x6c,0x73,
+ 0x3a,0x20,0x5c,0x6e,0x22,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,
+ 0x28,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,0x5d,0x5b,0x53,0x54,0x4f,
+ 0x52,0x45,0x5d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x23,0x62,0x75,0x66,0x2b,0x31,0x5d,0x20,
+ 0x3d,0x20,0x22,0x5c,0x74,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x28,0x6b,0x29,0x2e,0x2e,0x22,0x28,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x28,0x76,0x29,0x2e,0x2e,0x22,0x29,0x3d,0x22,0x2e,0x2e,0x74,0x6f,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x65,0x6c,0x66,0x5b,0x4c,0x4f,0x43,0x41,0x4c,
+ 0x5d,0x5b,0x6b,0x5d,0x29,0x2e,0x2e,0x22,0x5c,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x62,0x75,0x66,0x5b,0x23,0x62,0x75,0x66,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x55,
+ 0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x3a,0x20,0x5c,0x6e,0x22,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,
+ 0x70,0x61,0x69,0x72,0x73,0x28,0x73,0x65,0x6c,0x66,0x5b,0x55,0x50,0x56,0x41,0x4c,
+ 0x5d,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x23,0x62,0x75,
+ 0x66,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x5c,0x74,0x22,0x2e,0x2e,0x74,0x6f,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e,0x22,0x28,0x22,0x2e,0x2e,0x74,
+ 0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x29,0x2e,0x2e,0x22,0x29,0x3d,0x22,
+ 0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x65,0x6c,0x66,0x5b,
+ 0x55,0x50,0x56,0x41,0x4c,0x5d,0x5b,0x6b,0x5d,0x29,0x2e,0x2e,0x22,0x5c,0x6e,0x22,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,
+ 0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x62,0x75,0x66,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x4c,0x6f,0x63,0x61,
+ 0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,
+ 0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x64,
+ 0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,
+ 0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e,0x22,0x20,0x64,0x6f,0x65,0x73,0x20,
+ 0x6e,0x6f,0x74,0x20,0x65,0x78,0x69,0x73,0x74,0x73,0x2e,0x22,0x29,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c,
+ 0x66,0x5b,0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,
+ 0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x2e,0x63,0x6f,
+ 0x72,0x6f,0x3a,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x68,0x61,0x6e,0x64,
+ 0x6c,0x65,0x2e,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x29,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,
+ 0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,
+ 0x66,0x2c,0x20,0x6b,0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,
+ 0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,
+ 0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,
+ 0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x2e,0x63,
+ 0x6f,0x72,0x6f,0x3a,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x68,0x61,0x6e,
+ 0x64,0x6c,0x65,0x2e,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,
+ 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x43,0x61,0x6e,
+ 0x6e,0x6f,0x74,0x20,0x73,0x65,0x74,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x22,0x20,
+ 0x2e,0x2e,0x20,0x6b,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x72,0x65,0x61,0x64,0x79,0x20,
+ 0x3a,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x5f,0x5f,0x70,
+ 0x61,0x69,0x72,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x73,0x65,0x6c,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,
+ 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x2e,
+ 0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x70,0x72,0x65,0x76,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x6b,0x65,0x79,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,
+ 0x6e,0x65,0x78,0x74,0x28,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,
+ 0x2c,0x20,0x70,0x72,0x65,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x65,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6b,0x65,0x79,0x2c,0x20,0x73,0x65,0x6c,0x66,
+ 0x5b,0x6b,0x65,0x79,0x5d,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x55,0x70,0x76,0x61,0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,
+ 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,
+ 0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x6b,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,
+ 0x3d,0x20,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x6f,0x74,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,
+ 0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x68,0x65,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x2e,0x2e,
+ 0x22,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x65,0x78,0x69,0x74,0x73,
+ 0x74,0x73,0x2e,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,
+ 0x65,0x63,0x74,0x28,0x32,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,
+ 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x5b,0x48,0x41,0x4e,
+ 0x44,0x4c,0x45,0x5d,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x29,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,
+ 0x2c,0x20,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x73,
+ 0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x5b,0x6b,0x5d,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x64,
+ 0x65,0x78,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,
+ 0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x73,0x65,0x6c,0x66,0x5b,0x48,0x41,
+ 0x4e,0x44,0x4c,0x45,0x5d,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x2c,0x20,0x76,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
+ 0x65,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x43,0x61,0x6e,0x6e,0x6f,0x74,0x20,
+ 0x73,0x65,0x74,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x22,0x20,0x2e,0x2e,
+ 0x20,0x6b,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x20,0x72,0x65,0x61,0x64,0x79,0x20,0x3a,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x5f,0x5f,0x70,0x61,
+ 0x69,0x72,0x73,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,
+ 0x65,0x6c,0x66,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6d,
+ 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x2e,0x69,
+ 0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6e,
+ 0x69,0x6c,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x74,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x70,0x72,0x65,0x76,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x6b,0x65,0x79,0x2c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x6e,
+ 0x65,0x78,0x74,0x28,0x73,0x65,0x6c,0x66,0x5b,0x53,0x54,0x4f,0x52,0x45,0x5d,0x2c,
+ 0x20,0x70,0x72,0x65,0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x65,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x6b,0x65,0x79,0x2c,0x20,0x73,0x65,0x6c,0x66,0x5b,
+ 0x6b,0x65,0x79,0x5d,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x63,0x6f,
+ 0x6e,0x73,0x74,0x72,0x75,0x63,0x74,0x6f,0x72,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x63,0x6f,0x72,0x6f,0x20,0x20,0x28,0x75,
+ 0x74,0x69,0x6c,0x2e,0x2a,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x6e,0x73,0x74,
+ 0x61,0x6e,0x63,0x65,0x29,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,
+ 0x74,0x6f,0x20,0x6d,0x61,0x70,0x20,0x74,0x6f,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x6e,
+ 0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x20,0x64,0x6f,0x20,0x64,0x75,0x6d,0x70,0x20,0x28,0x73,0x63,0x72,0x69,
+ 0x70,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6e,0x65,0x77,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x28,0x63,0x6c,0x73,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x65,
+ 0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x75,0x70,0x76,0x61,0x6c,
+ 0x75,0x65,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x2c,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x20,
+ 0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,
+ 0x72,0x28,0x33,0x30,0x31,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,
+ 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x22,0x2e,0x2e,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x20,0x3d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x3a,
+ 0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x22,
+ 0x66,0x22,0x29,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x65,0x72,0x72,0x6f,
+ 0x72,0x28,0x33,0x30,0x31,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,
+ 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x3a,0x20,0x22,0x2e,0x2e,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x29,
+ 0x29,0x2e,0x66,0x75,0x6e,0x63,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,
+ 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,
+ 0x3d,0x31,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x3d,0x20,0x63,
+ 0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x6c,0x65,0x76,
+ 0x65,0x6c,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x6e,0x61,0x6d,
+ 0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x7e,0x3d,0x20,0x22,0x28,
+ 0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x73,0x6b,0x69,0x70,0x20,0x69,
+ 0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x69,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,
+ 0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x20,0x3d,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x2e,0x67,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x66,0x75,
+ 0x6e,0x63,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,
+ 0x65,0x73,0x5b,0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x69,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,
+ 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x53,0x54,0x4f,0x52,0x45,
+ 0x5d,0x20,0x3d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x5b,0x48,0x41,0x4e,
+ 0x44,0x4c,0x45,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,
+ 0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x63,
+ 0x6f,0x72,0x6f,0x20,0x7d,0x20,0x7d,0x2c,0x20,0x63,0x6c,0x73,0x2e,0x4c,0x6f,0x63,
+ 0x61,0x6c,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x3d,0x20,0x73,0x65,
+ 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x53,0x54,
+ 0x4f,0x52,0x45,0x5d,0x20,0x3d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c,
+ 0x20,0x5b,0x48,0x41,0x4e,0x44,0x4c,0x45,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x20,0x7d,0x2c,0x20,0x63,0x6c,0x73,0x2e,0x55,0x70,0x76,0x61,0x6c,0x43,0x6f,0x6e,
+ 0x74,0x65,0x78,0x74,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x73,0x65,
+ 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x5b,0x4c,0x4f,
+ 0x43,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x73,0x2c,0x20,0x5b,
+ 0x55,0x50,0x56,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,
+ 0x73,0x2c,0x20,0x5b,0x45,0x56,0x41,0x4c,0x5d,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x7d,
+ 0x2c,0x20,0x63,0x6c,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x61,0x77,0x73,0x65,0x74,0x28,0x72,0x65,0x73,0x75,0x6c,0x74,0x2c,0x20,0x47,0x4c,
+ 0x4f,0x42,0x41,0x4c,0x2c,0x20,0x67,0x65,0x74,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,
+ 0x28,0x66,0x75,0x6e,0x63,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x29,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,
+ 0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,
+ 0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x48,0x61,0x6e,0x64,0x6c,0x65,0x20,0x63,0x61,0x63,
+ 0x68,0x69,0x6e,0x67,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x73,0x74,
+ 0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x74,0x61,
+ 0x6b,0x65,0x73,0x20,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73,
+ 0x3a,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x61,0x6e,0x64,0x20,0x73,0x74,0x61,
+ 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x73,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x20,
+ 0x49,0x66,0x20,0x74,0x68,0x69,0x73,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x20,0x68,0x61,0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x61,0x6c,0x72,0x65,
+ 0x61,0x64,0x79,0x20,0x71,0x75,0x65,0x72,0x69,0x65,0x64,0x20,0x74,0x68,0x65,0x72,
+ 0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x6e,0x65,0x77,0x20,0x69,0x6e,0x73,0x74,
+ 0x61,0x6e,0x74,0x69,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x41,0x20,0x43,0x6f,0x6e,
+ 0x74,0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x20,0x69,0x73,0x20,0x76,
+ 0x61,0x6c,0x69,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x64,0x75,0x72,0x69,0x6e,0x67,
+ 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x0a,
+ 0x2d,0x2d,0x20,0x6f,0x6e,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x69,0x74,0x20,0x68,
+ 0x61,0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,
+ 0x61,0x74,0x65,0x64,0x2e,0x20,0x52,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,
+ 0x20,0x74,0x6f,0x20,0x61,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x4d,0x61,0x6e,
+ 0x61,0x67,0x65,0x72,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6c,0x6f,0x73,
+ 0x74,0x20,0x61,0x66,0x74,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x65,0x6e,0x64,0x20,
+ 0x6f,0x66,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x28,0x73,
+ 0x6f,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x20,0x63,0x61,0x6e,
+ 0x20,0x62,0x65,0x20,0x63,0x6f,0x6c,0x6c,0x65,0x63,0x74,0x65,0x64,0x29,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x49,0x66,0x20,0x61,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,
+ 0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,
+ 0x74,0x69,0x61,0x74,0x65,0x64,0x2c,0x20,0x61,0x6e,0x20,0x33,0x30,0x31,0x20,0x44,
+ 0x42,0x47,0x50,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69,0x73,0x20,0x74,0x68,0x72,
+ 0x6f,0x77,0x6e,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,
+ 0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x28,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65,
+ 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x74,0x68,0x72,0x65,0x61,
+ 0x64,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x61,0x6c,0x20,0x63,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,
+ 0x61,0x73,0x20,0x6b,0x65,0x79,0x20,0x28,0x6e,0x6f,0x74,0x20,0x74,0x68,0x65,0x20,
+ 0x77,0x72,0x61,0x70,0x70,0x65,0x64,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,
+ 0x20,0x61,0x73,0x20,0x69,0x74,0x73,0x20,0x75,0x6e,0x69,0x63,0x69,0x74,0x79,0x20,
+ 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x75,0x61,0x72,0x61,0x6e,0x74,0x65,0x65,
+ 0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6f,0x74,
+ 0x68,0x65,0x72,0x77,0x69,0x73,0x65,0x2c,0x20,0x74,0x72,0x75,0x65,0x20,0x69,0x73,
+ 0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,
+ 0x79,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,
+ 0x20,0x28,0x61,0x73,0x20,0x6e,0x69,0x6c,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x61,0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6b,0x65,
+ 0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x6b,0x65,0x79,0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5b,0x31,0x5d,
+ 0x20,0x6f,0x72,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x73,0x20,0x3d,0x20,0x63,0x61,0x63,0x68,0x65,0x5b,0x6b,
+ 0x65,0x79,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,
+ 0x6f,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x63,0x68,0x65,0x5b,0x6b,0x65,0x79,0x5d,
+ 0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,
+ 0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x63,
+ 0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x5b,0x6c,0x65,0x76,0x65,0x6c,0x5d,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,
+ 0x20,0x4d,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x3a,0x6e,0x65,0x77,0x28,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,
+ 0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x73,0x5b,0x6c,0x65,0x76,0x65,0x6c,0x5d,
+ 0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,
+ 0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x64,0x62,0x67,0x70,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,
+ 0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x64,0x62,0x67,0x70,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,
+ 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,
+ 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,
+ 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,
+ 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,
+ 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,
+ 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,
+ 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,
+ 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,
+ 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,
+ 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,
+ 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,
+ 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,
+ 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,
+ 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,
+ 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,
+ 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,
+ 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x42,0x47,0x70,0x20,0x70,0x72,0x6f,0x74,0x6f,0x63,
+ 0x6f,0x6c,0x20,0x75,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x2c,0x20,0x65,0x72,
+ 0x72,0x6f,0x72,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x2c,0x20,0x58,0x4d,
+ 0x4c,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x29,0x2e,0x0a,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,
+ 0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,
+ 0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x72,0x72,0x6f,
+ 0x72,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x2c,
+ 0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x70,0x61,0x69,0x72,0x73,0x2c,0x20,0x69,0x70,
+ 0x61,0x69,0x72,0x73,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,
+ 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x72,0x72,0x6f,0x72,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,
+ 0x62,0x6c,0x65,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x70,0x61,0x69,0x72,0x73,
+ 0x2c,0x20,0x69,0x70,0x61,0x69,0x72,0x73,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,
+ 0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x20,0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x74,0x68,0x65,0x20,
+ 0x44,0x42,0x47,0x70,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x61,0x72,0x67,
+ 0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x73,0x20,0x69,0x74,0x20,0x61,0x73,0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x6b,0x65,0x79,0x2f,0x76,0x61,
+ 0x6c,0x75,0x65,0x20,0x70,0x61,0x69,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x46,0x6f,
+ 0x72,0x20,0x65,0x78,0x61,0x6d,0x70,0x6c,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x73,
+ 0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x3c,0x63,0x6f,0x64,0x65,0x3e,0x2d,0x69,
+ 0x20,0x35,0x20,0x2d,0x6a,0x20,0x66,0x6f,0x6f,0x3c,0x2f,0x63,0x6f,0x64,0x65,0x3e,
+ 0x20,0x77,0x69,0x6c,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20,
+ 0x3c,0x63,0x6f,0x64,0x65,0x3e,0x7b,0x69,0x3d,0x35,0x2c,0x20,0x6a,0x3d,0x66,0x6f,
+ 0x6f,0x7d,0x3c,0x2f,0x63,0x6f,0x64,0x65,0x3e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,
+ 0x72,0x61,0x6d,0x20,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x20,0x28,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x29,0x20,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x6f,
+ 0x66,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x40,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x64,0x65,0x73,
+ 0x63,0x72,0x69,0x62,0x65,0x64,0x20,0x61,0x62,0x6f,0x76,0x65,0x0a,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x61,0x72,0x67,0x5f,0x70,0x61,0x72,0x73,
+ 0x65,0x28,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,
+ 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x61,0x72,0x67,0x2c,0x20,0x76,0x61,0x6c,
+ 0x20,0x69,0x6e,0x20,0x63,0x6d,0x64,0x5f,0x61,0x72,0x67,0x73,0x3a,0x67,0x6d,0x61,
+ 0x74,0x63,0x68,0x28,0x22,0x25,0x2d,0x28,0x25,0x77,0x29,0x20,0x28,0x25,0x53,0x2b,
+ 0x29,0x22,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x72,0x67,0x73,0x5b,0x61,0x72,0x67,0x5d,0x20,0x3d,0x20,0x76,0x61,0x6c,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x61,0x72,0x67,0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,
+ 0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x61,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x20,0x6c,0x69,0x6e,0x65,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x72,
+ 0x75,0x6e,0x20,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x28,0x74,0x61,
+ 0x62,0x6c,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x64,0x61,0x74,0x61,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x6f,0x70,
+ 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x4d,0x2e,0x63,0x6d,0x64,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x63,0x6d,0x64,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6d,0x64,0x5f,
+ 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,
+ 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6d,0x64,0x3a,0x66,0x69,0x6e,0x64,
+ 0x28,0x22,0x2d,0x2d,0x22,0x2c,0x20,0x31,0x2c,0x20,0x74,0x72,0x75,0x65,0x29,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,
+ 0x20,0x61,0x20,0x64,0x61,0x74,0x61,0x20,0x70,0x61,0x72,0x74,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x61,
+ 0x72,0x67,0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x63,0x6d,0x64,0x3a,
+ 0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5e,0x28,0x25,0x53,0x2b,0x29,0x25,0x73,0x2b,
+ 0x28,0x2e,0x2a,0x29,0x25,0x73,0x2b,0x25,0x2d,0x25,0x2d,0x25,0x73,0x2a,0x28,0x2e,
+ 0x2a,0x29,0x24,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x61,
+ 0x74,0x61,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x28,
+ 0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x63,0x6d,0x64,0x3a,0x6d,0x61,0x74,0x63,
+ 0x68,0x28,0x22,0x5e,0x28,0x25,0x53,0x2b,0x29,0x25,0x73,0x2b,0x28,0x2e,0x2a,0x29,
+ 0x24,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6d,0x64,0x5f,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x4d,0x2e,0x61,0x72,0x67,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x61,0x72,0x67,
+ 0x73,0x29,0x2c,0x20,0x64,0x61,0x74,0x61,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x74,0x68,0x65,0x20,0x70,0x61,
+ 0x63,0x6b,0x65,0x74,0x20,0x72,0x65,0x61,0x64,0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,
+ 0x6f,0x63,0x6b,0x65,0x74,0x2c,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x66,0x6f,
+ 0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x62,0x79,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,
+ 0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x6f,0x6e,0x20,0x65,0x72,
+ 0x72,0x6f,0x72,0x73,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,
+ 0x2e,0x72,0x65,0x61,0x64,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x28,0x73,0x6b,0x74,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65,
+ 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,
+ 0x74,0x72,0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x79,0x74,0x65,0x2c,0x20,0x65,0x72,0x72,0x20,
+ 0x3d,0x20,0x73,0x6b,0x74,0x3a,0x72,0x65,0x63,0x65,0x69,0x76,0x65,0x28,0x31,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x62,0x79,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x79,0x74,0x65,0x20,0x3d,0x3d,
+ 0x20,0x22,0x5c,0x30,0x30,0x30,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,
+ 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,
+ 0x69,0x7a,0x65,0x5b,0x23,0x73,0x69,0x7a,0x65,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x62,
+ 0x79,0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x73,
+ 0x69,0x7a,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x44,0x42,0x47,0x50,
+ 0x5f,0x45,0x52,0x52,0x5f,0x4d,0x45,0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x20,0x3d,
+ 0x20,0x7b,0x7d,0x20,0x2d,0x2d,0x20,0x75,0x6e,0x69,0x71,0x75,0x65,0x20,0x6f,0x62,
+ 0x6a,0x65,0x63,0x74,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x64,0x65,
+ 0x6e,0x74,0x69,0x66,0x79,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72,0x6f,0x72,
+ 0x73,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x54,0x68,0x72,0x6f,0x77,0x73,0x20,0x61,0x20,
+ 0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72,
+ 0x6f,0x72,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,
+ 0x69,0x6e,0x20,0x61,0x20,0x66,0x69,0x6e,0x65,0x20,0x74,0x75,0x6e,0x65,0x64,0x20,
+ 0x65,0x72,0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x74,0x6f,
+ 0x20,0x74,0x68,0x65,0x20,0x73,0x65,0x72,0x76,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20,
+ 0x49,0x74,0x20,0x69,0x73,0x20,0x69,0x6e,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x74,
+ 0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,
+ 0x20,0x61,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61,
+ 0x6b,0x65,0x20,0x61,0x20,0x75,0x73,0x65,0x66,0x75,0x6c,0x20,0x65,0x72,0x72,0x6f,
+ 0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61,0x20,0x73,0x74,0x61,
+ 0x6e,0x64,0x61,0x72,0x64,0x20,0x4c,0x75,0x61,0x20,0x65,0x72,0x72,0x6f,0x72,0x0a,
+ 0x2d,0x2d,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20,0x61,0x20,0x63,
+ 0x6f,0x64,0x65,0x20,0x39,0x39,0x38,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x28,0x69,
+ 0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x20,0x65,0x72,0x72,0x6f,0x72,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61,
+ 0x6c,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x6d,
+ 0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x28,0x6f,
+ 0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x61,0x74,0x74,0x72,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x61,0x74,
+ 0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x74,0x6f,0x20,0x61,0x64,0x64,0x20,
+ 0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x20,
+ 0x74,0x61,0x67,0x20,0x28,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x65,0x72,0x72,0x6f,0x72,0x28,
+ 0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61,
+ 0x74,0x74,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x73,
+ 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x63,0x6f,
+ 0x64,0x65,0x20,0x3d,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x65,0x73,0x73,0x61,
+ 0x67,0x65,0x20,0x3d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,0x20,0x61,0x74,
+ 0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20,0x6f,0x72,0x20,0x7b,0x7d,0x20,
+ 0x7d,0x2c,0x20,0x4d,0x2e,0x44,0x42,0x47,0x50,0x5f,0x45,0x52,0x52,0x5f,0x4d,0x45,
+ 0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x29,0x2c,0x20,0x32,0x29,0x0a,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4c,0x69,0x6b,0x65,0x20,0x63,0x6f,0x72,0x65,0x20,
+ 0x61,0x73,0x73,0x65,0x72,0x74,0x20,0x62,0x75,0x74,0x20,0x74,0x68,0x72,0x6f,0x77,
+ 0x73,0x20,0x61,0x20,0x44,0x42,0x47,0x70,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x69,
+ 0x66,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e,
+ 0x6f,0x74,0x20,0x6d,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,
+ 0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61,0x6c,
+ 0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x20,0x74,0x68,0x72,0x6f,
+ 0x77,0x6e,0x20,0x69,0x66,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,
+ 0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x6d,0x65,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x40,
+ 0x70,0x61,0x72,0x61,0x6d,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x63,0x6f,
+ 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x74,0x65,0x73,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x2e,0x2e,0x2e,0x20,0x77,0x69,
+ 0x6c,0x6c,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x65,0x72,
+ 0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x20,0x69,0x66,0x20,0x74,
+ 0x65,0x73,0x74,0x20,0x66,0x61,0x69,0x6c,0x73,0x2e,0x0a,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x64,
+ 0x65,0x2c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,
+ 0x65,0x73,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x4d,0x2e,0x65,0x72,0x72,0x6f,0x72,
+ 0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x28,0x2e,0x2e,0x2e,0x29,0x29,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x75,0x63,
+ 0x63,0x65,0x73,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,
+ 0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4f,0x75,0x74,0x67,0x6f,0x69,0x6e,0x67,0x20,
+ 0x64,0x61,0x74,0x61,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x78,0x6d,0x6c,0x61,0x74,0x74,0x72,0x5f,0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x63,
+ 0x68,0x61,0x72,0x73,0x20,0x3d,0x20,0x7b,0x20,0x5b,0x27,0x22,0x27,0x5d,0x20,0x3d,
+ 0x20,0x22,0x26,0x71,0x75,0x6f,0x74,0x3b,0x22,0x2c,0x20,0x5b,0x22,0x3c,0x22,0x5d,
+ 0x20,0x3d,0x20,0x22,0x26,0x6c,0x74,0x3b,0x22,0x2c,0x20,0x5b,0x22,0x26,0x22,0x5d,
+ 0x20,0x3d,0x20,0x22,0x26,0x61,0x6d,0x70,0x3b,0x22,0x20,0x7d,0x0a,0x2d,0x2d,0x2d,
+ 0x20,0x56,0x65,0x72,0x79,0x20,0x62,0x61,0x73,0x69,0x63,0x20,0x58,0x4d,0x4c,0x20,
+ 0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x0a,0x2d,0x2d,0x20,0x47,0x65,0x6e,
+ 0x65,0x72,0x61,0x74,0x65,0x73,0x20,0x61,0x20,0x58,0x4d,0x4c,0x20,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x20,0x66,0x72,0x6f,0x6d,0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x4f,
+ 0x62,0x6a,0x65,0x63,0x74,0x20,0x4d,0x6f,0x64,0x65,0x6c,0x20,0x28,0x4c,0x4f,0x4d,
+ 0x29,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x0a,0x2d,0x2d,0x20,0x53,0x65,0x65,0x20,
+ 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69,
+ 0x6c,0x64,0x2e,0x63,0x6f,0x2e,0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,
+ 0x73,0x2f,0x6c,0x75,0x61,0x65,0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68,
+ 0x74,0x6d,0x6c,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,
+ 0x6f,0x6d,0x32,0x73,0x74,0x72,0x28,0x78,0x6d,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x3d,0x20,0x7b,
+ 0x20,0x7d,0x20,0x2d,0x2d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62,0x75,0x66,
+ 0x66,0x65,0x72,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x28,0x6e,0x6f,0x64,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,
+ 0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,
+ 0x31,0x5d,0x20,0x3d,0x20,0x22,0x3c,0x22,0x2e,0x2e,0x6e,0x6f,0x64,0x65,0x2e,0x74,
+ 0x61,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,
+ 0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,
+ 0x20,0x22,0x20,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x6f,0x72,0x64,0x65,0x72,0x69,
+ 0x6e,0x67,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x68,0x6f,0x6e,0x6f,0x72,0x65,
+ 0x64,0x20,0x68,0x65,0x72,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
+ 0x6f,0x72,0x20,0x61,0x74,0x74,0x72,0x2c,0x20,0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,
+ 0x70,0x61,0x69,0x72,0x73,0x28,0x6e,0x6f,0x64,0x65,0x2e,0x61,0x74,0x74,0x72,0x20,
+ 0x6f,0x72,0x20,0x7b,0x7d,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,0x65,0x28,0x61,0x74,
+ 0x74,0x72,0x29,0x20,0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,
+ 0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x20,
+ 0x2e,0x2e,0x20,0x27,0x3d,0x22,0x27,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x27,0x5b,
+ 0x22,0x26,0x3c,0x5d,0x27,0x2c,0x20,0x78,0x6d,0x6c,0x61,0x74,0x74,0x72,0x5f,0x73,
+ 0x70,0x65,0x63,0x69,0x61,0x6c,0x63,0x68,0x61,0x72,0x73,0x29,0x20,0x2e,0x2e,0x20,
+ 0x27,0x22,0x27,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,
+ 0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x20,0x22,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,
+ 0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x72,0x65,0x6d,0x6f,0x76,
+ 0x65,0x20,0x74,0x68,0x65,0x20,0x6c,0x61,0x73,0x74,0x20,0x73,0x65,0x70,0x61,0x72,
+ 0x61,0x74,0x6f,0x72,0x20,0x28,0x75,0x73,0x65,0x6c,0x65,0x73,0x73,0x29,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x64,0x65,0x5b,
+ 0x31,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,
+ 0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x3e,0x22,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c,
+ 0x20,0x63,0x68,0x69,0x6c,0x64,0x20,0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73,
+ 0x28,0x6e,0x6f,0x64,0x65,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,
+ 0x65,0x28,0x63,0x68,0x69,0x6c,0x64,0x29,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x62,
+ 0x6c,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,
+ 0x65,0x28,0x63,0x68,0x69,0x6c,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x70,0x69,
+ 0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31,
+ 0x5d,0x20,0x3d,0x20,0x22,0x3c,0x21,0x5b,0x43,0x44,0x41,0x54,0x41,0x5b,0x22,0x20,
+ 0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x68,0x69,0x6c,
+ 0x64,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x5d,0x3e,0x22,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x69,0x65,0x63,
+ 0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,
+ 0x3d,0x20,0x22,0x3c,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x64,0x65,0x2e,0x74,
+ 0x61,0x67,0x20,0x2e,0x2e,0x20,0x22,0x3e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x70,0x69,0x65,0x63,0x65,0x73,0x5b,0x23,0x70,0x69,0x65,0x63,0x65,
+ 0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x22,0x2f,0x3e,0x22,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x28,
+ 0x78,0x6d,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x70,0x69,0x65,0x63,0x65,0x73,0x29,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,
+ 0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x6b,0x74,0x2c,0x20,0x72,0x65,
+ 0x73,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,
+ 0x65,0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,
+ 0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x78,
+ 0x6d,0x6c,0x6e,0x73,0x20,0x3d,0x20,0x22,0x75,0x72,0x6e,0x3a,0x64,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x5f,0x70,0x72,0x6f,0x74,0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x31,
+ 0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x61,0x74,
+ 0x61,0x20,0x3d,0x20,0x27,0x3c,0x3f,0x78,0x6d,0x6c,0x20,0x76,0x65,0x72,0x73,0x69,
+ 0x6f,0x6e,0x3d,0x22,0x31,0x2e,0x30,0x22,0x20,0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e,
+ 0x67,0x3d,0x22,0x55,0x54,0x46,0x2d,0x38,0x22,0x20,0x3f,0x3e,0x5c,0x6e,0x27,0x2e,
+ 0x2e,0x4d,0x2e,0x6c,0x6f,0x6d,0x32,0x73,0x74,0x72,0x28,0x72,0x65,0x73,0x70,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x6c,0x6f,0x67,0x28,0x22,0x44,
+ 0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x53,0x65,0x6e,0x64,0x20,0x22,0x20,0x2e,
+ 0x2e,0x20,0x64,0x61,0x74,0x61,0x29,0x0a,0x20,0x20,0x20,0x20,0x73,0x6b,0x74,0x3a,
+ 0x73,0x65,0x6e,0x64,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x23,0x64,
+ 0x61,0x74,0x61,0x29,0x2e,0x2e,0x22,0x5c,0x30,0x30,0x30,0x22,0x2e,0x2e,0x64,0x61,
+ 0x74,0x61,0x2e,0x2e,0x22,0x5c,0x30,0x30,0x30,0x22,0x29,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x6e,0x20,0x58,
+ 0x4d,0x4c,0x20,0x74,0x61,0x67,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x69,0x6e,
+ 0x67,0x20,0x61,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x65,0x72,0x72,
+ 0x6f,0x72,0x2c,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6e,0x20,0x6f,0x70,0x74,0x69,
+ 0x6f,0x6e,0x61,0x6c,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x63,0x6f,0x64,0x65,0x20,0x28,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x63,0x6f,0x64,0x65,0x20,
+ 0x28,0x73,0x65,0x65,0x20,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69,0x66,
+ 0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x6d,0x73,0x67,0x20,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,
+ 0x20,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x74,0x65,0x78,0x74,0x75,
+ 0x61,0x6c,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x6f,
+ 0x66,0x20,0x65,0x72,0x72,0x6f,0x72,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x73,0x75,0x69,0x74,0x61,0x62,
+ 0x6c,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,
+ 0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x58,0x4d,0x4c,0x0a,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,
+ 0x72,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6c,0x65,0x6d,0x20,0x3d,0x20,0x7b,0x20,
+ 0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x65,0x72,0x72,0x6f,0x72,0x22,0x2c,0x20,0x61,
+ 0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x64,0x65,0x20,0x3d,0x20,0x63,
+ 0x6f,0x64,0x65,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6d,
+ 0x73,0x67,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x65,0x6d,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x6d,0x73,0x67,0x29,0x2c,0x20,0x74,0x61,0x67,0x20,0x3d,
+ 0x20,0x22,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x22,0x20,0x7d,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x65,0x6c,0x65,0x6d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,
+ 0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x64,0x62,0x67,0x70,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,
+ 0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,
+ 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x70,0x61,0x63,0x6b,
+ 0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,
+ 0x69,0x6f,0x6e,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,
+ 0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,
+ 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,
+ 0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,
+ 0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,
+ 0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,
+ 0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,
+ 0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,
+ 0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,
+ 0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,
+ 0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,
+ 0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,
+ 0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,
+ 0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,
+ 0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,
+ 0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,
+ 0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
+ 0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,
+ 0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,
+ 0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,
+ 0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x4a,0x75,
+ 0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67,0x61,0x74,0x73,0x20,0x2d,0x20,0x69,
+ 0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,
+ 0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,
+ 0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,
+ 0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x20,0x67,0x65,0x6e,0x65,
+ 0x72,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x20,0x61,0x20,0x4c,0x4f,0x4d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,
+ 0x68,0x20,0x64,0x61,0x74,0x61,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x6e,0x74,0x72,
+ 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,
+ 0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,
+ 0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,
+ 0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,
+ 0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74,0x79,0x70,
+ 0x65,0x2c,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x6e,0x65,0x78,0x74,0x2c,
+ 0x20,0x72,0x61,0x77,0x67,0x65,0x74,0x2c,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,
+ 0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,
+ 0x62,0x6c,0x65,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73,0x65,
+ 0x6c,0x65,0x63,0x74,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,
+ 0x79,0x69,0x65,0x6c,0x64,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,
+ 0x6f,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x63,0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,
+ 0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x6e,0x65,0x78,0x74,0x2c,0x20,0x72,
+ 0x61,0x77,0x67,0x65,0x74,0x2c,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,
+ 0x62,0x6c,0x65,0x2c,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73,0x65,0x6c,0x65,
+ 0x63,0x74,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69,
+ 0x65,0x6c,0x64,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,
+ 0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,
+ 0x63,0x6f,0x6e,0x63,0x61,0x74,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x55,
+ 0x4c,0x54,0x49,0x56,0x41,0x4c,0x5f,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x20,0x5f,0x5f,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,
+ 0x65,0x6e,0x64,0x20,0x7d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x62,
+ 0x65,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x75,
+ 0x62,0x6c,0x69,0x63,0x20,0x41,0x50,0x49,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x6c,0x6f,0x67,0x69,0x63,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x6d,
+ 0x6f,0x64,0x75,0x6c,0x65,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,
+ 0x20,0x4c,0x75,0x61,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20,0x69,0x6e,0x74,
+ 0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x0a,0x2d,
+ 0x2d,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x73,0x20,0x61,0x20,0x5b,0x44,
+ 0x42,0x47,0x50,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x78,0x64,0x65,0x62,
+ 0x75,0x67,0x2e,0x6f,0x72,0x67,0x2f,0x64,0x6f,0x63,0x73,0x2d,0x64,0x62,0x67,0x70,
+ 0x2e,0x70,0x68,0x70,0x29,0x20,0x63,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x6c,0x65,
+ 0x0a,0x2d,0x2d,0x20,0x5b,0x4c,0x4f,0x4d,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,
+ 0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69,0x6c,0x64,0x2e,0x63,0x6f,0x2e,
+ 0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x75,0x61,0x65,
+ 0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x20,0x64,
+ 0x61,0x74,0x61,0x20,0x73,0x63,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x2e,0x0a,0x2d,
+ 0x2d,0x20,0x40,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,
+ 0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,
+ 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x64,0x61,0x74,0x61,
+ 0x20,0x74,0x6f,0x20,0x73,0x65,0x6e,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20,0x46,0x75,0x6c,
+ 0x6c,0x20,0x58,0x4d,0x4c,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x61,0x74,
+ 0x69,0x6f,0x6e,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,
+ 0x20,0x69,0x6e,0x20,0x5b,0x44,0x42,0x47,0x50,0x20,0x73,0x70,0x65,0x63,0x69,0x66,
+ 0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
+ 0x78,0x64,0x65,0x62,0x75,0x67,0x2e,0x6f,0x72,0x67,0x2f,0x64,0x6f,0x63,0x73,0x2d,
+ 0x64,0x62,0x67,0x70,0x2e,0x70,0x68,0x70,0x23,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x69,0x65,0x73,0x2d,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x73,0x2d,0x61,0x6e,
+ 0x64,0x2d,0x76,0x61,0x6c,0x75,0x65,0x73,0x29,0x2e,0x0a,0x2d,0x2d,0x20,0x4d,0x6f,
+ 0x64,0x69,0x66,0x79,0x69,0x6e,0x67,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,
+ 0x65,0x73,0x20,0x61,0x66,0x74,0x65,0x72,0x20,0x74,0x68,0x65,0x69,0x72,0x20,0x67,
+ 0x65,0x6e,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x70,0x6f,0x73,
+ 0x73,0x69,0x62,0x6c,0x65,0x20,0x28,0x61,0x73,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,
+ 0x20,0x64,0x61,0x74,0x61,0x20,0x73,0x65,0x72,0x69,0x61,0x6c,0x69,0x7a,0x61,0x74,
+ 0x69,0x6f,0x6e,0x2f,0x73,0x65,0x6e,0x64,0x69,0x6e,0x67,0x20,0x69,0x73,0x20,0x64,
+ 0x65,0x6c,0x61,0x79,0x65,0x64,0x29,0x0a,0x2d,0x2d,0x20,0x62,0x75,0x74,0x20,0x73,
+ 0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x77,0x69,
+ 0x74,0x68,0x20,0x63,0x61,0x72,0x65,0x2e,0x20,0x54,0x68,0x65,0x20,0x58,0x4d,0x4c,
+ 0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x75,0x72,0x65,0x20,0x75,0x73,0x65,0x73,0x20,
+ 0x74,0x68,0x65,0x20,0x5b,0x4c,0x4f,0x4d,0x5d,0x28,0x68,0x74,0x74,0x70,0x3a,0x2f,
+ 0x2f,0x6d,0x61,0x74,0x74,0x68,0x65,0x77,0x77,0x69,0x6c,0x64,0x2e,0x63,0x6f,0x2e,
+ 0x75,0x6b,0x2f,0x70,0x72,0x6f,0x6a,0x65,0x63,0x74,0x73,0x2f,0x6c,0x75,0x61,0x65,
+ 0x78,0x70,0x61,0x74,0x2f,0x6c,0x6f,0x6d,0x2e,0x68,0x74,0x6d,0x6c,0x29,0x0a,0x2d,
+ 0x2d,0x20,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x72,0x65,0x66,0x65,0x72,0x20,
+ 0x74,0x6f,0x20,0x74,0x68,0x65,0x73,0x65,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e,
+ 0x74,0x73,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x6d,0x6f,0x72,0x65,0x20,0x69,
+ 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x61,0x62,0x6f,0x75,
+ 0x74,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2e,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x49,0x6e,0x20,0x61,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x69,0x74,0x20,
+ 0x68,0x61,0x73,0x20,0x61,0x6e,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x70,0x61,0x72,
+ 0x74,0x2c,0x20,0x60,0x5b,0x31,0x5d,0x60,0x20,0x62,0x65,0x69,0x6e,0x67,0x20,0x74,
+ 0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70,0x72,0x65,0x73,
+ 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28,0x62,0x61,0x73,0x65,0x36,0x34,
+ 0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x29,0x2c,0x0a,0x2d,0x2d,0x20,0x70,0x6f,
+ 0x73,0x73,0x69,0x62,0x6c,0x79,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,
+ 0x62,0x79,0x20,0x63,0x68,0x6c,0x69,0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x69,0x65,0x73,0x20,0x28,0x40,0x7b,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,
+ 0x65,0x72,0x74,0x79,0x7d,0x20,0x74,0x68,0x65,0x6d,0x73,0x65,0x6c,0x76,0x65,0x73,
+ 0x29,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x69,0x65,0x6c,0x64,0x20,0x23,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x74,0x61,0x67,0x20,0x41,0x6c,0x77,0x61,0x79,
+ 0x73,0x20,0x22,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x22,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x66,0x69,0x65,0x6c,0x64,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,
+ 0x74,0x72,0x20,0x58,0x4d,0x4c,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,
+ 0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x44,0x42,0x47,0x50,0x20,0x73,0x70,0x65,0x63,
+ 0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40,0x74,0x79,
+ 0x70,0x65,0x20,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x65,0x63,0x74,0x6f,0x72,
+ 0x73,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,
+ 0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x4b,0x65,0x79,
+ 0x73,0x20,0x61,0x72,0x65,0x20,0x65,0x69,0x74,0x68,0x65,0x72,0x20,0x74,0x79,0x70,
+ 0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x28,0x60,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x60,0x2c,0x20,0x60,0x6e,0x75,0x6d,0x62,0x65,0x72,0x60,0x2c,0x20,0x2e,0x2e,0x2e,
+ 0x29,0x20,0x6f,0x72,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x0a,
+ 0x2d,0x2d,0x20,0x74,0x68,0x61,0x74,0x20,0x68,0x61,0x76,0x65,0x20,0x61,0x20,0x63,
+ 0x75,0x73,0x74,0x6f,0x6d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,
+ 0x61,0x74,0x74,0x61,0x63,0x68,0x65,0x64,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x69,
+ 0x65,0x6c,0x64,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,
+ 0x69,0x6f,0x6e,0x5d,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x73,0x70,
+ 0x65,0x63,0x74,0x6f,0x72,0x73,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x2d,0x0a,0x2d,
+ 0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x61,0x20,0x44,0x42,0x47,
+ 0x50,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x69,0x66,0x20,0x6e,0x65,
+ 0x65,0x64,0x65,0x64,0x2e,0x20,0x49,0x66,0x20,0x64,0x61,0x74,0x61,0x20,0x69,0x73,
+ 0x20,0x69,0x6e,0x20,0x64,0x61,0x74,0x61,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74,
+ 0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x6f,
+ 0x6e,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x72,0x61,0x6e,0x67,0x65,0x73,0x2c,0x0a,
+ 0x2d,0x2d,0x20,0x61,0x6e,0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x61,0x20,0x70,0x72,
+ 0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x72,0x2c,0x20,0x6f,0x74,0x68,0x65,0x72,0x77,0x69,0x73,
+ 0x65,0x20,0x64,0x72,0x6f,0x70,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x20,
+ 0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,0x64,
+ 0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x69,0x6e,0x20,0x49,0x44,0x45,0x29,
+ 0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x54,0x79,0x70,0x65,
+ 0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,
+ 0x20,0x69,0x6e,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70,0x72,0x20,
+ 0x56,0x61,0x6c,0x75,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x72,0x65,0x70,
+ 0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40,
+ 0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65,
+ 0x72,0x74,0x79,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x50,0x61,0x72,0x65,0x6e,
+ 0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20,0x40,0x70,
+ 0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x20,0x4c,0x75,0x61,0x20,0x65,0x78,0x70,0x72,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,
+ 0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x62,0x61,0x63,0x6b,0x20,0x69,0x6e,0x20,0x66,
+ 0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x64,
+ 0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x40,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,
+ 0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,
+ 0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x79,0x0a,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x3d,0x20,0x63,
+ 0x6f,0x79,0x69,0x65,0x6c,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x41,
+ 0x64,0x64,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x74,0x68,0x61,0x74,
+ 0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,
+ 0x66,0x6f,0x72,0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77,
+ 0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2f,0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,
+ 0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x49,0x6e,0x73,0x70,
+ 0x65,0x63,0x74,0x6f,0x72,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x74,
+ 0x6f,0x20,0x63,0x61,0x6c,0x6c,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,
+ 0x74,0x69,0x6f,0x6e,0x5d,0x20,0x61,0x64,0x64,0x5f,0x70,0x72,0x6f,0x62,0x65,0x0a,
+ 0x4d,0x2e,0x61,0x64,0x64,0x5f,0x70,0x72,0x6f,0x62,0x65,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x72,0x6f,0x62,0x65,0x29,0x20,0x70,0x72,
+ 0x6f,0x62,0x65,0x73,0x5b,0x23,0x70,0x72,0x6f,0x62,0x65,0x73,0x20,0x2b,0x20,0x31,
+ 0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x62,0x65,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d,
+ 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x73,0x20,0x61,
+ 0x20,0x4c,0x75,0x61,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x62,0x79,0x20,0x64,0x69,
+ 0x73,0x70,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x69,0x74,0x20,0x74,0x6f,0x20,
+ 0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,
+ 0x72,0x2e,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x68,0x65,0x20,
+ 0x73,0x61,0x6d,0x65,0x20,0x41,0x50,0x49,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,
+ 0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,
+ 0x20,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x6e,0x61,0x6d,0x65,0x20,0x28,
+ 0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,
+ 0x64,0x20,0x62,0x79,0x20,0x49,0x44,0x45,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,
+ 0x72,0x61,0x6d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x56,0x61,0x6c,0x75,0x65,0x20,
+ 0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a,0x2d,0x2d,0x20,0x40,0x70,
+ 0x61,0x72,0x61,0x6d,0x20,0x23,0x74,0x61,0x62,0x6c,0x65,0x20,0x70,0x61,0x72,0x65,
+ 0x6e,0x74,0x20,0x50,0x61,0x72,0x65,0x6e,0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,
+ 0x74,0x79,0x20,0x28,0x4c,0x4f,0x4d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6f,0x66,
+ 0x20,0x74,0x68,0x65,0x20,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,
+ 0x20,0x23,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,
+ 0x65,0x20,0x45,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x75,0x73,0x65,
+ 0x64,0x20,0x74,0x6f,0x20,0x72,0x65,0x74,0x72,0x69,0x65,0x76,0x65,0x20,0x60,0x76,
+ 0x61,0x6c,0x75,0x65,0x60,0x20,0x66,0x6f,0x72,0x20,0x66,0x75,0x72,0x74,0x68,0x65,
+ 0x72,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73,
+ 0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x44,0x42,0x47,
+ 0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x54,0x68,0x65,0x20,0x69,0x6e,
+ 0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x61,0x73,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x62,0x79,0x20,0x40,0x7b,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,
+ 0x63,0x74,0x69,0x6f,0x6e,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,
+ 0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f,
+ 0x70,0x65,0x72,0x74,0x79,0x7d,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x23,0x6e,0x69,0x6c,0x20,0x49,0x66,0x20,0x74,0x68,0x65,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x20,0x68,0x61,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x65,
+ 0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x40,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,
+ 0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,
+ 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,
+ 0x74,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,
+ 0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x28,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x74,
+ 0x79,0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x5d,0x20,0x6f,0x72,0x20,0x4d,
+ 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x64,0x65,0x66,0x61,
+ 0x75,0x6c,0x74,0x29,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,
+ 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x55,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x73,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,
+ 0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,
+ 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,
+ 0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,
+ 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x73,0x20,0x74,
+ 0x79,0x70,0x65,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x6e,0x20,0x68,0x61,
+ 0x76,0x65,0x20,0x61,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x28,
+ 0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x75,0x73,0x65,0x72,0x64,0x61,
+ 0x74,0x61,0x29,0x2e,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x31,0x29,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x64,0x20,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x32,0x29,0x20,
+ 0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x20,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x69,
+ 0x6e,0x67,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x61,0x20,0x63,0x75,0x73,
+ 0x74,0x6f,0x6d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x68,0x61,
+ 0x73,0x20,0x62,0x65,0x65,0x6e,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,0x20,0x28,0x69,
+ 0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x63,0x61,0x73,0x65,0x2c,0x20,0x64,0x6f,0x20,
+ 0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x63,0x65,0x73,0x73,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x20,0x61,0x6e,0x79,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x29,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x65,
+ 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,
+ 0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,
+ 0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x74,0x20,0x3d,0x20,
+ 0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x76,0x61,0x6c,
+ 0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x6e,0x64,0x20,0x20,0x62,0x79,0x20,0x6d,
+ 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x3d,0x20,
+ 0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x6d,0x74,0x5d,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x75,0x73,0x74,
+ 0x6f,0x6d,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,
+ 0x75,0x73,0x74,0x6f,0x6d,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x29,0x2c,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6f,0x72,0x20,0x65,0x6c,0x73,
+ 0x65,0x20,0x63,0x61,0x6c,0x6c,0x20,0x70,0x72,0x6f,0x62,0x65,0x73,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x23,
+ 0x70,0x72,0x6f,0x62,0x65,0x73,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,
+ 0x20,0x70,0x72,0x6f,0x62,0x65,0x73,0x5b,0x69,0x5d,0x28,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,
+ 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x74,0x72,
+ 0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x64,0x65,0x66,
+ 0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x28,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,
+ 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x6d,0x74,0x20,0x61,0x6e,0x64,0x20,0x70,0x72,0x6f,0x70,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x6d,0x74,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e,0x69,
+ 0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x22,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x22,0x2c,0x20,0x6d,0x74,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x22,0x6d,
+ 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5b,0x22,0x2e,0x2e,0x70,0x72,0x6f,0x70,
+ 0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2e,0x2e,
+ 0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6d,0x74,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x6d,0x74,0x70,0x72,
+ 0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22,
+ 0x73,0x70,0x65,0x63,0x69,0x61,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x66,0x61,0x6e,0x63,0x79,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x72,0x65,0x70,0x72,0x28,
+ 0x66,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x61,0x72,0x67,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,
+ 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x6e,
+ 0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x61,0x72,0x67,0x73,0x5b,0x69,0x5d,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x2e,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x66,0x2c,0x20,0x69,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x69,0x6e,0x66,0x6f,0x2e,0x69,0x73,0x76,0x61,0x72,0x61,0x72,0x67,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73,
+ 0x5b,0x23,0x61,0x72,0x67,0x73,0x2b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x2e,0x2e,0x2e,
+ 0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x22,0x20,0x2e,0x2e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,0x61,0x72,0x67,
+ 0x73,0x2c,0x20,0x22,0x2c,0x20,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x29,0x22,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,
+ 0x65,0x20,0x61,0x20,0x6e,0x61,0x6d,0x65,0x20,0x73,0x69,0x75,0x74,0x61,0x62,0x6c,
+ 0x65,0x20,0x66,0x6f,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65,
+ 0x78,0x20,0x73,0x79,0x6e,0x74,0x61,0x78,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x4b,0x65,0x79,0x20,0x6e,0x61,0x6d,0x65,
+ 0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x20,0x41,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65,
+ 0x78,0x20,0x73,0x74,0x79,0x6c,0x65,0x20,0x69,0x6e,0x64,0x65,0x78,0x0a,0x2d,0x2d,
+ 0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x27,
+ 0x66,0x6f,0x6f,0x27,0x29,0x20,0x3d,0x3e,0x20,0x27,0x5b,0x22,0x66,0x6f,0x6f,0x22,
+ 0x5d,0x27,0x0a,0x2d,0x2d,0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67,0x65,0x6e,
+ 0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,
+ 0x6b,0x65,0x79,0x28,0x31,0x32,0x29,0x20,0x20,0x20,0x20,0x3d,0x3e,0x20,0x27,0x5b,
+ 0x31,0x32,0x5d,0x27,0x0a,0x2d,0x2d,0x20,0x40,0x75,0x73,0x61,0x67,0x65,0x20,0x67,
+ 0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,
+ 0x65,0x5f,0x6b,0x65,0x79,0x28,0x7b,0x7d,0x29,0x20,0x20,0x20,0x20,0x3d,0x3e,0x20,
+ 0x27,0x5b,0x74,0x61,0x62,0x6c,0x65,0x3a,0x20,0x30,0x78,0x31,0x32,0x33,0x34,0x35,
+ 0x36,0x37,0x38,0x5d,0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,
+ 0x6e,0x5d,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,
+ 0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,
+ 0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x22,0x5b,0x22,0x20,0x2e,0x2e,0x20,0x28,0x74,0x79,0x70,0x65,0x28,0x6e,0x61,
+ 0x6d,0x65,0x29,0x20,0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20,
+ 0x61,0x6e,0x64,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x25,0x71,0x22,
+ 0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x20,0x6f,0x72,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x6e,0x61,0x6d,0x65,0x29,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,
+ 0x22,0x0a,0x65,0x6e,0x64,0x0a,0x4d,0x2e,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x20,0x3d,
+ 0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,
+ 0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x0a,0x0a,0x2d,0x2d,0x20,0x55,0x73,0x65,0x64,
+ 0x20,0x74,0x6f,0x20,0x73,0x74,0x6f,0x72,0x65,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,
+ 0x78,0x20,0x6b,0x65,0x79,0x73,0x20,0x28,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68,
+ 0x61,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x61,0x6e,0x64,0x20,0x6e,0x75,
+ 0x6d,0x62,0x65,0x72,0x29,0x20,0x61,0x73,0x20,0x74,0x68,0x65,0x79,0x20,0x63,0x61,
+ 0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x70,0x61,0x73,0x73,0x65,0x64,0x20,0x69,
+ 0x6e,0x20,0x74,0x65,0x78,0x74,0x0a,0x2d,0x2d,0x20,0x46,0x6f,0x72,0x20,0x74,0x68,
+ 0x65,0x73,0x65,0x20,0x6b,0x65,0x79,0x73,0x2c,0x20,0x74,0x68,0x65,0x20,0x72,0x65,
+ 0x73,0x75,0x6c,0x74,0x69,0x6e,0x67,0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,
+ 0x6f,0x6e,0x20,0x77,0x69,0x6c,0x6c,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x74,
+ 0x68,0x65,0x20,0x6b,0x65,0x79,0x20,0x69,0x74,0x73,0x65,0x6c,0x66,0x20,0x62,0x75,
+ 0x74,0x20,0x22,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b,0x2e,0x2e,0x2e,
+ 0x5d,0x22,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x6b,0x65,0x79,0x5f,
+ 0x63,0x61,0x63,0x68,0x65,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6d,0x61,
+ 0x70,0x70,0x65,0x64,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x61,0x62,
+ 0x6c,0x65,0x20,0x74,0x6f,0x20,0x72,0x65,0x73,0x6f,0x6c,0x76,0x65,0x20,0x6b,0x65,
+ 0x79,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x6c,0x79,0x2e,0x0a,0x4d,0x2e,0x6b,
+ 0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,
+ 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x6e,0x3d,0x30,0x20,0x7d,0x2c,
+ 0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x22,0x76,0x22,0x20,
+ 0x7d,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x74,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x74,0x79,0x70,0x65,0x28,0x6e,0x61,0x6d,
+ 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x6e,0x61,0x6d,0x65,0x20,
+ 0x3d,0x3d,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,
+ 0x22,0x25,0x71,0x22,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x3d,0x20,
+ 0x22,0x6e,0x75,0x6d,0x62,0x65,0x72,0x22,0x20,0x6f,0x72,0x20,0x74,0x6e,0x61,0x6d,
+ 0x65,0x20,0x3d,0x3d,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x22,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,
+ 0x73,0x65,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78,0x20,0x6b,0x65,
+ 0x79,0x2c,0x20,0x75,0x73,0x65,0x20,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,
+ 0x20,0x66,0x6f,0x72,0x20,0x6c,0x6f,0x6f,0x6b,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x20,0x3d,0x20,0x4d,0x2e,
+ 0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2e,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x4d,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b,
+ 0x69,0x5d,0x20,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x4d,0x2e,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x2e,0x6e,0x20,
+ 0x3d,0x20,0x69,0x2b,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x22,0x6b,0x65,0x79,0x5f,0x63,0x61,0x63,0x68,0x65,0x5b,
+ 0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x69,0x29,0x2e,0x2e,
+ 0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x20,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x61,0x20,
+ 0x75,0x73,0x61,0x62,0x6c,0x65,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x0a,0x2d,0x2d,0x20,
+ 0x42,0x61,0x73,0x65,0x64,0x20,0x6f,0x6e,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,
+ 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x61,0x6e,0x64,0x20,0x6b,0x65,0x79,
+ 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,
+ 0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x4c,0x75,0x61,0x20,0x65,0x78,0x70,0x72,0x65,
+ 0x73,0x73,0x69,0x6f,0x6e,0x2e,0x0a,0x2d,0x2d,0x20,0x4b,0x65,0x79,0x20,0x63,0x61,
+ 0x6e,0x20,0x62,0x65,0x20,0x61,0x6e,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x28,
+ 0x61,0x73,0x20,0x61,0x6e,0x79,0x74,0x68,0x69,0x6e,0x67,0x20,0x63,0x61,0x6e,0x20,
+ 0x61,0x63,0x74,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6b,0x65,0x79,
+ 0x29,0x2e,0x20,0x49,0x66,0x20,0x69,0x74,0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x62,0x65,0x20,0x73,0x65,0x72,0x69,0x61,0x6c,0x69,0x7a,0x65,0x64,
+ 0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x6e,
+ 0x75,0x6d,0x62,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x62,0x6f,0x6f,0x6c,0x65,0x61,
+ 0x6e,0x20,0x63,0x61,0x6e,0x29,0x2c,0x20,0x69,0x74,0x20,0x77,0x69,0x6c,0x6c,0x20,
+ 0x62,0x65,0x20,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x6c,0x79,0x0a,0x2d,0x2d,
+ 0x20,0x73,0x74,0x6f,0x72,0x65,0x64,0x20,0x69,0x6e,0x20,0x61,0x6e,0x20,0x69,0x6e,
+ 0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x74,0x6f,0x20,
+ 0x62,0x65,0x20,0x72,0x65,0x74,0x72,0x69,0x65,0x76,0x65,0x64,0x20,0x6c,0x61,0x74,
+ 0x65,0x72,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x50,0x61,0x72,
+ 0x65,0x6e,0x74,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6b,0x65,0x79,0x20,0x54,0x68,0x65,0x20,0x63,
+ 0x68,0x69,0x6c,0x64,0x20,0x6b,0x65,0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x6e,0x65,
+ 0x72,0x61,0x74,0x65,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x66,0x6f,
+ 0x72,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x23,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x20,0x41,0x20,0x76,0x61,0x6c,0x69,0x64,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,
+ 0x0a,0x2d,0x2d,0x20,0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,
+ 0x61,0x72,0x65,0x6e,0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,
+ 0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x6d,
+ 0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b,0x65,
+ 0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x28,0x70,0x61,0x72,0x65,0x6e,0x74,
+ 0x2c,0x20,0x6b,0x65,0x79,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22,0x20,
+ 0x2e,0x2e,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28,
+ 0x6b,0x65,0x79,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,
+ 0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x0a,
+ 0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20,
+ 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x20,0x2d,0x2d,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,
+ 0x73,0x2e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x20,0x20,0x3d,0x20,0x64,0x65,0x66,
+ 0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,
+ 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x62,0x6f,0x6f,0x6c,
+ 0x65,0x61,0x6e,0x20,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,
+ 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,
+ 0x63,0x74,0x6f,0x72,0x73,0x5b,0x22,0x6e,0x69,0x6c,0x22,0x5d,0x20,0x20,0x20,0x3d,
+ 0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,
+ 0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75,
+ 0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69,
+ 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x74,0x68,0x72,0x65,0x61,0x64,
+ 0x20,0x20,0x20,0x3d,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,
+ 0x70,0x65,0x63,0x74,0x6f,0x72,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x73,0x2e,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x20,0x3d,0x20,0x64,
+ 0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,
+ 0x20,0x2d,0x2d,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x73,0x20,0x33,0x72,0x64,0x20,0x70,
+ 0x61,0x72,0x74,0x79,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20,
+ 0x74,0x6f,0x20,0x75,0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x66,0x61,0x75,
+ 0x6c,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x69,0x66,0x20,
+ 0x6e,0x65,0x65,0x64,0x65,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,
+ 0x74,0x6f,0x72,0x73,0x2e,0x75,0x73,0x65,0x72,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x28,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e,
+ 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x29,0x20,0x2d,0x2d,0x20,0x64,0x72,0x6f,0x70,0x20,
+ 0x73,0x65,0x63,0x6f,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,
+ 0x63,0x74,0x6f,0x72,0x73,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x65,0x73,
+ 0x63,0x61,0x70,0x65,0x20,0x6c,0x69,0x6e,0x65,0x62,0x72,0x65,0x61,0x6b,0x73,0x20,
+ 0x61,0x73,0x20,0x5c,0x6e,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,0x20,0x61,0x73,
+ 0x20,0x5c,0x3c,0x30,0x78,0x30,0x41,0x3e,0x20,0x6c,0x69,0x6b,0x65,0x20,0x25,0x71,
+ 0x20,0x64,0x6f,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,
+ 0x2c,0x20,0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x2c,0x20,0x73,0x66,0x6f,0x72,
+ 0x6d,0x61,0x74,0x28,0x22,0x25,0x71,0x22,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x29,
+ 0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x5c,0x5c,0x6e,0x22,0x2c,0x20,0x22,0x5c,
+ 0x5c,0x6e,0x22,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69,
+ 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x22,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,
+ 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,
+ 0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x22,0x6e,0x53,0x66,0x6c,0x75,0x22,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x77,0x68,0x61,0x74,0x20,0x7e,
+ 0x3d,0x20,0x22,0x43,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x63,0x72,0x65,
+ 0x61,0x74,0x65,0x20,0x61,0x20,0x66,0x61,0x6e,0x63,0x79,0x20,0x72,0x65,0x70,0x72,
+ 0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x66,0x20,0x70,0x6f,
+ 0x73,0x73,0x69,0x62,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x69,0x6e,0x66,0x6f,
+ 0x2e,0x6e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x61,0x6e,0x64,0x20,0x66,0x61,0x6e,
+ 0x63,0x79,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x72,0x65,0x70,0x72,0x28,0x76,0x61,0x6c,
+ 0x75,0x65,0x2c,0x20,0x69,0x6e,0x66,0x6f,0x29,0x20,0x6f,0x72,0x20,0x74,0x6f,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,
+ 0x22,0x40,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x72,0x65,0x70,0x72,
+ 0x20,0x2e,0x2e,0x20,0x22,0x5c,0x6e,0x22,0x20,0x2e,0x2e,0x20,0x70,0x6c,0x61,0x74,
+ 0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28,0x22,0x40,0x22,
+ 0x20,0x2e,0x2e,0x20,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,
+ 0x20,0x2e,0x2e,0x20,0x22,0x5c,0x6e,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x6c,0x69,0x6e,0x65,0x64,0x65,
+ 0x66,0x69,0x6e,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x20,
+ 0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,
+ 0x65,0x2c,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x4c,0x75,
+ 0x61,0x29,0x22,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,
+ 0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,
+ 0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,
+ 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x22,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x22,
+ 0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,
+ 0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,
+ 0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x28,0x35,0x2e,0x31,0x20,0x6f,0x6e,
+ 0x6c,0x79,0x29,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,
+ 0x69,0x73,0x20,0x64,0x75,0x6d,0x70,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x69,
+ 0x66,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,
+ 0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x65,0x6e,
+ 0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x6e,
+ 0x6f,0x74,0x20,0x61,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,0x74,0x20,0x62,0x65,0x68,
+ 0x61,0x76,0x69,0x6f,0x72,0x3a,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,
+ 0x6e,0x74,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x64,0x75,0x6d,
+ 0x70,0x65,0x64,0x20,0x69,0x66,0x20,0x69,0x73,0x20,0x64,0x69,0x66,0x66,0x65,0x72,
+ 0x65,0x6e,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,
+ 0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x6f,0x6e,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x65,0x6e,0x76,0x20,
+ 0x3d,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x20,0x61,0x6e,0x64,0x20,0x67,0x65,
+ 0x74,0x66,0x65,0x6e,0x76,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x66,0x65,0x6e,0x76,0x20,0x61,0x6e,0x64,0x20,0x66,0x65,0x6e,
+ 0x76,0x20,0x7e,0x3d,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x30,0x29,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x4d,0x2e,
+ 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x22,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,
+ 0x6d,0x65,0x6e,0x74,0x22,0x2c,0x20,0x66,0x65,0x6e,0x76,0x2c,0x20,0x70,0x72,0x6f,
+ 0x70,0x2c,0x20,0x22,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x5b,
+ 0x22,0x2e,0x2e,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x2e,0x2e,0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x66,0x65,0x6e,0x76,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,
+ 0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22,0x73,0x70,0x65,0x63,0x69,
+ 0x61,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,
+ 0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x73,0x2e,0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,
+ 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,
+ 0x6f,0x70,0x2c,0x20,0x69,0x73,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x3d,0x20,0x6d,
+ 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x5f,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,
+ 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,
+ 0x70,0x20,0x6f,0x72,0x20,0x69,0x73,0x63,0x75,0x73,0x74,0x6f,0x6d,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x20,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x74,0x65,0x72,0x61,
+ 0x74,0x65,0x20,0x6f,0x76,0x65,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,0x64,0x65,0x74,0x65,0x63,0x74,0x20,
+ 0x61,0x72,0x72,0x61,0x79,0x73,0x20,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x73,0x61,
+ 0x6d,0x65,0x20,0x74,0x69,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e,
+ 0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x63,
+ 0x69,0x72,0x63,0x75,0x6d,0x76,0x65,0x6e,0x74,0x20,0x5f,0x5f,0x70,0x61,0x69,0x72,
+ 0x73,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,0x69,0x6e,0x20,
+ 0x35,0x2e,0x32,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x73,
+ 0x61,0x72,0x72,0x61,0x79,0x2c,0x20,0x69,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,
+ 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,
+ 0x6e,0x20,0x6e,0x65,0x78,0x74,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e,
+ 0x69,0x6c,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,
+ 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,
+ 0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x6b,
+ 0x29,0x2c,0x20,0x76,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x6d,0x61,0x6b,0x65,
+ 0x5f,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x28,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x2c,0x20,0x6b,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x64,0x65,0x74,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x3a,0x20,0x6b,0x65,0x79,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,
+ 0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x62,0x79,
+ 0x20,0x31,0x2e,0x2e,0x6e,0x20,0x6b,0x65,0x79,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x73,0x61,0x72,0x72,0x61,0x79,0x20,0x3d,0x20,0x69,0x73,0x61,
+ 0x72,0x72,0x61,0x79,0x20,0x61,0x6e,0x64,0x20,0x72,0x61,0x77,0x67,0x65,0x74,0x28,
+ 0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x69,0x29,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x20,0x3d,0x20,0x69,0x20,0x2b,
+ 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x74,0x61,0x62,0x6c,0x65,0x73,0x20,0x61,
+ 0x72,0x65,0x20,0x63,0x6f,0x6e,0x73,0x69,0x64,0x65,0x72,0x65,0x64,0x20,0x61,0x73,
+ 0x20,0x74,0x61,0x62,0x6c,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,
+ 0x73,0x61,0x72,0x72,0x61,0x79,0x20,0x61,0x6e,0x64,0x20,0x69,0x20,0x3e,0x20,0x31,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,
+ 0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x22,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,
+ 0x22,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x4d,0x2e,0x69,0x6e,
+ 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x4d,0x55,0x4c,0x54,0x49,0x56,0x41,
+ 0x4c,0x5f,0x4d,0x54,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,
+ 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x76,0x61,0x6c,0x75,0x65,0x2e,0x6e,0x20,0x3d,
+ 0x3d,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x69,0x72,0x65,0x63,
+ 0x74,0x6c,0x79,0x20,0x74,0x68,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x61,0x73,
+ 0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b,0x31,0x5d,0x2c,
+ 0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,
+ 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x72,0x61,0x70,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x73,0x20,0x69,0x6e,0x73,0x69,0x64,0x65,0x20,0x61,0x20,0x6d,0x75,0x6c,0x74,
+ 0x69,0x76,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,
+ 0x70,0x20,0x3d,0x20,0x4d,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x22,0x6d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x22,0x2c,
+ 0x20,0x22,0x22,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,
+ 0x76,0x61,0x6c,0x75,0x65,0x2e,0x6e,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,
+ 0x62,0x6c,0x65,0x5f,0x6b,0x65,0x79,0x28,0x69,0x29,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x5b,0x69,0x5d,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x75,0x6c,0x6c,
+ 0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22,0x20,0x2e,0x2e,0x20,0x69,
+ 0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,
+ 0x72,0x6e,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x20,0x2d,0x2d,0x0a,0x0a,
+ 0x2d,0x2d,0x20,0x55,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,
+ 0x63,0x74,0x20,0x22,0x6d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x22,0x20,0x6f,0x72,
+ 0x20,0x22,0x76,0x61,0x72,0x61,0x72,0x67,0x22,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,
+ 0x2e,0x20,0x54,0x68,0x65,0x20,0x74,0x79,0x70,0x69,0x63,0x61,0x6c,0x20,0x75,0x73,
+ 0x65,0x20,0x69,0x73,0x20,0x74,0x6f,0x20,0x70,0x61,0x63,0x6b,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x28,0x73,0x29,0x20,
+ 0x69,0x6e,0x20,0x61,0x20,0x73,0x69,0x6e,0x67,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x20,0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x2e,
+ 0x20,0x54,0x68,0x65,0x20,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x20,0x69,0x6e,
+ 0x73,0x74,0x61,0x6e,0x63,0x65,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x70,
+ 0x61,0x73,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,
+ 0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x73,0x20,0x61,0x20,0x73,0x69,0x6e,0x67,
+ 0x6c,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x74,0x68,0x65,0x79,0x20,0x77,
+ 0x69,0x6c,0x6c,0x20,0x62,0x65,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x72,0x65,0x63,
+ 0x74,0x6c,0x79,0x20,0x72,0x65,0x70,0x6f,0x72,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x4d,0x75,0x6c,0x74,0x69,0x76,0x61,0x6c,0x28,0x2e,0x2e,0x2e,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,
+ 0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x6e,0x3d,0x73,0x65,
+ 0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x2c,0x20,
+ 0x2e,0x2e,0x2e,0x20,0x7d,0x2c,0x20,0x4d,0x55,0x4c,0x54,0x49,0x56,0x41,0x4c,0x5f,
+ 0x4d,0x54,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x4d,0x61,0x6b,
+ 0x65,0x73,0x20,0x61,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x66,0x6f,
+ 0x72,0x6d,0x20,0x61,0x20,0x6e,0x61,0x6d,0x65,0x2f,0x76,0x61,0x6c,0x75,0x65,0x20,
+ 0x70,0x61,0x69,0x72,0x20,0x28,0x61,0x6e,0x64,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x29,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,
+ 0x2a,0x2a,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x2a,0x2a,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x73,0x68,0x6f,0x75,0x6c,
+ 0x64,0x20,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x62,0x79,
+ 0x20,0x33,0x72,0x64,0x20,0x70,0x61,0x72,0x74,0x79,0x20,0x69,0x6e,0x73,0x70,0x65,
+ 0x63,0x74,0x6f,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,
+ 0x20,0x23,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x63,0x78,0x74,0x5f,0x69,0x64,0x20,
+ 0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x49,0x44,0x20,0x69,0x6e,0x20,0x77,0x68,
+ 0x69,0x63,0x68,0x20,0x74,0x68,0x69,0x73,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x72,
+ 0x65,0x73,0x69,0x64,0x65,0x73,0x20,0x28,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75,
+ 0x6e,0x64,0x20,0x62,0x75,0x67,0x20,0x33,0x35,0x32,0x33,0x31,0x36,0x29,0x0a,0x2d,
+ 0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x54,
+ 0x68,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6e,0x61,0x6d,0x65,
+ 0x20,0x54,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x73,0x73,0x6f,0x63,0x69,
+ 0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,
+ 0x20,0x70,0x61,0x73,0x73,0x65,0x64,0x20,0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x73,0x6f,0x20,0x69,0x74,0x20,
+ 0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x61,0x6e,0x79,0x74,0x68,0x69,0x6e,0x67,0x0a,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x41,0x20,0x4c,0x75,0x61,
+ 0x20,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x65,
+ 0x76,0x61,0x6c,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x61,0x74,0x20,
+ 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x61,0x67,0x61,0x69,0x6e,0x20,0x28,
+ 0x69,0x66,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64,
+ 0x20,0x61,0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6c,0x79,0x29,0x0a,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d,0x62,0x65,
+ 0x72,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x54,0x68,0x65,0x20,0x6d,0x61,0x78,0x69,
+ 0x6d,0x75,0x6d,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x64,0x65,0x70,
+ 0x74,0x68,0x20,0x28,0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x76,0x65,0x20,0x63,0x61,
+ 0x6c,0x6c,0x73,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,
+ 0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,
+ 0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x20,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,
+ 0x20,0x74,0x6f,0x20,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x0a,0x2d,0x2d,0x20,0x40,
+ 0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d,0x62,0x65,0x72,0x20,0x70,0x61,
+ 0x67,0x65,0x20,0x54,0x68,0x65,0x20,0x70,0x61,0x67,0x65,0x20,0x74,0x6f,0x20,0x67,
+ 0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x28,0x30,0x20,0x62,0x61,0x73,0x65,0x64,
+ 0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x23,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x20,0x4f,
+ 0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x2c,0x20,0x69,0x66,0x20,0x73,0x65,0x74,0x2c,
+ 0x20,0x74,0x68,0x65,0x20,0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x20,0x73,0x69,0x7a,
+ 0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,
+ 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x28,
+ 0x69,0x6e,0x20,0x62,0x79,0x74,0x65,0x73,0x29,0x0a,0x2d,0x2d,0x20,0x40,0x70,0x61,
+ 0x72,0x61,0x6d,0x20,0x23,0x62,0x6f,0x6f,0x6c,0x65,0x61,0x6e,0x20,0x73,0x61,0x66,
+ 0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x49,0x66,0x20,0x74,0x72,0x75,0x65,0x2c,0x20,
+ 0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x20,
+ 0x74,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c,
+ 0x65,0x20,0x6b,0x65,0x79,0x0a,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x23,0x44,0x42,0x47,0x50,0x50,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x72,
+ 0x6f,0x6f,0x74,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x20,
+ 0x40,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x70,0x61,0x72,0x65,0x6e,
+ 0x74,0x3d,0x23,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,0x74,0x72,
+ 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5d,0x20,0x6d,0x61,0x6b,0x65,0x5f,
+ 0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x0a,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x20,
+ 0x42,0x55,0x47,0x20,0x45,0x43,0x4c,0x49,0x50,0x53,0x45,0x20,0x54,0x4f,0x4f,0x4c,
+ 0x53,0x4c,0x49,0x4e,0x55,0x58,0x2d,0x39,0x39,0x20,0x33,0x35,0x32,0x33,0x31,0x36,
+ 0x20,0x3a,0x20,0x61,0x73,0x20,0x61,0x20,0x77,0x6f,0x72,0x6b,0x61,0x72,0x6f,0x75,
+ 0x6e,0x64,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x69,0x73,0x20,0x65,
+ 0x6e,0x63,0x6f,0x64,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,
+ 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x79,0x0a,0x4d,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x79,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x78,0x74,
+ 0x5f,0x69,0x64,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e,0x61,0x6d,0x65,
+ 0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x64,0x65,0x70,0x74,
+ 0x68,0x2c,0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x2c,0x20,0x70,0x61,0x67,
+ 0x65,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x2c,0x20,0x73,
+ 0x61,0x66,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,
+ 0x65,0x20,0x6f,0x72,0x20,0x22,0x28,0x2e,0x2e,0x2e,0x29,0x5b,0x22,0x20,0x2e,0x2e,
+ 0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x5f,0x6b,0x65,0x79,0x28,0x6e,0x61,
+ 0x6d,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x61,0x66,0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x67,0x65,0x6e,0x65,
+ 0x72,0x61,0x74,0x65,0x5f,0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x5f,0x6b,
+ 0x65,0x79,0x28,0x6e,0x61,0x6d,0x65,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,
+ 0x72,0x20,0x3d,0x20,0x63,0x6f,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,
+ 0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x29,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x3d,0x20,
+ 0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x6f,
+ 0x6f,0x74,0x6e,0x6f,0x64,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x3d,0x20,0x74,0x72,0x75,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x6f,0x64,0x65,
+ 0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x3d,0x20,0x70,0x61,0x67,0x65,0x20,0x2a,
+ 0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x64,
+ 0x65,0x73,0x20,0x74,0x6f,0x20,0x73,0x6b,0x69,0x70,0x20,0x61,0x74,0x20,0x72,0x6f,
+ 0x6f,0x74,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x74,0x6f,0x20,0x72,0x65,0x73,0x70,
+ 0x65,0x63,0x74,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,
+ 0x65,0x5f,0x70,0x72,0x65,0x66,0x69,0x78,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x63,0x78,0x74,0x5f,0x69,0x64,0x29,0x2e,0x2e,0x22,0x7c,0x22,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74,0x72,0x75,0x65,
+ 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x2c,0x20,
+ 0x64,0x61,0x74,0x61,0x74,0x79,0x70,0x65,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20,
+ 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,
+ 0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x72,0x65,0x73,0x75,
+ 0x6d,0x65,0x28,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x2c,0x20,0x63,0x61,
+ 0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x61,0x6e,0x64,0x20,0x70,0x72,0x6f,0x70,
+ 0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,
+ 0x5d,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x6e,0x61,0x6c,0x69,0x7a,0x65,0x20,0x61,
+ 0x6e,0x64,0x20,0x70,0x6f,0x70,0x20,0x61,0x6c,0x6c,0x20,0x66,0x69,0x6e,0x69,0x73,
+ 0x68,0x65,0x64,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x69,0x65,0x73,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x70,0x72,0x6f,
+ 0x70,0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,
+ 0x6b,0x5d,0x20,0x7e,0x3d,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x64,0x6f,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x74,0x6f,0x70,0x6f,0x70,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,
+ 0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x5d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x70,0x6f,
+ 0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,
+ 0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x72,0x61,0x77,0x62,0x36,0x34,0x28,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x5f,0x70,0x72,0x65,0x66,0x69,0x78,0x20,0x2e,0x2e,
+ 0x20,0x74,0x6f,0x70,0x6f,0x70,0x2e,0x61,0x74,0x74,0x72,0x2e,0x66,0x75,0x6c,0x6c,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,
+ 0x70,0x73,0x74,0x61,0x63,0x6b,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x28,0x67,0x65,
+ 0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x29,0x20,0x3d,0x3d,0x20,0x22,0x64,0x65,0x61,
+ 0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x70,0x72,0x6f,0x70,0x65,
+ 0x72,0x74,0x79,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,
+ 0x30,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,
+ 0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x70,0x61,0x67,0x65,0x73,0x69,
+ 0x7a,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x70,0x61,0x67,0x65,0x20,0x3d,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x61,0x6e,
+ 0x64,0x20,0x30,0x20,0x6f,0x72,0x20,0x70,0x61,0x67,0x65,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,
+ 0x64,0x61,0x74,0x61,0x74,0x79,0x70,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6e,0x61,0x6d,
+ 0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
+ 0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x22,0x62,0x61,0x73,0x65,
+ 0x36,0x34,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x23,0x72,0x65,0x70,0x72,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x73,
+ 0x69,0x7a,0x65,0x5f,0x6c,0x69,0x6d,0x69,0x74,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,
+ 0x70,0x72,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x20,0x73,0x69,0x7a,0x65,0x5f,0x6c,
+ 0x69,0x6d,0x69,0x74,0x29,0x20,0x6f,0x72,0x20,0x72,0x65,0x70,0x72,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,
+ 0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
+ 0x6e,0x20,0x3d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x6e,0x75,
+ 0x6d,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x28,0x70,0x61,0x72,
+ 0x65,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x2e,0x6e,0x75,0x6d,0x63,0x68,0x69,0x6c,
+ 0x64,0x72,0x65,0x6e,0x20,0x6f,0x72,0x20,0x30,0x29,0x20,0x2b,0x20,0x31,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61,
+ 0x6b,0x65,0x20,0x70,0x61,0x67,0x69,0x6e,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e,
+ 0x74,0x6f,0x20,0x61,0x63,0x63,0x6f,0x6e,0x74,0x20,0x74,0x6f,0x20,0x6b,0x6e,0x6f,
+ 0x77,0x20,0x69,0x66,0x20,0x6e,0x6f,0x64,0x65,0x20,0x6e,0x65,0x65,0x64,0x73,0x20,
+ 0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x74,0x63,0x68,0x65,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74,0x63,0x68,0x74,
+ 0x68,0x69,0x73,0x20,0x3d,0x20,0x23,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x3c,0x3d,
+ 0x20,0x70,0x61,0x67,0x65,0x73,0x69,0x7a,0x65,0x20,0x61,0x6e,0x64,0x20,0x23,0x70,
+ 0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x3c,0x3d,0x20,0x64,0x65,0x70,0x74,
+ 0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x72,0x6f,0x6f,0x74,0x6e,
+ 0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,
+ 0x69,0x73,0x20,0x3d,0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x61,
+ 0x6e,0x64,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x3c,
+ 0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,
+ 0x3d,0x20,0x6e,0x6f,0x64,0x65,0x73,0x74,0x6f,0x73,0x6b,0x69,0x70,0x20,0x2d,0x20,
+ 0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x61,0x64,0x64,0x20,0x6e,0x6f,0x64,0x65,0x20,0x74,0x6f,0x20,0x74,0x72,0x65,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x63,0x61,0x74,0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,
+ 0x72,0x65,0x6e,0x74,0x5b,0x23,0x70,0x61,0x72,0x65,0x6e,0x74,0x20,0x2b,0x20,0x31,
+ 0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,
+ 0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x2b,0x20,0x31,0x5d,
+ 0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x6f,0x6f,0x74,0x6e,0x6f,0x64,0x65,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x61,0x74,
+ 0x63,0x68,0x74,0x68,0x69,0x73,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x73,0x74,
+ 0x61,0x63,0x6b,0x5b,0x23,0x70,0x72,0x6f,0x70,0x73,0x74,0x61,0x63,0x6b,0x20,0x2b,
+ 0x20,0x31,0x5d,0x20,0x3d,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x6f,0x6f,0x74,0x6e,
+ 0x6f,0x64,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,
+ 0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,
+ 0x69,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,
+ 0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67,
+ 0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,
+ 0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x32,0x2d,
+ 0x32,0x30,0x31,0x33,0x20,0x4a,0x75,0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67,
+ 0x61,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,
+ 0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,
+ 0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,
+ 0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,
+ 0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,
+ 0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,
+ 0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,
+ 0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,
+ 0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,
+ 0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,
+ 0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,
+ 0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,
+ 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,
+ 0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,
+ 0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x20,0x20,0x20,0x4a,0x75,0x6c,0x69,0x65,0x6e,0x20,0x44,0x65,0x73,0x67,
+ 0x61,0x74,0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,
+ 0x49,0x20,0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,
+ 0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54,0x20,0x63,
+ 0x64,0x61,0x74,0x61,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x6c,0x69,0x62,0x72,0x61,0x72,0x79,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x20,
+ 0x6b,0x6e,0x6f,0x77,0x6e,0x20,0x69,0x73,0x73,0x75,0x65,0x73,0x3a,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x2a,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x61,
+ 0x72,0x65,0x20,0x64,0x65,0x2d,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64,
+ 0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x69,0x66,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,
+ 0x74,0x5f,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x69,0x73,0x20,
+ 0x75,0x6e,0x73,0x65,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x2a,0x20,0x69,0x73,0x20,0x61,
+ 0x75,0x74,0x6f,0x6d,0x61,0x74,0x69,0x63,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,
+ 0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x64,
+ 0x65,0x2d,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x69,0x6e,0x67,0x20,0x69,0x73,
+ 0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x3f,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x6f,0x72,0x20,0x66,0x69,0x72,0x73,
+ 0x74,0x20,0x69,0x74,0x65,0x6d,0x20,0x69,0x6e,0x20,0x63,0x61,0x73,0x65,0x20,0x6f,
+ 0x66,0x20,0x61,0x72,0x72,0x61,0x79,0x73,0x29,0x2e,0x20,0x50,0x6f,0x73,0x73,0x69,
+ 0x62,0x6c,0x65,0x20,0x6c,0x65,0x61,0x64,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x74,0x61,0x63,0x6b,0x6f,0x76,0x65,
+ 0x72,0x66,0x6c,0x6f,0x77,0x2e,0x63,0x6f,0x6d,0x2f,0x71,0x75,0x65,0x73,0x74,0x69,
+ 0x6f,0x6e,0x73,0x2f,0x37,0x31,0x33,0x34,0x35,0x39,0x30,0x2f,0x68,0x6f,0x77,0x2d,
+ 0x74,0x6f,0x2d,0x74,0x65,0x73,0x74,0x2d,0x69,0x66,0x2d,0x61,0x6e,0x2d,0x61,0x64,
+ 0x64,0x72,0x65,0x73,0x73,0x2d,0x69,0x73,0x2d,0x72,0x65,0x61,0x64,0x61,0x62,0x6c,
+ 0x65,0x2d,0x69,0x6e,0x2d,0x6c,0x69,0x6e,0x75,0x78,0x2d,0x75,0x73,0x65,0x72,0x73,
+ 0x70,0x61,0x63,0x65,0x2d,0x61,0x70,0x70,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x68,
+ 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x73,0x6f,0x66,0x74,0x77,0x61,
+ 0x72,0x65,0x76,0x65,0x72,0x69,0x66,0x79,0x2e,0x63,0x6f,0x6d,0x2f,0x62,0x6c,0x6f,
+ 0x67,0x2f,0x3f,0x70,0x3d,0x33,0x31,0x39,0x0a,0x2d,0x2d,0x20,0x20,0x2a,0x20,0x77,
+ 0x68,0x65,0x6e,0x20,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x20,0x61,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x20,0x66,0x72,0x6f,0x6d,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,
+ 0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x79,0x70,0x65,0x20,0x69,0x73,0x20,0x73,0x6f,
+ 0x6d,0x65,0x74,0x69,0x6d,0x65,0x73,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x64,0x20,
+ 0x28,0x65,0x2e,0x67,0x2e,0x20,0x69,0x6e,0x74,0x20,0x3d,0x3e,0x20,0x6e,0x75,0x6d,
+ 0x62,0x65,0x72,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x74,0x72,
+ 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,
+ 0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x69,0x6e,
+ 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x22,0x0a,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,
+ 0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,
+ 0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65,
+ 0x63,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x66,0x69,0x20,0x3d,0x20,
+ 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x66,0x66,0x69,0x22,0x0a,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x74,0x79,0x70,0x65,0x2c,0x20,0x61,
+ 0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,
+ 0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2c,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x74,0x79,
+ 0x70,0x65,0x2c,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x2c,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x2c,0x20,0x74,0x61,0x62,0x6c,0x65,
+ 0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,
+ 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x57,0x68,0x65,0x74,
+ 0x68,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,
+ 0x65,0x20,0x74,0x79,0x70,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x69,0x6e,0x73,0x70,
+ 0x65,0x63,0x74,0x65,0x64,0x2e,0x20,0x55,0x73,0x75,0x61,0x6c,0x6c,0x79,0x20,0x72,
+ 0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,
+ 0x20,0x62,0x65,0x20,0x73,0x61,0x66,0x65,0x20,0x28,0x61,0x74,0x20,0x6c,0x65,0x61,
+ 0x73,0x74,0x20,0x61,0x20,0x62,0x69,0x74,0x0a,0x2d,0x2d,0x20,0x73,0x61,0x66,0x65,
+ 0x72,0x20,0x74,0x68,0x61,0x6e,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x73,0x29,
+ 0x20,0x73,0x6f,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x69,0x6e,0x73,
+ 0x70,0x65,0x63,0x74,0x65,0x64,0x2e,0x20,0x49,0x66,0x20,0x61,0x20,0x72,0x65,0x66,
+ 0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x74,0x6f,
+ 0x20,0x75,0x6e,0x73,0x61,0x66,0x65,0x20,0x6d,0x65,0x6d,0x6f,0x72,0x79,0x2c,0x20,
+ 0x74,0x68,0x65,0x20,0x77,0x68,0x6f,0x6c,0x65,0x0a,0x2d,0x2d,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x63,0x72,0x61,0x73,0x68,
+ 0x20,0x21,0x0a,0x2d,0x2d,0x20,0x49,0x66,0x20,0x74,0x68,0x69,0x73,0x20,0x66,0x65,
+ 0x61,0x74,0x75,0x72,0x65,0x20,0x69,0x73,0x20,0x64,0x69,0x73,0x61,0x62,0x6c,0x65,
+ 0x64,0x2c,0x20,0x64,0x65,0x65,0x70,0x6c,0x79,0x20,0x6e,0x65,0x73,0x74,0x65,0x64,
+ 0x20,0x43,0x20,0x74,0x79,0x70,0x65,0x73,0x20,0x77,0x69,0x6c,0x6c,0x20,0x6e,0x6f,
+ 0x74,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x63,
+ 0x6f,0x72,0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x61,0x73,0x20,0x65,0x76,0x61,0x6c,
+ 0x75,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x68,0x61,0x73,0x20,0x61,0x20,
+ 0x72,0x65,0x63,0x75,0x72,0x73,0x69,0x6f,0x6e,0x20,0x6c,0x69,0x6d,0x69,0x74,0x2c,
+ 0x20,0x61,0x6e,0x79,0x20,0x66,0x75,0x72,0x74,0x68,0x65,0x72,0x20,0x65,0x76,0x61,
+ 0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e,0x65,0x20,
+ 0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,
+ 0x65,0x73,0x2e,0x0a,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x5f,0x72,0x65,
+ 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,
+ 0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,
+ 0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61,0x74,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6e,0x74,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x74,0x20,0x3d,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20,0x43,0x39,0x39,0x20,0x74,
+ 0x79,0x70,0x65,0x20,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,
+ 0x67,0x69,0x76,0x65,0x20,0x6d,0x6f,0x72,0x65,0x20,0x64,0x65,0x74,0x61,0x69,0x6c,
+ 0x73,0x20,0x61,0x62,0x6f,0x75,0x74,0x20,0x61,0x63,0x75,0x74,0x61,0x6c,0x20,0x74,
+ 0x79,0x70,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x74,0x20,0x3d,0x20,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x75,0x6e,0x73,0x69,0x67,
+ 0x6e,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x22,0x75,0x69,0x6e,0x74,0x22,0x20,0x6f,
+ 0x72,0x20,0x22,0x69,0x6e,0x74,0x22,0x29,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,
+ 0x2a,0x20,0x38,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5f,0x74,0x22,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
+ 0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x66,0x6c,0x6f,0x61,0x74,0x22,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x61,0x73,0x73,0x75,0x6d,0x65,0x20,0x49,0x45,0x45,0x45,0x37,0x35,0x34,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x3d,0x3d,0x20,0x20,0x38,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x64,0x6f,0x75,0x62,0x6c,0x65,
+ 0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x3d,0x3d,0x20,0x31,
+ 0x36,0x20,0x74,0x68,0x65,0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x6c,0x6f,0x6e,0x67,
+ 0x20,0x64,0x6f,0x75,0x62,0x6c,0x65,0x22,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x74,0x20,
+ 0x72,0x65,0x61,0x6c,0x6c,0x79,0x20,0x73,0x75,0x72,0x65,0x20,0x74,0x68,0x69,0x73,
+ 0x20,0x6f,0x6e,0x65,0x20,0x69,0x73,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x74,
+ 0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,
+ 0x22,0x73,0x74,0x72,0x75,0x63,0x74,0x22,0x20,0x6f,0x72,0x20,0x74,0x20,0x3d,0x3d,
+ 0x20,0x22,0x65,0x6e,0x75,0x6d,0x22,0x20,0x6f,0x72,0x20,0x74,0x20,0x3d,0x3d,0x20,
+ 0x22,0x75,0x6e,0x69,0x6f,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e,
+ 0x61,0x6d,0x65,0x20,0x61,0x6e,0x64,0x20,0x28,0x74,0x20,0x2e,0x2e,0x20,0x22,0x20,
+ 0x22,0x20,0x2e,0x2e,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e,0x61,0x6d,0x65,0x29,
+ 0x20,0x6f,0x72,0x20,0x28,0x22,0x61,0x6e,0x6f,0x6e,0x79,0x6d,0x6f,0x75,0x73,0x20,
+ 0x22,0x2e,0x2e,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,
+ 0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,0x66,0x75,0x6e,0x63,0x22,0x20,0x74,0x68,0x65,
+ 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,0x20,0x22,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x46,0x46,0x49,0x29,0x22,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,
+ 0x70,0x74,0x72,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x74,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,
+ 0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e,
+ 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x2a,0x22,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,
+ 0x72,0x65,0x66,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x74,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,
+ 0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e,
+ 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x26,0x22,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x74,0x20,0x3d,0x3d,0x20,0x22,
+ 0x66,0x69,0x65,0x6c,0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x6b,0x65,0x5f,
+ 0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,
+ 0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,
+ 0x74,0x20,0x3d,0x3d,0x20,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x20,0x3d,
+ 0x20,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x2e,0x75,0x6e,0x73,
+ 0x69,0x67,0x6e,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,0x22,0x75,0x6e,0x73,0x69,0x67,
+ 0x6e,0x65,0x64,0x22,0x20,0x6f,0x72,0x20,0x22,0x73,0x69,0x67,0x6e,0x65,0x64,0x22,
+ 0x29,0x20,0x2e,0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,
+ 0x2a,0x20,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x2e,0x63,0x6f,0x6e,0x73,0x74,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x74,0x20,0x3d,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x20,0x22,0x20,0x2e,0x2e,
+ 0x20,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x72,0x65,
+ 0x66,0x63,0x74,0x2e,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20,0x74,0x68,0x65,
+ 0x6e,0x20,0x74,0x20,0x3d,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20,
+ 0x22,0x20,0x2e,0x2e,0x20,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,
+ 0x69,0x66,0x20,0x63,0x64,0x61,0x74,0x61,0x6b,0x69,0x6e,0x64,0x20,0x69,0x73,0x20,
+ 0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x6f,0x6e,
+ 0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,0x6c,0x65,0x64,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,
+ 0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,
+ 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x6f,0x72,0x73,0x2e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x63,
+ 0x75,0x72,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x68,
+ 0x61,0x6e,0x64,0x6c,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x73,0x6f,0x6d,0x65,
+ 0x20,0x63,0x61,0x72,0x65,0x3a,0x20,0x69,0x66,0x20,0x77,0x65,0x20,0x63,0x61,0x6c,
+ 0x6c,0x20,0x72,0x65,0x67,0x75,0x6c,0x61,0x72,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,
+ 0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x77,0x65,0x20,0x6d,0x61,0x79,0x20,0x63,0x72,0x65,0x61,0x74,0x65,
+ 0x20,0x62,0x6f,0x78,0x65,0x64,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,
+ 0x73,0x20,0x6f,0x72,0x20,0x4c,0x75,0x61,0x20,0x6e,0x61,0x74,0x69,0x76,0x65,0x20,
+ 0x6f,0x62,0x6a,0x65,0x63,0x74,0x73,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x77,0x69,
+ 0x6c,0x6c,0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x65,0x64,0x20,
+ 0x61,0x73,0x20,0x73,0x75,0x63,0x68,0x0a,0x2d,0x2d,0x20,0x28,0x6c,0x65,0x61,0x64,
+ 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x77,0x72,0x6f,0x6e,0x67,0x20,0x74,0x79,0x70,
+ 0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x29,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x65,
+ 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,
+ 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,
+ 0x70,0x65,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x20,0x3d,0x3d,0x20,0x22,0x63,0x64,
+ 0x61,0x74,0x61,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,
+ 0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,
+ 0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,
+ 0x6f,0x70,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,
+ 0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x2e,
+ 0x61,0x74,0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,
+ 0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x20,0x63,0x64,0x61,0x74,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x63,0x20,
+ 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x20,0x3d,0x20,0x7b,0x0a,
+ 0x20,0x20,0x20,0x20,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,
+ 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61,
+ 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,
+ 0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,
+ 0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x63,0x68,0x69,0x6c,0x64,
+ 0x72,0x65,0x6e,0x2c,0x20,0x69,0x66,0x20,0x6e,0x65,0x65,0x64,0x65,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x66,0x6f,0x72,0x20,0x6d,0x65,0x6d,0x62,0x65,0x72,0x20,0x69,0x6e,0x20,0x72,0x65,
+ 0x66,0x63,0x74,0x3a,0x6d,0x65,0x6d,0x62,0x65,0x72,0x73,0x28,0x29,0x20,0x64,0x6f,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6d,
+ 0x65,0x6d,0x62,0x65,0x72,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x63,0x75,0x72,
+ 0x73,0x65,0x28,0x6d,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b,
+ 0x6d,0x6e,0x61,0x6d,0x65,0x5d,0x2c,0x20,0x70,0x72,0x6f,0x70,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x73,0x66,0x6f,0x72,0x6d,0x61,
+ 0x74,0x28,0x27,0x5b,0x25,0x71,0x5d,0x27,0x2c,0x20,0x6d,0x6e,0x61,0x6d,0x65,0x29,
+ 0x2c,0x20,0x6d,0x65,0x6d,0x62,0x65,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x61,0x72,0x72,0x61,0x79,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x74,0x79,
+ 0x70,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,
+ 0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x66,0x6f,0x72,0x20,0x56,0x4c,0x41,0x73,0x2c,0x20,0x72,0x65,0x66,
+ 0x6c,0x65,0x63,0x74,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x67,0x69,
+ 0x76,0x65,0x20,0x73,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,0x7e,0x3d,0x20,0x22,0x6e,0x6f,0x6e,0x65,
+ 0x22,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,
+ 0x20,0x6f,0x72,0x20,0x66,0x66,0x69,0x2e,0x73,0x69,0x7a,0x65,0x6f,0x66,0x28,0x76,
+ 0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x69,
+ 0x7a,0x65,0x20,0x3d,0x20,0x73,0x69,0x7a,0x65,0x20,0x61,0x6e,0x64,0x20,0x28,0x73,
+ 0x69,0x7a,0x65,0x20,0x2f,0x20,0x65,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x7a,0x65,
+ 0x29,0x20,0x2d,0x2d,0x20,0x77,0x65,0x27,0x76,0x65,0x20,0x67,0x6f,0x74,0x20,0x74,
+ 0x68,0x65,0x20,0x62,0x79,0x74,0x65,0x20,0x73,0x69,0x7a,0x65,0x2c,0x20,0x6e,0x6f,
+ 0x74,0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x20,0x63,0x6f,0x75,0x6e,0x74,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,
+ 0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,
+ 0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x65,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,
+ 0x70,0x20,0x3d,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,
+ 0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,
+ 0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x22,0x5b,0x22,
+ 0x20,0x2e,0x2e,0x20,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x73,0x69,
+ 0x7a,0x65,0x29,0x20,0x6f,0x72,0x20,0x22,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5d,
+ 0x22,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,
+ 0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x61,0x6e,0x64,0x20,0x73,0x69,0x7a,0x65,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x30,0x2c,0x20,0x73,0x69,0x7a,0x65,0x2d,0x31,
+ 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,
+ 0x22,0x5b,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x69,0x29,
+ 0x2e,0x2e,0x22,0x5d,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x63,0x75,0x72,0x73,0x65,0x28,0x69,0x64,
+ 0x78,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x5b,0x69,0x5d,0x2c,0x20,0x70,0x72,0x6f,
+ 0x70,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x20,0x2e,0x2e,0x20,0x69,
+ 0x64,0x78,0x2c,0x20,0x65,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x72,0x67,
+ 0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x72,0x67,0x20,0x69,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x3a,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x28,0x29,0x20,0x64,0x6f,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x72,0x67,0x73,
+ 0x5b,0x23,0x61,0x72,0x67,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,0x20,0x6d,0x61,
+ 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x61,0x72,0x67,0x2e,
+ 0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x22,0x20,0x2e,0x2e,0x20,
+ 0x61,0x72,0x67,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x76,0x61,0x72,0x61,0x72,0x67,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x72,0x67,0x73,0x5b,0x23,0x61,0x72,0x67,0x73,0x20,0x2b,0x20,0x31,0x5d,0x20,0x3d,
+ 0x20,0x22,0x2e,0x2e,0x2e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,
+ 0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x5f,0x74,0x79,0x70,0x65,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x22,
+ 0x20,0x2e,0x2e,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6e,0x61,0x6d,0x65,0x20,0x2e,
+ 0x2e,0x20,0x22,0x28,0x22,0x20,0x2e,0x2e,0x20,0x74,0x63,0x6f,0x6e,0x63,0x61,0x74,
+ 0x28,0x61,0x72,0x67,0x73,0x2c,0x20,0x22,0x2c,0x20,0x22,0x29,0x20,0x2e,0x2e,0x20,
+ 0x22,0x29,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,
+ 0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,
+ 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,
+ 0x66,0x63,0x74,0x29,0x2c,0x20,0x72,0x65,0x70,0x72,0x2c,0x20,0x70,0x61,0x72,0x65,
+ 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x75,0x6d,
+ 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,
+ 0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,
+ 0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x72,0x65,0x70,0x72,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,
+ 0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,
+ 0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x69,
+ 0x6e,0x74,0x6f,0x20,0x65,0x6e,0x75,0x6d,0x20,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x69,0x73,
+ 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x61,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x20,
+ 0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,0x74,0x6f,0x20,0x6d,0x61,0x6b,0x65,0x20,0x69,
+ 0x74,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,
+ 0x76,0x61,0x6c,0x20,0x69,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x3a,0x76,0x61,0x6c,
+ 0x75,0x65,0x73,0x28,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x76,0x61,0x6c,0x2e,0x76,0x61,0x6c,0x75,
+ 0x65,0x20,0x3d,0x3d,0x20,0x72,0x65,0x70,0x72,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x70,0x72,0x20,0x3d,0x20,0x76,0x61,0x6c,0x2e,0x6e,0x61,0x6d,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
+ 0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61,
+ 0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,
+ 0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x72,0x65,0x70,
+ 0x72,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,
+ 0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,
+ 0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,
+ 0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x6d,0x61,0x79,0x20,0x62,0x65,0x20,
+ 0x75,0x6e,0x73,0x61,0x66,0x65,0x2c,0x20,0x73,0x65,0x65,0x20,0x69,0x6e,0x73,0x70,
+ 0x65,0x63,0x74,0x5f,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x73,
+ 0x65,0x74,0x74,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,
+ 0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,
+ 0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x5f,0x72,0x65,
+ 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x79,
+ 0x70,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,
+ 0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x20,0x3d,0x20,0x72,0x65,0x63,
+ 0x75,0x72,0x73,0x65,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,
+ 0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,
+ 0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x65,0x6c,0x65,0x6d,0x65,0x6e,
+ 0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x70,0x72,0x6f,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x70,0x2e,0x61,0x74,
+ 0x74,0x72,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x79,0x70,0x65,0x6e,0x61,
+ 0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x72,
+ 0x6f,0x70,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x6e,0x74,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,
+ 0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,
+ 0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,
+ 0x2c,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,0x28,
+ 0x72,0x65,0x66,0x63,0x74,0x29,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,
+ 0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,0x72,0x73,0x20,0x61,
+ 0x72,0x65,0x20,0x74,0x6f,0x6f,0x20,0x75,0x6e,0x73,0x61,0x66,0x65,0x2c,0x20,0x64,
+ 0x6f,0x20,0x6e,0x6f,0x74,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x74,0x68,
+ 0x65,0x6d,0x0a,0x20,0x20,0x20,0x20,0x70,0x74,0x72,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x74,0x72,0x6f,
+ 0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x6d,0x61,0x6b,0x65,0x5f,0x74,0x79,0x70,
+ 0x65,0x6e,0x61,0x6d,0x65,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x2c,0x20,0x74,0x6f,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x2c,0x20,0x70,
+ 0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x0a,0x69,0x6e,0x73,
+ 0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x75,0x6e,0x69,0x6f,0x6e,0x20,0x3d,0x20,
+ 0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x73,0x74,0x72,0x75,0x63,
+ 0x74,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x66,0x6c,0x6f,
+ 0x61,0x74,0x20,0x3d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,
+ 0x69,0x6e,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x66,0x6f,0x72,0x20,0x73,0x74,0x72,0x75,
+ 0x63,0x74,0x2f,0x75,0x6e,0x69,0x6f,0x6e,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,
+ 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x74,0x79,0x70,0x65,
+ 0x20,0x69,0x73,0x20,0x6e,0x65,0x73,0x74,0x65,0x64,0x20,0x69,0x6e,0x74,0x6f,0x20,
+ 0x74,0x68,0x65,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63,
+ 0x74,0x6f,0x72,0x73,0x2e,0x66,0x69,0x65,0x6c,0x64,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,
+ 0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x28,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x20,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,
+ 0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,
+ 0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x69,0x6e,
+ 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,
+ 0x64,0x20,0x3d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x73,0x2e,0x66,
+ 0x69,0x65,0x6c,0x64,0x0a,0x0a,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x6f,0x6e,
+ 0x6c,0x79,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c,0x20,0x6e,0x6f,0x74,0x20,0x63,
+ 0x74,0x79,0x70,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x46,0x49,0x58,0x4d,
+ 0x45,0x3a,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x61,0x75,0x73,0x65,0x20,0x72,0x65,
+ 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x64,
+ 0x65,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64,0x20,0x61,0x6e,0x64,0x20,
+ 0x63,0x72,0x61,0x73,0x68,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x63,0x65,0x73,
+ 0x73,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x77,0x72,
+ 0x6f,0x6e,0x67,0x20,0x21,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x66,0x69,
+ 0x2e,0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x20,0x7e,
+ 0x3d,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x20,0x6f,0x72,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x74,0x79,
+ 0x70,0x65,0x6f,0x66,0x28,0x76,0x61,0x6c,0x75,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x69,0x6e,0x73,0x70,
+ 0x65,0x63,0x74,0x6f,0x72,0x73,0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61,
+ 0x74,0x5d,0x20,0x6f,0x72,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x69,0x6e,
+ 0x73,0x70,0x65,0x63,0x74,0x6f,0x72,0x29,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,
+ 0x6c,0x6c,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x73,0x69,0x6d,0x70,0x6c,0x65,0x20,0x70,
+ 0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x20,0x66,0x6f,0x72,0x20,0x63,0x74,0x79,0x70,
+ 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6e,
+ 0x74,0x72,0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x70,0x72,0x6f,0x70,
+ 0x65,0x72,0x74,0x79,0x28,0x6e,0x61,0x6d,0x65,0x2c,0x20,0x22,0x63,0x74,0x79,0x70,
+ 0x65,0x22,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x76,0x61,0x6c,
+ 0x75,0x65,0x29,0x2c,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2c,0x20,0x66,0x75,0x6c,
+ 0x6c,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x69,0x6e,0x74,0x72,
+ 0x6f,0x73,0x70,0x65,0x63,0x74,0x69,0x6f,0x6e,0x2e,0x69,0x6e,0x73,0x70,0x65,0x63,
+ 0x74,0x6f,0x72,0x73,0x2e,0x63,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x69,0x6e,0x73,
+ 0x70,0x65,0x63,0x74,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x0a,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,
+ 0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,
+ 0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x70,0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,
+ 0x6c,0x65,0x63,0x74,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,
+ 0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,
+ 0x6c,0x75,0x67,0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65,
+ 0x63,0x74,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x5b,0x5b,0x20,0x4c,0x75,0x61,0x4a,0x49,0x54,
+ 0x20,0x46,0x46,0x49,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x4c,0x69,0x62,0x72,0x61,0x72,0x79,0x20,0x5d,0x5d,0x2d,0x2d,0x0a,0x2d,0x2d,0x5b,
+ 0x5b,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x43,0x29,0x20,
+ 0x32,0x30,0x31,0x33,0x20,0x50,0x65,0x74,0x65,0x72,0x20,0x43,0x61,0x77,0x6c,0x65,
+ 0x79,0x20,0x3c,0x6c,0x75,0x61,0x40,0x63,0x6f,0x72,0x73,0x69,0x78,0x2e,0x6f,0x72,
+ 0x67,0x3e,0x2e,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,
+ 0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x0a,0x0a,0x50,0x65,0x72,0x6d,0x69,0x73,
+ 0x73,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x68,0x65,0x72,0x65,0x62,0x79,0x20,0x67,
+ 0x72,0x61,0x6e,0x74,0x65,0x64,0x2c,0x20,0x66,0x72,0x65,0x65,0x20,0x6f,0x66,0x20,
+ 0x63,0x68,0x61,0x72,0x67,0x65,0x2c,0x20,0x74,0x6f,0x20,0x61,0x6e,0x79,0x20,0x70,
+ 0x65,0x72,0x73,0x6f,0x6e,0x20,0x6f,0x62,0x74,0x61,0x69,0x6e,0x69,0x6e,0x67,0x20,
+ 0x61,0x20,0x63,0x6f,0x70,0x79,0x0a,0x6f,0x66,0x20,0x74,0x68,0x69,0x73,0x20,0x73,
+ 0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x73,0x73,0x6f,
+ 0x63,0x69,0x61,0x74,0x65,0x64,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x61,
+ 0x74,0x69,0x6f,0x6e,0x20,0x66,0x69,0x6c,0x65,0x73,0x20,0x28,0x74,0x68,0x65,0x20,
+ 0x22,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x22,0x29,0x2c,0x20,0x74,0x6f,0x20,
+ 0x64,0x65,0x61,0x6c,0x0a,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74,
+ 0x77,0x61,0x72,0x65,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x72,0x65,0x73,
+ 0x74,0x72,0x69,0x63,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x69,0x6e,0x63,0x6c,0x75,0x64,
+ 0x69,0x6e,0x67,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x6c,0x69,0x6d,0x69,
+ 0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x72,0x69,0x67,0x68,0x74,
+ 0x73,0x0a,0x74,0x6f,0x20,0x75,0x73,0x65,0x2c,0x20,0x63,0x6f,0x70,0x79,0x2c,0x20,
+ 0x6d,0x6f,0x64,0x69,0x66,0x79,0x2c,0x20,0x6d,0x65,0x72,0x67,0x65,0x2c,0x20,0x70,
+ 0x75,0x62,0x6c,0x69,0x73,0x68,0x2c,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,
+ 0x74,0x65,0x2c,0x20,0x73,0x75,0x62,0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x2c,0x20,
+ 0x61,0x6e,0x64,0x2f,0x6f,0x72,0x20,0x73,0x65,0x6c,0x6c,0x0a,0x63,0x6f,0x70,0x69,
+ 0x65,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74,0x77,0x61,
+ 0x72,0x65,0x2c,0x20,0x61,0x6e,0x64,0x20,0x74,0x6f,0x20,0x70,0x65,0x72,0x6d,0x69,
+ 0x74,0x20,0x70,0x65,0x72,0x73,0x6f,0x6e,0x73,0x20,0x74,0x6f,0x20,0x77,0x68,0x6f,
+ 0x6d,0x20,0x74,0x68,0x65,0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x69,
+ 0x73,0x0a,0x66,0x75,0x72,0x6e,0x69,0x73,0x68,0x65,0x64,0x20,0x74,0x6f,0x20,0x64,
+ 0x6f,0x20,0x73,0x6f,0x2c,0x20,0x73,0x75,0x62,0x6a,0x65,0x63,0x74,0x20,0x74,0x6f,
+ 0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x63,
+ 0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x73,0x3a,0x0a,0x0a,0x54,0x68,0x65,0x20,
+ 0x61,0x62,0x6f,0x76,0x65,0x20,0x63,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,
+ 0x6e,0x6f,0x74,0x69,0x63,0x65,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x69,0x73,0x20,
+ 0x70,0x65,0x72,0x6d,0x69,0x73,0x73,0x69,0x6f,0x6e,0x20,0x6e,0x6f,0x74,0x69,0x63,
+ 0x65,0x20,0x73,0x68,0x61,0x6c,0x6c,0x20,0x62,0x65,0x20,0x69,0x6e,0x63,0x6c,0x75,
+ 0x64,0x65,0x64,0x20,0x69,0x6e,0x0a,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x70,0x69,0x65,
+ 0x73,0x20,0x6f,0x72,0x20,0x73,0x75,0x62,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x6c,
+ 0x20,0x70,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x2e,0x0a,0x0a,0x54,0x48,0x45,0x20,
+ 0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x20,0x49,0x53,0x20,0x50,0x52,0x4f,0x56,
+ 0x49,0x44,0x45,0x44,0x20,0x22,0x41,0x53,0x20,0x49,0x53,0x22,0x2c,0x20,0x57,0x49,
+ 0x54,0x48,0x4f,0x55,0x54,0x20,0x57,0x41,0x52,0x52,0x41,0x4e,0x54,0x59,0x20,0x4f,
+ 0x46,0x20,0x41,0x4e,0x59,0x20,0x4b,0x49,0x4e,0x44,0x2c,0x20,0x45,0x58,0x50,0x52,
+ 0x45,0x53,0x53,0x20,0x4f,0x52,0x0a,0x49,0x4d,0x50,0x4c,0x49,0x45,0x44,0x2c,0x20,
+ 0x49,0x4e,0x43,0x4c,0x55,0x44,0x49,0x4e,0x47,0x20,0x42,0x55,0x54,0x20,0x4e,0x4f,
+ 0x54,0x20,0x4c,0x49,0x4d,0x49,0x54,0x45,0x44,0x20,0x54,0x4f,0x20,0x54,0x48,0x45,
+ 0x20,0x57,0x41,0x52,0x52,0x41,0x4e,0x54,0x49,0x45,0x53,0x20,0x4f,0x46,0x20,0x4d,
+ 0x45,0x52,0x43,0x48,0x41,0x4e,0x54,0x41,0x42,0x49,0x4c,0x49,0x54,0x59,0x2c,0x0a,
+ 0x46,0x49,0x54,0x4e,0x45,0x53,0x53,0x20,0x46,0x4f,0x52,0x20,0x41,0x20,0x50,0x41,
+ 0x52,0x54,0x49,0x43,0x55,0x4c,0x41,0x52,0x20,0x50,0x55,0x52,0x50,0x4f,0x53,0x45,
+ 0x20,0x41,0x4e,0x44,0x20,0x4e,0x4f,0x4e,0x49,0x4e,0x46,0x52,0x49,0x4e,0x47,0x45,
+ 0x4d,0x45,0x4e,0x54,0x2e,0x20,0x20,0x49,0x4e,0x20,0x4e,0x4f,0x20,0x45,0x56,0x45,
+ 0x4e,0x54,0x20,0x53,0x48,0x41,0x4c,0x4c,0x20,0x54,0x48,0x45,0x0a,0x41,0x55,0x54,
+ 0x48,0x4f,0x52,0x53,0x20,0x4f,0x52,0x20,0x43,0x4f,0x50,0x59,0x52,0x49,0x47,0x48,
+ 0x54,0x20,0x48,0x4f,0x4c,0x44,0x45,0x52,0x53,0x20,0x42,0x45,0x20,0x4c,0x49,0x41,
+ 0x42,0x4c,0x45,0x20,0x46,0x4f,0x52,0x20,0x41,0x4e,0x59,0x20,0x43,0x4c,0x41,0x49,
+ 0x4d,0x2c,0x20,0x44,0x41,0x4d,0x41,0x47,0x45,0x53,0x20,0x4f,0x52,0x20,0x4f,0x54,
+ 0x48,0x45,0x52,0x0a,0x4c,0x49,0x41,0x42,0x49,0x4c,0x49,0x54,0x59,0x2c,0x20,0x57,
+ 0x48,0x45,0x54,0x48,0x45,0x52,0x20,0x49,0x4e,0x20,0x41,0x4e,0x20,0x41,0x43,0x54,
+ 0x49,0x4f,0x4e,0x20,0x4f,0x46,0x20,0x43,0x4f,0x4e,0x54,0x52,0x41,0x43,0x54,0x2c,
+ 0x20,0x54,0x4f,0x52,0x54,0x20,0x4f,0x52,0x20,0x4f,0x54,0x48,0x45,0x52,0x57,0x49,
+ 0x53,0x45,0x2c,0x20,0x41,0x52,0x49,0x53,0x49,0x4e,0x47,0x20,0x46,0x52,0x4f,0x4d,
+ 0x2c,0x0a,0x4f,0x55,0x54,0x20,0x4f,0x46,0x20,0x4f,0x52,0x20,0x49,0x4e,0x20,0x43,
+ 0x4f,0x4e,0x4e,0x45,0x43,0x54,0x49,0x4f,0x4e,0x20,0x57,0x49,0x54,0x48,0x20,0x54,
+ 0x48,0x45,0x20,0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x20,0x4f,0x52,0x20,0x54,
+ 0x48,0x45,0x20,0x55,0x53,0x45,0x20,0x4f,0x52,0x20,0x4f,0x54,0x48,0x45,0x52,0x20,
+ 0x44,0x45,0x41,0x4c,0x49,0x4e,0x47,0x53,0x20,0x49,0x4e,0x0a,0x54,0x48,0x45,0x20,
+ 0x53,0x4f,0x46,0x54,0x57,0x41,0x52,0x45,0x2e,0x0a,0x2d,0x2d,0x5d,0x5d,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x66,0x66,0x69,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,
+ 0x72,0x65,0x20,0x22,0x66,0x66,0x69,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,
+ 0x69,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x62,0x69,
+ 0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,
+ 0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x6c,0x65,0x76,0x61,
+ 0x6e,0x74,0x20,0x6d,0x69,0x6e,0x69,0x6d,0x61,0x6c,0x20,0x64,0x65,0x66,0x69,0x6e,
+ 0x69,0x74,0x69,0x6f,0x6e,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20,0x6c,0x6a,0x5f,0x63,
+ 0x74,0x79,0x70,0x65,0x2e,0x68,0x0a,0x66,0x66,0x69,0x2e,0x63,0x64,0x65,0x66,0x20,
+ 0x5b,0x5b,0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,0x73,0x74,0x72,
+ 0x75,0x63,0x74,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
+ 0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x69,0x6e,0x66,0x6f,0x3b,0x0a,0x20,
+ 0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x73,0x69,0x7a,0x65,
+ 0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x31,0x36,0x5f,0x74,0x20,0x73,
+ 0x69,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x31,0x36,0x5f,0x74,
+ 0x20,0x6e,0x65,0x78,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,
+ 0x32,0x5f,0x74,0x20,0x6e,0x61,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x7d,0x20,0x43,0x54,
+ 0x79,0x70,0x65,0x3b,0x0a,0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x20,
+ 0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x7b,
+ 0x0a,0x20,0x20,0x20,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x2a,0x74,0x61,0x62,0x3b,
+ 0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,0x74,0x6f,
+ 0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x20,
+ 0x73,0x69,0x7a,0x65,0x74,0x61,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,
+ 0x64,0x20,0x2a,0x4c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64,0x20,0x2a,
+ 0x67,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64,0x20,0x2a,0x66,0x69,0x6e,
+ 0x61,0x6c,0x69,0x7a,0x65,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x6f,0x69,0x64,
+ 0x20,0x2a,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x3b,0x0a,0x20,0x20,0x7d,0x20,0x43,
+ 0x54,0x53,0x74,0x61,0x74,0x65,0x3b,0x0a,0x5d,0x5d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x63,0x5f,0x73,0x74,
+ 0x72,0x28,0x67,0x63,0x72,0x65,0x66,0x29,0x20,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x76,
+ 0x65,0x72,0x74,0x20,0x61,0x20,0x47,0x43,0x72,0x65,0x66,0x20,0x28,0x74,0x6f,0x20,
+ 0x61,0x20,0x47,0x43,0x73,0x74,0x72,0x29,0x20,0x69,0x6e,0x74,0x6f,0x20,0x61,0x20,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x0a,0x20,0x20,0x69,0x66,0x20,0x67,0x63,0x72,0x65,
+ 0x66,0x20,0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x73,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,
+ 0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x2c,
+ 0x20,0x67,0x63,0x72,0x65,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x66,0x66,0x69,0x2e,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x73,
+ 0x20,0x2b,0x20,0x34,0x2c,0x20,0x74,0x73,0x5b,0x33,0x5d,0x29,0x0a,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x67,0x63,
+ 0x6f,0x62,0x6a,0x29,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x6f,
+ 0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,
+ 0x67,0x63,0x6f,0x62,0x6a,0x29,0x3a,0x6d,0x61,0x74,0x63,0x68,0x22,0x25,0x78,0x2a,
+ 0x24,0x22,0x2c,0x20,0x31,0x36,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,
+ 0x41,0x63,0x71,0x75,0x69,0x72,0x65,0x20,0x61,0x20,0x70,0x6f,0x69,0x6e,0x74,0x65,
+ 0x72,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x4c,0x75,0x61,0x20,0x75,0x6e,
+ 0x69,0x76,0x65,0x72,0x73,0x65,0x27,0x73,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x64,
+ 0x6f,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x20,0x3d,0x20,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x28,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x65,0x6e,0x64,0x29,0x20,0x2d,
+ 0x2d,0x20,0x41,0x6e,0x79,0x20,0x6c,0x69,0x76,0x65,0x20,0x63,0x6f,0x72,0x6f,0x75,
+ 0x74,0x69,0x6e,0x65,0x20,0x77,0x69,0x6c,0x6c,0x20,0x64,0x6f,0x2e,0x0a,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,
+ 0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x22,0x75,
+ 0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x47,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28,
+ 0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,0x2c,0x20,0x66,0x66,0x69,0x2e,
+ 0x63,0x61,0x73,0x74,0x28,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,0x2c,
+ 0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x63,0x6f,0x29,0x29,0x5b,0x32,0x5d,0x29,
+ 0x0a,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,
+ 0x53,0x74,0x61,0x74,0x65,0x2c,0x20,0x60,0x4d,0x52,0x65,0x66,0x20,0x63,0x74,0x79,
+ 0x70,0x65,0x5f,0x73,0x74,0x61,0x74,0x65,0x60,0x20,0x69,0x73,0x20,0x69,0x6d,0x6d,
+ 0x65,0x64,0x69,0x61,0x74,0x65,0x6c,0x79,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20,
+ 0x60,0x47,0x43,0x52,0x65,0x66,0x20,0x67,0x63,0x72,0x6f,0x6f,0x74,0x5b,0x47,0x43,
+ 0x52,0x4f,0x4f,0x54,0x5f,0x4d,0x41,0x58,0x5d,0x60,0x2e,0x0a,0x20,0x20,0x2d,0x2d,
+ 0x20,0x57,0x65,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x66,0x69,0x6e,0x64,0x20,0x28,
+ 0x61,0x6e,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x69,0x6e,0x29,0x20,0x67,0x63,0x72,
+ 0x6f,0x6f,0x74,0x20,0x62,0x79,0x20,0x6c,0x6f,0x6f,0x6b,0x69,0x6e,0x67,0x20,0x66,
+ 0x6f,0x72,0x20,0x61,0x20,0x6d,0x65,0x74,0x61,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,
+ 0x6e,0x61,0x6d,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x0a,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x20,0x3d,0x20,0x66,0x66,
+ 0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,
+ 0x22,0x2c,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x63,0x6f,0x6e,
+ 0x73,0x74,0x20,0x63,0x68,0x61,0x72,0x2a,0x22,0x2c,0x20,0x22,0x5f,0x5f,0x69,0x6e,
+ 0x64,0x65,0x78,0x22,0x29,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,
+ 0x20,0x3d,0x20,0x30,0x0a,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x6d,0x61,0x74,
+ 0x68,0x2e,0x61,0x62,0x73,0x28,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x47,
+ 0x5b,0x69,0x5d,0x20,0x2d,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x29,0x29,0x20,0x3e,
+ 0x20,0x36,0x34,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x20,0x3d,0x20,0x69,
+ 0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x2d,0x2d,0x20,
+ 0x57,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x77,0x6f,0x72,0x6b,0x20,0x62,0x61,0x63,
+ 0x6b,0x77,0x61,0x72,0x64,0x73,0x20,0x6c,0x6f,0x6f,0x6b,0x69,0x6e,0x67,0x20,0x66,
+ 0x6f,0x72,0x20,0x73,0x6f,0x6d,0x65,0x74,0x68,0x69,0x6e,0x67,0x20,0x72,0x65,0x73,
+ 0x65,0x6d,0x62,0x6c,0x69,0x6e,0x67,0x20,0x63,0x74,0x79,0x70,0x65,0x5f,0x73,0x74,
+ 0x61,0x74,0x65,0x2e,0x0a,0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x20,0x3d,0x20,0x69,0x20,0x2d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,
+ 0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,
+ 0x73,0x74,0x28,0x22,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2a,0x22,0x2c,0x20,0x47,
+ 0x5b,0x69,0x5d,0x29,0x0a,0x20,0x20,0x75,0x6e,0x74,0x69,0x6c,0x20,0x66,0x66,0x69,
+ 0x2e,0x63,0x61,0x73,0x74,0x28,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x70,0x74,0x72,
+ 0x2c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x67,0x29,0x20,0x3d,0x3d,0x20,
+ 0x47,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x41,0x63,0x71,0x75,0x69,0x72,
+ 0x65,0x20,0x74,0x68,0x65,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x27,0x73,0x20,
+ 0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x61,0x73,
+ 0x20,0x61,0x20,0x4c,0x75,0x61,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6c,0x65,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20,0x64,0x6f,
+ 0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,
+ 0x20,0x74,0x5b,0x30,0x5d,0x20,0x3d,0x20,0x74,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x74,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,
+ 0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x2a,0x22,0x2c,
+ 0x20,0x6d,0x65,0x6d,0x70,0x74,0x72,0x28,0x74,0x29,0x29,0x5b,0x32,0x5d,0x0a,0x20,
+ 0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,
+ 0x32,0x5f,0x74,0x2a,0x22,0x2c,0x20,0x74,0x76,0x61,0x6c,0x75,0x65,0x29,0x5b,0x66,
+ 0x66,0x69,0x2e,0x61,0x62,0x69,0x22,0x6c,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x30,
+ 0x20,0x6f,0x72,0x20,0x31,0x5d,0x20,0x3d,0x20,0x66,0x66,0x69,0x2e,0x63,0x61,0x73,
+ 0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x33,0x32,0x5f,0x74,0x22,0x2c,0x20,0x66,0x66,
+ 0x69,0x2e,0x63,0x61,0x73,0x74,0x28,0x22,0x75,0x69,0x6e,0x74,0x70,0x74,0x72,0x5f,
+ 0x74,0x22,0x2c,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x6d,0x69,0x73,0x63,
+ 0x6d,0x61,0x70,0x29,0x29,0x0a,0x20,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x20,
+ 0x3d,0x20,0x74,0x5b,0x30,0x5d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x49,
+ 0x6e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x75,
+ 0x6e,0x70,0x61,0x63,0x6b,0x69,0x6e,0x67,0x20,0x61,0x20,0x60,0x73,0x74,0x72,0x75,
+ 0x63,0x74,0x20,0x43,0x54,0x79,0x70,0x65,0x60,0x2e,0x0a,0x2d,0x2d,0x20,0x4f,0x6e,
+ 0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x70,0x65,0x72,0x20,0x43,0x54,0x5f,0x2a,
+ 0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x61,
+ 0x69,0x6e,0x69,0x6e,0x67,0x3a,0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x41,0x20,0x6e,0x61,
+ 0x6d,0x65,0x20,0x66,0x6f,0x72,0x20,0x74,0x68,0x61,0x74,0x20,0x43,0x54,0x5f,0x0a,
+ 0x2d,0x2d,0x20,0x2a,0x20,0x52,0x6f,0x6c,0x65,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,
+ 0x65,0x20,0x63,0x69,0x64,0x20,0x61,0x6e,0x64,0x20,0x73,0x69,0x7a,0x65,0x20,0x66,
+ 0x69,0x65,0x6c,0x64,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x57,0x68,0x65,0x74,
+ 0x68,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x62,0x20,0x66,0x69,0x65,0x6c,
+ 0x64,0x20,0x69,0x73,0x20,0x6d,0x65,0x61,0x6e,0x69,0x6e,0x67,0x66,0x75,0x6c,0x2e,
+ 0x0a,0x2d,0x2d,0x20,0x2a,0x20,0x5a,0x65,0x72,0x6f,0x20,0x6f,0x72,0x20,0x6d,0x6f,
+ 0x72,0x65,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65,0x20,0x62,0x6f,
+ 0x6f,0x6c,0x65,0x61,0x6e,0x20,0x66,0x6c,0x61,0x67,0x73,0x2e,0x0a,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x43,0x54,0x73,0x20,0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a,
+ 0x20,0x20,0x7b,0x22,0x69,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x22,
+ 0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,
+ 0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,
+ 0x30,0x78,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x66,0x6c,0x6f,
+ 0x61,0x74,0x22,0x2c,0x20,0x22,0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,
+ 0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f,
+ 0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,
+ 0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x73,0x69,
+ 0x67,0x6e,0x65,0x64,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,
+ 0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x6c,0x6f,0x6e,0x67,0x22,0x7d,
+ 0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x73,0x74,0x72,0x75,0x63,
+ 0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,
+ 0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,
+ 0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,
+ 0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,
+ 0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,
+ 0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,
+ 0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x69,0x6f,0x6e,0x22,0x2c,0x20,0x22,0x73,0x75,
+ 0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,
+ 0x30,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6c,0x61,0x22,0x7d,
+ 0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x70,0x74,0x72,0x22,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x22,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79,
+ 0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61,0x6c,
+ 0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,
+ 0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,
+ 0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x72,
+ 0x65,0x66,0x22,0x2c,0x20,0x22,0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x7d,0x2c,
+ 0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x61,0x72,0x72,0x61,0x79,0x22,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,
+ 0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,0x66,0x61,
+ 0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x38,0x30,0x30,
+ 0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x65,0x63,0x74,0x6f,0x72,0x22,0x7d,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,
+ 0x2c,0x20,0x22,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78,0x22,0x7d,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,
+ 0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,
+ 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,
+ 0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x30,
+ 0x31,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x6c,0x61,0x22,0x7d,0x2c,0x0a,
+ 0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x76,0x6f,0x69,0x64,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x2c,0x20,
+ 0x66,0x61,0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,
+ 0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
+ 0x30,0x2c,0x20,0x22,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,
+ 0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x65,0x6e,0x75,0x6d,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,
+ 0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,
+ 0x20,0x7b,0x22,0x66,0x75,0x6e,0x63,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x5f,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x6e,0x61,
+ 0x72,0x67,0x73,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x7b,0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,0x61,
+ 0x72,0x61,0x72,0x67,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,
+ 0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x73,0x73,0x65,0x5f,0x72,0x65,
+ 0x67,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c,
+ 0x0a,0x20,0x20,0x7b,0x22,0x74,0x79,0x70,0x65,0x64,0x65,0x66,0x22,0x2c,0x20,0x2d,
+ 0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x22,
+ 0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,
+ 0x22,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,
+ 0x20,0x7b,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4f,
+ 0x6e,0x6c,0x79,0x20,0x73,0x65,0x65,0x6e,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,
+ 0x6c,0x6c,0x79,0x0a,0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,
+ 0x22,0x76,0x61,0x6c,0x75,0x65,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,
+ 0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x66,0x69,0x65,0x6c,0x64,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x6f,0x66,0x66,
+ 0x73,0x65,0x74,0x22,0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,
+ 0x0a,0x20,0x20,0x7b,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x22,0x22,0x2c,0x20,0x22,0x6f,0x66,0x66,0x73,0x65,0x74,0x22,
+ 0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,
+ 0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x62,0x6f,0x6f,0x6c,0x22,0x7d,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,0x32,0x30,0x30,0x30,0x30,0x30,
+ 0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x7b,0x30,0x78,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x76,
+ 0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,
+ 0x30,0x78,0x30,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x75,0x6e,0x73,
+ 0x69,0x67,0x6e,0x65,0x64,0x22,0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,
+ 0x7b,0x22,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x22,0x74,0x79,0x70,0x65,0x22,0x2c,0x20,0x22,0x76,0x61,0x6c,0x75,0x65,0x22,
+ 0x2c,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7b,0x30,0x78,0x30,
+ 0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x2c,0x20,0x22,0x63,0x6f,0x6e,0x73,0x74,0x22,
+ 0x7d,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x65,0x78,0x74,0x65,
+ 0x72,0x6e,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x22,0x43,0x49,0x44,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20,
+ 0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x7b,0x22,0x6b,
+ 0x77,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x4e,0x6f,0x74,0x20,0x73,0x65,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x22,0x54,0x4f,0x4b,0x22,0x2c,0x20,0x22,0x73,0x69,0x7a,0x65,
+ 0x22,0x2c,0x0a,0x20,0x20,0x7d,0x2c,0x0a,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x53,0x65,
+ 0x74,0x20,0x6f,0x66,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x63,0x69,0x64,0x20,
+ 0x72,0x6f,0x6c,0x65,0x73,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x72,0x65,0x20,
+ 0x61,0x20,0x43,0x54,0x79,0x70,0x65,0x49,0x44,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x74,0x79,0x70,0x65,0x5f,0x6b,0x65,0x79,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20,
+ 0x20,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,
+ 0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x74,
+ 0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,0x20,0x20,0x76,0x61,
+ 0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,
+ 0x0a,0x20,0x20,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x2c,0x0a,
+ 0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x43,0x72,0x65,0x61,0x74,0x65,0x20,0x61,0x20,0x6d,
+ 0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x6f,0x72,0x20,0x65,0x61,0x63,
+ 0x68,0x20,0x43,0x54,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x65,0x74,0x61,
+ 0x74,0x61,0x62,0x6c,0x65,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x7d,0x0a,0x66,0x6f,0x72,
+ 0x20,0x5f,0x2c,0x20,0x43,0x54,0x20,0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73,
+ 0x28,0x43,0x54,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x43,0x54,0x5b,0x31,0x5d,0x0a,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x74,0x20,0x3d,0x20,0x7b,0x5f,0x5f,0x69,0x6e,
+ 0x64,0x65,0x78,0x20,0x3d,0x20,0x7b,0x7d,0x7d,0x0a,0x20,0x20,0x6d,0x65,0x74,0x61,
+ 0x74,0x61,0x62,0x6c,0x65,0x73,0x5b,0x77,0x68,0x61,0x74,0x5d,0x20,0x3d,0x20,0x6d,
+ 0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x4c,0x6f,0x67,0x69,0x63,0x20,
+ 0x66,0x6f,0x72,0x20,0x6d,0x65,0x72,0x67,0x69,0x6e,0x67,0x20,0x61,0x6e,0x20,0x61,
+ 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x20,0x6f,
+ 0x6e,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x61,0x6e,0x6e,0x6f,0x74,0x61,0x74,0x65,
+ 0x64,0x20,0x43,0x54,0x79,0x70,0x65,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,
+ 0x54,0x41,0x73,0x20,0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a,0x20,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x43,
+ 0x54,0x41,0x5f,0x4e,0x4f,0x4e,0x45,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a,
+ 0x20,0x43,0x54,0x41,0x5f,0x51,0x55,0x41,0x4c,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c,
+ 0x0a,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x20,0x3d,0x20,0x32,0x5e,
+ 0x61,0x2e,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,
+ 0x74,0x2e,0x61,0x6c,0x69,0x67,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x61,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62,
+ 0x75,0x74,0x65,0x73,0x2e,0x61,0x6c,0x69,0x67,0x6e,0x20,0x3d,0x20,0x61,0x0a,0x20,
+ 0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x2e,0x74,0x72,0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,
+ 0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,
+ 0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x2e,0x73,0x75,0x62,
+ 0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,
+ 0x65,0x69,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x79,0x6d,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d,
+ 0x20,0x61,0x2e,0x6e,0x61,0x6d,0x65,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x61,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x29,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x43,
+ 0x54,0x41,0x5f,0x42,0x41,0x44,0x22,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,
+ 0x0a,0x2d,0x2d,0x20,0x43,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,
+ 0x61,0x6c,0x6c,0x69,0x6e,0x67,0x20,0x63,0x6f,0x6e,0x76,0x65,0x6e,0x74,0x69,0x6f,
+ 0x6e,0x73,0x20,0x28,0x43,0x54,0x43,0x43,0x5f,0x2a,0x20,0x63,0x6f,0x6e,0x73,0x74,
+ 0x61,0x6e,0x74,0x73,0x20,0x69,0x6e,0x20,0x6c,0x6a,0x5f,0x72,0x65,0x66,0x63,0x74,
+ 0x2e,0x68,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x43,0x43,0x73,0x20,
+ 0x3d,0x20,0x7b,0x5b,0x30,0x5d,0x20,0x3d,0x0a,0x20,0x20,0x22,0x63,0x64,0x65,0x63,
+ 0x6c,0x22,0x2c,0x0a,0x20,0x20,0x22,0x74,0x68,0x69,0x73,0x63,0x61,0x6c,0x6c,0x22,
+ 0x2c,0x0a,0x20,0x20,0x22,0x66,0x61,0x73,0x74,0x63,0x61,0x6c,0x6c,0x22,0x2c,0x0a,
+ 0x20,0x20,0x22,0x73,0x74,0x64,0x63,0x61,0x6c,0x6c,0x22,0x2c,0x0a,0x7d,0x0a,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x69,0x64,0x29,
+ 0x20,0x2d,0x2d,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,
+ 0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x43,0x54,0x79,0x70,0x65,0x49,
+ 0x44,0x29,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x74,0x79,0x70,0x65,
+ 0x20,0x3d,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x69,
+ 0x64,0x5d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x5f,0x63,0x6f,
+ 0x64,0x65,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,
+ 0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x32,0x38,0x29,0x0a,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x20,0x3d,0x20,0x43,0x54,0x73,
+ 0x5b,0x43,0x54,0x5f,0x63,0x6f,0x64,0x65,0x5d,0x0a,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x43,0x54,0x5b,0x31,0x5d,0x0a,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x73,
+ 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x0a,0x20,0x20,
+ 0x20,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x77,0x68,0x61,0x74,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x74,0x79,0x70,0x65,0x69,0x64,0x20,0x3d,0x20,0x69,0x64,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x67,0x63,0x5f,0x73,0x74,
+ 0x72,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x6e,0x61,0x6d,0x65,0x29,0x2c,0x0a,0x20,
+ 0x20,0x7d,0x2c,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x5b,0x77,
+ 0x68,0x61,0x74,0x5d,0x29,0x0a,0x0a,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,
+ 0x72,0x70,0x72,0x65,0x74,0x20,0x28,0x6d,0x6f,0x73,0x74,0x20,0x6f,0x66,0x29,0x20,
+ 0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x69,0x6e,0x66,0x6f,0x20,
+ 0x66,0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20,
+ 0x35,0x2c,0x20,0x23,0x43,0x54,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,
+ 0x69,0x6e,0x66,0x6f,0x2c,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x31,0x5d,0x29,0x20,
+ 0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x33,0x5d,0x20,0x3d,0x3d,0x20,0x22,
+ 0x73,0x75,0x62,0x77,0x68,0x61,0x74,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,0x61,0x74,
+ 0x20,0x3d,0x20,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x32,0x5d,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x5b,0x43,0x54,0x5b,0x69,0x5d,0x5b,0x32,0x5d,0x5d,0x20,0x3d,
+ 0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x69,0x66,0x20,0x43,0x54,0x5f,0x63,0x6f,0x64,0x65,0x20,0x3c,0x3d,0x20,0x35,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x61,
+ 0x6c,0x69,0x67,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x6c,
+ 0x73,0x68,0x69,0x66,0x74,0x28,0x31,0x2c,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,
+ 0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,
+ 0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29,0x2c,0x20,0x31,0x35,
+ 0x29,0x29,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x68,0x61,0x74,
+ 0x20,0x3d,0x3d,0x20,0x22,0x66,0x75,0x6e,0x63,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x63,0x6f,0x6e,0x76,0x65,0x6e,
+ 0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x43,0x54,0x43,0x43,0x73,0x5b,0x62,0x69,0x74,
+ 0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,
+ 0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29,
+ 0x2c,0x20,0x33,0x29,0x5d,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x69,
+ 0x66,0x20,0x43,0x54,0x5b,0x32,0x5d,0x20,0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x20,
+ 0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x63,0x69,0x64,0x20,0x66,
+ 0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6b,
+ 0x20,0x3d,0x20,0x43,0x54,0x5b,0x32,0x5d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x63,0x69,0x64,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,
+ 0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x30,0x78,
+ 0x66,0x66,0x66,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,
+ 0x65,0x5f,0x6b,0x65,0x79,0x73,0x5b,0x6b,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x69,0x64,0x20,0x3d,0x3d,0x20,0x30,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x69,
+ 0x64,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,
+ 0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x69,0x64,0x20,0x3d,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x63,
+ 0x69,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x5b,
+ 0x6b,0x5d,0x20,0x3d,0x20,0x63,0x69,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x20,0x20,0x69,0x66,0x20,0x43,0x54,0x5b,0x33,0x5d,0x20,0x7e,0x3d,0x20,0x22,0x22,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x74,0x65,0x72,0x70,0x72,
+ 0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x43,0x54,0x79,0x70,0x65,0x3a,0x3a,0x73,0x69,
+ 0x7a,0x65,0x20,0x66,0x69,0x65,0x6c,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x6b,0x20,0x3d,0x20,0x43,0x54,0x5b,0x33,0x5d,0x0a,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x63,0x74,0x79,0x70,
+ 0x65,0x2e,0x73,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6b,0x20,
+ 0x3d,0x3d,0x20,0x22,0x73,0x69,0x7a,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x62,0x69,
+ 0x74,0x2e,0x62,0x6e,0x6f,0x74,0x28,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x29,
+ 0x20,0x3d,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x22,0x6e,0x6f,0x6e,
+ 0x65,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x69,0x66,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,
+ 0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x4d,0x65,0x72,0x67,0x65,0x20,0x6c,0x65,0x61,0x64,0x69,0x6e,
+ 0x67,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x6f,0x6e,0x74,
+ 0x6f,0x20,0x74,0x68,0x65,0x20,0x74,0x79,0x70,0x65,0x20,0x62,0x65,0x69,0x6e,0x67,
+ 0x20,0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65,0x64,0x2e,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x54,0x41,0x20,0x3d,0x20,0x43,0x54,0x41,0x73,
+ 0x5b,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,
+ 0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,
+ 0x20,0x31,0x36,0x29,0x2c,0x20,0x30,0x78,0x66,0x66,0x29,0x5d,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x74,0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75,
+ 0x74,0x65,0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x43,
+ 0x54,0x41,0x28,0x72,0x65,0x66,0x63,0x74,0x2c,0x20,0x63,0x74,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x20,0x3d,0x20,
+ 0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x63,0x74,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x2e,0x43,0x54,0x41,0x20,0x3d,0x20,0x43,0x54,0x41,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x68,
+ 0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x62,0x69,0x74,0x66,0x69,0x65,0x6c,0x64,0x22,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x65,0x63,
+ 0x6f,0x64,0x65,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x62,0x69,0x74,0x66,0x69,0x65,
+ 0x6c,0x64,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x61,0x6e,0x64,0x20,0x6d,
+ 0x61,0x6b,0x65,0x20,0x69,0x74,0x20,0x6c,0x6f,0x6f,0x6b,0x20,0x6c,0x69,0x6b,0x65,
+ 0x20,0x61,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x66,0x69,0x65,0x6c,0x64,0x2e,
+ 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6f,0x66,0x66,0x73,0x65,
+ 0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,
+ 0x20,0x2b,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x63,0x74,0x79,0x70,
+ 0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x32,0x37,0x29,0x20,0x2f,0x20,0x38,
+ 0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x73,0x69,0x7a,0x65,0x20,
+ 0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x62,0x69,0x74,0x2e,0x72,
+ 0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,
+ 0x2c,0x20,0x38,0x29,0x2c,0x20,0x31,0x32,0x37,0x29,0x20,0x2f,0x20,0x38,0x0a,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,
+ 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x68,0x61,0x74,0x20,0x3d,0x20,0x22,
+ 0x69,0x6e,0x74,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,
+ 0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x2e,0x63,0x6f,0x6e,0x73,0x74,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x2e,0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,
+ 0x74,0x2e,0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x73,0x69,0x7a,0x65,0x20,0x3d,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,
+ 0x64,0x28,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x63,0x74,0x79,
+ 0x70,0x65,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x31,0x36,0x29,0x2c,0x20,0x31,0x32,
+ 0x37,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x66,0x63,0x74,0x2e,0x62,0x6f,0x6f,0x6c,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,
+ 0x63,0x6f,0x6e,0x73,0x74,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x76,0x6f,0x6c,
+ 0x61,0x74,0x69,0x6c,0x65,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x75,0x6e,0x73,
+ 0x69,0x67,0x6e,0x65,0x64,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x20,0x20,0x69,0x66,0x20,0x43,0x54,0x5b,0x34,0x5d,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x2d,0x2d,0x20,0x4d,0x65,0x72,0x67,0x65,0x20,0x73,0x69,0x62,0x6c,
+ 0x69,0x6e,0x67,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x6f,
+ 0x6e,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x74,0x79,0x70,0x65,0x2e,0x0a,0x20,
+ 0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x63,0x74,0x79,0x70,0x65,0x2e,0x73,
+ 0x69,0x62,0x20,0x7e,0x3d,0x20,0x30,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x3d,0x20,0x43,
+ 0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x63,0x74,0x79,0x70,0x65,
+ 0x2e,0x73,0x69,0x62,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x43,
+ 0x54,0x73,0x5b,0x62,0x69,0x74,0x2e,0x72,0x73,0x68,0x69,0x66,0x74,0x28,0x65,0x6e,
+ 0x74,0x72,0x79,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x32,0x38,0x29,0x5d,0x5b,0x31,
+ 0x5d,0x20,0x7e,0x3d,0x20,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x69,0x74,0x2e,0x62,0x61,0x6e,0x64,0x28,0x65,
+ 0x6e,0x74,0x72,0x79,0x2e,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x30,0x78,0x66,0x66,0x66,
+ 0x66,0x29,0x20,0x7e,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,
+ 0x61,0x6b,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x73,0x69,0x62,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,
+ 0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x62,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x69,0x62,0x3a,0x43,0x54,0x41,0x28,
+ 0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x74,0x79,
+ 0x70,0x65,0x20,0x3d,0x20,0x65,0x6e,0x74,0x72,0x79,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73,0x69,0x62,
+ 0x5f,0x69,0x74,0x65,0x72,0x28,0x73,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,
+ 0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x63,0x74,0x79,0x70,0x65,0x20,0x3d,0x20,0x43,0x54,0x53,0x74,0x61,
+ 0x74,0x65,0x2e,0x74,0x61,0x62,0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,
+ 0x65,0x69,0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x74,0x79,0x70,
+ 0x65,0x2e,0x73,0x69,0x62,0x20,0x3d,0x3d,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,
+ 0x6d,0x5f,0x69,0x64,0x28,0x63,0x74,0x79,0x70,0x65,0x2e,0x73,0x69,0x62,0x29,0x0a,
+ 0x20,0x20,0x75,0x6e,0x74,0x69,0x6c,0x20,0x72,0x65,0x66,0x63,0x74,0x2e,0x77,0x68,
+ 0x61,0x74,0x20,0x7e,0x3d,0x20,0x22,0x61,0x74,0x74,0x72,0x69,0x62,0x22,0x20,0x2d,
+ 0x2d,0x20,0x50,0x75,0x72,0x65,0x20,0x61,0x74,0x74,0x72,0x69,0x62,0x73,0x20,0x61,
+ 0x72,0x65,0x20,0x73,0x6b,0x69,0x70,0x70,0x65,0x64,0x2e,0x0a,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73,
+ 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x2d,0x2d,0x20,0x46,0x6f,0x6c,0x6c,0x6f,0x77,0x20,0x74,0x6f,0x20,0x74,0x68,
+ 0x65,0x20,0x65,0x6e,0x64,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x61,0x74,0x74,
+ 0x72,0x69,0x62,0x20,0x63,0x68,0x61,0x69,0x6e,0x2c,0x20,0x69,0x66,0x20,0x61,0x6e,
+ 0x79,0x2e,0x0a,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x2e,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x20,0x64,0x6f,0x0a,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x66,0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x63,0x74,
+ 0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x72,0x65,0x66,0x63,0x74,0x2e,0x61,
+ 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x73,0x2e,0x73,0x75,0x62,0x74,0x79,0x70,
+ 0x65,0x20,0x6f,0x72,0x20,0x43,0x54,0x53,0x74,0x61,0x74,0x65,0x2e,0x74,0x61,0x62,
+ 0x5b,0x72,0x65,0x66,0x63,0x74,0x2e,0x74,0x79,0x70,0x65,0x69,0x64,0x5d,0x2e,0x73,
+ 0x69,0x62,0x29,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x73,0x69,0x62,0x5f,0x69,0x74,0x65,0x72,0x2c,0x20,0x6e,0x69,
+ 0x6c,0x2c,0x20,0x72,0x65,0x66,0x63,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6d,0x65,
+ 0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x73,0x74,0x72,0x75,0x63,0x74,0x2e,
+ 0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x6d,0x65,0x6d,0x62,0x65,0x72,0x73,0x20,
+ 0x3d,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x0a,0x6d,0x65,0x74,0x61,0x74,
+ 0x61,0x62,0x6c,0x65,0x73,0x2e,0x66,0x75,0x6e,0x63,0x2e,0x5f,0x5f,0x69,0x6e,0x64,
+ 0x65,0x78,0x2e,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,0x74,0x73,0x20,0x3d,0x20,0x73,
+ 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x73,0x2e,0x65,0x6e,0x75,0x6d,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,
+ 0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x3d,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,
+ 0x73,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x28,0x72,
+ 0x65,0x66,0x63,0x74,0x2c,0x20,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,
+ 0x65,0x72,0x28,0x6e,0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x69,0x66,0x20,0x6e,0x75,
+ 0x6d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x73,
+ 0x69,0x62,0x20,0x69,0x6e,0x20,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72,
+ 0x65,0x66,0x63,0x74,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x3d,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,
+ 0x69,0x62,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6e,0x75,0x6d,0x20,0x3d,0x20,0x6e,0x75,0x6d,0x20,0x2d,0x20,0x31,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x73,0x69,0x62,0x20,0x69,0x6e,0x20,0x73,
+ 0x69,0x62,0x6c,0x69,0x6e,0x67,0x73,0x28,0x72,0x65,0x66,0x63,0x74,0x29,0x20,0x64,
+ 0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x69,0x62,0x2e,0x6e,
+ 0x61,0x6d,0x65,0x20,0x3d,0x3d,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x69,0x62,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x73,0x74,0x72,0x75,
+ 0x63,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x6d,0x65,0x6d,0x62,0x65,
+ 0x72,0x20,0x3d,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,
+ 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x66,0x75,0x6e,0x63,
+ 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x61,0x72,0x67,0x75,0x6d,0x65,0x6e,
+ 0x74,0x20,0x3d,0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,
+ 0x0a,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x73,0x2e,0x65,0x6e,0x75,0x6d,
+ 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x2e,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,
+ 0x20,0x66,0x69,0x6e,0x64,0x5f,0x73,0x69,0x62,0x6c,0x69,0x6e,0x67,0x0a,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,
+ 0x74,0x79,0x70,0x65,0x6f,0x66,0x28,0x78,0x29,0x20,0x2d,0x2d,0x20,0x72,0x65,0x66,
+ 0x63,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x74,0x79,0x70,
+ 0x65,0x6f,0x66,0x28,0x63,0x74,0x29,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x72,0x65,0x66,0x63,0x74,0x5f,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x28,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x66,0x66,0x69,0x2e,0x74,0x79,0x70,0x65,
+ 0x6f,0x66,0x28,0x78,0x29,0x29,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x67,0x65,
+ 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x78,0x29,0x20,0x2d,0x2d,
+ 0x20,0x6d,0x74,0x20,0x3d,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x2e,0x67,0x65,
+ 0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x63,0x74,0x29,0x0a,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x73,0x63,0x6d,0x61,0x70,0x5b,
+ 0x2d,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x28,0x66,0x66,0x69,0x2e,0x74,0x79,
+ 0x70,0x65,0x6f,0x66,0x28,0x78,0x29,0x29,0x5d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,
+ 0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x75,0x67,
+ 0x69,0x6e,0x73,0x2e,0x66,0x66,0x69,0x2e,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,
+ 0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,
+ 0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,
+ 0x72,0x6d,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,
+ 0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,0x30,0x31,0x32,0x20,
+ 0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,
+ 0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x41,
+ 0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,0x73,0x65,0x72,0x76,
+ 0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,
+ 0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,
+ 0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x73,0x0a,
+ 0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,0x61,0x76,0x61,0x69,
+ 0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,
+ 0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x45,0x63,0x6c,
+ 0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x4c,0x69,0x63,0x65,
+ 0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,
+ 0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,0x73,0x20,0x74,0x68,
+ 0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x2c,
+ 0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,
+ 0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
+ 0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,0x72,0x67,0x2f,0x6c,
+ 0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,0x2e,0x68,0x74,0x6d,
+ 0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,0x72,0x69,0x62,0x75,
+ 0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x53,0x69,0x65,
+ 0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,0x20,0x2d,0x20,0x69,
+ 0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,0x6e,0x64,0x20,0x69,
+ 0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,
+ 0x20,0x50,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2f,0x4f,0x53,0x20,0x73,0x70,0x65,
+ 0x63,0x69,0x66,0x69,0x63,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x20,0x61,
+ 0x6e,0x64,0x20,0x70,0x61,0x74,0x68,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,
+ 0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x72,
+ 0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x2e,0x75,0x72,0x6c,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x74,0x69,0x6c,
+ 0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x4d,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x45,0x78,
+ 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x20,0x70,0x6c,0x61,0x66,0x6f,0x72,0x6d,0x20,
+ 0x28,0x63,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x77,0x69,0x6e,0x20,0x6f,0x72,
+ 0x20,0x75,0x6e,0x69,0x78,0x29,0x0a,0x2d,0x2d,0x20,0x55,0x73,0x65,0x64,0x20,0x74,
+ 0x6f,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x70,0x61,
+ 0x74,0x68,0x20,0x64,0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x20,0x62,0x65,
+ 0x74,0x77,0x65,0x65,0x6e,0x20,0x74,0x68,0x65,0x20,0x32,0x20,0x70,0x6c,0x61,0x74,
+ 0x66,0x6f,0x72,0x6d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x6c,0x61,0x74,0x66,
+ 0x6f,0x72,0x6d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x6b,0x65,
+ 0x65,0x70,0x20,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64,0x20,
+ 0x55,0x52,0x49,0x73,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x20,0x28,0x61,
+ 0x73,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x72,0x65,0x20,0x71,0x75,0x69,0x74,0x65,
+ 0x20,0x6c,0x6f,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,
+ 0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68,
+ 0x65,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x20,0x61,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x20,0x70,
+ 0x61,0x74,0x68,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,
+ 0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x6f,0x66,0x20,0x65,0x61,0x63,0x68,0x20,0x73,
+ 0x65,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x20,0x79,0x6f,0x75,0x20,0x63,0x6f,
+ 0x75,0x6c,0x64,0x20,0x70,0x72,0x65,0x63,0x69,0x73,0x65,0x20,0x74,0x68,0x65,0x20,
+ 0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x2e,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x73,
+ 0x70,0x6c,0x69,0x74,0x28,0x70,0x61,0x74,0x68,0x2c,0x73,0x65,0x70,0x29,0x0a,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,
+ 0x66,0x6f,0x72,0x20,0x77,0x20,0x69,0x6e,0x20,0x70,0x61,0x74,0x68,0x3a,0x67,0x6d,
+ 0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x22,0x2e,0x2e,0x28,0x73,0x65,0x70,0x20,
+ 0x6f,0x72,0x20,0x22,0x2f,0x22,0x29,0x2e,0x2e,0x22,0x5d,0x2b,0x22,0x29,0x64,0x6f,
+ 0x0a,0x20,0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72,
+ 0x74,0x28,0x74,0x2c,0x20,0x77,0x29,0x0a,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x74,0x61,0x62,0x6c,0x65,0x3a,
+ 0x20,0x6b,0x65,0x79,0x3d,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x6e,
+ 0x61,0x6d,0x65,0x2c,0x76,0x61,0x6c,0x75,0x65,0x3d,0x74,0x72,0x75,0x65,0x20,0x28,
+ 0x61,0x64,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,
+ 0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,
+ 0x70,0x61,0x74,0x68,0x73,0x28,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,
+ 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x20,0x3d,
+ 0x20,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x77,0x20,0x69,
+ 0x6e,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x3a,0x67,0x6d,
+ 0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x3b,0x5d,0x2b,0x22,0x29,0x20,0x64,0x6f,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x5b,0x77,0x5d,0x20,0x3d,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x3b,0x0a,0x65,0x6e,0x64,0x0a,0x0a,
+ 0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x72,0x65,0x6c,0x61,
+ 0x74,0x69,0x76,0x65,0x20,0x75,0x72,0x69,0x20,0x74,0x6f,0x20,0x4d,0x2e,0x62,0x61,
+ 0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x66,0x6f,0x72,0x20,0x61,0x20,0x67,0x69,0x76,
+ 0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x66,0x6f,0x72,0x20,0x61,
+ 0x6e,0x64,0x72,0x6f,0x69,0x64,0x20,0x64,0x65,0x76,0x69,0x63,0x65,0x20,0x28,0x61,
+ 0x64,0x64,0x65,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,
+ 0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x61,0x6e,0x64,0x72,0x6f,0x69,
+ 0x64,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,
+ 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,
+ 0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x36,0x29,0x20,0x3d,0x3d,0x20,0x22,0x61,0x73,
+ 0x73,0x65,0x74,0x73,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x72,0x65,
+ 0x70,0x6c,0x61,0x63,0x65,0x20,0x61,0x73,0x73,0x65,0x74,0x73,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73,0x6f,
+ 0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x38,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,
+ 0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x20,0x2f,0x6d,0x6e,0x74,0x2f,0x73,0x64,0x63,
+ 0x61,0x72,0x64,0x2f,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x6e,0x61,0x6d,0x65,0x2f,
+ 0x20,0x77,0x69,0x74,0x68,0x20,0x65,0x6d,0x70,0x74,0x79,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,
+ 0x2c,0x20,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73,
+ 0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23,
+ 0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3e,0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20,
+ 0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73,
+ 0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73,
+ 0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x23,0x6b,0x2b,0x31,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x61,0x20,0x72,0x65,0x6c,
+ 0x61,0x74,0x69,0x76,0x65,0x20,0x75,0x72,0x69,0x20,0x74,0x6f,0x20,0x4d,0x2e,0x62,
+ 0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x66,0x6f,0x72,0x20,0x61,0x20,0x67,0x69,
+ 0x76,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x2c,0x20,0x2c,0x20,0x66,0x6f,
+ 0x72,0x20,0x69,0x6f,0x73,0x20,0x73,0x69,0x6d,0x75,0x6c,0x61,0x74,0x6f,0x72,0x2f,
+ 0x64,0x65,0x76,0x69,0x63,0x65,0x3f,0x20,0x28,0x61,0x64,0x64,0x65,0x64,0x20,0x62,
+ 0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f,
+ 0x74,0x6f,0x5f,0x69,0x6f,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,
+ 0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,
+ 0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65,
+ 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x76,
+ 0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73,0x65,0x61,0x72,
+ 0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23,0x73,0x6f,0x75,0x72,0x63,
+ 0x65,0x20,0x3e,0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20,0x4d,0x2e,0x73,0x65,0x61,
+ 0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,
+ 0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,
+ 0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,
+ 0x75,0x62,0x28,0x23,0x6b,0x2b,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x72,0x65,0x6c,0x61,0x74,
+ 0x69,0x76,0x65,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x73,0x65,0x61,
+ 0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x76,0x20,0x69,0x6e,
+ 0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,
+ 0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x23,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3e,
+ 0x20,0x23,0x6b,0x20,0x61,0x6e,0x64,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,0x68,
+ 0x5f,0x70,0x61,0x74,0x68,0x73,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,
+ 0x62,0x28,0x31,0x2c,0x23,0x6b,0x29,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,
+ 0x23,0x6b,0x2b,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x52,0x46,0x43,0x32,
+ 0x33,0x39,0x36,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x69,0x61,0x6e,0x74,0x20,0x55,0x52,
+ 0x49,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x2c,0x20,0x6f,0x72,0x20,0x66,0x61,0x6c,0x73,0x65,0x20,0x69,0x66,0x20,
+ 0x74,0x68,0x65,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x66,0x61,0x69,0x6c,
+ 0x65,0x64,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x67,0x65,0x74,0x5f,0x61,0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,
+ 0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,
+ 0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,
+ 0x72,0x65,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,
+ 0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x63,0x6f,
+ 0x6e,0x76,0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,
+ 0x65,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,
+ 0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x20,
+ 0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x73,0x6f,
+ 0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x73,0x5f,
+ 0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x6e,0x6f,
+ 0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x20,
+ 0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x4d,0x2e,
+ 0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x20,
+ 0x2e,0x2e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,
+ 0x68,0x29,0x2d,0x2d,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e,
+ 0x2e,0x20,0x22,0x2f,0x73,0x72,0x63,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x72,
+ 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69,
+ 0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,
+ 0x64,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,
+ 0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,0x28,0x23,0x73,0x6f,
+ 0x75,0x72,0x63,0x65,0x2d,0x33,0x2c,0x2d,0x31,0x29,0x3a,0x6c,0x6f,0x77,0x65,0x72,
+ 0x28,0x29,0x20,0x3d,0x3d,0x20,0x22,0x2e,0x6c,0x75,0x61,0x22,0x20,0x74,0x68,0x65,
+ 0x6e,0x20,0x2d,0x2d,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,
+ 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x6f,
+ 0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x28,0x61,0x64,0x64,0x65,0x64,
+ 0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,
+ 0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,
+ 0x74,0x5f,0x74,0x6f,0x5f,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x5f,0x66,0x69,0x6c,
+ 0x65,0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6f,0x73,0x20,0x3f,0x3f,0x3f,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,
+ 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6f,0x73,
+ 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76,
+ 0x65,0x72,0x74,0x5f,0x74,0x6f,0x5f,0x69,0x6f,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,
+ 0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,
+ 0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,
+ 0x7a,0x65,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e,0x69,0x73,
+ 0x5f,0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x6e,
+ 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,
+ 0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x4d,
+ 0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,
+ 0x20,0x2e,0x2e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,
+ 0x74,0x68,0x29,0x2d,0x2d,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,
+ 0x2e,0x2e,0x20,0x22,0x2f,0x73,0x72,0x63,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x6e,0x6f,
+ 0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,
+ 0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,
+ 0x65,0x64,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
+ 0x20,0x2d,0x2d,0x20,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x20,0x63,0x6f,0x64,0x65,
+ 0x2c,0x20,0x73,0x74,0x72,0x69,0x70,0x70,0x65,0x64,0x20,0x62,0x79,0x74,0x65,0x63,
+ 0x6f,0x64,0x65,0x2c,0x20,0x74,0x61,0x69,0x6c,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x2c,0x20,0x2e,0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x46,0x49,0x58,0x4d,0x45,0x3a,
+ 0x20,0x61,0x73,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x73,0x20,0x63,0x61,
+ 0x63,0x68,0x65,0x64,0x2c,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x73,0x20,0x69,0x6e,
+ 0x20,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x61,0x74,0x68,0x20,0x74,0x68,
+ 0x61,0x74,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x74,0x68,0x65,0x20,0x6d,0x6f,
+ 0x64,0x75,0x6c,0x65,0x20,0x6e,0x61,0x6d,0x65,0x20,0x61,0x72,0x65,0x20,0x6d,0x69,
+ 0x73,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x28,0x6d,0x6f,0x73,0x74,0x6c,0x79,0x20,
+ 0x61,0x66,0x66,0x65,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x20,0x6d,0x6f,0x64,0x75,
+ 0x6c,0x65,0x20,0x77,0x68,0x65,0x6e,0x20,0x4c,0x75,0x61,0x20,0x69,0x6e,0x74,0x65,
+ 0x72,0x70,0x72,0x65,0x74,0x65,0x72,0x20,0x69,0x73,0x20,0x6c,0x61,0x75,0x6e,0x63,
+ 0x68,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6e,0x20,0x61,0x62,0x73,0x6f,
+ 0x6c,0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x5f,0x6d,0x6f,
+ 0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,
+ 0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x72,0x65,0x61,0x6c,0x20,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x70,
+ 0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x3a,0x73,0x75,0x62,
+ 0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,0x61,0x74,0x68,
+ 0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x73,
+ 0x6f,0x75,0x72,0x63,0x65,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x75,0x61,0x70,0x61,0x74,0x68,
+ 0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x73,0x70,0x6c,0x69,0x74,0x20,0x28,0x70,
+ 0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x3b,0x22,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x69,0x73,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,
+ 0x74,0x65,0x20,0x3d,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f,0x61,
+ 0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x70,0x61,
+ 0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,
+ 0x6f,0x72,0x6b,0x61,0x72,0x72,0x6f,0x75,0x6e,0x64,0x20,0x3a,0x20,0x41,0x64,0x64,
+ 0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x74,0x68,0x65,0x20,0x3f,0x2e,0x6c,0x75,
+ 0x61,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x74,0x6f,0x20,0x73,0x75,0x70,0x70,0x6f,
+ 0x72,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,
+ 0x65,0x20,0x63,0x61,0x73,0x65,0x20,0x77,0x68,0x65,0x72,0x65,0x20,0x66,0x69,0x6c,
+ 0x65,0x20,0x77,0x61,0x73,0x20,0x6c,0x6f,0x61,0x64,0x65,0x64,0x20,0x62,0x79,0x20,
+ 0x3a,0x20,0x22,0x6c,0x75,0x61,0x20,0x6d,0x79,0x66,0x69,0x6c,0x65,0x2e,0x6c,0x75,
+ 0x61,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,
+ 0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c,0x75,0x61,0x70,0x61,0x74,0x68,0x74,
+ 0x61,0x62,0x6c,0x65,0x2c,0x22,0x3f,0x2e,0x6c,0x75,0x61,0x22,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x2c,0x76,0x61,0x72,0x20,
+ 0x69,0x6e,0x20,0x69,0x70,0x61,0x69,0x72,0x73,0x28,0x6c,0x75,0x61,0x70,0x61,0x74,
+ 0x68,0x74,0x61,0x62,0x6c,0x65,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x76,0x6f,0x69,0x64,0x20,
+ 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,
+ 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c,
+ 0x75,0x74,0x65,0x20,0x6f,0x6e,0x65,0x73,0x20,0x28,0x65,0x2e,0x67,0x2e,0x20,0x3f,
+ 0x2e,0x6c,0x75,0x61,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x73,0x20,0x61,0x6e,0x79,
+ 0x74,0x68,0x69,0x6e,0x67,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f,
+ 0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x28,0x76,0x61,0x72,0x29,0x20,0x3d,0x3d,
+ 0x20,0x69,0x73,0x5f,0x73,0x6f,0x75,0x72,0x63,0x65,0x5f,0x61,0x62,0x73,0x6f,0x6c,
+ 0x75,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,
+ 0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,
+ 0x67,0x73,0x75,0x62,0x28,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,
+ 0x28,0x76,0x61,0x72,0x29,0x2c,0x22,0x5b,0x25,0x5e,0x25,0x24,0x25,0x28,0x25,0x29,
+ 0x25,0x25,0x25,0x2e,0x25,0x5b,0x25,0x5d,0x25,0x2a,0x25,0x2b,0x25,0x2d,0x25,0x3f,
+ 0x5d,0x22,0x2c,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x29,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x25,0x22,0x2e,0x2e,0x63,0x20,0x65,0x6e,0x64,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x20,
+ 0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x65,0x73,
+ 0x63,0x61,0x70,0x65,0x64,0x2c,0x22,0x25,0x25,0x25,0x3f,0x22,0x2c,0x22,0x28,0x2e,
+ 0x2b,0x29,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x6f,0x64,0x75,0x6c,
+ 0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x6d,
+ 0x61,0x74,0x63,0x68,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x70,
+ 0x61,0x74,0x68,0x2c,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,
+ 0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x6d,0x6f,0x64,
+ 0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x2c,0x22,0x2f,0x22,0x2c,0x22,0x2e,0x22,0x29,
+ 0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x66,0x20,0x77,0x65,0x20,0x66,
+ 0x69,0x6e,0x64,0x20,0x6d,0x6f,0x72,0x65,0x20,0x74,0x68,0x61,0x6e,0x20,0x31,0x20,
+ 0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,
+ 0x61,0x6d,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x68,0x65,0x20,0x73,
+ 0x68,0x6f,0x72,0x74,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,
+ 0x74,0x20,0x75,0x72,0x69,0x20,0x6f,0x72,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,
+ 0x6c,0x65,0x6e,0x28,0x75,0x72,0x69,0x29,0x3e,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,
+ 0x6c,0x65,0x6e,0x28,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x29,0x20,
+ 0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69,
+ 0x20,0x3d,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x22,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x3a,0x2f,0x2f,0x2f,0x22,0x2e,0x2e,0x75,
+ 0x72,0x69,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,
+ 0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x20,0x69,
+ 0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68,
+ 0x65,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x75,0x72,0x69,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x69,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x74,0x20,0x66,0x6f,0x75,0x6e,
+ 0x64,0x2c,0x20,0x63,0x72,0x65,0x61,0x74,0x65,0x20,0x75,0x72,0x69,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x75,0x74,0x69,0x6c,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,
+ 0x65,0x73,0x2e,0x75,0x72,0x69,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x6f,0x64,0x75,0x6c,
+ 0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x75,0x72,0x69,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x6d,0x6f,0x64,0x75,0x6c,0x65,
+ 0x5f,0x75,0x72,0x69,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x72,0x69,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x67,0x65,0x74,0x5f,0x61,
+ 0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x28,0x73,0x6f,0x75,
+ 0x72,0x63,0x65,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,
+ 0x20,0x67,0x65,0x74,0x5f,0x61,0x62,0x73,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,0x72,
+ 0x69,0x20,0x28,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68,
+ 0x65,0x5b,0x73,0x6f,0x75,0x72,0x63,0x65,0x5d,0x20,0x3d,0x20,0x75,0x72,0x69,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x69,0x0a,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x70,0x61,0x74,0x68,0x20,
+ 0x66,0x69,0x6c,0x65,0x20,0x66,0x72,0x6f,0x6d,0x20,0x75,0x72,0x69,0x0a,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x67,0x65,0x74,0x5f,0x70,0x61,0x74,
+ 0x68,0x20,0x28,0x75,0x72,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,
+ 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x75,0x72,0x6c,0x2e,0x70,0x61,0x72,0x73,0x65,
+ 0x28,0x75,0x72,0x69,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,
+ 0x72,0x73,0x65,0x64,0x5f,0x70,0x61,0x74,0x68,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,
+ 0x20,0x3d,0x3d,0x20,0x22,0x66,0x69,0x6c,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,
+ 0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,
+ 0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x61,0x72,0x63,0x68,
+ 0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x77,0x65,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x73,
+ 0x75,0x72,0x65,0x6c,0x79,0x20,0x63,0x61,0x6c,0x63,0x75,0x6c,0x61,0x74,0x65,0x20,
+ 0x69,0x74,0x20,0x69,0x6e,0x73,0x74,0x65,0x61,0x64,0x20,0x6f,0x66,0x20,0x66,0x69,
+ 0x6e,0x64,0x20,0x69,0x6e,0x20,0x63,0x61,0x63,0x68,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70,
+ 0x61,0x69,0x72,0x73,0x28,0x75,0x72,0x69,0x5f,0x63,0x61,0x63,0x68,0x65,0x29,0x64,
+ 0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x76,0x20,0x3d,0x3d,0x20,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x73,0x73,0x65,0x72,0x74,0x28,0x6b,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,
+ 0x20,0x3d,0x3d,0x20,0x22,0x40,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x6b,0x3a,0x73,0x75,0x62,0x28,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6e,0x6f,0x72,
+ 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x74,0x73,0x20,0x3d,0x20,0x7b,
+ 0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x77,0x20,0x69,0x6e,0x20,
+ 0x70,0x61,0x74,0x68,0x3a,0x67,0x6d,0x61,0x74,0x63,0x68,0x28,0x22,0x5b,0x5e,0x2f,
+ 0x5d,0x2b,0x22,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x20,0x20,0x20,0x20,0x77,0x20,0x3d,0x3d,0x20,0x22,0x2e,0x2e,0x22,
+ 0x20,0x61,0x6e,0x64,0x20,0x23,0x70,0x61,0x72,0x74,0x73,0x20,0x7e,0x3d,0x30,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76,
+ 0x65,0x28,0x70,0x61,0x72,0x74,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x77,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x22,
+ 0x20,0x20,0x74,0x68,0x65,0x6e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,
+ 0x65,0x72,0x74,0x28,0x70,0x61,0x72,0x74,0x73,0x2c,0x20,0x77,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x28,0x70,0x61,
+ 0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,
+ 0x2f,0x22,0x20,0x61,0x6e,0x64,0x20,0x22,0x2f,0x22,0x20,0x6f,0x72,0x20,0x22,0x22,
+ 0x29,0x20,0x2e,0x2e,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,
+ 0x74,0x28,0x70,0x61,0x72,0x74,0x73,0x2c,0x20,0x22,0x2f,0x22,0x29,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x69,0x6e,
+ 0x69,0x74,0x28,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,
+ 0x66,0x6f,0x72,0x6d,0x2c,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,
+ 0x63,0x74,0x6f,0x72,0x79,0x2c,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,
+ 0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x68,0x65,0x63,0x6b,0x20,0x70,0x61,0x72,
+ 0x61,0x6d,0x65,0x74,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x78,
+ 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,
+ 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,
+ 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x20,0x22,0x75,0x6e,0x69,0x78,0x22,0x20,
+ 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,
+ 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x77,0x69,0x6e,0x22,0x20,0x61,0x6e,
+ 0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,
+ 0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20,
+ 0x61,0x6e,0x64,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,
+ 0x74,0x66,0x6f,0x72,0x6d,0x20,0x7e,0x3d,0x22,0x69,0x6f,0x73,0x22,0x74,0x68,0x65,
+ 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,
+ 0x22,0x55,0x6e,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x69,0x6e,0x69,0x74,0x69,
+ 0x61,0x6c,0x69,0x7a,0x65,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x6d,
+ 0x6f,0x64,0x75,0x6c,0x65,0x20,0x3a,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,
+ 0x6e,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x73,0x68,0x6f,0x75,0x6c,
+ 0x64,0x20,0x62,0x65,0x20,0x27,0x75,0x6e,0x69,0x78,0x27,0x20,0x6f,0x72,0x20,0x27,
+ 0x77,0x69,0x6e,0x27,0x2e,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20,0x70,0x61,0x72,0x61,
+ 0x6d,0x65,0x74,0x65,0x72,0x20,0x61,0x73,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,
+ 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,
+ 0x72,0x6d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x65,0x78,0x65,0x63,0x75,
+ 0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x74,0x72,
+ 0x79,0x20,0x74,0x6f,0x20,0x67,0x75,0x65,0x73,0x73,0x20,0x69,0x74,0x2e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x28,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x70,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x70,0x6f,0x70,0x65,0x6e,
+ 0x28,0x22,0x65,0x63,0x68,0x6f,0x20,0x25,0x6f,0x73,0x25,0x22,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,
+ 0x20,0x3d,0x70,0x3a,0x72,0x65,0x61,0x64,0x28,0x22,0x2a,0x6c,0x22,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,
+ 0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x3d,0x20,0x22,0x57,0x69,0x6e,0x64,0x6f,
+ 0x77,0x73,0x5f,0x4e,0x54,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x61,0x74,0x75,
+ 0x73,0x2c,0x20,0x69,0x73,0x77,0x69,0x6e,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c,
+ 0x28,0x69,0x73,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x61,0x6e,
+ 0x64,0x20,0x69,0x73,0x77,0x69,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,
+ 0x6d,0x20,0x3d,0x20,0x22,0x77,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x20,0x22,0x75,
+ 0x6e,0x69,0x78,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,
+ 0x6e,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x75,
+ 0x6e,0x69,0x78,0x22,0x20,0x6f,0x72,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,
+ 0x20,0x3d,0x3d,0x20,0x22,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x22,0x20,0x6f,0x72,
+ 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6f,
+ 0x73,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x54,0x68,0x65,0x20,0x50,0x61,0x74,0x68,0x20,0x73,0x65,0x70,0x61,
+ 0x72,0x61,0x74,0x6f,0x72,0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x70,0x61,0x74,0x68,0x5f,0x73,
+ 0x65,0x70,0x20,0x3d,0x20,0x22,0x2f,0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x20,0x74,0x68,0x65,0x20,0x77,0x61,
+ 0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x61,0x62,0x73,
+ 0x6f,0x6c,0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x61,0x6e,0x20,0x62,
+ 0x65,0x20,0x77,0x72,0x6f,0x6e,0x67,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x70,
+ 0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x6c,0x6f,0x61,0x64,0x73,0x20,0x6e,0x65,0x77,
+ 0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69,0x6c,0x65,0x73,0x20,0x62,0x79,
+ 0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x61,
+ 0x66,0x74,0x65,0x72,0x20,0x61,0x20,0x63,0x64,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x6c,0x79,0x2c,
+ 0x20,0x74,0x68,0x65,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x69,
+ 0x73,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x65,0x64,0x20,0x6f,0x6e,0x20,
+ 0x73,0x74,0x61,0x72,0x74,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x61,0x6c,0x6c,0x6f,
+ 0x77,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x74,0x6f,0x20,0x6c,0x6f,
+ 0x61,0x64,0x20,0x61,0x6e,0x79,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x66,0x69,
+ 0x6c,0x65,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x63,0x68,0x61,0x6e,
+ 0x67,0x65,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x20,0x64,0x69,0x72,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x68,0x69,0x63,0x68,
+ 0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x6d,0x6f,0x73,0x74,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x6f,0x6e,0x20,0x75,0x73,0x65,0x20,0x63,0x61,0x73,0x65,0x2e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,
+ 0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,
+ 0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,
+ 0x28,0x22,0x50,0x57,0x44,0x22,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x20,0x55,0x52,0x4c,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,
+ 0x66,0x69,0x6c,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x20,0x66,0x6f,0x72,0x20,0x74,
+ 0x68,0x65,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x4f,0x53,0x20,0x28,0x73,
+ 0x65,0x65,0x20,0x75,0x72,0x6c,0x2e,0x70,0x61,0x72,0x73,0x65,0x20,0x66,0x72,0x6f,
+ 0x6d,0x20,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69,0x6c,0x65,0x5f,0x75,
+ 0x72,0x69,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,
+ 0x61,0x74,0x68,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x69,0x6e,0x64,0x28,
+ 0x70,0x61,0x74,0x68,0x2c,0x22,0x2f,0x22,0x29,0x20,0x7e,0x3d,0x20,0x31,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x3d,0x22,0x2f,0x22,0x2e,0x2e,0x70,0x61,
+ 0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x2e,0x62,0x75,0x69,0x6c,0x64,0x7b,
+ 0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x61,0x75,
+ 0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d,0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68,
+ 0x3d,0x70,0x61,0x74,0x68,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75,0x65,0x20,0x69,0x73,0x20,0x74,0x68,
+ 0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,
+ 0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,
+ 0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x6e,
+ 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x4d,0x2e,0x69,0x73,0x5f,0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,
+ 0x6c,0x75,0x74,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,
+ 0x74,0x68,0x3a,0x73,0x75,0x62,0x28,0x31,0x2c,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,
+ 0x2f,0x22,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,0x74,0x20,0x61,0x62,0x73,0x6f,0x6c,
+ 0x75,0x74,0x65,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x64,0x20,0x70,
+ 0x61,0x74,0x68,0x20,0x66,0x69,0x6c,0x65,0x20,0x74,0x6f,0x20,0x75,0x72,0x69,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74,
+ 0x68,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,
+ 0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x75,0x72,0x6c,0x2e,0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x65,0x28,0x70,0x61,
+ 0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,0x2e,0x70,0x61,0x74,0x68,0x29,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x49,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,
+ 0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x66,0x6f,0x72,0x20,0x57,0x69,0x6e,0x64,0x6f,
+ 0x77,0x73,0x2c,0x20,0x73,0x65,0x65,0x20,0x55,0x4e,0x49,0x58,0x20,0x76,0x65,0x72,
+ 0x73,0x69,0x6f,0x6e,0x73,0x20,0x66,0x6f,0x72,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,
+ 0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x4d,0x2e,0x70,0x61,0x74,0x68,0x5f,0x73,0x65,0x70,0x20,0x3d,0x20,0x22,0x5c,
+ 0x5c,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x69,0x73,0x5f,
+ 0x70,0x61,0x74,0x68,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x74,0x68,0x29,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x3a,0x6d,0x61,0x74,0x63,
+ 0x68,0x28,0x22,0x5e,0x25,0x61,0x3a,0x2f,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x74,0x6f,0x5f,0x66,0x69,0x6c,0x65,
+ 0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,
+ 0x6c,0x2e,0x62,0x75,0x69,0x6c,0x64,0x7b,0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x22,
+ 0x66,0x69,0x6c,0x65,0x22,0x2c,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d,
+ 0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68,0x3d,0x22,0x2f,0x22,0x2e,0x2e,0x70,0x61,
+ 0x74,0x68,0x7d,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x4d,0x2e,0x74,0x6f,0x5f,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,
+ 0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x2e,0x75,0x6e,0x65,
+ 0x73,0x63,0x61,0x70,0x65,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5f,0x75,0x72,0x6c,
+ 0x2e,0x70,0x61,0x74,0x68,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5e,0x2f,0x22,
+ 0x2c,0x20,0x22,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x6e,0x69,0x78,0x6e,0x6f,0x72,
+ 0x6d,0x61,0x6c,0x69,0x7a,0x65,0x20,0x3d,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,
+ 0x6c,0x69,0x7a,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x6e,
+ 0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x70,0x61,0x74,0x68,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x75,0x6e,0x69,0x78,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,
+ 0x61,0x74,0x68,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x5c,0x22,0x2c,0x22,0x2f,
+ 0x22,0x29,0x3a,0x6c,0x6f,0x77,0x65,0x72,0x28,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x74,0x65,
+ 0x72,0x6d,0x69,0x6e,0x65,0x20,0x62,0x61,0x73,0x65,0x20,0x64,0x69,0x72,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,
+ 0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x20,
+ 0x3d,0x20,0x69,0x6f,0x2e,0x70,0x6f,0x70,0x65,0x6e,0x28,0x22,0x65,0x63,0x68,0x6f,
+ 0x20,0x25,0x63,0x64,0x25,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x20,0x3d,0x20,0x70,0x3a,0x72,0x65,0x61,0x64,
+ 0x28,0x22,0x2a,0x6c,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
+ 0x69,0x7a,0x65,0x28,0x72,0x65,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62,
+ 0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,
+ 0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x67,0x65,
+ 0x74,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,
+ 0x79,0x28,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x66,0x69,0x78,0x20,0x62,0x75,0x67,0x3a,0x20,0x63,0x61,0x6e,0x20,
+ 0x6e,0x6f,0x74,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x77,0x68,0x65,0x6e,0x20,0x70,
+ 0x72,0x6f,0x6a,0x65,0x63,0x74,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x6f,0x6e,0x74,
+ 0x61,0x69,0x6e,0x73,0x20,0x62,0x6c,0x61,0x6e,0x6b,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x20,0x62,0x6c,0x61,0x6e,0x6b,0x20,0x77,
+ 0x69,0x74,0x68,0x20,0x25,0x32,0x30,0x20,0x28,0x61,0x64,0x64,0x20,0x62,0x79,0x20,
+ 0x67,0x75,0x61,0x6e,0x79,0x75,0x29,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x62,0x61,
+ 0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x3d,0x20,0x4d,0x2e,0x62,0x61,0x73,0x65,0x5f,
+ 0x64,0x69,0x72,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x20,0x22,0x2c,0x22,0x25,0x25,
+ 0x32,0x30,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,
+ 0x6a,0x73,0x2f,0x6c,0x75,0x61,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x73,0x65,
+ 0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x20,0x69,0x66,0x20,0x68,0x61,0x73,0x20,
+ 0x6d,0x6f,0x72,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x6f,0x6e,0x65,0x2c,0x20,0x73,
+ 0x70,0x6c,0x69,0x74,0x20,0x74,0x68,0x65,0x6d,0x20,0x77,0x69,0x74,0x68,0x20,0x61,
+ 0x20,0x73,0x65,0x6d,0x69,0x63,0x6f,0x6c,0x6f,0x6e,0x20,0x22,0x3b,0x22,0x20,0x28,
+ 0x61,0x64,0x64,0x65,0x64,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,0x75,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,
+ 0x74,0x68,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x4d,0x2e,0x73,0x65,0x61,0x72,0x63,
+ 0x68,0x5f,0x70,0x61,0x74,0x68,0x73,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x76,0x65,0x72,
+ 0x74,0x5f,0x74,0x6f,0x5f,0x73,0x65,0x61,0x72,0x63,0x68,0x5f,0x70,0x61,0x74,0x68,
+ 0x73,0x28,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x4d,0x2e,
+ 0x62,0x61,0x73,0x65,0x5f,0x64,0x69,0x72,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72,
+ 0x72,0x6f,0x72,0x28,0x22,0x55,0x6e,0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x64,
+ 0x65,0x74,0x65,0x72,0x6d,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x20,0x77,0x6f,0x72,
+ 0x6b,0x69,0x6e,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2e,0x22,
+ 0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,
+ 0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,
+ 0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,0x79,
+ 0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,0x32,
+ 0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,
+ 0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,0x65,
+ 0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,
+ 0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x63,
+ 0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,0x69,
+ 0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,0x20,
+ 0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,0x20,
+ 0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,
+ 0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,
+ 0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,0x65,
+ 0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,
+ 0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,0x69,
+ 0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,0x70,
+ 0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,0x6f,
+ 0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,0x30,
+ 0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,0x74,
+ 0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,
+ 0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,0x73,
+ 0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,0x61,
+ 0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,
+ 0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x55,0x74,0x69,0x6c,0x69,0x74,0x79,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4d,
+ 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x6c,0x6f,0x67,0x20,0x73,
+ 0x79,0x73,0x74,0x65,0x6d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4c,0x45,0x56,0x45,
+ 0x4c,0x53,0x20,0x3d,0x20,0x7b,0x20,0x45,0x52,0x52,0x4f,0x52,0x20,0x3d,0x20,0x30,
+ 0x2c,0x20,0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x20,0x3d,0x20,0x31,0x2c,0x20,0x49,
+ 0x4e,0x46,0x4f,0x20,0x3d,0x20,0x32,0x2c,0x20,0x44,0x45,0x54,0x41,0x49,0x4c,0x20,
+ 0x3d,0x20,0x33,0x2c,0x20,0x44,0x45,0x42,0x55,0x47,0x20,0x3d,0x20,0x34,0x20,0x7d,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x4c,0x4f,0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c,
+ 0x20,0x3d,0x20,0x4c,0x45,0x56,0x45,0x4c,0x53,0x2e,0x57,0x41,0x52,0x4e,0x49,0x4e,
+ 0x47,0x0a,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x66,
+ 0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,
+ 0x2e,0x20,0x41,0x6e,0x79,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x63,0x61,
+ 0x6e,0x20,0x62,0x65,0x20,0x67,0x65,0x74,0x20,0x6c,0x69,0x6b,0x65,0x20,0x61,0x6e,
+ 0x79,0x20,0x72,0x65,0x67,0x75,0x6c,0x61,0x72,0x20,0x74,0x61,0x62,0x6c,0x65,0x2c,
+ 0x20,0x73,0x65,0x74,0x74,0x69,0x6e,0x67,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,
+ 0x73,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x0a,0x2d,0x2d,0x20,0x65,
+ 0x72,0x72,0x6f,0x72,0x20,0x66,0x6f,0x72,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,
+ 0x20,0x6f,0x72,0x20,0x72,0x65,0x61,0x64,0x2d,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x65,
+ 0x61,0x74,0x75,0x72,0x65,0x73,0x2e,0x0a,0x4d,0x2e,0x66,0x65,0x61,0x74,0x75,0x72,
+ 0x65,0x73,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x66,
+ 0x6f,0x72,0x6d,0x61,0x74,0x2f,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x20,0x64,
+ 0x61,0x74,0x61,0x2e,0x20,0x49,0x66,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x64,
+ 0x2c,0x20,0x74,0x68,0x65,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x63,0x61,
+ 0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x64,
+ 0x2e,0x0a,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x73,
+ 0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x75,0x6c,
+ 0x74,0x69,0x70,0x6c,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x20,0x3d,
+ 0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x74,0x6f,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6d,0x61,0x78,0x5f,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x74,
+ 0x6f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,
+ 0x6d,0x62,0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,
+ 0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,
+ 0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x68,0x6f,0x77,
+ 0x5f,0x68,0x69,0x64,0x64,0x65,0x6e,0x20,0x3d,0x20,0x74,0x6f,0x6e,0x75,0x6d,0x62,
+ 0x65,0x72,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x72,0x69,0x20,
+ 0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6c,0x65,0x76,0x65,0x6c,0x5f,0x6e,
+ 0x61,0x6d,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x61,
+ 0x6c,0x20,0x69,0x6e,0x64,0x65,0x78,0x20,0x69,0x6e,0x20,0x69,0x6e,0x74,0x65,0x72,
+ 0x6e,0x61,0x6c,0x20,0x76,0x61,0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x4c,0x4f,0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c,0x20,0x3d,0x20,
+ 0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x4c,0x45,0x56,0x45,0x4c,0x53,0x5b,0x6c,0x65,
+ 0x76,0x65,0x6c,0x5f,0x6e,0x61,0x6d,0x65,0x5d,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,
+ 0x75,0x63,0x68,0x20,0x6c,0x65,0x76,0x65,0x6c,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6c,
+ 0x65,0x76,0x65,0x6c,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,
+ 0x20,0x64,0x69,0x73,0x70,0x6c,0x61,0x79,0x65,0x64,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x20,0x69,0x73,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x74,0x68,0x65,0x20,0x6e,0x61,
+ 0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,0x20,0x5f,0x5f,0x69,0x6e,0x64,
+ 0x65,0x78,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,
+ 0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,
+ 0x20,0x3d,0x20,0x30,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x63,0x6f,0x64,0x69,0x6e,0x67,0x20,0x3d,0x22,0x55,0x54,0x46,0x2d,0x38,0x22,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x5f,0x63,0x68,0x69,
+ 0x6c,0x64,0x72,0x65,0x6e,0x20,0x3d,0x20,0x33,0x32,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x5f,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x30,
+ 0x78,0x46,0x46,0x46,0x46,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,
+ 0x61,0x78,0x5f,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x68,0x6f,0x77,0x5f,0x68,0x69,0x64,0x64,0x65,
+ 0x6e,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,
+ 0x72,0x69,0x20,0x3d,0x20,0x22,0x66,0x69,0x6c,0x65,0x22,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,
+ 0x20,0x22,0x57,0x41,0x52,0x4e,0x49,0x4e,0x47,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x65,0x61,0x64,0x20,0x6f,0x6e,0x6c,0x79,
+ 0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x5f,0x73,0x75,0x70,0x70,0x6f,
+ 0x72,0x74,0x73,0x5f,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x20,0x3d,0x20,0x30,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,
+ 0x65,0x5f,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x22,0x4c,0x75,0x61,0x22,0x2c,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,
+ 0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x56,0x45,0x52,0x53,
+ 0x49,0x4f,0x4e,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,
+ 0x74,0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,
+ 0x31,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x75,0x70,0x70,0x6f,
+ 0x72,0x74,0x73,0x5f,0x61,0x73,0x79,0x6e,0x63,0x20,0x3d,0x20,0x31,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x61,0x74,0x61,0x5f,0x65,0x6e,0x63,0x6f,
+ 0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x22,0x62,0x61,0x73,0x65,0x36,0x34,0x22,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x5f,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x73,0x20,0x3d,0x20,
+ 0x22,0x4c,0x75,0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
+ 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x73,0x20,
+ 0x3d,0x20,0x22,0x6c,0x69,0x6e,0x65,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,
+ 0x6e,0x61,0x6c,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,
+ 0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6b,0x2c,0x20,
+ 0x76,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x6d,0x74,0x20,0x3d,0x20,0x67,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,
+ 0x6c,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x2c,0x20,0x76,
+ 0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x20,0x3d,0x20,0x6d,0x74,0x2e,0x5f,0x5f,
+ 0x69,0x6e,0x64,0x65,0x78,0x2c,0x20,0x6d,0x74,0x2e,0x76,0x61,0x6c,0x69,0x64,0x61,
+ 0x74,0x6f,0x72,0x73,0x5b,0x6b,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x5b,0x6b,0x5d,0x20,0x3d,0x3d,0x20,
+ 0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,
+ 0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x20,
+ 0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,
+ 0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,
+ 0x20,0x6e,0x6f,0x74,0x20,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x22,0x54,0x68,0x65,0x20,0x66,
+ 0x65,0x61,0x74,0x75,0x72,0x65,0x20,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x28,0x6b,0x29,0x20,0x2e,0x2e,0x20,0x22,0x20,0x69,0x73,0x20,
+ 0x72,0x65,0x61,0x64,0x2d,0x6f,0x6e,0x6c,0x79,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x20,0x3d,0x20,0x61,0x73,0x73,0x65,
+ 0x72,0x74,0x28,0x76,0x61,0x6c,0x69,0x64,0x61,0x74,0x6f,0x72,0x28,0x76,0x29,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x5b,
+ 0x6b,0x5d,0x20,0x3d,0x20,0x76,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,0x0a,
+ 0x7d,0x29,0x0a,0x0a,0x2d,0x2d,0x20,0x57,0x72,0x61,0x70,0x73,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,
+ 0x61,0x6e,0x20,0x61,0x74,0x74,0x61,0x63,0x68,0x65,0x64,0x20,0x74,0x68,0x72,0x65,
+ 0x61,0x64,0x0a,0x2d,0x2d,0x20,0x61,0x6c,0x73,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c,
+ 0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x26,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x20,0x6d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x20,0x64,
+ 0x69,0x66,0x66,0x65,0x72,0x65,0x6e,0x63,0x69,0x65,0x73,0x20,0x62,0x65,0x74,0x77,
+ 0x65,0x65,0x6e,0x20,0x4c,0x75,0x61,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x73,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20,
+ 0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x2c,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,
+ 0x66,0x6f,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x20,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,
+ 0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x70,0x61,0x75,0x73,0x65,0x64,0x20,0x74,0x68,
+ 0x72,0x65,0x61,0x64,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x46,0x6f,0x72,0x65,0x69,
+ 0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x20,0x3d,0x20,0x7b,0x0a,0x20,
+ 0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x65,0x6c,
+ 0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,
+ 0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,
+ 0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,
+ 0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,
+ 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,
+ 0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,
+ 0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,
+ 0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,
+ 0x0a,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,
+ 0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x46,0x6f,0x72,0x65,0x69,
+ 0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x0a,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,
+ 0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,
+ 0x63,0x6f,0x72,0x6f,0x20,0x7d,0x2c,0x20,0x46,0x6f,0x72,0x65,0x69,0x67,0x6e,0x54,
+ 0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
+ 0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x74,0x68,0x61,0x74,
+ 0x20,0x63,0x61,0x75,0x73,0x65,0x64,0x20,0x74,0x68,0x65,0x20,0x68,0x6f,0x6f,0x6b,
+ 0x0a,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x6e,0x64,0x65,0x64,0x20,0x74,0x6f,0x20,
+ 0x62,0x65,0x20,0x75,0x73,0x65,0x64,0x20,0x2a,0x4f,0x4e,0x4c,0x59,0x2a,0x20,0x69,
+ 0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x28,0x65,0x78,
+ 0x65,0x63,0x75,0x74,0x65,0x64,0x20,0x69,0x6e,0x20,0x61,0x20,0x6e,0x65,0x77,0x20,
+ 0x74,0x68,0x72,0x65,0x61,0x64,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x43,0x75,
+ 0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x20,0x3d,0x20,
+ 0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,
+ 0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,
+ 0x20,0x32,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65,
+ 0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32,
+ 0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,
+ 0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x73,0x65,0x6c,0x66,0x5b,
+ 0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32,0x2c,0x20,0x69,
+ 0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,
+ 0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x2e,
+ 0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x43,0x75,0x72,0x72,0x65,0x6e,
+ 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x4d,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,
+ 0x61,0x64,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x7b,0x20,0x63,
+ 0x6f,0x72,0x6f,0x20,0x7d,0x2c,0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,
+ 0x72,0x65,0x61,0x64,0x4d,0x54,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x0a,0x2d,0x2d,
+ 0x20,0x53,0x6f,0x6d,0x65,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x64,0x65,
+ 0x70,0x65,0x6e,0x64,0x61,0x6e,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x73,0x0a,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,
+ 0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x73,
+ 0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65,
+ 0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61,
+ 0x64,0x20,0x3d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,
+ 0x76,0x2c,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x2c,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x6e,0x69,0x6c,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x20,0x35,0x2e,0x31,0x20,0x22,0x74,
+ 0x22,0x20,0x66,0x6c,0x61,0x67,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x65,0x78,0x69,0x73,0x74,0x20,0x61,0x6e,0x64,0x20,0x74,0x72,0x69,0x67,0x67,0x65,
+ 0x72,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x73,0x6f,0x20,0x72,0x65,
+ 0x6d,0x6f,0x76,0x65,0x20,0x69,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x77,0x68,0x61,
+ 0x74,0x0a,0x20,0x20,0x20,0x20,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,
+ 0x65,0x61,0x64,0x4d,0x54,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,
+ 0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x73,0x65,0x6c,0x66,0x5b,
+ 0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x2b,0x20,0x32,0x2c,0x20,0x77,
+ 0x68,0x61,0x74,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22,
+ 0x2c,0x20,0x31,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x46,0x6f,
+ 0x72,0x65,0x69,0x67,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x4d,0x54,0x2e,0x67,0x65,
+ 0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,
+ 0x61,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,
+ 0x66,0x6f,0x28,0x73,0x65,0x6c,0x66,0x5b,0x31,0x5d,0x2c,0x20,0x6c,0x65,0x76,0x65,
+ 0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,
+ 0x2c,0x20,0x22,0x22,0x2c,0x20,0x31,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x68,0x65,0x6e,0x20,0x77,0x65,0x27,0x72,0x65,
+ 0x20,0x66,0x6f,0x72,0x63,0x65,0x64,0x20,0x74,0x6f,0x20,0x73,0x74,0x61,0x72,0x74,
+ 0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x6f,0x6e,0x20,0x74,
+ 0x6f,0x70,0x20,0x6f,0x66,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x73,0x74,
+ 0x61,0x63,0x6b,0x20,0x28,0x77,0x68,0x65,0x6e,0x20,0x6f,0x6e,0x20,0x6d,0x61,0x69,
+ 0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,
+ 0x73,0x20,0x73,0x6f,0x6d,0x65,0x20,0x68,0x61,0x63,0x6b,0x65,0x72,0x79,0x20,0x74,
+ 0x6f,0x20,0x67,0x65,0x74,0x20,0x72,0x69,0x67,0x68,0x74,0x20,0x73,0x74,0x61,0x63,
+ 0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x46,0x61,0x6c,0x6c,0x62,0x61,0x63,0x6b,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x20,
+ 0x74,0x6f,0x20,0x69,0x6e,0x73,0x70,0x65,0x63,0x74,0x20,0x72,0x75,0x6e,0x6e,0x69,
+ 0x6e,0x67,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x28,0x6f,0x6e,0x6c,0x79,0x20,
+ 0x66,0x6f,0x72,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
+ 0x69,0x6e,0x20,0x35,0x2e,0x31,0x20,0x6f,0x72,0x20,0x66,0x6f,0x72,0x20,0x63,0x6f,
+ 0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,
+ 0x6f,0x69,0x6e,0x74,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x47,
+ 0x65,0x74,0x73,0x20,0x61,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x73,0x74,0x61,
+ 0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x64,
+ 0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x20,0x6c,0x6f,0x67,0x69,0x63,0x20,0x61,0x64,0x64,0x65,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x6c,0x20,0x28,0x6e,
+ 0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x66,0x6f,0x72,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x64,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x28,0x30,
+ 0x20,0x62,0x61,0x73,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x61,0x6c,0x20,0x4c,0x75,0x61,0x20,
+ 0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x73,0x75,0x69,0x74,
+ 0x61,0x62,0x6c,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x70,0x61,0x73,0x73,0x65,
+ 0x64,0x20,0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,0x64,0x65,0x75,0x62,0x67,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x67,0x65,0x74,
+ 0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x68,
+ 0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x68,
+ 0x6f,0x6f,0x6b,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,
+ 0x72,0x20,0x69,0x3d,0x32,0x2c,0x20,0x6d,0x61,0x74,0x68,0x2e,0x68,0x75,0x67,0x65,
+ 0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x64,0x65,0x62,0x75,0x67,0x2e,
+ 0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x69,0x2c,0x20,0x22,0x66,0x22,0x29,0x29,
+ 0x2e,0x66,0x75,0x6e,0x63,0x20,0x3d,0x3d,0x20,0x68,0x6f,0x6f,0x6b,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x20,0x2b,0x20,0x6c,0x20,
+ 0x2d,0x2d,0x20,0x74,0x68,0x65,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x74,0x6f,
+ 0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x69,0x73,0x20,0x6a,0x75,0x73,0x74,0x20,0x62,
+ 0x65,0x6c,0x6f,0x77,0x2c,0x20,0x62,0x75,0x74,0x20,0x62,0x65,0x63,0x61,0x75,0x73,
+ 0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x74,0x72,0x61,0x20,0x63,
+ 0x61,0x6c,0x6c,0x20,0x74,0x6f,0x20,0x74,0x68,0x69,0x73,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x74,0x68,0x65,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,
+ 0x69,0x73,0x20,0x6f,0x6b,0x20,0x66,0x6f,0x72,0x20,0x63,0x61,0x6c,0x6c,0x65,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x72,0x61,0x77,
+ 0x67,0x65,0x74,0x28,0x5f,0x47,0x2c,0x20,0x22,0x6a,0x69,0x74,0x22,0x29,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x61,0x69,0x6e,
+ 0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x22,0x6d,0x61,
+ 0x69,0x6e,0x22,0x2c,0x20,0x2d,0x2d,0x20,0x61,0x73,0x20,0x74,0x68,0x65,0x20,0x72,
+ 0x61,0x77,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,
+ 0x20,0x69,0x73,0x20,0x75,0x73,0x65,0x64,0x20,0x61,0x73,0x20,0x74,0x61,0x62,0x6c,
+ 0x65,0x20,0x6b,0x65,0x79,0x73,0x2c,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x20,
+ 0x61,0x20,0x72,0x65,0x70,0x6c,0x61,0x63,0x65,0x6d,0x65,0x6e,0x74,0x2e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x4c,0x75,
+ 0x61,0x4a,0x49,0x54,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x74,0x65,0x6c,0x79,0x20,
+ 0x65,0x6c,0x69,0x6d,0x69,0x6e,0x61,0x74,0x65,0x73,0x20,0x74,0x61,0x69,0x6c,0x20,
+ 0x63,0x61,0x6c,0x6c,0x73,0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,
+ 0x2c,0x20,0x73,0x6f,0x20,0x67,0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,
+ 0x6c,0x65,0x76,0x65,0x6c,0x20,0x72,0x65,0x74,0x75,0x6e,0x72,0x73,0x20,0x77,0x72,
+ 0x6f,0x6e,0x67,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x69,0x6e,0x20,0x74,0x68,
+ 0x69,0x73,0x20,0x63,0x61,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,
+ 0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x67,0x65,
+ 0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,
+ 0x65,0x76,0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x77,0x68,0x61,0x74,0x3a,
+ 0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20,0x31,0x29,
+ 0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,
+ 0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65,
+ 0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,
+ 0x65,0x76,0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,
+ 0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65,0x74,0x5f,
+ 0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x65,0x76,
+ 0x65,0x6c,0x29,0x20,0x2d,0x20,0x31,0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,
+ 0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,
+ 0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x31,
+ 0x5d,0x20,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,
+ 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,
+ 0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x69,0x6e,0x66,
+ 0x6f,0x28,0x67,0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,
+ 0x65,0x6c,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,0x20,0x2c,0x20,0x77,0x68,0x61,0x74,
+ 0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x74,0x22,0x2c,0x20,0x22,0x22,0x2c,0x20,0x31,
+ 0x29,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,
+ 0x76,0x65,0x6c,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,
+ 0x65,0x74,0x5f,0x73,0x63,0x72,0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,
+ 0x6c,0x65,0x76,0x65,0x6c,0x29,0x2c,0x20,0x69,0x64,0x78,0x29,0x20,0x65,0x6e,0x64,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,
+ 0x74,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x69,
+ 0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x65,0x74,0x6c,0x6f,0x63,0x61,0x6c,0x28,0x67,0x65,0x74,0x5f,0x73,0x63,0x72,
+ 0x69,0x70,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x28,0x6c,0x65,0x76,0x65,0x6c,0x29,
+ 0x2c,0x20,0x69,0x64,0x78,0x2c,0x20,0x76,0x61,0x6c,0x29,0x20,0x65,0x6e,0x64,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x49,0x66,0x20,
+ 0x74,0x68,0x65,0x20,0x56,0x4d,0x20,0x69,0x73,0x20,0x76,0x61,0x6e,0x69,0x6c,0x6c,
+ 0x61,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x6f,0x72,0x20,0x4c,0x75,0x61,
+ 0x4a,0x49,0x54,0x20,0x32,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,0x35,0x2e,
+ 0x32,0x20,0x63,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x2c,
+ 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x77,0x61,0x79,
+ 0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x61,0x20,0x72,0x65,0x66,0x65,0x72,0x65,
+ 0x6e,0x63,0x65,0x20,0x74,0x6f,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,
+ 0x65,0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x2c,0x20,0x73,0x6f,0x20,0x66,0x61,0x6c,0x6c,0x20,0x62,0x61,0x63,0x6b,0x20,0x74,
+ 0x6f,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x6d,0x6f,0x64,0x65,0x3a,0x20,0x74,
+ 0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,
+ 0x20,0x69,0x73,0x20,0x73,0x74,0x61,0x72,0x74,0x65,0x64,0x20,0x6f,0x6e,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x6f,0x70,0x20,0x6f,0x66,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x61,0x6e,0x64,
+ 0x20,0x74,0x68,0x65,0x20,0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x6c,0x65,0x76,0x65,
+ 0x6c,0x20,0x69,0x73,0x20,0x72,0x65,0x63,0x6f,0x6d,0x70,0x75,0x74,0x65,0x64,0x20,
+ 0x65,0x61,0x63,0x68,0x20,0x74,0x69,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x6f,0x6c,0x64,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,
+ 0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x4d,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,
+ 0x54,0x68,0x72,0x65,0x61,0x64,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x43,0x75,0x72,
+ 0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x20,0x61,0x6e,0x64,0x20,0x6f,0x6c,0x64,0x43,
+ 0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,
+ 0x6f,0x29,0x20,0x6f,0x72,0x20,0x4d,0x61,0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,
+ 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6c,0x6f,0x61,
+ 0x64,0x20,0x61,0x20,0x70,0x69,0x65,0x63,0x65,0x20,0x6f,0x66,0x20,0x63,0x6f,0x64,
+ 0x65,0x20,0x61,0x6c,0x6f,0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x69,0x74,0x73,0x20,
+ 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x61,0x64,0x69,
+ 0x6e,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x2c,0x65,0x72,0x72,0x20,0x3d,
+ 0x20,0x6c,0x6f,0x61,0x64,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x63,0x6f,0x64,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x66,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x72,0x72,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x20,0x61,0x6e,0x64,0x20,0x73,0x65,
+ 0x74,0x66,0x65,0x6e,0x76,0x28,0x66,0x2c,0x20,0x65,0x6e,0x76,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x74,0x68,
+ 0x61,0x74,0x20,0x6d,0x61,0x70,0x73,0x20,0x5b,0x67,0x73,0x5d,0x65,0x74,0x20,0x65,
+ 0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x74,0x6f,0x20,0x69,0x6e,
+ 0x64,0x65,0x78,0x0a,0x20,0x20,0x20,0x20,0x4d,0x2e,0x65,0x76,0x61,0x6c,0x5f,0x65,
+ 0x6e,0x76,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x66,0x75,0x6e,0x63,0x29,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x67,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x66,
+ 0x75,0x6e,0x63,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x5f,0x5f,0x6e,0x65,0x77,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x66,0x75,
+ 0x6e,0x63,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x28,0x66,0x75,0x6e,0x63,0x2c,0x20,0x65,0x6e,
+ 0x76,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x7d,0x29,0x0a,0x65,
+ 0x6c,0x73,0x65,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,
+ 0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x61,0x64,0x2c,
+ 0x20,0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x20,0x3d,
+ 0x20,0x6c,0x6f,0x61,0x64,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,
+ 0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x4d,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x63,0x6f,0x72,0x6f,
+ 0x2c,0x20,0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x6f,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,
+ 0x65,0x76,0x65,0x6c,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x5f,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x6c,0x65,
+ 0x76,0x65,0x6c,0x20,0x2b,0x20,0x31,0x2c,0x20,0x77,0x68,0x61,0x74,0x29,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x61,0x64,0x69,
+ 0x6e,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x6c,0x6f,0x61,0x64,0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6e,
+ 0x69,0x6c,0x2c,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x65,0x6e,0x76,0x29,0x20,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x6e,0x6f,0x20,0x65,0x76,0x61,
+ 0x6c,0x5f,0x65,0x6e,0x76,0x20,0x66,0x6f,0x72,0x20,0x35,0x2e,0x32,0x20,0x61,0x73,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x64,0x6f,0x65,0x73,0x20,
+ 0x6e,0x6f,0x74,0x20,0x68,0x61,0x76,0x65,0x20,0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,
+ 0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x6e,0x79,0x6d,0x6f,0x72,0x65,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x61,0x72,0x65,0x20,0x6d,0x69,0x6e,0x69,0x6d,
+ 0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x2e,0x0a,0x2d,
+ 0x2d,0x20,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x4d,0x2e,0x6c,0x6f,0x67,0x28,0x6c,0x65,
+ 0x76,0x65,0x6c,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x4c,0x45,0x56,0x45,0x4c,0x53,0x5b,0x6c,0x65,
+ 0x76,0x65,0x6c,0x5d,0x20,0x6f,0x72,0x20,0x2d,0x31,0x29,0x20,0x3e,0x20,0x4c,0x4f,
+ 0x47,0x5f,0x4c,0x45,0x56,0x45,0x4c,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,
+ 0x65,0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,
+ 0x3e,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,0x20,0x6d,0x73,0x67,0x20,0x3d,0x20,0x6d,
+ 0x73,0x67,0x3a,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x2e,0x2e,0x2e,0x29,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x2e,0x73,
+ 0x74,0x64,0x65,0x72,0x72,0x3a,0x77,0x72,0x69,0x74,0x65,0x28,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x45,0x42,0x55,0x47,
+ 0x47,0x45,0x52,0x5c,0x74,0x25,0x73,0x5c,0x74,0x25,0x73,0x5c,0x6e,0x22,0x2c,0x20,
+ 0x6c,0x65,0x76,0x65,0x6c,0x2c,0x20,0x6d,0x73,0x67,0x29,0x29,0x0a,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4d,0x0a,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,0x6d,0x6f,0x64,0x75,0x6c,
+ 0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x0a,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,
+ 0x65,0x2e,0x70,0x72,0x65,0x6c,0x6f,0x61,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x55,0x52,0x49,0x20,0x70,
+ 0x61,0x72,0x73,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74,
+ 0x69,0x6f,0x6e,0x20,0x61,0x6e,0x64,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,
+ 0x20,0x55,0x52,0x4c,0x20,0x72,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x0a,
+ 0x2d,0x2d,0x20,0x4c,0x75,0x61,0x53,0x6f,0x63,0x6b,0x65,0x74,0x20,0x74,0x6f,0x6f,
+ 0x6c,0x6b,0x69,0x74,0x2e,0x0a,0x2d,0x2d,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x3a,
+ 0x20,0x44,0x69,0x65,0x67,0x6f,0x20,0x4e,0x65,0x68,0x61,0x62,0x0a,0x2d,0x2d,0x20,
+ 0x52,0x43,0x53,0x20,0x49,0x44,0x3a,0x20,0x24,0x49,0x64,0x3a,0x20,0x75,0x72,0x6c,
+ 0x2e,0x6c,0x75,0x61,0x2c,0x76,0x20,0x31,0x2e,0x33,0x38,0x20,0x32,0x30,0x30,0x36,
+ 0x2f,0x30,0x34,0x2f,0x30,0x33,0x20,0x30,0x34,0x3a,0x34,0x35,0x3a,0x34,0x32,0x20,
+ 0x64,0x69,0x65,0x67,0x6f,0x20,0x45,0x78,0x70,0x20,0x24,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x44,0x65,0x63,0x6c,
+ 0x61,0x72,0x65,0x20,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28,
+ 0x22,0x73,0x74,0x72,0x69,0x6e,0x67,0x22,0x29,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x5f,0x47,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x74,0x61,0x62,0x6c,0x65,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28,
+ 0x22,0x74,0x61,0x62,0x6c,0x65,0x22,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x5f,0x45,0x4e,0x56,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x69,0x66,0x20,0x73,0x65,
+ 0x74,0x66,0x65,0x6e,0x76,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x65,0x74,0x66,0x65,
+ 0x6e,0x76,0x28,0x31,0x2c,0x20,0x5f,0x45,0x4e,0x56,0x29,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,
+ 0x2d,0x20,0x4d,0x6f,0x64,0x75,0x6c,0x65,0x20,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x5f,
+ 0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x20,0x22,0x55,0x52,0x4c,0x20,0x31,
+ 0x2e,0x30,0x2e,0x31,0x22,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,
+ 0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74,
+ 0x73,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x68,0x65,0x78,0x61,0x64,0x65,
+ 0x63,0x69,0x6d,0x61,0x6c,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,
+ 0x74,0x69,0x6f,0x6e,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,
+ 0x20,0x20,0x20,0x73,0x3a,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x20,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,
+ 0x64,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,
+ 0x20,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20,0x72,0x65,0x70,0x72,0x65,0x73,
+ 0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,
+ 0x62,0x28,0x73,0x2c,0x20,0x22,0x28,0x5b,0x5e,0x41,0x2d,0x5a,0x61,0x2d,0x7a,0x30,
+ 0x2d,0x39,0x5f,0x5d,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x63,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,
+ 0x28,0x22,0x25,0x25,0x25,0x30,0x32,0x78,0x22,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x2e,0x62,0x79,0x74,0x65,0x28,0x63,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x50,0x72,0x6f,0x74,0x65,0x63,
+ 0x74,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,
+ 0x74,0x2c,0x20,0x74,0x6f,0x20,0x70,0x72,0x65,0x76,0x65,0x6e,0x74,0x20,0x69,0x74,
+ 0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x65,0x72,0x69,0x6e,
+ 0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x0a,0x2d,0x2d,0x20,0x75,0x72,
+ 0x6c,0x20,0x70,0x61,0x72,0x73,0x69,0x6e,0x67,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x6e,
+ 0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73,0x3a,0x20,0x62,0x69,0x6e,0x61,
+ 0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,
+ 0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,
+ 0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x20,
+ 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,
+ 0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x0a,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x6d,0x61,0x6b,
+ 0x65,0x5f,0x73,0x65,0x74,0x28,0x74,0x29,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x73,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x09,0x66,0x6f,0x72,0x20,0x69,0x2c,0x76,0x20,
+ 0x69,0x6e,0x20,0x62,0x61,0x73,0x65,0x2e,0x69,0x70,0x61,0x69,0x72,0x73,0x28,0x74,
+ 0x29,0x20,0x64,0x6f,0x0a,0x09,0x09,0x73,0x5b,0x74,0x5b,0x69,0x5d,0x5d,0x20,0x3d,
+ 0x20,0x31,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x65,0x73,0x65,0x20,
+ 0x61,0x72,0x65,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x77,0x69,0x74,0x68,
+ 0x69,0x6e,0x67,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x65,0x67,0x6d,0x65,
+ 0x6e,0x74,0x2c,0x20,0x61,0x6c,0x6f,0x6e,0x67,0x20,0x77,0x69,0x74,0x68,0x20,0x61,
+ 0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0x0a,0x2d,0x2d,0x20,0x6f,0x74,0x68,0x65,0x72,
+ 0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x20,0x6d,0x75,0x73,0x74,
+ 0x20,0x62,0x65,0x20,0x65,0x73,0x63,0x61,0x70,0x65,0x64,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x73,0x65,0x74,0x20,0x3d,0x20,
+ 0x6d,0x61,0x6b,0x65,0x5f,0x73,0x65,0x74,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x22,
+ 0x2d,0x22,0x2c,0x20,0x22,0x5f,0x22,0x2c,0x20,0x22,0x2e,0x22,0x2c,0x20,0x22,0x21,
+ 0x22,0x2c,0x20,0x22,0x7e,0x22,0x2c,0x20,0x22,0x2a,0x22,0x2c,0x20,0x22,0x27,0x22,
+ 0x2c,0x20,0x22,0x28,0x22,0x2c,0x0a,0x09,0x22,0x29,0x22,0x2c,0x20,0x22,0x3a,0x22,
+ 0x2c,0x20,0x22,0x40,0x22,0x2c,0x20,0x22,0x26,0x22,0x2c,0x20,0x22,0x3d,0x22,0x2c,
+ 0x20,0x22,0x2b,0x22,0x2c,0x20,0x22,0x24,0x22,0x2c,0x20,0x22,0x2c,0x22,0x2c,0x0a,
+ 0x7d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,
+ 0x74,0x28,0x73,0x29,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x73,0x2c,0x20,0x22,0x28,0x5b,0x5e,
+ 0x41,0x2d,0x5a,0x61,0x2d,0x7a,0x30,0x2d,0x39,0x5f,0x5d,0x29,0x22,0x2c,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x63,0x29,0x0a,0x09,0x09,0x69,0x66,
+ 0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x73,0x65,0x74,0x5b,0x63,0x5d,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x0a,0x09,0x09,
+ 0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x25,0x25,0x25,0x30,0x32,
+ 0x78,0x22,0x2c,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x62,0x79,0x74,0x65,0x28,
+ 0x63,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x29,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x63,0x6f,0x64,0x65,0x73,0x20,0x61,0x20,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x20,0x69,0x6e,0x74,0x6f,0x20,0x69,0x74,0x73,0x20,0x65,0x73,
+ 0x63,0x61,0x70,0x65,0x64,0x20,0x68,0x65,0x78,0x61,0x64,0x65,0x63,0x69,0x6d,0x61,
+ 0x6c,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,
+ 0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73,
+ 0x3a,0x20,0x62,0x69,0x6e,0x61,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,
+ 0x74,0x6f,0x20,0x62,0x65,0x20,0x65,0x6e,0x63,0x6f,0x64,0x65,0x64,0x0a,0x2d,0x2d,
+ 0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x65,0x73,
+ 0x63,0x61,0x70,0x65,0x64,0x20,0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,
+ 0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x62,
+ 0x69,0x6e,0x61,0x72,0x79,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x75,0x6e,0x65,
+ 0x73,0x63,0x61,0x70,0x65,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,
+ 0x73,0x2c,0x20,0x22,0x25,0x25,0x28,0x25,0x78,0x25,0x78,0x29,0x22,0x2c,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x68,0x65,0x78,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x63,0x68,0x61,0x72,0x28,0x62,0x61,0x73,0x65,0x2e,0x74,0x6f,0x6e,
+ 0x75,0x6d,0x62,0x65,0x72,0x28,0x68,0x65,0x78,0x2c,0x20,0x31,0x36,0x29,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,
+ 0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x66,0x72,0x6f,
+ 0x6d,0x20,0x61,0x20,0x62,0x61,0x73,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x61,0x6e,
+ 0x64,0x20,0x61,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x20,0x70,0x61,0x74,
+ 0x68,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x72,
+ 0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,
+ 0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x63,0x6f,0x72,
+ 0x72,0x65,0x73,0x70,0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c,
+ 0x75,0x74,0x65,0x20,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x5f,0x70,
+ 0x61,0x74,0x68,0x28,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x2c,0x20,0x72,
+ 0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75,0x62,0x28,
+ 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,0x2c,0x20,0x31,
+ 0x2c,0x20,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,
+ 0x5f,0x70,0x61,0x74,0x68,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,
+ 0x2c,0x20,0x22,0x5b,0x5e,0x2f,0x5d,0x2a,0x24,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,
+ 0x2e,0x2e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x74,0x68,
+ 0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x28,
+ 0x5b,0x5e,0x2f,0x5d,0x2a,0x25,0x2e,0x2f,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x2f,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x20,0x65,0x6c,0x73,0x65,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,
+ 0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,
+ 0x61,0x74,0x68,0x2c,0x20,0x22,0x2f,0x25,0x2e,0x24,0x22,0x2c,0x20,0x22,0x2f,0x22,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x64,0x75,
+ 0x63,0x65,0x64,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x72,0x65,
+ 0x64,0x75,0x63,0x65,0x64,0x20,0x7e,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x64,0x6f,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x64,0x75,0x63,0x65,0x64,
+ 0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,
+ 0x75,0x62,0x28,0x72,0x65,0x64,0x75,0x63,0x65,0x64,0x2c,0x20,0x22,0x28,0x5b,0x5e,
+ 0x2f,0x5d,0x2a,0x2f,0x25,0x2e,0x25,0x2e,0x2f,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e,
+ 0x2e,0x2f,0x2e,0x2e,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x73,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,
+ 0x73,0x75,0x62,0x28,0x72,0x65,0x64,0x75,0x63,0x65,0x64,0x2c,0x20,0x22,0x28,0x5b,
+ 0x5e,0x2f,0x5d,0x2a,0x2f,0x25,0x2e,0x25,0x2e,0x29,0x24,0x22,0x2c,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x28,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x73,0x20,0x7e,0x3d,0x20,0x22,0x2e,0x2e,0x2f,0x2e,
+ 0x2e,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,
+ 0x22,0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x0a,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,
+ 0x2d,0x2d,0x20,0x50,0x61,0x72,0x73,0x65,0x73,0x20,0x61,0x20,0x75,0x72,0x6c,0x20,
+ 0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x20,0x74,0x61,
+ 0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6c,0x6c,0x20,0x69,0x74,0x73,
+ 0x20,0x70,0x61,0x72,0x74,0x73,0x20,0x61,0x63,0x63,0x6f,0x72,0x64,0x69,0x6e,0x67,
+ 0x20,0x74,0x6f,0x20,0x52,0x46,0x43,0x20,0x32,0x33,0x39,0x36,0x0a,0x2d,0x2d,0x20,
+ 0x54,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,0x67,0x20,0x67,0x72,
+ 0x61,0x6d,0x6d,0x61,0x72,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x65,0x73,0x20,
+ 0x74,0x68,0x65,0x20,0x6e,0x61,0x6d,0x65,0x73,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,
+ 0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x55,0x52,0x4c,0x20,0x70,0x61,0x72,0x74,0x73,
+ 0x0a,0x2d,0x2d,0x20,0x3c,0x75,0x72,0x6c,0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x73,
+ 0x63,0x68,0x65,0x6d,0x65,0x3e,0x3a,0x2f,0x2f,0x3c,0x61,0x75,0x74,0x68,0x6f,0x72,
+ 0x69,0x74,0x79,0x3e,0x2f,0x3c,0x70,0x61,0x74,0x68,0x3e,0x3b,0x3c,0x70,0x61,0x72,
+ 0x61,0x6d,0x73,0x3e,0x3f,0x3c,0x71,0x75,0x65,0x72,0x79,0x3e,0x23,0x3c,0x66,0x72,
+ 0x61,0x67,0x6d,0x65,0x6e,0x74,0x3e,0x0a,0x2d,0x2d,0x20,0x3c,0x61,0x75,0x74,0x68,
+ 0x6f,0x72,0x69,0x74,0x79,0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x75,0x73,0x65,0x72,
+ 0x69,0x6e,0x66,0x6f,0x3e,0x40,0x3c,0x68,0x6f,0x73,0x74,0x3e,0x3a,0x3c,0x70,0x6f,
+ 0x72,0x74,0x3e,0x0a,0x2d,0x2d,0x20,0x3c,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,
+ 0x3e,0x20,0x3a,0x3a,0x3d,0x20,0x3c,0x75,0x73,0x65,0x72,0x3e,0x5b,0x3a,0x3c,0x70,
+ 0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x3e,0x5d,0x0a,0x2d,0x2d,0x20,0x3c,0x70,0x61,
+ 0x74,0x68,0x3e,0x20,0x3a,0x3a,0x20,0x3d,0x20,0x7b,0x3c,0x73,0x65,0x67,0x6d,0x65,
+ 0x6e,0x74,0x3e,0x2f,0x7d,0x3c,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x3e,0x0a,0x2d,
+ 0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x75,0x72,0x6c,
+ 0x3a,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x72,0x65,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x20,0x6c,0x6f,0x63,0x61,0x74,0x6f,0x72,0x20,0x6f,0x66,0x20,0x72,0x65,
+ 0x71,0x75,0x65,0x73,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x64,0x65,0x66,0x61,0x75,
+ 0x6c,0x74,0x3a,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x64,
+ 0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x20,0x66,0x6f,
+ 0x72,0x20,0x65,0x61,0x63,0x68,0x20,0x66,0x69,0x65,0x6c,0x64,0x0a,0x2d,0x2d,0x20,
+ 0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x74,0x61,0x62,
+ 0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,
+ 0x6f,0x77,0x69,0x6e,0x67,0x20,0x66,0x69,0x65,0x6c,0x64,0x73,0x2c,0x20,0x77,0x68,
+ 0x65,0x72,0x65,0x20,0x52,0x46,0x43,0x20,0x6e,0x61,0x6d,0x69,0x6e,0x67,0x20,0x63,
+ 0x6f,0x6e,0x76,0x65,0x6e,0x74,0x69,0x6f,0x6e,0x73,0x20,0x68,0x61,0x76,0x65,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x62,0x65,0x65,0x6e,0x20,0x70,0x72,0x65,0x73,0x65,0x72,
+ 0x76,0x65,0x64,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x73,0x63,0x68,0x65,
+ 0x6d,0x65,0x2c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x2c,0x20,0x75,
+ 0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x75,0x73,0x65,0x72,0x2c,0x20,0x70,
+ 0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,
+ 0x6f,0x72,0x74,0x2c,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x74,0x68,
+ 0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x73,0x2c,0x20,0x71,0x75,0x65,0x72,0x79,0x2c,
+ 0x20,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x20,0x4f,0x62,0x73,
+ 0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x74,0x68,0x65,0x20,0x6c,0x65,0x61,0x64,0x69,
+ 0x6e,0x67,0x20,0x27,0x2f,0x27,0x20,0x69,0x6e,0x20,0x7b,0x2f,0x3c,0x70,0x61,0x74,
+ 0x68,0x3e,0x7d,0x20,0x69,0x73,0x20,0x63,0x6f,0x6e,0x73,0x69,0x64,0x65,0x72,0x65,
+ 0x64,0x20,0x70,0x61,0x72,0x74,0x20,0x6f,0x66,0x20,0x3c,0x70,0x61,0x74,0x68,0x3e,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x28,0x75,0x72,
+ 0x6c,0x2c,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x69,0x7a,0x65,0x20,0x64,0x65,
+ 0x66,0x61,0x75,0x6c,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x65,0x74,0x65,0x72,0x73,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,
+ 0x2c,0x76,0x20,0x69,0x6e,0x20,0x62,0x61,0x73,0x65,0x2e,0x70,0x61,0x69,0x72,0x73,
+ 0x28,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x20,0x6f,0x72,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x29,0x20,0x64,0x6f,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d,
+ 0x20,0x3d,0x20,0x76,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x65,0x6d,0x70,0x74,0x79,0x20,0x75,0x72,0x6c,0x20,0x69,0x73,0x20,0x70,0x61,0x72,
+ 0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x72,0x6c,0x20,0x6f,0x72,0x20,0x75,0x72,0x6c,
+ 0x20,0x3d,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x22,0x69,0x6e,0x76,0x61,0x6c,0x69,0x64,
+ 0x20,0x75,0x72,0x6c,0x22,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x20,0x77,0x68,0x69,0x74,0x65,0x73,0x70,0x61,
+ 0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,
+ 0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x67,0x65,0x74,0x20,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x20,
+ 0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,
+ 0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x23,0x28,0x2e,0x2a,0x29,
+ 0x24,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x66,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x66,
+ 0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x3d,0x20,0x66,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,
+ 0x74,0x20,0x73,0x63,0x68,0x65,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c,
+ 0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,
+ 0x72,0x6c,0x2c,0x20,0x22,0x5e,0x28,0x5b,0x25,0x77,0x5d,0x5b,0x25,0x77,0x25,0x2b,
+ 0x25,0x2d,0x25,0x2e,0x5d,0x2a,0x29,0x25,0x3a,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x29,0x20,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x3d,0x20,
+ 0x73,0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x61,0x75,0x74,
+ 0x68,0x6f,0x72,0x69,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,
+ 0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,
+ 0x2c,0x20,0x22,0x5e,0x2f,0x2f,0x28,0x5b,0x5e,0x2f,0x5d,0x2a,0x29,0x22,0x2c,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6e,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,
+ 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x71,
+ 0x75,0x65,0x72,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x69,0x6e,0x67,0x0a,0x20,
+ 0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,
+ 0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x25,0x3f,0x28,0x2e,0x2a,
+ 0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x71,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x71,
+ 0x75,0x65,0x72,0x79,0x20,0x3d,0x20,0x71,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x70,
+ 0x61,0x72,0x61,0x6d,0x73,0x0a,0x20,0x20,0x20,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x75,0x72,0x6c,0x2c,
+ 0x20,0x22,0x25,0x3b,0x28,0x2e,0x2a,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3d,0x20,0x70,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x22,0x22,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x77,0x68,0x61,0x74,0x65,
+ 0x76,0x65,0x72,0x20,0x77,0x61,0x73,0x20,0x6c,0x65,0x66,0x74,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x75,0x72,0x6c,0x20,0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d,
+ 0x20,0x75,0x72,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x0a,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x61,0x75,0x74,0x68,0x6f,
+ 0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,
+ 0x79,0x2c,0x22,0x5e,0x28,0x5b,0x5e,0x40,0x5d,0x2a,0x29,0x40,0x22,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x75,0x29,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e,
+ 0x66,0x6f,0x20,0x3d,0x20,0x75,0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,
+ 0x22,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,0x61,0x75,0x74,0x68,0x6f,
+ 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,
+ 0x75,0x62,0x28,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x2c,0x20,0x22,0x3a,
+ 0x28,0x5b,0x5e,0x3a,0x5d,0x2a,0x29,0x24,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x29,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x70,0x3b,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,
+ 0x7e,0x3d,0x20,0x22,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x2e,0x68,0x6f,0x73,0x74,0x20,0x3d,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,
+ 0x74,0x79,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x75,0x73,0x65,0x72,0x69,
+ 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,
+ 0x62,0x28,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x2c,0x20,0x22,0x3a,0x28,0x5b,
+ 0x5e,0x3a,0x5d,0x2a,0x29,0x24,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x70,0x29,0x20,0x70,0x61,0x72,
+ 0x73,0x65,0x64,0x2e,0x70,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x20,0x3d,0x20,0x70,
+ 0x3b,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x22,0x22,0x20,0x65,0x6e,0x64,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,
+ 0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x62,0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x64,0x20,0x55,0x52,0x4c,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,
+ 0x74,0x73,0x20,0x63,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0x2e,0x0a,0x2d,
+ 0x2d,0x20,0x43,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0x20,0x61,0x72,0x65,
+ 0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x69,0x66,0x20,0x61,0x6e,
+ 0x79,0x20,0x72,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x20,0x6f,0x72,0x20,0x75,0x6e,
+ 0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,
+ 0x72,0x73,0x20,0x61,0x72,0x65,0x20,0x66,0x6f,0x75,0x6e,0x64,0x0a,0x2d,0x2d,0x20,
+ 0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x3a,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x55,0x52,0x4c,0x2c,0x20,0x61,
+ 0x73,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x65,0x64,0x20,0x62,0x79,0x20,0x70,0x61,
+ 0x72,0x73,0x65,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x20,0x61,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x69,0x6e,0x67,0x20,
+ 0x77,0x69,0x74,0x68,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x55,0x52,0x4c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x62,0x75,0x69,0x6c,0x64,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x70,0x61,0x74,0x68,0x20,
+ 0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72,
+ 0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x6f,0x72,0x20,0x22,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,
+ 0x62,0x75,0x69,0x6c,0x64,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x70,0x61,0x74,0x68,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,
+ 0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x6c,0x20,
+ 0x3d,0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x3b,0x22,0x20,0x2e,0x2e,0x20,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,
+ 0x71,0x75,0x65,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72,0x6c,0x20,0x3d,
+ 0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x3f,0x22,0x20,0x2e,0x2e,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x64,0x2e,0x71,0x75,0x65,0x72,0x79,0x20,0x65,0x6e,0x64,0x0a,
+ 0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,
+ 0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,
+ 0x69,0x74,0x79,0x0a,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x68,
+ 0x6f,0x73,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x61,0x75,0x74,0x68,0x6f,
+ 0x72,0x69,0x74,0x79,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x68,0x6f,
+ 0x73,0x74,0x0a,0x09,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,
+ 0x6f,0x72,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,
+ 0x74,0x79,0x20,0x3d,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x2e,
+ 0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,
+ 0x70,0x6f,0x72,0x74,0x20,0x65,0x6e,0x64,0x0a,0x09,0x09,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x0a,0x09,0x09,0x69,0x66,
+ 0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x20,0x74,0x68,0x65,
+ 0x6e,0x0a,0x09,0x09,0x09,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x75,0x73,0x65,0x72,0x0a,0x09,0x09,0x09,0x69,
+ 0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x73,0x73,0x77,0x6f,0x72,
+ 0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x09,0x09,0x75,0x73,0x65,0x72,0x69,
+ 0x6e,0x66,0x6f,0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x2e,
+ 0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,
+ 0x70,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x0a,0x09,0x09,0x09,0x65,0x6e,0x64,0x0a,
+ 0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x09,0x69,0x66,0x20,0x75,0x73,0x65,0x72,0x69,
+ 0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,
+ 0x74,0x79,0x20,0x3d,0x20,0x75,0x73,0x65,0x72,0x69,0x6e,0x66,0x6f,0x20,0x2e,0x2e,
+ 0x20,0x22,0x40,0x22,0x20,0x2e,0x2e,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,
+ 0x79,0x20,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x22,0x2f,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x61,
+ 0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x2e,0x2e,0x20,0x75,0x72,0x6c,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x75,0x72,
+ 0x6c,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,
+ 0x65,0x20,0x2e,0x2e,0x20,0x22,0x3a,0x22,0x20,0x2e,0x2e,0x20,0x75,0x72,0x6c,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x2e,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x75,0x72,0x6c,0x20,0x3d,0x20,0x75,0x72,0x6c,0x20,0x2e,0x2e,0x20,0x22,0x23,0x22,
+ 0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x66,0x72,0x61,0x67,0x6d,
+ 0x65,0x6e,0x74,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x75,
+ 0x72,0x6c,0x20,0x3d,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,
+ 0x28,0x75,0x72,0x6c,0x2c,0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x72,0x6c,0x0a,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x75,0x69,0x6c,0x64,0x73,0x20,0x61,0x20,0x61,0x62,
+ 0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x55,0x52,0x4c,0x20,0x66,0x72,0x6f,0x6d,0x20,
+ 0x61,0x20,0x62,0x61,0x73,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x20,0x72,0x65,0x6c,
+ 0x61,0x74,0x69,0x76,0x65,0x20,0x55,0x52,0x4c,0x20,0x61,0x63,0x63,0x6f,0x72,0x64,
+ 0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x52,0x46,0x43,0x20,0x32,0x33,0x39,0x36,0x0a,
+ 0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x62,0x61,
+ 0x73,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,
+ 0x74,0x69,0x76,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,
+ 0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x64,0x69,0x6e,0x67,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,
+ 0x75,0x72,0x6c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x61,0x62,0x73,0x6f,0x6c,
+ 0x75,0x74,0x65,0x28,0x62,0x61,0x73,0x65,0x5f,0x75,0x72,0x6c,0x2c,0x20,0x72,0x65,
+ 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x62,0x61,0x73,0x65,0x2e,0x74,0x79,0x70,0x65,0x28,0x62,0x61,0x73,
+ 0x65,0x5f,0x75,0x72,0x6c,0x29,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x62,0x6c,0x65,
+ 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
+ 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x62,0x61,0x73,
+ 0x65,0x5f,0x75,0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,
+ 0x73,0x65,0x5f,0x75,0x72,0x6c,0x20,0x3d,0x20,0x62,0x75,0x69,0x6c,0x64,0x28,0x62,
+ 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,
+ 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x70,0x61,0x72,0x73,0x65,
+ 0x28,0x62,0x61,0x73,0x65,0x5f,0x75,0x72,0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x6c,
+ 0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x70,
+ 0x61,0x72,0x73,0x65,0x28,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72,
+ 0x6c,0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62,0x61,
+ 0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,
+ 0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,
+ 0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x6e,0x6f,
+ 0x74,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,
+ 0x73,0x65,0x5f,0x75,0x72,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,
+ 0x66,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,
+ 0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x72,
+ 0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x20,0x3d,0x20,0x62,0x61,0x73,0x65,
+ 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x73,0x63,0x68,0x65,0x6d,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,
+ 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,
+ 0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,
+ 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,
+ 0x74,0x79,0x20,0x3d,0x20,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,
+ 0x2e,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,
+ 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,
+ 0x74,0x68,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,
+ 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x62,
+ 0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3d,0x20,
+ 0x62,0x61,0x73,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x72,0x61,
+ 0x6d,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,
+ 0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x71,0x75,
+ 0x65,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,
+ 0x2e,0x71,0x75,0x65,0x72,0x79,0x20,0x3d,0x20,0x62,0x61,0x73,0x65,0x5f,0x70,0x61,
+ 0x72,0x73,0x65,0x64,0x2e,0x71,0x75,0x65,0x72,0x79,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,
+ 0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x61,
+ 0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x62,0x61,0x73,
+ 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x20,0x6f,0x72,
+ 0x20,0x22,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,
+ 0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x70,0x61,0x74,0x68,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x75,0x69,0x6c,0x64,0x28,
+ 0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x5f,0x70,0x61,0x72,0x73,0x65,0x64,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,
+ 0x72,0x65,0x61,0x6b,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x6e,0x74,
+ 0x6f,0x20,0x69,0x74,0x73,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x2c,0x20,
+ 0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x69,0x6e,0x67,0x20,0x74,0x68,0x65,0x20,0x73,
+ 0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x74,0x68,0x0a,0x2d,0x2d,0x20,0x52,0x65,
+ 0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x73,0x65,0x67,0x6d,0x65,
+ 0x6e,0x74,0x3a,0x20,0x61,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,
+ 0x20,0x6f,0x6e,0x65,0x20,0x65,0x6e,0x74,0x72,0x79,0x20,0x70,0x65,0x72,0x20,0x73,
+ 0x65,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x70,0x61,
+ 0x72,0x73,0x65,0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x74,0x68,0x29,0x0a,0x09,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x3d,0x20,0x7b,
+ 0x7d,0x0a,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x6f,
+ 0x72,0x20,0x22,0x22,0x0a,0x09,0x2d,0x2d,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x73,
+ 0x74,0x72,0x69,0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c,
+ 0x20,0x22,0x25,0x73,0x22,0x2c,0x20,0x22,0x22,0x29,0x0a,0x09,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x67,0x73,0x75,0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x22,0x28,
+ 0x5b,0x5e,0x2f,0x5d,0x2b,0x29,0x22,0x2c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x28,0x73,0x29,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,
+ 0x72,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x2c,0x20,0x73,0x29,0x20,0x65,0x6e,
+ 0x64,0x29,0x0a,0x09,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20,0x31,0x2c,0x20,0x23,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x20,0x64,0x6f,0x0a,0x09,0x09,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x5b,0x69,0x5d,0x20,0x3d,0x20,0x75,0x6e,0x65,0x73,0x63,0x61,0x70,0x65,
+ 0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d,0x29,0x0a,0x09,0x65,0x6e,0x64,
+ 0x0a,0x09,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75,0x62,0x28,
+ 0x70,0x61,0x74,0x68,0x2c,0x20,0x31,0x2c,0x20,0x31,0x29,0x20,0x3d,0x3d,0x20,0x22,
+ 0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,
+ 0x73,0x5f,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x20,0x3d,0x20,0x31,0x20,0x65,
+ 0x6e,0x64,0x0a,0x09,0x69,0x66,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x73,0x75,
+ 0x62,0x28,0x70,0x61,0x74,0x68,0x2c,0x20,0x2d,0x31,0x2c,0x20,0x2d,0x31,0x29,0x20,
+ 0x3d,0x3d,0x20,0x22,0x2f,0x22,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x72,0x73,
+ 0x65,0x64,0x2e,0x69,0x73,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,
+ 0x3d,0x20,0x31,0x20,0x65,0x6e,0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x42,0x75,0x69,
+ 0x6c,0x64,0x73,0x20,0x61,0x20,0x70,0x61,0x74,0x68,0x20,0x63,0x6f,0x6d,0x70,0x6f,
+ 0x6e,0x65,0x6e,0x74,0x20,0x66,0x72,0x6f,0x6d,0x20,0x69,0x74,0x73,0x20,0x73,0x65,
+ 0x67,0x6d,0x65,0x6e,0x74,0x73,0x2c,0x20,0x65,0x73,0x63,0x61,0x70,0x69,0x6e,0x67,
+ 0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x63,0x68,0x61,0x72,0x61,
+ 0x63,0x74,0x65,0x72,0x73,0x2e,0x0a,0x2d,0x2d,0x20,0x49,0x6e,0x70,0x75,0x74,0x0a,
+ 0x2d,0x2d,0x20,0x20,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x3a,0x20,0x70,0x61,0x74,
+ 0x68,0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x75,0x6e,0x73,0x61,0x66,0x65,0x3a,0x20,0x69,0x66,0x20,0x74,0x72,0x75,0x65,0x2c,
+ 0x20,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f,
+ 0x74,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,0x20,0x62,0x65,0x66,0x6f,
+ 0x72,0x65,0x20,0x70,0x61,0x74,0x68,0x20,0x69,0x73,0x20,0x62,0x75,0x69,0x6c,0x74,
+ 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x70,0x61,0x74,0x68,0x3a,0x20,0x63,0x6f,0x72,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x64,0x69,0x6e,0x67,0x20,0x70,0x61,0x74,0x68,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,
+ 0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x62,0x75,0x69,0x6c,0x64,
+ 0x5f,0x70,0x61,0x74,0x68,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x2c,0x20,0x75,0x6e,
+ 0x73,0x61,0x66,0x65,0x29,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x74,
+ 0x68,0x20,0x3d,0x20,0x22,0x22,0x0a,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6e,0x20,
+ 0x3d,0x20,0x23,0x70,0x61,0x72,0x73,0x65,0x64,0x0a,0x09,0x69,0x66,0x20,0x75,0x6e,
+ 0x73,0x61,0x66,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x66,0x6f,0x72,0x20,
+ 0x69,0x20,0x3d,0x20,0x31,0x2c,0x20,0x6e,0x2d,0x31,0x20,0x64,0x6f,0x0a,0x09,0x09,
+ 0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,
+ 0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x69,0x5d,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,
+ 0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x0a,
+ 0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x09,0x69,0x66,0x20,0x6e,0x20,0x3e,0x20,0x30,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,
+ 0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x6e,
+ 0x5d,0x0a,0x09,0x09,0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,
+ 0x73,0x5f,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,
+ 0x22,0x2f,0x22,0x20,0x65,0x6e,0x64,0x0a,0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x65,
+ 0x6c,0x73,0x65,0x0a,0x09,0x09,0x66,0x6f,0x72,0x20,0x69,0x20,0x3d,0x20,0x31,0x2c,
+ 0x20,0x6e,0x2d,0x31,0x20,0x64,0x6f,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,
+ 0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,
+ 0x74,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64,
+ 0x5b,0x69,0x5d,0x29,0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,
+ 0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x0a,0x09,0x09,0x65,0x6e,0x64,
+ 0x0a,0x09,0x09,0x69,0x66,0x20,0x6e,0x20,0x3e,0x20,0x30,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x09,0x09,0x09,0x70,0x61,0x74,0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,
+ 0x2e,0x2e,0x20,0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x5f,0x73,0x65,0x67,0x6d,0x65,
+ 0x6e,0x74,0x28,0x70,0x61,0x72,0x73,0x65,0x64,0x5b,0x6e,0x5d,0x29,0x0a,0x09,0x09,
+ 0x09,0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,0x73,0x5f,0x64,0x69,
+ 0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x74,
+ 0x68,0x20,0x3d,0x20,0x70,0x61,0x74,0x68,0x20,0x2e,0x2e,0x20,0x22,0x2f,0x22,0x20,
+ 0x65,0x6e,0x64,0x0a,0x09,0x09,0x65,0x6e,0x64,0x0a,0x09,0x65,0x6e,0x64,0x0a,0x09,
+ 0x69,0x66,0x20,0x70,0x61,0x72,0x73,0x65,0x64,0x2e,0x69,0x73,0x5f,0x61,0x62,0x73,
+ 0x6f,0x6c,0x75,0x74,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x70,0x61,0x74,0x68,0x20,
+ 0x3d,0x20,0x22,0x2f,0x22,0x20,0x2e,0x2e,0x20,0x70,0x61,0x74,0x68,0x20,0x65,0x6e,
+ 0x64,0x0a,0x09,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x70,0x61,0x74,0x68,0x0a,0x65,
+ 0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x45,0x4e,0x56,0x0a,
+ 0x0a,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x45,0x6e,0x64,0x20,0x6f,0x66,0x20,
+ 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,
+ 0x72,0x6c,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x0a,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4d,0x61,0x69,0x6e,0x20,
+ 0x63,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x70,
+ 0x79,0x72,0x69,0x67,0x68,0x74,0x20,0x28,0x63,0x29,0x20,0x32,0x30,0x31,0x31,0x2d,
+ 0x32,0x30,0x31,0x32,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,
+ 0x6c,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x6f,0x74,0x68,0x65,0x72,0x73,0x2e,
+ 0x0a,0x2d,0x2d,0x20,0x41,0x6c,0x6c,0x20,0x72,0x69,0x67,0x68,0x74,0x73,0x20,0x72,
+ 0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,0x20,0x70,0x72,
+ 0x6f,0x67,0x72,0x61,0x6d,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x61,0x63,
+ 0x63,0x6f,0x6d,0x70,0x61,0x6e,0x79,0x69,0x6e,0x67,0x20,0x6d,0x61,0x74,0x65,0x72,
+ 0x69,0x61,0x6c,0x73,0x0a,0x2d,0x2d,0x20,0x61,0x72,0x65,0x20,0x6d,0x61,0x64,0x65,
+ 0x20,0x61,0x76,0x61,0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x75,0x6e,0x64,0x65,0x72,
+ 0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x74,0x68,
+ 0x65,0x20,0x45,0x63,0x6c,0x69,0x70,0x73,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,
+ 0x20,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x20,0x76,0x31,0x2e,0x30,0x0a,0x2d,0x2d,
+ 0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x61,0x63,0x63,0x6f,0x6d,0x70,0x61,0x6e,0x69,
+ 0x65,0x73,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,0x73,0x74,0x72,0x69,0x62,0x75,
+ 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x61,0x6e,0x64,0x20,0x69,0x73,0x20,0x61,0x76,0x61,
+ 0x69,0x6c,0x61,0x62,0x6c,0x65,0x20,0x61,0x74,0x0a,0x2d,0x2d,0x20,0x68,0x74,0x74,
+ 0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x63,0x6c,0x69,0x70,0x73,0x65,0x2e,
+ 0x6f,0x72,0x67,0x2f,0x6c,0x65,0x67,0x61,0x6c,0x2f,0x65,0x70,0x6c,0x2d,0x76,0x31,
+ 0x30,0x2e,0x68,0x74,0x6d,0x6c,0x0a,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x43,0x6f,0x6e,
+ 0x74,0x72,0x69,0x62,0x75,0x74,0x6f,0x72,0x73,0x3a,0x0a,0x2d,0x2d,0x20,0x20,0x20,
+ 0x20,0x20,0x53,0x69,0x65,0x72,0x72,0x61,0x20,0x57,0x69,0x72,0x65,0x6c,0x65,0x73,
+ 0x73,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x20,0x41,0x50,0x49,0x20,
+ 0x61,0x6e,0x64,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,
+ 0x6f,0x6e,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x44,0x42,0x47,0x50,0x5f,0x43,
+ 0x4c,0x49,0x45,0x4e,0x54,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x20,
+ 0x22,0x31,0x2e,0x31,0x2e,0x30,0x22,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,
+ 0x65,0x62,0x75,0x67,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,
+ 0x64,0x65,0x62,0x75,0x67,0x22,0x0a,0x0a,0x2d,0x2d,0x20,0x54,0x6f,0x20,0x61,0x76,
+ 0x6f,0x69,0x64,0x20,0x63,0x79,0x63,0x6c,0x69,0x63,0x20,0x64,0x65,0x70,0x65,0x6e,
+ 0x64,0x65,0x6e,0x63,0x79,0x2c,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,0x6c,0x20,
+ 0x73,0x74,0x61,0x74,0x65,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x20,0x74,0x68,0x61,0x74,0x20,0x6d,0x75,0x73,0x74,0x20,
+ 0x62,0x65,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x65,
+ 0x6c,0x73,0x65,0x77,0x68,0x65,0x72,0x65,0x20,0x28,0x69,0x6e,0x20,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x73,0x20,0x6d,0x6f,0x73,0x74,0x20,0x6c,0x69,0x6b,0x65,0x6c,
+ 0x79,0x29,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,0x20,0x73,0x74,0x6f,0x72,0x65,
+ 0x64,0x20,0x69,0x6e,0x20,0x61,0x20,0x66,0x61,0x6b,0x65,0x20,0x6d,0x6f,0x64,0x75,
+ 0x6c,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72,
+ 0x65,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x65,0x20,0x3d,0x20,
+ 0x7b,0x20,0x7d,0x0a,0x70,0x61,0x63,0x6b,0x61,0x67,0x65,0x2e,0x6c,0x6f,0x61,0x64,
+ 0x65,0x64,0x5b,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x72,
+ 0x65,0x22,0x5d,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x0a,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x75,0x74,0x69,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,
+ 0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x74,0x69,0x6c,0x22,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,
+ 0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x2e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x64,0x62,0x67,0x70,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,
+ 0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x64,0x62,0x67,
+ 0x70,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,
+ 0x73,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x2e,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x22,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,
+ 0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,
+ 0x72,0x2e,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x75,0x72,0x6c,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x20,0x22,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x75,0x72,0x6c,0x22,0x0a,0x0a,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x6c,0x6f,0x67,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,
+ 0x6c,0x6f,0x67,0x0a,0x0a,0x0a,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x20,0x63,0x6f,
+ 0x6d,0x70,0x6c,0x65,0x74,0x65,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x64,0x6c,0x69,
+ 0x62,0x20,0x61,0x63,0x63,0x65,0x73,0x73,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,
+ 0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x63,0x72,0x65,0x61,
+ 0x74,0x65,0x2c,0x20,0x63,0x6f,0x77,0x72,0x61,0x70,0x2c,0x20,0x63,0x6f,0x79,0x69,
+ 0x65,0x6c,0x64,0x2c,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x63,
+ 0x6f,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x2e,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x2c,0x20,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x2c,0x20,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x2c,0x20,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x79,0x69,0x65,0x6c,0x64,0x2c,0x20,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,
+ 0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x73,0x74,0x61,0x74,
+ 0x75,0x73,0x0a,0x0a,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
+ 0x20,0x74,0x68,0x65,0x20,0x55,0x52,0x49,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2c,0x20,0x74,0x6f,0x20,0x6e,0x6f,0x74,
+ 0x20,0x6a,0x75,0x6d,0x70,0x20,0x69,0x6e,0x74,0x6f,0x20,0x77,0x69,0x74,0x68,0x20,
+ 0x72,0x65,0x64,0x65,0x66,0x69,0x6e,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x20,0x6f,0x72,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,
+ 0x62,0x6f,0x6f,0x74,0x73,0x74,0x72,0x61,0x70,0x20,0x73,0x74,0x75,0x66,0x66,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x75,
+ 0x72,0x69,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,
+ 0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,
+ 0x6d,0x6f,0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x6e,0x69,0x6c,
+ 0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x69,0x6e,0x20,0x69,0x6e,0x69,0x74,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x0a,0x2d,0x2d,0x20,0x77,0x69,0x6c,
+ 0x6c,0x20,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x73,0x65,
+ 0x73,0x73,0x69,0x6f,0x6e,0x20,0x6f,0x62,0x6a,0x65,0x63,0x74,0x2c,0x20,0x61,0x6e,
+ 0x64,0x20,0x70,0x6f,0x73,0x73,0x69,0x62,0x6c,0x79,0x20,0x61,0x20,0x6c,0x69,0x73,
+ 0x74,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,
+ 0x73,0x20,0x69,0x66,0x20,0x61,0x20,0x6d,0x75,0x6c,0x74,0x69,0x2d,0x74,0x68,0x72,
+ 0x65,0x61,0x64,0x65,0x64,0x20,0x6d,0x6f,0x64,0x65,0x6c,0x20,0x69,0x73,0x20,0x61,
+ 0x64,0x6f,0x70,0x74,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x74,0x68,0x69,0x73,0x20,0x69,
+ 0x73,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x66,0x6f,0x72,0x20,
+ 0x61,0x73,0x79,0x6e,0x63,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x2e,0x0a,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x2d,0x2d,0x20,0x74,
+ 0x72,0x61,0x63,0x6b,0x73,0x20,0x61,0x6c,0x6c,0x20,0x61,0x63,0x74,0x69,0x76,0x65,
+ 0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x61,0x6e,0x64,0x20,
+ 0x61,0x73,0x73,0x6f,0x63,0x69,0x61,0x74,0x65,0x20,0x61,0x6e,0x20,0x69,0x64,0x20,
+ 0x74,0x6f,0x20,0x74,0x68,0x65,0x6d,0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62,
+ 0x6c,0x65,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x20,0x69,0x73,0x20,0x74,0x68,
+ 0x65,0x20,0x69,0x64,0x3d,0x3e,0x63,0x6f,0x72,0x6f,0x20,0x6d,0x61,0x70,0x70,0x69,
+ 0x6e,0x67,0x2c,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x20,0x66,0x72,
+ 0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x72,
+ 0x65,0x76,0x65,0x72,0x73,0x65,0x0a,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,
+ 0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x3d,0x20,
+ 0x7b,0x20,0x6e,0x20,0x3d,0x20,0x30,0x2c,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,
+ 0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,
+ 0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,
+ 0x22,0x76,0x22,0x20,0x7d,0x29,0x2c,0x20,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72,
+ 0x6f,0x20,0x3d,0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,
+ 0x28,0x7b,0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,
+ 0x20,0x22,0x6b,0x22,0x20,0x7d,0x29,0x20,0x7d,0x0a,0x0a,0x63,0x6f,0x72,0x65,0x2e,
+ 0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,
+ 0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,0x69,0x6e,0x20,
+ 0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x0a,0x0a,0x2d,0x2d,0x20,0x22,0x42,0x45,0x47,0x49,0x4e,0x20,0x56,0x45,
+ 0x52,0x53,0x49,0x4f,0x4e,0x20,0x44,0x45,0x50,0x45,0x4e,0x44,0x45,0x4e,0x54,0x20,
+ 0x43,0x4f,0x44,0x45,0x22,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74,0x62,
+ 0x70,0x65,0x6e,0x76,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x65,0x74,0x20,
+ 0x65,0x6e,0x76,0x69,0x72,0x6f,0x6e,0x6d,0x65,0x6e,0x74,0x20,0x6f,0x66,0x20,0x61,
+ 0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x28,0x63,0x6f,0x6d,
+ 0x70,0x69,0x6c,0x65,0x64,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x29,0x0a,
+ 0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x3d,0x3d,0x20,0x22,
+ 0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x20,
+ 0x3d,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,
+ 0x74,0x62,0x70,0x65,0x6e,0x76,0x20,0x3d,0x20,0x73,0x65,0x74,0x66,0x65,0x6e,0x76,
+ 0x0a,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,
+ 0x20,0x3d,0x3d,0x20,0x22,0x4c,0x75,0x61,0x20,0x35,0x2e,0x32,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x74,
+ 0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,
+ 0x73,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x5f,0x45,0x4e,0x56,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x66,0x69,
+ 0x72,0x73,0x74,0x20,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,
+ 0x73,0x65,0x74,0x62,0x70,0x65,0x6e,0x76,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x66,0x2c,0x20,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
+ 0x20,0x73,0x65,0x74,0x75,0x70,0x76,0x61,0x6c,0x75,0x65,0x28,0x66,0x2c,0x20,0x31,
+ 0x2c,0x20,0x74,0x29,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6c,0x73,0x65,0x20,0x65,0x72,
+ 0x72,0x6f,0x72,0x28,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x2e,0x2e,0x20,
+ 0x22,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x70,0x70,0x6f,0x72,0x74,0x65,
+ 0x64,0x2e,0x22,0x29,0x20,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x20,0x22,0x45,0x4e,0x44,
+ 0x20,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x20,0x44,0x45,0x50,0x45,0x4e,0x44,0x45,
+ 0x4e,0x54,0x20,0x43,0x4f,0x44,0x45,0x22,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x4f,0x75,
+ 0x74,0x70,0x75,0x74,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x4f,0x76,0x65,
+ 0x72,0x72,0x69,0x64,0x65,0x20,0x73,0x74,0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x6f,
+ 0x75,0x74,0x70,0x75,0x74,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,
+ 0x26,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x73,0x20,0x74,0x6f,0x20,0x72,
+ 0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x20,0x64,0x61,0x74,0x61,0x20,0x77,0x72,0x69,
+ 0x74,0x74,0x65,0x6e,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x73,0x65,0x20,0x66,0x69,
+ 0x6c,0x65,0x73,0x20,0x74,0x6f,0x20,0x49,0x44,0x45,0x20,0x74,0x6f,0x6f,0x2e,0x0a,
+ 0x2d,0x2d,0x20,0x54,0x68,0x69,0x73,0x20,0x77,0x6f,0x72,0x6b,0x73,0x20,0x6f,0x6e,
+ 0x6c,0x79,0x20,0x66,0x6f,0x72,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x64,0x6f,
+ 0x6e,0x65,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61,0x2c,0x20,0x6f,0x75,0x74,0x70,0x75,
+ 0x74,0x20,0x77,0x72,0x69,0x74,0x74,0x65,0x6e,0x20,0x62,0x79,0x20,0x43,0x20,0x65,
+ 0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0x20,0x69,0x73,0x20,0x73,0x74,0x69,
+ 0x6c,0x6c,0x20,0x67,0x6f,0x20,0x74,0x6f,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x20,
+ 0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x66,0x69,0x6c,0x65,0x2e,0x0a,0x0a,0x2d,0x2d,
+ 0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x74,0x6f,0x20,0x6e,
+ 0x61,0x74,0x69,0x76,0x65,0x20,0x76,0x61,0x6c,0x75,0x65,0x73,0x0a,0x69,0x6f,0x2e,
+ 0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,
+ 0x3d,0x20,0x69,0x6f,0x2e,0x6f,0x75,0x74,0x70,0x75,0x74,0x2c,0x20,0x73,0x74,0x64,
+ 0x69,0x6e,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x69,0x6e,0x2c,0x20,0x73,
+ 0x74,0x64,0x6f,0x75,0x74,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75,
+ 0x74,0x2c,0x20,0x73,0x74,0x64,0x65,0x72,0x72,0x20,0x3d,0x20,0x69,0x6f,0x2e,0x73,
+ 0x74,0x64,0x65,0x72,0x72,0x20,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x63,0x6f,0x6d,0x6d,
+ 0x65,0x6e,0x74,0x20,0x6f,0x75,0x74,0x20,0x62,0x79,0x20,0x67,0x75,0x61,0x6e,0x79,
+ 0x75,0x5f,0x79,0x61,0x6e,0x2c,0x20,0x6e,0x6f,0x74,0x20,0x72,0x65,0x64,0x69,0x72,
+ 0x65,0x63,0x74,0x20,0x69,0x6f,0x2e,0x0a,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x2d,
+ 0x2d,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x75,0x66,0x20,
+ 0x3d,0x20,0x7b,0x2e,0x2e,0x2e,0x7d,0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x66,
+ 0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x22,
+ 0x23,0x22,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x64,0x6f,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66,0x5b,0x69,0x5d,0x20,0x3d,0x20,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x62,0x75,0x66,0x5b,0x69,0x5d,0x29,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x2d,0x2d,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75,0x74,0x3a,0x77,0x72,0x69,
+ 0x74,0x65,0x28,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,
+ 0x62,0x75,0x66,0x2c,0x20,0x22,0x5c,0x74,0x22,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5c,
+ 0x6e,0x22,0x29,0x0a,0x2d,0x2d,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x41,
+ 0x63,0x74,0x75,0x61,0x6c,0x6c,0x79,0x20,0x63,0x68,0x61,0x6e,0x67,0x65,0x20,0x73,
+ 0x74,0x61,0x6e,0x64,0x61,0x72,0x64,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x66,
+ 0x69,0x6c,0x65,0x20,0x62,0x75,0x74,0x20,0x73,0x74,0x69,0x6c,0x6c,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x74,0x68,0x65,0x20,0x22,0x66,0x61,0x6b,0x65,0x22,0x20,
+ 0x73,0x74,0x64,0x6f,0x75,0x74,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x69,0x6f,0x2e,0x6f,0x75,0x74,0x70,0x75,0x74,0x28,0x6f,0x75,0x74,0x70,0x75,0x74,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73,0x65,0x2e,0x6f,0x75,
+ 0x74,0x70,0x75,0x74,0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x6f,0x2e,0x73,0x74,0x64,0x6f,0x75,
+ 0x74,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x75,0x6d,
+ 0x6d,0x79,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,
+ 0x65,0x20,0x66,0x6f,0x72,0x20,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6e,
+ 0x67,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,0x28,0x6e,0x6f,0x74,0x20,0x70,0x72,
+ 0x69,0x6e,0x74,0x65,0x64,0x20,0x61,0x74,0x20,0x61,0x6c,0x6c,0x20,0x69,0x6e,0x20,
+ 0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x6f,0x75,0x74,0x70,0x75,0x74,0x29,0x0a,0x63,
+ 0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,
+ 0x70,0x75,0x74,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,
+ 0x65,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,
+ 0x66,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x75,0x66,0x20,0x3d,0x20,0x7b,0x2e,0x2e,0x2e,
+ 0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,
+ 0x31,0x2c,0x20,0x73,0x65,0x6c,0x65,0x63,0x74,0x28,0x22,0x23,0x22,0x2c,0x20,0x2e,
+ 0x2e,0x2e,0x29,0x20,0x64,0x6f,0x20,0x62,0x75,0x66,0x5b,0x69,0x5d,0x20,0x3d,0x20,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x62,0x75,0x66,0x5b,0x69,0x5d,0x29,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x75,0x66,
+ 0x20,0x3d,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x63,0x6f,0x6e,0x63,0x61,0x74,0x28,
+ 0x62,0x75,0x66,0x29,0x3a,0x67,0x73,0x75,0x62,0x28,0x22,0x5c,0x6e,0x22,0x2c,0x20,
+ 0x22,0x5c,0x72,0x5c,0x6e,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,
+ 0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,
+ 0x22,0x73,0x74,0x72,0x65,0x61,0x6d,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,
+ 0x20,0x7b,0x20,0x74,0x79,0x70,0x65,0x3d,0x73,0x65,0x6c,0x66,0x2e,0x6d,0x6f,0x64,
+ 0x65,0x20,0x7d,0x2c,0x20,0x20,0x75,0x74,0x69,0x6c,0x2e,0x62,0x36,0x34,0x28,0x62,
+ 0x75,0x66,0x29,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x75,0x73,0x68,0x20,0x3d,0x20,0x64,0x75,0x6d,
+ 0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x3d,0x20,
+ 0x64,0x75,0x6d,0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x76,0x62,
+ 0x75,0x66,0x20,0x3d,0x20,0x64,0x75,0x6d,0x6d,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x73,0x65,0x65,0x6b,0x20,0x3d,0x20,0x64,0x75,0x6d,0x6d,0x79,0x0a,0x7d,0x0a,0x63,
+ 0x6f,0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,
+ 0x70,0x75,0x74,0x2e,0x5f,0x5f,0x69,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x63,0x6f,
+ 0x72,0x65,0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70,
+ 0x75,0x74,0x0a,0x0a,0x2d,0x2d,0x20,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,
+ 0x20,0x66,0x6f,0x72,0x20,0x63,0x6c,0x6f,0x6e,0x69,0x6e,0x67,0x20,0x6f,0x75,0x74,
+ 0x70,0x75,0x74,0x20,0x28,0x6f,0x75,0x74,0x70,0x75,0x74,0x73,0x20,0x74,0x6f,0x20,
+ 0x61,0x63,0x74,0x75,0x61,0x6c,0x20,0x73,0x79,0x73,0x74,0x65,0x6d,0x20,0x61,0x6e,
+ 0x64,0x20,0x73,0x65,0x6e,0x64,0x20,0x74,0x6f,0x20,0x49,0x44,0x45,0x29,0x0a,0x63,
+ 0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x20,
+ 0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x77,0x72,0x69,0x74,0x65,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,
+ 0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,
+ 0x2e,0x72,0x65,0x64,0x69,0x72,0x65,0x63,0x74,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,
+ 0x2e,0x77,0x72,0x69,0x74,0x65,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e,0x2e,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x2e,0x62,0x61,0x73,
+ 0x65,0x5b,0x73,0x65,0x6c,0x66,0x2e,0x6d,0x6f,0x64,0x65,0x5d,0x3a,0x77,0x72,0x69,
+ 0x74,0x65,0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x2c,
+ 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x75,0x73,0x68,0x20,0x20,0x20,0x3d,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e,
+ 0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x6f,
+ 0x75,0x74,0x3a,0x66,0x6c,0x75,0x73,0x68,0x28,0x2e,0x2e,0x2e,0x29,0x20,0x65,0x6e,
+ 0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x63,0x6c,0x6f,0x73,0x65,0x20,0x20,0x20,0x3d,
+ 0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,
+ 0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,0x6c,0x66,
+ 0x2e,0x6f,0x75,0x74,0x3a,0x63,0x6c,0x6f,0x73,0x65,0x28,0x2e,0x2e,0x2e,0x29,0x20,
+ 0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x74,0x76,0x62,0x75,0x66,
+ 0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x73,0x65,0x6c,0x66,
+ 0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x65,
+ 0x6c,0x66,0x2e,0x6f,0x75,0x74,0x3a,0x73,0x65,0x74,0x76,0x62,0x75,0x66,0x28,0x2e,
+ 0x2e,0x2e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x65,
+ 0x6b,0x20,0x20,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,
+ 0x73,0x65,0x6c,0x66,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x73,0x65,0x6c,0x66,0x2e,0x6f,0x75,0x74,0x3a,0x73,0x65,0x65,0x6b,0x28,
+ 0x2e,0x2e,0x2e,0x29,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x7d,0x0a,0x63,0x6f,0x72,0x65,
+ 0x2e,0x63,0x6f,0x70,0x79,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x5f,0x5f,0x69,
+ 0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x63,0x6f,0x70,0x79,
+ 0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x0a,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x2d,0x2d,0x20,0x20,0x42,0x72,0x65,
+ 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x72,0x79,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x52,0x65,0x67,0x69,0x73,0x74,0x72,0x79,0x20,0x6f,0x66,0x20,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6c,0x65,
+ 0x76,0x65,0x6c,0x73,0x20,0x6f,0x66,0x20,0x61,0x6c,0x6c,0x20,0x72,0x75,0x6e,0x6e,
+ 0x69,0x6e,0x67,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x73,0x0a,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x20,0x3d,
+ 0x20,0x73,0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x20,0x7b,
+ 0x20,0x7d,0x2c,0x20,0x7b,0x20,0x5f,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x22,
+ 0x6b,0x22,0x20,0x7d,0x20,0x29,0x0a,0x0a,0x2d,0x2d,0x20,0x46,0x69,0x6c,0x65,0x2f,
+ 0x6c,0x69,0x6e,0x65,0x20,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x66,0x6f,0x72,
+ 0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x28,0x42,0x50,
+ 0x29,0x2e,0x20,0x46,0x6f,0x72,0x20,0x61,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x66,
+ 0x69,0x6c,0x65,0x2f,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x61,0x20,0x6c,0x69,0x73,0x74,
+ 0x20,0x6f,0x66,0x20,0x42,0x50,0x20,0x69,0x73,0x20,0x61,0x73,0x73,0x6f,0x63,0x69,
+ 0x61,0x74,0x65,0x64,0x20,0x28,0x44,0x42,0x47,0x70,0x20,0x73,0x70,0x65,0x63,0x69,
+ 0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x73,0x65,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x37,0x2e,0x36,0x2e,0x31,0x0a,0x2d,0x2d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,
+ 0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x6d,0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x20,
+ 0x42,0x50,0x20,0x61,0x74,0x20,0x73,0x61,0x6d,0x65,0x20,0x70,0x6c,0x61,0x63,0x65,
+ 0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x64,
+ 0x29,0x0a,0x2d,0x2d,0x20,0x41,0x20,0x42,0x50,0x20,0x69,0x73,0x20,0x61,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x61,0x6c,0x6c,0x20,0x61,0x64,
+ 0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x20,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
+ 0x69,0x65,0x73,0x20,0x28,0x74,0x79,0x70,0x65,0x2c,0x20,0x63,0x6f,0x6e,0x64,0x69,
+ 0x74,0x69,0x6f,0x6e,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x20,0x74,0x68,0x65,0x20,0x69,
+ 0x64,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,
+ 0x72,0x65,0x70,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,
+ 0x66,0x20,0x74,0x68,0x65,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x0a,0x63,0x6f,0x72,
+ 0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x20,0x3d,0x20,
+ 0x7b,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x73,0x20,0x74,0x6f,0x20,0x63,0x61,0x6c,0x6c,0x20,0x74,0x6f,0x20,0x6d,0x61,
+ 0x74,0x63,0x68,0x20,0x68,0x69,0x74,0x20,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,
+ 0x6e,0x73,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,
+ 0x74,0x69,0x6f,0x6e,0x73,0x20,0x3d,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x5b,0x22,0x3e,0x3d,0x22,0x5d,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x28,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,0x74,0x61,0x72,0x67,0x65,
+ 0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,
+ 0x3e,0x3d,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x3d,0x3d,0x22,0x5d,0x20,0x3d,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x76,0x61,0x6c,0x75,0x65,0x2c,0x20,
+ 0x74,0x61,0x72,0x67,0x65,0x74,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,
+ 0x61,0x6c,0x75,0x65,0x20,0x3d,0x3d,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x20,0x65,
+ 0x6e,0x64,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5b,0x22,0x25,0x22,
+ 0x5d,0x20,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x76,0x61,
+ 0x6c,0x75,0x65,0x2c,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x29,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x28,0x76,0x61,0x6c,0x75,0x65,0x20,0x25,0x20,0x74,0x61,0x72,
+ 0x67,0x65,0x74,0x29,0x20,0x3d,0x3d,0x20,0x30,0x20,0x65,0x6e,0x64,0x2c,0x0a,0x20,
+ 0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x2d,0x2d,0x20,0x74,0x72,0x61,0x63,0x6b,
+ 0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x73,0x20,0x73,0x75,0x63,0x68,0x20,0x61,0x73,
+ 0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x6f,0x72,0x20,0x73,0x74,
+ 0x65,0x70,0x5f,0x6f,0x76,0x65,0x72,0x0a,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,
+ 0x6e,0x74,0x73,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x0a,0x64,0x6f,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,
+ 0x70,0x69,0x6e,0x67,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,
+ 0x3d,0x20,0x7b,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x77,0x61,0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,
+ 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x2d,0x2d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,
+ 0x6e,0x73,0x20,0x74,0x68,0x61,0x74,0x20,0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,
+ 0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x28,0x6f,0x76,0x65,0x72,0x2c,
+ 0x20,0x69,0x6e,0x74,0x6f,0x2c,0x20,0x6f,0x75,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,
+ 0x3d,0x20,0x6e,0x69,0x6c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x68,0x61,0x74,0x20,0x72,0x65,0x67,
+ 0x69,0x73,0x74,0x65,0x72,0x65,0x64,0x20,0x61,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,
+ 0x6e,0x74,0x6f,0x20,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x69,0x66,0x20,0x61,0x6e,
+ 0x79,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x71,0x75,
+ 0x65,0x6e,0x63,0x65,0x20,0x3d,0x20,0x30,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x64,
+ 0x20,0x74,0x6f,0x20,0x67,0x65,0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x62,0x72,0x65,
+ 0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x49,0x44,0x73,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,
+ 0x6e,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x20,0x20,0x2d,0x2d,0x20,0x75,0x73,0x65,0x20,
+ 0x74,0x6f,0x20,0x72,0x65,0x63,0x6f,0x72,0x64,0x20,0x74,0x68,0x65,0x20,0x6c,0x69,
+ 0x6e,0x65,0x20,0x6f,0x66,0x20,0x62,0x70,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x69,0x6e,0x73,
+ 0x65,0x72,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,
+ 0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x66,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,
+ 0x69,0x6e,0x65,0x5d,0x20,0x3d,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,
+ 0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,
+ 0x3d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,
+ 0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,
+ 0x3d,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,
+ 0x69,0x6e,0x65,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,
+ 0x70,0x69,0x6e,0x67,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,
+ 0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,0x61,0x6e,0x64,
+ 0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,
+ 0x6e,0x65,0x5d,0x20,0x3e,0x20,0x31,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,
+ 0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x20,0x3d,0x20,0x6c,0x69,
+ 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,
+ 0x20,0x2d,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,
+ 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,
+ 0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x75,0x65,0x73,0x73,0x28,
+ 0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,
+ 0x67,0x5b,0x6c,0x69,0x6e,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,
+ 0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x75,
+ 0x70,0x64,0x61,0x74,0x65,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,0x2c,0x6e,0x65,
+ 0x77,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x20,0x3d,0x20,0x6e,0x65,0x77,0x62,0x70,0x2e,
+ 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6f,0x6c,
+ 0x64,0x6c,0x69,0x6e,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x66,0x69,
+ 0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x66,0x69,0x6c,0x65,0x5d,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,
+ 0x67,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x6c,0x69,0x6e,0x65,
+ 0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,
+ 0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69,0x6e,0x65,
+ 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x6f,0x6c,0x64,0x6c,0x69,0x6e,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,
+ 0x31,0x2c,0x20,0x23,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x64,0x6f,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x69,
+ 0x6e,0x65,0x72,0x65,0x67,0x5b,0x69,0x5d,0x2e,0x69,0x64,0x20,0x3d,0x3d,0x20,0x6e,
+ 0x65,0x77,0x62,0x70,0x2e,0x69,0x64,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x61,0x62,
+ 0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x6c,0x69,0x6e,0x65,0x72,0x65,
+ 0x67,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x73,0x65,0x72,0x74,0x5f,0x6c,0x69,0x6e,0x65,
+ 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x6e,0x65,0x77,0x62,0x70,0x2e,0x6c,
+ 0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,
+ 0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c,0x69,0x6e,0x65,
+ 0x72,0x65,0x67,0x2c,0x20,0x6e,0x65,0x77,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x6e,0x65,0x77,0x62,
+ 0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,
+ 0x72,0x65,0x67,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x2d,0x20,0x49,0x6e,0x73,0x65,0x72,0x74,0x73,0x20,0x61,0x20,0x6e,
+ 0x65,0x77,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x69,0x6e,
+ 0x74,0x6f,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x72,0x79,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x62,0x70,0x20,0x28,0x74,0x61,
+ 0x62,0x6c,0x65,0x29,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,
+ 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,
+ 0x61,0x6d,0x20,0x75,0x72,0x69,0x20,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2c,0x20,
+ 0x6f,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x41,0x62,0x73,0x6f,0x6c,0x75,
+ 0x74,0x65,0x20,0x66,0x69,0x6c,0x65,0x20,0x55,0x52,0x49,0x2c,0x20,0x66,0x6f,0x72,
+ 0x20,0x6c,0x69,0x6e,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,
+ 0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,
+ 0x6c,0x69,0x6e,0x65,0x20,0x28,0x6e,0x75,0x6d,0x62,0x65,0x72,0x2c,0x20,0x6f,0x70,
+ 0x74,0x69,0x6f,0x6e,0x61,0x6c,0x29,0x20,0x4c,0x69,0x6e,0x65,0x20,0x77,0x68,0x65,
+ 0x72,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x73,0x74,
+ 0x6f,0x70,0x73,0x2c,0x20,0x66,0x6f,0x72,0x20,0x6c,0x69,0x6e,0x65,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x20,0x69,0x64,0x65,0x6e,0x74,0x69,0x66,0x69,0x65,0x72,0x0a,0x20,
+ 0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,
+ 0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x69,0x6e,0x73,
+ 0x65,0x72,0x74,0x28,0x62,0x70,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x69,0x64,0x20,0x3d,0x20,0x73,0x65,0x71,
+ 0x75,0x65,0x6e,0x63,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,
+ 0x71,0x75,0x65,0x6e,0x63,0x65,0x20,0x3d,0x20,0x62,0x70,0x69,0x64,0x20,0x2b,0x20,
+ 0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x69,0x64,0x20,
+ 0x3d,0x20,0x62,0x70,0x69,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x72,0x65,0x2d,0x65,0x6e,0x63,0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x20,
+ 0x55,0x52,0x49,0x20,0x74,0x6f,0x20,0x61,0x76,0x6f,0x69,0x64,0x20,0x61,0x6e,0x79,
+ 0x20,0x6d,0x69,0x73,0x6d,0x61,0x74,0x63,0x68,0x20,0x28,0x77,0x69,0x74,0x68,0x20,
+ 0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x66,0x6f,0x72,0x20,0x65,0x78,
+ 0x61,0x6d,0x70,0x6c,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,
+ 0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x20,0x3d,0x20,0x75,0x72,0x6c,0x2e,0x70,
+ 0x61,0x72,0x73,0x65,0x28,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x70,0x2e,0x66,0x69,0x6c,
+ 0x65,0x6e,0x61,0x6d,0x65,0x20,0x3d,0x20,0x75,0x72,0x6c,0x2e,0x62,0x75,0x69,0x6c,
+ 0x64,0x7b,0x20,0x73,0x63,0x68,0x65,0x6d,0x65,0x3d,0x75,0x72,0x69,0x2e,0x73,0x63,
+ 0x68,0x65,0x6d,0x65,0x2c,0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x3d,
+ 0x22,0x22,0x2c,0x20,0x70,0x61,0x74,0x68,0x3d,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,
+ 0x6d,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x75,0x72,0x69,0x2e,
+ 0x70,0x61,0x74,0x68,0x29,0x7d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,
+ 0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,
+ 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x20,0x7d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,
+ 0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,
+ 0x6e,0x61,0x6d,0x65,0x5d,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72,
+ 0x65,0x67,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,0x5b,0x62,0x70,0x2e,
+ 0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,0x7b,0x7d,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x72,0x65,0x67,
+ 0x5b,0x62,0x70,0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6c,0x69,
+ 0x6e,0x65,0x72,0x65,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x73,0x65,0x72,0x74,
+ 0x5f,0x6c,0x69,0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x62,0x70,
+ 0x2e,0x6c,0x69,0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x69,0x6e,0x73,0x65,0x72,0x74,0x28,0x6c,
+ 0x69,0x6e,0x65,0x72,0x65,0x67,0x2c,0x20,0x62,0x70,0x29,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,
+ 0x62,0x70,0x69,0x64,0x5d,0x20,0x3d,0x20,0x62,0x70,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x70,0x69,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,
+ 0x49,0x66,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x28,0x73,0x29,
+ 0x20,0x65,0x78,0x69,0x73,0x74,0x73,0x20,0x66,0x6f,0x72,0x20,0x67,0x69,0x76,0x65,
+ 0x6e,0x20,0x66,0x69,0x6c,0x65,0x2f,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x75,0x70,0x74,
+ 0x61,0x74,0x65,0x73,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,
+ 0x63,0x6f,0x75,0x6e,0x74,0x65,0x72,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x61,0x6e,0x64,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x77,0x68,0x65,0x74,
+ 0x68,0x65,0x72,0x20,0x61,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,
+ 0x20,0x68,0x61,0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x20,0x28,0x62,0x6f,
+ 0x6f,0x6c,0x65,0x61,0x6e,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x73,0x2e,0x61,0x74,0x28,0x66,0x69,0x6c,0x65,0x2c,0x20,0x6c,0x69,
+ 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x74,0x65,0x6d,0x70,0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x3a,0x73,0x75,
+ 0x62,0x28,0x23,0x22,0x66,0x69,0x6c,0x65,0x3a,0x2f,0x2f,0x22,0x2b,0x31,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x20,0x5f,
+ 0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x66,0x69,0x6c,0x65,0x5f,0x6d,
+ 0x61,0x70,0x70,0x69,0x6e,0x67,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x2c,0x6a,0x20,0x3d,
+ 0x20,0x6b,0x3a,0x66,0x69,0x6e,0x64,0x28,0x74,0x65,0x6d,0x70,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x28,0x6a,0x20,0x3d,0x3d,0x20,
+ 0x23,0x6b,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6c,0x65,0x20,0x3d,0x20,0x6b,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x73,
+ 0x20,0x3d,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,
+ 0x66,0x69,0x6c,0x65,0x5d,0x20,0x61,0x6e,0x64,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,
+ 0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x66,0x69,0x6c,0x65,0x5d,0x5b,0x6c,0x69,0x6e,
+ 0x65,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,
+ 0x74,0x20,0x62,0x70,0x73,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,
+ 0x6e,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,
+ 0x6b,0x20,0x3d,0x20,0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c,0x20,0x62,0x70,0x20,0x69,0x6e,0x20,0x70,
+ 0x61,0x69,0x72,0x73,0x28,0x62,0x70,0x73,0x29,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e,0x73,
+ 0x74,0x61,0x74,0x65,0x20,0x3d,0x3d,0x20,0x22,0x65,0x6e,0x61,0x62,0x6c,0x65,0x64,
+ 0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6d,0x61,0x74,
+ 0x63,0x68,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e,
+ 0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x69,0x73,
+ 0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,0x74,0x68,0x65,0x20,0x6f,0x70,0x74,0x69,
+ 0x6d,0x61,0x6c,0x20,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x20,0x62,0x65,0x63,
+ 0x61,0x75,0x73,0x65,0x20,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x63,0x61,0x6e,
+ 0x20,0x62,0x65,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x74,0x69,0x61,0x74,0x65,0x64,
+ 0x20,0x74,0x77,0x69,0x63,0x65,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x73,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x78,0x74,0x20,0x3d,
+ 0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,
+ 0x3a,0x6e,0x65,0x77,0x28,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,
+ 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x73,0x65,0x74,0x62,0x70,0x65,0x6e,0x76,0x28,0x62,0x70,0x2e,0x63,0x6f,0x6e,
+ 0x64,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x63,0x78,0x74,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x2c,0x20,
+ 0x72,0x65,0x73,0x75,0x6c,0x74,0x20,0x3d,0x20,0x70,0x63,0x61,0x6c,0x6c,0x28,0x62,
+ 0x70,0x2e,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52,0x22,
+ 0x2c,0x20,0x22,0x43,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,0x6e,0x20,0x65,0x76,0x61,
+ 0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x61,0x69,0x6c,0x65,0x64,0x20,0x66,
+ 0x6f,0x72,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x61,0x74,
+ 0x20,0x25,0x73,0x3a,0x25,0x64,0x3a,0x20,0x25,0x73,0x22,0x2c,0x20,0x66,0x69,0x6c,
+ 0x65,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x2c,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x29,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x67,0x65,0x72,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x73,0x74,0x6f,0x70,
+ 0x73,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x6f,0x63,
+ 0x63,0x75,0x72,0x73,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x63,0x68,0x20,0x3d,
+ 0x20,0x28,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,0x29,0x20,0x6f,
+ 0x72,0x20,0x72,0x65,0x73,0x75,0x6c,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6d,0x61,0x74,0x63,0x68,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
+ 0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x3d,0x20,0x62,0x70,
+ 0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x20,0x2b,0x20,0x31,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,
+ 0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,0x64,0x69,
+ 0x74,0x69,0x6f,0x6e,0x73,0x5b,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,0x6f,0x6e,
+ 0x64,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x28,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x63,
+ 0x6f,0x75,0x6e,0x74,0x2c,0x20,0x62,0x70,0x2e,0x68,0x69,0x74,0x5f,0x76,0x61,0x6c,
+ 0x75,0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x62,0x70,0x2e,0x74,0x65,0x6d,0x70,0x6f,0x72,0x61,0x72,0x79,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,
+ 0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x62,0x70,0x2e,0x69,0x64,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x3d,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x62,0x72,0x65,0x61,
+ 0x6b,0x20,0x74,0x6f,0x20,0x68,0x61,0x6e,0x64,0x6c,0x65,0x20,0x6d,0x75,0x6c,0x74,
+ 0x69,0x70,0x6c,0x65,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,
+ 0x3a,0x20,0x61,0x6c,0x6c,0x20,0x68,0x69,0x74,0x20,0x63,0x6f,0x75,0x6e,0x74,0x73,
+ 0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x75,0x70,0x64,0x61,0x74,0x65,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,
+ 0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,
+ 0x6b,0x70,0x6f,0x69,0x6e,0x74,0x73,0x2e,0x67,0x65,0x74,0x28,0x69,0x64,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x69,0x64,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,
+ 0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x69,0x64,0x5f,
+ 0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,
+ 0x74,0x73,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,0x69,0x64,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d,
+ 0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x20,0x74,0x68,
+ 0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
+ 0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x20,0x3d,0x20,
+ 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x20,0x3d,0x20,
+ 0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,
+ 0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x5b,0x62,0x70,0x2e,0x6c,0x69,0x6e,
+ 0x65,0x6e,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x23,0x6c,0x69,0x6e,0x65,0x72,
+ 0x65,0x67,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,
+ 0x5b,0x69,0x5d,0x20,0x3d,0x3d,0x20,0x62,0x70,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x74,0x61,0x62,0x6c,0x65,0x2e,0x72,0x65,0x6d,0x6f,0x76,0x65,0x28,
+ 0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x2c,0x20,0x69,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x69,
+ 0x6e,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x28,0x62,0x70,0x2e,0x6c,0x69,
+ 0x6e,0x65,0x6e,0x6f,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x20,0x66,0x69,
+ 0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6e,0x65,
+ 0x78,0x74,0x28,0x6c,0x69,0x6e,0x65,0x72,0x65,0x67,0x29,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,
+ 0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x5d,0x5b,0x62,0x70,0x2e,0x6c,0x69,
+ 0x6e,0x65,0x6e,0x6f,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,
+ 0x6f,0x74,0x20,0x6e,0x65,0x78,0x74,0x28,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,
+ 0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,
+ 0x5d,0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x66,0x69,0x6c,0x65,0x5f,0x6d,0x61,0x70,
+ 0x70,0x69,0x6e,0x67,0x5b,0x62,0x70,0x2e,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,
+ 0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,
+ 0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,
+ 0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x61,0x6e,
+ 0x20,0x58,0x4d,0x4c,0x20,0x64,0x61,0x74,0x61,0x20,0x73,0x74,0x72,0x75,0x63,0x74,
+ 0x75,0x72,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,
+ 0x65,0x73,0x20,0x67,0x69,0x76,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,
+ 0x69,0x6e,0x74,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,
+ 0x6d,0x20,0x69,0x64,0x20,0x28,0x6e,0x75,0x6d,0x62,0x65,0x72,0x29,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x49,0x44,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x54,0x61,0x62,0x6c,0x65,
+ 0x20,0x64,0x65,0x73,0x63,0x72,0x69,0x62,0x69,0x6e,0x67,0x20,0x61,0x20,0x3c,0x62,
+ 0x72,0x65,0x61,0x6b,0x70,0x6f,0x6f,0x69,0x6e,0x74,0x3e,0x20,0x74,0x61,0x67,0x20,
+ 0x6f,0x72,0x20,0x6e,0x69,0x6c,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x65,0x64,0x20,
+ 0x62,0x79,0x20,0x61,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x20,0x6d,0x65,0x73,0x73,
+ 0x61,0x67,0x65,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,
+ 0x73,0x2e,0x67,0x65,0x74,0x5f,0x78,0x6d,0x6c,0x28,0x69,0x64,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x62,0x70,0x20,0x3d,
+ 0x20,0x69,0x64,0x5f,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0x5b,0x69,0x64,0x5d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x62,
+ 0x70,0x20,0x74,0x68,0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6e,0x69,
+ 0x6c,0x2c,0x20,0x22,0x4e,0x6f,0x20,0x73,0x75,0x63,0x68,0x20,0x62,0x72,0x65,0x61,
+ 0x6b,0x70,0x6f,0x69,0x6e,0x74,0x3a,0x20,0x22,0x2e,0x2e,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x69,0x64,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x72,0x65,0x73,0x70,0x6f,
+ 0x6e,0x73,0x65,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x62,
+ 0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,
+ 0x20,0x3d,0x20,0x7b,0x20,0x7d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x66,0x6f,0x72,0x20,0x6b,0x2c,0x76,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,
+ 0x73,0x28,0x62,0x70,0x29,0x20,0x64,0x6f,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x2e,0x61,0x74,0x74,0x72,0x5b,0x6b,0x5d,0x20,0x3d,0x20,0x76,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x62,0x70,0x2e,
+ 0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x74,0x68,0x65,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x73,0x65,0x5b,0x31,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,
+ 0x3d,0x20,0x22,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x22,0x2c,0x20,
+ 0x20,0x62,0x70,0x2e,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x7d,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,
+ 0x6c,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,
+ 0x2e,0x65,0x78,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6e,0x69,
+ 0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x63,0x6f,0x6e,0x64,0x69,0x74,0x69,0x6f,
+ 0x6e,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x2e,0x61,0x74,0x74,0x72,0x2e,0x74,0x65,
+ 0x6d,0x70,0x6f,0x72,0x61,0x72,0x79,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,
+ 0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x74,0x68,0x65,0x20,0x73,0x70,0x65,0x63,0x69,
+ 0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x63,0x6c,0x65,0x61,0x72,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x74,0x68,
+ 0x69,0x73,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x62,0x65,0x20,0x70,0x72,0x6f,
+ 0x76,0x69,0x64,0x65,0x64,0x2c,0x20,0x73,0x65,0x65,0x20,0x6f,0x74,0x68,0x65,0x72,
+ 0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x73,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x67,0x69,0x73,0x74,
+ 0x65,0x72,0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x74,0x6f,0x20,0x62,
+ 0x65,0x20,0x74,0x72,0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x2e,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x40,0x70,0x61,0x72,0x61,0x6d,0x20,0x65,0x76,0x65,0x6e,0x74,
+ 0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x6e,0x61,0x6d,0x65,0x20,0x74,0x6f,0x20,0x72,
+ 0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x20,0x28,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,
+ 0x20,0x22,0x6f,0x76,0x65,0x72,0x22,0x2c,0x20,0x22,0x6f,0x75,0x74,0x22,0x20,0x6f,
+ 0x72,0x20,0x22,0x69,0x6e,0x74,0x6f,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,
+ 0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,
+ 0x74,0x73,0x2e,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x65,0x76,0x65,0x6e,
+ 0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65,
+ 0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x44,0x45,
+ 0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x52,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x65,
+ 0x64,0x20,0x25,0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x25,
+ 0x73,0x20,0x28,0x25,0x64,0x29,0x22,0x2c,0x20,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x29,
+ 0x2c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x5d,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x69,0x6e,0x74,
+ 0x6f,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x3d,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x61,
+ 0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x5b,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x7b,0x20,0x65,0x76,0x65,0x6e,0x74,
+ 0x2c,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x73,0x20,0x69,0x66,
+ 0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x28,0x73,0x74,0x65,0x70,0x20,
+ 0x69,0x6e,0x74,0x6f,0x2c,0x20,0x6f,0x76,0x65,0x72,0x2c,0x20,0x6f,0x75,0x74,0x29,
+ 0x20,0x69,0x73,0x20,0x74,0x72,0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x2e,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x44,0x6f,0x65,0x73,0x20,0x2a,0x6e,0x6f,0x74,0x2a,
+ 0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x20,0x65,0x76,0x65,0x6e,0x74,0x73,0x20,
+ 0x28,0x65,0x76,0x65,0x6e,0x20,0x69,0x66,0x20,0x74,0x68,0x65,0x79,0x20,0x6d,0x61,
+ 0x74,0x63,0x68,0x29,0x20,0x61,0x73,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x6d,0x75,
+ 0x73,0x74,0x20,0x62,0x65,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x65,0x64,0x20,
+ 0x6d,0x61,0x6e,0x75,0x61,0x6c,0x6c,0x79,0x20,0x69,0x66,0x20,0x61,0x20,0x62,0x72,
+ 0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x20,0x6d,0x61,0x74,0x63,0x68,0x20,0x62,
+ 0x65,0x66,0x6f,0x72,0x65,0x20,0x61,0x6e,0x79,0x77,0x61,0x79,0x2e,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x40,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75,
+ 0x65,0x20,0x69,0x66,0x20,0x61,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x68,0x61,
+ 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x2c,0x20,0x66,0x61,0x6c,0x73,0x65,
+ 0x20,0x6f,0x74,0x68,0x65,0x72,0x77,0x69,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x66,
+ 0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,
+ 0x6e,0x74,0x73,0x2e,0x64,0x6f,0x65,0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x6c,
+ 0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x61,0x6e,0x64,0x20,0x63,0x6f,
+ 0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,
+ 0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,
+ 0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,
+ 0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x76,0x65,
+ 0x6e,0x74,0x20,0x3d,0x20,0x77,0x61,0x69,0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,
+ 0x2c,0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,
+ 0x20,0x75,0x6e,0x70,0x61,0x63,0x6b,0x28,0x65,0x76,0x65,0x6e,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,
+ 0x20,0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3d,
+ 0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,
+ 0x72,0x65,0x61,0x64,0x5d,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,
+ 0x65,0x20,0x3d,0x3d,0x20,0x22,0x6f,0x76,0x65,0x72,0x22,0x20,0x61,0x6e,0x64,0x20,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x3d,
+ 0x20,0x74,0x61,0x72,0x67,0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x61,0x6e,
+ 0x64,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,0x61,
+ 0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x29,0x20,
+ 0x6f,0x72,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x74,0x65,0x70,0x20,0x6f,0x76,0x65,
+ 0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x28,0x65,0x76,0x65,0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x20,0x3d,0x3d,0x20,
+ 0x22,0x6f,0x75,0x74,0x22,0x20,0x20,0x61,0x6e,0x64,0x20,0x63,0x75,0x72,0x72,0x65,
+ 0x6e,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x20,0x3c,0x20,0x20,0x74,0x61,0x72,0x67,
+ 0x65,0x74,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x29,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,
+ 0x2d,0x20,0x73,0x74,0x65,0x70,0x20,0x6f,0x75,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,
+ 0x44,0x45,0x42,0x55,0x47,0x22,0x2c,0x20,0x22,0x45,0x76,0x65,0x6e,0x74,0x20,0x25,
+ 0x73,0x20,0x6d,0x61,0x74,0x63,0x68,0x65,0x64,0x21,0x22,0x2c,0x20,0x65,0x76,0x65,
+ 0x6e,0x74,0x5f,0x74,0x79,0x70,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x74,0x72,0x75,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x66,0x61,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x2d,0x20,0x44,0x69,0x73,0x63,0x61,0x72,0x64,0x73,0x20,
+ 0x65,0x76,0x65,0x6e,0x74,0x20,0x66,0x6f,0x72,0x20,0x63,0x75,0x72,0x72,0x65,0x6e,
+ 0x74,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x28,0x69,0x66,0x20,0x61,0x6e,0x79,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,
+ 0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,0x74,0x73,0x2e,0x64,0x69,0x73,0x63,0x61,
+ 0x72,0x64,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x61,0x69,
+ 0x74,0x69,0x6e,0x67,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x73,0x5b,0x61,0x63,
+ 0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,
+ 0x6f,0x5b,0x31,0x5d,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x73,0x74,0x65,0x70,0x5f,0x69,0x6e,0x74,0x6f,0x20,0x3d,0x20,
+ 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x0a,0x2d,0x2d,0x20,0x20,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6d,0x61,
+ 0x69,0x6e,0x20,0x6c,0x6f,0x6f,0x70,0x0a,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+ 0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x0a,0x2d,0x2d,0x2d,0x20,0x53,0x65,0x6e,
+ 0x64,0x20,0x74,0x68,0x65,0x20,0x58,0x4d,0x4c,0x20,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x73,0x65,0x20,0x74,0x6f,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x65,0x76,0x69,0x6f,
+ 0x75,0x73,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61,0x74,0x69,0x6f,0x6e,0x20,
+ 0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x61,0x6e,0x64,0x20,0x63,0x6c,0x65,0x61,
+ 0x72,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x20,0x63,
+ 0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,
+ 0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x28,0x73,
+ 0x65,0x6c,0x66,0x2c,0x20,0x72,0x65,0x61,0x73,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,
+ 0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x3d,0x20,
+ 0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x74,0x65,0x0a,0x20,0x20,0x20,0x20,0x73,
+ 0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,
+ 0x74,0x65,0x78,0x74,0x2e,0x72,0x65,0x61,0x73,0x6f,0x6e,0x20,0x3d,0x20,0x72,0x65,
+ 0x61,0x73,0x6f,0x6e,0x20,0x6f,0x72,0x20,0x22,0x6f,0x6b,0x22,0x0a,0x20,0x20,0x20,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,
+ 0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,
+ 0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,
+ 0x72,0x20,0x3d,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,
+ 0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x7d,0x20,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,
+ 0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x65,0x6e,
+ 0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,
+ 0x6e,0x20,0x63,0x6c,0x65,0x61,0x6e,0x75,0x70,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,
+ 0x2c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,
+ 0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x2c,0x20,0x63,0x6f,0x77,
+ 0x72,0x61,0x70,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x5f,0x2c,0x20,0x63,
+ 0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20,0x70,0x61,0x69,0x72,0x73,0x28,0x63,0x6f,0x72,
+ 0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x29,0x20,0x64,0x6f,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,
+ 0x74,0x68,0x6f,0x6f,0x6b,0x28,0x63,0x6f,0x72,0x6f,0x29,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x6f,0x20,0x72,0x65,
+ 0x6d,0x6f,0x76,0x65,0x20,0x68,0x6f,0x6f,0x6b,0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,
+ 0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2c,
+ 0x20,0x69,0x74,0x20,0x6d,0x75,0x73,0x74,0x20,0x62,0x65,0x20,0x74,0x68,0x65,0x20,
+ 0x63,0x75,0x72,0x72,0x65,0x6e,0x74,0x20,0x6f,0x6e,0x65,0x20,0x28,0x6f,0x74,0x68,
+ 0x65,0x72,0x77,0x69,0x73,0x65,0x2c,0x20,0x74,0x68,0x69,0x73,0x20,0x69,0x73,0x20,
+ 0x61,0x20,0x6e,0x6f,0x2d,0x6f,0x70,0x29,0x20,0x61,0x6e,0x64,0x20,0x74,0x68,0x69,
+ 0x73,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x68,0x61,0x76,0x65,0x20,0x74,0x6f,0x20,0x62,0x65,0x20,0x63,0x61,0x6c,
+ 0x6c,0x65,0x64,0x20,0x61,0x64,0x61,0x69,0x6e,0x20,0x6c,0x61,0x74,0x65,0x72,0x20,
+ 0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6d,0x61,0x69,0x6e,0x20,0x74,0x68,0x72,0x65,
+ 0x61,0x64,0x20,0x74,0x6f,0x20,0x66,0x69,0x6e,0x69,0x73,0x68,0x20,0x63,0x6c,0x65,
+ 0x61,0x75,0x70,0x0a,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,
+ 0x74,0x68,0x6f,0x6f,0x6b,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,
+ 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x69,0x64,0x2c,0x20,0x63,0x6f,0x72,0x65,
+ 0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x7b,
+ 0x20,0x7d,0x2c,0x20,0x7b,0x20,0x7d,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x2d,
+ 0x20,0x54,0x68,0x69,0x73,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x68,
+ 0x61,0x6e,0x64,0x6c,0x65,0x73,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x77,0x68,0x69,
+ 0x6c,0x65,0x20,0x74,0x68,0x65,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,
+ 0x20,0x69,0x73,0x20,0x70,0x61,0x75,0x73,0x65,0x64,0x2e,0x20,0x54,0x68,0x69,0x73,
+ 0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x75,0x73,0x65,0x20,0x63,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,
+ 0x20,0x74,0x68,0x65,0x72,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,0x0a,0x2d,0x2d,0x20,
+ 0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x67,0x65,0x74,0x20,0x6d,0x61,0x69,0x6e,0x20,
+ 0x63,0x6f,0x72,0x6f,0x20,0x69,0x6e,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,
+ 0x28,0x6f,0x6e,0x6c,0x79,0x20,0x69,0x6e,0x20,0x35,0x2e,0x32,0x29,0x0a,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70,0x28,0x73,0x65,0x6c,0x66,0x2c,
+ 0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74,0x74,
+ 0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x6e,0x69,0x6c,0x29,0x20,0x2d,0x2d,0x20,0x73,
+ 0x65,0x74,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x62,0x6c,0x6f,0x63,0x6b,0x69,
+ 0x6e,0x67,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x20,0x61,0x73,
+ 0x79,0x6e,0x63,0x20,0x6d,0x6f,0x64,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,
+ 0x77,0x61,0x69,0x74,0x20,0x66,0x6f,0x72,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20,
+ 0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x69,0x6e,0x67,0x20,0x61,0x6e,0x64,0x20,0x64,
+ 0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x6d,0x6f,0x64,0x69,0x66,0x79,0x20,0x70,
+ 0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,
+ 0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63,
+ 0x6b,0x65,0x74,0x20,0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x73,0x65,0x6c,0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,
+ 0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x61,0x6e,0x64,0x20,0x6e,0x6f,0x74,
+ 0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,
+ 0x61,0x74,0x65,0x20,0x3d,0x20,0x22,0x62,0x72,0x65,0x61,0x6b,0x22,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x69,
+ 0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x5f,0x72,0x65,0x73,0x70,
+ 0x6f,0x6e,0x73,0x65,0x28,0x73,0x65,0x6c,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,0x61,0x63,
+ 0x6b,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x2e,0x43,0x6f,0x6e,0x74,
+ 0x65,0x78,0x74,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x28,0x73,0x65,0x6c,0x66,0x2e,
+ 0x63,0x6f,0x72,0x6f,0x29,0x20,0x2d,0x2d,0x20,0x77,0x69,0x6c,0x6c,0x20,0x62,0x65,
+ 0x20,0x75,0x73,0x65,0x64,0x20,0x74,0x6f,0x20,0x6d,0x75,0x74,0x75,0x61,0x6c,0x69,
+ 0x7a,0x65,0x20,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x20,0x61,0x6c,0x6c,0x6f,0x63,
+ 0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x65,0x61,0x63,0x68,0x20,0x6c,
+ 0x6f,0x6f,0x70,0x0a,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74,
+ 0x72,0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x72,0x65,0x61,0x64,0x73,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x70,0x61,0x63,
+ 0x6b,0x65,0x74,0x20,0x3d,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x70,0x61,0x63,0x6b,
+ 0x65,0x74,0x20,0x6f,0x72,0x20,0x64,0x62,0x67,0x70,0x2e,0x72,0x65,0x61,0x64,0x5f,
+ 0x70,0x61,0x63,0x6b,0x65,0x74,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x57,0x41,0x52,0x4e,0x49,
+ 0x4e,0x47,0x22,0x2c,0x20,0x22,0x6c,0x6f,0x73,0x74,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x22,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6c,0x65,0x61,0x6e,
+ 0x75,0x70,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
+ 0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,
+ 0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x44,0x45,0x42,0x55,0x47,0x22,
+ 0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6d,0x64,0x2c,0x20,0x61,0x72,0x67,
+ 0x73,0x2c,0x20,0x64,0x61,0x74,0x61,0x20,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x63,
+ 0x6d,0x64,0x5f,0x70,0x61,0x72,0x73,0x65,0x28,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,
+ 0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x46,0x49,0x58,
+ 0x4d,0x45,0x3a,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x73,0x75,0x63,0x68,
+ 0x20,0x61,0x73,0x20,0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x61,0x74,0x69,0x6f,0x6e,
+ 0x73,0x20,0x73,0x65,0x6e,0x74,0x20,0x69,0x6e,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,
+ 0x6d,0x6f,0x64,0x65,0x20,0x63,0x6f,0x75,0x6c,0x64,0x20,0x6c,0x65,0x61,0x64,0x20,
+ 0x62,0x6f,0x74,0x68,0x20,0x65,0x6e,0x67,0x69,0x6e,0x65,0x20,0x61,0x6e,0x64,0x20,
+ 0x49,0x44,0x45,0x20,0x69,0x6e,0x20,0x69,0x6e,0x63,0x6f,0x6e,0x73,0x69,0x73,0x74,
+ 0x65,0x6e,0x74,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x3a,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,
+ 0x6b,0x65,0x20,0x61,0x20,0x62,0x6c,0x61,0x63,0x6b,0x6c,0x69,0x73,0x74,0x2f,0x77,
+ 0x68,0x69,0x74,0x65,0x6c,0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x66,0x6f,0x72,0x62,
+ 0x69,0x64,0x64,0x65,0x6e,0x20,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x6f,0x77,0x65,0x64,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x69,0x6e,0x20,0x61,0x73,0x79,
+ 0x6e,0x63,0x20,0x3f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x69,0x6e,0x76,0x6f,0x6b,0x65,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,
+ 0x6e,0x63,0x20,0x3d,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x5b,0x63,0x6d,
+ 0x64,0x5d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x66,0x75,
+ 0x6e,0x63,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6f,0x6b,0x2c,0x20,0x63,0x6f,
+ 0x6e,0x74,0x20,0x3d,0x20,0x78,0x70,0x63,0x61,0x6c,0x6c,0x28,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x28,0x29,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75,
+ 0x6e,0x63,0x28,0x73,0x65,0x6c,0x66,0x2c,0x20,0x61,0x72,0x67,0x73,0x2c,0x20,0x64,
+ 0x61,0x74,0x61,0x29,0x20,0x65,0x6e,0x64,0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,
+ 0x74,0x72,0x61,0x63,0x65,0x62,0x61,0x63,0x6b,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x6f,0x6b,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x6e,0x61,
+ 0x6c,0x20,0x65,0x78,0x63,0x65,0x70,0x74,0x69,0x6f,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,
+ 0x6c,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x61,0x74,0x74,
+ 0x72,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x74,0x79,0x70,0x65,0x28,0x63,0x6f,0x6e,0x74,0x29,0x20,
+ 0x3d,0x3d,0x20,0x22,0x74,0x61,0x62,0x6c,0x65,0x22,0x20,0x61,0x6e,0x64,0x20,0x67,
+ 0x65,0x74,0x6d,0x65,0x74,0x61,0x74,0x61,0x62,0x6c,0x65,0x28,0x63,0x6f,0x6e,0x74,
+ 0x29,0x20,0x3d,0x3d,0x20,0x64,0x62,0x67,0x70,0x2e,0x44,0x42,0x47,0x50,0x5f,0x45,
+ 0x52,0x52,0x5f,0x4d,0x45,0x54,0x41,0x54,0x41,0x42,0x4c,0x45,0x20,0x74,0x68,0x65,
+ 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c,
+ 0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6e,0x74,0x2e,0x63,0x6f,0x64,
+ 0x65,0x2c,0x20,0x63,0x6f,0x6e,0x74,0x2e,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x2c,
+ 0x20,0x63,0x6f,0x6e,0x74,0x2e,0x61,0x74,0x74,0x72,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x2c,0x20,0x61,
+ 0x74,0x74,0x72,0x20,0x3d,0x20,0x39,0x39,0x38,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,
+ 0x69,0x6e,0x67,0x28,0x63,0x6f,0x6e,0x74,0x29,0x2c,0x20,0x7b,0x20,0x7d,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
+ 0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52,0x22,0x2c,0x20,
+ 0x22,0x43,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x25,0x73,0x20,0x63,0x61,0x75,0x73,
+ 0x65,0x64,0x3a,0x20,0x28,0x25,0x64,0x29,0x20,0x25,0x73,0x22,0x2c,0x20,0x63,0x6d,
+ 0x64,0x2c,0x20,0x63,0x6f,0x64,0x65,0x2c,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,
+ 0x67,0x28,0x6d,0x73,0x67,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x74,0x74,0x72,0x2e,0x63,0x6f,0x6d,
+ 0x6d,0x61,0x6e,0x64,0x2c,0x20,0x61,0x74,0x74,0x72,0x2e,0x74,0x72,0x61,0x6e,0x73,
+ 0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x63,0x6d,0x64,0x2c,
+ 0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,
+ 0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,0x20,
+ 0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,0x73,
+ 0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x61,0x74,0x74,0x72,0x2c,
+ 0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61,0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72,
+ 0x28,0x63,0x6f,0x64,0x65,0x2c,0x20,0x6d,0x73,0x67,0x29,0x20,0x7d,0x20,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
+ 0x69,0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,
+ 0x66,0x2e,0x70,0x72,0x65,0x76,0x69,0x6f,0x75,0x73,0x5f,0x63,0x6f,0x6e,0x74,0x65,
+ 0x78,0x74,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,
+ 0x20,0x63,0x6d,0x64,0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,
+ 0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,0x67,0x73,0x2e,0x69,0x20,0x7d,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x3d,0x3d,
+ 0x20,0x6e,0x69,0x6c,0x20,0x61,0x6e,0x64,0x20,0x61,0x73,0x79,0x6e,0x63,0x5f,0x6d,
+ 0x6f,0x64,0x65,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,
+ 0x66,0x20,0x63,0x6f,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x66,0x61,0x6c,0x73,0x65,0x20,
+ 0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,0x20,0x49,0x6e,0x20,0x63,0x61,0x73,0x65,0x20,
+ 0x6f,0x66,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,0x74,0x68,0x61,0x74,
+ 0x20,0x66,0x75,0x6c,0x6c,0x79,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x73,0x20,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x2c,0x20,0x74,0x68,
+ 0x65,0x20,0x6d,0x6f,0x64,0x65,0x20,0x69,0x73,0x20,0x73,0x79,0x6e,0x63,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x73,0x79,0x6e,0x63,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x20,0x66,0x61,0x6c,0x73,
+ 0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,
+ 0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x67,0x28,0x22,
+ 0x47,0x6f,0x74,0x20,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x20,0x63,0x6f,0x6d,0x6d,
+ 0x61,0x6e,0x64,0x3a,0x20,0x22,0x2e,0x2e,0x63,0x6d,0x64,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,
+ 0x6e,0x64,0x5f,0x78,0x6d,0x6c,0x28,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x2c,
+ 0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,0x72,0x65,0x73,0x70,0x6f,0x6e,
+ 0x73,0x65,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x20,0x63,0x6f,
+ 0x6d,0x6d,0x61,0x6e,0x64,0x20,0x3d,0x20,0x63,0x6d,0x64,0x2c,0x20,0x74,0x72,0x61,
+ 0x6e,0x73,0x61,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x64,0x20,0x3d,0x20,0x61,0x72,
+ 0x67,0x73,0x2e,0x69,0x2c,0x20,0x7d,0x2c,0x20,0x64,0x62,0x67,0x70,0x2e,0x6d,0x61,
+ 0x6b,0x65,0x5f,0x65,0x72,0x72,0x6f,0x72,0x28,0x34,0x29,0x20,0x7d,0x20,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,
+ 0x61,0x63,0x6b,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x2d,0x2d,0x20,0x66,0x72,0x65,
+ 0x65,0x20,0x61,0x6c,0x6c,0x6f,0x63,0x61,0x74,0x65,0x64,0x20,0x63,0x6f,0x6e,0x74,
+ 0x65,0x78,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x74,
+ 0x61,0x74,0x65,0x20,0x3d,0x20,0x22,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x22,0x0a,
+ 0x20,0x20,0x20,0x20,0x73,0x65,0x6c,0x66,0x2e,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74,
+ 0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,0x28,0x30,0x29,0x20,0x2d,0x2d,0x20,0x72,0x65,
+ 0x73,0x65,0x74,0x20,0x73,0x6f,0x63,0x6b,0x65,0x74,0x20,0x74,0x6f,0x20,0x61,0x73,
+ 0x79,0x6e,0x63,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x2d,0x2d,0x20,0x53,0x74,0x61,0x63,
+ 0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x20,0x63,0x61,0x6e,0x20,0x62,
+ 0x65,0x20,0x70,0x72,0x65,0x74,0x74,0x79,0x20,0x63,0x6f,0x6d,0x70,0x6c,0x65,0x78,
+ 0x20,0x73,0x6f,0x6d,0x65,0x74,0x69,0x6d,0x65,0x73,0x2c,0x20,0x65,0x73,0x70,0x65,
+ 0x63,0x69,0x61,0x6c,0x6c,0x79,0x20,0x77,0x69,0x74,0x68,0x20,0x4c,0x75,0x61,0x4a,
+ 0x49,0x54,0x20,0x28,0x61,0x73,0x20,0x74,0x61,0x69,0x6c,0x2d,0x63,0x61,0x6c,0x6c,
+ 0x20,0x6f,0x70,0x74,0x69,0x6d,0x69,0x7a,0x61,0x74,0x69,0x6f,0x6e,0x20,0x61,0x72,
+ 0x65,0x0a,0x2d,0x2d,0x20,0x6d,0x6f,0x72,0x65,0x20,0x61,0x67,0x67,0x72,0x65,0x73,
+ 0x73,0x69,0x76,0x65,0x20,0x61,0x73,0x20,0x73,0x74,0x6f,0x63,0x6b,0x20,0x4c,0x75,
+ 0x61,0x29,0x2e,0x20,0x53,0x6f,0x20,0x61,0x6c,0x6c,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x20,0x73,0x74,0x75,0x66,0x66,0x20,0x69,0x73,0x20,0x64,0x6f,0x6e,
+ 0x65,0x20,0x69,0x6e,0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2c,0x20,0x77,0x68,0x69,0x63,0x68,0x20,0x6c,0x65,
+ 0x61,0x76,0x65,0x20,0x74,0x68,0x65,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x0a,
+ 0x2d,0x2d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x69,0x6e,0x20,0x61,0x20,0x63,0x6c,
+ 0x65,0x61,0x6e,0x20,0x73,0x74,0x61,0x74,0x65,0x20,0x61,0x6e,0x64,0x20,0x61,0x6c,
+ 0x6c,0x6f,0x77,0x20,0x66,0x61,0x73,0x74,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x63,
+ 0x6c,0x65,0x61,0x72,0x65,0x72,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x6f,0x70,0x65,
+ 0x72,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,0x28,0x6e,0x6f,0x20,0x6e,0x65,0x65,0x64,
+ 0x20,0x74,0x6f,0x20,0x72,0x65,0x6d,0x6f,0x76,0x65,0x20,0x61,0x6c,0x6c,0x20,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x63,0x61,0x6c,0x6c,0x73,0x0a,0x2d,0x2d,
+ 0x20,0x66,0x72,0x6f,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x66,0x6f,0x72,0x20,
+ 0x65,0x61,0x63,0x68,0x20,0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x29,0x2e,
+ 0x0a,0x2d,0x2d,0x20,0x48,0x6f,0x77,0x65,0x76,0x65,0x72,0x2c,0x20,0x74,0x68,0x69,
+ 0x73,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x61,0x6c,0x77,0x61,0x79,
+ 0x73,0x20,0x77,0x6f,0x72,0x6b,0x20,0x77,0x69,0x74,0x68,0x20,0x73,0x74,0x6f,0x63,
+ 0x6b,0x20,0x4c,0x75,0x61,0x20,0x35,0x2e,0x31,0x20,0x61,0x73,0x20,0x74,0x68,0x65,
+ 0x20,0x6d,0x61,0x69,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x20,
+ 0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,
+ 0x6e,0x63,0x65,0x64,0x0a,0x2d,0x2d,0x20,0x28,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x2e,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x6e,0x69,0x6c,0x29,0x2e,0x20,0x46,0x6f,0x72,0x20,0x74,0x68,
+ 0x69,0x73,0x20,0x70,0x61,0x72,0x74,0x69,0x63,0x75,0x6c,0x61,0x72,0x20,0x63,0x61,
+ 0x73,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,
+ 0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x73,0x20,0x73,0x74,0x61,0x72,0x74,0x65,0x64,
+ 0x20,0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x74,0x6f,0x70,0x20,0x6f,0x66,0x0a,0x2d,
+ 0x2d,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,
+ 0x61,0x6e,0x64,0x20,0x65,0x76,0x65,0x72,0x79,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,
+ 0x6f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x20,0x69,0x73,0x20,0x72,0x65,0x6c,
+ 0x61,0x74,0x69,0x76,0x65,0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x65,0x20,0x68,0x6f,
+ 0x6f,0x6b,0x20,0x6c,0x65,0x76,0x65,0x6c,0x20,0x28,0x73,0x65,0x65,0x20,0x4d,0x61,
+ 0x69,0x6e,0x54,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x6e,0x20,0x75,0x74,0x69,0x6c,
+ 0x2e,0x6c,0x75,0x61,0x29,0x2e,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28,
+ 0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,
+ 0x20,0x3d,0x20,0x6e,0x69,0x6c,0x2c,0x20,0x6e,0x69,0x6c,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x28,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,
+ 0x72,0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x7e,0x3d,0x20,0x6c,0x69,0x6e,
+ 0x65,0x29,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x69,0x66,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,
+ 0x6e,0x74,0x73,0x2e,0x67,0x75,0x65,0x73,0x73,0x28,0x6c,0x69,0x6e,0x65,0x29,0x20,
+ 0x7e,0x3d,0x20,0x6e,0x69,0x6c,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,
+ 0x66,0x6f,0x20,0x3d,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,
+ 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x3a,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,
+ 0x28,0x30,0x2c,0x20,0x22,0x53,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x75,0x72,0x69,0x20,0x3d,
+ 0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72,
+ 0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x75,0x72,
+ 0x69,0x20,0x61,0x6e,0x64,0x20,0x75,0x72,0x69,0x20,0x7e,0x3d,0x20,0x64,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x5f,0x75,0x72,0x69,0x20,0x61,0x6e,0x64,0x20,0x75,0x72,
+ 0x69,0x20,0x7e,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x6d,0x6f,
+ 0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,0x20,0x74,0x68,0x65,0x6e,0x20,0x2d,0x2d,
+ 0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x64,0x6f,
+ 0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,0x69,0x66,0x20,
+ 0x74,0x68,0x65,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x69,0x73,0x20,0x6e,0x6f,
+ 0x74,0x20,0x6b,0x6e,0x6f,0x77,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,
+ 0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,
+ 0x6e,0x74,0x73,0x2e,0x61,0x74,0x28,0x75,0x72,0x69,0x2c,0x20,0x6c,0x69,0x6e,0x65,
+ 0x29,0x20,0x2d,0x2d,0x6f,0x72,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,
+ 0x74,0x73,0x2e,0x64,0x6f,0x65,0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x3d,
+ 0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,0x74,0x73,0x2e,0x64,0x6f,0x65,
+ 0x73,0x5f,0x6d,0x61,0x74,0x63,0x68,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x6f,0x5f,
+ 0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,0x65,
+ 0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x65,0x76,0x65,0x6e,
+ 0x74,0x73,0x2e,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x28,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x68,0x65,0x63,
+ 0x6b,0x20,0x66,0x6f,0x72,0x20,0x61,0x73,0x79,0x6e,0x63,0x20,0x63,0x6f,0x6d,0x6d,
+ 0x61,0x6e,0x64,0x73,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x64,0x6f,0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x20,0x3d,0x20,0x64,
+ 0x62,0x67,0x70,0x2e,0x72,0x65,0x61,0x64,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x28,
+ 0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x73,
+ 0x6b,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x70,
+ 0x61,0x63,0x6b,0x65,0x74,0x20,0x74,0x68,0x65,0x6e,0x20,0x64,0x6f,0x5f,0x62,0x72,
+ 0x65,0x61,0x6b,0x20,0x3d,0x20,0x74,0x72,0x75,0x65,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x6f,
+ 0x5f,0x62,0x72,0x65,0x61,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x70,0x72,0x65,0x76,0x5f,0x62,0x72,
+ 0x65,0x61,0x6b,0x5f,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x6c,0x69,0x6e,0x65,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x75,
+ 0x63,0x63,0x65,0x73,0x73,0x2c,0x20,0x65,0x72,0x72,0x20,0x3d,0x20,0x70,0x63,0x61,
+ 0x6c,0x6c,0x28,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70,
+ 0x2c,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,
+ 0x2c,0x20,0x70,0x61,0x63,0x6b,0x65,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x75,0x63,0x63,0x65,0x73,0x73,
+ 0x20,0x74,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x67,0x28,0x22,0x45,0x52,0x52,0x4f,0x52,
+ 0x22,0x2c,0x20,0x22,0x45,0x72,0x72,0x6f,0x72,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x20,0x6c,0x6f,0x6f,0x70,0x3a,0x20,0x22,0x2e,0x2e,0x65,
+ 0x72,0x72,0x29,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6c,0x69,0x6e,0x65,0x5f,
+ 0x68,0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x63,0x72,
+ 0x65,0x61,0x74,0x65,0x28,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x28,0x6c,0x69,
+ 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x74,0x72,
+ 0x75,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,
+ 0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x20,0x3d,0x20,0x63,0x6f,0x79,
+ 0x69,0x65,0x6c,0x64,0x28,0x29,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,
+ 0x6e,0x64,0x29,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f,
+ 0x6b,0x28,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
+ 0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x20,0x6f,0x72,
+ 0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,
+ 0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,
+ 0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,
+ 0x20,0x3d,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,
+ 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,
+ 0x22,0x74,0x61,0x69,0x6c,0x20,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74,0x68,0x65,0x6e,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x61,0x69,0x6c,
+ 0x20,0x63,0x61,0x6c,0x6c,0x73,0x20,0x68,0x61,0x73,0x20,0x6e,0x6f,0x20,0x65,0x66,
+ 0x66,0x65,0x63,0x74,0x73,0x20,0x6f,0x6e,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x68,
+ 0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x3a,0x20,0x69,0x74,0x20,0x69,0x73,0x20,0x6f,
+ 0x6e,0x6c,0x79,0x20,0x75,0x73,0x65,0x64,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x66,0x6f,
+ 0x72,0x20,0x73,0x74,0x65,0x70,0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x73,0x20,
+ 0x62,0x75,0x74,0x20,0x61,0x20,0x73,0x75,0x63,0x68,0x20,0x65,0x76,0x65,0x6e,0x20,
+ 0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x69,0x6e,0x74,0x65,0x72,0x66,0x65,0x72,0x65,0x20,0x77,0x69,
+ 0x74,0x68,0x20,0x61,0x6e,0x79,0x20,0x6f,0x66,0x20,0x74,0x68,0x65,0x6d,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,
+ 0x3d,0x3d,0x20,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x22,0x20,0x6f,0x72,0x20,0x65,
+ 0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x69,0x6c,0x20,0x72,0x65,
+ 0x74,0x75,0x72,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,
+ 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,
+ 0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x2d,
+ 0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x20,0x2d,0x2d,0x20,0x6c,
+ 0x69,0x6e,0x65,0x20,0x65,0x76,0x65,0x6e,0x74,0x3a,0x20,0x63,0x68,0x65,0x63,0x6b,
+ 0x20,0x66,0x6f,0x72,0x20,0x62,0x72,0x65,0x61,0x6b,0x70,0x6f,0x69,0x6e,0x74,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,
+ 0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x75,0x74,
+ 0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,
+ 0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,
+ 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x5b,0x31,0x5d,0x20,
+ 0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f,
+ 0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69,0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x75,0x6e,0x20,0x74,0x68,0x65,0x20,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x6e,0x20,
+ 0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x6f,
+ 0x6e,0x20,0x74,0x68,0x65,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x73,0x65,
+ 0x73,0x20,0x28,0x73,0x69,0x6d,0x70,0x6c,0x69,0x66,0x69,0x65,0x73,0x20,0x73,0x74,
+ 0x61,0x63,0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x73,0x73,0x65,0x72,0x74,
+ 0x28,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x6c,0x69,0x6e,0x65,0x5f,0x68,
+ 0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,
+ 0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x69,0x66,0x20,0x72,
+ 0x61,0x77,0x67,0x65,0x74,0x28,0x5f,0x47,0x2c,0x20,0x22,0x6a,0x69,0x74,0x22,0x29,
+ 0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x67,
+ 0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x20,0x3d,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,
+ 0x6f,0x6e,0x28,0x65,0x76,0x65,0x6e,0x74,0x2c,0x20,0x6c,0x69,0x6e,0x65,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x68,
+ 0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,
+ 0x28,0x29,0x20,0x6f,0x72,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,
+ 0x20,0x22,0x63,0x61,0x6c,0x6c,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x64,0x65,0x62,0x75,
+ 0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x32,0x2c,0x20,0x22,0x53,0x22,
+ 0x29,0x2e,0x77,0x68,0x61,0x74,0x20,0x3d,0x3d,0x20,0x22,0x43,0x22,0x20,0x74,0x68,
+ 0x65,0x6e,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,
+ 0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,
+ 0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,
+ 0x72,0x65,0x61,0x64,0x5d,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,
+ 0x3d,0x20,0x22,0x72,0x65,0x74,0x75,0x72,0x6e,0x22,0x20,0x6f,0x72,0x20,0x65,0x76,
+ 0x65,0x6e,0x74,0x20,0x3d,0x3d,0x20,0x22,0x74,0x61,0x69,0x6c,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x52,0x65,0x74,0x75,0x72,0x6e,0x20,
+ 0x68,0x6f,0x6f,0x6b,0x73,0x20,0x61,0x72,0x65,0x20,0x6e,0x6f,0x74,0x20,0x63,0x61,
+ 0x6c,0x6c,0x65,0x64,0x20,0x66,0x6f,0x72,0x20,0x74,0x61,0x69,0x6c,0x20,0x63,0x61,
+ 0x6c,0x6c,0x73,0x20,0x69,0x6e,0x20,0x4a,0x49,0x54,0x20,0x28,0x62,0x75,0x74,0x20,
+ 0x75,0x6e,0x6c,0x69,0x6b,0x65,0x20,0x35,0x2e,0x32,0x20,0x74,0x68,0x65,0x72,0x65,
+ 0x20,0x69,0x73,0x20,0x6e,0x6f,0x20,0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x6b,0x6e,
+ 0x6f,0x77,0x20,0x77,0x68,0x65,0x74,0x68,0x65,0x72,0x20,0x61,0x20,0x63,0x61,0x6c,
+ 0x6c,0x20,0x69,0x73,0x20,0x74,0x61,0x69,0x6c,0x20,0x6f,0x72,0x20,0x6e,0x6f,0x74,
+ 0x29,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x20,0x53,0x6f,0x20,0x74,0x68,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x20,0x72,0x65,
+ 0x6c,0x69,0x61,0x62,0x6c,0x65,0x20,0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x6b,0x6e,
+ 0x6f,0x77,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x69,
+ 0x73,0x20,0x74,0x6f,0x20,0x77,0x61,0x6c,0x6b,0x20,0x69,0x74,0x2e,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x32,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,0x44,0x4f,0x3a,0x20,0x66,
+ 0x69,0x6e,0x64,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x65,0x73,0x74,0x20,
+ 0x77,0x61,0x79,0x20,0x74,0x6f,0x20,0x63,0x61,0x6c,0x6c,0x20,0x67,0x65,0x74,0x69,
+ 0x6e,0x66,0x6f,0x20,0x28,0x27,0x77,0x68,0x61,0x74,0x27,0x20,0x70,0x61,0x72,0x61,
+ 0x6d,0x65,0x74,0x65,0x72,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x77,0x68,0x69,0x6c,0x65,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,
+ 0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x64,0x65,0x70,0x74,0x68,0x2c,0x20,0x22,0x66,
+ 0x22,0x29,0x20,0x64,0x6f,0x20,0x64,0x65,0x70,0x74,0x68,0x20,0x3d,0x20,0x64,0x65,
+ 0x70,0x74,0x68,0x20,0x2b,0x20,0x31,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,
+ 0x76,0x65,0x6c,0x73,0x5b,0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x64,
+ 0x65,0x70,0x74,0x68,0x20,0x2d,0x20,0x32,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x65,0x6c,0x73,0x65,0x69,0x66,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,0x3d,0x3d,
+ 0x20,0x22,0x6c,0x69,0x6e,0x65,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,
+ 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x75,
+ 0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x54,0x68,0x72,0x65,0x61,
+ 0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x28,0x29,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x61,0x63,
+ 0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x72,
+ 0x6f,0x5b,0x31,0x5d,0x20,0x3d,0x3d,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x20,0x74,
+ 0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x6c,0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x28,0x6c,0x69,
+ 0x6e,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x72,0x75,0x6e,0x20,0x74,0x68,0x65,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x20,0x6c,0x6f,0x6f,0x70,0x20,0x69,0x6e,
+ 0x20,0x61,0x6e,0x6f,0x74,0x68,0x65,0x72,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
+ 0x6f,0x6e,0x20,0x74,0x68,0x65,0x20,0x6f,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x73,
+ 0x65,0x73,0x20,0x28,0x73,0x69,0x6d,0x70,0x6c,0x69,0x66,0x69,0x65,0x73,0x20,0x73,
+ 0x74,0x61,0x63,0x6b,0x20,0x68,0x61,0x6e,0x64,0x6c,0x69,0x6e,0x67,0x29,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
+ 0x73,0x73,0x65,0x72,0x74,0x28,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x6c,
+ 0x69,0x6e,0x65,0x5f,0x68,0x6f,0x6f,0x6b,0x5f,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x6c,
+ 0x69,0x6e,0x65,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,
+ 0x2e,0x63,0x6f,0x72,0x6f,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x65,0x6e,0x64,0x0a,0x0a,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,
+ 0x69,0x6f,0x6e,0x20,0x69,0x6e,0x69,0x74,0x28,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,
+ 0x6f,0x72,0x74,0x2c,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x2c,0x20,0x74,0x72,0x61,
+ 0x6e,0x73,0x70,0x6f,0x72,0x74,0x2c,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,
+ 0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2c,0x20,0x77,0x6f,0x72,0x6b,0x69,
+ 0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x2c,0x20,0x73,0x65,0x61,
+ 0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x20,0x67,0x65,0x74,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x69,0x6f,0x6e,0x20,
+ 0x64,0x61,0x74,0x61,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x68,
+ 0x6f,0x73,0x74,0x20,0x3d,0x20,0x68,0x6f,0x73,0x74,0x20,0x6f,0x72,0x20,0x6f,0x73,
+ 0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x20,0x22,0x44,0x42,0x47,0x50,0x5f,0x49,0x44,
+ 0x45,0x48,0x4f,0x53,0x54,0x22,0x20,0x6f,0x72,0x20,0x22,0x31,0x32,0x37,0x2e,0x30,
+ 0x2e,0x30,0x2e,0x31,0x22,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x70,0x6f,0x72,0x74,0x20,0x6f,0x72,0x20,0x6f,
+ 0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x20,0x22,0x44,0x42,0x47,0x50,0x5f,0x49,
+ 0x44,0x45,0x50,0x4f,0x52,0x54,0x22,0x20,0x6f,0x72,0x20,0x22,0x31,0x30,0x30,0x30,
+ 0x30,0x22,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x64,0x65,
+ 0x6b,0x65,0x79,0x20,0x3d,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x20,0x6f,0x72,0x20,
+ 0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x28,0x22,0x44,0x42,0x47,0x50,0x5f,
+ 0x49,0x44,0x45,0x4b,0x45,0x59,0x22,0x29,0x20,0x6f,0x72,0x20,0x22,0x6c,0x75,0x61,
+ 0x69,0x64,0x65,0x6b,0x65,0x79,0x22,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,
+ 0x69,0x6e,0x69,0x74,0x20,0x70,0x6c,0x61,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x6f,0x64,
+ 0x75,0x6c,0x65,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x65,0x78,
+ 0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x20,
+ 0x3d,0x20,0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,
+ 0x6f,0x72,0x6d,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,
+ 0x28,0x22,0x44,0x42,0x47,0x50,0x5f,0x50,0x4c,0x41,0x54,0x46,0x4f,0x52,0x4d,0x22,
+ 0x29,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,
+ 0x61,0x6c,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,
+ 0x6f,0x72,0x79,0x20,0x3d,0x20,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,
+ 0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,
+ 0x65,0x6e,0x76,0x28,0x22,0x44,0x42,0x47,0x50,0x5f,0x57,0x4f,0x52,0x4b,0x49,0x4e,
+ 0x47,0x44,0x49,0x52,0x22,0x29,0x20,0x6f,0x72,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,
+ 0x20,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x69,0x6e,0x69,0x74,0x28,
+ 0x65,0x78,0x65,0x63,0x75,0x74,0x69,0x6f,0x6e,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,
+ 0x6d,0x2c,0x77,0x6f,0x72,0x6b,0x69,0x6e,0x67,0x64,0x69,0x72,0x65,0x63,0x74,0x6f,
+ 0x72,0x79,0x2c,0x73,0x65,0x61,0x72,0x63,0x68,0x70,0x61,0x74,0x68,0x73,0x29,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x72,0x61,0x6e,
+ 0x73,0x70,0x6f,0x72,0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x70,
+ 0x61,0x74,0x68,0x20,0x3d,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x20,
+ 0x6f,0x72,0x20,0x6f,0x73,0x2e,0x67,0x65,0x74,0x65,0x6e,0x76,0x28,0x22,0x44,0x42,
+ 0x47,0x50,0x5f,0x54,0x52,0x41,0x4e,0x53,0x50,0x4f,0x52,0x54,0x22,0x29,0x20,0x6f,
+ 0x72,0x20,0x22,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x2e,0x74,0x72,0x61,0x6e,
+ 0x73,0x70,0x6f,0x72,0x74,0x2e,0x6c,0x75,0x61,0x73,0x6f,0x63,0x6b,0x65,0x74,0x22,
+ 0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x74,0x72,0x61,0x6e,0x73,
+ 0x70,0x6f,0x72,0x74,0x20,0x3d,0x20,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x28,0x74,
+ 0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x70,0x61,0x74,0x68,0x29,0x0a,0x0a,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,0x6e,0x73,0x74,0x61,0x6c,0x6c,0x20,0x62,0x61,
+ 0x73,0x65,0x36,0x34,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x73,0x20,0x69,
+ 0x6e,0x74,0x6f,0x20,0x75,0x74,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x75,0x74,0x69,
+ 0x6c,0x2e,0x62,0x36,0x34,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x72,0x61,0x77,0x62,
+ 0x36,0x34,0x2c,0x20,0x75,0x74,0x69,0x6c,0x2e,0x75,0x6e,0x62,0x36,0x34,0x20,0x3d,
+ 0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x62,0x36,0x34,0x2c,0x20,
+ 0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x72,0x61,0x77,0x62,0x36,0x34,
+ 0x2c,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x75,0x6e,0x62,0x36,
+ 0x34,0x0a,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6b,0x74,
+ 0x20,0x3d,0x20,0x61,0x73,0x73,0x65,0x72,0x74,0x28,0x74,0x72,0x61,0x6e,0x73,0x70,
+ 0x6f,0x72,0x74,0x2e,0x63,0x72,0x65,0x61,0x74,0x65,0x28,0x29,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x73,0x6b,0x74,0x3a,0x73,0x65,0x74,0x74,0x69,0x6d,0x65,0x6f,0x75,0x74,
+ 0x28,0x6e,0x69,0x6c,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x72,
+ 0x79,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x73,0x65,0x76,
+ 0x65,0x72,0x61,0x6c,0x20,0x74,0x69,0x6d,0x65,0x73,0x3a,0x20,0x69,0x66,0x20,0x49,
+ 0x44,0x45,0x20,0x6c,0x61,0x75,0x6e,0x63,0x68,0x65,0x73,0x20,0x62,0x6f,0x74,0x68,
+ 0x20,0x70,0x72,0x6f,0x63,0x65,0x73,0x73,0x20,0x61,0x6e,0x64,0x20,0x73,0x65,0x72,
+ 0x76,0x65,0x72,0x20,0x61,0x74,0x20,0x73,0x61,0x6d,0x65,0x20,0x74,0x69,0x6d,0x65,
+ 0x2c,0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,
+ 0x61,0x74,0x74,0x65,0x6d,0x70,0x74,0x73,0x20,0x6d,0x61,0x79,0x20,0x66,0x61,0x69,
+ 0x6c,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x6f,0x6b,0x2c,0x20,
+ 0x65,0x72,0x72,0x0a,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74,
+ 0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62,
+ 0x75,0x67,0x67,0x65,0x72,0x20,0x76,0x25,0x73,0x22,0x2c,0x20,0x44,0x42,0x47,0x50,
+ 0x5f,0x43,0x4c,0x49,0x45,0x4e,0x54,0x5f,0x56,0x45,0x52,0x53,0x49,0x4f,0x4e,0x29,
+ 0x29,0x0a,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74,0x72,0x69,
+ 0x6e,0x67,0x2e,0x66,0x6f,0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x3a,0x20,0x54,0x72,0x79,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63,
+ 0x6f,0x6e,0x6e,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x73,0x20,
+ 0x2e,0x2e,0x2e,0x20,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,
+ 0x74,0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x6f,0x6b,0x2c,0x20,0x65,0x72,0x72,0x20,
+ 0x3d,0x20,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x28,0x68,0x6f,
+ 0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,
+ 0x72,0x20,0x69,0x3d,0x31,0x2c,0x20,0x34,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6f,0x6b,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x22,
+ 0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x3a,0x20,0x43,0x6f,0x6e,0x6e,0x65,0x63,
+ 0x74,0x69,0x6f,0x6e,0x20,0x73,0x75,0x63,0x63,0x65,0x65,0x64,0x2e,0x22,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x72,0x65,0x61,0x6b,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x77,0x61,0x69,0x74,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,
+ 0x72,0x74,0x2e,0x73,0x6c,0x65,0x65,0x70,0x28,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x74,0x68,0x65,0x6e,0x20,
+ 0x72,0x65,0x74,0x72,0x79,0x2e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x70,0x72,0x69,0x6e,0x74,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,
+ 0x72,0x6d,0x61,0x74,0x28,0x22,0x44,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x3a,0x20,
+ 0x52,0x65,0x74,0x72,0x79,0x69,0x6e,0x67,0x20,0x74,0x6f,0x20,0x63,0x6f,0x6e,0x6e,
+ 0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x73,0x20,0x2e,0x2e,0x2e,
+ 0x20,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6b,0x2c,0x20,0x65,
+ 0x72,0x72,0x20,0x3d,0x20,0x73,0x6b,0x74,0x3a,0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,
+ 0x28,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x65,0x72,0x72,0x20,0x74,0x68,0x65,0x6e,
+ 0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x73,0x74,0x72,0x69,0x6e,0x67,0x2e,0x66,0x6f,
+ 0x72,0x6d,0x61,0x74,0x28,0x22,0x43,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x63,0x6f,0x6e,
+ 0x6e,0x65,0x63,0x74,0x20,0x74,0x6f,0x20,0x25,0x73,0x3a,0x25,0x64,0x20,0x3a,0x20,
+ 0x25,0x73,0x22,0x2c,0x20,0x68,0x6f,0x73,0x74,0x2c,0x20,0x70,0x6f,0x72,0x74,0x2c,
+ 0x20,0x65,0x72,0x72,0x29,0x29,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x64,0x65,0x62,0x75,0x67,
+ 0x67,0x65,0x72,0x20,0x61,0x6e,0x64,0x20,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,
+ 0x74,0x20,0x6c,0x61,0x79,0x65,0x72,0x20,0x55,0x52,0x49,0x0a,0x20,0x20,0x20,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x75,0x72,0x69,0x20,0x3d,0x20,0x70,
+ 0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,0x75,0x72,0x69,0x28,
+ 0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x31,0x29,
+ 0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x74,0x72,0x61,
+ 0x6e,0x73,0x70,0x6f,0x72,0x74,0x6d,0x6f,0x64,0x75,0x6c,0x65,0x5f,0x75,0x72,0x69,
+ 0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,0x74,0x5f,
+ 0x75,0x72,0x69,0x28,0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,
+ 0x6f,0x28,0x74,0x72,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74,0x2e,0x63,0x72,0x65,0x61,
+ 0x74,0x65,0x29,0x2e,0x73,0x6f,0x75,0x72,0x63,0x65,0x29,0x0a,0x0a,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x20,0x67,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x72,0x6f,0x6f,0x74,
+ 0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x70,0x61,0x74,0x68,0x20,0x28,0x74,0x68,
+ 0x65,0x20,0x68,0x69,0x67,0x68,0x65,0x73,0x74,0x20,0x70,0x6f,0x73,0x73,0x69,0x62,
+ 0x6c,0x65,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x69,0x6e,0x64,0x65,0x78,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,
+ 0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x69,0x3d,0x32,0x2c,0x20,0x6d,0x61,
+ 0x74,0x68,0x2e,0x68,0x75,0x67,0x65,0x20,0x64,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x69,0x6e,0x66,0x6f,0x20,0x3d,0x20,
+ 0x64,0x65,0x62,0x75,0x67,0x2e,0x67,0x65,0x74,0x69,0x6e,0x66,0x6f,0x28,0x69,0x29,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x69,0x6e,0x66,0x6f,0x20,0x74,0x68,0x65,0x6e,0x20,0x62,0x72,0x65,0x61,0x6b,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x20,0x3d,0x20,0x70,0x6c,0x61,0x74,0x66,0x6f,0x72,0x6d,0x2e,0x67,0x65,
+ 0x74,0x5f,0x75,0x72,0x69,0x28,0x69,0x6e,0x66,0x6f,0x2e,0x73,0x6f,0x75,0x72,0x63,
+ 0x65,0x29,0x20,0x6f,0x72,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,
+ 0x73,0x6f,0x75,0x72,0x63,0x65,0x20,0x74,0x68,0x65,0x6e,0x20,0x73,0x6f,0x75,0x72,
+ 0x63,0x65,0x20,0x3d,0x20,0x22,0x75,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x3a,0x2f,0x22,
+ 0x20,0x65,0x6e,0x64,0x20,0x2d,0x2d,0x20,0x77,0x68,0x65,0x6e,0x20,0x6c,0x6f,0x61,
+ 0x64,0x65,0x64,0x20,0x62,0x65,0x66,0x6f,0x72,0x65,0x20,0x61,0x63,0x74,0x75,0x61,
+ 0x6c,0x20,0x73,0x63,0x72,0x69,0x70,0x74,0x20,0x28,0x77,0x69,0x74,0x68,0x20,0x61,
+ 0x20,0x63,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x20,0x6c,0x69,0x6e,0x65,0x20,0x73,0x77,
+ 0x69,0x74,0x63,0x68,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x67,0x65,
+ 0x6e,0x65,0x72,0x61,0x74,0x65,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6b,0x69,0x6e,0x64,
+ 0x20,0x6f,0x66,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x69,0x64,0x65,0x6e,0x74,
+ 0x69,0x66,0x69,0x65,0x72,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,
+ 0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,
+ 0x6e,0x67,0x28,0x29,0x20,0x6f,0x72,0x20,0x22,0x6d,0x61,0x69,0x6e,0x22,0x0a,0x20,
+ 0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,
+ 0x74,0x68,0x72,0x65,0x61,0x64,0x5d,0x20,0x3d,0x20,0x31,0x20,0x2d,0x2d,0x20,0x74,
+ 0x68,0x65,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x65,0x76,0x65,0x6e,0x74,0x20,
+ 0x77,0x69,0x6c,0x6c,0x20,0x73,0x65,0x74,0x20,0x74,0x68,0x65,0x20,0x63,0x6f,0x75,
+ 0x6e,0x74,0x65,0x72,0x20,0x74,0x6f,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,
+ 0x63,0x61,0x6c,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64,0x20,0x3d,0x20,
+ 0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x6f,0x73,0x2e,0x74,0x69,0x6d,0x65,
+ 0x28,0x29,0x29,0x20,0x2e,0x2e,0x20,0x22,0x5f,0x22,0x20,0x2e,0x2e,0x20,0x74,0x6f,
+ 0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x29,0x0a,0x0a,
+ 0x20,0x20,0x20,0x20,0x64,0x62,0x67,0x70,0x2e,0x73,0x65,0x6e,0x64,0x5f,0x78,0x6d,
+ 0x6c,0x28,0x73,0x6b,0x74,0x2c,0x20,0x7b,0x20,0x74,0x61,0x67,0x20,0x3d,0x20,0x22,
+ 0x69,0x6e,0x69,0x74,0x22,0x2c,0x20,0x61,0x74,0x74,0x72,0x20,0x3d,0x20,0x7b,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x70,0x70,0x69,0x64,0x20,0x3d,0x20,
+ 0x22,0x4c,0x75,0x61,0x20,0x44,0x42,0x47,0x70,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x69,0x64,0x65,0x6b,0x65,0x79,0x20,0x3d,0x20,0x69,0x64,0x65,
+ 0x6b,0x65,0x79,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x65,0x73,
+ 0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64,
+ 0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x68,0x72,0x65,0x61,0x64,
+ 0x20,0x3d,0x20,0x74,0x6f,0x73,0x74,0x72,0x69,0x6e,0x67,0x28,0x74,0x68,0x72,0x65,
+ 0x61,0x64,0x29,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x61,0x72,
+ 0x65,0x6e,0x74,0x20,0x3d,0x20,0x22,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x20,0x3d,0x20,0x22,0x4c,0x75,
+ 0x61,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,0x74,
+ 0x6f,0x63,0x6f,0x6c,0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x22,
+ 0x31,0x2e,0x30,0x22,0x2c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,
+ 0x6c,0x65,0x75,0x72,0x69,0x20,0x3d,0x20,0x73,0x6f,0x75,0x72,0x63,0x65,0x0a,0x20,
+ 0x20,0x20,0x20,0x7d,0x20,0x7d,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x46,
+ 0x49,0x58,0x4d,0x45,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,
+ 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,
+ 0x67,0x29,0x20,0x3d,0x3e,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,
+ 0x6e,0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,
+ 0x6e,0x67,0x28,0x29,0x29,0x20,0x57,0x48,0x41,0x54,0x20,0x44,0x4f,0x45,0x53,0x20,
+ 0x49,0x54,0x20,0x46,0x49,0x58,0x45,0x53,0x20,0x3f,0x3f,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x73,0x65,0x73,0x73,0x20,0x3d,0x20,0x7b,0x20,0x73,
+ 0x6b,0x74,0x20,0x3d,0x20,0x73,0x6b,0x74,0x2c,0x20,0x73,0x74,0x61,0x74,0x65,0x20,
+ 0x3d,0x20,0x22,0x73,0x74,0x61,0x72,0x74,0x69,0x6e,0x67,0x22,0x2c,0x20,0x69,0x64,
+ 0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x69,0x64,0x2c,0x20,0x63,0x6f,
+ 0x72,0x6f,0x20,0x3d,0x20,0x75,0x74,0x69,0x6c,0x2e,0x43,0x75,0x72,0x72,0x65,0x6e,
+ 0x74,0x54,0x68,0x72,0x65,0x61,0x64,0x28,0x63,0x6f,0x72,0x75,0x6e,0x6e,0x69,0x6e,
+ 0x67,0x29,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,
+ 0x73,0x65,0x73,0x73,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x65,0x73,0x73,0x0a,0x20,
+ 0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x6c,0x6f,0x6f,0x70,
+ 0x28,0x73,0x65,0x73,0x73,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,
+ 0x65,0x74,0x20,0x64,0x65,0x62,0x75,0x67,0x20,0x68,0x6f,0x6f,0x6b,0x73,0x0a,0x20,
+ 0x20,0x20,0x20,0x64,0x65,0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x68,0x6f,0x6f,0x6b,
+ 0x28,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x2c,0x20,
+ 0x22,0x72,0x6c,0x63,0x22,0x29,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x69,
+ 0x6e,0x73,0x74,0x61,0x6c,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x20,0x63,0x6f,0x6c,0x6c,0x65,0x63,0x74,0x69,0x6e,0x67,0x20,0x66,0x75,0x6e,0x63,
+ 0x74,0x69,0x6f,0x6e,0x73,0x2e,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x54,0x4f,
+ 0x44,0x4f,0x3a,0x20,0x6d,0x61,0x69,0x6e,0x74,0x61,0x69,0x6e,0x20,0x61,0x20,0x6c,
+ 0x69,0x73,0x74,0x20,0x6f,0x66,0x20,0x2a,0x61,0x6c,0x6c,0x2a,0x20,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x63,0x61,0x6e,0x20,0x62,0x65,0x20,0x6f,
+ 0x76,0x65,0x72,0x6b,0x69,0x6c,0x6c,0x20,0x28,0x66,0x6f,0x72,0x20,0x65,0x78,0x61,
+ 0x6d,0x70,0x6c,0x65,0x2c,0x20,0x74,0x68,0x65,0x20,0x6f,0x6e,0x65,0x73,0x20,0x63,
+ 0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x62,0x79,0x20,0x63,0x6f,0x70,0x63,0x61,0x6c,
+ 0x6c,0x29,0x2c,0x20,0x6d,0x61,0x6b,0x65,0x20,0x61,0x20,0x65,0x78,0x74,0x65,0x6e,
+ 0x73,0x69,0x6f,0x6e,0x20,0x70,0x6f,0x69,0x6e,0x74,0x20,0x74,0x6f,0x0a,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x20,0x63,0x75,0x73,0x74,0x6f,0x6d,0x69,0x7a,0x65,0x20,0x64,
+ 0x65,0x62,0x75,0x67,0x67,0x65,0x64,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,
+ 0x65,0x73,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,
+ 0x69,0x6e,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,
+ 0x63,0x65,0x64,0x20,0x64,0x75,0x72,0x69,0x6e,0x67,0x20,0x74,0x68,0x65,0x69,0x72,
+ 0x20,0x66,0x69,0x72,0x73,0x74,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x20,0x28,0x73,
+ 0x6f,0x20,0x77,0x65,0x20,0x61,0x72,0x65,0x20,0x73,0x75,0x72,0x65,0x20,0x74,0x68,
+ 0x61,0x74,0x20,0x74,0x68,0x65,0x79,0x20,0x61,0x6c,0x77,0x61,0x79,0x73,0x20,0x68,
+ 0x61,0x76,0x65,0x20,0x61,0x20,0x73,0x74,0x61,0x63,0x6b,0x20,0x66,0x72,0x61,0x6d,
+ 0x65,0x29,0x0a,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,
+ 0x63,0x74,0x69,0x6f,0x6e,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x5f,0x68,0x61,0x6e,
+ 0x64,0x6c,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x63,0x6f,0x73,0x74,0x61,
+ 0x74,0x75,0x73,0x28,0x63,0x6f,0x72,0x6f,0x29,0x20,0x3d,0x3d,0x20,0x22,0x64,0x65,
+ 0x61,0x64,0x22,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,0x72,0x6f,0x5f,
+ 0x69,0x64,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,
+ 0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,
+ 0x5f,0x63,0x6f,0x72,0x6f,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,
+ 0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,
+ 0x72,0x6f,0x6d,0x5f,0x69,0x64,0x5b,0x63,0x6f,0x72,0x6f,0x5f,0x69,0x64,0x5d,0x20,
+ 0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,
+ 0x72,0x6f,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20,0x6e,0x69,0x6c,0x0a,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x63,0x6b,
+ 0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20,
+ 0x6e,0x69,0x6c,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x2e,
+ 0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,
+ 0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,
+ 0x6e,0x65,0x2e,0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,
+ 0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
+ 0x6e,0x6f,0x74,0x20,0x73,0x74,0x61,0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,
+ 0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x74,0x68,0x65,0x6e,0x0a,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x66,0x69,0x72,0x73,0x74,
+ 0x20,0x74,0x69,0x6d,0x65,0x20,0x72,0x65,0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x64,
+ 0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x61,
+ 0x63,0x6b,0x5f,0x6c,0x65,0x76,0x65,0x6c,0x73,0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,
+ 0x3d,0x20,0x30,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,
+ 0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x6e,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,
+ 0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,
+ 0x73,0x2e,0x6e,0x20,0x2b,0x20,0x31,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,
+ 0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,
+ 0x69,0x64,0x5b,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,
+ 0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x6e,0x5d,0x20,0x3d,0x20,0x63,
+ 0x6f,0x72,0x6f,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,
+ 0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,0x66,0x72,0x6f,0x6d,0x5f,0x63,0x6f,0x72,0x6f,
+ 0x5b,0x63,0x6f,0x72,0x6f,0x5d,0x20,0x3d,0x20,0x63,0x6f,0x72,0x65,0x2e,0x61,0x63,
+ 0x74,0x69,0x76,0x65,0x5f,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x2e,
+ 0x6e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x65,
+ 0x62,0x75,0x67,0x2e,0x73,0x65,0x74,0x68,0x6f,0x6f,0x6b,0x28,0x63,0x6f,0x72,0x6f,
+ 0x2c,0x20,0x64,0x65,0x62,0x75,0x67,0x67,0x65,0x72,0x5f,0x68,0x6f,0x6f,0x6b,0x2c,
+ 0x20,0x22,0x72,0x6c,0x63,0x22,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x72,0x65,0x73,0x75,0x6d,0x65,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,
+ 0x72,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x63,0x6f,0x72,0x65,0x73,0x75,0x6d,0x65,
+ 0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x29,0x0a,0x20,0x20,0x20,
+ 0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x63,0x6f,0x72,
+ 0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x20,0x75,0x73,0x65,0x73,
+ 0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x6c,0x79,0x20,0x43,0x20,0x41,0x50,0x49,0x20,
+ 0x66,0x6f,0x72,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x73,0x20,0x61,
+ 0x6e,0x64,0x20,0x64,0x6f,0x65,0x73,0x20,0x6e,0x6f,0x74,0x20,0x74,0x72,0x69,0x67,
+ 0x67,0x65,0x72,0x20,0x6f,0x75,0x72,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x64,
+ 0x65,0x6e,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x72,0x65,0x73,
+ 0x75,0x6d,0x65,0x0a,0x20,0x20,0x20,0x20,0x2d,0x2d,0x20,0x73,0x6f,0x20,0x74,0x68,
+ 0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x6e,0x20,0x69,0x6d,0x70,0x6c,0x65,0x6d,0x65,
+ 0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x6f,0x66,0x20,0x77,0x72,0x61,0x70,0x20,
+ 0x69,0x6e,0x20,0x70,0x75,0x72,0x65,0x20,0x4c,0x75,0x61,0x0a,0x20,0x20,0x20,0x20,
+ 0x6c,0x6f,0x63,0x61,0x6c,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x77,
+ 0x72,0x61,0x70,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x28,0x73,0x74,0x61,0x74,
+ 0x75,0x73,0x2c,0x20,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x69,0x66,0x20,0x6e,0x6f,0x74,0x20,0x73,0x74,0x61,0x74,0x75,0x73,0x20,0x74,
+ 0x68,0x65,0x6e,0x20,0x65,0x72,0x72,0x6f,0x72,0x28,0x28,0x2e,0x2e,0x2e,0x29,0x29,
+ 0x20,0x65,0x6e,0x64,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x2e,0x2e,0x2e,0x0a,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,
+ 0x0a,0x20,0x20,0x20,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x63,0x6f,
+ 0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x77,0x72,0x61,0x70,0x28,0x66,0x29,0x0a,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x6f,0x63,0x61,0x6c,0x20,0x63,0x6f,
+ 0x72,0x6f,0x20,0x3d,0x20,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,0x63,
+ 0x72,0x65,0x61,0x74,0x65,0x28,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,
+ 0x28,0x2e,0x2e,0x2e,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x77,0x72,0x61,0x70,0x5f,0x68,0x61,
+ 0x6e,0x64,0x6c,0x65,0x72,0x28,0x63,0x6f,0x72,0x6f,0x75,0x74,0x69,0x6e,0x65,0x2e,
+ 0x72,0x65,0x73,0x75,0x6d,0x65,0x28,0x63,0x6f,0x72,0x6f,0x2c,0x20,0x2e,0x2e,0x2e,
+ 0x29,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x20,
+ 0x20,0x20,0x20,0x65,0x6e,0x64,0x0a,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
+ 0x72,0x6e,0x20,0x73,0x65,0x73,0x73,0x0a,0x65,0x6e,0x64,0x0a,0x0a,0x72,0x65,0x74,
+ 0x75,0x72,0x6e,0x20,0x69,0x6e,0x69,0x74,0x0a,
+};
+
+
+
+int luaopen_lua_m_debugger(lua_State *L) {
+ luaL_loadbuffer(L,
+ (const char*)lua_m_debugger,
+ sizeof(lua_m_debugger),
+ "debugger");
+ return 1;
+}
+
+
+static luaL_Reg lua_debugger_modules[] = {
+ {"debugger", luaopen_lua_m_debugger},
+ {NULL, NULL}
+};
+
+void luaopen_lua_debugger(lua_State* L)
+{
+ luaL_Reg* lib = lua_debugger_modules;
+ lua_getglobal(L, "package");
+ lua_getfield(L, -1, "preload");
+ for (; lib->func; lib++)
+ {
+ lib->func(L);
+ lua_setfield(L, -2, lib->name);
+ }
+ lua_pop(L, 2);
+}
+
+#if __cplusplus
+}
+#endif
diff --git a/frameworks/runtime-src/Classes/ide-support/lua_debugger.h b/frameworks/runtime-src/Classes/ide-support/lua_debugger.h
new file mode 100644
index 0000000..43c2c8a
--- /dev/null
+++ b/frameworks/runtime-src/Classes/ide-support/lua_debugger.h
@@ -0,0 +1,23 @@
+
+/* lua_debugger.h.h */
+
+#ifndef __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_
+#define __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_
+
+#if __cplusplus
+extern "C" {
+#endif
+
+#include "lua.h"
+
+void luaopen_lua_debugger(lua_State* L);
+
+/*
+int luaopen_lua_m_debugger(lua_State* L);
+*/
+
+#if __cplusplus
+}
+#endif
+
+#endif /* __LUA_MODULES_049C000C96FE547176CCBB7690BA01B6_H_ */
diff --git a/frameworks/runtime-src/Classes/lua_module_register.h b/frameworks/runtime-src/Classes/lua_module_register.h
new file mode 100644
index 0000000..b4f0570
--- /dev/null
+++ b/frameworks/runtime-src/Classes/lua_module_register.h
@@ -0,0 +1,10 @@
+#ifndef __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__
+#define __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__
+
+#include "lua.h"
+#include "Lua-BindingsExport.h"
+
+CC_LUA_DLL int lua_module_register(lua_State* L);
+
+#endif // __LUA_TEMPLATE_RUNTIME_FRAMEWORKS_RUNTIME_SRC_CLASSES_LUA_MODULE_REGISTER_H__
+
diff --git a/frameworks/runtime-src/proj.win32/.vs/TestLua/v14/.suo b/frameworks/runtime-src/proj.win32/.vs/TestLua/v14/.suo
new file mode 100644
index 0000000..c7b3911
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/.vs/TestLua/v14/.suo differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/AppDelegate.obj b/frameworks/runtime-src/proj.win32/Debug.win32/AppDelegate.obj
new file mode 100644
index 0000000..ce36f6a
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/AppDelegate.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.dll b/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.dll
new file mode 100644
index 0000000..360e834
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.lib b/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.lib
new file mode 100644
index 0000000..6425903
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/OpenAL32.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/RuntimeLuaImpl.obj b/frameworks/runtime-src/proj.win32/Debug.win32/RuntimeLuaImpl.obj
new file mode 100644
index 0000000..04f2b5e
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/RuntimeLuaImpl.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/SimulatorWin.obj b/frameworks/runtime-src/proj.win32/Debug.win32/SimulatorWin.obj
new file mode 100644
index 0000000..2c9c7bc
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/SimulatorWin.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.exp b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.exp
new file mode 100644
index 0000000..3d62330
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.exp differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.lib b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.lib
new file mode 100644
index 0000000..c676c81
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.log b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.log
new file mode 100644
index 0000000..064cf8c
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.log
@@ -0,0 +1,95 @@
+ AppDelegate.cpp
+ lua_debugger.c
+ RuntimeLuaImpl.cpp
+ main.cpp
+ SimulatorWin.cpp
+c:\program files (x86)\microsoft sdks\windows\v7.1a\include\shlobj.h(1151): warning C4091: “typedef ”: 没有声明变量时忽略“tagGPFIDL_FLAGS”的左侧 (编译源文件 SimulatorWin.cpp)
+d:\ddemo\glua\frameworks\runtime-src\proj.win32\simulatorwin.cpp(397): warning C4305: “参数”: 从“double”到“float”截断
+d:\ddemo\glua\frameworks\runtime-src\classes\appdelegate.cpp(57): warning C4305: “参数”: 从“double”到“float”截断
+d:\ddemo\glua\frameworks\runtime-src\proj.win32\simulatorwin.cpp(731): warning C4018: “<”: 有符号/无符号不匹配
+ stdafx.cpp
+C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(D:\DDemo\GLua\frameworks\runtime-src\proj.win32\Debug.win32\TestLua.exe) does not match the Linker's OutputFile property value (D:\DDemo\GLua\simulator\win32\TestLua.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
+ 复制了 60 个文件
+ LINK : 没有找到 D:\DDemo\GLua\frameworks\runtime-src\proj.win32\../../../simulator/win32/TestLua.exe 或上一个增量链接没有生成它;正在执行完全链接
+ 正在创建库 D:\DDemo\GLua\frameworks\runtime-src\proj.win32\Debug.win32\TestLua.lib 和对象 D:\DDemo\GLua\frameworks\runtime-src\proj.win32\Debug.win32\TestLua.exp
+ TestLua.vcxproj -> D:\DDemo\GLua\frameworks\runtime-src\proj.win32\Debug.win32\TestLua.exe
+ TestLua.vcxproj -> D:\DDemo\GLua\frameworks\runtime-src\proj.win32\../../../simulator/win32/TestLua.pdb (Full PDB)
+ 复制了 16 个文件
+ 复制了 1 个文件
+ D:\DDemo\GLua\res\1.png -> D:\DDemo\GLua\simulator\win32\res\1.png
+ D:\DDemo\GLua\res\HelloWorld.png -> D:\DDemo\GLua\simulator\win32\res\HelloWorld.png
+ D:\DDemo\GLua\res\MainScene.csb -> D:\DDemo\GLua\simulator\win32\res\MainScene.csb
+ D:\DDemo\GLua\res\paibei.png -> D:\DDemo\GLua\simulator\win32\res\paibei.png
+ 复制了 4 个文件
+ D:\DDemo\GLua\src\config.lua -> D:\DDemo\GLua\simulator\win32\src\config.lua
+ D:\DDemo\GLua\src\main.lua -> D:\DDemo\GLua\simulator\win32\src\main.lua
+ D:\DDemo\GLua\src\.vscode\launch.json -> D:\DDemo\GLua\simulator\win32\src\.vscode\launch.json
+ D:\DDemo\GLua\src\app\MyApp.lua -> D:\DDemo\GLua\simulator\win32\src\app\MyApp.lua
+ D:\DDemo\GLua\src\app\views\MainScene.lua -> D:\DDemo\GLua\simulator\win32\src\app\views\MainScene.lua
+ D:\DDemo\GLua\src\app\views\pokerEffects.lua -> D:\DDemo\GLua\simulator\win32\src\app\views\pokerEffects.lua
+ D:\DDemo\GLua\src\cocos\init.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\init.lua
+ D:\DDemo\GLua\src\cocos\3d\3dConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\3d\3dConstants.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\bitExtend.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\bitExtend.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\Cocos2d.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\Cocos2d.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\Cocos2dConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\Cocos2dConstants.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\deprecated.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\deprecated.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\DeprecatedCocos2dClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\DeprecatedCocos2dClass.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\DeprecatedCocos2dEnum.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\DeprecatedCocos2dEnum.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\DeprecatedCocos2dFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\DeprecatedCocos2dFunc.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\DeprecatedOpenglEnum.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\DeprecatedOpenglEnum.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\DrawPrimitives.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\DrawPrimitives.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\functions.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\functions.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\json.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\json.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\luaj.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\luaj.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\luaoc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\luaoc.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\Opengl.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\Opengl.lua
+ D:\DDemo\GLua\src\cocos\cocos2d\OpenglConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocos2d\OpenglConstants.lua
+ D:\DDemo\GLua\src\cocos\cocosbuilder\CCBReaderLoad.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocosbuilder\CCBReaderLoad.lua
+ D:\DDemo\GLua\src\cocos\cocosbuilder\DeprecatedCocosBuilderClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocosbuilder\DeprecatedCocosBuilderClass.lua
+ D:\DDemo\GLua\src\cocos\cocosdenshion\AudioEngine.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocosdenshion\AudioEngine.lua
+ D:\DDemo\GLua\src\cocos\cocosdenshion\DeprecatedCocosDenshionClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocosdenshion\DeprecatedCocosDenshionClass.lua
+ D:\DDemo\GLua\src\cocos\cocosdenshion\DeprecatedCocosDenshionFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocosdenshion\DeprecatedCocosDenshionFunc.lua
+ D:\DDemo\GLua\src\cocos\cocostudio\CocoStudio.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocostudio\CocoStudio.lua
+ D:\DDemo\GLua\src\cocos\cocostudio\DeprecatedCocoStudioClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocostudio\DeprecatedCocoStudioClass.lua
+ D:\DDemo\GLua\src\cocos\cocostudio\DeprecatedCocoStudioFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocostudio\DeprecatedCocoStudioFunc.lua
+ D:\DDemo\GLua\src\cocos\cocostudio\StudioConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\cocostudio\StudioConstants.lua
+ D:\DDemo\GLua\src\cocos\controller\ControllerConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\controller\ControllerConstants.lua
+ D:\DDemo\GLua\src\cocos\extension\DeprecatedExtensionClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\extension\DeprecatedExtensionClass.lua
+ D:\DDemo\GLua\src\cocos\extension\DeprecatedExtensionEnum.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\extension\DeprecatedExtensionEnum.lua
+ D:\DDemo\GLua\src\cocos\extension\DeprecatedExtensionFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\extension\DeprecatedExtensionFunc.lua
+ D:\DDemo\GLua\src\cocos\extension\ExtensionConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\extension\ExtensionConstants.lua
+ D:\DDemo\GLua\src\cocos\framework\audio.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\audio.lua
+ D:\DDemo\GLua\src\cocos\framework\device.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\device.lua
+ D:\DDemo\GLua\src\cocos\framework\display.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\display.lua
+ D:\DDemo\GLua\src\cocos\framework\init.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\init.lua
+ D:\DDemo\GLua\src\cocos\framework\package_support.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\package_support.lua
+ D:\DDemo\GLua\src\cocos\framework\transition.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\transition.lua
+ D:\DDemo\GLua\src\cocos\framework\components\event.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\components\event.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\LayerEx.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\LayerEx.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\MenuEx.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\MenuEx.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\NodeEx.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\NodeEx.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\SpriteEx.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\SpriteEx.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UICheckBox.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UICheckBox.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UIEditBox.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UIEditBox.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UIListView.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UIListView.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UIPageView.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UIPageView.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UIScrollView.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UIScrollView.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UISlider.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UISlider.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UITextField.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UITextField.lua
+ D:\DDemo\GLua\src\cocos\framework\extends\UIWidget.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\framework\extends\UIWidget.lua
+ D:\DDemo\GLua\src\cocos\network\DeprecatedNetworkClass.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\network\DeprecatedNetworkClass.lua
+ D:\DDemo\GLua\src\cocos\network\DeprecatedNetworkEnum.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\network\DeprecatedNetworkEnum.lua
+ D:\DDemo\GLua\src\cocos\network\DeprecatedNetworkFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\network\DeprecatedNetworkFunc.lua
+ D:\DDemo\GLua\src\cocos\network\NetworkConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\network\NetworkConstants.lua
+ D:\DDemo\GLua\src\cocos\physics3d\physics3d-constants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\physics3d\physics3d-constants.lua
+ D:\DDemo\GLua\src\cocos\spine\SpineConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\spine\SpineConstants.lua
+ D:\DDemo\GLua\src\cocos\ui\DeprecatedUIEnum.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\ui\DeprecatedUIEnum.lua
+ D:\DDemo\GLua\src\cocos\ui\DeprecatedUIFunc.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\ui\DeprecatedUIFunc.lua
+ D:\DDemo\GLua\src\cocos\ui\experimentalUIConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\ui\experimentalUIConstants.lua
+ D:\DDemo\GLua\src\cocos\ui\GuiConstants.lua -> D:\DDemo\GLua\simulator\win32\src\cocos\ui\GuiConstants.lua
+ D:\DDemo\GLua\src\LuaIdeDebug\LuaDebug.lua -> D:\DDemo\GLua\simulator\win32\src\LuaIdeDebug\LuaDebug.lua
+ D:\DDemo\GLua\src\LuaIdeDebug\LuaDebugjit.lua -> D:\DDemo\GLua\simulator\win32\src\LuaIdeDebug\LuaDebugjit.lua
+ D:\DDemo\GLua\src\packages\mvc\AppBase.lua -> D:\DDemo\GLua\simulator\win32\src\packages\mvc\AppBase.lua
+ D:\DDemo\GLua\src\packages\mvc\init.lua -> D:\DDemo\GLua\simulator\win32\src\packages\mvc\init.lua
+ D:\DDemo\GLua\src\packages\mvc\ViewBase.lua -> D:\DDemo\GLua\simulator\win32\src\packages\mvc\ViewBase.lua
+ 复制了 71 个文件
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.command.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.command.1.tlog
new file mode 100644
index 0000000..e56f668
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.command.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.read.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.read.1.tlog
new file mode 100644
index 0000000..5e217d2
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.read.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.write.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.write.1.tlog
new file mode 100644
index 0000000..98dc82e
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/CL.write.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.lastbuildstate b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.lastbuildstate
new file mode 100644
index 0000000..43d4bc6
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.lastbuildstate
@@ -0,0 +1,2 @@
+#TargetFrameworkVersion=v4.0:PlatformToolSet=v140_xp:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=
+Debug|Win32|D:\DDemo\GLua\frameworks\runtime-src\proj.win32\|
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.write.1u.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.write.1u.tlog
new file mode 100644
index 0000000..fec3054
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/TestLua.write.1u.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.command.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.command.1.tlog
new file mode 100644
index 0000000..579ccdc
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.command.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.read.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.read.1.tlog
new file mode 100644
index 0000000..1206a99
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.read.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.write.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.write.1.tlog
new file mode 100644
index 0000000..88eebdc
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/link.write.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.command.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.command.1.tlog
new file mode 100644
index 0000000..7be093d
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.command.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.read.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.read.1.tlog
new file mode 100644
index 0000000..4c05d5b
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.read.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.write.1.tlog b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.write.1.tlog
new file mode 100644
index 0000000..f204da8
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/TestLua.tlog/rc.write.1.tlog differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/freetype.lib b/frameworks/runtime-src/proj.win32/Debug.win32/freetype.lib
new file mode 100644
index 0000000..539b96a
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/freetype.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/game.res b/frameworks/runtime-src/proj.win32/Debug.win32/game.res
new file mode 100644
index 0000000..5273d17
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/game.res differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/glew32.dll b/frameworks/runtime-src/proj.win32/Debug.win32/glew32.dll
new file mode 100644
index 0000000..0f6d1f5
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/glew32.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/glew32.lib b/frameworks/runtime-src/proj.win32/Debug.win32/glew32.lib
new file mode 100644
index 0000000..03be6ad
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/glew32.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/glfw3-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/glfw3-2015.lib
new file mode 100644
index 0000000..0e4510e
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/glfw3-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/glfw3.lib b/frameworks/runtime-src/proj.win32/Debug.win32/glfw3.lib
new file mode 100644
index 0000000..471d932
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/glfw3.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/iconv.dll b/frameworks/runtime-src/proj.win32/Debug.win32/iconv.dll
new file mode 100644
index 0000000..2f18f84
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/iconv.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2013.lib
new file mode 100644
index 0000000..e49c54f
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2015.lib
new file mode 100644
index 0000000..e187bde
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libSpine_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2013.lib
new file mode 100644
index 0000000..2c91781
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2015.lib
new file mode 100644
index 0000000..75cdd62
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libbox2d_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2013.lib
new file mode 100644
index 0000000..8ae4482
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2015.lib
new file mode 100644
index 0000000..3f4ef78
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libbullet_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk-2015.lib
new file mode 100644
index 0000000..18ead6d
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk.lib
new file mode 100644
index 0000000..ecd5fba
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libchipmunk.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.dll
new file mode 100644
index 0000000..d73f970
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.lib
new file mode 100644
index 0000000..2ad0057
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.dll
new file mode 100644
index 0000000..e53ebc8
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.lib
new file mode 100644
index 0000000..a462fb1
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcocos2d_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcurl.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libcurl.dll
new file mode 100644
index 0000000..382f128
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcurl.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libcurl_imp.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libcurl_imp.lib
new file mode 100644
index 0000000..35b6298
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libcurl_imp.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libeay32.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libeay32.lib
new file mode 100644
index 0000000..67fc02f
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libeay32.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libiconv.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libiconv.lib
new file mode 100644
index 0000000..4a49795
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libiconv.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg-2015.lib
new file mode 100644
index 0000000..c6995ad
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg.lib
new file mode 100644
index 0000000..217c148
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libjpeg.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2013.lib
new file mode 100644
index 0000000..8f3b624
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2015.lib
new file mode 100644
index 0000000..0f44de7
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libjscocos2d_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2013.lib
new file mode 100644
index 0000000..f6dd7b3
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2015.lib
new file mode 100644
index 0000000..b33b594
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libluacocos2d_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.dll
new file mode 100644
index 0000000..c6858c6
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.lib
new file mode 100644
index 0000000..c74b3b8
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libmpg123.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libogg.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libogg.dll
new file mode 100644
index 0000000..8c5266f
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libogg.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libogg.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libogg.lib
new file mode 100644
index 0000000..55e1d7d
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libogg.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libpng-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libpng-2015.lib
new file mode 100644
index 0000000..b7d3e9b
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libpng-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libpng.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libpng.lib
new file mode 100644
index 0000000..0f2cc8f
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libpng.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2013.lib
new file mode 100644
index 0000000..16eb97a
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2015.lib
new file mode 100644
index 0000000..f9468ad
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/librecast_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2013.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2013.lib
new file mode 100644
index 0000000..e3ff289
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2013.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2015.lib
new file mode 100644
index 0000000..eb22ae9
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libsimulator_2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libtiff-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff-2015.lib
new file mode 100644
index 0000000..6fe1879
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.dll
new file mode 100644
index 0000000..41baa35
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.lib
new file mode 100644
index 0000000..1cca543
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libtiff.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.dll
new file mode 100644
index 0000000..42b870a
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.lib
new file mode 100644
index 0000000..77adc14
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbis.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.dll b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.dll
new file mode 100644
index 0000000..e347947
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.lib
new file mode 100644
index 0000000..28e6759
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libvorbisfile.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libwebp.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libwebp.lib
new file mode 100644
index 0000000..57782b9
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libwebp.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/libzlib.lib b/frameworks/runtime-src/proj.win32/Debug.win32/libzlib.lib
new file mode 100644
index 0000000..ee6fa60
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/libzlib.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/lua51-2015.lib b/frameworks/runtime-src/proj.win32/Debug.win32/lua51-2015.lib
new file mode 100644
index 0000000..cae5e0f
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/lua51-2015.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/lua51.dll b/frameworks/runtime-src/proj.win32/Debug.win32/lua51.dll
new file mode 100644
index 0000000..599bf4b
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/lua51.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/lua51.lib b/frameworks/runtime-src/proj.win32/Debug.win32/lua51.lib
new file mode 100644
index 0000000..4c38b3b
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/lua51.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/lua_debugger.obj b/frameworks/runtime-src/proj.win32/Debug.win32/lua_debugger.obj
new file mode 100644
index 0000000..65ce028
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/lua_debugger.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/main.obj b/frameworks/runtime-src/proj.win32/Debug.win32/main.obj
new file mode 100644
index 0000000..8540de1
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/main.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.dll b/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.dll
new file mode 100644
index 0000000..9ec921d
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.lib b/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.lib
new file mode 100644
index 0000000..a42a6df
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/mozjs-33.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.dll b/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.dll
new file mode 100644
index 0000000..bdde93a
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.lib b/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.lib
new file mode 100644
index 0000000..84e09d3
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/sqlite3.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/ssleay32.lib b/frameworks/runtime-src/proj.win32/Debug.win32/ssleay32.lib
new file mode 100644
index 0000000..83024d8
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/ssleay32.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/stdafx.obj b/frameworks/runtime-src/proj.win32/Debug.win32/stdafx.obj
new file mode 100644
index 0000000..37460c6
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/stdafx.obj differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/vc140.idb b/frameworks/runtime-src/proj.win32/Debug.win32/vc140.idb
new file mode 100644
index 0000000..d753e32
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/vc140.idb differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/vc140.pdb b/frameworks/runtime-src/proj.win32/Debug.win32/vc140.pdb
new file mode 100644
index 0000000..f97d8c2
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/vc140.pdb differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/websockets.dll b/frameworks/runtime-src/proj.win32/Debug.win32/websockets.dll
new file mode 100644
index 0000000..5b26886
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/websockets.dll differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/websockets.lib b/frameworks/runtime-src/proj.win32/Debug.win32/websockets.lib
new file mode 100644
index 0000000..e3f13f6
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/websockets.lib differ
diff --git a/frameworks/runtime-src/proj.win32/Debug.win32/zlib1.dll b/frameworks/runtime-src/proj.win32/Debug.win32/zlib1.dll
new file mode 100644
index 0000000..56337e4
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/Debug.win32/zlib1.dll differ
diff --git a/frameworks/runtime-src/proj.win32/SimulatorWin.cpp b/frameworks/runtime-src/proj.win32/SimulatorWin.cpp
new file mode 100644
index 0000000..adc0d77
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/SimulatorWin.cpp
@@ -0,0 +1,1086 @@
+
+#pragma comment(lib, "comctl32.lib")
+#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+
+#include "stdafx.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "SimulatorWin.h"
+
+#include "glfw3.h"
+#include "glfw3native.h"
+
+#include "AppEvent.h"
+#include "AppLang.h"
+#include "runtime/ConfigParser.h"
+#include "runtime/Runtime.h"
+
+#include "platform/win32/PlayerWin.h"
+#include "platform/win32/PlayerMenuServiceWin.h"
+
+#include "resource.h"
+
+USING_NS_CC;
+
+static WNDPROC g_oldWindowProc = NULL;
+INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ LOGFONT lf;
+ HFONT hFont;
+
+ UNREFERENCED_PARAMETER(lParam);
+ switch (message)
+ {
+ case WM_INITDIALOG:
+ ZeroMemory(&lf, sizeof(LOGFONT));
+ lf.lfHeight = 24;
+ lf.lfWeight = 200;
+ _tcscpy(lf.lfFaceName, _T("Arial"));
+
+ hFont = CreateFontIndirect(&lf);
+ if ((HFONT)0 != hFont)
+ {
+ SendMessage(GetDlgItem(hDlg, IDC_ABOUT_TITLE), WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
+ }
+ return (INT_PTR)TRUE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hDlg, LOWORD(wParam));
+ return (INT_PTR)TRUE;
+ }
+ break;
+ }
+ return (INT_PTR)FALSE;
+}
+void onHelpAbout()
+{
+ DialogBox(GetModuleHandle(NULL),
+ MAKEINTRESOURCE(IDD_DIALOG_ABOUT),
+ Director::getInstance()->getOpenGLView()->getWin32Window(),
+ AboutDialogCallback);
+}
+
+void shutDownApp()
+{
+ auto glview = dynamic_cast (Director::getInstance()->getOpenGLView());
+ HWND hWnd = glview->getWin32Window();
+ ::SendMessage(hWnd, WM_CLOSE, NULL, NULL);
+}
+
+std::string getCurAppPath(void)
+{
+ TCHAR szAppDir[MAX_PATH] = {0};
+ if (!GetModuleFileName(NULL, szAppDir, MAX_PATH))
+ return "";
+ int nEnd = 0;
+ for (int i = 0; szAppDir[i]; i++)
+ {
+ if (szAppDir[i] == '\\')
+ nEnd = i;
+ }
+ szAppDir[nEnd] = 0;
+ int iLen = 2 * wcslen(szAppDir);
+ char* chRtn = new char[iLen + 1];
+ wcstombs(chRtn, szAppDir, iLen + 1);
+ std::string strPath = chRtn;
+ delete[] chRtn;
+ chRtn = NULL;
+ char fuldir[MAX_PATH] = {0};
+ _fullpath(fuldir, strPath.c_str(), MAX_PATH);
+ return fuldir;
+}
+
+static bool stringEndWith(const std::string str, const std::string needle)
+{
+ if (str.length() >= needle.length())
+ {
+ return (0 == str.compare(str.length() - needle.length(), needle.length(), needle));
+ }
+ return false;
+}
+
+static void initGLContextAttrs()
+{
+ //set OpenGL context attributions,now can only set six attributions:
+ //red,green,blue,alpha,depth,stencil
+ GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8};
+
+ GLView::setGLContextAttrs(glContextAttrs);
+}
+
+SimulatorWin *SimulatorWin::_instance = nullptr;
+
+SimulatorWin *SimulatorWin::getInstance()
+{
+ if (!_instance)
+ {
+ _instance = new SimulatorWin();
+ }
+ return _instance;
+}
+
+SimulatorWin::SimulatorWin()
+ : _app(nullptr)
+ , _hwnd(NULL)
+ , _hwndConsole(NULL)
+ , _writeDebugLogFile(nullptr)
+{
+}
+
+SimulatorWin::~SimulatorWin()
+{
+ CC_SAFE_DELETE(_app);
+ if (_writeDebugLogFile)
+ {
+ fclose(_writeDebugLogFile);
+ }
+}
+
+void SimulatorWin::quit()
+{
+ Director::getInstance()->end();
+}
+
+void SimulatorWin::relaunch()
+{
+ _project.setWindowOffset(Vec2(getPositionX(), getPositionY()));
+ openNewPlayerWithProjectConfig(_project);
+
+ quit();
+}
+
+void SimulatorWin::openNewPlayer()
+{
+ openNewPlayerWithProjectConfig(_project);
+}
+
+void SimulatorWin::openNewPlayerWithProjectConfig(const ProjectConfig &config)
+{
+ static long taskid = 100;
+ stringstream buf;
+ buf << taskid++;
+
+ string commandLine;
+ commandLine.append(getApplicationExePath());
+ commandLine.append(" ");
+ commandLine.append(config.makeCommandLine());
+
+ CCLOG("SimulatorWin::openNewPlayerWithProjectConfig(): %s", commandLine.c_str());
+
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx
+ SECURITY_ATTRIBUTES sa = {0};
+ sa.nLength = sizeof(sa);
+
+ PROCESS_INFORMATION pi = {0};
+ STARTUPINFO si = {0};
+ si.cb = sizeof(STARTUPINFO);
+
+#define MAX_COMMAND 1024 // lenth of commandLine is always beyond MAX_PATH
+
+ WCHAR command[MAX_COMMAND];
+ memset(command, 0, sizeof(command));
+ MultiByteToWideChar(CP_UTF8, 0, commandLine.c_str(), -1, command, MAX_COMMAND);
+
+ BOOL success = CreateProcess(NULL,
+ command, // command line
+ NULL, // process security attributes
+ NULL, // primary thread security attributes
+ FALSE, // handles are inherited
+ 0, // creation flags
+ NULL, // use parent's environment
+ NULL, // use parent's current directory
+ &si, // STARTUPINFO pointer
+ &pi); // receives PROCESS_INFORMATION
+
+ if (!success)
+ {
+ CCLOG("PlayerTaskWin::run() - create process failed, for execute %s", commandLine.c_str());
+ }
+}
+
+void SimulatorWin::openProjectWithProjectConfig(const ProjectConfig &config)
+{
+ openNewPlayerWithProjectConfig(config);
+ quit();
+}
+
+int SimulatorWin::getPositionX()
+{
+ RECT rect;
+ GetWindowRect(_hwnd, &rect);
+ return rect.left;
+}
+
+int SimulatorWin::getPositionY()
+{
+ RECT rect;
+ GetWindowRect(_hwnd, &rect);
+ return rect.top;
+}
+
+int SimulatorWin::run()
+{
+ INITCOMMONCONTROLSEX InitCtrls;
+ InitCtrls.dwSize = sizeof(InitCtrls);
+ InitCtrls.dwICC = ICC_WIN95_CLASSES;
+ InitCommonControlsEx(&InitCtrls);
+
+ parseCocosProjectConfig(_project);
+
+ // load project config from command line args
+ vector args;
+ for (int i = 0; i < __argc; ++i)
+ {
+ wstring ws(__wargv[i]);
+ string s;
+ s.assign(ws.begin(), ws.end());
+ args.push_back(s);
+ }
+ _project.parseCommandLine(args);
+
+ if (_project.getProjectDir().empty())
+ {
+ if (args.size() == 2)
+ {
+ // for Code IDE before RC2
+ _project.setProjectDir(args.at(1));
+ _project.setDebuggerType(kCCRuntimeDebuggerCodeIDE);
+ }
+ }
+
+ // create the application instance
+ _app = new AppDelegate();
+ RuntimeEngine::getInstance()->setProjectConfig(_project);
+
+ // create console window
+ if (_project.isShowConsole())
+ {
+ AllocConsole();
+ _hwndConsole = GetConsoleWindow();
+ if (_hwndConsole != NULL)
+ {
+ ShowWindow(_hwndConsole, SW_SHOW);
+ BringWindowToTop(_hwndConsole);
+ freopen("CONOUT$", "wt", stdout);
+ freopen("CONOUT$", "wt", stderr);
+
+ HMENU hmenu = GetSystemMenu(_hwndConsole, FALSE);
+ if (hmenu != NULL)
+ {
+ DeleteMenu(hmenu, SC_CLOSE, MF_BYCOMMAND);
+ }
+ }
+ }
+
+ // log file
+ if (_project.isWriteDebugLogToFile())
+ {
+ const string debugLogFilePath = _project.getDebugLogFilePath();
+ _writeDebugLogFile = fopen(debugLogFilePath.c_str(), "w");
+ if (!_writeDebugLogFile)
+ {
+ CCLOG("Cannot create debug log file %s", debugLogFilePath.c_str());
+ }
+ }
+
+ // set environments
+ SetCurrentDirectoryA(_project.getProjectDir().c_str());
+ FileUtils::getInstance()->setDefaultResourceRootPath(_project.getProjectDir());
+ FileUtils::getInstance()->setWritablePath(_project.getWritableRealPath().c_str());
+
+ // check screen DPI
+ HDC screen = GetDC(0);
+ int dpi = GetDeviceCaps(screen, LOGPIXELSX);
+ ReleaseDC(0, screen);
+
+ // set scale with DPI
+ // 96 DPI = 100 % scaling
+ // 120 DPI = 125 % scaling
+ // 144 DPI = 150 % scaling
+ // 192 DPI = 200 % scaling
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx#dpi_and_the_desktop_scaling_factor
+ //
+ // enable DPI-Aware with DeclareDPIAware.manifest
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx#declaring_dpi_awareness
+ float screenScale = 1.0f;
+ if (dpi >= 120 && dpi < 144)
+ {
+ screenScale = 1.25f;
+ }
+ else if (dpi >= 144 && dpi < 192)
+ {
+ screenScale = 1.5f;
+ }
+ else if (dpi >= 192)
+ {
+ screenScale = 2.0f;
+ }
+ CCLOG("SCREEN DPI = %d, SCREEN SCALE = %0.2f", dpi, screenScale);
+
+ // check scale
+ Size frameSize = _project.getFrameSize();
+ float frameScale = 1.0f;
+ if (_project.isRetinaDisplay())
+ {
+ frameSize.width *= screenScale;
+ frameSize.height *= screenScale;
+ }
+ else
+ {
+ frameScale = screenScale;
+ }
+
+ // check screen workarea
+ RECT workareaSize;
+ if (SystemParametersInfo(SPI_GETWORKAREA, NULL, &workareaSize, NULL))
+ {
+ float workareaWidth = fabsf(workareaSize.right - workareaSize.left);
+ float workareaHeight = fabsf(workareaSize.bottom - workareaSize.top);
+ float frameBorderCX = GetSystemMetrics(SM_CXSIZEFRAME);
+ float frameBorderCY = GetSystemMetrics(SM_CYSIZEFRAME);
+ workareaWidth -= frameBorderCX * 2;
+ workareaHeight -= (frameBorderCY * 2 + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU));
+ CCLOG("WORKAREA WIDTH %0.2f, HEIGHT %0.2f", workareaWidth, workareaHeight);
+ while (true && frameScale > 0.25f)
+ {
+ if (frameSize.width * frameScale > workareaWidth || frameSize.height * frameScale > workareaHeight)
+ {
+ frameScale = frameScale - 0.25f;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (frameScale < 0.25f) frameScale = 0.25f;
+ }
+ _project.setFrameScale(frameScale);
+ CCLOG("FRAME SCALE = %0.2f", frameScale);
+
+ // create opengl view
+ const Rect frameRect = Rect(0, 0, frameSize.width, frameSize.height);
+ ConfigParser::getInstance()->setInitViewSize(frameSize);
+ const bool isResize = _project.isResizeWindow();
+ std::stringstream title;
+ title << "Cocos Simulator (" << _project.getFrameScale() * 100 << "%)";
+ initGLContextAttrs();
+ auto glview = GLViewImpl::createWithRect(title.str(), frameRect, frameScale);
+ _hwnd = glview->getWin32Window();
+ player::PlayerWin::createWithHwnd(_hwnd);
+ DragAcceptFiles(_hwnd, TRUE);
+ //SendMessage(_hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon);
+ //SendMessage(_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon);
+ //FreeResource(icon);
+
+ // path for looking Lang file, Studio Default images
+ FileUtils::getInstance()->addSearchPath(getApplicationPath().c_str());
+
+ auto director = Director::getInstance();
+ director->setOpenGLView(glview);
+
+ director->setAnimationInterval(1.0 / 60.0);
+
+ // set window position
+ if (_project.getProjectDir().length())
+ {
+ setZoom(_project.getFrameScale());
+ }
+ Vec2 pos = _project.getWindowOffset();
+ if (pos.x != 0 && pos.y != 0)
+ {
+ RECT rect;
+ GetWindowRect(_hwnd, &rect);
+ if (pos.x < 0)
+ pos.x = 0;
+ if (pos.y < 0)
+ pos.y = 0;
+ MoveWindow(_hwnd, pos.x, pos.y, rect.right - rect.left, rect.bottom - rect.top, FALSE);
+ }
+
+ // init player services
+ setupUI();
+ DrawMenuBar(_hwnd);
+
+ // prepare
+ FileUtils::getInstance()->setPopupNotify(false);
+ _project.dump();
+ auto app = Application::getInstance();
+
+ g_oldWindowProc = (WNDPROC)SetWindowLong(_hwnd, GWL_WNDPROC, (LONG)SimulatorWin::windowProc);
+
+ // update window title
+ updateWindowTitle();
+
+ // startup message loop
+ int ret = app->run();
+ CC_SAFE_DELETE(_app);
+ return ret;
+}
+
+// services
+
+void SimulatorWin::setupUI()
+{
+ auto menuBar = player::PlayerProtocol::getInstance()->getMenuService();
+
+ // FILE
+ menuBar->addItem("FILE_MENU", tr("File"));
+ menuBar->addItem("OPEN_FILE_MENU", tr("Open File") + "...", "FILE_MENU");
+ menuBar->addItem("OPEN_PROJECT_MENU", tr("Open Project") + "...", "FILE_MENU");
+ menuBar->addItem("FILE_MENU_SEP1", "-", "FILE_MENU");
+ menuBar->addItem("EXIT_MENU", tr("Exit"), "FILE_MENU");
+
+ // VIEW
+ menuBar->addItem("VIEW_MENU", tr("View"));
+ SimulatorConfig *config = SimulatorConfig::getInstance();
+ int current = config->checkScreenSize(_project.getFrameSize());
+ for (int i = 0; i < config->getScreenSizeCount(); i++)
+ {
+ SimulatorScreenSize size = config->getScreenSize(i);
+ std::stringstream menuId;
+ menuId << "VIEWSIZE_ITEM_MENU_" << i;
+ auto menuItem = menuBar->addItem(menuId.str(), size.title.c_str(), "VIEW_MENU");
+
+ if (i == current)
+ {
+ menuItem->setChecked(true);
+ }
+ }
+
+ // About
+ menuBar->addItem("HELP_MENU", tr("Help"));
+ menuBar->addItem("ABOUT_MENUITEM", tr("About"), "HELP_MENU");
+
+ menuBar->addItem("DIRECTION_MENU_SEP", "-", "VIEW_MENU");
+ menuBar->addItem("DIRECTION_PORTRAIT_MENU", tr("Portrait"), "VIEW_MENU")
+ ->setChecked(_project.isPortraitFrame());
+ menuBar->addItem("DIRECTION_LANDSCAPE_MENU", tr("Landscape"), "VIEW_MENU")
+ ->setChecked(_project.isLandscapeFrame());
+
+ menuBar->addItem("VIEW_SCALE_MENU_SEP", "-", "VIEW_MENU");
+ std::vector scaleMenuVector;
+ auto scale200Menu = menuBar->addItem("VIEW_SCALE_MENU_200", tr("Zoom Out").append(" (200%)"), "VIEW_MENU");
+ auto scale175Menu = menuBar->addItem("VIEW_SCALE_MENU_175", tr("Zoom Out").append(" (175%)"), "VIEW_MENU");
+ auto scale150Menu = menuBar->addItem("VIEW_SCALE_MENU_150", tr("Zoom Out").append(" (150%)"), "VIEW_MENU");
+ auto scale125Menu = menuBar->addItem("VIEW_SCALE_MENU_125", tr("Zoom Out").append(" (125%)"), "VIEW_MENU");
+ auto scale100Menu = menuBar->addItem("VIEW_SCALE_MENU_100", tr("Zoom Out").append(" (100%)"), "VIEW_MENU");
+ auto scale75Menu = menuBar->addItem("VIEW_SCALE_MENU_75", tr("Zoom Out").append(" (75%)"), "VIEW_MENU");
+ auto scale50Menu = menuBar->addItem("VIEW_SCALE_MENU_50", tr("Zoom Out").append(" (50%)"), "VIEW_MENU");
+ auto scale25Menu = menuBar->addItem("VIEW_SCALE_MENU_25", tr("Zoom Out").append(" (25%)"), "VIEW_MENU");
+ int frameScale = int(_project.getFrameScale() * 100);
+
+ if (frameScale == 200)
+ {
+ scale200Menu->setChecked(true);
+ }
+ else if (frameScale == 175)
+ {
+ scale175Menu->setChecked(true);
+ }
+ else if (frameScale == 150)
+ {
+ scale150Menu->setChecked(true);
+ }
+ else if (frameScale == 125)
+ {
+ scale125Menu->setChecked(true);
+ }
+ else if (frameScale == 100)
+ {
+ scale100Menu->setChecked(true);
+ }
+ else if (frameScale == 75)
+ {
+ scale75Menu->setChecked(true);
+ }
+ else if (frameScale == 50)
+ {
+ scale50Menu->setChecked(true);
+ }
+ else if (frameScale == 25)
+ {
+ scale25Menu->setChecked(true);
+ }
+ else
+ {
+ scale100Menu->setChecked(true);
+ }
+
+ scaleMenuVector.push_back(scale200Menu);
+ scaleMenuVector.push_back(scale175Menu);
+ scaleMenuVector.push_back(scale150Menu);
+ scaleMenuVector.push_back(scale125Menu);
+ scaleMenuVector.push_back(scale100Menu);
+ scaleMenuVector.push_back(scale75Menu);
+ scaleMenuVector.push_back(scale50Menu);
+ scaleMenuVector.push_back(scale25Menu);
+
+ menuBar->addItem("REFRESH_MENU_SEP", "-", "VIEW_MENU");
+ menuBar->addItem("REFRESH_MENU", tr("Refresh"), "VIEW_MENU");
+
+ HWND &hwnd = _hwnd;
+ ProjectConfig &project = _project;
+ auto dispatcher = Director::getInstance()->getEventDispatcher();
+ dispatcher->addEventListenerWithFixedPriority(EventListenerCustom::create("APP.EVENT", [&project, &hwnd, scaleMenuVector](EventCustom* event){
+ auto menuEvent = dynamic_cast(event);
+ if (menuEvent)
+ {
+ rapidjson::Document dArgParse;
+ dArgParse.Parse<0>(menuEvent->getDataString().c_str());
+ if (dArgParse.HasMember("name"))
+ {
+ string strcmd = dArgParse["name"].GetString();
+
+ if (strcmd == "menuClicked")
+ {
+ player::PlayerMenuItem *menuItem = static_cast(menuEvent->getUserData());
+ if (menuItem)
+ {
+ if (menuItem->isChecked())
+ {
+ return;
+ }
+
+ string data = dArgParse["data"].GetString();
+
+ if ((data == "CLOSE_MENU") || (data == "EXIT_MENU"))
+ {
+ _instance->quit();
+ }
+ else if (data == "REFRESH_MENU")
+ {
+ _instance->relaunch();
+ }
+ else if (data.find("VIEW_SCALE_MENU_") == 0) // begin with VIEW_SCALE_MENU_
+ {
+ string tmp = data.erase(0, strlen("VIEW_SCALE_MENU_"));
+ float scale = atof(tmp.c_str()) / 100.0f;
+ project.setFrameScale(scale);
+
+ _instance->setZoom(scale);
+
+ // update scale menu state
+ for (auto &it : scaleMenuVector)
+ {
+ it->setChecked(false);
+ }
+ menuItem->setChecked(true);
+
+ // update window title
+ _instance->updateWindowTitle();
+
+ // update window size
+ RECT rect;
+ GetWindowRect(hwnd, &rect);
+ MoveWindow(hwnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top + GetSystemMetrics(SM_CYMENU), FALSE);
+
+ // fix: can not update window on some windows system
+ ::SendMessage(hwnd, WM_MOVE, NULL, NULL);
+ }
+ else if (data.find("VIEWSIZE_ITEM_MENU_") == 0) // begin with VIEWSIZE_ITEM_MENU_
+ {
+ string tmp = data.erase(0, strlen("VIEWSIZE_ITEM_MENU_"));
+ int index = atoi(tmp.c_str());
+ SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index);
+
+ if (project.isLandscapeFrame())
+ {
+ std::swap(size.width, size.height);
+ }
+
+ project.setFrameSize(cocos2d::Size(size.width, size.height));
+ project.setWindowOffset(cocos2d::Vec2(_instance->getPositionX(), _instance->getPositionY()));
+ _instance->openProjectWithProjectConfig(project);
+ }
+ else if (data == "DIRECTION_PORTRAIT_MENU")
+ {
+ project.changeFrameOrientationToPortait();
+ _instance->openProjectWithProjectConfig(project);
+ }
+ else if (data == "DIRECTION_LANDSCAPE_MENU")
+ {
+ project.changeFrameOrientationToLandscape();
+ _instance->openProjectWithProjectConfig(project);
+ }
+ else if (data == "OPEN_FILE_MENU")
+ {
+ auto fileDialog = player::PlayerProtocol::getInstance()->getFileDialogService();
+ stringstream extensions;
+ extensions << "All Support File|config.json,*.csd,*csd;"
+ << "Project Config File|config.json;"
+ << "Cocos Studio File|*.csd;"
+ << "Cocos Studio Binary File|*.csb";
+ auto entry = fileDialog->openFile(tr("Choose File"), "", extensions.str());
+
+ _instance->onOpenFile(entry);
+ }
+ else if (data == "OPEN_PROJECT_MENU")
+ {
+ auto fileDialog = player::PlayerProtocol::getInstance()->getFileDialogService();
+ auto path = fileDialog->openDirectory(tr("Choose Folder"), "");
+
+ _instance->onOpenProjectFolder(path);
+ }
+ else if (data == "ABOUT_MENUITEM")
+ {
+ onHelpAbout();
+ }
+ }
+ }
+ }
+ }
+ }), 1);
+
+ AppDelegate *app = _app;
+ auto listener = EventListenerCustom::create(kAppEventDropName, [&project, app](EventCustom* event)
+ {
+ AppEvent *dropEvent = dynamic_cast(event);
+ if (dropEvent)
+ {
+ string dirPath = dropEvent->getDataString() + "/";
+ string configFilePath = dirPath + CONFIG_FILE;
+
+ if (FileUtils::getInstance()->isDirectoryExist(dirPath) &&
+ FileUtils::getInstance()->isFileExist(configFilePath))
+ {
+ // parse config.json
+ ConfigParser::getInstance()->readConfig(configFilePath);
+
+ project.setProjectDir(dirPath);
+ project.setScriptFile(ConfigParser::getInstance()->getEntryFile());
+ project.setWritablePath(dirPath);
+
+ RuntimeEngine::getInstance()->setProjectConfig(project);
+ }
+ }
+ });
+ dispatcher->addEventListenerWithFixedPriority(listener, 1);
+}
+
+void SimulatorWin::setZoom(float frameScale)
+{
+ _project.setFrameScale(frameScale);
+ cocos2d::Director::getInstance()->getOpenGLView()->setFrameZoomFactor(frameScale);
+}
+
+void SimulatorWin::updateWindowTitle()
+{
+ std::stringstream title;
+ title << "Cocos " << tr("Simulator") << " (" << _project.getFrameScale() * 100 << "%)";
+ std::u16string u16title;
+ cocos2d::StringUtils::UTF8ToUTF16(title.str(), u16title);
+ SetWindowText(_hwnd, (LPCTSTR)u16title.c_str());
+}
+
+// debug log
+void SimulatorWin::writeDebugLog(const char *log)
+{
+ if (!_writeDebugLogFile) return;
+
+ fputs(log, _writeDebugLogFile);
+ fputc('\n', _writeDebugLogFile);
+ fflush(_writeDebugLogFile);
+}
+
+void SimulatorWin::parseCocosProjectConfig(ProjectConfig &config)
+{
+ // get project directory
+ ProjectConfig tmpConfig;
+ // load project config from command line args
+ vector args;
+ for (int i = 0; i < __argc; ++i)
+ {
+ wstring ws(__wargv[i]);
+ string s;
+ s.assign(ws.begin(), ws.end());
+ args.push_back(s);
+ }
+
+ if (args.size() >= 2)
+ {
+ if (args.size() && args.at(1).at(0) == '/')
+ {
+ // FIXME:
+ // for Code IDE before RC2
+ tmpConfig.setProjectDir(args.at(1));
+ }
+
+ tmpConfig.parseCommandLine(args);
+ }
+
+ // set project directory as search root path
+ string solutionDir = tmpConfig.getProjectDir();
+ if (!solutionDir.empty())
+ {
+ for (int i = 0; i < solutionDir.size(); ++i)
+ {
+ if (solutionDir[i] == '\\')
+ {
+ solutionDir[i] = '/';
+ }
+ }
+ int nPos = -1;
+ if (solutionDir[solutionDir.length() - 1] == '/')
+ nPos = solutionDir.rfind('/', solutionDir.length() - 2);
+ else
+ nPos = solutionDir.rfind('/');
+ if (nPos > 0)
+ solutionDir = solutionDir.substr(0, nPos + 1);
+ FileUtils::getInstance()->setDefaultResourceRootPath(solutionDir);
+ FileUtils::getInstance()->addSearchPath(solutionDir);
+ FileUtils::getInstance()->addSearchPath(tmpConfig.getProjectDir().c_str());
+ }
+ else
+ {
+ FileUtils::getInstance()->setDefaultResourceRootPath(tmpConfig.getProjectDir().c_str());
+ }
+
+ // parse config.json
+ auto parser = ConfigParser::getInstance();
+ auto configPath = solutionDir.append(CONFIG_FILE);
+ parser->readConfig(configPath);
+
+ // set information
+ config.setConsolePort(parser->getConsolePort());
+ config.setFileUploadPort(parser->getUploadPort());
+ config.setFrameSize(parser->getInitViewSize());
+ if (parser->isLanscape())
+ {
+ config.changeFrameOrientationToLandscape();
+ }
+ else
+ {
+ config.changeFrameOrientationToPortait();
+ }
+ config.setScriptFile(parser->getEntryFile());
+}
+
+//
+// D:\aaa\bbb\ccc\ddd\abc.txt --> D:/aaa/bbb/ccc/ddd/abc.txt
+//
+std::string SimulatorWin::convertPathFormatToUnixStyle(const std::string& path)
+{
+ std::string ret = path;
+ int len = ret.length();
+ for (int i = 0; i < len; ++i)
+ {
+ if (ret[i] == '\\')
+ {
+ ret[i] = '/';
+ }
+ }
+ return ret;
+}
+
+//
+// @return: C:/Users/win8/Documents/
+//
+std::string SimulatorWin::getUserDocumentPath()
+{
+ TCHAR filePath[MAX_PATH];
+ SHGetSpecialFolderPath(NULL, filePath, CSIDL_PERSONAL, FALSE);
+ int length = 2 * wcslen(filePath);
+ char* tempstring = new char[length + 1];
+ wcstombs(tempstring, filePath, length + 1);
+ string userDocumentPath(tempstring);
+ delete [] tempstring;
+
+ userDocumentPath = convertPathFormatToUnixStyle(userDocumentPath);
+ userDocumentPath.append("/");
+
+ return userDocumentPath;
+}
+
+//
+// convert Unicode/LocalCode TCHAR to Utf8 char
+//
+char* SimulatorWin::convertTCharToUtf8(const TCHAR* src)
+{
+#ifdef UNICODE
+ WCHAR* tmp = (WCHAR*)src;
+ size_t size = wcslen(src) * 3 + 1;
+ char* dest = new char[size];
+ memset(dest, 0, size);
+ WideCharToMultiByte(CP_UTF8, 0, tmp, -1, dest, size, NULL, NULL);
+ return dest;
+#else
+ char* tmp = (char*)src;
+ uint32 size = strlen(tmp) + 1;
+ WCHAR* dest = new WCHAR[size];
+ memset(dest, 0, sizeof(WCHAR)*size);
+ MultiByteToWideChar(CP_ACP, 0, src, -1, dest, (int)size); // convert local code to unicode.
+
+ size = wcslen(dest) * 3 + 1;
+ char* dest2 = new char[size];
+ memset(dest2, 0, size);
+ WideCharToMultiByte(CP_UTF8, 0, dest, -1, dest2, size, NULL, NULL); // convert unicode to utf8.
+ delete[] dest;
+ return dest2;
+#endif
+}
+
+//
+std::string SimulatorWin::getApplicationExePath()
+{
+ TCHAR szFileName[MAX_PATH];
+ GetModuleFileName(NULL, szFileName, MAX_PATH);
+ std::u16string u16ApplicationName;
+ char *applicationExePath = convertTCharToUtf8(szFileName);
+ std::string path(applicationExePath);
+ CC_SAFE_FREE(applicationExePath);
+
+ return path;
+}
+
+std::string SimulatorWin::getApplicationPath()
+{
+ std::string path = getApplicationExePath();
+ size_t pos;
+ while ((pos = path.find_first_of("\\")) != std::string::npos)
+ {
+ path.replace(pos, 1, "/");
+ }
+ size_t p = path.find_last_of("/");
+ string workdir;
+ if (p != path.npos)
+ {
+ workdir = path.substr(0, p);
+ }
+
+ return workdir;
+}
+
+LRESULT CALLBACK SimulatorWin::windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (!_instance) return 0;
+
+ switch (uMsg)
+ {
+ case WM_SYSCOMMAND:
+ case WM_COMMAND:
+ {
+ if (HIWORD(wParam) == 0)
+ {
+ // menu
+ WORD menuId = LOWORD(wParam);
+ auto menuService = dynamic_cast (player::PlayerProtocol::getInstance()->getMenuService());
+ auto menuItem = menuService->getItemByCommandId(menuId);
+ if (menuItem)
+ {
+ AppEvent event("APP.EVENT", APP_EVENT_MENU);
+
+ std::stringstream buf;
+ buf << "{\"data\":\"" << menuItem->getMenuId().c_str() << "\"";
+ buf << ",\"name\":" << "\"menuClicked\"" << "}";
+ event.setDataString(buf.str());
+ event.setUserData(menuItem);
+ Director::getInstance()->getEventDispatcher()->dispatchEvent(&event);
+ }
+
+ if (menuId == ID_HELP_ABOUT)
+ {
+ onHelpAbout();
+ }
+ }
+ break;
+ }
+ case WM_KEYDOWN:
+ {
+ if (wParam == VK_F5)
+ {
+ _instance->relaunch();
+ }
+ break;
+ }
+
+ case WM_COPYDATA:
+ {
+ PCOPYDATASTRUCT pMyCDS = (PCOPYDATASTRUCT)lParam;
+ if (pMyCDS->dwData == 1)
+ {
+ const char *szBuf = (const char*)(pMyCDS->lpData);
+ SimulatorWin::getInstance()->writeDebugLog(szBuf);
+ break;
+ }
+ }
+
+ case WM_DESTROY:
+ {
+ DragAcceptFiles(hWnd, FALSE);
+ break;
+ }
+
+ case WM_DROPFILES:
+ {
+ HDROP hDrop = (HDROP)wParam;
+
+ const int count = DragQueryFileW(hDrop, 0xffffffff, NULL, 0);
+
+ if (count > 0)
+ {
+ int fileIndex = 0;
+
+ const UINT length = DragQueryFileW(hDrop, fileIndex, NULL, 0);
+ WCHAR* buffer = (WCHAR*)calloc(length + 1, sizeof(WCHAR));
+
+ DragQueryFileW(hDrop, fileIndex, buffer, length + 1);
+ char *utf8 = SimulatorWin::convertTCharToUtf8(buffer);
+ std::string firstFile(utf8);
+ CC_SAFE_FREE(utf8);
+ DragFinish(hDrop);
+
+ _instance->onDrop(firstFile);
+ }
+ } // WM_DROPFILES
+
+ }
+ return g_oldWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+void SimulatorWin::onOpenFile(const std::string &filePath)
+{
+ string entry = filePath;
+ if (entry.empty()) return;
+
+ if (stringEndWith(entry, "config.json") || stringEndWith(entry, ".csb") || stringEndWith(entry, ".csd"))
+ {
+ replaceAll(entry, "\\", "/");
+ size_t p = entry.find_last_of("/");
+ if (p != entry.npos)
+ {
+ string workdir = entry.substr(0, p);
+ _project.setProjectDir(workdir);
+ }
+
+ _project.setScriptFile(entry);
+ if (stringEndWith(entry, CONFIG_FILE))
+ {
+ ConfigParser::getInstance()->readConfig(entry);
+ _project.setScriptFile(ConfigParser::getInstance()->getEntryFile());
+ }
+ openProjectWithProjectConfig(_project);
+ }
+ else
+ {
+ auto title = tr("Open File") + tr("Error");
+ auto msg = tr("Only support") + " config.json;*.csb;*.csd";
+ auto msgBox = player::PlayerProtocol::getInstance()->getMessageBoxService();
+ msgBox->showMessageBox(title, msg);
+ }
+}
+
+/*
+1. find @folderPath/config.json
+2. get project name from file: @folderPath/folderName.ccs
+3. find @folderPath/cocosstudio/MainScene.csd
+4. find @folderPath/cocosstudio/MainScene.csb
+*/
+void SimulatorWin::onOpenProjectFolder(const std::string &folderPath)
+{
+ string path = folderPath;
+ if (!path.empty())
+ {
+ replaceAll(path, "\\", "/");
+
+ auto fileUtils = FileUtils::getInstance();
+ bool foundProjectFile = false;
+ // 1. check config.json
+ auto configPath = path + "/" + CONFIG_FILE;
+ if (fileUtils->isFileExist(configPath))
+ {
+ ConfigParser::getInstance()->readConfig(configPath);
+ _project.setProjectDir(path);
+ _project.setScriptFile(ConfigParser::getInstance()->getEntryFile());
+ foundProjectFile = true;
+ }
+ // check ccs project
+ else
+ {
+ // 2.
+ if (path.at(path.size() - 1) == '/') path.erase(path.size() - 1);
+ ssize_t pos = path.find_last_of('/');
+ if (pos != std::string::npos)
+ {
+ auto folderName = path.substr(path.find_last_of('/'), path.size());
+ auto ccsFilePath = path + folderName + ".ccs";
+ if (fileUtils->isFileExist(ccsFilePath))
+ {
+ auto fileContent = fileUtils->getStringFromFile(ccsFilePath);
+
+ string matchString("isFileExist(csdFilePath))
+ {
+ _project.setProjectDir(path);
+ _project.setScriptFile(csdFilePath);
+ foundProjectFile = true;
+ }
+ // 4.
+ else if (fileUtils->isFileExist(csbFilePath))
+ {
+ _project.setProjectDir(path);
+ _project.setScriptFile(csbFilePath);
+ foundProjectFile = true;
+ }
+ }
+ }
+
+ if (foundProjectFile)
+ {
+ openProjectWithProjectConfig(_project);
+ }
+ else
+ {
+ auto title = tr("Open Project") + tr("Error");
+ auto msgBox = player::PlayerProtocol::getInstance()->getMessageBoxService();
+ msgBox->showMessageBox(title, tr("Can not find project"));
+ }
+ }
+}
+
+void SimulatorWin::onDrop(const std::string &path)
+{
+ auto fileUtils = FileUtils::getInstance();
+ if (fileUtils->isDirectoryExist(path))
+ {
+ onOpenProjectFolder(path);
+ }
+ else if (fileUtils->isFileExist(path))
+ {
+ onOpenFile(path);
+ }
+}
diff --git a/frameworks/runtime-src/proj.win32/SimulatorWin.h b/frameworks/runtime-src/proj.win32/SimulatorWin.h
new file mode 100644
index 0000000..dce617f
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/SimulatorWin.h
@@ -0,0 +1,58 @@
+#pragma once
+
+#include "stdafx.h"
+#include "Resource.h"
+#include "cocos2d.h"
+#include "AppDelegate.h"
+#include "ProjectConfig/ProjectConfig.h"
+#include "ProjectConfig/SimulatorConfig.h"
+
+class SimulatorWin
+{
+public:
+ static SimulatorWin *getInstance();
+ virtual ~SimulatorWin();
+ int run();
+
+ virtual void quit();
+ virtual void relaunch();
+ virtual void openNewPlayer();
+ virtual void openNewPlayerWithProjectConfig(const ProjectConfig &config);
+ virtual void openProjectWithProjectConfig(const ProjectConfig &config);
+
+ virtual int getPositionX();
+ virtual int getPositionY();
+protected:
+ SimulatorWin();
+
+ static SimulatorWin *_instance;
+ ProjectConfig _project;
+ HWND _hwnd;
+ HWND _hwndConsole;
+ AppDelegate *_app;
+ FILE *_writeDebugLogFile;
+
+ //
+ void setupUI();
+ void setZoom(float frameScale);
+ void updateWindowTitle();
+
+ // debug log
+ void writeDebugLog(const char *log);
+ void parseCocosProjectConfig(ProjectConfig &config);
+
+ //
+ void onOpenFile(const std::string &filePath);
+ void onOpenProjectFolder(const std::string &folderPath);
+ void onDrop(const std::string &path);
+
+ // helper
+ std::string convertPathFormatToUnixStyle(const std::string& path);
+ std::string getUserDocumentPath();
+ std::string getApplicationExePath();
+ std::string getApplicationPath();
+ static char* convertTCharToUtf8(const TCHAR* src);
+
+ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+};
+
diff --git a/frameworks/runtime-src/proj.win32/TestLua.VC.db b/frameworks/runtime-src/proj.win32/TestLua.VC.db
new file mode 100644
index 0000000..e0571d0
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/TestLua.VC.db differ
diff --git a/frameworks/runtime-src/proj.win32/TestLua.sln b/frameworks/runtime-src/proj.win32/TestLua.sln
new file mode 100644
index 0000000..f3c0efc
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/TestLua.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "TestLua.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
+ {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
+ {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/frameworks/runtime-src/proj.win32/TestLua.vcxproj b/frameworks/runtime-src/proj.win32/TestLua.vcxproj
new file mode 100644
index 0000000..2c0d707
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/TestLua.vcxproj
@@ -0,0 +1,224 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}
+ TestLua
+
+
+
+ Application
+ true
+ Unicode
+ v120
+ v120_xp
+ v140
+ v140_xp
+
+
+ Application
+ false
+ Unicode
+ v120
+ v120_xp
+ v140
+ v140_xp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)$(Configuration).win32\
+ $(Configuration).win32\
+ true
+ $(IncludePath)
+ $(SourcePath);
+ AllRules.ruleset
+
+
+ $(SolutionDir)$(Configuration).win32\
+ $(Configuration).win32\
+ false
+
+
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)
+
+
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)
+
+
+
+ $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(ProjectDir)..\Classes\protobuf-lite;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\win32-specific\zlib\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\scripting\lua-bindings\auto;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\scripting\lua-bindings\manual;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\audio\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\external;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\lua\luajit\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\lua\tolua;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\chipmunk\include\chipmunk;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\curl\include\win32;$(COCOS_X_ROOT)\cocos2d-x-3.10\extensions;$(COCOS_X_ROOT)\cocos2d-x-3.10\tools\simulator\libsimulator\lib;$(COCOS_X_ROOT)\cocos2d-x-3.10\tools\simulator\libsimulator\lib\protobuf-lite;$(COCOS_X_ROOT)\cocos2d-x-3.10\;%(AdditionalIncludeDirectories);$(_COCOS_HEADER_WIN32_BEGIN);$(_COCOS_HEADER_WIN32_END)
+
+
+ Level3
+ MultiThreadedDLL
+ false
+ EditAndContinue
+ EnableFastChecks
+ Disabled
+ WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions)
+ 4267;4251;4244;%(DisableSpecificWarnings)
+ true
+ $(IntDir)vc$(PlatformToolsetVersion).pdb
+ algorithm
+ CompileAsCpp
+
+
+ Windows
+ MachineX86
+ true
+ $(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END)
+ libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)
+ libcmt.lib
+ $(ProjectDir)../../../simulator/win32/$(TargetName).pdb
+ $(ProjectDir)../../../simulator/win32/$(TargetName)$(TargetExt)
+
+
+ 0x0409
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+ false
+ Win32
+ _DEBUG;%(PreprocessorDefinitions)
+ TestLua.h
+ TestLua_i.c
+ TestLua_p.c
+ true
+ $(IntDir)/TestLua.tlb
+
+
+
+
+
+
+
+
+ if not exist "$(OutDir)" mkdir "$(OutDir)"
+xcopy /Y /Q "$(COCOS_X_ROOT)\cocos2d-x-3.10\prebuilt\win32\*.*" "$(OutDir)"
+
+
+
+
+
+
+
+
+
+ if not exist "$(LocalDebuggerWorkingDirectory)" mkdir "$(LocalDebuggerWorkingDirectory)"
+xcopy /Y /Q "$(OutDir)*.dll" "$(LocalDebuggerWorkingDirectory)"
+xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(LocalDebuggerWorkingDirectory)"
+xcopy "$(ProjectDir)..\..\..\res" "$(LocalDebuggerWorkingDirectory)\res" /D /E /I /F /Y
+xcopy "$(ProjectDir)..\..\..\src" "$(LocalDebuggerWorkingDirectory)\src" /D /E /I /F /Y
+ $(TargetName).cab
+ $(TargetFileName)
+
+
+
+
+ $(ProjectDir)..\Classes;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\win32-specific\zlib\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\scripting\lua-bindings\auto;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\scripting\lua-bindings\manual;$(COCOS_X_ROOT)\cocos2d-x-3.10\cocos\audio\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\external;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\lua\luajit\include;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\lua\tolua;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\chipmunk\include\chipmunk;$(COCOS_X_ROOT)\cocos2d-x-3.10\extensions;$(COCOS_X_ROOT)\cocos2d-x-3.10\external\curl\include\win32;$(COCOS_X_ROOT)\cocos2d-x-3.10\;$(COCOS_X_ROOT)\cocos2d-x-3.10\tools\simulator\libsimulator\lib;$(COCOS_X_ROOT)\cocos2d-x-3.10\tools\simulator\libsimulator\lib\protobuf-lite;%(AdditionalIncludeDirectories);$(_COCOS_HEADER_WIN32_BEGIN);$(_COCOS_HEADER_WIN32_END)
+
+
+ Level3
+ MultiThreadedDLL
+
+
+ ProgramDatabase
+ WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions)
+ 4267;4251;4244;%(DisableSpecificWarnings)
+ true
+ $(IntDir)vc$(PlatformToolsetVersion).pdb
+ algorithm
+ CompileAsCpp
+
+
+ Windows
+ MachineX86
+ $(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END)
+ libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)
+ libcmt.lib
+ true
+
+
+ 0x0409
+ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+ false
+ Win32
+ NDEBUG;%(PreprocessorDefinitions)
+ TestLua.h
+ TestLua_i.c
+ TestLua_p.c
+ true
+ $(IntDir)/TestLua.tlb
+
+
+
+
+
+
+
+
+ if not exist "$(OutDir)" mkdir "$(OutDir)"
+xcopy /Y /Q "$(COCOS_X_ROOT)\cocos2d-x-3.10\prebuilt\win32\*.*" "$(OutDir)"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frameworks/runtime-src/proj.win32/TestLua.vcxproj.filters b/frameworks/runtime-src/proj.win32/TestLua.vcxproj.filters
new file mode 100644
index 0000000..823e3f9
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/TestLua.vcxproj.filters
@@ -0,0 +1,65 @@
+
+
+
+
+ {fc5cb953-2953-4968-83b3-39e3ff951754}
+
+
+ {037a9a02-b906-4cc5-ad98-304acd4e25ee}
+
+
+ {2d1d0979-58cd-4ab6-b91c-13650158f1fa}
+
+
+
+
+ Classes
+
+
+ win32
+
+
+
+
+ win32
+
+
+ win32
+
+
+ Classes
+
+
+ Classes
+
+
+ Classes
+
+
+
+
+ Classes
+
+
+ win32
+
+
+
+ win32
+
+
+ Classes
+
+
+ Classes
+
+
+
+
+ resource
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frameworks/runtime-src/proj.win32/TestLua.vcxproj.user b/frameworks/runtime-src/proj.win32/TestLua.vcxproj.user
new file mode 100644
index 0000000..d84e114
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/TestLua.vcxproj.user
@@ -0,0 +1,18 @@
+
+
+
+ false
+ $(OutDir)../../../../simulator/win32
+ WindowsLocalDebugger
+ WindowsLocalDebugger
+
+
+ $(OutDir)../../../../simulator/win32
+ $(OutDir)../../../../simulator/win32/$(TargetFileName)
+ -workdir $(ProjectDir)../../../
+
+
+ -workdir $(ProjectDir)../../../
+ $(OutDir)../../../../simulator/win32/$(TargetFileName)
+
+
diff --git a/frameworks/runtime-src/proj.win32/build-cfg.json b/frameworks/runtime-src/proj.win32/build-cfg.json
new file mode 100644
index 0000000..07c6788
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/build-cfg.json
@@ -0,0 +1,22 @@
+{
+ "copy_resources": [
+ {
+ "from": "../../../src",
+ "to": "src"
+ },
+ {
+ "from": "../../../res",
+ "to": "res"
+ },
+ {
+ "from": "../../../config.json",
+ "to": ""
+ },
+ {
+ "from": "../Classes/ide-support/lang",
+ "to": ""
+ }
+ ],
+ "must_copy_resources": [
+ ]
+}
diff --git a/frameworks/runtime-src/proj.win32/cocos2dx.props b/frameworks/runtime-src/proj.win32/cocos2dx.props
new file mode 100644
index 0000000..f65591e
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/cocos2dx.props
@@ -0,0 +1,20 @@
+
+
+
+
+
+ false
+
+
+
+ opengl32.lib;glew32.lib;libzlib.lib;libwebp.lib;libiconv.lib;freetype.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)
+ $(OutDir);%(AdditionalLibraryDirectories)
+ false
+
+
+
+ false
+
+
+
+
\ No newline at end of file
diff --git a/frameworks/runtime-src/proj.win32/game.rc b/frameworks/runtime-src/proj.win32/game.rc
new file mode 100644
index 0000000..65a3d82
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/game.rc
@@ -0,0 +1,201 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Chinese (Simplified, PRC) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
+#pragma code_page(936)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_MENU_COCOS MENU
+BEGIN
+ POPUP "(&H)"
+ BEGIN
+ MENUITEM "(&A)", ID_HELP_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG_ABOUT DIALOGEX 0, 0, 243, 134
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About Simulator"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CTEXT "Version 3.10 (20151222)",IDC_ABOUT_VERSION,35,70,173,17
+ CTEXT "Cocos Simulator",IDC_ABOUT_TITLE,35,49,173,17
+ CTEXT "Copyright (C) 2015. All rights reserved.",IDC_STATIC,35,94,173,17
+ ICON "GLFW_ICON",IDC_STATIC,111,15,20,20
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG_ABOUT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 236
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 127
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Chinese (Simplified, PRC) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_MENU_COCOS MENU
+BEGIN
+ POPUP "&Help"
+ BEGIN
+ MENUITEM "&About ...", ID_HELP_ABOUT
+ END
+END
+
+#endif // English resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+GLFW_ICON ICON "res\\game.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "game Module"
+ VALUE "FileVersion", "1, 0, 0, 1"
+ VALUE "InternalName", "game"
+ VALUE "LegalCopyright", "Copyright "
+ VALUE "OriginalFilename", "game.exe"
+ VALUE "ProductName", "game Module"
+ VALUE "ProductVersion", "1, 0, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/frameworks/runtime-src/proj.win32/main.cpp b/frameworks/runtime-src/proj.win32/main.cpp
new file mode 100644
index 0000000..3d7d941
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/main.cpp
@@ -0,0 +1,31 @@
+#include "main.h"
+#include "SimulatorWin.h"
+#include
+
+#if _MSC_VER > 1800
+#pragma comment(lib,"libcocos2d_2015.lib")
+#pragma comment(lib,"libbox2d_2015.lib")
+#pragma comment(lib,"libSpine_2015.lib")
+#pragma comment(lib,"librecast_2015.lib")
+#pragma comment(lib,"libbullet_2015.lib")
+#pragma comment(lib,"libluacocos2d_2015")
+#pragma comment(lib,"libsimulator_2015")
+#else
+#pragma comment(lib,"libcocos2d_2013.lib")
+#pragma comment(lib,"libbox2d_2013.lib")
+#pragma comment(lib,"libSpine_2013.lib")
+#pragma comment(lib,"librecast_2013.lib")
+#pragma comment(lib,"libbullet_2013.lib")
+#pragma comment(lib,"libluacocos2d_2013")
+#pragma comment(lib,"libsimulator_2013")
+#endif
+
+int APIENTRY _tWinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow)
+{
+ UNREFERENCED_PARAMETER(hPrevInstance);
+ UNREFERENCED_PARAMETER(lpCmdLine);
+ return SimulatorWin::getInstance()->run();
+}
diff --git a/frameworks/runtime-src/proj.win32/main.h b/frameworks/runtime-src/proj.win32/main.h
new file mode 100644
index 0000000..d756fd1
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/main.h
@@ -0,0 +1,10 @@
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+// Windows Header Files:
+#include
+#include
+
+#endif // __WINMAIN_H__
diff --git a/frameworks/runtime-src/proj.win32/res/game.ico b/frameworks/runtime-src/proj.win32/res/game.ico
new file mode 100644
index 0000000..feaf932
Binary files /dev/null and b/frameworks/runtime-src/proj.win32/res/game.ico differ
diff --git a/frameworks/runtime-src/proj.win32/resource.h b/frameworks/runtime-src/proj.win32/resource.h
new file mode 100644
index 0000000..88a519d
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/resource.h
@@ -0,0 +1,39 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by game.rc
+//
+#define IDS_PROJNAME 100
+#define IDR_MENU_COCOS 200
+#define IDD_DIALOG1 202
+#define IDD_DIALOG_ABOUT 203
+#define IDC_ABOUT_TITLE 1000
+#define IDC_EDIT2 1001
+#define IDC_ABOUT_VERSION 1001
+#define ID_VIEW_SIZE 30001
+#define ID_FILE_NEW_WINDOW 32771
+#define ID_VIEW_PORTRAIT 32775
+#define ID_VIEW_LANDSCAPE 32776
+#define ID_VIEW_CUSTOM 32777
+#define ID_HELP_ABOUT 32778
+#define ID_FILE_EXIT 32779
+#define ID_Menu 32780
+#define ID_Menu32781 32781
+#define ID_TEST_RESET 32782
+#define ID_CONTROL 32783
+#define ID_CONTROL_RELOAD 32784
+#define ID_VIEW_ZOOMOUT100 32785
+#define ID_VIEW_ZOOMOUT75 32786
+#define ID_VIEW_ZOOMOUT50 32787
+#define ID_VIEW_ZOOMOUT25 32788
+#define ID_CONTROL_TOP 32793
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NEXT_COMMAND_VALUE 32794
+#define _APS_NEXT_CONTROL_VALUE 1002
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/frameworks/runtime-src/proj.win32/stdafx.cpp b/frameworks/runtime-src/proj.win32/stdafx.cpp
new file mode 100644
index 0000000..b8b9773
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// player.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/frameworks/runtime-src/proj.win32/stdafx.h b/frameworks/runtime-src/proj.win32/stdafx.h
new file mode 100644
index 0000000..bb80440
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/stdafx.h
@@ -0,0 +1,21 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include
+
+// C RunTime Header Files
+#include
+#include
+#include
+#include
+
+
+// TODO: reference additional headers your program requires here
diff --git a/frameworks/runtime-src/proj.win32/targetver.h b/frameworks/runtime-src/proj.win32/targetver.h
new file mode 100644
index 0000000..87c0086
--- /dev/null
+++ b/frameworks/runtime-src/proj.win32/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include
diff --git a/res/1.png b/res/1.png
new file mode 100644
index 0000000..b483227
Binary files /dev/null and b/res/1.png differ
diff --git a/res/HelloWorld.png b/res/HelloWorld.png
new file mode 100644
index 0000000..92ae713
Binary files /dev/null and b/res/HelloWorld.png differ
diff --git a/res/MainScene.csb b/res/MainScene.csb
new file mode 100644
index 0000000..4719ea6
Binary files /dev/null and b/res/MainScene.csb differ
diff --git a/res/paibei.png b/res/paibei.png
new file mode 100644
index 0000000..b7b6865
Binary files /dev/null and b/res/paibei.png differ
diff --git a/simulator/win32/OpenAL32.dll b/simulator/win32/OpenAL32.dll
new file mode 100644
index 0000000..360e834
Binary files /dev/null and b/simulator/win32/OpenAL32.dll differ
diff --git a/simulator/win32/TestLua.exe b/simulator/win32/TestLua.exe
new file mode 100644
index 0000000..5712065
Binary files /dev/null and b/simulator/win32/TestLua.exe differ
diff --git a/simulator/win32/TestLua.ilk b/simulator/win32/TestLua.ilk
new file mode 100644
index 0000000..89f4783
Binary files /dev/null and b/simulator/win32/TestLua.ilk differ
diff --git a/simulator/win32/TestLua.pdb b/simulator/win32/TestLua.pdb
new file mode 100644
index 0000000..dea11cd
Binary files /dev/null and b/simulator/win32/TestLua.pdb differ
diff --git a/simulator/win32/glew32.dll b/simulator/win32/glew32.dll
new file mode 100644
index 0000000..0f6d1f5
Binary files /dev/null and b/simulator/win32/glew32.dll differ
diff --git a/simulator/win32/iconv.dll b/simulator/win32/iconv.dll
new file mode 100644
index 0000000..2f18f84
Binary files /dev/null and b/simulator/win32/iconv.dll differ
diff --git a/simulator/win32/lang b/simulator/win32/lang
new file mode 100644
index 0000000..1c13dac
--- /dev/null
+++ b/simulator/win32/lang
@@ -0,0 +1,29 @@
+{
+ "zh-CN": {
+ "View": "视图(&V)",
+ "Exit": "退出(&X)",
+ "File": "文件(&F)",
+ "Portrait": "竖屏",
+ "Landscape": "横屏",
+ "Refresh": "刷新(重启)",
+ "Zoom Out": "缩放",
+ "Simulator": "模拟器",
+ "Open File": "打开文件",
+ "Open Project": "打开工程",
+ "Error": "错误",
+ "Help": "帮助(&H)",
+ "About": "关于(&A)"
+ },
+ "zh-Hans": {
+ "View": "视图",
+ "Exit": "退出",
+ "File": "文件",
+ "Portrait": "竖屏",
+ "Landscape": "横屏",
+ "Refresh": "刷新(重启)",
+ "Zoom Out": "缩放",
+ "Simulator": "模拟器",
+ "Help": "帮助(&H)",
+ "About": "关于(&A)"
+ }
+}
\ No newline at end of file
diff --git a/simulator/win32/libcocos2d_2013.dll b/simulator/win32/libcocos2d_2013.dll
new file mode 100644
index 0000000..d73f970
Binary files /dev/null and b/simulator/win32/libcocos2d_2013.dll differ
diff --git a/simulator/win32/libcocos2d_2015.dll b/simulator/win32/libcocos2d_2015.dll
new file mode 100644
index 0000000..e53ebc8
Binary files /dev/null and b/simulator/win32/libcocos2d_2015.dll differ
diff --git a/simulator/win32/libcurl.dll b/simulator/win32/libcurl.dll
new file mode 100644
index 0000000..382f128
Binary files /dev/null and b/simulator/win32/libcurl.dll differ
diff --git a/simulator/win32/libmpg123.dll b/simulator/win32/libmpg123.dll
new file mode 100644
index 0000000..c6858c6
Binary files /dev/null and b/simulator/win32/libmpg123.dll differ
diff --git a/simulator/win32/libogg.dll b/simulator/win32/libogg.dll
new file mode 100644
index 0000000..8c5266f
Binary files /dev/null and b/simulator/win32/libogg.dll differ
diff --git a/simulator/win32/libtiff.dll b/simulator/win32/libtiff.dll
new file mode 100644
index 0000000..41baa35
Binary files /dev/null and b/simulator/win32/libtiff.dll differ
diff --git a/simulator/win32/libvorbis.dll b/simulator/win32/libvorbis.dll
new file mode 100644
index 0000000..42b870a
Binary files /dev/null and b/simulator/win32/libvorbis.dll differ
diff --git a/simulator/win32/libvorbisfile.dll b/simulator/win32/libvorbisfile.dll
new file mode 100644
index 0000000..e347947
Binary files /dev/null and b/simulator/win32/libvorbisfile.dll differ
diff --git a/simulator/win32/lua51.dll b/simulator/win32/lua51.dll
new file mode 100644
index 0000000..599bf4b
Binary files /dev/null and b/simulator/win32/lua51.dll differ
diff --git a/simulator/win32/mozjs-33.dll b/simulator/win32/mozjs-33.dll
new file mode 100644
index 0000000..9ec921d
Binary files /dev/null and b/simulator/win32/mozjs-33.dll differ
diff --git a/simulator/win32/res/1.png b/simulator/win32/res/1.png
new file mode 100644
index 0000000..b483227
Binary files /dev/null and b/simulator/win32/res/1.png differ
diff --git a/simulator/win32/res/HelloWorld.png b/simulator/win32/res/HelloWorld.png
new file mode 100644
index 0000000..92ae713
Binary files /dev/null and b/simulator/win32/res/HelloWorld.png differ
diff --git a/simulator/win32/res/MainScene.csb b/simulator/win32/res/MainScene.csb
new file mode 100644
index 0000000..4719ea6
Binary files /dev/null and b/simulator/win32/res/MainScene.csb differ
diff --git a/simulator/win32/res/paibei.png b/simulator/win32/res/paibei.png
new file mode 100644
index 0000000..b7b6865
Binary files /dev/null and b/simulator/win32/res/paibei.png differ
diff --git a/simulator/win32/sqlite3.dll b/simulator/win32/sqlite3.dll
new file mode 100644
index 0000000..bdde93a
Binary files /dev/null and b/simulator/win32/sqlite3.dll differ
diff --git a/simulator/win32/src/.vscode/launch.json b/simulator/win32/src/.vscode/launch.json
new file mode 100644
index 0000000..158b399
--- /dev/null
+++ b/simulator/win32/src/.vscode/launch.json
@@ -0,0 +1,71 @@
+{
+ // 使用 IntelliSense 了解相关属性。
+ // 悬停以查看现有属性的描述。
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+
+ {
+ "name": "Cocos2-launch",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
+ "port": 7003,
+ "exePath": "${workspaceRoot}/../simulator/win32/TestLua.exe",
+ "printType": 1
+ },
+ {
+ "name": "COCOS(remote debugging)",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-ulua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".lua",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-slua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".txt",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-xlua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".txt",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "LuaTest",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "LuaTest",
+ "mainFile": "${fileBasenameNoExtension}",
+ "localRoot": "${fileDirname}",
+ "curFileExtname": "${fileExtname}",
+ "fileExtname": ".lua",
+ "port": 7003,
+ "printType": 1
+ }
+ ]
+}
\ No newline at end of file
diff --git a/simulator/win32/src/LuaIdeDebug/LuaDebug.lua b/simulator/win32/src/LuaIdeDebug/LuaDebug.lua
new file mode 100644
index 0000000..9d86288
--- /dev/null
+++ b/simulator/win32/src/LuaIdeDebug/LuaDebug.lua
@@ -0,0 +1,1759 @@
+local debugger_stackInfo = nil
+local coro_debugger = nil
+local debugger_require = require
+local debugger_exeLuaString = nil
+local loadstring_ = nil
+if(loadstring) then
+loadstring_ = loadstring
+else
+loadstring_ = load
+end
+local ZZBase64 = {}
+local LuaDebugTool_ = nil
+if(LuaDebugTool) then
+
+ LuaDebugTool_ = LuaDebugTool
+elseif(CS and CS.LuaDebugTool) then
+
+ LuaDebugTool_ = CS.LuaDebugTool;
+
+end
+local LuaDebugTool = LuaDebugTool_
+local loadstring = loadstring_
+
+local getinfo = debug.getinfo
+local function createSocket()
+ local base = _G
+ local string = require("string")
+ local math = require("math")
+ local socket = require("socket.core")
+
+ local _M = socket
+
+ -----------------------------------------------------------------------------
+ -- Exported auxiliar functions
+ -----------------------------------------------------------------------------
+ function _M.connect4(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet")
+ end
+
+ function _M.connect6(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet6")
+ end
+
+ if(not _M.connect) then
+ function _M.connect(address, port, laddress, lport)
+ local sock, err = socket.tcp()
+ if not sock then return nil, err end
+ if laddress then
+ local res, err = sock:bind(laddress, lport, -1)
+ if not res then return nil, err end
+ end
+ local res, err = sock:connect(address, port)
+ if not res then return nil, err end
+ return sock
+ end
+ end
+ function _M.bind(host, port, backlog)
+ if host == "*" then host = "0.0.0.0" end
+ local addrinfo, err = socket.dns.getaddrinfo(host);
+ if not addrinfo then return nil, err end
+ local sock, res
+ err = "no info on address"
+ for i, alt in base.ipairs(addrinfo) do
+ if alt.family == "inet" then
+ sock, err = socket.tcp4()
+ else
+ sock, err = socket.tcp6()
+ end
+ if not sock then return nil, err end
+ sock:setoption("reuseaddr", true)
+ res, err = sock:bind(alt.addr, port)
+ if not res then
+ sock:close()
+ else
+ res, err = sock:listen(backlog)
+ if not res then
+ sock:close()
+ else
+ return sock
+ end
+ end
+ end
+ return nil, err
+ end
+
+ _M.try = _M.newtry()
+
+ function _M.choose(table)
+ return function(name, opt1, opt2)
+ if base.type(name) ~= "string" then
+ name, opt1, opt2 = "default", name, opt1
+ end
+ local f = table[name or "nil"]
+ if not f then base.error("unknown key (" .. base.tostring(name) .. ")", 3)
+ else return f(opt1, opt2) end
+ end
+ end
+
+ -----------------------------------------------------------------------------
+ -- Socket sources and sinks, conforming to LTN12
+ -----------------------------------------------------------------------------
+ -- create namespaces inside LuaSocket namespace
+ local sourcet, sinkt = {}, {}
+ _M.sourcet = sourcet
+ _M.sinkt = sinkt
+
+ _M.BLOCKSIZE = 2048
+
+ sinkt["close-when-done"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if not chunk then
+ sock:close()
+ return 1
+ else return sock:send(chunk) end
+ end
+ })
+ end
+
+ sinkt["keep-open"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if chunk then return sock:send(chunk)
+ else return 1 end
+ end
+ })
+ end
+
+ sinkt["default"] = sinkt["keep-open"]
+
+ _M.sink = _M.choose(sinkt)
+
+ sourcet["by-length"] = function(sock, length)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if length <= 0 then return nil end
+ local size = math.min(socket.BLOCKSIZE, length)
+ local chunk, err = sock:receive(size)
+ if err then return nil, err end
+ length = length - string.len(chunk)
+ return chunk
+ end
+ })
+ end
+
+ sourcet["until-closed"] = function(sock)
+ local done
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if done then return nil end
+ local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
+ if not err then return chunk
+ elseif err == "closed" then
+ sock:close()
+ done = 1
+ return partial
+ else return nil, err end
+ end
+ })
+ end
+
+
+ sourcet["default"] = sourcet["until-closed"]
+
+ _M.source = _M.choose(sourcet)
+
+ return _M
+end
+
+local function createJson()
+ local math = require('math')
+ local string = require("string")
+ local table = require("table")
+ local object = nil
+ -----------------------------------------------------------------------------
+ -- Module declaration
+ -----------------------------------------------------------------------------
+ local json = {} -- Public namespace
+ local json_private = {} -- Private namespace
+
+ -- Public constants
+ json.EMPTY_ARRAY = {}
+ json.EMPTY_OBJECT = {}
+ -- Public functions
+ -- Private functions
+ local decode_scanArray
+ local decode_scanComment
+ local decode_scanConstant
+ local decode_scanNumber
+ local decode_scanObject
+ local decode_scanString
+ local decode_scanWhitespace
+ local encodeString
+ local isArray
+ local isEncodable
+
+ -----------------------------------------------------------------------------
+ -- PUBLIC FUNCTIONS
+ -----------------------------------------------------------------------------
+ --- Encodes an arbitrary Lua object / variable.
+ -- @param v The Lua object / variable to be JSON encoded.
+ -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+ function json.encode(v)
+ -- Handle nil values
+ if v == nil then
+ return "null"
+ end
+
+ local vtype = type(v)
+
+ -- Handle strings
+ if vtype == 'string' then
+ return "\"" .. json_private.encodeString(v) .. "\"" -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype == 'number' or vtype == 'boolean' then
+ return tostring(v)
+ end
+
+ -- Handle tables
+ if vtype == 'table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1, maxCount do
+ table.insert(rval, json.encode(v[i]))
+ end
+ else -- An object, not an array
+ for i, j in pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, "\"" .. json_private.encodeString(i) .. '\":' .. json.encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval, ',') .. ']'
+ else
+ return '{' .. table.concat(rval, ',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype == 'function' and v == json.null then
+ return 'null'
+ end
+
+ assert(false, 'encode attempt to encode unsupported type ' .. vtype .. ':' .. tostring(v))
+ end
+
+
+ --- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+ -- @param s The string to scan.
+ -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+ -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+ -- and the position of the first character after
+ -- the scanned JSON object.
+ function json.decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s, startPos, startPos)
+ -- Object
+ if curChar == '{' then
+ return decode_scanObject(s, startPos)
+ end
+ -- Array
+ if curChar == '[' then
+ return decode_scanArray(s, startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s, startPos)
+ end
+ -- String
+ if curChar == "\"" or curChar == [[']] then
+ return decode_scanString(s, startPos)
+ end
+ if string.sub(s, startPos, startPos + 1) == '/*' then
+ return json.decode(s, decode_scanComment(s, startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s, startPos)
+ end
+
+ --- The null function allows one to specify a null value in an associative array (which is otherwise
+ -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+ function json.null()
+ return json.null -- so json.null() will also return null ;-)
+ end
+ -----------------------------------------------------------------------------
+ -- Internal, PRIVATE functions.
+ -- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+ -- functions with an underscore.
+ -----------------------------------------------------------------------------
+ --- Scans an array from JSON into a Lua object
+ -- startPos begins at the start of the array.
+ -- Returns the array and the next starting position
+ -- @param s The string being scanned.
+ -- @param startPos The starting position for the scan.
+ -- @return table, int The scanned array as a table, and the position of the next character to scan.
+ function decode_scanArray(s, startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ assert(string.sub(s, startPos, startPos) == '[', 'decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == ']') then
+ return array, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = json.decode(s, startPos)
+ table.insert(array, object)
+ until false
+ end
+
+ --- Scans a comment and discards the comment.
+ -- Returns the position of the next character following the comment.
+ -- @param string s The JSON string to scan.
+ -- @param int startPos The starting position of the comment
+ function decode_scanComment(s, startPos)
+ assert(string.sub(s, startPos, startPos + 1) == '/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s, '*/', startPos + 2)
+ assert(endPos ~= nil, "Unterminated comment in string at " .. startPos)
+ return endPos + 2
+ end
+
+ --- Scans for given constants: true, false or null
+ -- Returns the appropriate Lua type, and the position of the next character to read.
+ -- @param s The string being scanned.
+ -- @param startPos The position in the string at which to start scanning.
+ -- @return object, int The object (true, false or nil) and the position at which the next character should be
+ -- scanned.
+ function decode_scanConstant(s, startPos)
+ local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
+ local constNames = {"true", "false", "null"}
+
+ for i, k in pairs(constNames) do
+ if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+ end
+
+ --- Scans a number from the JSON encoded string.
+ -- (in fact, also is able to scan numeric +- eqns, which is not
+ -- in the JSON spec.)
+ -- Returns the number, and the position of the next character
+ -- after the number.
+ -- @param s The string being scanned.
+ -- @param startPos The position at which to start scanning.
+ -- @return number, int The extracted number and the position of the next character to scan.
+ function decode_scanNumber(s, startPos)
+ local endPos = startPos + 1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while(string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true)
+ and endPos <= stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos - 1)
+ local stringEval = loadstring(stringValue)
+ assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+ end
+
+ --- Scans a JSON object into a Lua object.
+ -- startPos begins at the start of the object.
+ -- Returns the object and the next starting position.
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return table, int The scanned object as a table and the position of the next character to scan.
+ function decode_scanObject(s, startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ assert(string.sub(s, startPos, startPos) == '{', 'decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == '}') then
+ return object, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = json.decode(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ assert(string.sub(s, startPos, startPos) == ':', 'JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = json.decode(s, startPos)
+ object[key] = value
+ until false -- infinite loop while key-value pairs are found
+ end
+
+ -- START SoniEx2
+ -- Initialize some things used by decode_scanString
+ -- You know, for efficiency
+ local escapeSequences = {
+ ["\\t"] = "\t",
+ ["\\f"] = "\f",
+ ["\\r"] = "\r",
+ ["\\n"] = "\n",
+ ["\\b"] = ""
+ }
+ setmetatable(escapeSequences, {__index = function(t, k)
+ -- skip "\" aka strip escape
+ return string.sub(k, 2)
+ end})
+ -- END SoniEx2
+ --- Scans a JSON string from the opening inverted comma or single quote to the
+ -- end of the string.
+ -- Returns the string extracted as a Lua string,
+ -- and the position of the next non-string character
+ -- (after the closing inverted comma or single quote).
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return string, int The extracted string as a Lua string, and the next character to parse.
+ function decode_scanString(s, startPos)
+ assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s, startPos, startPos)
+ -- START SoniEx2
+ -- PS: I don't think single quotes are valid JSON
+ assert(startChar == "\"" or startChar == [[']], 'decode_scanString called for a non-string')
+ --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart)
+ local t = {}
+ local i, j = startPos, startPos
+ while string.find(s, startChar, j + 1) ~= j + 1 do
+ local oldj = j
+ i, j = string.find(s, "\\.", j + 1)
+ local x, y = string.find(s, startChar, oldj + 1)
+ if not i or x < i then
+ i, j = x, y - 1
+ end
+ table.insert(t, string.sub(s, oldj + 1, i - 1))
+ if string.sub(s, i, j) == "\\u" then
+ local a = string.sub(s, j + 1, j + 4)
+ j = j + 4
+ local n = tonumber(a, 16)
+ assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j)
+ -- math.floor(x/2^y) == lazy right shift
+ -- a % 2^b == bitwise_and(a, (2^b)-1)
+ -- 64 = 2^6
+ -- 4096 = 2^12 (or 2^6 * 2^6)
+ local x
+ if n < 128 then
+ x = string.char(n % 128)
+ elseif n < 2048 then
+ -- [110x xxxx] [10xx xxxx]
+ x = string.char(192 +(math.floor(n / 64) % 32), 128 +(n % 64))
+ else
+ -- [1110 xxxx] [10xx xxxx] [10xx xxxx]
+ x = string.char(224 +(math.floor(n / 4096) % 16), 128 +(math.floor(n / 64) % 64), 128 +(n % 64))
+ end
+ table.insert(t, x)
+ else
+ table.insert(t, escapeSequences[string.sub(s, i, j)])
+ end
+ end
+ table.insert(t, string.sub(j, j + 1))
+ assert(string.find(s, startChar, j + 1), "String decoding failed: missing closing " .. startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")")
+ return table.concat(t, ""), j + 2
+ -- END SoniEx2
+ end
+
+ --- Scans a JSON string skipping all whitespace from the current start position.
+ -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+ -- @param s The string being scanned
+ -- @param startPos The starting position where we should begin removing whitespace.
+ -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+ -- was reached.
+ function decode_scanWhitespace(s, startPos)
+ local whitespace = " \n\r\t"
+ local stringLen = string.len(s)
+ while(string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+ end
+
+ --- Encodes a string to be JSON-compatible.
+ -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+ -- @param s The string to return as a JSON encoded (i.e. backquoted string)
+ -- @return The string appropriately escaped.
+ local escapeList = {
+ ["\""] = '\\\"',
+ ['\\'] = '\\\\',
+ ['/'] = '\\/',
+ [''] = '\\b',
+ ['\f'] = '\\f',
+ ['\n'] = '\\n',
+ ['\r'] = '\\r',
+ ['\t'] = '\\t'
+ }
+
+ function json_private.encodeString(s)
+ local s = tostring(s)
+ return s:gsub(".", function(c) return escapeList[c] end) -- SoniEx2: 5.0 compat
+ end
+
+ -- Determines whether the given Lua type is an array or a table / dictionary.
+ -- We consider any table an array if it has indexes 1..n for its n items, and no
+ -- other data in the table.
+ -- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+ -- @param t The table to evaluate as an array
+ -- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+ -- the second returned value is the maximum
+ -- number of indexed elements in the array.
+ function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ if(t == json.EMPTY_ARRAY) then return true, 0 end
+ if(t == json.EMPTY_OBJECT) then return false end
+
+ local maxIndex = 0
+ for k, v in pairs(t) do
+ if(type(k) == 'number' and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair
+ if(not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex, k)
+ else
+ if(k == 'n') then
+ if v ~=(t.n or # t) then return false end -- False if n does not hold the number of elements
+
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+ end
+
+ --- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+ -- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+ -- In this implementation, all other types are ignored.
+ -- @param o The object to examine.
+ -- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+ function isEncodable(o)
+ local t = type(o)
+ return(t == 'string' or t == 'boolean' or t == 'number' or t == 'nil' or t == 'table') or
+ (t == 'function' and o == json.null)
+ end
+
+ return json
+end
+local debugger_print = print
+local debug_server = nil
+local breakInfoSocket = nil
+local json = createJson()
+local LuaDebugger = {
+ fileMaps = {},
+ Run = true, --表示正常运行只检测断点
+ StepIn = false,
+ StepInLevel = 0,
+ StepNext = false,
+ StepNextLevel = 0,
+ StepOut = false,
+ breakInfos = {},
+ runTimeType = nil,
+ isHook = true,
+ pathCachePaths = {},
+ isProntToConsole = 1,
+ isDebugPrint = true,
+ hookType = "lrc",
+ currentFileName = "",
+ currentTempFunc = nil,
+ --分割字符串缓存
+ splitFilePaths = {},
+ DebugLuaFie="",
+ version="1.0.4"
+}
+LuaDebugger.event = {
+ S2C_SetBreakPoints = 1,
+ C2S_SetBreakPoints = 2,
+ S2C_RUN = 3,
+ C2S_HITBreakPoint = 4,
+ S2C_ReqVar = 5,
+ C2S_ReqVar = 6,
+ --单步跳过请求
+ S2C_NextRequest = 7,
+ --单步跳过反馈
+ C2S_NextResponse = 8,
+ -- 单步跳过 结束 没有下一步
+ C2S_NextResponseOver = 9,
+ --单步跳入
+ S2C_StepInRequest = 10,
+ C2S_StepInResponse = 11,
+ --单步跳出
+ S2C_StepOutRequest = 12,
+ --单步跳出返回
+ C2S_StepOutResponse = 13,
+ --打印
+ C2S_LuaPrint = 14,
+ S2C_LoadLuaScript = 16,
+ C2S_SetSocketName = 17,
+ C2S_LoadLuaScript = 18,
+ C2S_DebugXpCall = 20,
+ S2C_DebugClose = 21
+}
+function print1(...)
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=1}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+print = print1
+
+
+function luaIdePrintWarn( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=2}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintErr( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=3}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+
+
+
+----=============================工具方法=============================================
+local debug_hook = nil
+local function debugger_strSplit(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if(delimiter == '') then return false end
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+local function debugger_strTrim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+local function debugger_dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+ local lookupTable = {}
+ local result = {}
+ local function _v(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+ end
+ local traceback = debugger_strSplit(debug.traceback("", 2), "\n")
+ print1("dump from: " .. debugger_strTrim(traceback[3]))
+ local function _dump(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(_v(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[# result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value))
+ elseif lookupTable[value] then
+ result[# result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc)
+ else
+ lookupTable[value] = true
+ if nest > nesting then
+ result[# result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption)
+ else
+ result[# result + 1] = string.format("%s%s = {", indent, _v(desciption))
+ local indent2 = indent .. " "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[# keys + 1] = k
+ local vk = _v(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ _dump(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[# result + 1] = string.format("%s}", indent)
+ end
+ end
+ end
+ _dump(value, desciption, "- ", 1)
+ for i, line in ipairs(result) do
+ print1(line)
+ end
+end
+
+local function debugger_setVarInfo(name, value)
+ local vt = type(value)
+ local valueStr = ""
+ if(vt ~= "table") then
+ valueStr = tostring(value)
+ valueStr =ZZBase64.encode(valueStr)
+ else
+ -- valueStr = topointer(value)
+ end
+ local valueInfo = {
+ name = name,
+ valueType = vt,
+ valueStr = valueStr
+ }
+ return valueInfo;
+end
+local function debugger_getvalue(f)
+ local i = 1
+ local locals = {}
+ -- get locals
+ while true do
+ local name, value = debug.getlocal(f, i)
+ if not name then break end
+ if(name ~= "(*temporary)") then
+ locals[name] = value
+ end
+ i = i + 1
+ end
+ local func = getinfo(f, "f").func
+ i = 1
+ local ups = {}
+ while func do -- check for func as it may be nil for tail calls
+ local name, value = debug.getupvalue(func, i)
+ if not name then break end
+ ups[name] = value
+ i = i + 1
+ end
+ return {locals = locals, ups = ups}
+end
+--获取堆栈
+debugger_stackInfo = function(ignoreCount, event)
+ local datas = {}
+ local stack = {}
+ local varInfos = {}
+ local funcs = {}
+ local index = 0;
+ for i = ignoreCount, 100 do
+ local source = getinfo(i)
+ local isadd = true
+ if(i == ignoreCount) then
+ local file = source.source
+ if(file:find(LuaDebugger.DebugLuaFie)) then
+ return
+ end
+ if(file == "=[C]") then
+ isadd = false
+ end
+ end
+ if not source then
+ break;
+ end
+ if(isadd) then
+ local file = source.source
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local info =
+ {
+ src = file,
+ scoreName = source.name,
+ currentline = source.currentline,
+ linedefined = source.linedefined,
+ what = source.what,
+ nameWhat = source.namewhat
+ }
+ index = i
+ local vars = debugger_getvalue(i + 1)
+ table.insert(stack, info)
+ table.insert(varInfos, vars)
+ table.insert(funcs, source.func)
+ end
+ if source.what == 'main' then break end
+ end
+ local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
+ local data = {
+ stack = stackInfo.stack,
+ vars = stackInfo.vars,
+ funcs = stackInfo.funcs,
+ event = event,
+ funcsLength = #stackInfo.funcs
+ }
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ return data
+end
+--==============================工具方法 end======================================================
+--===========================点断信息==================================================
+--根据不同的游戏引擎进行定时获取断点信息
+--CCDirector:sharedDirector():getScheduler()
+local debugger_setBreak = nil
+local function debugger_receiveDebugBreakInfo()
+ if(jit) then
+ if(LuaDebugger.debugLuaType ~= "jit") then
+ local msg = "当前luajit版本为: "..jit.version.." 请使用LuaDebugjit 进行调试!"
+ print(msg)
+
+ end
+ end
+
+
+ if(breakInfoSocket) then
+ local msg, status = breakInfoSocket:receive()
+ if(msg) then
+ local netData = json.decode(msg)
+ if netData.event == LuaDebugger.event.S2C_SetBreakPoints then
+ debugger_setBreak(netData.data)
+ elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
+
+ debugger_exeLuaString(netData.data, false)
+ end
+ end
+ end
+end
+local function splitFilePath(path)
+ if(LuaDebugger.splitFilePaths[path]) then
+ return LuaDebugger.splitFilePaths[path]
+ end
+
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(path, '/', pos, true) end do
+ table.insert(arr, string.sub(path, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(path, pos))
+ LuaDebugger.splitFilePaths[path] = arr
+ return arr
+end
+debugger_setBreak = function(datas)
+ local breakInfos = LuaDebugger.breakInfos
+ for i, data in ipairs(datas) do
+ local breakInfo = breakInfos[data.fileName]
+ if(not breakInfo) then
+ breakInfos[data.fileName] = {}
+ breakInfo = breakInfos[data.fileName]
+ end
+ if(not data.lines or # data.lines == 0) then
+ breakInfo[data.serverPath] = nil
+ else
+ local lineInfos = {}
+ for li, line in ipairs(data.lines) do
+ lineInfos[line] = true
+ end
+ breakInfo[data.serverPath] = {
+ pathNames = splitFilePath(data.serverPath),
+ lines = lineInfos
+ }
+ end
+ local count = 0
+ for i, linesInfo in pairs(breakInfo) do
+ count = count + 1
+ end
+ if(count == 0) then
+ breakInfos[data.fileName] = nil
+ end
+ end
+ --debugger_dump(breakInfos, "breakInfos", 6)
+ --检查是否需要断点
+ local isHook = false
+ for k, v in pairs(breakInfos) do
+ isHook = true
+ break
+ end
+
+ --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次
+ if(isHook) then
+ if(not LuaDebugger.isHook) then
+ debug.sethook(debug_hook, "lrc")
+ end
+ LuaDebugger.isHook = true
+
+ else
+
+ if(LuaDebugger.isHook) then
+ debug.sethook()
+ end
+ LuaDebugger.isHook = false
+ end
+end
+local function debugger_checkFileIsBreak(fileName)
+ return LuaDebugger.breakInfos[fileName]
+end
+local function debugger_checkIsBreak(fileName, line)
+ local breakInfo = LuaDebugger.breakInfos[fileName]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = getinfo(3)
+ local source = info.source
+ source = source:gsub("\\", "/")
+ if source:find("@") == 1 then
+ source = source:sub(2);
+ if not source:find("/") then
+ source = source:gsub("%.", "/")
+ end
+ end
+ local index = source:find("%.lua")
+ if not index then
+ source = source .. ".lua"
+ end
+ local hitPathNames = splitFilePath(source)
+ local isHit = true
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+ isHit = false
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ if(# hitPathNames == 1 or(# hitPathNames > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ return hitFieName
+ end
+ end
+ end
+ return false
+end
+--=====================================断点信息 end ----------------------------------------------
+local controller_host = "192.168.1.102"
+local controller_port = 7003
+local function debugger_sendMsg(serverSocket, eventName, data)
+ local sendMsg = {
+ event = eventName,
+ data = data
+ }
+ local sendStr = json.encode(sendMsg)
+ serverSocket:send(sendStr .. "__debugger_k0204__")
+end
+--执行lua字符串
+debugger_exeLuaString = function(data, isBreakPoint)
+ local function loadScript()
+ local luastr = data.luastr
+ if(isBreakPoint) then
+ local currentTabble = {_G = _G}
+ local frameId = data.frameId
+ frameId = frameId + 1
+ local func = LuaDebugger.currentDebuggerData.funcs[frameId];
+ local vars = LuaDebugger.currentDebuggerData.vars[frameId]
+ local locals = vars.locals;
+ local ups = vars.ups
+ for k, v in pairs(ups) do
+ currentTabble[k] = v
+ end
+ for k, v in pairs(locals) do
+ currentTabble[k] = v
+ end
+ setmetatable(currentTabble, {__index = _G})
+ local fun = loadstring(luastr)
+ setfenv(fun, currentTabble)
+ fun()
+ else
+ local fun = loadstring(luastr)
+ fun()
+ end
+ end
+ local status, msg = xpcall(loadScript, function(error)
+ print(error)
+ end)
+ if(status) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "执行代码成功"})
+ if(isBreakPoint) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_HITBreakPoint, LuaDebugger.currentDebuggerData.stack)
+ end
+ else
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "加载代码失败"})
+ end
+end
+local function getLuaFileName(str)
+
+ local pos = 0
+ local fileName = "";
+ -- for each divider found
+ for st, sp in function() return string.find(str, '/', pos, true) end do
+ pos = sp + 1
+ end
+ fileName = string.sub(str, pos)
+
+ return fileName;
+end
+local function getSource(source)
+ if(LuaDebugger.pathCachePaths[source]) then
+ return LuaDebugger.pathCachePaths[source]
+ end
+
+ local file = source
+ file = file:gsub("\\", "/")
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local index = file:find("%.lua")
+ if not index then
+ file = file .. ".lua"
+ end
+ file = getLuaFileName(file)
+ LuaDebugger.pathCachePaths[source] = file
+ return file;
+end
+local function debugger_GeVarInfoBytUserData(server,var,variablesReference,debugSpeedIndex)
+ local fileds = LuaDebugTool.getUserDataInfo(var)
+
+ local varInfos = {}
+ if(tolua) then
+ local luavars = tolua.getpeer(vars)
+ if(luavars) then
+ for k, v in pairs(luavars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(varInfos, vinfo)
+ end
+ end
+ end
+
+ --c# vars
+ for i=1,fileds.Count do
+ local filed = fileds[i-1]
+ local valueInfo = {
+ name = filed.name,
+ valueType = filed.valueType,
+ valueStr = ZZBase64.encode(filed.valueStr),
+ isValue = filed.isValue
+ }
+
+ table.insert( varInfos,valueInfo)
+
+ end
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = varInfos,
+ isComplete = 1
+ })
+end
+--获取lua 变量的方法
+local function debugger_getBreakVar(body, server)
+ local variablesReference = body.variablesReference
+ local debugSpeedIndex = body.debugSpeedIndex
+ local vinfos = {}
+ local function exe()
+
+ local frameId = body.frameId;
+ local type_ = body.type;
+ local keys = body.keys;
+ --找到对应的var
+ local vars = nil
+ if(type_ == 1) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.locals
+ elseif(type_ == 2) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.ups
+ elseif(type_ == 3) then
+ vars = _G
+ end
+
+ --特殊处理下
+ for i, v in ipairs(keys) do
+ local start_m = string.sub(v,1,1)
+ if(start_m == "[") then
+ local len = string.len( v )
+ local end_m = string.sub(v,len,len)
+ if(end_m == "]") then
+ v = string.sub(v,2,len-1);
+ end
+ vars = vars[v]
+ else
+ vars = vars[v]
+ end
+
+ if(type(vars) == "userdata" and tolua ~= nil and LuaDebugTool == nil) then
+ vars = tolua.getpeer(vars)
+ end
+ if(vars == nil) then
+ break;
+ end
+ end
+ local varType = type(vars)
+ if(varType == "userdata" ) then
+ if(LuaDebugTool) then
+ debugger_GeVarInfoBytUserData(server,vars,variablesReference,debugSpeedIndex)
+ return;
+ elseif(tolua == nil) then
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ return
+ end
+ end
+
+ local count = 0;
+ if(vars ~= nil) then
+ for k, v in pairs(vars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(vinfos, vinfo)
+ if(# vinfos > 10) then
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 0
+ })
+ vinfos = {}
+ end
+ end
+
+ end
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ end
+ xpcall(exe, function(error)
+ print("获取变量错误 错误消息-----------------")
+ print(error)
+ print(debug.traceback("", 2))
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = {
+ {
+ name ="error",
+ valueType = "string",
+ valueStr = ZZBase64.encode("无法获取属性值"),
+ isValue = false
+ }
+ },
+ isComplete = 1
+ })
+ end)
+end
+local function ResetDebugInfo()
+ LuaDebugger.Run = false
+ LuaDebugger.StepIn = false
+ LuaDebugger.StepNext = false
+ LuaDebugger.StepOut = false
+ LuaDebugger.StepNextLevel = 0
+
+end
+local function debugger_loop(server)
+ server = debug_server
+ --命令
+ local command
+ local eval_env = {}
+ local arg
+ while true do
+ local line, status = server:receive()
+ if(status == "closed") then
+ debug.sethook()
+ coroutine.yield()
+ end
+ if(line) then
+ local netData = json.decode(line)
+ local event = netData.event;
+ local body = netData.data;
+ if(event == LuaDebugger.event.S2C_DebugClose) then
+ debug.sethook()
+ coroutine.yield()
+ elseif event == LuaDebugger.event.S2C_SetBreakPoints then
+ --设置断点信息
+ local function setB()
+ debugger_setBreak(body)
+ end
+ xpcall(setB, function(error)
+ print(error)
+ end)
+ elseif event == LuaDebugger.event.S2C_RUN then
+ LuaDebugger.runTimeType = body.runTimeType
+ LuaDebugger.isProntToConsole = body.isProntToConsole
+ ResetDebugInfo()
+ LuaDebugger.Run = true
+ local data = coroutine.yield()
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif event == LuaDebugger.event.S2C_ReqVar then
+ --请求数据信息
+ debugger_getBreakVar(body, server)
+ elseif event == LuaDebugger.event.S2C_NextRequest then
+ ResetDebugInfo()
+
+ LuaDebugger.StepNext = true
+ LuaDebugger.StepNextLevel = 0;
+
+ --设置当前文件名和当前行数
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif(event == LuaDebugger.event.S2C_StepInRequest) then
+ --单步跳入
+
+ ResetDebugInfo()
+ LuaDebugger.StepIn = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif(event == LuaDebugger.event.S2C_StepOutRequest) then
+ --单步跳出
+
+ ResetDebugInfo()
+ LuaDebugger.StepOut = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif event == LuaDebugger.event.S2C_LoadLuaScript then
+ debugger_exeLuaString(body, true)
+ end
+ end
+ end
+end
+coro_debugger = coroutine.create(debugger_loop)
+debug_hook = function(event, line)
+
+ if(not LuaDebugger.isHook) then
+ return
+ end
+
+ if(LuaDebugger.Run) then
+ if(event == "line") then
+ local isCheck = false
+
+ for k, breakInfo in pairs(LuaDebugger.breakInfos) do
+
+ for bk, linesInfo in pairs(breakInfo) do
+
+ if(linesInfo.lines[line]) then
+ isCheck = true
+ break
+ end
+ end
+ if(isCheck) then
+ break
+ end
+ end
+
+ if(not isCheck) then
+ return
+ end
+ else
+
+ LuaDebugger.currentFileName = nil
+ LuaDebugger.currentTempFunc = nil
+ return
+
+ end
+ end
+ --跳出
+ if(LuaDebugger.StepOut) then
+
+ if(event == "line" or event == "call") then
+ return
+ end
+ local tempFun = getinfo(2,"f").func
+
+ if(LuaDebugger.currentDebuggerData.funcsLength == 1) then
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+
+ else
+ if(LuaDebugger.currentDebuggerData.funcs[2] == tempFun) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+ return
+ end
+ -- debugger_dump(LuaDebugger,"LuaDebugger")
+ -- print1(LuaDebugger.StepNextLevel,"LuaDebugger.StepNextLevel")
+ local file = nil
+ if(event == "call") then
+ -- if(not LuaDebugger.StepOut) then
+ if(not LuaDebugger.Run) then
+ LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel+1
+ end
+ -- print1("stepIn",LuaDebugger.StepNextLevel)
+
+ local stepInfo = getinfo(2,"S")
+ local source = stepInfo.source
+ if(source:find(LuaDebugger.DebugLuaFie) or source == "=[C]") then
+ return
+ end
+
+ file = getSource(source);
+ LuaDebugger.currentFileName = file
+ -- end
+ elseif(event == "return" or event == "tail return") then
+ -- if(not LuaDebugger.StepOut) then
+
+ if(not LuaDebugger.Run) then
+ LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel-1
+ end
+
+ LuaDebugger.currentFileName = nil
+ -- end
+ elseif(event == "line") then
+ if(LuaDebugger.StepIn) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ --挂起等待调试器作出反应
+ if(data) then
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ coroutine.resume(coro_debugger, data)
+ return;
+ end
+ end
+ if(LuaDebugger.StepNext ) then
+ if( LuaDebugger.StepNextLevel <= 0) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ --挂起等待调试器作出反应
+ if(data)then
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+
+ end
+
+ end
+
+ local stepInfo = nil
+ if(not LuaDebugger.currentFileName) then
+ stepInfo = getinfo(2,"S")
+ local source = stepInfo.source
+ if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
+ file = getSource(source);
+ LuaDebugger.currentFileName = file
+ end
+ file = LuaDebugger.currentFileName
+
+
+ --判断断点
+ local breakInfo = LuaDebugger.breakInfos[file]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = stepInfo
+ if(not info) then
+ info = getinfo(2)
+ end
+ local hitPathNames = splitFilePath(file)
+
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ local hitPathNamesLength = #hitPathNames
+ if(hitPathNamesLength == 1 or(hitPathNamesLength > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+ end
+ end
+end
+local function debugger_xpcall()
+ --调用 coro_debugger 并传入 参数
+ local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+end
+--调试开始
+local function start()
+ LuaDebugger.DebugLuaFie = getLuaFileName(getinfo(1).source)
+ local socket = createSocket()
+ print(controller_host)
+ print(controller_port)
+
+ local server = socket.connect(controller_host, controller_port)
+ debug_server = server;
+ if server then
+ --创建breakInfo socket
+ socket = createSocket()
+ breakInfoSocket = socket.connect(controller_host, controller_port)
+ if(breakInfoSocket) then
+ breakInfoSocket:settimeout(0)
+ debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
+ name = "breakPointSocket"
+ })
+ debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, {
+ name = "mainSocket",
+ version = LuaDebugger.version
+
+ })
+ xpcall(function()
+ debug.sethook(debug_hook, "lrc")
+ end, function(error)
+ print("error:", error)
+ end)
+ if(jit) then
+ if(LuaDebugger.debugLuaType ~= "jit") then
+ print("error======================================================")
+ local msg = "当前luajit版本为: "..jit.version.." 请使用LuaDebugjit 进行调试!"
+
+ print(msg)
+ end
+ end
+ coroutine.resume(coro_debugger, server)
+ end
+ end
+end
+function StartDebug(host, port)
+
+ if(not host) then
+ print("error host nil")
+ end
+ if(not port) then
+ print("error prot nil")
+ end
+ if(type(host) ~= "string") then
+ print("error host not string")
+ end
+ if(type(port) ~= "number") then
+ print("error host not number")
+ end
+ controller_host = host
+ controller_port = port
+ xpcall(start, function(error)
+ -- body
+ print(error)
+ end)
+ return debugger_receiveDebugBreakInfo, debugger_xpcall
+end
+
+
+
+--base64
+
+local string = string
+
+ZZBase64.__code = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
+ };
+ZZBase64.__decode = {}
+for k,v in pairs(ZZBase64.__code) do
+ ZZBase64.__decode[string.byte(v,1)] = k - 1
+end
+
+function ZZBase64.encode(text)
+ local len = string.len(text)
+ local left = len % 3
+ len = len - left
+ local res = {}
+ local index = 1
+ for i = 1, len, 3 do
+ local a = string.byte(text, i )
+ local b = string.byte(text, i + 1)
+ local c = string.byte(text, i + 2)
+ -- num = a<<16 + b<<8 + c
+ local num = a * 65536 + b * 256 + c
+ for j = 1, 4 do
+ --tmp = num >> ((4 -j) * 6)
+ local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
+ --curPos = tmp&0x3f
+ local curPos = tmp % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+ index = index + 1
+ end
+ end
+
+ if left == 1 then
+ ZZBase64.__left1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__left2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__left2(res, index, text, len)
+ local num1 = string.byte(text, len + 1)
+ num1 = num1 * 1024 --lshift 10
+ local num2 = string.byte(text, len + 2)
+ num2 = num2 * 4 --lshift 2
+ local num = num1 + num2
+
+ local tmp1 = math.floor(num / 4096) --rShift 12
+ local curPos = tmp1 % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+
+ local tmp2 = math.floor(num / 64)
+ curPos = tmp2 % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 2] = ZZBase64.__code[curPos]
+
+ res[index + 3] = "="
+end
+
+function ZZBase64.__left1(res, index,text, len)
+ local num = string.byte(text, len + 1)
+ num = num * 16
+
+ local tmp = math.floor(num / 64)
+ local curPos = tmp % 64 + 1
+ res[index ] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ res[index + 2] = "="
+ res[index + 3] = "="
+end
+
+function ZZBase64.decode(text)
+ local len = string.len(text)
+ local left = 0
+ if string.sub(text, len - 1) == "==" then
+ left = 2
+ len = len - 4
+ elseif string.sub(text, len) == "=" then
+ left = 1
+ len = len - 4
+ end
+
+ local res = {}
+ local index = 1
+ local decode = ZZBase64.__decode
+ for i =1, len, 4 do
+ local a = decode[string.byte(text,i )]
+ local b = decode[string.byte(text,i + 1)]
+ local c = decode[string.byte(text,i + 2)]
+ local d = decode[string.byte(text,i + 3)]
+
+ --num = a<<18 + b<<12 + c<<6 + d
+ local num = a * 262144 + b * 4096 + c * 64 + d
+
+ local e = string.char(num % 256)
+ num = math.floor(num / 256)
+ local f = string.char(num % 256)
+ num = math.floor(num / 256)
+ res[index ] = string.char(num % 256)
+ res[index + 1] = f
+ res[index + 2] = e
+ index = index + 3
+ end
+
+ if left == 1 then
+ ZZBase64.__decodeLeft1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__decodeLeft2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__decodeLeft1(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local c = decode[string.byte(text, len + 3)]
+ local num = a * 4096 + b * 64 + c
+
+ local num1 = math.floor(num / 1024) % 256
+ local num2 = math.floor(num / 4) % 256
+ res[index] = string.char(num1)
+ res[index + 1] = string.char(num2)
+end
+
+function ZZBase64.__decodeLeft2(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local num = a * 64 + b
+ num = math.floor(num / 16)
+ res[index] = string.char(num)
+end
+
+
+
+
+return StartDebug
diff --git a/simulator/win32/src/LuaIdeDebug/LuaDebugjit.lua b/simulator/win32/src/LuaIdeDebug/LuaDebugjit.lua
new file mode 100644
index 0000000..0c95429
--- /dev/null
+++ b/simulator/win32/src/LuaIdeDebug/LuaDebugjit.lua
@@ -0,0 +1,1655 @@
+local sethook = debug.sethook
+local debugger_stackInfo = nil
+local coro_debugger = nil
+local debugger_require = require
+local debugger_exeLuaString = nil
+local loadstring_ = nil
+if(loadstring) then
+loadstring_ = loadstring
+else
+loadstring_ = load
+end
+local ZZBase64 = {}
+local LuaDebugTool_ = nil
+if(LuaDebugTool) then
+
+ LuaDebugTool_ = LuaDebugTool
+elseif(CS and CS.LuaDebugTool) then
+
+ LuaDebugTool_ = CS.LuaDebugTool;
+
+end
+local LuaDebugTool = LuaDebugTool_
+local loadstring = loadstring_
+local getinfo = debug.getinfo
+local function createSocket()
+ local base = _G
+ local string = require("string")
+ local math = require("math")
+ local socket = require("socket.core")
+
+ local _M = socket
+
+ -----------------------------------------------------------------------------
+ -- Exported auxiliar functions
+ -----------------------------------------------------------------------------
+ function _M.connect4(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet")
+ end
+
+ function _M.connect6(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet6")
+ end
+
+
+ if(not _M.connect) then
+ function _M.connect(address, port, laddress, lport)
+ local sock, err = socket.tcp()
+ if not sock then return nil, err end
+ if laddress then
+ local res, err = sock:bind(laddress, lport, -1)
+ if not res then return nil, err end
+ end
+ local res, err = sock:connect(address, port)
+ if not res then return nil, err end
+ return sock
+ end
+ end
+ function _M.bind(host, port, backlog)
+ if host == "*" then host = "0.0.0.0" end
+ local addrinfo, err = socket.dns.getaddrinfo(host);
+ if not addrinfo then return nil, err end
+ local sock, res
+ err = "no info on address"
+ for i, alt in base.ipairs(addrinfo) do
+ if alt.family == "inet" then
+ sock, err = socket.tcp4()
+ else
+ sock, err = socket.tcp6()
+ end
+ if not sock then return nil, err end
+ sock:setoption("reuseaddr", true)
+ res, err = sock:bind(alt.addr, port)
+ if not res then
+ sock:close()
+ else
+ res, err = sock:listen(backlog)
+ if not res then
+ sock:close()
+ else
+ return sock
+ end
+ end
+ end
+ return nil, err
+ end
+
+ _M.try = _M.newtry()
+
+ function _M.choose(table)
+ return function(name, opt1, opt2)
+ if base.type(name) ~= "string" then
+ name, opt1, opt2 = "default", name, opt1
+ end
+ local f = table[name or "nil"]
+ if not f then base.error("unknown key (" .. base.tostring(name) .. ")", 3)
+ else return f(opt1, opt2) end
+ end
+ end
+
+ -----------------------------------------------------------------------------
+ -- Socket sources and sinks, conforming to LTN12
+ -----------------------------------------------------------------------------
+ -- create namespaces inside LuaSocket namespace
+ local sourcet, sinkt = {}, {}
+ _M.sourcet = sourcet
+ _M.sinkt = sinkt
+
+ _M.BLOCKSIZE = 2048
+
+ sinkt["close-when-done"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if not chunk then
+ sock:close()
+ return 1
+ else return sock:send(chunk) end
+ end
+ })
+ end
+
+ sinkt["keep-open"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if chunk then return sock:send(chunk)
+ else return 1 end
+ end
+ })
+ end
+
+ sinkt["default"] = sinkt["keep-open"]
+
+ _M.sink = _M.choose(sinkt)
+
+ sourcet["by-length"] = function(sock, length)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if length <= 0 then return nil end
+ local size = math.min(socket.BLOCKSIZE, length)
+ local chunk, err = sock:receive(size)
+ if err then return nil, err end
+ length = length - string.len(chunk)
+ return chunk
+ end
+ })
+ end
+
+ sourcet["until-closed"] = function(sock)
+ local done
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if done then return nil end
+ local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
+ if not err then return chunk
+ elseif err == "closed" then
+ sock:close()
+ done = 1
+ return partial
+ else return nil, err end
+ end
+ })
+ end
+
+
+ sourcet["default"] = sourcet["until-closed"]
+
+ _M.source = _M.choose(sourcet)
+
+ return _M
+end
+
+local function createJson()
+ local math = require('math')
+ local string = require("string")
+ local table = require("table")
+ local object = nil
+ -----------------------------------------------------------------------------
+ -- Module declaration
+ -----------------------------------------------------------------------------
+ local json = {} -- Public namespace
+ local json_private = {} -- Private namespace
+
+ -- Public constants
+ json.EMPTY_ARRAY = {}
+ json.EMPTY_OBJECT = {}
+ -- Public functions
+
+ -- Private functions
+ local decode_scanArray
+ local decode_scanComment
+ local decode_scanConstant
+ local decode_scanNumber
+ local decode_scanObject
+ local decode_scanString
+ local decode_scanWhitespace
+ local encodeString
+ local isArray
+ local isEncodable
+
+ -----------------------------------------------------------------------------
+ -- PUBLIC FUNCTIONS
+ -----------------------------------------------------------------------------
+ --- Encodes an arbitrary Lua object / variable.
+ -- @param v The Lua object / variable to be JSON encoded.
+ -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+ function json.encode(v)
+ -- Handle nil values
+ if v == nil then
+ return "null"
+ end
+
+ local vtype = type(v)
+
+ -- Handle strings
+ if vtype == 'string' then
+ return "\"" .. json_private.encodeString(v) .. "\"" -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype == 'number' or vtype == 'boolean' then
+ return tostring(v)
+ end
+
+ -- Handle tables
+ if vtype == 'table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1, maxCount do
+ table.insert(rval, json.encode(v[i]))
+ end
+ else -- An object, not an array
+ for i, j in pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, "\"" .. json_private.encodeString(i) .. '":' .. json.encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval, ',') .. ']'
+ else
+ return '{' .. table.concat(rval, ',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype == 'function' and v == json.null then
+ return 'null'
+ end
+
+ assert(false, 'encode attempt to encode unsupported type ' .. vtype .. ':' .. tostring(v))
+ end
+
+
+ --- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+ -- @param s The string to scan.
+ -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+ -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+ -- and the position of the first character after
+ -- the scanned JSON object.
+ function json.decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s, startPos, startPos)
+ -- Object
+ if curChar == '{' then
+ return decode_scanObject(s, startPos)
+ end
+ -- Array
+ if curChar == '[' then
+ return decode_scanArray(s, startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s, startPos)
+ end
+ -- String
+ if curChar == "\"" or curChar == [[']] then
+ return decode_scanString(s, startPos)
+ end
+ if string.sub(s, startPos, startPos + 1) == '/*' then
+ return json.decode(s, decode_scanComment(s, startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s, startPos)
+ end
+
+ --- The null function allows one to specify a null value in an associative array (which is otherwise
+ -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+ function json.null()
+ return json.null -- so json.null() will also return null ;-)
+ end
+ -----------------------------------------------------------------------------
+ -- Internal, PRIVATE functions.
+ -- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+ -- functions with an underscore.
+ -----------------------------------------------------------------------------
+
+ --- Scans an array from JSON into a Lua object
+ -- startPos begins at the start of the array.
+ -- Returns the array and the next starting position
+ -- @param s The string being scanned.
+ -- @param startPos The starting position for the scan.
+ -- @return table, int The scanned array as a table, and the position of the next character to scan.
+ function decode_scanArray(s, startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ assert(string.sub(s, startPos, startPos) == '[', 'decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == ']') then
+ return array, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = json.decode(s, startPos)
+ table.insert(array, object)
+ until false
+ end
+
+ --- Scans a comment and discards the comment.
+ -- Returns the position of the next character following the comment.
+ -- @param string s The JSON string to scan.
+ -- @param int startPos The starting position of the comment
+ function decode_scanComment(s, startPos)
+ assert(string.sub(s, startPos, startPos + 1) == '/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s, '*/', startPos + 2)
+ assert(endPos ~= nil, "Unterminated comment in string at " .. startPos)
+ return endPos + 2
+ end
+
+ --- Scans for given constants: true, false or null
+ -- Returns the appropriate Lua type, and the position of the next character to read.
+ -- @param s The string being scanned.
+ -- @param startPos The position in the string at which to start scanning.
+ -- @return object, int The object (true, false or nil) and the position at which the next character should be
+ -- scanned.
+ function decode_scanConstant(s, startPos)
+ local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
+ local constNames = {"true", "false", "null"}
+
+ for i, k in pairs(constNames) do
+ if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+ end
+
+ --- Scans a number from the JSON encoded string.
+ -- (in fact, also is able to scan numeric +- eqns, which is not
+ -- in the JSON spec.)
+ -- Returns the number, and the position of the next character
+ -- after the number.
+ -- @param s The string being scanned.
+ -- @param startPos The position at which to start scanning.
+ -- @return number, int The extracted number and the position of the next character to scan.
+ function decode_scanNumber(s, startPos)
+ local endPos = startPos + 1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while(string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true)
+ and endPos <= stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos - 1)
+ local stringEval = loadstring(stringValue)
+ assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+ end
+
+ --- Scans a JSON object into a Lua object.
+ -- startPos begins at the start of the object.
+ -- Returns the object and the next starting position.
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return table, int The scanned object as a table and the position of the next character to scan.
+ function decode_scanObject(s, startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ assert(string.sub(s, startPos, startPos) == '{', 'decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == '}') then
+ return object, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = json.decode(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ assert(string.sub(s, startPos, startPos) == ':', 'JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = json.decode(s, startPos)
+ object[key] = value
+ until false -- infinite loop while key-value pairs are found
+ end
+
+ -- START SoniEx2
+ -- Initialize some things used by decode_scanString
+ -- You know, for efficiency
+ local escapeSequences = {
+ ["\\t"] = "\t",
+ ["\\f"] = "\f",
+ ["\\r"] = "\r",
+ ["\\n"] = "\n",
+ ["\\b"] = ""
+ }
+ setmetatable(escapeSequences, {__index = function(t, k)
+ -- skip "\" aka strip escape
+ return string.sub(k, 2)
+ end})
+ -- END SoniEx2
+
+ --- Scans a JSON string from the opening inverted comma or single quote to the
+ -- end of the string.
+ -- Returns the string extracted as a Lua string,
+ -- and the position of the next non-string character
+ -- (after the closing inverted comma or single quote).
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return string, int The extracted string as a Lua string, and the next character to parse.
+ function decode_scanString(s, startPos)
+ assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s, startPos, startPos)
+ -- START SoniEx2
+ -- PS: I don't think single quotes are valid JSON
+ assert(startChar == "\"" or startChar == [[']], 'decode_scanString called for a non-string')
+ --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart)
+ local t = {}
+ local i, j = startPos, startPos
+ while string.find(s, startChar, j + 1) ~= j + 1 do
+ local oldj = j
+ i, j = string.find(s, "\\.", j + 1)
+ local x, y = string.find(s, startChar, oldj + 1)
+ if not i or x < i then
+ i, j = x, y - 1
+ end
+ table.insert(t, string.sub(s, oldj + 1, i - 1))
+ if string.sub(s, i, j) == "\\u" then
+ local a = string.sub(s, j + 1, j + 4)
+ j = j + 4
+ local n = tonumber(a, 16)
+ assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j)
+ -- math.floor(x/2^y) == lazy right shift
+ -- a % 2^b == bitwise_and(a, (2^b)-1)
+ -- 64 = 2^6
+ -- 4096 = 2^12 (or 2^6 * 2^6)
+ local x
+ if n < 128 then
+ x = string.char(n % 128)
+ elseif n < 2048 then
+ -- [110x xxxx] [10xx xxxx]
+ x = string.char(192 +(math.floor(n / 64) % 32), 128 +(n % 64))
+ else
+ -- [1110 xxxx] [10xx xxxx] [10xx xxxx]
+ x = string.char(224 +(math.floor(n / 4096) % 16), 128 +(math.floor(n / 64) % 64), 128 +(n % 64))
+ end
+ table.insert(t, x)
+ else
+ table.insert(t, escapeSequences[string.sub(s, i, j)])
+ end
+ end
+ table.insert(t, string.sub(j, j + 1))
+ assert(string.find(s, startChar, j + 1), "String decoding failed: missing closing " .. startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")")
+ return table.concat(t, ""), j + 2
+ -- END SoniEx2
+ end
+
+ --- Scans a JSON string skipping all whitespace from the current start position.
+ -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+ -- @param s The string being scanned
+ -- @param startPos The starting position where we should begin removing whitespace.
+ -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+ -- was reached.
+ function decode_scanWhitespace(s, startPos)
+ local whitespace = " \n\r\t"
+ local stringLen = string.len(s)
+ while(string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+ end
+
+ --- Encodes a string to be JSON-compatible.
+ -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+ -- @param s The string to return as a JSON encoded (i.e. backquoted string)
+ -- @return The string appropriately escaped.
+
+ local escapeList = {
+ ["\""] = '\\"',
+ ['\\'] = '\\\\',
+ ['/'] = '\\/',
+ [''] = '\\b',
+ ['\f'] = '\\f',
+ ['\n'] = '\\n',
+ ['\r'] = '\\r',
+ ['\t'] = '\\t'
+ }
+
+ function json_private.encodeString(s)
+ local s = tostring(s)
+ return s:gsub(".", function(c) return escapeList[c] end) -- SoniEx2: 5.0 compat
+ end
+
+ -- Determines whether the given Lua type is an array or a table / dictionary.
+ -- We consider any table an array if it has indexes 1..n for its n items, and no
+ -- other data in the table.
+ -- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+ -- @param t The table to evaluate as an array
+ -- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+ -- the second returned value is the maximum
+ -- number of indexed elements in the array.
+ function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ if(t == json.EMPTY_ARRAY) then return true, 0 end
+ if(t == json.EMPTY_OBJECT) then return false end
+
+ local maxIndex = 0
+ for k, v in pairs(t) do
+ if(type(k) == 'number' and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair
+ if(not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex, k)
+ else
+ if(k == 'n') then
+ if v ~=(t.n or # t) then return false end -- False if n does not hold the number of elements
+
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+ end
+
+ --- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+ -- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+ -- In this implementation, all other types are ignored.
+ -- @param o The object to examine.
+ -- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+ function isEncodable(o)
+ local t = type(o)
+ return(t == 'string' or t == 'boolean' or t == 'number' or t == 'nil' or t == 'table') or
+ (t == 'function' and o == json.null)
+ end
+
+ return json
+end
+local debugger_print = print
+local debug_server = nil
+local breakInfoSocket = nil
+local json = createJson()
+ LuaDebugger = {
+ fileMaps = {},
+ Run = true, --表示正常运行只检测断点
+ StepIn = false,
+ StepNext = false,
+ StepOut = false,
+ breakInfos = {},
+ runTimeType = nil,
+ isHook = true,
+ pathCachePaths = {},
+ isProntToConsole = 1,
+ isDebugPrint = true,
+ hookType = "lrc",
+ stepNextFun = nil,
+ DebugLuaFie = "",
+ runLineCount = 0,
+ version="1.0.4"
+
+
+}
+LuaDebugger.event = {
+ S2C_SetBreakPoints = 1,
+ C2S_SetBreakPoints = 2,
+ S2C_RUN = 3,
+ C2S_HITBreakPoint = 4,
+ S2C_ReqVar = 5,
+ C2S_ReqVar = 6,
+ --单步跳过请求
+ S2C_NextRequest = 7,
+ --单步跳过反馈
+ C2S_NextResponse = 8,
+ -- 单步跳过 结束 没有下一步
+ C2S_NextResponseOver = 9,
+ --单步跳入
+ S2C_StepInRequest = 10,
+ C2S_StepInResponse = 11,
+ --单步跳出
+ S2C_StepOutRequest = 12,
+ --单步跳出返回
+ C2S_StepOutResponse = 13,
+ --打印
+ C2S_LuaPrint = 14,
+ S2C_LoadLuaScript = 16,
+ C2S_SetSocketName = 17,
+ C2S_LoadLuaScript = 18,
+ C2S_DebugXpCall = 20,
+ S2C_DebugClose = 21
+}
+function print(...)
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=1}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintWarn( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=2}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintErr( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=3}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+----=============================工具方法=============================================
+local debug_hook = nil
+local function debugger_strSplit(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if(delimiter == '') then return false end
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+local function debugger_strTrim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+local function debugger_dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+ local lookupTable = {}
+ local result = {}
+ local function _v(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+ end
+ local traceback = debugger_strSplit(debug.traceback("", 2), "\n")
+ print("dump from: " .. debugger_strTrim(traceback[3]))
+ local function _dump(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(_v(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[# result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value))
+ elseif lookupTable[value] then
+ result[# result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc)
+ else
+ lookupTable[value] = true
+ if nest > nesting then
+ result[# result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption)
+ else
+ result[# result + 1] = string.format("%s%s = {", indent, _v(desciption))
+ local indent2 = indent .. " "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[# keys + 1] = k
+ local vk = _v(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ _dump(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[# result + 1] = string.format("%s}", indent)
+ end
+ end
+ end
+ _dump(value, desciption, "- ", 1)
+ for i, line in ipairs(result) do
+ print(line)
+ end
+end
+
+local function debugger_setVarInfo(name, value)
+ local vt = type(value)
+ local valueStr = ""
+ if(vt ~= "table") then
+ valueStr = tostring(value)
+ valueStr = ZZBase64.encode(valueStr)
+ else
+ -- valueStr = topointer(value)
+ end
+ local valueInfo = {
+ name = name,
+ valueType = vt,
+ valueStr = valueStr
+ }
+ return valueInfo;
+end
+local function debugger_getvalue(f)
+ local i = 1
+ local locals = {}
+ -- get locals
+ while true do
+ local name, value = debug.getlocal(f, i)
+ if not name then break end
+ if(name ~= "(*temporary)") then
+ locals[name] = value
+ end
+ i = i + 1
+ end
+ local func = getinfo(f, "f").func
+ i = 1
+ local ups = {}
+ while func do -- check for func as it may be nil for tail calls
+ local name, value = debug.getupvalue(func, i)
+ if not name then break end
+ ups[name] = value
+ i = i + 1
+ end
+ return {locals = locals, ups = ups}
+end
+--获取堆栈
+debugger_stackInfo = function(ignoreCount, event)
+ local datas = {}
+ local stack = {}
+ local varInfos = {}
+ local funcs = {}
+ local index = 0;
+ for i = ignoreCount, 100 do
+ local source = getinfo(i)
+ local isadd = true
+ if(i == ignoreCount) then
+ local file = source.source
+ if(file:find(LuaDebugger.DebugLuaFie)) then
+ return
+ end
+ if(file == "=[C]") then
+ isadd = false
+
+ end
+ end
+ if not source then
+ break;
+ end
+ if(isadd) then
+ local file = source.source
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local info =
+ {
+ src = file,
+ scoreName = source.name,
+ currentline = source.currentline,
+ linedefined = source.linedefined,
+ what = source.what,
+ nameWhat = source.namewhat
+ }
+ index = i
+ local vars = debugger_getvalue(i + 1)
+ table.insert(stack, info)
+ table.insert(varInfos, vars)
+ table.insert(funcs, source.func)
+ end
+ if source.what == 'main' then break end
+ end
+ local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
+ local data = {
+ stack = stackInfo.stack,
+ vars = stackInfo.vars,
+ funcs = stackInfo.funcs,
+ event = event
+ }
+ return data
+end
+--==============================工具方法 end======================================================
+--===========================点断信息==================================================
+--根据不同的游戏引擎进行定时获取断点信息
+--CCDirector:sharedDirector():getScheduler()
+local debugger_setBreak = nil
+local function debugger_receiveDebugBreakInfo()
+ if(not jit) then
+ if(_VERSION)then
+ print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!")
+ else
+ print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
+ end
+
+ end
+ if(breakInfoSocket) then
+ local msg, status = breakInfoSocket:receive()
+ if(msg) then
+ local netData = json.decode(msg)
+ if netData.event == LuaDebugger.event.S2C_SetBreakPoints then
+ debugger_setBreak(netData.data)
+ elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
+ -- print("获取数据")
+ debugger_exeLuaString(netData.data, false)
+ end
+ end
+ end
+end
+local function splitFilePath(path)
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(path, '/', pos, true) end do
+ table.insert(arr, string.sub(path, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(path, pos))
+ return arr
+end
+debugger_setBreak = function(datas)
+ local breakInfos = LuaDebugger.breakInfos
+ for i, data in ipairs(datas) do
+ local breakInfo = breakInfos[data.fileName]
+ if(not breakInfo) then
+ breakInfos[data.fileName] = {}
+ breakInfo = breakInfos[data.fileName]
+ end
+ if(not data.lines or # data.lines == 0) then
+ breakInfo[data.serverPath] = nil
+ else
+ local lineInfos = {}
+ for li, line in ipairs(data.lines) do
+ lineInfos[line] = true
+ end
+ breakInfo[data.serverPath] = {
+ pathNames = splitFilePath(data.serverPath),
+ lines = lineInfos
+ }
+ end
+ local count = 0
+ for i, linesInfo in pairs(breakInfo) do
+ count = count + 1
+ end
+ if(count == 0) then
+ breakInfos[data.fileName] = nil
+ end
+ end
+ -- debugger_dump(breakInfos, "breakInfos", 6)
+ --检查是否需要断点
+ local isHook = false
+ for k, v in pairs(breakInfos) do
+ isHook = true
+ break
+ end
+ --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次
+ if(isHook) then
+ if(not LuaDebugger.isHook) then
+ debug.sethook(debug_hook, "lrc")
+ end
+ LuaDebugger.isHook = true
+
+ else
+
+ if(LuaDebugger.isHook) then
+ debug.sethook()
+ end
+ LuaDebugger.isHook = false
+ end
+end
+local function debugger_checkFileIsBreak(fileName)
+ return LuaDebugger.breakInfos[fileName]
+end
+local function debugger_checkIsBreak(fileName, line)
+ local breakInfo = LuaDebugger.breakInfos[fileName]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = getinfo(3)
+ local source = info.source
+ source = source:gsub("\\", "/")
+ if source:find("@") == 1 then
+ source = source:sub(2);
+ if not source:find("/") then
+ source = source:gsub("%.", "/")
+ end
+ end
+ local index = source:find("%.lua")
+ if not index then
+ source = source .. ".lua"
+ end
+ local hitPathNames = splitFilePath(source)
+ local isHit = true
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+ isHit = false
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ if(# hitPathNames == 1 or(# hitPathNames > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ return hitFieName
+ end
+ end
+ end
+ return false
+end
+--=====================================断点信息 end ----------------------------------------------
+local controller_host = "192.168.1.102"
+local controller_port = 7003
+local function debugger_sendMsg(serverSocket, eventName, data)
+ local sendMsg = {
+ event = eventName,
+ data = data
+ }
+ local sendStr = json.encode(sendMsg)
+ serverSocket:send(sendStr .. "__debugger_k0204__")
+end
+--执行lua字符串
+debugger_exeLuaString = function(data, isBreakPoint)
+ local function loadScript()
+ local luastr = data.luastr
+ if(isBreakPoint) then
+ local currentTabble = {_G = _G}
+ local frameId = data.frameId
+ frameId = frameId + 1
+ local func = LuaDebugger.currentDebuggerData.funcs[frameId];
+ local vars = LuaDebugger.currentDebuggerData.vars[frameId]
+ local locals = vars.locals;
+ local ups = vars.ups
+ for k, v in pairs(ups) do
+ currentTabble[k] = v
+ end
+ for k, v in pairs(locals) do
+ currentTabble[k] = v
+ end
+ setmetatable(currentTabble, {__index = _G})
+ local fun = loadstring(luastr)
+ setfenv(fun, currentTabble)
+ fun()
+ else
+ local fun = loadstring(luastr)
+ fun()
+ end
+ end
+ local status, msg = xpcall(loadScript, function(error)
+ print(error)
+ end)
+ if(status) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "执行代码成功"})
+ if(isBreakPoint) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_HITBreakPoint, LuaDebugger.currentDebuggerData.stack)
+ end
+ else
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "加载代码失败"})
+ end
+end
+local function getLuaFileName(str)
+ local pos = 0
+ local fileName = "";
+ -- for each divider found
+ for st, sp in function() return string.find(str, '/', pos, true) end do
+ pos = sp + 1
+ end
+ fileName = string.sub(str, pos)
+ return fileName;
+end
+local function getSource(source)
+ if(LuaDebugger.pathCachePaths[source]) then
+ return LuaDebugger.pathCachePaths[source]
+ end
+ local file = source
+ file = file:gsub("\\", "/")
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local index = file:find("%.lua")
+ if not index then
+ file = file .. ".lua"
+ end
+ file = getLuaFileName(file)
+ LuaDebugger.pathCachePaths[source] = file
+ return file;
+end
+local function debugger_GeVarInfoBytUserData(server,var,variablesReference,debugSpeedIndex)
+ local fileds = LuaDebugTool.getUserDataInfo(var)
+
+ local varInfos = {}
+ if(tolua) then
+ local luavars = tolua.getpeer(vars)
+ if(luavars) then
+ for k, v in pairs(luavars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(varInfos, vinfo)
+ end
+ end
+ end
+
+ --c# vars
+ for i=1,fileds.Count do
+ local filed = fileds[i-1]
+ local valueInfo = {
+ name = filed.name,
+ valueType = filed.valueType,
+ valueStr = ZZBase64.encode(filed.valueStr),
+ isValue = filed.isValue
+ }
+
+ table.insert( varInfos,valueInfo)
+
+ end
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = varInfos,
+ isComplete = 1
+ })
+end
+--获取lua 变量的方法
+local function debugger_getBreakVar(body, server)
+ local variablesReference = body.variablesReference
+ local debugSpeedIndex = body.debugSpeedIndex
+ local vinfos = {}
+ local function exe()
+
+ local frameId = body.frameId;
+ local type_ = body.type;
+ local keys = body.keys;
+ --找到对应的var
+ local vars = nil
+ if(type_ == 1) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.locals
+ elseif(type_ == 2) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.ups
+ elseif(type_ == 3) then
+ vars = _G
+ end
+
+ --特殊处理下
+ for i, v in ipairs(keys) do
+ local start_m = string.sub(v,1,1)
+ if(start_m == "[") then
+ local len = string.len( v )
+ local end_m = string.sub(v,len,len)
+ if(end_m == "]") then
+ v = string.sub(v,2,len-1);
+ end
+ vars = vars[v]
+ else
+ vars = vars[v]
+ end
+ if(type(vars) == "userdata" and tolua ~= nil and LuaDebugTool == nil) then
+ vars = tolua.getpeer(vars)
+ end
+ if(vars == nil) then
+ break;
+ end
+ end
+
+if(varType == "userdata" ) then
+ if(LuaDebugTool) then
+ debugger_GeVarInfoBytUserData(server,vars,variablesReference,debugSpeedIndex)
+ return;
+ elseif(tolua == nil) then
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ return
+ end
+ end
+
+ local count = 0;
+ if(vars ~= nil) then
+ for k, v in pairs(vars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(vinfos, vinfo)
+ if(# vinfos > 10) then
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 0
+ })
+ vinfos = {}
+ end
+ end
+ end
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ end
+ xpcall(exe, function(error)
+ print("获取变量错误 错误消息-----------------")
+ print(error)
+ print(debug.traceback("", 2))
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = {
+ {
+ name ="error",
+ valueType = "string",
+ valueStr = ZZBase64.encode("无法获取属性值"),
+ isValue = false
+ }
+ },
+ isComplete = 1
+ })
+ end)
+end
+local function ResetDebugInfo()
+ LuaDebugger.Run = false
+ LuaDebugger.StepIn = false
+ LuaDebugger.StepNext = false
+ LuaDebugger.StepOut = false
+end
+local function debugger_loop(server)
+ server = debug_server
+ --命令
+ local command
+ local eval_env = {}
+ local arg
+ while true do
+ local line, status,tempaaa = server:receive()
+
+ if(status == "closed") then
+ debug.sethook()
+ coroutine.yield()
+ end
+ if(line) then
+ local netData = json.decode(line)
+ local event = netData.event;
+ local body = netData.data;
+ if(event == LuaDebugger.event.S2C_DebugClose) then
+ debug.sethook()
+ coroutine.yield()
+
+ elseif event == LuaDebugger.event.S2C_SetBreakPoints then --设置断点信息
+
+ local function setB()
+ debugger_setBreak(body)
+ end
+ xpcall(setB, function(error)
+ print(error)
+ end)
+ elseif event == LuaDebugger.event.S2C_RUN then --开始运行
+
+ LuaDebugger.runTimeType = body.runTimeType
+ LuaDebugger.isProntToConsole = body.isProntToConsole
+
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+
+ local data = coroutine.yield()
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息
+ --请求数据信息
+ debugger_getBreakVar(body, server)
+ elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过
+
+
+ ResetDebugInfo()
+ LuaDebugger.StepNext = true
+
+
+ --设置当前文件名和当前行数
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif(event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入
+ --单步跳入
+ ResetDebugInfo();
+ LuaDebugger.StepIn = true
+
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif(event == LuaDebugger.event.S2C_StepOutRequest) then
+ --单步跳出
+ ResetDebugInfo()
+ LuaDebugger.StepOut = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif event == LuaDebugger.event.S2C_LoadLuaScript then
+ debugger_exeLuaString(body, true)
+ end
+ end
+ end
+end
+coro_debugger = coroutine.create(debugger_loop)
+debug_hook = function(event, line)
+ local file = nil
+ if(event == "line") then
+ local funs = nil
+ local funlength =0
+ if(LuaDebugger.currentDebuggerData) then
+ funs = LuaDebugger.currentDebuggerData.funcs
+ funlength = #funs
+ end
+ local stepInfo = getinfo(2)
+ local tempFunc = stepInfo.func
+ local source = stepInfo.source
+ file = getSource(source);
+ if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
+ if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
+ LuaDebugger.runLineCount = LuaDebugger.runLineCount+1
+ end
+ if(LuaDebugger.StepOut) then
+ if(funlength == 1) then
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+ return
+ else
+ if(funs[2] == tempFunc) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ -- print("StepIn 挂起")
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ end
+ end
+ if(LuaDebugger.StepIn) then
+ if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
+ return
+ end
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ -- print("StepIn 挂起")
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ if(LuaDebugger.StepNext ) then
+ if(LuaDebugger.currentLine == line) then
+ return
+ end
+ if(funs) then
+ if(funs[1] ~= tempFunc) then
+ --判断是否是和下一个fun 相同如果相同
+ if(funlength >1) then
+ if(funs[2] == tempFunc) then
+ else
+ return
+ end
+ else
+ return
+ end
+ end
+ end
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ LuaDebugger.runLineCount = 0
+ LuaDebugger.currentLine = line
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ local isHit = false
+ local sevent = nil
+ --断点判断
+ if(isHit == false and debugger_checkIsBreak(file, line)) then
+ if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
+ LuaDebugger.runLineCount = 0
+ return
+ end
+ LuaDebugger.runLineCount = 0
+ LuaDebugger.currentLine = line
+ isHit = true
+ sevent = LuaDebugger.event.C2S_HITBreakPoint
+ --调用 coro_debugger 并传入 参数
+ local data = debugger_stackInfo(3, sevent)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+end
+local function debugger_xpcall()
+ --调用 coro_debugger 并传入 参数
+
+ local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+end
+--调试开始
+local function start()
+
+ local socket = createSocket()
+ print(controller_host)
+ print(controller_port)
+
+
+ local server = socket.connect(controller_host, controller_port)
+ debug_server = server;
+ if server then
+ --创建breakInfo socket
+ socket = createSocket()
+ breakInfoSocket = socket.connect(controller_host, controller_port)
+ if(breakInfoSocket) then
+ breakInfoSocket:settimeout(0)
+ debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
+ name = "breakPointSocket"
+ })
+
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, {
+ name = "mainSocket",
+ version = LuaDebugger.version
+ })
+ xpcall(function()
+ sethook(debug_hook, "lrc")
+ end, function(error)
+ print("error:", error)
+ end)
+ if(not jit) then
+ if(_VERSION)then
+ print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!")
+ else
+ print("当前为lua版本,请使用LuaDebug 进行调试!")
+ end
+
+ end
+ coroutine.resume(coro_debugger, server)
+ end
+ end
+end
+function StartDebug(host, port)
+
+
+ LuaDebugger.DebugLuaFie = getLuaFileName(getinfo(1).source)
+ local index = LuaDebugger.DebugLuaFie:find("%.lua")
+ if index then
+ local fileNameLength = string.len(LuaDebugger.DebugLuaFie)
+ LuaDebugger.DebugLuaFie = LuaDebugger.DebugLuaFie:sub(1,fileNameLength-4)
+
+ end
+ if(not host) then
+ print("error host nil")
+ end
+ if(not port) then
+ print("error prot nil")
+ end
+ if(type(host) ~= "string") then
+ print("error host not string")
+ end
+ if(type(port) ~= "number") then
+ print("error host not number")
+ end
+ controller_host = host
+ controller_port = port
+ xpcall(start, function(error)
+ -- body
+ print(error)
+ end)
+ return debugger_receiveDebugBreakInfo, debugger_xpcall
+end
+
+
+--base64
+
+local string = string
+
+ZZBase64.__code = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
+ };
+ZZBase64.__decode = {}
+for k,v in pairs(ZZBase64.__code) do
+ ZZBase64.__decode[string.byte(v,1)] = k - 1
+end
+
+function ZZBase64.encode(text)
+ local len = string.len(text)
+ local left = len % 3
+ len = len - left
+ local res = {}
+ local index = 1
+ for i = 1, len, 3 do
+ local a = string.byte(text, i )
+ local b = string.byte(text, i + 1)
+ local c = string.byte(text, i + 2)
+ -- num = a<<16 + b<<8 + c
+ local num = a * 65536 + b * 256 + c
+ for j = 1, 4 do
+ --tmp = num >> ((4 -j) * 6)
+ local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
+ --curPos = tmp&0x3f
+ local curPos = tmp % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+ index = index + 1
+ end
+ end
+
+ if left == 1 then
+ ZZBase64.__left1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__left2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__left2(res, index, text, len)
+ local num1 = string.byte(text, len + 1)
+ num1 = num1 * 1024 --lshift 10
+ local num2 = string.byte(text, len + 2)
+ num2 = num2 * 4 --lshift 2
+ local num = num1 + num2
+
+ local tmp1 = math.floor(num / 4096) --rShift 12
+ local curPos = tmp1 % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+
+ local tmp2 = math.floor(num / 64)
+ curPos = tmp2 % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 2] = ZZBase64.__code[curPos]
+
+ res[index + 3] = "="
+end
+
+function ZZBase64.__left1(res, index,text, len)
+ local num = string.byte(text, len + 1)
+ num = num * 16
+
+ local tmp = math.floor(num / 64)
+ local curPos = tmp % 64 + 1
+ res[index ] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ res[index + 2] = "="
+ res[index + 3] = "="
+end
+
+function ZZBase64.decode(text)
+ local len = string.len(text)
+ local left = 0
+ if string.sub(text, len - 1) == "==" then
+ left = 2
+ len = len - 4
+ elseif string.sub(text, len) == "=" then
+ left = 1
+ len = len - 4
+ end
+
+ local res = {}
+ local index = 1
+ local decode = ZZBase64.__decode
+ for i =1, len, 4 do
+ local a = decode[string.byte(text,i )]
+ local b = decode[string.byte(text,i + 1)]
+ local c = decode[string.byte(text,i + 2)]
+ local d = decode[string.byte(text,i + 3)]
+
+ --num = a<<18 + b<<12 + c<<6 + d
+ local num = a * 262144 + b * 4096 + c * 64 + d
+
+ local e = string.char(num % 256)
+ num = math.floor(num / 256)
+ local f = string.char(num % 256)
+ num = math.floor(num / 256)
+ res[index ] = string.char(num % 256)
+ res[index + 1] = f
+ res[index + 2] = e
+ index = index + 3
+ end
+
+ if left == 1 then
+ ZZBase64.__decodeLeft1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__decodeLeft2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__decodeLeft1(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local c = decode[string.byte(text, len + 3)]
+ local num = a * 4096 + b * 64 + c
+
+ local num1 = math.floor(num / 1024) % 256
+ local num2 = math.floor(num / 4) % 256
+ res[index] = string.char(num1)
+ res[index + 1] = string.char(num2)
+end
+
+function ZZBase64.__decodeLeft2(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local num = a * 64 + b
+ num = math.floor(num / 16)
+ res[index] = string.char(num)
+end
+return StartDebug
diff --git a/simulator/win32/src/app/MyApp.lua b/simulator/win32/src/app/MyApp.lua
new file mode 100644
index 0000000..e8d1a9f
--- /dev/null
+++ b/simulator/win32/src/app/MyApp.lua
@@ -0,0 +1,8 @@
+
+local MyApp = class("MyApp", cc.load("mvc").AppBase)
+
+function MyApp:onCreate()
+ math.randomseed(os.time())
+end
+
+return MyApp
diff --git a/simulator/win32/src/app/views/MainScene.lua b/simulator/win32/src/app/views/MainScene.lua
new file mode 100644
index 0000000..f494f2a
--- /dev/null
+++ b/simulator/win32/src/app/views/MainScene.lua
@@ -0,0 +1,47 @@
+
+local MainScene = class("MainScene", cc.load("mvc").ViewBase)
+
+local pukeEffect = import(".pokerEffects")
+
+--MainScene.RESOURCE_FILENAME = "MainScene.csb"
+
+function MainScene:onCreate()
+ printf("resource node = %s", tostring(self:getResourceNode()))
+
+ -- you can create scene with following comment code instead of using csb file.
+ -- add background image
+ -- display.newSprite("HelloWorld.png")
+ -- :move(display.center)
+ -- :addTo(self)
+
+ -- -- add HelloWorld label
+ -- local s = cc.Label:createWithSystemFont("Hello World", "Arial", 60)
+ -- :move(display.cx, display.cy + 200)
+ -- :addTo(self)
+
+ -- self:cutpuc("vsc.png",s,function( path )
+ -- -- body
+ -- end)
+
+ local pukeLayer = pukeEffect("paibei.png","1.png")
+ pukeLayer:addTo(self)
+
+end
+
+
+function MainScene:cutpuc(path,node,call_func)
+ local size = node:getContentSize()
+ local _render_texture = cc.RenderTexture:create(size.width,size.height)
+ local x,y = node:getPosition()
+ --node:setPosition(0,0)
+ _render_texture:beginWithClear(0,0,0,0)
+ node:visit()
+ _render_texture:endToLua()
+ node:setPosition(x,y)
+ _render_texture:saveToFile(path,cc.IMAGE_FORMAT_PNG,true,function(_save)
+ Log.d("render texture save succeed:".._save)
+ call_func(_save)
+ end)
+end
+
+return MainScene
diff --git a/simulator/win32/src/app/views/pokerEffects.lua b/simulator/win32/src/app/views/pokerEffects.lua
new file mode 100644
index 0000000..0bcb985
--- /dev/null
+++ b/simulator/win32/src/app/views/pokerEffects.lua
@@ -0,0 +1,263 @@
+-- date:2017/9/26
+-- author:looyer
+-- purpose:3D搓牌效果层,
+
+-- 顶点着色器
+local strVertSource =
+[[
+attribute vec4 a_position;
+attribute vec2 a_texCoord;
+attribute vec4 a_color;
+
+uniform float ratio; //牌初始状态到搓牌最终位置的完成度比例
+uniform float radius; //搓牌类似于绕圆柱滚起,其圆柱的半径
+uniform float width;
+uniform float finish; //是否完成搓牌
+
+uniform float offx;
+uniform float offy;
+
+varying vec4 v_fragmentColor;
+varying vec2 v_texCoord;
+
+void main()
+{
+ //注意OpenGL-ES中:1.attribute修饰的变量是常量。2.没有自动转类型float a = 1;或者5.0/3都是错误的
+
+ //这两个问题改了两天,可以通过修改CPP代码,打印log来调试cocos2dx程序
+ vec4 tmp_pos = a_position;
+
+ //顺时针旋转90度
+ tmp_pos = vec4(tmp_pos.y, -tmp_pos.x, tmp_pos.z, tmp_pos.w);
+
+ if(finish > 0.5) {
+ tmp_pos = vec4(tmp_pos.x, -width - tmp_pos.y, tmp_pos.z, tmp_pos.w);
+
+ }else {
+ //计算卡牌弯曲的位置,类似于卡牌绕圆柱卷起的原理
+
+ float halfPeri = radius * 3.14159; //半周长
+ float hr = halfPeri * ratio;
+ if(tmp_pos.y < -width + hr) {
+ float dy = -tmp_pos.y - (width - hr);
+ float arc = dy/radius;
+ tmp_pos.y = -width + hr - sin(arc)*radius;
+ tmp_pos.z = radius * (1.0-cos(arc)); //注意之前这里是1,是错误的,opengles不自动类型转换
+ }
+ }
+
+
+ tmp_pos += vec4(offx, offy, 0.0, 0.0);
+
+ gl_Position = CC_MVPMatrix * tmp_pos;
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+}
+]]
+
+-- 片段着色器
+local strFragSource =
+[[
+varying vec4 v_fragmentColor;
+varying vec2 v_texCoord;
+
+void main()
+{
+ //TODO, 这里可以做些片段着色特效
+
+ gl_FragColor = texture2D(CC_Texture0, v_texCoord);
+}
+]]
+
+-- 通过图片取得纹理id,和该纹理在plist图中的纹理坐标范围
+local function getTextureAndRange(szImage)
+ -- local FrameCache = cc.SpriteFrameCache:getInstance()
+ -- local sprite = FrameCache:getSpriteFrameByName(szImage)
+ local sprite = cc.Sprite:create(szImage)
+ local rect = sprite:getTextureRect()
+ local tex = sprite:getTexture()
+ local id = tex:getName() --纹理ID
+ local bigWide = tex:getPixelsWide() --plist图集的宽度
+ local bigHigh = tex:getPixelsHigh()
+
+ -- 左右上下的纹理范围
+ local ll, rr, tt, bb = rect.x/bigWide, (rect.x + rect.width)/bigWide, rect.y/bigHigh, (rect.y + rect.height)/bigHigh
+ return id, {ll, rr, tt, bb}, {rect.width, rect.height}
+end
+
+-- 创建3D牌面,所需的顶点和纹理数据, size:宽高, texRange:纹理范围, bFront:是否正面
+local function initCardVertex(size, texRange, bFront)
+ local nDiv = 200 --将宽分成100份
+
+ local verts = {} --位置坐标
+ local texs = {} --纹理坐标
+ local dh = size.height
+ local dw = size.width/nDiv
+
+ --计算顶点位置
+ for c = 1, nDiv do
+ local x, y = (c-1)*dw, 0
+ local quad = {}
+ if bFront then
+ quad = {x, y, x+dw, y, x, y+dh, x+dw, y, x+dw, y+dh, x, y+dh}
+ else
+ quad = {x, y, x, y+dh, x+dw, y, x+dw, y, x, y+dh, x+dw, y+dh}
+ end
+ for _, v in ipairs(quad) do table.insert(verts, v) end
+ end
+
+ local bXTex = true --是否当前在计算横坐标纹理坐标,
+ for _, v in ipairs(verts) do
+ if bXTex then
+ if bFront then
+ table.insert(texs, v/size.width * (texRange[2] - texRange[1]) + texRange[1])
+ else
+ table.insert(texs, v/size.width * (texRange[1] - texRange[2]) + texRange[2])
+ end
+ else
+ if bFront then
+ table.insert(texs, (1-v/size.height) * (texRange[4] - texRange[3]) + texRange[3])
+ else
+ table.insert(texs, v/size.height * (texRange[3] - texRange[4]) + texRange[4])
+ end
+ end
+ bXTex = not bXTex
+ end
+
+ local res = {}
+ local tmp = {verts, texs}
+ for _, v in ipairs(tmp) do
+ local buffid = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffid)
+ gl.bufferData(gl.ARRAY_BUFFER, table.getn(v), v, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ table.insert(res, buffid)
+ end
+ return res, #verts
+end
+
+-- 创建搓牌效果层, pList:图片合集.plist文件, szBack:牌背面图片名, szFont:牌正面图片名, 注意:默认传入的牌在plist文件中是竖直的, scale缩放比
+local function createRubCardEffectLayer(--[[pList,]] szBack, szFont, scale)
+ scale = scale or 1.0
+
+ --预加载pList图集(注重复添加没关系,只会保存一份)
+-- local FrameCache = cc.SpriteFrameCache:getInstance()
+-- FrameCache:addSpriteFrames(pList)
+
+ -- 取得屏幕宽高
+ local Director = cc.Director:getInstance()
+ local WinSize = Director:getWinSize()
+
+ -- 创建广角60度,视口宽高比是屏幕宽高比,近平面1.0,远平面1000.0,的视景体
+ local camera = cc.Camera:createPerspective(45, WinSize.width/WinSize.height, 1, 1000)
+ camera:setCameraFlag(cc.CameraFlag.USER2)
+ --设置摄像机的绘制顺序,越大的深度越绘制的靠上,所以默认摄像机默认是0,其他摄像机默认是1, 这句很重要!!
+ camera:setDepth(1)
+ camera:setPosition3D(cc.vec3(0, 0, 800))
+ camera:lookAt(cc.vec3(0, 0, 0), cc.vec3(0, 1, 0))
+
+ -- 创建用于OpenGL绘制的节点
+ local glNode = gl.glNodeCreate()
+ local glProgram = cc.GLProgram:createWithByteArrays(strVertSource, strFragSource)
+ glProgram:retain()
+ glProgram:updateUniforms()
+
+ -- 创建搓牌图层
+ local layer = cc.Layer:create()
+ layer:setCameraMask(cc.CameraFlag.USER2)
+ layer:addChild(glNode)
+ layer:addChild(camera)
+
+ -- 退出时,释放glProgram程序
+ local function onNodeEvent(event)
+ if "exit" == event then
+ glProgram:release()
+ end
+ end
+ layer:registerScriptHandler(onNodeEvent)
+
+ local posNow = cc.p(0, 0)
+ --创建触摸回调
+ local function touchBegin(touch, event)
+ posNow = touch:getLocation()
+ return true
+ end
+ local function touchMove(touch, event)
+ local location = touch:getLocation()
+ local dy = location.y - posNow.y
+
+ layer.ratioVal = cc.clampf(layer.ratioVal + dy/100, 0.0, 0.9) --最大程度默认0.9
+ posNow = location
+ return true
+ end
+ local function touchEnd(touch, event)
+ layer.ratioVal = 0.0
+ return true
+ end
+ local listener = cc.EventListenerTouchOneByOne:create()
+ listener:registerScriptHandler(touchBegin, cc.Handler.EVENT_TOUCH_BEGAN )
+ listener:registerScriptHandler(touchMove, cc.Handler.EVENT_TOUCH_MOVED )
+ listener:registerScriptHandler(touchEnd, cc.Handler.EVENT_TOUCH_ENDED )
+ local eventDispatcher = layer:getEventDispatcher()
+ eventDispatcher:addEventListenerWithSceneGraphPriority(listener, layer)
+
+ --创建牌的背面
+ local id1, texRange1, sz1 = getTextureAndRange(szBack)
+ local msh1, nVerts1 = initCardVertex(cc.size(sz1[1] * scale, sz1[2] * scale), texRange1, true)
+ --创建牌的正面
+ local id2, texRange2, sz2 = getTextureAndRange(szFont)
+ local msh2, nVerts2 = initCardVertex(cc.size(sz2[1] * scale, sz2[2] * scale), texRange2, false)
+
+ --搓牌的程度控制, 搓牌类似于通过一个圆柱滚动将牌粘着起来的效果。下面的参数就是滚动程度和圆柱半径
+ layer.ratioVal = 0.0
+ layer.radiusVal = sz1[1]*scale/math.pi;
+
+ --牌的渲染信息
+ local cardMesh = {{id1, msh1, nVerts1}, {id2, msh2, nVerts2}}
+ -- OpenGL绘制函数
+ local function draw(transform, transformUpdated)
+ gl.enable(gl.CULL_FACE)
+ glProgram:use()
+ glProgram:setUniformsForBuiltins()
+
+ for _, v in ipairs(cardMesh) do
+ gl.bindTexture(gl.TEXTURE_2D, v[1])
+
+ -- 传入搓牌程度到着色器中,进行位置计算
+ local ratio = gl.getUniformLocation(glProgram:getProgram(), "ratio")
+ glProgram:setUniformLocationF32(ratio, layer.ratioVal)
+ local radius = gl.getUniformLocation(glProgram:getProgram(), "radius")
+ glProgram:setUniformLocationF32(radius, layer.radiusVal)
+
+ -- 偏移牌,使得居中
+ local offx = gl.getUniformLocation(glProgram:getProgram(), "offx")
+ glProgram:setUniformLocationF32(offx, WinSize.width/2 - sz1[2]/2*scale)
+ local offy = gl.getUniformLocation(glProgram:getProgram(), "offy")
+ glProgram:setUniformLocationF32(offy, WinSize.height/2 + sz1[1]/2*scale)
+
+ local width = gl.getUniformLocation(glProgram:getProgram(), "width")
+ glProgram:setUniformLocationF32(width, sz1[1]*scale)
+ local progress = 0
+ if layer.ratioVal > 0.8 then
+ progress = 1
+ end
+ print("Pregress"..progress)
+ local width = gl.getUniformLocation(glProgram:getProgram(), "finish")
+ glProgram:setUniformLocationF32(finish,progress)
+
+ gl.glEnableVertexAttribs(bit._or(cc.VERTEX_ATTRIB_FLAG_TEX_COORDS, cc.VERTEX_ATTRIB_FLAG_POSITION))
+ gl.bindBuffer(gl.ARRAY_BUFFER, v[2][1])
+ gl.vertexAttribPointer(cc.VERTEX_ATTRIB_POSITION,2,gl.FLOAT,false,0,0)
+ gl.bindBuffer(gl.ARRAY_BUFFER, v[2][2])
+ gl.vertexAttribPointer(cc.VERTEX_ATTRIB_TEX_COORD,2,gl.FLOAT,false,0,0)
+ gl.drawArrays(gl.TRIANGLES, 0, v[3])
+ end
+ gl.bindTexture(gl.TEXTURE_2D, 0)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+ glNode:registerScriptDrawHandler(draw)
+
+ return layer
+end
+
+return createRubCardEffectLayer
\ No newline at end of file
diff --git a/simulator/win32/src/cocos/3d/3dConstants.lua b/simulator/win32/src/cocos/3d/3dConstants.lua
new file mode 100644
index 0000000..cd0d602
--- /dev/null
+++ b/simulator/win32/src/cocos/3d/3dConstants.lua
@@ -0,0 +1,16 @@
+if nil == cc.Terrain then
+ return
+end
+
+cc.Terrain.CrackFixedType =
+{
+ SKIRT = 0,
+ INCREASE_LOWER = 1,
+}
+
+cc.Animate3DQuality =
+{
+ QUALITY_NONE = 0,
+ QUALITY_LOW = 1,
+ QUALITY_HIGH = 2,
+}
diff --git a/simulator/win32/src/cocos/cocos2d/Cocos2d.lua b/simulator/win32/src/cocos/cocos2d/Cocos2d.lua
new file mode 100644
index 0000000..6b451c3
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/Cocos2d.lua
@@ -0,0 +1,580 @@
+
+cc = cc or {}
+
+function cc.clampf(value, min_inclusive, max_inclusive)
+ -- body
+ local temp = 0
+ if min_inclusive > max_inclusive then
+ temp = min_inclusive
+ min_inclusive = max_inclusive
+ max_inclusive = temp
+ end
+
+ if value < min_inclusive then
+ return min_inclusive
+ elseif value < max_inclusive then
+ return value
+ else
+ return max_inclusive
+ end
+end
+
+--Point
+function cc.p(_x,_y)
+ if nil == _y then
+ return { x = _x.x, y = _x.y }
+ else
+ return { x = _x, y = _y }
+ end
+end
+
+function cc.pAdd(pt1,pt2)
+ return {x = pt1.x + pt2.x , y = pt1.y + pt2.y }
+end
+
+function cc.pSub(pt1,pt2)
+ return {x = pt1.x - pt2.x , y = pt1.y - pt2.y }
+end
+
+function cc.pMul(pt1,factor)
+ return { x = pt1.x * factor , y = pt1.y * factor }
+end
+
+function cc.pMidpoint(pt1,pt2)
+ return { x = (pt1.x + pt2.x) / 2.0 , y = ( pt1.y + pt2.y) / 2.0 }
+end
+
+function cc.pForAngle(a)
+ return { x = math.cos(a), y = math.sin(a) }
+end
+
+function cc.pGetLength(pt)
+ return math.sqrt( pt.x * pt.x + pt.y * pt.y )
+end
+
+function cc.pNormalize(pt)
+ local length = cc.pGetLength(pt)
+ if 0 == length then
+ return { x = 1.0,y = 0.0 }
+ end
+
+ return { x = pt.x / length, y = pt.y / length }
+end
+
+function cc.pCross(self,other)
+ return self.x * other.y - self.y * other.x
+end
+
+function cc.pDot(self,other)
+ return self.x * other.x + self.y * other.y
+end
+
+function cc.pToAngleSelf(self)
+ return math.atan2(self.y, self.x)
+end
+
+function cc.pGetAngle(self,other)
+ local a2 = cc.pNormalize(self)
+ local b2 = cc.pNormalize(other)
+ local angle = math.atan2(cc.pCross(a2, b2), cc.pDot(a2, b2) )
+ if math.abs(angle) < 1.192092896e-7 then
+ return 0.0
+ end
+
+ return angle
+end
+
+function cc.pGetDistance(startP,endP)
+ return cc.pGetLength(cc.pSub(startP,endP))
+end
+
+function cc.pIsLineIntersect(A, B, C, D, s, t)
+ if ((A.x == B.x) and (A.y == B.y)) or ((C.x == D.x) and (C.y == D.y))then
+ return false, s, t
+ end
+
+ local BAx = B.x - A.x
+ local BAy = B.y - A.y
+ local DCx = D.x - C.x
+ local DCy = D.y - C.y
+ local ACx = A.x - C.x
+ local ACy = A.y - C.y
+
+ local denom = DCy * BAx - DCx * BAy
+ s = DCx * ACy - DCy * ACx
+ t = BAx * ACy - BAy * ACx
+
+ if (denom == 0) then
+ if (s == 0 or t == 0) then
+ return true, s , t
+ end
+
+ return false, s, t
+ end
+
+ s = s / denom
+ t = t / denom
+
+ return true,s,t
+end
+
+function cc.pPerp(pt)
+ return { x = -pt.y, y = pt.x }
+end
+
+function cc.RPerp(pt)
+ return { x = pt.y, y = -pt.x }
+end
+
+function cc.pProject(pt1, pt2)
+ return { x = pt2.x * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) , y = pt2.y * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) }
+end
+
+function cc.pRotate(pt1, pt2)
+ return { x = pt1.x * pt2.x - pt1.y * pt2.y, y = pt1.x * pt2.y + pt1.y * pt2.x }
+end
+
+function cc.pUnrotate(pt1, pt2)
+ return { x = pt1.x * pt2.x + pt1.y * pt2.y, pt1.y * pt2.x - pt1.x * pt2.y }
+end
+--Calculates the square length of pt
+function cc.pLengthSQ(pt)
+ return cc.pDot(pt,pt)
+end
+--Calculates the square distance between pt1 and pt2
+function cc.pDistanceSQ(pt1,pt2)
+ return cc.pLengthSQ(cc.pSub(pt1,pt2))
+end
+
+function cc.pGetClampPoint(pt1,pt2,pt3)
+ return { x = cc.clampf(pt1.x, pt2.x, pt3.x), y = cc.clampf(pt1.y, pt2.y, pt3.y) }
+end
+
+function cc.pFromSize(sz)
+ return { x = sz.width, y = sz.height }
+end
+
+function cc.pLerp(pt1,pt2,alpha)
+ return cc.pAdd(cc.pMul(pt1, 1.0 - alpha), cc.pMul(pt2,alpha) )
+end
+
+function cc.pFuzzyEqual(pt1,pt2,variance)
+ if (pt1.x - variance <= pt2.x) and (pt2.x <= pt1.x + variance) and (pt1.y - variance <= pt2.y) and (pt2.y <= pt1.y + variance) then
+ return true
+ else
+ return false
+ end
+end
+
+function cc.pRotateByAngle(pt1, pt2, angle)
+ return cc.pAdd(pt2, cc.pRotate( cc.pSub(pt1, pt2),cc.pForAngle(angle)))
+end
+
+function cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
+ local s,t,ret = 0,0,false
+ ret,s,t =cc.pIsLineIntersect(pt1, pt2, pt3, pt4,s,t)
+
+ if ret and s >= 0.0 and s <= 1.0 and t >= 0.0 and t <= 1.0 then
+ return true
+ end
+
+ return false
+end
+
+function cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
+ local s,t, ret = 0,0,false
+ ret,s,t = cc.pIsLineIntersect(pt1,pt2,pt3,pt4,s,t)
+ if ret then
+ return cc.p(pt1.x + s * (pt2.x - pt1.x), pt1.y + s * (pt2.y - pt1.y))
+ else
+ return cc.p(0,0)
+ end
+end
+--Size
+function cc.size( _width,_height )
+ return { width = _width, height = _height }
+end
+
+--Rect
+function cc.rect(_x,_y,_width,_height)
+ return { x = _x, y = _y, width = _width, height = _height }
+end
+
+function cc.rectEqualToRect(rect1,rect2)
+ if ((rect1.x >= rect2.x) or (rect1.y >= rect2.y) or
+ ( rect1.x + rect1.width <= rect2.x + rect2.width) or
+ ( rect1.y + rect1.height <= rect2.y + rect2.height)) then
+ return false
+ end
+
+ return true
+end
+
+function cc.rectGetMaxX(rect)
+ return rect.x + rect.width
+end
+
+function cc.rectGetMidX(rect)
+ return rect.x + rect.width / 2.0
+end
+
+function cc.rectGetMinX(rect)
+ return rect.x
+end
+
+function cc.rectGetMaxY(rect)
+ return rect.y + rect.height
+end
+
+function cc.rectGetMidY(rect)
+ return rect.y + rect.height / 2.0
+end
+
+function cc.rectGetMinY(rect)
+ return rect.y
+end
+
+function cc.rectContainsPoint( rect, point )
+ local ret = false
+
+ if (point.x >= rect.x) and (point.x <= rect.x + rect.width) and
+ (point.y >= rect.y) and (point.y <= rect.y + rect.height) then
+ ret = true
+ end
+
+ return ret
+end
+
+function cc.rectIntersectsRect( rect1, rect2 )
+ local intersect = not ( rect1.x > rect2.x + rect2.width or
+ rect1.x + rect1.width < rect2.x or
+ rect1.y > rect2.y + rect2.height or
+ rect1.y + rect1.height < rect2.y )
+
+ return intersect
+end
+
+function cc.rectUnion( rect1, rect2 )
+ local rect = cc.rect(0, 0, 0, 0)
+ rect.x = math.min(rect1.x, rect2.x)
+ rect.y = math.min(rect1.y, rect2.y)
+ rect.width = math.max(rect1.x + rect1.width, rect2.x + rect2.width) - rect.x
+ rect.height = math.max(rect1.y + rect1.height, rect2.y + rect2.height) - rect.y
+ return rect
+end
+
+function cc.rectIntersection( rect1, rect2 )
+ local intersection = cc.rect(
+ math.max(rect1.x, rect2.x),
+ math.max(rect1.y, rect2.y),
+ 0, 0)
+
+ intersection.width = math.min(rect1.x + rect1.width, rect2.x + rect2.width) - intersection.x
+ intersection.height = math.min(rect1.y + rect1.height, rect2.y + rect2.height) - intersection.y
+ return intersection
+end
+
+--Color3B
+function cc.c3b( _r,_g,_b )
+ return { r = _r, g = _g, b = _b }
+end
+
+--Color4B
+function cc.c4b( _r,_g,_b,_a )
+ return { r = _r, g = _g, b = _b, a = _a }
+end
+
+--Color4F
+function cc.c4f( _r,_g,_b,_a )
+ return { r = _r, g = _g, b = _b, a = _a }
+end
+
+local function isFloatColor(c)
+ return (c.r <= 1 and c.g <= 1 and c.b <= 1) and (math.ceil(c.r) ~= c.r or math.ceil(c.g) ~= c.g or math.ceil(c.b) ~= c.b)
+end
+
+function cc.convertColor(input, typ)
+ assert(type(input) == "table" and input.r and input.g and input.b, "cc.convertColor() - invalid input color")
+ local ret
+ if typ == "3b" then
+ if isFloatColor(input) then
+ ret = {r = math.ceil(input.r * 255), g = math.ceil(input.g * 255), b = math.ceil(input.b * 255)}
+ else
+ ret = {r = input.r, g = input.g, b = input.b}
+ end
+ elseif typ == "4b" then
+ if isFloatColor(input) then
+ ret = {r = math.ceil(input.r * 255), g = math.ceil(input.g * 255), b = math.ceil(input.b * 255)}
+ else
+ ret = {r = input.r, g = input.g, b = input.b}
+ end
+ if input.a then
+ if math.ceil(input.a) ~= input.a or input.a >= 1 then
+ ret.a = input.a * 255
+ else
+ ret.a = input.a
+ end
+ else
+ ret.a = 255
+ end
+ elseif typ == "4f" then
+ if isFloatColor(input) then
+ ret = {r = input.r, g = input.g, b = input.b}
+ else
+ ret = {r = input.r / 255, g = input.g / 255, b = input.b / 255}
+ end
+ if input.a then
+ if math.ceil(input.a) ~= input.a or input.a >= 1 then
+ ret.a = input.a
+ else
+ ret.a = input.a / 255
+ end
+ else
+ ret.a = 255
+ end
+ else
+ error(string.format("cc.convertColor() - invalid type %s", typ), 0)
+ end
+ return ret
+end
+
+--Vertex2F
+function cc.vertex2F(_x,_y)
+ return { x = _x, y = _y }
+end
+
+--Vertex3F
+function cc.Vertex3F(_x,_y,_z)
+ return { x = _x, y = _y, z = _z }
+end
+
+--Tex2F
+function cc.tex2F(_u,_v)
+ return { u = _u, v = _v }
+end
+
+--PointSprite
+function cc.PointSprite(_pos,_color,_size)
+ return { pos = _pos, color = _color, size = _size }
+end
+
+--Quad2
+function cc.Quad2(_tl,_tr,_bl,_br)
+ return { tl = _tl, tr = _tr, bl = _bl, br = _br }
+end
+
+--Quad3
+function cc.Quad3(_tl, _tr, _bl, _br)
+ return { tl = _tl, tr = _tr, bl = _bl, br = _br }
+end
+
+--V2F_C4B_T2F
+function cc.V2F_C4B_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V2F_C4F_T2F
+function cc.V2F_C4F_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V3F_C4B_T2F
+function cc.V3F_C4B_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V2F_C4B_T2F_Quad
+function cc.V2F_C4B_T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--V3F_C4B_T2F_Quad
+function cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)
+ return { tl = _tl, bl = _bl, tr = _tr, br = _br }
+end
+
+--V2F_C4F_T2F_Quad
+function cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--T2F_Quad
+function cc.T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--AnimationFrameData
+function cc.AnimationFrameData( _texCoords, _delay, _size)
+ return { texCoords = _texCoords, delay = _delay, size = _size }
+end
+
+--PhysicsMaterial
+function cc.PhysicsMaterial(_density, _restitution, _friction)
+ return { density = _density, restitution = _restitution, friction = _friction }
+end
+
+function cc.vec3(_x, _y, _z)
+ return { x = _x, y = _y, z = _z }
+end
+
+function cc.vec4(_x, _y, _z, _w)
+ return { x = _x, y = _y, z = _z, w = _w }
+end
+
+function cc.vec3normalize(vec3)
+ local n = vec3.x * vec3.x + vec3.y * vec3.y + vec3.z * vec3.z
+ if n == 1.0 then
+ return vec3
+ end
+
+ n = math.sqrt(n)
+
+ if n < 2e-37 then
+ return vec3
+ end
+
+ n = 1.0 / n
+ return {x = vec3.x * n, y = vec3.y * n, z = vec3.z * n}
+end
+
+function cc.quaternion(_x, _y ,_z,_w)
+ return { x = _x, y = _y, z = _z, w = _w }
+end
+
+function cc.quaternion_createFromAxisAngle(axis, angle)
+
+ local halfAngle = angle * 0.5
+ local sinHalfAngle = math.sin(halfAngle)
+
+ local normal = cc.vec3(axis.x, axis.y, axis.z)
+ normal = cc.vec3normalize(normal)
+ local dst = cc.vec3(0.0, 0.0, 0.0)
+ dst.x = normal.x * sinHalfAngle
+ dst.y = normal.y * sinHalfAngle
+ dst.z = normal.z * sinHalfAngle
+ dst.w = math.cos(halfAngle)
+
+ return dst
+end
+
+function cc.blendFunc(_src, _dst)
+ return {src = _src, dst = _dst}
+end
+
+cc.mat4 = cc.mat4 or {}
+
+function cc.mat4.new(...)
+ local params = {...}
+ local size = #params
+ local obj = {}
+
+ if 1 == size then
+ assert(type(params[1]) == "table" , "type of input params are wrong to new a mat4 when num of params is 1")
+ for i= 1, 16 do
+ if params[1][i] ~= nil then
+ obj[i] = params[1][i]
+ else
+ obj[i] = 0
+ end
+ end
+ elseif 16 == size then
+ for i= 1, 16 do
+ obj[i] = params[i]
+ end
+ end
+
+ setmetatable(obj, {__index = cc.mat4})
+
+ return obj
+end
+
+function cc.mat4.getInversed(self)
+ return mat4_getInversed(self)
+end
+
+function cc.mat4.transformVector(self, vector, dst)
+ return mat4_transformVector(self, vector, dst)
+end
+
+function cc.mat4.multiply(self, mat)
+ return mat4_multiply(self, mat)
+end
+
+function cc.mat4.decompose(self, scale, rotation, translation)
+ return mat4_decompose(self, scale ,rotation, translation)
+end
+
+function cc.mat4.createIdentity()
+ return cc.mat4.new(1.0 ,0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0)
+end
+
+function cc.mat4.createTranslation(translation, dst)
+ assert(type(translation) == "table" and type(dst) == "table", "The type of input parameters should be table")
+ dst = cc.mat4.createIdentity()
+ dst[13] = translation.x
+ dst[14] = translation.y
+ dst[15] = translation.z
+ return dst
+end
+
+function cc.mat4.createRotation(q, dst)
+ assert(type(q) == "table" and type(dst) == "table", "The type of input parameters should be table")
+ local x2 = q.x + q.x
+ local y2 = q.y + q.y
+ local z2 = q.z + q.z
+
+ local xx2 = q.x * x2
+ local yy2 = q.y * y2
+ local zz2 = q.z * z2
+ local xy2 = q.x * y2
+ local xz2 = q.x * z2
+ local yz2 = q.y * z2
+ local wx2 = q.w * x2
+ local wy2 = q.w * y2
+ local wz2 = q.w * z2
+
+ dst[1] = 1.0 - yy2 - zz2
+ dst[2] = xy2 + wz2
+ dst[3] = xz2 - wy2
+ dst[4] = 0.0
+
+ dst[5] = xy2 - wz2
+ dst[6] = 1.0 - xx2 - zz2
+ dst[7] = yz2 + wx2
+ dst[8] = 0.0
+
+ dst[9] = xz2 + wy2
+ dst[10] = yz2 - wx2
+ dst[11] = 1.0 - xx2 - yy2
+ dst[12] = 0.0
+
+ dst[13] = 0.0
+ dst[14] = 0.0
+ dst[15] = 0.0
+ dst[16] = 1.0
+
+ return dst
+end
+
+function cc.mat4.translate(self,vec3)
+ return mat4_translate(self,vec3)
+end
+
+function cc.mat4.createRotationZ(self,angle)
+ return mat4_createRotationZ(self,angle)
+end
+
+function cc.mat4.setIdentity(self)
+ return mat4_setIdentity(self)
+end
+
+function cc.mat4.createTranslation(...)
+ return mat4_createTranslation(...)
+end
+
+function cc.mat4.createRotation(...)
+ return mat4_createRotation(...)
+end
\ No newline at end of file
diff --git a/simulator/win32/src/cocos/cocos2d/Cocos2dConstants.lua b/simulator/win32/src/cocos/cocos2d/Cocos2dConstants.lua
new file mode 100644
index 0000000..ff51b72
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/Cocos2dConstants.lua
@@ -0,0 +1,647 @@
+
+cc = cc or {}
+
+cc.SPRITE_INDEX_NOT_INITIALIZED = 0xffffffff
+cc.TMX_ORIENTATION_HEX = 0x1
+cc.TMX_ORIENTATION_ISO = 0x2
+cc.TMX_ORIENTATION_ORTHO = 0x0
+cc.Z_COMPRESSION_BZIP2 = 0x1
+cc.Z_COMPRESSION_GZIP = 0x2
+cc.Z_COMPRESSION_NONE = 0x3
+cc.Z_COMPRESSION_ZLIB = 0x0
+cc.BLEND_DST = 0x303
+cc.BLEND_SRC = 0x1
+cc.DIRECTOR_IOS_USE_BACKGROUND_THREAD = 0x0
+cc.DIRECTOR_MAC_THREAD = 0x0
+cc.DIRECTOR_STATS_INTERVAL = 0.1
+cc.ENABLE_BOX2_D_INTEGRATION = 0x0
+cc.ENABLE_DEPRECATED = 0x1
+cc.ENABLE_GL_STATE_CACHE = 0x1
+cc.ENABLE_PROFILERS = 0x0
+cc.ENABLE_STACKABLE_ACTIONS = 0x1
+cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0x0
+cc.GL_ALL = 0x0
+cc.LABELATLAS_DEBUG_DRAW = 0x0
+cc.LABELBMFONT_DEBUG_DRAW = 0x0
+cc.MAC_USE_DISPLAY_LINK_THREAD = 0x0
+cc.MAC_USE_MAIN_THREAD = 0x2
+cc.MAC_USE_OWN_THREAD = 0x1
+cc.NODE_RENDER_SUBPIXEL = 0x1
+cc.PVRMIPMAP_MAX = 0x10
+cc.SPRITEBATCHNODE_RENDER_SUBPIXEL = 0x1
+cc.SPRITE_DEBUG_DRAW = 0x0
+cc.TEXTURE_ATLAS_USE_TRIANGLE_STRIP = 0x0
+cc.TEXTURE_ATLAS_USE_VAO = 0x1
+cc.USE_L_A88_LABELS = 0x1
+cc.ACTION_TAG_INVALID = -1
+cc.DEVICE_MAC = 0x6
+cc.DEVICE_MAC_RETINA_DISPLAY = 0x7
+cc.DEVICEI_PAD = 0x4
+cc.DEVICEI_PAD_RETINA_DISPLAY = 0x5
+cc.DEVICEI_PHONE = 0x0
+cc.DEVICEI_PHONE5 = 0x2
+cc.DEVICEI_PHONE5_RETINA_DISPLAY = 0x3
+cc.DEVICEI_PHONE_RETINA_DISPLAY = 0x1
+cc.DIRECTOR_PROJECTION2_D = 0x0
+cc.DIRECTOR_PROJECTION3_D = 0x1
+cc.DIRECTOR_PROJECTION_CUSTOM = 0x2
+cc.DIRECTOR_PROJECTION_DEFAULT = 0x1
+cc.FILE_UTILS_SEARCH_DIRECTORY_MODE = 0x1
+cc.FILE_UTILS_SEARCH_SUFFIX_MODE = 0x0
+cc.FLIPED_ALL = 0xe0000000
+cc.FLIPPED_MASK = 0x1fffffff
+cc.IMAGE_FORMAT_JPEG = 0x0
+cc.IMAGE_FORMAT_PNG = 0x1
+cc.ITEM_SIZE = 0x20
+cc.LABEL_AUTOMATIC_WIDTH = -1
+cc.LINE_BREAK_MODE_CHARACTER_WRAP = 0x1
+cc.LINE_BREAK_MODE_CLIP = 0x2
+cc.LINE_BREAK_MODE_HEAD_TRUNCATION = 0x3
+cc.LINE_BREAK_MODE_MIDDLE_TRUNCATION = 0x5
+cc.LINE_BREAK_MODE_TAIL_TRUNCATION = 0x4
+cc.LINE_BREAK_MODE_WORD_WRAP = 0x0
+cc.MAC_VERSION_10_6 = 0xa060000
+cc.MAC_VERSION_10_7 = 0xa070000
+cc.MAC_VERSION_10_8 = 0xa080000
+cc.MENU_HANDLER_PRIORITY = -128
+cc.MENU_STATE_TRACKING_TOUCH = 0x1
+cc.MENU_STATE_WAITING = 0x0
+cc.NODE_TAG_INVALID = -1
+cc.PARTICLE_DURATION_INFINITY = -1
+cc.PARTICLE_MODE_GRAVITY = 0x0
+cc.PARTICLE_MODE_RADIUS = 0x1
+cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS = -1
+cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE = -1
+cc.POSITION_TYPE_FREE = 0x0
+cc.POSITION_TYPE_GROUPED = 0x2
+cc.POSITION_TYPE_RELATIVE = 0x1
+cc.PRIORITY_NON_SYSTEM_MIN = -2147483647
+cc.PRIORITY_SYSTEM = -2147483648
+cc.PROGRESS_TIMER_TYPE_BAR = 0x1
+cc.PROGRESS_TIMER_TYPE_RADIAL = 0x0
+cc.REPEAT_FOREVER = 0xfffffffe
+cc.RESOLUTION_MAC = 0x1
+cc.RESOLUTION_MAC_RETINA_DISPLAY = 0x2
+cc.RESOLUTION_UNKNOWN = 0x0
+cc.TMX_TILE_DIAGONAL_FLAG = 0x20000000
+cc.TMX_TILE_HORIZONTAL_FLAG = 0x80000000
+cc.TMX_TILE_VERTICAL_FLAG = 0x40000000
+cc.TEXT_ALIGNMENT_CENTER = 0x1
+cc.TEXT_ALIGNMENT_LEFT = 0x0
+cc.TEXT_ALIGNMENT_RIGHT = 0x2
+
+cc.TEXTURE2_D_PIXEL_FORMAT_AUTO = 0x0
+cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888 = 0x1
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888 = 0x2
+cc.TEXTURE2_D_PIXEL_FORMAT_RG_B888 = 0x3
+cc.TEXTURE2_D_PIXEL_FORMAT_RG_B565 = 0x4
+cc.TEXTURE2_D_PIXEL_FORMAT_A8 = 0x5
+cc.TEXTURE2_D_PIXEL_FORMAT_I8 = 0x6
+cc.TEXTURE2_D_PIXEL_FORMAT_A_I88 = 0x7
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A4444 = 0x8
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB5_A1 = 0x9
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4 = 0xa
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4A = 0xb
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2 = 0xc
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2A = 0xd
+cc.TEXTURE2_D_PIXEL_FORMAT_ETC = 0xe
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT1 = 0xf
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT3 = 0x10
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT5 = 0x11
+cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT = 0x0
+cc.TOUCHES_ALL_AT_ONCE = 0x0
+cc.TOUCHES_ONE_BY_ONE = 0x1
+cc.TRANSITION_ORIENTATION_DOWN_OVER = 0x1
+cc.TRANSITION_ORIENTATION_LEFT_OVER = 0x0
+cc.TRANSITION_ORIENTATION_RIGHT_OVER = 0x1
+cc.TRANSITION_ORIENTATION_UP_OVER = 0x0
+cc.UNIFORM_COS_TIME = 0x5
+cc.UNIFORM_MV_MATRIX = 0x1
+cc.UNIFORM_MVP_MATRIX = 0x2
+cc.UNIFORM_P_MATRIX = 0x0
+cc.UNIFORM_RANDOM01 = 0x6
+cc.UNIFORM_SAMPLER = 0x7
+cc.UNIFORM_SIN_TIME = 0x4
+cc.UNIFORM_TIME = 0x3
+cc.UNIFORM_MAX = 0x8
+cc.VERTEX_ATTRIB_FLAG_COLOR = 0x2
+cc.VERTEX_ATTRIB_FLAG_NONE = 0x0
+cc.VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = 0x7
+cc.VERTEX_ATTRIB_FLAG_POSITION = 0x1
+cc.VERTEX_ATTRIB_FLAG_TEX_COORDS = 0x4
+cc.VERTEX_ATTRIB_COLOR = 0x1
+cc.VERTEX_ATTRIB_MAX = 0x3
+cc.VERTEX_ATTRIB_POSITION = 0x0
+cc.VERTEX_ATTRIB_TEX_COORD = 0x2
+
+cc.VERTEX_ATTRIB_TEX_COORDS = 0x2
+cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM = 0x2
+cc.VERTICAL_TEXT_ALIGNMENT_CENTER = 0x1
+cc.VERTICAL_TEXT_ALIGNMENT_TOP = 0x0
+cc.OS_VERSION_4_0 = 0x4000000
+cc.OS_VERSION_4_0_1 = 0x4000100
+cc.OS_VERSION_4_1 = 0x4010000
+cc.OS_VERSION_4_2 = 0x4020000
+cc.OS_VERSION_4_2_1 = 0x4020100
+cc.OS_VERSION_4_3 = 0x4030000
+cc.OS_VERSION_4_3_1 = 0x4030100
+cc.OS_VERSION_4_3_2 = 0x4030200
+cc.OS_VERSION_4_3_3 = 0x4030300
+cc.OS_VERSION_4_3_4 = 0x4030400
+cc.OS_VERSION_4_3_5 = 0x4030500
+cc.OS_VERSION_5_0 = 0x5000000
+cc.OS_VERSION_5_0_1 = 0x5000100
+cc.OS_VERSION_5_1_0 = 0x5010000
+cc.OS_VERSION_6_0_0 = 0x6000000
+cc.ANIMATION_FRAME_DISPLAYED_NOTIFICATION = 'CCAnimationFrameDisplayedNotification'
+cc.CHIPMUNK_IMPORT = 'chipmunk.h'
+cc.ATTRIBUTE_NAME_COLOR = 'a_color'
+cc.ATTRIBUTE_NAME_POSITION = 'a_position'
+cc.ATTRIBUTE_NAME_TEX_COORD = 'a_texCoord'
+cc.SHADER_POSITION_COLOR = 'ShaderPositionColor'
+cc.SHADER_POSITION_LENGTH_TEXURE_COLOR = 'ShaderPositionLengthTextureColor'
+cc.SHADER_POSITION_TEXTURE = 'ShaderPositionTexture'
+cc.SHADER_POSITION_TEXTURE_A8_COLOR = 'ShaderPositionTextureA8Color'
+cc.SHADER_POSITION_TEXTURE_COLOR = 'ShaderPositionTextureColor'
+cc.SHADER_POSITION_TEXTURE_COLOR_ALPHA_TEST = 'ShaderPositionTextureColorAlphaTest'
+cc.SHADER_POSITION_TEXTURE_U_COLOR = 'ShaderPositionTexture_uColor'
+cc.SHADER_POSITION_U_COLOR = 'ShaderPosition_uColor'
+cc.UNIFORM_ALPHA_TEST_VALUE_S = 'CC_AlphaValue'
+cc.UNIFORM_COS_TIME_S = 'CC_CosTime'
+cc.UNIFORM_MV_MATRIX_S = 'CC_MVMatrix'
+cc.UNIFORM_MVP_MATRIX_S = 'CC_MVPMatrix'
+cc.UNIFORM_P_MATRIX_S = 'CC_PMatrix'
+cc.UNIFORM_RANDOM01_S = 'CC_Random01'
+cc.UNIFORM_SAMPLER_S = 'CC_Texture0'
+cc.UNIFORM_SIN_TIME_S = 'CC_SinTime'
+cc.UNIFORM_TIME_S = 'CC_Time'
+
+cc.PLATFORM_OS_WINDOWS = 0
+cc.PLATFORM_OS_LINUX = 1
+cc.PLATFORM_OS_MAC = 2
+cc.PLATFORM_OS_ANDROID = 3
+cc.PLATFORM_OS_IPHONE = 4
+cc.PLATFORM_OS_IPAD = 5
+cc.PLATFORM_OS_BLACKBERRY = 6
+cc.PLATFORM_OS_NACL = 7
+cc.PLATFORM_OS_EMSCRIPTEN = 8
+cc.PLATFORM_OS_TIZEN = 9
+cc.PLATFORM_OS_WINRT = 10
+cc.PLATFORM_OS_WP8 = 11
+
+cc.LANGUAGE_ENGLISH = 0
+cc.LANGUAGE_CHINESE = 1
+cc.LANGUAGE_FRENCH = 2
+cc.LANGUAGE_ITALIAN = 3
+cc.LANGUAGE_GERMAN = 4
+cc.LANGUAGE_SPANISH = 5
+cc.LANGUAGE_RUSSIAN = 6
+cc.LANGUAGE_KOREAN = 7
+cc.LANGUAGE_JAPANESE = 8
+cc.LANGUAGE_HUNGARIAN = 9
+cc.LANGUAGE_PORTUGUESE = 10
+cc.LANGUAGE_ARABIC = 11
+
+cc.NODE_ON_ENTER = 0
+cc.NODE_ON_EXIT = 1
+cc.NODE_ON_ENTER_TRANSITION_DID_FINISH = 2
+cc.NODE_ON_EXIT_TRANSITION_DID_START = 3
+cc.NODE_ON_CLEAN_UP = 4
+
+cc.Handler = cc.Handler or {}
+cc.Handler.NODE = 0
+cc.Handler.MENU_CLICKED = 1
+cc.Handler.CALLFUNC = 2
+cc.Handler.SCHEDULE = 3
+cc.Handler.TOUCHES = 4
+cc.Handler.KEYPAD = 5
+cc.Handler.ACCELEROMETER = 6
+cc.Handler.CONTROL_TOUCH_DOWN = 7
+cc.Handler.CONTROL_TOUCH_DRAG_INSIDE = 8
+cc.Handler.CONTROL_TOUCH_DRAG_OUTSIDE = 9
+cc.Handler.CONTROL_TOUCH_DRAG_ENTER = 10
+cc.Handler.CONTROL_TOUCH_DRAG_EXIT = 11
+cc.Handler.CONTROL_TOUCH_UP_INSIDE = 12
+cc.Handler.CONTROL_TOUCH_UP_OUTSIDE = 13
+cc.Handler.CONTROL_TOUCH_UP_CANCEL = 14
+cc.Handler.CONTROL_VALUE_CHANGED = 15
+cc.Handler.WEBSOCKET_OPEN = 16
+cc.Handler.WEBSOCKET_MESSAGE = 17
+cc.Handler.WEBSOCKET_CLOSE = 18
+cc.Handler.WEBSOCKET_ERROR = 19
+cc.Handler.GL_NODE_DRAW = 20
+cc.Handler.SCROLLVIEW_SCROLL = 21
+cc.Handler.SCROLLVIEW_ZOOM = 22
+cc.Handler.TABLECELL_TOUCHED = 23
+cc.Handler.TABLECELL_HIGHLIGHT = 24
+cc.Handler.TABLECELL_UNHIGHLIGHT = 25
+cc.Handler.TABLECELL_WILL_RECYCLE = 26
+cc.Handler.TABLECELL_SIZE_FOR_INDEX = 27
+cc.Handler.TABLECELL_AT_INDEX = 28
+cc.Handler.TABLEVIEW_NUMS_OF_CELLS = 29
+cc.Handler.HTTPREQUEST_STATE_CHANGE = 30
+cc.Handler.ASSETSMANAGER_PROGRESS = 31
+cc.Handler.ASSETSMANAGER_SUCCESS = 32
+cc.Handler.ASSETSMANAGER_ERROR = 33
+cc.Handler.STUDIO_EVENT_LISTENER = 34
+cc.Handler.ARMATURE_EVENT = 35
+cc.Handler.EVENT_ACC = 36
+cc.Handler.EVENT_CUSTIOM = 37
+cc.Handler.EVENT_KEYBOARD_PRESSED = 38
+cc.Handler.EVENT_KEYBOARD_RELEASED = 39
+cc.Handler.EVENT_TOUCH_BEGAN = 40
+cc.Handler.EVENT_TOUCH_MOVED = 41
+cc.Handler.EVENT_TOUCH_ENDED = 42
+cc.Handler.EVENT_TOUCH_CANCELLED = 43
+cc.Handler.EVENT_TOUCHES_BEGAN = 44
+cc.Handler.EVENT_TOUCHES_MOVED = 45
+cc.Handler.EVENT_TOUCHES_ENDED = 46
+cc.Handler.EVENT_TOUCHES_CANCELLED = 47
+cc.Handler.EVENT_MOUSE_DOWN = 48
+cc.Handler.EVENT_MOUSE_UP = 49
+cc.Handler.EVENT_MOUSE_MOVE = 50
+cc.Handler.EVENT_MOUSE_SCROLL = 51
+cc.Handler.EVENT_SPINE = 52
+cc.Handler.EVENT_PHYSICS_CONTACT_BEGIN = 53
+cc.Handler.EVENT_PHYSICS_CONTACT_PRESOLVE = 54
+cc.Handler.EVENT_PHYSICS_CONTACT_POSTSOLVE = 55
+cc.Handler.EVENT_PHYSICS_CONTACT_SEPARATE = 56
+cc.Handler.EVENT_FOCUS = 57
+cc.Handler.EVENT_CONTROLLER_CONNECTED = 58
+cc.Handler.EVENT_CONTROLLER_DISCONNECTED = 59
+cc.Handler.EVENT_CONTROLLER_KEYDOWN = 60
+cc.Handler.EVENT_CONTROLLER_KEYUP = 61
+cc.Handler.EVENT_CONTROLLER_KEYREPEAT = 62
+cc.Handler.EVENT_CONTROLLER_AXIS = 63
+cc.Handler.EVENT_SPINE_ANIMATION_START = 64
+cc.Handler.EVENT_SPINE_ANIMATION_END = 65
+cc.Handler.EVENT_SPINE_ANIMATION_COMPLETE = 66
+cc.Handler.EVENT_SPINE_ANIMATION_EVENT = 67
+
+
+cc.EVENT_UNKNOWN = 0
+cc.EVENT_TOUCH_ONE_BY_ONE = 1
+cc.EVENT_TOUCH_ALL_AT_ONCE = 2
+cc.EVENT_KEYBOARD = 3
+cc.EVENT_MOUSE = 4
+cc.EVENT_ACCELERATION = 5
+cc.EVENT_CUSTOM = 6
+
+cc.PHYSICSSHAPE_MATERIAL_DEFAULT = {density = 0.0, restitution = 0.5, friction = 0.5}
+cc.PHYSICSBODY_MATERIAL_DEFAULT = {density = 0.1, restitution = 0.5, friction = 0.5}
+cc.GLYPHCOLLECTION_DYNAMIC = 0
+cc.GLYPHCOLLECTION_NEHE = 1
+cc.GLYPHCOLLECTION_ASCII = 2
+cc.GLYPHCOLLECTION_CUSTOM = 3
+
+cc.ResolutionPolicy =
+{
+ EXACT_FIT = 0,
+ NO_BORDER = 1,
+ SHOW_ALL = 2,
+ FIXED_HEIGHT = 3,
+ FIXED_WIDTH = 4,
+ UNKNOWN = 5,
+}
+
+cc.LabelEffect =
+{
+ NORMAL = 0,
+ OUTLINE = 1,
+ SHADOW = 2,
+ GLOW = 3,
+}
+
+cc.LabelOverflow =
+{
+ NONE = 0,
+ CLAMP = 1,
+ SHRINK = 2,
+ RESIZE_HEIGHT = 3
+};
+
+cc.KeyCodeKey =
+{
+ "KEY_NONE",
+ "KEY_PAUSE",
+ "KEY_SCROLL_LOCK",
+ "KEY_PRINT",
+ "KEY_SYSREQ",
+ "KEY_BREAK",
+ "KEY_ESCAPE",
+ "KEY_BACKSPACE",
+ "KEY_TAB",
+ "KEY_BACK_TAB",
+ "KEY_RETURN",
+ "KEY_CAPS_LOCK",
+ "KEY_SHIFT",
+ "KEY_RIGHT_SHIFT",
+ "KEY_CTRL",
+ "KEY_RIGHT_CTRL",
+ "KEY_ALT",
+ "KEY_RIGHT_ALT",
+ "KEY_MENU",
+ "KEY_HYPER",
+ "KEY_INSERT",
+ "KEY_HOME",
+ "KEY_PG_UP",
+ "KEY_DELETE",
+ "KEY_END",
+ "KEY_PG_DOWN",
+ "KEY_LEFT_ARROW",
+ "KEY_RIGHT_ARROW",
+ "KEY_UP_ARROW",
+ "KEY_DOWN_ARROW",
+ "KEY_NUM_LOCK",
+ "KEY_KP_PLUS",
+ "KEY_KP_MINUS",
+ "KEY_KP_MULTIPLY",
+ "KEY_KP_DIVIDE",
+ "KEY_KP_ENTER",
+ "KEY_KP_HOME",
+ "KEY_KP_UP",
+ "KEY_KP_PG_UP",
+ "KEY_KP_LEFT",
+ "KEY_KP_FIVE",
+ "KEY_KP_RIGHT",
+ "KEY_KP_END",
+ "KEY_KP_DOWN",
+ "KEY_KP_PG_DOWN",
+ "KEY_KP_INSERT",
+ "KEY_KP_DELETE",
+ "KEY_F1",
+ "KEY_F2",
+ "KEY_F3",
+ "KEY_F4",
+ "KEY_F5",
+ "KEY_F6",
+ "KEY_F7",
+ "KEY_F8",
+ "KEY_F9",
+ "KEY_F10",
+ "KEY_F11",
+ "KEY_F12",
+ "KEY_SPACE",
+ "KEY_EXCLAM",
+ "KEY_QUOTE",
+ "KEY_NUMBER",
+ "KEY_DOLLAR",
+ "KEY_PERCENT",
+ "KEY_CIRCUMFLEX",
+ "KEY_AMPERSAND",
+ "KEY_APOSTROPHE",
+ "KEY_LEFT_PARENTHESIS",
+ "KEY_RIGHT_PARENTHESIS",
+ "KEY_ASTERISK",
+ "KEY_PLUS",
+ "KEY_COMMA",
+ "KEY_MINUS",
+ "KEY_PERIOD",
+ "KEY_SLASH",
+ "KEY_0",
+ "KEY_1",
+ "KEY_2",
+ "KEY_3",
+ "KEY_4",
+ "KEY_5",
+ "KEY_6",
+ "KEY_7",
+ "KEY_8",
+ "KEY_9",
+ "KEY_COLON",
+ "KEY_SEMICOLON",
+ "KEY_LESS_THAN",
+ "KEY_EQUAL",
+ "KEY_GREATER_THAN",
+ "KEY_QUESTION",
+ "KEY_AT",
+ "KEY_CAPITAL_A",
+ "KEY_CAPITAL_B",
+ "KEY_CAPITAL_C",
+ "KEY_CAPITAL_D",
+ "KEY_CAPITAL_E",
+ "KEY_CAPITAL_F",
+ "KEY_CAPITAL_G",
+ "KEY_CAPITAL_H",
+ "KEY_CAPITAL_I",
+ "KEY_CAPITAL_J",
+ "KEY_CAPITAL_K",
+ "KEY_CAPITAL_L",
+ "KEY_CAPITAL_M",
+ "KEY_CAPITAL_N",
+ "KEY_CAPITAL_O",
+ "KEY_CAPITAL_P",
+ "KEY_CAPITAL_Q",
+ "KEY_CAPITAL_R",
+ "KEY_CAPITAL_S",
+ "KEY_CAPITAL_T",
+ "KEY_CAPITAL_U",
+ "KEY_CAPITAL_V",
+ "KEY_CAPITAL_W",
+ "KEY_CAPITAL_X",
+ "KEY_CAPITAL_Y",
+ "KEY_CAPITAL_Z",
+ "KEY_LEFT_BRACKET",
+ "KEY_BACK_SLASH",
+ "KEY_RIGHT_BRACKET",
+ "KEY_UNDERSCORE",
+ "KEY_GRAVE",
+ "KEY_A",
+ "KEY_B",
+ "KEY_C",
+ "KEY_D",
+ "KEY_E",
+ "KEY_F",
+ "KEY_G",
+ "KEY_H",
+ "KEY_I",
+ "KEY_J",
+ "KEY_K",
+ "KEY_L",
+ "KEY_M",
+ "KEY_N",
+ "KEY_O",
+ "KEY_P",
+ "KEY_Q",
+ "KEY_R",
+ "KEY_S",
+ "KEY_T",
+ "KEY_U",
+ "KEY_V",
+ "KEY_W",
+ "KEY_X",
+ "KEY_Y",
+ "KEY_Z",
+ "KEY_LEFT_BRACE",
+ "KEY_BAR",
+ "KEY_RIGHT_BRACE",
+ "KEY_TILDE",
+ "KEY_EURO",
+ "KEY_POUND",
+ "KEY_YEN",
+ "KEY_MIDDLE_DOT",
+ "KEY_SEARCH",
+ "KEY_DPAD_LEFT",
+ "KEY_DPAD_RIGHT",
+ "KEY_DPAD_UP",
+ "KEY_DPAD_DOWN",
+ "KEY_DPAD_CENTER",
+ "KEY_ENTER",
+ "KEY_PLAY",
+}
+
+cc.KeyCode =
+{
+}
+
+for k,v in ipairs(cc.KeyCodeKey) do
+ cc.KeyCode[v] = k - 1
+end
+
+cc.KeyCode.KEY_BACK = cc.KeyCode.KEY_ESCAPE
+cc.KeyCode.KEY_LEFT_SHIFT = cc.KeyCode.KEY_SHIFT
+cc.KeyCode.KEY_LEFT_CTRL = cc.KeyCode.KEY_CTRL
+cc.KeyCode.KEY_LEFT_ALT = cc.KeyCode.KEY_ALT
+
+cc.EventAssetsManagerEx =
+{
+ EventCode =
+ {
+ ERROR_NO_LOCAL_MANIFEST = 0,
+ ERROR_DOWNLOAD_MANIFEST = 1,
+ ERROR_PARSE_MANIFEST = 2,
+ NEW_VERSION_FOUND = 3,
+ ALREADY_UP_TO_DATE = 4,
+ UPDATE_PROGRESSION = 5,
+ ASSET_UPDATED = 6,
+ ERROR_UPDATING = 7,
+ UPDATE_FINISHED = 8,
+ UPDATE_FAILED = 9,
+ ERROR_DECOMPRESS = 10
+ },
+}
+
+cc.AssetsManagerExStatic =
+{
+ VERSION_ID = "@version",
+ MANIFEST_ID = "@manifest",
+}
+
+cc.EventCode =
+{
+ BEGAN = 0,
+ MOVED = 1,
+ ENDED = 2,
+ CANCELLED = 3,
+}
+
+cc.DIRECTOR_PROJECTION_2D = 0
+cc.DIRECTOR_PROJECTION_3D = 1
+
+cc.ConfigType =
+{
+ NONE = 0,
+ COCOSTUDIO = 1,
+}
+
+cc.AUDIO_INVAILD_ID = -1
+cc.AUDIO_TIME_UNKNOWN = -1.0
+
+cc.CameraFlag =
+{
+ DEFAULT = 1,
+ USER1 = 2,
+ USER2 = 4,
+ USER3 = 8,
+ USER4 = 16,
+ USER5 = 32,
+ USER6 = 64,
+ USER7 = 128,
+ USER8 = 256,
+}
+
+cc.CameraBackgroundBrush.BrushType =
+{
+ NONE = 0,
+ DEPTH = 1,
+ COLOR = 2,
+ SKYBOX = 3,
+}
+
+cc.BillBoard_Mode =
+{
+ VIEW_POINT_ORIENTED = 0,
+ VIEW_PLANE_ORIENTED = 1,
+}
+
+cc.GLProgram_VERTEX_ATTRIB =
+{
+ POSITION = 0,
+ COLOR = 1,
+ TEX_COORD = 2,
+ TEX_COORD1 = 3,
+ TEX_COORD2 = 4,
+ TEX_COORD3 = 5,
+ TEX_COORD4 = 6,
+ TEX_COORD5 = 7,
+ TEX_COORD6 = 8,
+ TEX_COORD7 = 9,
+ NORMAL = 10,
+ BLEND_WEIGHT = 11,
+ BLEND_INDEX =12,
+ MAX = 13,
+ --backward compatibility
+ TEX_COORDS = 2,
+}
+
+cc.MATRIX_STACK_TYPE =
+{
+ MODELVIEW = 0,
+ PROJECTION = 1,
+ TEXTURE = 2,
+}
+
+cc.LightType =
+{
+ DIRECTIONAL = 0,
+ POINT = 1,
+ SPOT = 2,
+ AMBIENT = 3,
+}
+
+cc.LightFlag =
+{
+ LIGHT0 = math.pow(2,0),
+ LIGHT1 = math.pow(2,1),
+ LIGHT2 = math.pow(2,2),
+ LIGHT3 = math.pow(2,3),
+ LIGHT4 = math.pow(2,4),
+ LIGHT5 = math.pow(2,5),
+ LIGHT6 = math.pow(2,6),
+ LIGHT7 = math.pow(2,7),
+ LIGHT8 = math.pow(2,8),
+ LIGHT9 = math.pow(2,9),
+ LIGHT10 = math.pow(2,10),
+ LIGHT11 = math.pow(2,11),
+ LIGHT12 = math.pow(2,12),
+ LIGHT13 = math.pow(2,13),
+ LIGHT14 = math.pow(2,14),
+ LIGHT15 = math.pow(2,15),
+}
+
+cc.AsyncTaskPool.TaskType =
+{
+ TASK_IO = 0,
+ TASK_NETWORK = 1,
+ TASK_OTHER = 2,
+ TASK_MAX_TYPE = 3,
+}
+
+
+cc.RED = cc.c3b(255,0,0)
+cc.GREEN = cc.c3b(0,255,0)
+cc.BLUE = cc.c3b(0,0,255)
+cc.BLACK = cc.c3b(0,0,0)
+cc.WHITE = cc.c3b(255,255,255)
+cc.YELLOW = cc.c3b(255,255,0)
+
diff --git a/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dClass.lua b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dClass.lua
new file mode 100644
index 0000000..3228789
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dClass.lua
@@ -0,0 +1,1767 @@
+-- This is the DeprecatedClass
+
+DeprecatedClass = {} or DeprecatedClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCProgressTo class will be Deprecated,begin
+function DeprecatedClass.CCProgressTo()
+ deprecatedTip("CCProgressTo","cc.ProgressTo")
+ return cc.ProgressTo
+end
+_G["CCProgressTo"] = DeprecatedClass.CCProgressTo()
+--CCProgressTo class will be Deprecated,end
+
+--CCHide class will be Deprecated,begin
+function DeprecatedClass.CCHide()
+ deprecatedTip("CCHide","cc.Hide")
+ return cc.Hide
+end
+_G["CCHide"] = DeprecatedClass.CCHide()
+--CCHide class will be Deprecated,end
+
+--CCTransitionMoveInB class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInB()
+ deprecatedTip("CCTransitionMoveInB","cc.TransitionMoveInB")
+ return cc.TransitionMoveInB
+end
+_G["CCTransitionMoveInB"] = DeprecatedClass.CCTransitionMoveInB()
+--CCTransitionMoveInB class will be Deprecated,end
+
+--CCEaseSineIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineIn()
+ deprecatedTip("CCEaseSineIn","cc.EaseSineIn")
+ return cc.EaseSineIn
+end
+_G["CCEaseSineIn"] = DeprecatedClass.CCEaseSineIn()
+--CCEaseSineIn class will be Deprecated,end
+
+--CCTransitionMoveInL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInL()
+ deprecatedTip("CCTransitionMoveInL","cc.TransitionMoveInL")
+ return cc.TransitionMoveInL
+end
+_G["CCTransitionMoveInL"] = DeprecatedClass.CCTransitionMoveInL()
+--CCTransitionMoveInL class will be Deprecated,end
+
+--CCEaseInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseInOut()
+ deprecatedTip("CCEaseInOut","cc.EaseInOut")
+ return cc.EaseInOut
+end
+_G["CCEaseInOut"] = DeprecatedClass.CCEaseInOut()
+--CCEaseInOut class will be Deprecated,end
+
+--CCTransitionMoveInT class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInT()
+ deprecatedTip("CCTransitionMoveInT","cc.TransitionMoveInT")
+ return cc.TransitionMoveInT
+end
+_G["CCTransitionMoveInT"] = DeprecatedClass.CCTransitionMoveInT()
+--CCTransitionMoveInT class will be Deprecated,end
+
+--CCTransitionMoveInR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInR()
+ deprecatedTip("CCTransitionMoveInR","cc.TransitionMoveInR")
+ return cc.TransitionMoveInR
+end
+_G["CCTransitionMoveInR"] = DeprecatedClass.CCTransitionMoveInR()
+--CCTransitionMoveInR class will be Deprecated,end
+
+--CCParticleSnow class will be Deprecated,begin
+function DeprecatedClass.CCParticleSnow()
+ deprecatedTip("CCParticleSnow","cc.ParticleSnow")
+ return cc.ParticleSnow
+end
+_G["CCParticleSnow"] = DeprecatedClass.CCParticleSnow()
+--CCParticleSnow class will be Deprecated,end
+
+--CCActionCamera class will be Deprecated,begin
+function DeprecatedClass.CCActionCamera()
+ deprecatedTip("CCActionCamera","cc.ActionCamera")
+ return cc.ActionCamera
+end
+_G["CCActionCamera"] = DeprecatedClass.CCActionCamera()
+--CCActionCamera class will be Deprecated,end
+
+--CCProgressFromTo class will be Deprecated,begin
+function DeprecatedClass.CCProgressFromTo()
+ deprecatedTip("CCProgressFromTo","cc.ProgressFromTo")
+ return cc.ProgressFromTo
+end
+_G["CCProgressFromTo"] = DeprecatedClass.CCProgressFromTo()
+--CCProgressFromTo class will be Deprecated,end
+
+--CCMoveTo class will be Deprecated,begin
+function DeprecatedClass.CCMoveTo()
+ deprecatedTip("CCMoveTo","cc.MoveTo")
+ return cc.MoveTo
+end
+_G["CCMoveTo"] = DeprecatedClass.CCMoveTo()
+--CCMoveTo class will be Deprecated,end
+
+--CCJumpBy class will be Deprecated,begin
+function DeprecatedClass.CCJumpBy()
+ deprecatedTip("CCJumpBy","cc.JumpBy")
+ return cc.JumpBy
+end
+_G["CCJumpBy"] = DeprecatedClass.CCJumpBy()
+--CCJumpBy class will be Deprecated,end
+
+--CCObject class will be Deprecated,begin
+function DeprecatedClass.CCObject()
+ deprecatedTip("CCObject","cc.Object")
+ return cc.Object
+end
+_G["CCObject"] = DeprecatedClass.CCObject()
+--CCObject class will be Deprecated,end
+
+--CCTransitionRotoZoom class will be Deprecated,begin
+function DeprecatedClass.CCTransitionRotoZoom()
+ deprecatedTip("CCTransitionRotoZoom","cc.TransitionRotoZoom")
+ return cc.TransitionRotoZoom
+end
+_G["CCTransitionRotoZoom"] = DeprecatedClass.CCTransitionRotoZoom()
+--CCTransitionRotoZoom class will be Deprecated,end
+
+--CCDirector class will be Deprecated,begin
+function DeprecatedClass.CCDirector()
+ deprecatedTip("CCDirector","cc.Director")
+ return cc.Director
+end
+_G["CCDirector"] = DeprecatedClass.CCDirector()
+--CCDirector class will be Deprecated,end
+
+--CCScheduler class will be Deprecated,begin
+function DeprecatedClass.CCScheduler()
+ deprecatedTip("CCScheduler","cc.Scheduler")
+ return cc.Scheduler
+end
+_G["CCScheduler"] = DeprecatedClass.CCScheduler()
+--CCScheduler class will be Deprecated,end
+
+--CCEaseElasticOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticOut()
+ deprecatedTip("CCEaseElasticOut","cc.EaseElasticOut")
+ return cc.EaseElasticOut
+end
+_G["CCEaseElasticOut"] = DeprecatedClass.CCEaseElasticOut()
+--CCEaseElasticOut class will be Deprecated,end
+
+--CCTableViewCell class will be Deprecated,begin
+function DeprecatedClass.CCTableViewCell()
+ deprecatedTip("CCTableViewCell","cc.TableViewCell")
+ return cc.TableViewCell
+end
+_G["CCTableViewCell"] = DeprecatedClass.CCTableViewCell()
+--CCTableViewCell class will be Deprecated,end
+
+
+--CCEaseBackOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackOut()
+ deprecatedTip("CCEaseBackOut","cc.EaseBackOut")
+ return cc.EaseBackOut
+end
+_G["CCEaseBackOut"] = DeprecatedClass.CCEaseBackOut()
+--CCEaseBackOut class will be Deprecated,end
+
+--CCParticleSystemQuad class will be Deprecated,begin
+function DeprecatedClass.CCParticleSystemQuad()
+ deprecatedTip("CCParticleSystemQuad","cc.ParticleSystemQuad")
+ return cc.ParticleSystemQuad
+end
+_G["CCParticleSystemQuad"] = DeprecatedClass.CCParticleSystemQuad()
+--CCParticleSystemQuad class will be Deprecated,end
+
+--CCMenuItemToggle class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemToggle()
+ deprecatedTip("CCMenuItemToggle","cc.MenuItemToggle")
+ return cc.MenuItemToggle
+end
+_G["CCMenuItemToggle"] = DeprecatedClass.CCMenuItemToggle()
+--CCMenuItemToggle class will be Deprecated,end
+
+--CCStopGrid class will be Deprecated,begin
+function DeprecatedClass.CCStopGrid()
+ deprecatedTip("CCStopGrid","cc.StopGrid")
+ return cc.StopGrid
+end
+_G["CCStopGrid"] = DeprecatedClass.CCStopGrid()
+--CCStopGrid class will be Deprecated,end
+
+--CCTransitionScene class will be Deprecated,begin
+function DeprecatedClass.CCTransitionScene()
+ deprecatedTip("CCTransitionScene","cc.TransitionScene")
+ return cc.TransitionScene
+end
+_G["CCTransitionScene"] = DeprecatedClass.CCTransitionScene()
+--CCTransitionScene class will be Deprecated,end
+
+--CCSkewBy class will be Deprecated,begin
+function DeprecatedClass.CCSkewBy()
+ deprecatedTip("CCSkewBy","cc.SkewBy")
+ return cc.SkewBy
+end
+_G["CCSkewBy"] = DeprecatedClass.CCSkewBy()
+--CCSkewBy class will be Deprecated,end
+
+--CCLayer class will be Deprecated,begin
+function DeprecatedClass.CCLayer()
+ deprecatedTip("CCLayer","cc.Layer")
+ return cc.Layer
+end
+_G["CCLayer"] = DeprecatedClass.CCLayer()
+--CCLayer class will be Deprecated,end
+
+--CCEaseElastic class will be Deprecated,begin
+function DeprecatedClass.CCEaseElastic()
+ deprecatedTip("CCEaseElastic","cc.EaseElastic")
+ return cc.EaseElastic
+end
+_G["CCEaseElastic"] = DeprecatedClass.CCEaseElastic()
+--CCEaseElastic class will be Deprecated,end
+
+--CCTMXTiledMap class will be Deprecated,begin
+function DeprecatedClass.CCTMXTiledMap()
+ deprecatedTip("CCTMXTiledMap","cc.TMXTiledMap")
+ return cc.TMXTiledMap
+end
+_G["CCTMXTiledMap"] = DeprecatedClass.CCTMXTiledMap()
+--CCTMXTiledMap class will be Deprecated,end
+
+--CCGrid3DAction class will be Deprecated,begin
+function DeprecatedClass.CCGrid3DAction()
+ deprecatedTip("CCGrid3DAction","cc.Grid3DAction")
+ return cc.Grid3DAction
+end
+_G["CCGrid3DAction"] = DeprecatedClass.CCGrid3DAction()
+--CCGrid3DAction class will be Deprecated,end
+
+--CCFadeIn class will be Deprecated,begin
+function DeprecatedClass.CCFadeIn()
+ deprecatedTip("CCFadeIn","cc.FadeIn")
+ return cc.FadeIn
+end
+_G["CCFadeIn"] = DeprecatedClass.CCFadeIn()
+--CCFadeIn class will be Deprecated,end
+
+--CCNodeRGBA class will be Deprecated,begin
+function DeprecatedClass.CCNodeRGBA()
+ deprecatedTip("CCNodeRGBA","cc.Node")
+ return cc.Node
+end
+_G["CCNodeRGBA"] = DeprecatedClass.CCNodeRGBA()
+--CCNodeRGBA class will be Deprecated,end
+
+--NodeRGBA class will be Deprecated,begin
+function DeprecatedClass.NodeRGBA()
+ deprecatedTip("cc.NodeRGBA","cc.Node")
+ return cc.Node
+end
+_G["cc"]["NodeRGBA"] = DeprecatedClass.NodeRGBA()
+--NodeRGBA class will be Deprecated,end
+
+--CCAnimationCache class will be Deprecated,begin
+function DeprecatedClass.CCAnimationCache()
+ deprecatedTip("CCAnimationCache","cc.AnimationCache")
+ return cc.AnimationCache
+end
+_G["CCAnimationCache"] = DeprecatedClass.CCAnimationCache()
+--CCAnimationCache class will be Deprecated,end
+
+--CCFlipY3D class will be Deprecated,begin
+function DeprecatedClass.CCFlipY3D()
+ deprecatedTip("CCFlipY3D","cc.FlipY3D")
+ return cc.FlipY3D
+end
+_G["CCFlipY3D"] = DeprecatedClass.CCFlipY3D()
+--CCFlipY3D class will be Deprecated,end
+
+--CCEaseSineInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineInOut()
+ deprecatedTip("CCEaseSineInOut","cc.EaseSineInOut")
+ return cc.EaseSineInOut
+end
+_G["CCEaseSineInOut"] = DeprecatedClass.CCEaseSineInOut()
+--CCEaseSineInOut class will be Deprecated,end
+
+--CCTransitionFlipAngular class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipAngular()
+ deprecatedTip("CCTransitionFlipAngular","cc.TransitionFlipAngular")
+ return cc.TransitionFlipAngular
+end
+_G["CCTransitionFlipAngular"] = DeprecatedClass.CCTransitionFlipAngular()
+--CCTransitionFlipAngular class will be Deprecated,end
+
+--CCEaseElasticInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticInOut()
+ deprecatedTip("CCEaseElasticInOut","cc.EaseElasticInOut")
+ return cc.EaseElasticInOut
+end
+_G["CCEaseElasticInOut"] = DeprecatedClass.CCEaseElasticInOut()
+--CCEaseElasticInOut class will be Deprecated,end
+
+--CCEaseBounce class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounce()
+ deprecatedTip("CCEaseBounce","cc.EaseBounce")
+ return cc.EaseBounce
+end
+_G["CCEaseBounce"] = DeprecatedClass.CCEaseBounce()
+--CCEaseBounce class will be Deprecated,end
+
+--CCShow class will be Deprecated,begin
+function DeprecatedClass.CCShow()
+ deprecatedTip("CCShow","cc.Show")
+ return cc.Show
+end
+_G["CCShow"] = DeprecatedClass.CCShow()
+--CCShow class will be Deprecated,end
+
+--CCFadeOut class will be Deprecated,begin
+function DeprecatedClass.CCFadeOut()
+ deprecatedTip("CCFadeOut","cc.FadeOut")
+ return cc.FadeOut
+end
+_G["CCFadeOut"] = DeprecatedClass.CCFadeOut()
+--CCFadeOut class will be Deprecated,end
+
+--CCCallFunc class will be Deprecated,begin
+function DeprecatedClass.CCCallFunc()
+ deprecatedTip("CCCallFunc","cc.CallFunc")
+ return cc.CallFunc
+end
+_G["CCCallFunc"] = DeprecatedClass.CCCallFunc()
+--CCCallFunc class will be Deprecated,end
+
+--CCWaves3D class will be Deprecated,begin
+function DeprecatedClass.CCWaves3D()
+ deprecatedTip("CCWaves3D","cc.Waves3D")
+ return cc.Waves3D
+end
+_G["CCWaves3D"] = DeprecatedClass.CCWaves3D()
+--CCWaves3D class will be Deprecated,end
+
+--CCFlipX3D class will be Deprecated,begin
+function DeprecatedClass.CCFlipX3D()
+ deprecatedTip("CCFlipX3D","cc.FlipX3D")
+ return cc.FlipX3D
+end
+_G["CCFlipX3D"] = DeprecatedClass.CCFlipX3D()
+--CCFlipX3D class will be Deprecated,end
+
+--CCParticleFireworks class will be Deprecated,begin
+function DeprecatedClass.CCParticleFireworks()
+ deprecatedTip("CCParticleFireworks","cc.ParticleFireworks")
+ return cc.ParticleFireworks
+end
+_G["CCParticleFireworks"] = DeprecatedClass.CCParticleFireworks()
+--CCParticleFireworks class will be Deprecated,end
+
+--CCMenuItemImage class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemImage()
+ deprecatedTip("CCMenuItemImage","cc.MenuItemImage")
+ return cc.MenuItemImage
+end
+_G["CCMenuItemImage"] = DeprecatedClass.CCMenuItemImage()
+--CCMenuItemImage class will be Deprecated,end
+
+--CCParticleFire class will be Deprecated,begin
+function DeprecatedClass.CCParticleFire()
+ deprecatedTip("CCParticleFire","cc.ParticleFire")
+ return cc.ParticleFire
+end
+_G["CCParticleFire"] = DeprecatedClass.CCParticleFire()
+--CCParticleFire class will be Deprecated,end
+
+--CCMenuItem class will be Deprecated,begin
+function DeprecatedClass.CCMenuItem()
+ deprecatedTip("CCMenuItem","cc.MenuItem")
+ return cc.MenuItem
+end
+_G["CCMenuItem"] = DeprecatedClass.CCMenuItem()
+--CCMenuItem class will be Deprecated,end
+
+--CCActionEase class will be Deprecated,begin
+function DeprecatedClass.CCActionEase()
+ deprecatedTip("CCActionEase","cc.ActionEase")
+ return cc.ActionEase
+end
+_G["CCActionEase"] = DeprecatedClass.CCActionEase()
+--CCActionEase class will be Deprecated,end
+
+--CCTransitionSceneOriented class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSceneOriented()
+ deprecatedTip("CCTransitionSceneOriented","cc.TransitionSceneOriented")
+ return cc.TransitionSceneOriented
+end
+_G["CCTransitionSceneOriented"] = DeprecatedClass.CCTransitionSceneOriented()
+--CCTransitionSceneOriented class will be Deprecated,end
+
+--CCTransitionZoomFlipAngular class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipAngular()
+ deprecatedTip("CCTransitionZoomFlipAngular","cc.TransitionZoomFlipAngular")
+ return cc.TransitionZoomFlipAngular
+end
+_G["CCTransitionZoomFlipAngular"] = DeprecatedClass.CCTransitionZoomFlipAngular()
+--CCTransitionZoomFlipAngular class will be Deprecated,end
+
+--CCEaseIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseIn()
+ deprecatedTip("CCEaseIn","cc.EaseIn")
+ return cc.EaseIn
+end
+_G["CCEaseIn"] = DeprecatedClass.CCEaseIn()
+--CCEaseIn class will be Deprecated,end
+
+--CCEaseExponentialInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialInOut()
+ deprecatedTip("CCEaseExponentialInOut","cc.EaseExponentialInOut")
+ return cc.EaseExponentialInOut
+end
+_G["CCEaseExponentialInOut"] = DeprecatedClass.CCEaseExponentialInOut()
+--CCEaseExponentialInOut class will be Deprecated,end
+
+--CCTransitionFlipX class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipX()
+ deprecatedTip("CCTransitionFlipX","cc.TransitionFlipX")
+ return cc.TransitionFlipX
+end
+_G["CCTransitionFlipX"] = DeprecatedClass.CCTransitionFlipX()
+--CCTransitionFlipX class will be Deprecated,end
+
+--CCEaseExponentialOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialOut()
+ deprecatedTip("CCEaseExponentialOut","cc.EaseExponentialOut")
+ return cc.EaseExponentialOut
+end
+_G["CCEaseExponentialOut"] = DeprecatedClass.CCEaseExponentialOut()
+--CCEaseExponentialOut class will be Deprecated,end
+
+--CCLabel class will be Deprecated,begin
+function DeprecatedClass.CCLabel()
+ deprecatedTip("CCLabel","cc.Label")
+ return cc.Label
+end
+_G["CCLabel"] = DeprecatedClass.CCLabel()
+--CCLabel class will be Deprecated,end
+
+--CCApplication class will be Deprecated,begin
+function DeprecatedClass.CCApplication()
+ deprecatedTip("CCApplication","cc.Application")
+ return cc.Application
+end
+_G["CCApplication"] = DeprecatedClass.CCApplication()
+--CCApplication class will be Deprecated,end
+
+--CCDelayTime class will be Deprecated,begin
+function DeprecatedClass.CCDelayTime()
+ deprecatedTip("CCDelayTime","cc.DelayTime")
+ return cc.DelayTime
+end
+_G["CCDelayTime"] = DeprecatedClass.CCDelayTime()
+--CCDelayTime class will be Deprecated,end
+
+--CCLabelAtlas class will be Deprecated,begin
+function DeprecatedClass.CCLabelAtlas()
+ deprecatedTip("CCLabelAtlas","cc.LabelAtlas")
+ return cc.LabelAtlas
+end
+_G["CCLabelAtlas"] = DeprecatedClass.CCLabelAtlas()
+--CCLabelAtlas class will be Deprecated,end
+
+--CCLabelBMFont class will be Deprecated,begin
+function DeprecatedClass.CCLabelBMFont()
+ deprecatedTip("CCLabelBMFont","cc.LabelBMFont")
+ return cc.LabelBMFont
+end
+_G["CCLabelBMFont"] = DeprecatedClass.CCLabelBMFont()
+--CCLabelBMFont class will be Deprecated,end
+
+--CCFadeOutTRTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutTRTiles()
+ deprecatedTip("CCFadeOutTRTiles","cc.FadeOutTRTiles")
+ return cc.FadeOutTRTiles
+end
+_G["CCFadeOutTRTiles"] = DeprecatedClass.CCFadeOutTRTiles()
+--CCFadeOutTRTiles class will be Deprecated,end
+
+--CCEaseElasticIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticIn()
+ deprecatedTip("CCEaseElasticIn","cc.EaseElasticIn")
+ return cc.EaseElasticIn
+end
+_G["CCEaseElasticIn"] = DeprecatedClass.CCEaseElasticIn()
+--CCEaseElasticIn class will be Deprecated,end
+
+--CCParticleSpiral class will be Deprecated,begin
+function DeprecatedClass.CCParticleSpiral()
+ deprecatedTip("CCParticleSpiral","cc.ParticleSpiral")
+ return cc.ParticleSpiral
+end
+_G["CCParticleSpiral"] = DeprecatedClass.CCParticleSpiral()
+--CCParticleSpiral class will be Deprecated,end
+
+--CCFiniteTimeAction class will be Deprecated,begin
+function DeprecatedClass.CCFiniteTimeAction()
+ deprecatedTip("CCFiniteTimeAction","cc.FiniteTimeAction")
+ return cc.FiniteTimeAction
+end
+_G["CCFiniteTimeAction"] = DeprecatedClass.CCFiniteTimeAction()
+--CCFiniteTimeAction class will be Deprecated,end
+
+--CCFadeOutDownTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutDownTiles()
+ deprecatedTip("CCFadeOutDownTiles","cc.FadeOutDownTiles")
+ return cc.FadeOutDownTiles
+end
+_G["CCFadeOutDownTiles"] = DeprecatedClass.CCFadeOutDownTiles()
+--CCFadeOutDownTiles class will be Deprecated,end
+
+--CCJumpTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCJumpTiles3D()
+ deprecatedTip("CCJumpTiles3D","cc.JumpTiles3D")
+ return cc.JumpTiles3D
+end
+_G["CCJumpTiles3D"] = DeprecatedClass.CCJumpTiles3D()
+--CCJumpTiles3D class will be Deprecated,end
+
+--CCEaseBackIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackIn()
+ deprecatedTip("CCEaseBackIn","cc.EaseBackIn")
+ return cc.EaseBackIn
+end
+_G["CCEaseBackIn"] = DeprecatedClass.CCEaseBackIn()
+--CCEaseBackIn class will be Deprecated,end
+
+--CCSpriteBatchNode class will be Deprecated,begin
+function DeprecatedClass.CCSpriteBatchNode()
+ deprecatedTip("CCSpriteBatchNode","cc.SpriteBatchNode")
+ return cc.SpriteBatchNode
+end
+_G["CCSpriteBatchNode"] = DeprecatedClass.CCSpriteBatchNode()
+--CCSpriteBatchNode class will be Deprecated,end
+
+--CCParticleSystem class will be Deprecated,begin
+function DeprecatedClass.CCParticleSystem()
+ deprecatedTip("CCParticleSystem","cc.ParticleSystem")
+ return cc.ParticleSystem
+end
+_G["CCParticleSystem"] = DeprecatedClass.CCParticleSystem()
+--CCParticleSystem class will be Deprecated,end
+
+--CCActionTween class will be Deprecated,begin
+function DeprecatedClass.CCActionTween()
+ deprecatedTip("CCActionTween","cc.ActionTween")
+ return cc.ActionTween
+end
+_G["CCActionTween"] = DeprecatedClass.CCActionTween()
+--CCActionTween class will be Deprecated,end
+
+--CCTransitionFadeDown class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeDown()
+ deprecatedTip("CCTransitionFadeDown","cc.TransitionFadeDown")
+ return cc.TransitionFadeDown
+end
+_G["CCTransitionFadeDown"] = DeprecatedClass.CCTransitionFadeDown()
+--CCTransitionFadeDown class will be Deprecated,end
+
+--CCParticleSun class will be Deprecated,begin
+function DeprecatedClass.CCParticleSun()
+ deprecatedTip("CCParticleSun","cc.ParticleSun")
+ return cc.ParticleSun
+end
+_G["CCParticleSun"] = DeprecatedClass.CCParticleSun()
+--CCParticleSun class will be Deprecated,end
+
+--CCTransitionProgressHorizontal class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressHorizontal()
+ deprecatedTip("CCTransitionProgressHorizontal","cc.TransitionProgressHorizontal")
+ return cc.TransitionProgressHorizontal
+end
+_G["CCTransitionProgressHorizontal"] = DeprecatedClass.CCTransitionProgressHorizontal()
+--CCTransitionProgressHorizontal class will be Deprecated,end
+
+--CCRipple3D class will be Deprecated,begin
+function DeprecatedClass.CCRipple3D()
+ deprecatedTip("CCRipple3D","cc.Ripple3D")
+ return cc.Ripple3D
+end
+_G["CCRipple3D"] = DeprecatedClass.CCRipple3D()
+--CCRipple3D class will be Deprecated,end
+
+--CCTMXLayer class will be Deprecated,begin
+function DeprecatedClass.CCTMXLayer()
+ deprecatedTip("CCTMXLayer","cc.TMXLayer")
+ return cc.TMXLayer
+end
+_G["CCTMXLayer"] = DeprecatedClass.CCTMXLayer()
+--CCTMXLayer class will be Deprecated,end
+
+--CCFlipX class will be Deprecated,begin
+function DeprecatedClass.CCFlipX()
+ deprecatedTip("CCFlipX","cc.FlipX")
+ return cc.FlipX
+end
+_G["CCFlipX"] = DeprecatedClass.CCFlipX()
+--CCFlipX class will be Deprecated,end
+
+--CCFlipY class will be Deprecated,begin
+function DeprecatedClass.CCFlipY()
+ deprecatedTip("CCFlipY","cc.FlipY")
+ return cc.FlipY
+end
+_G["CCFlipY"] = DeprecatedClass.CCFlipY()
+--CCFlipY class will be Deprecated,end
+
+--CCTransitionSplitCols class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSplitCols()
+ deprecatedTip("CCTransitionSplitCols","cc.TransitionSplitCols")
+ return cc.TransitionSplitCols
+end
+_G["CCTransitionSplitCols"] = DeprecatedClass.CCTransitionSplitCols()
+--CCTransitionSplitCols class will be Deprecated,end
+
+--CCTimer class will be Deprecated,begin
+function DeprecatedClass.CCTimer()
+ deprecatedTip("CCTimer","cc.Timer")
+ return cc.Timer
+end
+_G["CCTimer"] = DeprecatedClass.CCTimer()
+--CCTimer class will be Deprecated,end
+
+--CCFadeTo class will be Deprecated,begin
+function DeprecatedClass.CCFadeTo()
+ deprecatedTip("CCFadeTo","cc.FadeTo")
+ return cc.FadeTo
+end
+_G["CCFadeTo"] = DeprecatedClass.CCFadeTo()
+--CCFadeTo class will be Deprecated,end
+
+--CCRepeatForever class will be Deprecated,begin
+function DeprecatedClass.CCRepeatForever()
+ deprecatedTip("CCRepeatForever","cc.RepeatForever")
+ return cc.RepeatForever
+end
+_G["CCRepeatForever"] = DeprecatedClass.CCRepeatForever()
+--CCRepeatForever class will be Deprecated,end
+
+--CCPlace class will be Deprecated,begin
+function DeprecatedClass.CCPlace()
+ deprecatedTip("CCPlace","cc.Place")
+ return cc.Place
+end
+_G["CCPlace"] = DeprecatedClass.CCPlace()
+--CCPlace class will be Deprecated,end
+
+
+--CCGLProgram class will be Deprecated,begin
+function DeprecatedClass.CCGLProgram()
+ deprecatedTip("CCGLProgram","cc.GLProgram")
+ return cc.GLProgram
+end
+_G["CCGLProgram"] = DeprecatedClass.CCGLProgram()
+--CCGLProgram class will be Deprecated,end
+
+--CCEaseBounceOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceOut()
+ deprecatedTip("CCEaseBounceOut","cc.EaseBounceOut")
+ return cc.EaseBounceOut
+end
+_G["CCEaseBounceOut"] = DeprecatedClass.CCEaseBounceOut()
+--CCEaseBounceOut class will be Deprecated,end
+
+--CCCardinalSplineBy class will be Deprecated,begin
+function DeprecatedClass.CCCardinalSplineBy()
+ deprecatedTip("CCCardinalSplineBy","cc.CardinalSplineBy")
+ return cc.CardinalSplineBy
+end
+_G["CCCardinalSplineBy"] = DeprecatedClass.CCCardinalSplineBy()
+--CCCardinalSplineBy class will be Deprecated,end
+
+--CCSpriteFrameCache class will be Deprecated,begin
+function DeprecatedClass.CCSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache","cc.SpriteFrameCache")
+ return cc.SpriteFrameCache
+end
+_G["CCSpriteFrameCache"] = DeprecatedClass.CCSpriteFrameCache()
+--CCSpriteFrameCache class will be Deprecated,end
+
+--CCTransitionShrinkGrow class will be Deprecated,begin
+function DeprecatedClass.CCTransitionShrinkGrow()
+ deprecatedTip("CCTransitionShrinkGrow","cc.TransitionShrinkGrow")
+ return cc.TransitionShrinkGrow
+end
+_G["CCTransitionShrinkGrow"] = DeprecatedClass.CCTransitionShrinkGrow()
+--CCTransitionShrinkGrow class will be Deprecated,end
+
+--CCSplitCols class will be Deprecated,begin
+function DeprecatedClass.CCSplitCols()
+ deprecatedTip("CCSplitCols","cc.SplitCols")
+ return cc.SplitCols
+end
+_G["CCSplitCols"] = DeprecatedClass.CCSplitCols()
+--CCSplitCols class will be Deprecated,end
+
+--CCClippingNode class will be Deprecated,begin
+function DeprecatedClass.CCClippingNode()
+ deprecatedTip("CCClippingNode","cc.ClippingNode")
+ return cc.ClippingNode
+end
+_G["CCClippingNode"] = DeprecatedClass.CCClippingNode()
+--CCClippingNode class will be Deprecated,end
+
+--CCEaseBounceInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceInOut()
+ deprecatedTip("CCEaseBounceInOut","cc.EaseBounceInOut")
+ return cc.EaseBounceInOut
+end
+_G["CCEaseBounceInOut"] = DeprecatedClass.CCEaseBounceInOut()
+--CCEaseBounceInOut class will be Deprecated,end
+
+--CCLiquid class will be Deprecated,begin
+function DeprecatedClass.CCLiquid()
+ deprecatedTip("CCLiquid","cc.Liquid")
+ return cc.Liquid
+end
+_G["CCLiquid"] = DeprecatedClass.CCLiquid()
+--CCLiquid class will be Deprecated,end
+
+--CCParticleFlower class will be Deprecated,begin
+function DeprecatedClass.CCParticleFlower()
+ deprecatedTip("CCParticleFlower","cc.ParticleFlower")
+ return cc.ParticleFlower
+end
+_G["CCParticleFlower"] = DeprecatedClass.CCParticleFlower()
+--CCParticleFlower class will be Deprecated,end
+
+--CCParticleSmoke class will be Deprecated,begin
+function DeprecatedClass.CCParticleSmoke()
+ deprecatedTip("CCParticleSmoke","cc.ParticleSmoke")
+ return cc.ParticleSmoke
+end
+_G["CCParticleSmoke"] = DeprecatedClass.CCParticleSmoke()
+--CCParticleSmoke class will be Deprecated,end
+
+--CCImage class will be Deprecated,begin
+function DeprecatedClass.CCImage()
+ deprecatedTip("CCImage","cc.Image")
+ return cc.Image
+end
+_G["CCImage"] = DeprecatedClass.CCImage()
+--CCImage class will be Deprecated,end
+
+--CCTurnOffTiles class will be Deprecated,begin
+function DeprecatedClass.CCTurnOffTiles()
+ deprecatedTip("CCTurnOffTiles","cc.TurnOffTiles")
+ return cc.TurnOffTiles
+end
+_G["CCTurnOffTiles"] = DeprecatedClass.CCTurnOffTiles()
+--CCTurnOffTiles class will be Deprecated,end
+
+--CCBlink class will be Deprecated,begin
+function DeprecatedClass.CCBlink()
+ deprecatedTip("CCBlink","cc.Blink")
+ return cc.Blink
+end
+_G["CCBlink"] = DeprecatedClass.CCBlink()
+--CCBlink class will be Deprecated,end
+
+--CCShaderCache class will be Deprecated,begin
+function DeprecatedClass.CCShaderCache()
+ deprecatedTip("CCShaderCache","cc.ShaderCache")
+ return cc.ShaderCache
+end
+_G["CCShaderCache"] = DeprecatedClass.CCShaderCache()
+--CCShaderCache class will be Deprecated,end
+
+--CCJumpTo class will be Deprecated,begin
+function DeprecatedClass.CCJumpTo()
+ deprecatedTip("CCJumpTo","cc.JumpTo")
+ return cc.JumpTo
+end
+_G["CCJumpTo"] = DeprecatedClass.CCJumpTo()
+--CCJumpTo class will be Deprecated,end
+
+--CCAtlasNode class will be Deprecated,begin
+function DeprecatedClass.CCAtlasNode()
+ deprecatedTip("CCAtlasNode","cc.AtlasNode")
+ return cc.AtlasNode
+end
+_G["CCAtlasNode"] = DeprecatedClass.CCAtlasNode()
+--CCAtlasNode class will be Deprecated,end
+
+--CCTransitionJumpZoom class will be Deprecated,begin
+function DeprecatedClass.CCTransitionJumpZoom()
+ deprecatedTip("CCTransitionJumpZoom","cc.TransitionJumpZoom")
+ return cc.TransitionJumpZoom
+end
+_G["CCTransitionJumpZoom"] = DeprecatedClass.CCTransitionJumpZoom()
+--CCTransitionJumpZoom class will be Deprecated,end
+
+--CCTransitionProgressVertical class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressVertical()
+ deprecatedTip("CCTransitionProgressVertical","cc.TransitionProgressVertical")
+ return cc.TransitionProgressVertical
+end
+_G["CCTransitionProgressVertical"] = DeprecatedClass.CCTransitionProgressVertical()
+--CCTransitionProgressVertical class will be Deprecated,end
+
+--CCAnimationFrame class will be Deprecated,begin
+function DeprecatedClass.CCAnimationFrame()
+ deprecatedTip("CCAnimationFrame","cc.AnimationFrame")
+ return cc.AnimationFrame
+end
+_G["CCAnimationFrame"] = DeprecatedClass.CCAnimationFrame()
+--CCAnimationFrame class will be Deprecated,end
+
+--CCTintTo class will be Deprecated,begin
+function DeprecatedClass.CCTintTo()
+ deprecatedTip("CCTintTo","cc.TintTo")
+ return cc.TintTo
+end
+_G["CCTintTo"] = DeprecatedClass.CCTintTo()
+--CCTintTo class will be Deprecated,end
+
+--CCTiledGrid3DAction class will be Deprecated,begin
+function DeprecatedClass.CCTiledGrid3DAction()
+ deprecatedTip("CCTiledGrid3DAction","cc.TiledGrid3DAction")
+ return cc.TiledGrid3DAction
+end
+_G["CCTiledGrid3DAction"] = DeprecatedClass.CCTiledGrid3DAction()
+--CCTiledGrid3DAction class will be Deprecated,end
+
+--CCTMXTilesetInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXTilesetInfo()
+ deprecatedTip("CCTMXTilesetInfo","cc.TMXTilesetInfo")
+ return cc.TMXTilesetInfo
+end
+_G["CCTMXTilesetInfo"] = DeprecatedClass.CCTMXTilesetInfo()
+--CCTMXTilesetInfo class will be Deprecated,end
+
+--CCTMXObjectGroup class will be Deprecated,begin
+function DeprecatedClass.CCTMXObjectGroup()
+ deprecatedTip("CCTMXObjectGroup","cc.TMXObjectGroup")
+ return cc.TMXObjectGroup
+end
+_G["CCTMXObjectGroup"] = DeprecatedClass.CCTMXObjectGroup()
+--CCTMXObjectGroup class will be Deprecated,end
+
+--CCParticleGalaxy class will be Deprecated,begin
+function DeprecatedClass.CCParticleGalaxy()
+ deprecatedTip("CCParticleGalaxy","cc.ParticleGalaxy")
+ return cc.ParticleGalaxy
+end
+_G["CCParticleGalaxy"] = DeprecatedClass.CCParticleGalaxy()
+--CCParticleGalaxy class will be Deprecated,end
+
+--CCTwirl class will be Deprecated,begin
+function DeprecatedClass.CCTwirl()
+ deprecatedTip("CCTwirl","cc.Twirl")
+ return cc.Twirl
+end
+_G["CCTwirl"] = DeprecatedClass.CCTwirl()
+--CCTwirl class will be Deprecated,end
+
+--CCMenuItemLabel class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemLabel()
+ deprecatedTip("CCMenuItemLabel","cc.MenuItemLabel")
+ return cc.MenuItemLabel
+end
+_G["CCMenuItemLabel"] = DeprecatedClass.CCMenuItemLabel()
+--CCMenuItemLabel class will be Deprecated,end
+
+--CCLayerColor class will be Deprecated,begin
+function DeprecatedClass.CCLayerColor()
+ deprecatedTip("CCLayerColor","cc.LayerColor")
+ return cc.LayerColor
+end
+_G["CCLayerColor"] = DeprecatedClass.CCLayerColor()
+--CCLayerColor class will be Deprecated,end
+
+--CCFadeOutBLTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutBLTiles()
+ deprecatedTip("CCFadeOutBLTiles","cc.FadeOutBLTiles")
+ return cc.FadeOutBLTiles
+end
+_G["CCFadeOutBLTiles"] = DeprecatedClass.CCFadeOutBLTiles()
+--CCFadeOutBLTiles class will be Deprecated,end
+
+--CCTransitionProgress class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgress()
+ deprecatedTip("CCTransitionProgress","cc.TransitionProgress")
+ return cc.TransitionProgress
+end
+_G["CCTransitionProgress"] = DeprecatedClass.CCTransitionProgress()
+--CCTransitionProgress class will be Deprecated,end
+
+--CCEaseRateAction class will be Deprecated,begin
+function DeprecatedClass.CCEaseRateAction()
+ deprecatedTip("CCEaseRateAction","cc.EaseRateAction")
+ return cc.EaseRateAction
+end
+_G["CCEaseRateAction"] = DeprecatedClass.CCEaseRateAction()
+--CCEaseRateAction class will be Deprecated,end
+
+--CCLayerGradient class will be Deprecated,begin
+function DeprecatedClass.CCLayerGradient()
+ deprecatedTip("CCLayerGradient","cc.LayerGradient")
+ return cc.LayerGradient
+end
+_G["CCLayerGradient"] = DeprecatedClass.CCLayerGradient()
+--CCLayerGradient class will be Deprecated,end
+
+--CCMenuItemSprite class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemSprite()
+ deprecatedTip("CCMenuItemSprite","cc.MenuItemSprite")
+ return cc.MenuItemSprite
+end
+_G["CCMenuItemSprite"] = DeprecatedClass.CCMenuItemSprite()
+--CCMenuItemSprite class will be Deprecated,end
+
+--CCNode class will be Deprecated,begin
+function DeprecatedClass.CCNode()
+ deprecatedTip("CCNode","cc.Node")
+ return cc.Node
+end
+_G["CCNode"] = DeprecatedClass.CCNode()
+--CCNode class will be Deprecated,end
+
+--CCToggleVisibility class will be Deprecated,begin
+function DeprecatedClass.CCToggleVisibility()
+ deprecatedTip("CCToggleVisibility","cc.ToggleVisibility")
+ return cc.ToggleVisibility
+end
+_G["CCToggleVisibility"] = DeprecatedClass.CCToggleVisibility()
+--CCToggleVisibility class will be Deprecated,end
+
+--CCRepeat class will be Deprecated,begin
+function DeprecatedClass.CCRepeat()
+ deprecatedTip("CCRepeat","cc.Repeat")
+ return cc.Repeat
+end
+_G["CCRepeat"] = DeprecatedClass.CCRepeat()
+--CCRepeat class will be Deprecated,end
+
+--CCRenderTexture class will be Deprecated,begin
+function DeprecatedClass.CCRenderTexture()
+ deprecatedTip("CCRenderTexture","cc.RenderTexture")
+ return cc.RenderTexture
+end
+_G["CCRenderTexture"] = DeprecatedClass.CCRenderTexture()
+--CCRenderTexture class will be Deprecated,end
+
+--CCTransitionFlipY class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipY()
+ deprecatedTip("CCTransitionFlipY","cc.TransitionFlipY")
+ return cc.TransitionFlipY
+end
+_G["CCTransitionFlipY"] = DeprecatedClass.CCTransitionFlipY()
+--CCTransitionFlipY class will be Deprecated,end
+
+--CCLayerMultiplex class will be Deprecated,begin
+function DeprecatedClass.CCLayerMultiplex()
+ deprecatedTip("CCLayerMultiplex","cc.LayerMultiplex")
+ return cc.LayerMultiplex
+end
+_G["CCLayerMultiplex"] = DeprecatedClass.CCLayerMultiplex()
+--CCLayerMultiplex class will be Deprecated,end
+
+--CCTMXLayerInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXLayerInfo()
+ deprecatedTip("CCTMXLayerInfo","cc.TMXLayerInfo")
+ return cc.TMXLayerInfo
+end
+_G["CCTMXLayerInfo"] = DeprecatedClass.CCTMXLayerInfo()
+--CCTMXLayerInfo class will be Deprecated,end
+
+--CCEaseBackInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackInOut()
+ deprecatedTip("CCEaseBackInOut","cc.EaseBackInOut")
+ return cc.EaseBackInOut
+end
+_G["CCEaseBackInOut"] = DeprecatedClass.CCEaseBackInOut()
+--CCEaseBackInOut class will be Deprecated,end
+
+--CCActionInstant class will be Deprecated,begin
+function DeprecatedClass.CCActionInstant()
+ deprecatedTip("CCActionInstant","cc.ActionInstant")
+ return cc.ActionInstant
+end
+_G["CCActionInstant"] = DeprecatedClass.CCActionInstant()
+--CCActionInstant class will be Deprecated,end
+
+--CCTargetedAction class will be Deprecated,begin
+function DeprecatedClass.CCTargetedAction()
+ deprecatedTip("CCTargetedAction","cc.TargetedAction")
+ return cc.TargetedAction
+end
+_G["CCTargetedAction"] = DeprecatedClass.CCTargetedAction()
+--CCTargetedAction class will be Deprecated,end
+
+--CCDrawNode class will be Deprecated,begin
+function DeprecatedClass.CCDrawNode()
+ deprecatedTip("CCDrawNode","cc.DrawNode")
+ return cc.DrawNode
+end
+_G["CCDrawNode"] = DeprecatedClass.CCDrawNode()
+--CCDrawNode class will be Deprecated,end
+
+--CCTransitionTurnOffTiles class will be Deprecated,begin
+function DeprecatedClass.CCTransitionTurnOffTiles()
+ deprecatedTip("CCTransitionTurnOffTiles","cc.TransitionTurnOffTiles")
+ return cc.TransitionTurnOffTiles
+end
+_G["CCTransitionTurnOffTiles"] = DeprecatedClass.CCTransitionTurnOffTiles()
+--CCTransitionTurnOffTiles class will be Deprecated,end
+
+--CCRotateTo class will be Deprecated,begin
+function DeprecatedClass.CCRotateTo()
+ deprecatedTip("CCRotateTo","cc.RotateTo")
+ return cc.RotateTo
+end
+_G["CCRotateTo"] = DeprecatedClass.CCRotateTo()
+--CCRotateTo class will be Deprecated,end
+
+--CCTransitionSplitRows class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSplitRows()
+ deprecatedTip("CCTransitionSplitRows","cc.TransitionSplitRows")
+ return cc.TransitionSplitRows
+end
+_G["CCTransitionSplitRows"] = DeprecatedClass.CCTransitionSplitRows()
+--CCTransitionSplitRows class will be Deprecated,end
+
+--CCTransitionProgressRadialCCW class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressRadialCCW()
+ deprecatedTip("CCTransitionProgressRadialCCW","cc.TransitionProgressRadialCCW")
+ return cc.TransitionProgressRadialCCW
+end
+_G["CCTransitionProgressRadialCCW"] = DeprecatedClass.CCTransitionProgressRadialCCW()
+--CCTransitionProgressRadialCCW class will be Deprecated,end
+
+--CCScaleTo class will be Deprecated,begin
+function DeprecatedClass.CCScaleTo()
+ deprecatedTip("CCScaleTo","cc.ScaleTo")
+ return cc.ScaleTo
+end
+_G["CCScaleTo"] = DeprecatedClass.CCScaleTo()
+--CCScaleTo class will be Deprecated,end
+
+--CCTransitionPageTurn class will be Deprecated,begin
+function DeprecatedClass.CCTransitionPageTurn()
+ deprecatedTip("CCTransitionPageTurn","cc.TransitionPageTurn")
+ return cc.TransitionPageTurn
+end
+_G["CCTransitionPageTurn"] = DeprecatedClass.CCTransitionPageTurn()
+--CCTransitionPageTurn class will be Deprecated,end
+
+--CCParticleExplosion class will be Deprecated,begin
+function DeprecatedClass.CCParticleExplosion()
+ deprecatedTip("CCParticleExplosion","cc.ParticleExplosion")
+ return cc.ParticleExplosion
+end
+_G["CCParticleExplosion"] = DeprecatedClass.CCParticleExplosion()
+--CCParticleExplosion class will be Deprecated,end
+
+--CCMenu class will be Deprecated,begin
+function DeprecatedClass.CCMenu()
+ deprecatedTip("CCMenu","cc.Menu")
+ return cc.Menu
+end
+_G["CCMenu"] = DeprecatedClass.CCMenu()
+--CCMenu class will be Deprecated,end
+
+--CCTexture2D class will be Deprecated,begin
+function DeprecatedClass.CCTexture2D()
+ deprecatedTip("CCTexture2D","cc.Texture2D")
+ return cc.Texture2D
+end
+_G["CCTexture2D"] = DeprecatedClass.CCTexture2D()
+--CCTexture2D class will be Deprecated,end
+
+--CCActionManager class will be Deprecated,begin
+function DeprecatedClass.CCActionManager()
+ deprecatedTip("CCActionManager","cc.ActionManager")
+ return cc.ActionManager
+end
+_G["CCActionManager"] = DeprecatedClass.CCActionManager()
+--CCActionManager class will be Deprecated,end
+
+--CCParticleBatchNode class will be Deprecated,begin
+function DeprecatedClass.CCParticleBatchNode()
+ deprecatedTip("CCParticleBatchNode","cc.ParticleBatchNode")
+ return cc.ParticleBatchNode
+end
+_G["CCParticleBatchNode"] = DeprecatedClass.CCParticleBatchNode()
+--CCParticleBatchNode class will be Deprecated,end
+
+--CCTransitionZoomFlipX class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipX()
+ deprecatedTip("CCTransitionZoomFlipX","cc.TransitionZoomFlipX")
+ return cc.TransitionZoomFlipX
+end
+_G["CCTransitionZoomFlipX"] = DeprecatedClass.CCTransitionZoomFlipX()
+--CCTransitionZoomFlipX class will be Deprecated,end
+
+--CCScaleBy class will be Deprecated,begin
+function DeprecatedClass.CCScaleBy()
+ deprecatedTip("CCScaleBy","cc.ScaleBy")
+ return cc.ScaleBy
+end
+_G["CCScaleBy"] = DeprecatedClass.CCScaleBy()
+--CCScaleBy class will be Deprecated,end
+
+--CCTileMapAtlas class will be Deprecated,begin
+function DeprecatedClass.CCTileMapAtlas()
+ deprecatedTip("CCTileMapAtlas","cc.TileMapAtlas")
+ return cc.TileMapAtlas
+end
+_G["CCTileMapAtlas"] = DeprecatedClass.CCTileMapAtlas()
+--CCTileMapAtlas class will be Deprecated,end
+
+--CCAction class will be Deprecated,begin
+function DeprecatedClass.CCAction()
+ deprecatedTip("CCAction","cc.Action")
+ return cc.Action
+end
+_G["CCAction"] = DeprecatedClass.CCAction()
+--CCAction class will be Deprecated,end
+
+--CCLens3D class will be Deprecated,begin
+function DeprecatedClass.CCLens3D()
+ deprecatedTip("CCLens3D","cc.Lens3D")
+ return cc.Lens3D
+end
+_G["CCLens3D"] = DeprecatedClass.CCLens3D()
+--CCLens3D class will be Deprecated,end
+
+--CCAnimation class will be Deprecated,begin
+function DeprecatedClass.CCAnimation()
+ deprecatedTip("CCAnimation","cc.Animation")
+ return cc.Animation
+end
+_G["CCAnimation"] = DeprecatedClass.CCAnimation()
+--CCAnimation class will be Deprecated,end
+
+--CCTransitionSlideInT class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInT()
+ deprecatedTip("CCTransitionSlideInT","cc.TransitionSlideInT")
+ return cc.TransitionSlideInT
+end
+_G["CCTransitionSlideInT"] = DeprecatedClass.CCTransitionSlideInT()
+--CCTransitionSlideInT class will be Deprecated,end
+
+--CCSpawn class will be Deprecated,begin
+function DeprecatedClass.CCSpawn()
+ deprecatedTip("CCSpawn","cc.Spawn")
+ return cc.Spawn
+end
+_G["CCSpawn"] = DeprecatedClass.CCSpawn()
+--CCSpawn class will be Deprecated,end
+
+--CCSet class will be Deprecated,begin
+function DeprecatedClass.CCSet()
+ deprecatedTip("CCSet","cc.Set")
+ return cc.Set
+end
+_G["CCSet"] = DeprecatedClass.CCSet()
+--CCSet class will be Deprecated,end
+
+--CCShakyTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCShakyTiles3D()
+ deprecatedTip("CCShakyTiles3D","cc.ShakyTiles3D")
+ return cc.ShakyTiles3D
+end
+_G["CCShakyTiles3D"] = DeprecatedClass.CCShakyTiles3D()
+--CCShakyTiles3D class will be Deprecated,end
+
+--CCPageTurn3D class will be Deprecated,begin
+function DeprecatedClass.CCPageTurn3D()
+ deprecatedTip("CCPageTurn3D","cc.PageTurn3D")
+ return cc.PageTurn3D
+end
+_G["CCPageTurn3D"] = DeprecatedClass.CCPageTurn3D()
+--CCPageTurn3D class will be Deprecated,end
+
+--CCGrid3D class will be Deprecated,begin
+function DeprecatedClass.CCGrid3D()
+ deprecatedTip("CCGrid3D","cc.Grid3D")
+ return cc.Grid3D
+end
+_G["CCGrid3D"] = DeprecatedClass.CCGrid3D()
+--CCGrid3D class will be Deprecated,end
+
+--CCTransitionProgressInOut class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressInOut()
+ deprecatedTip("CCTransitionProgressInOut","cc.TransitionProgressInOut")
+ return cc.TransitionProgressInOut
+end
+_G["CCTransitionProgressInOut"] = DeprecatedClass.CCTransitionProgressInOut()
+--CCTransitionProgressInOut class will be Deprecated,end
+
+--CCTransitionFadeBL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeBL()
+ deprecatedTip("CCTransitionFadeBL","cc.TransitionFadeBL")
+ return cc.TransitionFadeBL
+end
+_G["CCTransitionFadeBL"] = DeprecatedClass.CCTransitionFadeBL()
+--CCTransitionFadeBL class will be Deprecated,end
+
+--CCCamera class will be Deprecated,begin
+function DeprecatedClass.CCCamera()
+ deprecatedTip("CCCamera","cc.Camera")
+ return cc.Camera
+end
+_G["CCCamera"] = DeprecatedClass.CCCamera()
+--CCCamera class will be Deprecated,end
+
+--CCLayerRGBA class will be Deprecated,begin
+function DeprecatedClass.CCLayerRGBA()
+ deprecatedTip("CCLayerRGBA","cc.Layer")
+ return cc.Layer
+end
+_G["CCLayerRGBA"] = DeprecatedClass.CCLayerRGBA()
+--CCLayerRGBA class will be Deprecated,end
+
+--LayerRGBA class will be Deprecated,begin
+function DeprecatedClass.LayerRGBA()
+ deprecatedTip("cc.LayerRGBA","cc.Layer")
+ return cc.Layer
+end
+_G["cc"]["LayerRGBA"] = DeprecatedClass.LayerRGBA()
+--LayerRGBA class will be Deprecated,end
+
+--CCBezierTo class will be Deprecated,begin
+function DeprecatedClass.CCBezierTo()
+ deprecatedTip("CCBezierTo","cc.BezierTo")
+ return cc.BezierTo
+end
+_G["CCBezierTo"] = DeprecatedClass.CCBezierTo()
+--CCBezierTo class will be Deprecated,end
+
+--CCFollow class will be Deprecated,begin
+function DeprecatedClass.CCFollow()
+ deprecatedTip("CCFollow","cc.Follow")
+ return cc.Follow
+end
+_G["CCFollow"] = DeprecatedClass.CCFollow()
+--CCFollow class will be Deprecated,end
+
+--CCTintBy class will be Deprecated,begin
+function DeprecatedClass.CCTintBy()
+ deprecatedTip("CCTintBy","cc.TintBy")
+ return cc.TintBy
+end
+_G["CCTintBy"] = DeprecatedClass.CCTintBy()
+--CCTintBy class will be Deprecated,end
+
+--CCActionInterval class will be Deprecated,begin
+function DeprecatedClass.CCActionInterval()
+ deprecatedTip("CCActionInterval","cc.ActionInterval")
+ return cc.ActionInterval
+end
+_G["CCActionInterval"] = DeprecatedClass.CCActionInterval()
+--CCActionInterval class will be Deprecated,end
+
+--CCAnimate class will be Deprecated,begin
+function DeprecatedClass.CCAnimate()
+ deprecatedTip("CCAnimate","cc.Animate")
+ return cc.Animate
+end
+_G["CCAnimate"] = DeprecatedClass.CCAnimate()
+--CCAnimate class will be Deprecated,end
+
+--CCProgressTimer class will be Deprecated,begin
+function DeprecatedClass.CCProgressTimer()
+ deprecatedTip("CCProgressTimer","cc.ProgressTimer")
+ return cc.ProgressTimer
+end
+_G["CCProgressTimer"] = DeprecatedClass.CCProgressTimer()
+--CCProgressTimer class will be Deprecated,end
+
+--CCParticleMeteor class will be Deprecated,begin
+function DeprecatedClass.CCParticleMeteor()
+ deprecatedTip("CCParticleMeteor","cc.ParticleMeteor")
+ return cc.ParticleMeteor
+end
+_G["CCParticleMeteor"] = DeprecatedClass.CCParticleMeteor()
+--CCParticleMeteor class will be Deprecated,end
+
+--CCTransitionFadeTR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeTR()
+ deprecatedTip("CCTransitionFadeTR","cc.TransitionFadeTR")
+ return cc.TransitionFadeTR
+end
+_G["CCTransitionFadeTR"] = DeprecatedClass.CCTransitionFadeTR()
+--CCTransitionFadeTR class will be Deprecated,end
+
+--CCCatmullRomTo class will be Deprecated,begin
+function DeprecatedClass.CCCatmullRomTo()
+ deprecatedTip("CCCatmullRomTo","cc.CatmullRomTo")
+ return cc.CatmullRomTo
+end
+_G["CCCatmullRomTo"] = DeprecatedClass.CCCatmullRomTo()
+--CCCatmullRomTo class will be Deprecated,end
+
+--CCTransitionZoomFlipY class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipY()
+ deprecatedTip("CCTransitionZoomFlipY","cc.TransitionZoomFlipY")
+ return cc.TransitionZoomFlipY
+end
+_G["CCTransitionZoomFlipY"] = DeprecatedClass.CCTransitionZoomFlipY()
+--CCTransitionZoomFlipY class will be Deprecated,end
+
+--CCTransitionCrossFade class will be Deprecated,begin
+function DeprecatedClass.CCTransitionCrossFade()
+ deprecatedTip("CCTransitionCrossFade","cc.TransitionCrossFade")
+ return cc.TransitionCrossFade
+end
+_G["CCTransitionCrossFade"] = DeprecatedClass.CCTransitionCrossFade()
+--CCTransitionCrossFade class will be Deprecated,end
+
+--CCGridBase class will be Deprecated,begin
+function DeprecatedClass.CCGridBase()
+ deprecatedTip("CCGridBase","cc.GridBase")
+ return cc.GridBase
+end
+_G["CCGridBase"] = DeprecatedClass.CCGridBase()
+--CCGridBase class will be Deprecated,end
+
+--CCSkewTo class will be Deprecated,begin
+function DeprecatedClass.CCSkewTo()
+ deprecatedTip("CCSkewTo","cc.SkewTo")
+ return cc.SkewTo
+end
+_G["CCSkewTo"] = DeprecatedClass.CCSkewTo()
+--CCSkewTo class will be Deprecated,end
+
+--CCCardinalSplineTo class will be Deprecated,begin
+function DeprecatedClass.CCCardinalSplineTo()
+ deprecatedTip("CCCardinalSplineTo","cc.CardinalSplineTo")
+ return cc.CardinalSplineTo
+end
+_G["CCCardinalSplineTo"] = DeprecatedClass.CCCardinalSplineTo()
+--CCCardinalSplineTo class will be Deprecated,end
+
+--CCTMXMapInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXMapInfo()
+ deprecatedTip("CCTMXMapInfo","cc.TMXMapInfo")
+ return cc.TMXMapInfo
+end
+_G["CCTMXMapInfo"] = DeprecatedClass.CCTMXMapInfo()
+--CCTMXMapInfo class will be Deprecated,end
+
+--CCEaseExponentialIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialIn()
+ deprecatedTip("CCEaseExponentialIn","cc.EaseExponentialIn")
+ return cc.EaseExponentialIn
+end
+_G["CCEaseExponentialIn"] = DeprecatedClass.CCEaseExponentialIn()
+--CCEaseExponentialIn class will be Deprecated,end
+
+--CCReuseGrid class will be Deprecated,begin
+function DeprecatedClass.CCReuseGrid()
+ deprecatedTip("CCReuseGrid","cc.ReuseGrid")
+ return cc.ReuseGrid
+end
+_G["CCReuseGrid"] = DeprecatedClass.CCReuseGrid()
+--CCReuseGrid class will be Deprecated,end
+
+--CCMenuItemAtlasFont class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemAtlasFont()
+ deprecatedTip("CCMenuItemAtlasFont","cc.MenuItemAtlasFont")
+ return cc.MenuItemAtlasFont
+end
+_G["CCMenuItemAtlasFont"] = DeprecatedClass.CCMenuItemAtlasFont()
+--CCMenuItemAtlasFont class will be Deprecated,end
+
+--CCSpriteFrame class will be Deprecated,begin
+function DeprecatedClass.CCSpriteFrame()
+ deprecatedTip("CCSpriteFrame","cc.SpriteFrame")
+ return cc.SpriteFrame
+end
+_G["CCSpriteFrame"] = DeprecatedClass.CCSpriteFrame()
+--CCSpriteFrame class will be Deprecated,end
+
+--CCSplitRows class will be Deprecated,begin
+function DeprecatedClass.CCSplitRows()
+ deprecatedTip("CCSplitRows","cc.SplitRows")
+ return cc.SplitRows
+end
+_G["CCSplitRows"] = DeprecatedClass.CCSplitRows()
+--CCSplitRows class will be Deprecated,end
+
+--CCSprite class will be Deprecated,begin
+function DeprecatedClass.CCSprite()
+ deprecatedTip("CCSprite","cc.Sprite")
+ return cc.Sprite
+end
+_G["CCSprite"] = DeprecatedClass.CCSprite()
+--CCSprite class will be Deprecated,end
+
+--CCOrbitCamera class will be Deprecated,begin
+function DeprecatedClass.CCOrbitCamera()
+ deprecatedTip("CCOrbitCamera","cc.OrbitCamera")
+ return cc.OrbitCamera
+end
+_G["CCOrbitCamera"] = DeprecatedClass.CCOrbitCamera()
+--CCOrbitCamera class will be Deprecated,end
+
+--CCUserDefault class will be Deprecated,begin
+function DeprecatedClass.CCUserDefault()
+ deprecatedTip("CCUserDefault","cc.UserDefault")
+ return cc.UserDefault
+end
+_G["CCUserDefault"] = DeprecatedClass.CCUserDefault()
+--CCUserDefault class will be Deprecated,end
+
+--CCFadeOutUpTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutUpTiles()
+ deprecatedTip("CCFadeOutUpTiles","cc.FadeOutUpTiles")
+ return cc.FadeOutUpTiles
+end
+_G["CCFadeOutUpTiles"] = DeprecatedClass.CCFadeOutUpTiles()
+--CCFadeOutUpTiles class will be Deprecated,end
+
+--CCParticleRain class will be Deprecated,begin
+function DeprecatedClass.CCParticleRain()
+ deprecatedTip("CCParticleRain","cc.ParticleRain")
+ return cc.ParticleRain
+end
+_G["CCParticleRain"] = DeprecatedClass.CCParticleRain()
+--CCParticleRain class will be Deprecated,end
+
+--CCWaves class will be Deprecated,begin
+function DeprecatedClass.CCWaves()
+ deprecatedTip("CCWaves","cc.Waves")
+ return cc.Waves
+end
+_G["CCWaves"] = DeprecatedClass.CCWaves()
+--CCWaves class will be Deprecated,end
+
+--CCEaseOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseOut()
+ deprecatedTip("CCEaseOut","cc.EaseOut")
+ return cc.EaseOut
+end
+_G["CCEaseOut"] = DeprecatedClass.CCEaseOut()
+--CCEaseOut class will be Deprecated,end
+
+--CCEaseBounceIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceIn()
+ deprecatedTip("CCEaseBounceIn","cc.EaseBounceIn")
+ return cc.EaseBounceIn
+end
+_G["CCEaseBounceIn"] = DeprecatedClass.CCEaseBounceIn()
+--CCEaseBounceIn class will be Deprecated,end
+
+--CCMenuItemFont class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemFont()
+ deprecatedTip("CCMenuItemFont","cc.MenuItemFont")
+ return cc.MenuItemFont
+end
+_G["CCMenuItemFont"] = DeprecatedClass.CCMenuItemFont()
+--CCMenuItemFont class will be Deprecated,end
+
+--CCEaseSineOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineOut()
+ deprecatedTip("CCEaseSineOut","cc.EaseSineOut")
+ return cc.EaseSineOut
+end
+_G["CCEaseSineOut"] = DeprecatedClass.CCEaseSineOut()
+--CCEaseSineOut class will be Deprecated,end
+
+--CCTextureCache class will be Deprecated,begin
+function DeprecatedClass.CCTextureCache()
+ deprecatedTip("CCTextureCache","cc.TextureCache")
+ return cc.TextureCache
+end
+_G["CCTextureCache"] = DeprecatedClass.CCTextureCache()
+--CCTextureCache class will be Deprecated,end
+
+--CCTiledGrid3D class will be Deprecated,begin
+function DeprecatedClass.CCTiledGrid3D()
+ deprecatedTip("CCTiledGrid3D","cc.TiledGrid3D")
+ return cc.TiledGrid3D
+end
+_G["CCTiledGrid3D"] = DeprecatedClass.CCTiledGrid3D()
+--CCTiledGrid3D class will be Deprecated,end
+
+--CCRemoveSelf class will be Deprecated,begin
+function DeprecatedClass.CCRemoveSelf()
+ deprecatedTip("CCRemoveSelf","cc.RemoveSelf")
+ return cc.RemoveSelf
+end
+_G["CCRemoveSelf"] = DeprecatedClass.CCRemoveSelf()
+--CCRemoveSelf class will be Deprecated,end
+
+--CCLabelTTF class will be Deprecated,begin
+function DeprecatedClass.CCLabelTTF()
+ deprecatedTip("CCLabelTTF","cc.LabelTTF")
+ return cc.LabelTTF
+end
+_G["CCLabelTTF"] = DeprecatedClass.CCLabelTTF()
+--CCLabelTTF class will be Deprecated,end
+
+--CCTouch class will be Deprecated,begin
+function DeprecatedClass.CCTouch()
+ deprecatedTip("CCTouch","cc.Touch")
+ return cc.Touch
+end
+_G["CCTouch"] = DeprecatedClass.CCTouch()
+--CCTouch class will be Deprecated,end
+
+--CCMoveBy class will be Deprecated,begin
+function DeprecatedClass.CCMoveBy()
+ deprecatedTip("CCMoveBy","cc.MoveBy")
+ return cc.MoveBy
+end
+_G["CCMoveBy"] = DeprecatedClass.CCMoveBy()
+--CCMoveBy class will be Deprecated,end
+
+--CCMotionStreak class will be Deprecated,begin
+function DeprecatedClass.CCMotionStreak()
+ deprecatedTip("CCMotionStreak","cc.MotionStreak")
+ return cc.MotionStreak
+end
+_G["CCMotionStreak"] = DeprecatedClass.CCMotionStreak()
+--CCMotionStreak class will be Deprecated,end
+
+--CCRotateBy class will be Deprecated,begin
+function DeprecatedClass.CCRotateBy()
+ deprecatedTip("CCRotateBy","cc.RotateBy")
+ return cc.RotateBy
+end
+_G["CCRotateBy"] = DeprecatedClass.CCRotateBy()
+--CCRotateBy class will be Deprecated,end
+
+--CCFileUtils class will be Deprecated,begin
+function DeprecatedClass.CCFileUtils()
+ deprecatedTip("CCFileUtils","cc.FileUtils")
+ return cc.FileUtils
+end
+_G["CCFileUtils"] = DeprecatedClass.CCFileUtils()
+--CCFileUtils class will be Deprecated,end
+
+--CCBezierBy class will be Deprecated,begin
+function DeprecatedClass.CCBezierBy()
+ deprecatedTip("CCBezierBy","cc.BezierBy")
+ return cc.BezierBy
+end
+_G["CCBezierBy"] = DeprecatedClass.CCBezierBy()
+--CCBezierBy class will be Deprecated,end
+
+--CCTransitionFade class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFade()
+ deprecatedTip("CCTransitionFade","cc.TransitionFade")
+ return cc.TransitionFade
+end
+_G["CCTransitionFade"] = DeprecatedClass.CCTransitionFade()
+--CCTransitionFade class will be Deprecated,end
+
+--CCTransitionProgressOutIn class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressOutIn()
+ deprecatedTip("CCTransitionProgressOutIn","cc.TransitionProgressOutIn")
+ return cc.TransitionProgressOutIn
+end
+_G["CCTransitionProgressOutIn"] = DeprecatedClass.CCTransitionProgressOutIn()
+--CCTransitionProgressOutIn class will be Deprecated,end
+
+--CCCatmullRomBy class will be Deprecated,begin
+function DeprecatedClass.CCCatmullRomBy()
+ deprecatedTip("CCCatmullRomBy","cc.CatmullRomBy")
+ return cc.CatmullRomBy
+end
+_G["CCCatmullRomBy"] = DeprecatedClass.CCCatmullRomBy()
+--CCCatmullRomBy class will be Deprecated,end
+
+--CCGridAction class will be Deprecated,begin
+function DeprecatedClass.CCGridAction()
+ deprecatedTip("CCGridAction","cc.GridAction")
+ return cc.GridAction
+end
+_G["CCGridAction"] = DeprecatedClass.CCGridAction()
+--CCGridAction class will be Deprecated,end
+
+--CCShaky3D class will be Deprecated,begin
+function DeprecatedClass.CCShaky3D()
+ deprecatedTip("CCShaky3D","cc.Shaky3D")
+ return cc.Shaky3D
+end
+_G["CCShaky3D"] = DeprecatedClass.CCShaky3D()
+--CCShaky3D class will be Deprecated,end
+
+--CCTransitionEaseScene class will be Deprecated,begin
+function DeprecatedClass.CCTransitionEaseScene()
+ deprecatedTip("CCTransitionEaseScene","cc.TransitionEaseScene")
+ return cc.TransitionEaseScene
+end
+_G["CCTransitionEaseScene"] = DeprecatedClass.CCTransitionEaseScene()
+--CCTransitionEaseScene class will be Deprecated,end
+
+--CCSequence class will be Deprecated,begin
+function DeprecatedClass.CCSequence()
+ deprecatedTip("CCSequence","cc.Sequence")
+ return cc.Sequence
+end
+_G["CCSequence"] = DeprecatedClass.CCSequence()
+--CCSequence class will be Deprecated,end
+
+--CCTransitionFadeUp class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeUp()
+ deprecatedTip("CCTransitionFadeUp","cc.TransitionFadeUp")
+ return cc.TransitionFadeUp
+end
+_G["CCTransitionFadeUp"] = DeprecatedClass.CCTransitionFadeUp()
+--CCTransitionFadeUp class will be Deprecated,end
+
+--CCTransitionProgressRadialCW class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressRadialCW()
+ deprecatedTip("CCTransitionProgressRadialCW","cc.TransitionProgressRadialCW")
+ return cc.TransitionProgressRadialCW
+end
+_G["CCTransitionProgressRadialCW"] = DeprecatedClass.CCTransitionProgressRadialCW()
+--CCTransitionProgressRadialCW class will be Deprecated,end
+
+--CCShuffleTiles class will be Deprecated,begin
+function DeprecatedClass.CCShuffleTiles()
+ deprecatedTip("CCShuffleTiles","cc.ShuffleTiles")
+ return cc.ShuffleTiles
+end
+_G["CCShuffleTiles"] = DeprecatedClass.CCShuffleTiles()
+--CCShuffleTiles class will be Deprecated,end
+
+--CCTransitionSlideInR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInR()
+ deprecatedTip("CCTransitionSlideInR","cc.TransitionSlideInR")
+ return cc.TransitionSlideInR
+end
+_G["CCTransitionSlideInR"] = DeprecatedClass.CCTransitionSlideInR()
+--CCTransitionSlideInR class will be Deprecated,end
+
+--CCScene class will be Deprecated,begin
+function DeprecatedClass.CCScene()
+ deprecatedTip("CCScene","cc.Scene")
+ return cc.Scene
+end
+_G["CCScene"] = DeprecatedClass.CCScene()
+--CCScene class will be Deprecated,end
+
+--CCParallaxNode class will be Deprecated,begin
+function DeprecatedClass.CCParallaxNode()
+ deprecatedTip("CCParallaxNode","cc.ParallaxNode")
+ return cc.ParallaxNode
+end
+_G["CCParallaxNode"] = DeprecatedClass.CCParallaxNode()
+--CCParallaxNode class will be Deprecated,end
+
+--CCTransitionSlideInL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInL()
+ deprecatedTip("CCTransitionSlideInL","cc.TransitionSlideInL")
+ return cc.TransitionSlideInL
+end
+_G["CCTransitionSlideInL"] = DeprecatedClass.CCTransitionSlideInL()
+--CCTransitionSlideInL class will be Deprecated,end
+
+--CCWavesTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCWavesTiles3D()
+ deprecatedTip("CCWavesTiles3D","cc.WavesTiles3D")
+ return cc.WavesTiles3D
+end
+_G["CCWavesTiles3D"] = DeprecatedClass.CCWavesTiles3D()
+--CCWavesTiles3D class will be Deprecated,end
+
+--CCTransitionSlideInB class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInB()
+ deprecatedTip("CCTransitionSlideInB","cc.TransitionSlideInB")
+ return cc.TransitionSlideInB
+end
+_G["CCTransitionSlideInB"] = DeprecatedClass.CCTransitionSlideInB()
+--CCTransitionSlideInB class will be Deprecated,end
+
+--CCSpeed class will be Deprecated,begin
+function DeprecatedClass.CCSpeed()
+ deprecatedTip("CCSpeed","cc.Speed")
+ return cc.Speed
+end
+_G["CCSpeed"] = DeprecatedClass.CCSpeed()
+--CCSpeed class will be Deprecated,end
+
+--CCShatteredTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCShatteredTiles3D()
+ deprecatedTip("CCShatteredTiles3D","cc.ShatteredTiles3D")
+ return cc.ShatteredTiles3D
+end
+_G["CCShatteredTiles3D"] = DeprecatedClass.CCShatteredTiles3D()
+--CCShatteredTiles3D class will be Deprecated,end
+
+--CCCallFuncN class will be Deprecated,begin
+function DeprecatedClass.CCCallFuncN()
+ deprecatedTip("CCCallFuncN","cc.CallFunc")
+ return cc.CallFunc
+end
+_G["CCCallFuncN"] = DeprecatedClass.CCCallFuncN()
+--CCCallFuncN class will be Deprecated,end
+
+--CCEGLViewProtocol class will be Deprecated,begin
+function DeprecatedClass.CCEGLViewProtocol()
+ deprecatedTip("CCEGLViewProtocol","cc.GLViewProtocol")
+ return cc.GLViewProtocol
+end
+_G["CCEGLViewProtocol"] = DeprecatedClass.CCEGLViewProtocol()
+--CCEGLViewProtocol class will be Deprecated,end
+
+--CCEGLView class will be Deprecated,begin
+function DeprecatedClass.CCEGLView()
+ deprecatedTip("CCEGLView","cc.GLView")
+ return cc.GLView
+end
+
+_G["CCEGLView"] = DeprecatedClass.CCEGLView()
+--CCEGLView class will be Deprecated,end
+
+--XMLHttpRequest class will be Deprecated,begin
+function DeprecatedClass.XMLHttpRequest()
+ deprecatedTip("XMLHttpRequest","cc.XMLHttpRequest")
+ return cc.XMLHttpRequest
+end
+_G["XMLHttpRequest"] = DeprecatedClass.XMLHttpRequest()
+--XMLHttpRequest class will be Deprecated,end
+
+--EGLViewProtocol class will be Deprecated,begin
+function DeprecatedClass.EGLViewProtocol()
+ deprecatedTip("cc.EGLViewProtocol","cc.GLViewProtocol")
+ return cc.GLViewProtocol
+end
+_G["cc.EGLViewProtocol"] = DeprecatedClass.EGLViewProtocol()
+--EGLViewProtocol class will be Deprecated,end
+
+--EGLView class will be Deprecated,begin
+function DeprecatedClass.EGLView()
+ deprecatedTip("cc.EGLView","cc.GLView")
+ return cc.GLView
+end
+_G["cc.EGLView"] = DeprecatedClass.EGLView()
+--EGLView class will be Deprecated,end
+
+--EGLView class will be Deprecated,begin
+function DeprecatedClass.EGLView()
+ deprecatedTip("cc.EGLView","cc.GLView")
+ print(cc.GLView)
+ return cc.GLView
+end
+_G["cc.EGLView"] = DeprecatedClass.EGLView()
+--EGLView class will be Deprecated,end
+
+--ShaderCache class will be Deprecated,begin
+function DeprecatedClass.ShaderCache()
+ deprecatedTip("cc.ShaderCache","cc.GLProgramCache")
+ return cc.GLProgramCache
+end
+cc.ShaderCache = DeprecatedClass.ShaderCache()
+--ShaderCache class will be Deprecated,end
+
+
+
diff --git a/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua
new file mode 100644
index 0000000..e28ae3e
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua
@@ -0,0 +1,371 @@
+
+--Enums will be deprecated,begin
+_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
+_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
+_G.kCCTextAlignmentCenter = cc.TEXT_ALIGNMENT_CENTER
+_G.kCCVerticalTextAlignmentTop = cc.VERTICAL_TEXT_ALIGNMENT_TOP
+_G.kCCVerticalTextAlignmentCenter = cc.VERTICAL_TEXT_ALIGNMENT_CENTER
+_G.kCCVerticalTextAlignmentBottom = cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM
+_G.kCCDirectorProjection3D = cc.DIRECTOR_PROJECTION3_D
+_G.kCCDirectorProjection2D = cc.DIRECTOR_PROJECTION2_D
+_G.kCCDirectorProjectionCustom = cc.DIRECTOR_PROJECTION_CUSTOM
+_G.kCCDirectorProjectionDefault = cc.DIRECTOR_PROJECTION_DEFAULT
+_G.kCCNodeTagInvalid = cc.NODE_TAG_INVALID
+_G.kCCNodeOnEnter = cc.NODE_ON_ENTER
+_G.kCCNodeOnExit = cc.NODE_ON_EXIT
+_G.kCCTexture2DPixelFormat_RGBA8888 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888
+_G.kCCTexture2DPixelFormat_RGB888 = cc.TEXTURE2_D_PIXEL_FORMAT_RG_B888
+_G.kCCTexture2DPixelFormat_RGB565 = cc.TEXTURE2_D_PIXEL_FORMAT_RG_B565
+_G.kCCTexture2DPixelFormat_A8 = cc.TEXTURE2_D_PIXEL_FORMAT_A8
+_G.kCCTexture2DPixelFormat_I8 = cc.TEXTURE2_D_PIXEL_FORMAT_I8
+_G.kCCTexture2DPixelFormat_AI88 = cc.TEXTURE2_D_PIXEL_FORMAT_A_I88
+_G.kCCTexture2DPixelFormat_RGBA4444 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A4444
+_G.kCCTexture2DPixelFormat_RGB5A1 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB5_A1
+_G.kCCTexture2DPixelFormat_PVRTC4 = cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4
+_G.kCCTexture2DPixelFormat_PVRTC2 = cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2
+_G.kCCTexture2DPixelFormat_Default = cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT
+_G.kCCImageFormatPNG = cc.IMAGE_FORMAT_PNG
+_G.kCCImageFormatJPEG = cc.IMAGE_FORMAT_JPEG
+_G.kCCTouchesOneByOne = cc.TOUCHES_ONE_BY_ONE
+_G.kCCTouchesAllAtOnce = cc.TOUCHES_ALL_AT_ONCE
+_G.kCCTransitionOrientationLeftOver = cc.TRANSITION_ORIENTATION_LEFT_OVER
+_G.kCCTransitionOrientationRightOver = cc.TRANSITION_ORIENTATION_RIGHT_OVER
+_G.kCCTransitionOrientationUpOver = cc.TRANSITION_ORIENTATION_UP_OVER
+_G.kCCTransitionOrientationDownOver = cc.TRANSITION_ORIENTATION_DOWN_OVER
+_G.kCCActionTagInvalid = cc.ACTION_TAG_INVALID
+_G.kCCLabelAutomaticWidth = cc.LABEL_AUTOMATIC_WIDTH
+_G.kCCMenuStateWaiting = cc.MENU_STATE_WAITING
+_G.kCCMenuStateTrackingTouch = cc.MENU_STATE_TRACKING_TOUCH
+_G.kCCMenuHandlerPriority = cc.MENU_HANDLER_PRIORITY
+_G.kCCParticleDurationInfinity = cc.PARTICLE_DURATION_INFINITY
+_G.kCCParticleStartSizeEqualToEndSize = cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE
+_G.kCCParticleStartRadiusEqualToEndRadius = cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS
+_G.kCCParticleModeGravity = cc.PARTICLE_MODE_GRAVITY
+_G.kCCParticleModeRadius = cc.PARTICLE_MODE_RADIUS
+_G.kCCPositionTypeFree = cc.POSITION_TYPE_FREE
+_G.kCCPositionTypeRelative = cc.POSITION_TYPE_RELATIVE
+_G.kCCPositionTypeGrouped = cc.POSITION_TYPE_GROUPED
+_G.kCCProgressTimerTypeRadial = cc.PROGRESS_TIMER_TYPE_RADIAL
+_G.kCCProgressTimerTypeBar = cc.PROGRESS_TIMER_TYPE_BAR
+_G.kCCTMXTileHorizontalFlag = cc.TMX_TILE_HORIZONTAL_FLAG
+_G.kCCTMXTileVerticalFlag = cc.TMX_TILE_VERTICAL_FLAG
+_G.kCCTMXTileDiagonalFlag = cc.TMX_TILE_DIAGONAL_FLAG
+_G.kCCFlipedAll = cc.FLIPED_ALL
+_G.kCCFlippedMask = cc.FLIPPED_MASK
+
+_G.kLanguageEnglish = cc.LANGUAGE_ENGLISH
+_G.kLanguageChinese = cc.LANGUAGE_CHINESE
+_G.kLanguageFrench = cc.LANGUAGE_FRENCH
+_G.kLanguageItalian = cc.LANGUAGE_ITALIAN
+_G.kLanguageGerman = cc.LANGUAGE_GERMAN
+_G.kLanguageSpanish = cc.LANGUAGE_SPANISH
+_G.kLanguageRussian = cc.LANGUAGE_RUSSIAN
+_G.kLanguageKorean = cc.LANGUAGE_KOREAN
+_G.kLanguageJapanese = cc.LANGUAGE_JAPANESE
+_G.kLanguageHungarian = cc.LANGUAGE_HUNGARIAN
+_G.kLanguagePortuguese = cc.LANGUAGE_PORTUGUESE
+_G.kLanguageArabic = cc.LANGUAGE_ARABIC
+_G.kTargetWindows = cc.PLATFORM_OS_WINDOWS
+_G.kTargetLinux = cc.PLATFORM_OS_LINUX
+_G.kTargetMacOS = cc.PLATFORM_OS_MAC
+_G.kTargetAndroid = cc.PLATFORM_OS_ANDROID
+_G.kTargetIphone = cc.PLATFORM_OS_IPHONE
+_G.kTargetIpad = cc.PLATFORM_OS_IPAD
+_G.kTargetBlackBerry = cc.PLATFORM_OS_BLACKBERRY
+
+_G.GL_ZERO = gl.ZERO
+_G.GL_ONE = gl.ONE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT
+_G.GL_LINE_WIDTH = gl.LINE_WIDTH
+_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA
+_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA
+_G.GL_GREEN_BITS = gl.GREEN_BITS
+_G.GL_STENCIL_REF = gl.STENCIL_REF
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
+_G.GL_CCW = gl.CCW
+_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS
+_G.GL_BACK = gl.BACK
+_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X
+_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z
+_G.GL_ONE = gl.ONE
+_G.GL_TRUE = gl.TRUE
+_G.GL_TEXTURE12 = gl.TEXTURE12
+_G.GL_LINK_STATUS = gl.LINK_STATUS
+_G.GL_BLEND = gl.BLEND
+_G.GL_LESS = gl.LESS
+_G.GL_TEXTURE16 = gl.TEXTURE16
+_G.GL_BOOL_VEC2 = gl.BOOL_VEC2
+_G.GL_KEEP = gl.KEEP
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED
+_G.GL_EXTENSIONS = gl.EXTENSIONS
+_G.GL_FRONT = gl.FRONT
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS
+_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION
+_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE
+_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT
+_G.GL_VENDOR = gl.VENDOR
+_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y
+_G.GL_NEAREST = gl.NEAREST
+_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH
+_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING
+_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER
+_G.GL_LEQUAL = gl.LEQUAL
+_G.GL_VERSION = gl.VERSION
+_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE
+_G.GL_RENDERER = gl.RENDERER
+_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS
+_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL
+_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK
+_G.GL_BOOL = gl.BOOL
+_G.GL_VIEWPORT = gl.VIEWPORT
+_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER
+_G.GL_LUMINANCE = gl.LUMINANCE
+_G.GL_DECR_WRAP = gl.DECR_WRAP
+_G.GL_FUNC_ADD = gl.FUNC_ADD
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY
+_G.GL_BOOL_VEC4 = gl.BOOL_VEC4
+_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR
+_G.GL_STATIC_DRAW = gl.STATIC_DRAW
+_G.GL_DITHER = gl.DITHER
+_G.GL_TEXTURE31 = gl.TEXTURE31
+_G.GL_TEXTURE30 = gl.TEXTURE30
+_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE
+_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16
+_G.GL_TEXTURE23 = gl.TEXTURE23
+_G.GL_DEPTH_TEST = gl.DEPTH_TEST
+_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL
+_G.GL_BOOL_VEC3 = gl.BOOL_VEC3
+_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS
+_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D
+_G.GL_TEXTURE21 = gl.TEXTURE21
+_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT
+_G.GL_DONT_CARE = gl.DONT_CARE
+_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE
+_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3
+_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5
+_G.GL_INT_VEC2 = gl.INT_VEC2
+_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4
+_G.GL_NONE = gl.NONE
+_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA
+_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS
+_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT
+_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS
+_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS
+_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB
+_G.GL_TEXTURE = gl.TEXTURE
+_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR
+_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
+_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM
+_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT
+_G.GL_TEXTURE20 = gl.TEXTURE20
+_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH
+_G.GL_TEXTURE28 = gl.TEXTURE28
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
+_G.GL_TEXTURE22 = gl.TEXTURE22
+_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING
+_G.GL_STREAM_DRAW = gl.STREAM_DRAW
+_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX
+_G.GL_TEXTURE26 = gl.TEXTURE26
+_G.GL_TEXTURE27 = gl.TEXTURE27
+_G.GL_TEXTURE24 = gl.TEXTURE24
+_G.GL_TEXTURE25 = gl.TEXTURE25
+_G.GL_NO_ERROR = gl.NO_ERROR
+_G.GL_TEXTURE29 = gl.TEXTURE29
+_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4
+_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED
+_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
+_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3
+_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE
+_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1
+_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS
+_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION
+_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT
+_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS
+_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE
+_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR
+_G.GL_TEXTURE2 = gl.TEXTURE2
+_G.GL_TEXTURE1 = gl.TEXTURE1
+_G.GL_GEQUAL = gl.GEQUAL
+_G.GL_TEXTURE7 = gl.TEXTURE7
+_G.GL_TEXTURE6 = gl.TEXTURE6
+_G.GL_TEXTURE5 = gl.TEXTURE5
+_G.GL_TEXTURE4 = gl.TEXTURE4
+_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_TEXTURE9 = gl.TEXTURE9
+_G.GL_STENCIL_TEST = gl.STENCIL_TEST
+_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK
+_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT
+_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8
+_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE
+_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2
+_G.GL_BLUE_BITS = gl.BLUE_BITS
+_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER
+_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS
+_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK
+_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4
+_G.GL_TEXTURE17 = gl.TEXTURE17
+_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA
+_G.GL_TEXTURE15 = gl.TEXTURE15
+_G.GL_TEXTURE14 = gl.TEXTURE14
+_G.GL_TEXTURE13 = gl.TEXTURE13
+_G.GL_SAMPLES = gl.SAMPLES
+_G.GL_TEXTURE11 = gl.TEXTURE11
+_G.GL_TEXTURE10 = gl.TEXTURE10
+_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT
+_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT
+_G.GL_TEXTURE19 = gl.TEXTURE19
+_G.GL_TEXTURE18 = gl.TEXTURE18
+_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST
+_G.GL_SHORT = gl.SHORT
+_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING
+_G.GL_REPEAT = gl.REPEAT
+_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER
+_G.GL_RED_BITS = gl.RED_BITS
+_G.GL_FRONT_FACE = gl.FRONT_FACE
+_G.GL_BLEND_COLOR = gl.BLEND_COLOR
+_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT
+_G.GL_INT_VEC4 = gl.INT_VEC4
+_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE
+_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE
+_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT
+_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK
+_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT
+_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL
+_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC
+_G.GL_REPLACE = gl.REPLACE
+_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA
+_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE
+_G.GL_FASTEST = gl.FASTEST
+_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL
+_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT
+_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT
+_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL
+_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB
+_G.GL_TEXTURE3 = gl.TEXTURE3
+_G.GL_RENDERBUFFER = gl.RENDERBUFFER
+_G.GL_RGB5_A1 = gl.RGB5_A1
+_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE
+_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE
+_G.GL_NOTEQUAL = gl.NOTEQUAL
+_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB
+_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK
+_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP
+_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE
+_G.GL_ZERO = gl.ZERO
+_G.GL_TEXTURE0 = gl.TEXTURE0
+_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE
+_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE
+_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE
+_G.GL_BYTE = gl.BYTE
+_G.GL_CW = gl.CW
+_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW
+_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE
+_G.GL_FALSE = gl.FALSE
+_G.GL_GREATER = gl.GREATER
+_G.GL_RGBA4 = gl.RGBA4
+_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS
+_G.GL_STENCIL_BITS = gl.STENCIL_BITS
+_G.GL_RGB = gl.RGB
+_G.GL_INT = gl.INT
+_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC
+_G.GL_SAMPLER_2D = gl.SAMPLER_2D
+_G.GL_NICEST = gl.NICEST
+_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS
+_G.GL_CULL_FACE = gl.CULL_FACE
+_G.GL_INT_VEC3 = gl.INT_VEC3
+_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE
+_G.GL_INVALID_ENUM = gl.INVALID_ENUM
+_G.GL_INVERT = gl.INVERT
+_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE
+_G.GL_TEXTURE8 = gl.TEXTURE8
+_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER
+_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S
+_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE
+_G.GL_LINES = gl.LINES
+_G.GL_EQUAL = gl.EQUAL
+_G.GL_LINE_LOOP = gl.LINE_LOOP
+_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T
+_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT
+_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS
+_G.GL_SHADER_TYPE = gl.SHADER_TYPE
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+_G.GL_DECR = gl.DECR
+_G.GL_DELETE_STATUS = gl.DELETE_STATUS
+_G.GL_DEPTH_BITS = gl.DEPTH_BITS
+_G.GL_INCR = gl.INCR
+_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE
+_G.GL_ALPHA_BITS = gl.ALPHA_BITS
+_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2
+_G.GL_LINE_STRIP = gl.LINE_STRIP
+_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH
+_G.GL_INVALID_VALUE = gl.INVALID_VALUE
+_G.GL_NEVER = gl.NEVER
+_G.GL_INCR_WRAP = gl.INCR_WRAP
+_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA
+_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER
+_G.GL_POINTS = gl.POINTS
+_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0
+_G.GL_RGBA = gl.RGBA
+_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE
+_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE
+_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER
+_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP
+_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS
+_G.GL_LINEAR = gl.LINEAR
+_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST
+_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH
+_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF
+_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER
+_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE
+_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP
+_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR
+_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS
+_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE
+_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT
+_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE
+_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE
+_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION
+_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED
+_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH
+_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS
+_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK
+_G.GL_ALWAYS = gl.ALWAYS
+_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE
+_G.GL_FLOAT = gl.FLOAT
+_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING
+_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
+_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN
+_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION
+_G.GL_TEXTURE_2D = gl.TEXTURE_2D
+_G.GL_ALPHA = gl.ALPHA
+_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB
+_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST
+_G.GL_TRIANGLES = gl.TRIANGLES
+
+cc.TEXTURE_PIXELFORMAT_DEFAULT = cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT
diff --git a/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua
new file mode 100644
index 0000000..2c83429
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua
@@ -0,0 +1,1014 @@
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of CCDirector will be deprecated,begin
+local CCDirectorDeprecated = { }
+function CCDirectorDeprecated.sharedDirector()
+ deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance")
+ return cc.Director:getInstance()
+end
+CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
+--functions of CCDirector will be deprecated,end
+
+
+--functions of CCTextureCache will be deprecated begin
+local TextureCacheDeprecated = {}
+function TextureCacheDeprecated.getInstance(self)
+ deprecatedTip("cc.TextureCache:getInstance","cc.Director:getInstance():getTextureCache")
+ return cc.Director:getInstance():getTextureCache()
+end
+cc.TextureCache.getInstance = TextureCacheDeprecated.getInstance
+
+function TextureCacheDeprecated.destroyInstance(self)
+ deprecatedTip("cc.TextureCache:destroyInstance","cc.Director:getInstance():destroyTextureCache")
+ return cc.Director:getInstance():destroyTextureCache()
+end
+cc.TextureCache.destroyInstance = TextureCacheDeprecated.destroyInstance
+
+function TextureCacheDeprecated.dumpCachedTextureInfo(self)
+ deprecatedTip("self:dumpCachedTextureInfo","self:getCachedTextureInfo")
+ return print(self:getCachedTextureInfo())
+end
+cc.TextureCache.dumpCachedTextureInfo = TextureCacheDeprecated.dumpCachedTextureInfo
+
+local CCTextureCacheDeprecated = { }
+function CCTextureCacheDeprecated.sharedTextureCache()
+ deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
+ return cc.TextureCache:getInstance()
+end
+rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
+
+function CCTextureCacheDeprecated.purgeSharedTextureCache()
+ deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
+ return cc.TextureCache:destroyInstance()
+end
+rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
+
+function CCTextureCacheDeprecated.addUIImage(self, image, key)
+ deprecatedTip("CCTextureCache:addUIImage","CCTextureCache:addImage")
+ return self:addImage(image,key)
+end
+CCTextureCache.addUIImage = CCTextureCacheDeprecated.addUIImage
+--functions of CCTextureCache will be deprecated end
+
+--functions of CCAnimation will be deprecated begin
+local CCAnimationDeprecated = {}
+function CCAnimationDeprecated.addSpriteFrameWithFileName(self,...)
+ deprecatedTip("CCAnimationDeprecated:addSpriteFrameWithFileName","cc.Animation:addSpriteFrameWithFile")
+ return self:addSpriteFrameWithFile(...)
+end
+CCAnimation.addSpriteFrameWithFileName = CCAnimationDeprecated.addSpriteFrameWithFileName
+--functions of CCAnimation will be deprecated end
+
+
+--functions of CCAnimationCache will be deprecated begin
+local CCAnimationCacheDeprecated = { }
+function CCAnimationCacheDeprecated.sharedAnimationCache()
+ deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance")
+ return CCAnimationCache:getInstance()
+end
+CCAnimationCache.sharedAnimationCache = CCAnimationCacheDeprecated.sharedAnimationCache
+
+function CCAnimationCacheDeprecated.purgeSharedAnimationCache()
+ deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance")
+ return CCAnimationCache:destroyInstance()
+end
+CCAnimationCache.purgeSharedAnimationCache = CCAnimationCacheDeprecated.purgeSharedAnimationCache
+
+function CCAnimationCacheDeprecated.addAnimationsWithFile(self,...)
+ deprecatedTip("CCAnimationCache:addAnimationsWithFile","cc.AnimationCache:addAnimations")
+ return self:addAnimations(...)
+end
+CCAnimationCache.addAnimationsWithFile = CCAnimationCacheDeprecated.addAnimationsWithFile
+
+function CCAnimationCacheDeprecated.animationByName(self,...)
+ deprecatedTip("CCAnimationCache:animationByName","cc.AnimationCache:getAnimation")
+ return self:getAnimation(...)
+end
+CCAnimationCache.animationByName = CCAnimationCacheDeprecated.animationByName
+
+function CCAnimationCacheDeprecated.removeAnimationByName(self)
+ deprecatedTip("CCAnimationCache:removeAnimationByName","cc.AnimationCache:removeAnimation")
+ return self:removeAnimation()
+end
+CCAnimationCache.removeAnimationByName = CCAnimationCacheDeprecated.removeAnimationByName
+--functions of CCAnimationCache will be deprecated end
+
+--functions of CCFileUtils will be deprecated end
+local CCFileUtilsDeprecated = { }
+function CCFileUtilsDeprecated.sharedFileUtils()
+ deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
+ return cc.FileUtils:getInstance()
+end
+CCFileUtils.sharedFileUtils = CCFileUtilsDeprecated.sharedFileUtils
+
+function CCFileUtilsDeprecated.purgeFileUtils()
+ deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
+ return cc.FileUtils:destroyInstance()
+end
+CCFileUtils.purgeFileUtils = CCFileUtilsDeprecated.purgeFileUtils
+--functions of CCFileUtils will be deprecated end
+
+--functions of CCMenu will be deprecated begin
+local CCMenuDeprecated = { }
+function CCMenuDeprecated.createWithItem(self,...)
+ deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem")
+ return self:create(...)
+end
+CCMenu.createWithItem = CCMenuDeprecated.createWithItem
+
+function CCMenuDeprecated.setHandlerPriority(self)
+ print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********")
+end
+CCMenu.setHandlerPriority = CCMenuDeprecated.setHandlerPriority
+--functions of CCMenu will be deprecated end
+
+--functions of CCNode will be deprecated begin
+local CCNodeDeprecated = { }
+
+function CCNodeDeprecated.boundingBox(self)
+ deprecatedTip("CCNode:boundingBox","cc.Node:getBoundingBox")
+ return self:getBoundingBox()
+end
+CCNode.boundingBox = CCNodeDeprecated.boundingBox
+
+
+function CCNodeDeprecated.numberOfRunningActions(self)
+ deprecatedTip("CCNode:numberOfRunningActions","cc.Node:getNumberOfRunningActions")
+ return self:getNumberOfRunningActions()
+end
+CCNode.numberOfRunningActions = CCNodeDeprecated.numberOfRunningActions
+
+
+function CCNodeDeprecated.removeFromParentAndCleanup(self,...)
+ deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent")
+ return self:removeFromParent(...)
+end
+CCNode.removeFromParentAndCleanup = CCNodeDeprecated.removeFromParentAndCleanup
+--functions of CCNode will be deprecated end
+
+--CCDrawPrimitives will be deprecated begin
+local function CCDrawPrimitivesClassDeprecated()
+ deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives")
+ return cc.DrawPrimitives
+end
+_G.CCDrawPrimitives = CCDrawPrimitivesClassDeprecated()
+--functions of CCDrawPrimitives will be deprecated begin
+local CCDrawPrimitivesDeprecated = { }
+function CCDrawPrimitivesDeprecated.ccDrawPoint(pt)
+ deprecatedTip("ccDrawPoint","cc.DrawPrimitives.drawPoint")
+ return cc.DrawPrimitives.drawPoint(pt)
+end
+_G.ccDrawPoint = CCDrawPrimitivesDeprecated.ccDrawPoint
+
+function CCDrawPrimitivesDeprecated.ccDrawLine(origin,destination)
+ deprecatedTip("ccDrawLine","cc.DrawPrimitives.drawLine")
+ return cc.DrawPrimitives.drawLine(origin,destination)
+end
+_G.ccDrawLine = CCDrawPrimitivesDeprecated.ccDrawLine
+
+function CCDrawPrimitivesDeprecated.ccDrawRect(origin,destination)
+ deprecatedTip("ccDrawRect","cc.DrawPrimitives.drawRect")
+ return cc.DrawPrimitives.drawRect(origin,destination)
+end
+_G.ccDrawRect = CCDrawPrimitivesDeprecated.ccDrawRect
+
+function CCDrawPrimitivesDeprecated.ccDrawSolidRect(origin,destination,color)
+ deprecatedTip("ccDrawSolidRect","cc.DrawPrimitives.drawSolidRect")
+ return cc.DrawPrimitives.drawSolidRect(origin,destination,color)
+end
+_G.ccDrawSolidRect = CCDrawPrimitivesDeprecated.ccDrawSolidRect
+
+-- params:... may represent two param(xScale,yScale) or nil
+function CCDrawPrimitivesDeprecated.ccDrawCircle(center,radius,angle,segments,drawLineToCenter,...)
+ deprecatedTip("ccDrawCircle","cc.DrawPrimitives.drawCircle")
+ return cc.DrawPrimitives.drawCircle(center,radius,angle,segments,drawLineToCenter,...)
+end
+_G.ccDrawCircle = CCDrawPrimitivesDeprecated.ccDrawCircle
+
+-- params:... may represent two param(xScale,yScale) or nil
+function CCDrawPrimitivesDeprecated.ccDrawSolidCircle(center,radius,angle,segments,...)
+ deprecatedTip("ccDrawSolidCircle","cc.DrawPrimitives.drawSolidCircle")
+ return cc.DrawPrimitives.drawSolidCircle(center,radius,angle,segments,...)
+end
+_G.ccDrawSolidCircle = CCDrawPrimitivesDeprecated.ccDrawSolidCircle
+
+function CCDrawPrimitivesDeprecated.ccDrawQuadBezier(origin,control,destination,segments)
+ deprecatedTip("ccDrawQuadBezier","cc.DrawPrimitives.drawQuadBezier")
+ return cc.DrawPrimitives.drawQuadBezier(origin,control,destination,segments)
+end
+_G.ccDrawQuadBezier = CCDrawPrimitivesDeprecated.ccDrawQuadBezier
+
+function CCDrawPrimitivesDeprecated.ccDrawCubicBezier(origin,control1,control2,destination,segments)
+ deprecatedTip("ccDrawCubicBezier","cc.DrawPrimitives.drawCubicBezier")
+ return cc.DrawPrimitives.drawCubicBezier(origin,control1,control2,destination,segments)
+end
+_G.ccDrawCubicBezier = CCDrawPrimitivesDeprecated.ccDrawCubicBezier
+
+function CCDrawPrimitivesDeprecated.ccDrawCatmullRom(arrayOfControlPoints,segments)
+ deprecatedTip("ccDrawCatmullRom","cc.DrawPrimitives.drawCatmullRom")
+ return cc.DrawPrimitives.drawCatmullRom(arrayOfControlPoints,segments)
+end
+_G.ccDrawCatmullRom = CCDrawPrimitivesDeprecated.ccDrawCatmullRom
+
+function CCDrawPrimitivesDeprecated.ccDrawCardinalSpline(config,tension,segments)
+ deprecatedTip("ccDrawCardinalSpline","cc.DrawPrimitives.drawCardinalSpline")
+ return cc.DrawPrimitives.drawCardinalSpline(config,tension,segments)
+end
+_G.ccDrawCardinalSpline = CCDrawPrimitivesDeprecated.ccDrawCardinalSpline
+
+function CCDrawPrimitivesDeprecated.ccDrawColor4B(r,g,b,a)
+ deprecatedTip("ccDrawColor4B","cc.DrawPrimitives.drawColor4B")
+ return cc.DrawPrimitives.drawColor4B(r,g,b,a)
+end
+_G.ccDrawColor4B = CCDrawPrimitivesDeprecated.ccDrawColor4B
+
+function CCDrawPrimitivesDeprecated.ccDrawColor4F(r,g,b,a)
+ deprecatedTip("ccDrawColor4F","cc.DrawPrimitives.drawColor4F")
+ return cc.DrawPrimitives.drawColor4F(r,g,b,a)
+end
+_G.ccDrawColor4F = CCDrawPrimitivesDeprecated.ccDrawColor4F
+
+function CCDrawPrimitivesDeprecated.ccPointSize(pointSize)
+ deprecatedTip("ccPointSize","cc.DrawPrimitives.setPointSize")
+ return cc.DrawPrimitives.setPointSize(pointSize)
+end
+_G.ccPointSize = CCDrawPrimitivesDeprecated.ccPointSize
+--functions of CCDrawPrimitives will be deprecated end
+--CCDrawPrimitives will be deprecated end
+
+local CCProgressTimerDeprecated = {}
+function CCProgressTimerDeprecated.setReverseProgress(self,...)
+ deprecatedTip("CCProgressTimer","CCProgressTimer:setReverseDirection")
+ return self:setReverseDirection(...)
+end
+CCProgressTimer.setReverseProgress = CCProgressTimerDeprecated.setReverseProgress
+
+--functions of CCSpriteFrameCache will be deprecated begin
+local CCSpriteFrameCacheDeprecated = { }
+function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName)
+ deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName")
+ return self:getSpriteFrameByName(szName)
+end
+CCSpriteFrameCache.spriteFrameByName = CCSpriteFrameCacheDeprecated.spriteFrameByName
+
+function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance")
+ return CCSpriteFrameCache:getInstance()
+end
+CCSpriteFrameCache.sharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache
+
+function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance")
+ return CCSpriteFrameCache:destroyInstance()
+end
+CCSpriteFrameCache.purgeSharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache
+
+function CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile(self,...)
+ deprecatedTip("CCSpriteFrameCache:addSpriteFramesWithFile","CCSpriteFrameCache:addSpriteFrames")
+ return self:addSpriteFrames(...)
+end
+rawset(CCSpriteFrameCache,"addSpriteFramesWithFile",CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile)
+
+function CCSpriteFrameCacheDeprecated.getSpriteFrameByName(self,...)
+ deprecatedTip("CCSpriteFrameCache:getSpriteFrameByName","CCSpriteFrameCache:getSpriteFrame")
+ return self:getSpriteFrame(...)
+end
+CCSpriteFrameCache.getSpriteFrameByName = CCSpriteFrameCacheDeprecated.getSpriteFrameByName
+--functions of CCSpriteFrameCache will be deprecated end
+
+--functions of CCLabelAtlas will be deprecated begin
+local CCLabelAtlasDeprecated = {}
+function CCLabelAtlasDeprecated.create(self,...)
+ deprecatedTip("CCLabelAtlas:create","CCLabelAtlas:_create")
+ return self:_create(...)
+end
+CCLabelAtlas.create = CCLabelAtlasDeprecated.create
+--functions of CCLabelAtlas will be deprecated end
+
+
+---------------------------
+--global functions wil be deprecated, begin
+local function CCRectMake(x,y,width,height)
+ deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua")
+ return cc.rect(x,y,width,height)
+end
+_G.CCRectMake = CCRectMake
+
+local function ccc3(r,g,b)
+ deprecatedTip("ccc3(r,g,b)","cc.c3b(r,g,b)")
+ return cc.c3b(r,g,b)
+end
+_G.ccc3 = ccc3
+
+local function ccp(x,y)
+ deprecatedTip("ccp(x,y)","cc.p(x,y)")
+ return cc.p(x,y)
+end
+_G.ccp = ccp
+
+local function CCSizeMake(width,height)
+ deprecatedTip("CCSizeMake(width,height)","cc.size(width,height)")
+ return cc.size(width,height)
+end
+_G.CCSizeMake = CCSizeMake
+
+local function ccc4(r,g,b,a)
+ deprecatedTip("ccc4(r,g,b,a)","cc.c4b(r,g,b,a)")
+ return cc.c4b(r,g,b,a)
+end
+_G.ccc4 = ccc4
+
+local function ccc4FFromccc3B(color3B)
+ deprecatedTip("ccc4FFromccc3B(color3B)","cc.c4f(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)")
+ return cc.c4f(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0)
+end
+_G.ccc4FFromccc3B = ccc4FFromccc3B
+
+local function ccc4f(r,g,b,a)
+ deprecatedTip("ccc4f(r,g,b,a)","cc.c4f(r,g,b,a)")
+ return cc.c4f(r,g,b,a)
+end
+_G.ccc4f = ccc4f
+
+local function ccc4FFromccc4B(color4B)
+ deprecatedTip("ccc4FFromccc4B(color4B)","cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)")
+ return cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)
+end
+_G.ccc4FFromccc4B = ccc4FFromccc4B
+
+local function ccc4FEqual(a,b)
+ deprecatedTip("ccc4FEqual(a,b)","a:equals(b)")
+ return a:equals(b)
+end
+_G.ccc4FEqual = ccc4FEqual
+--global functions wil be deprecated, end
+
+
+--functions of _G will be deprecated begin
+local function ccpLineIntersect(a,b,c,d,s,t)
+ deprecatedTip("ccpLineIntersect","cc.pIsLineIntersect")
+ return cc.pIsLineIntersect(a,b,c,d,s,t)
+end
+_G.ccpLineIntersect = ccpLineIntersect
+
+
+local function CCPointMake(x,y)
+ deprecatedTip("CCPointMake(x,y)","cc.p(x,y)")
+ return cc.p(x,y)
+end
+_G.CCPointMake = CCPointMake
+
+
+
+local function ccpNeg(pt)
+ deprecatedTip("ccpNeg","cc.pSub")
+ return cc.pSub({x = 0,y = 0}, pt)
+end
+_G.ccpNeg = ccpNeg
+
+local function ccpAdd(pt1,pt2)
+ deprecatedTip("ccpAdd","cc.pAdd")
+ return cc.pAdd(pt1,pt2)
+end
+_G.ccpAdd = ccpAdd
+
+local function ccpSub(pt1,pt2)
+ deprecatedTip("ccpSub","cc.pSub")
+ return cc.pSub(pt1,pt2)
+end
+_G.ccpSub = ccpSub
+
+local function ccpMult(pt,factor)
+ deprecatedTip("ccpMult","cc.pMul")
+ return cc.pMul(pt,factor)
+end
+_G.ccpMult = ccpMult
+
+local function ccpMidpoint(pt1,pt2)
+ deprecatedTip("ccpMidpoint","cc.pMidpoint")
+ return cc.pMidpoint(pt1,pt2)
+end
+_G.ccpMidpoint = ccpMidpoint
+
+local function ccpDot(pt1,pt2)
+ deprecatedTip("ccpDot","cc.pDot")
+ return cc.pDot(pt1,pt2)
+end
+_G.ccpDot = ccpDot
+
+local function ccpCross(pt1,pt2)
+ deprecatedTip("ccpCross","cc.pCross")
+ return cc.pCross(pt1, pt2)
+end
+_G.ccpCross = ccpCross
+
+local function ccpPerp(pt)
+ deprecatedTip("ccpPerp","cc.pPerp")
+ return cc.pPerp(pt)
+end
+_G.ccpPerp = ccpPerp
+
+local function ccpRPerp(pt)
+ deprecatedTip("ccpRPerp","cc.RPerp")
+ return cc.RPerp(pt)
+end
+_G.ccpRPerp = ccpRPerp
+
+local function ccpProject(pt1,pt2)
+ deprecatedTip("ccpProject","cc.pProject")
+ return cc.pProject(pt1,pt2)
+end
+_G.ccpProject = ccpProject
+
+local function ccpRotate(pt1,pt2)
+ deprecatedTip("ccpRotate","cc.pRotate")
+ return cc.pRotate(pt1,pt2)
+end
+_G.ccpRotate = ccpRotate
+
+local function ccpUnrotate(pt1,pt2)
+ deprecatedTip("ccpUnrotate","cc.pUnrotate")
+ return cc.pUnrotate(pt1,pt2)
+end
+_G.ccpUnrotate = ccpUnrotate
+
+local function ccpLengthSQ(pt)
+ deprecatedTip("ccpLengthSQ","cc.pLengthSQ")
+ return cc.pLengthSQ(pt)
+end
+_G.ccpLengthSQ = ccpLengthSQ
+
+local function ccpDistanceSQ(pt1,pt2)
+ deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ")
+ return cc.pDistanceSQ(pt1,pt2)
+end
+_G.ccpDistanceSQ = ccpDistanceSQ
+
+local function ccpLength(pt)
+ deprecatedTip("ccpLength","cc.pGetLength")
+ return cc.pGetLength(pt)
+end
+_G.ccpLength = ccpLength
+
+local function ccpDistance(pt1,pt2)
+ deprecatedTip("ccpDistance","cc.pGetDistance")
+ return cc.pGetDistance(pt1, pt2)
+end
+_G.ccpDistance = ccpDistance
+
+local function ccpNormalize(pt)
+ deprecatedTip("ccpNormalize","cc.pNormalize")
+ return cc.pNormalize(pt)
+end
+_G.ccpNormalize = ccpNormalize
+
+local function ccpForAngle(angle)
+ deprecatedTip("ccpForAngle","cc.pForAngle")
+ return cc.pForAngle(angle)
+end
+_G.ccpForAngle = ccpForAngle
+
+local function ccpToAngle(pt)
+ deprecatedTip("ccpToAngle","cc.pToAngleSelf")
+ return cc.pToAngleSelf(pt)
+end
+_G.ccpToAngle = ccpToAngle
+
+local function ccpClamp(pt1,pt2,pt3)
+ deprecatedTip("ccpClamp","cc.pGetClampPoint")
+ return cc.pGetClampPoint(pt1,pt2,pt3)
+end
+_G.ccpClamp = ccpClamp
+
+
+local function ccpFromSize(sz)
+ deprecatedTip("ccpFromSize(sz)","cc.pFromSize")
+ return cc.pFromSize(sz)
+end
+_G.ccpFromSize = ccpFromSize
+
+local function ccpLerp(pt1,pt2,alpha)
+ deprecatedTip("ccpLerp","cc.pLerp")
+ return cc.pLerp(pt1,pt2,alpha)
+end
+_G.ccpLerp = ccpLerp
+
+local function ccpFuzzyEqual(pt1,pt2,variance)
+ deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual")
+ return cc.pFuzzyEqual(pt1,pt2,variance)
+end
+_G.ccpFuzzyEqual = ccpFuzzyEqual
+
+local function ccpCompMult(pt1,pt2)
+ deprecatedTip("ccpCompMult","cc.p")
+ return cc.p(pt1.x * pt2.x , pt1.y * pt2.y)
+end
+_G.ccpCompMult = ccpCompMult
+
+local function ccpAngleSigned(pt1,pt2)
+ deprecatedTip("ccpAngleSigned","cc.pGetAngle")
+ return cc.pGetAngle(pt1, pt2)
+end
+_G.ccpAngleSigned = ccpAngleSigned
+
+local function ccpAngle(pt1,pt2)
+ deprecatedTip("ccpAngle","cc.pGetAngle")
+ return cc.pGetAngle(pt1,ptw)
+end
+_G.ccpAngle = ccpAngle
+
+local function ccpRotateByAngle(pt1,pt2,angle)
+ deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle")
+ return cc.pRotateByAngle(pt1, pt2, angle)
+end
+_G.ccpRotateByAngle = ccpRotateByAngle
+
+local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
+ deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect")
+ return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
+end
+_G.ccpSegmentIntersect = ccpSegmentIntersect
+
+local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
+ deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint")
+ return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
+end
+_G.ccpIntersectPoint = ccpIntersectPoint
+
+
+local function vertex2(x,y)
+ deprecatedTip("vertex2(x,y)","cc.vertex2F(x,y)")
+ return cc.vertex2F(x,y)
+end
+_G.vertex2 = vertex2
+
+local function vertex3(x,y,z)
+ deprecatedTip("vertex3(x,y,z)","cc.Vertex3F(x,y,z)")
+ return cc.Vertex3F(x,y,z)
+end
+_G.vertex3 = vertex3
+
+local function tex2(u,v)
+ deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
+ return cc.tex2f(u,v)
+end
+_G.tex2 = tex2
+
+local function ccc4BFromccc4F(color4F)
+ deprecatedTip("ccc4BFromccc4F(color4F)","Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)")
+ return Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)
+end
+_G.ccc4BFromccc4F = ccc4BFromccc4F
+
+local function ccColor3BDeprecated()
+ deprecatedTip("ccColor3B","cc.c3b(0,0,0)")
+ return cc.c3b(0,0,0)
+end
+_G.ccColor3B = ccColor3BDeprecated
+
+local function ccColor4BDeprecated()
+ deprecatedTip("ccColor4B","cc.c4b(0,0,0,0)")
+ return cc.c4b(0,0,0,0)
+end
+_G.ccColor4B = ccColor4BDeprecated
+
+local function ccColor4FDeprecated()
+ deprecatedTip("ccColor4F","cc.c4f(0.0,0.0,0.0,0.0)")
+ return cc.c4f(0.0,0.0,0.0,0.0)
+end
+_G.ccColor4F = ccColor4FDeprecated
+
+local function ccVertex2FDeprecated()
+ deprecatedTip("ccVertex2F","cc.vertex2F(0.0,0.0)")
+ return cc.vertex2F(0.0,0.0)
+end
+_G.ccVertex2F = ccVertex2FDeprecated
+
+local function ccVertex3FDeprecated()
+ deprecatedTip("ccVertex3F","cc.Vertex3F(0.0, 0.0, 0.0)")
+ return cc.Vertex3F(0.0, 0.0, 0.0)
+end
+_G.ccVertex3F = ccVertex3FDeprecated
+
+local function ccTex2FDeprecated()
+ deprecatedTip("ccTex2F","cc.tex2F(0.0, 0.0)")
+ return cc.tex2F(0.0, 0.0)
+end
+_G.ccTex2F = ccTex2FDeprecated
+
+local function ccPointSpriteDeprecated()
+ deprecatedTip("ccPointSprite","cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)")
+ return cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)
+end
+_G.ccPointSprite = ccPointSpriteDeprecated
+
+local function ccQuad2Deprecated()
+ deprecatedTip("ccQuad2","cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))")
+ return cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))
+end
+_G.ccQuad2 = ccQuad2Deprecated
+
+local function ccQuad3Deprecated()
+ deprecatedTip("ccQuad3","cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))")
+ return cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))
+end
+_G.ccQuad3 = ccQuad3Deprecated
+
+local function ccV2FC4BT2FDeprecated()
+ deprecatedTip("ccV2F_C4B_T2F","cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))
+end
+_G.ccV2F_C4B_T2F = ccV2FC4BT2FDeprecated
+
+
+local function ccV2FC4FT2FDeprecated()
+ deprecatedTip("ccV2F_C4F_T2F","cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0), cc.tex2F(0.0, 0.0))
+end
+_G.ccV2F_C4F_T2F = ccV2FC4FT2FDeprecated
+
+local function ccV3FC4BT2FDeprecated()
+ deprecatedTip("ccV3F_C4B_T2F","cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))
+end
+_G.ccV3F_C4B_T2F = ccV3FC4BT2FDeprecated
+
+local function ccV2FC4BT2FQuadDeprecated()
+ deprecatedTip("ccV2F_C4B_T2F_Quad","cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))")
+ return cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV2F_C4B_T2F_Quad = ccV2FC4BT2FQuadDeprecated
+
+local function ccV3FC4BT2FQuadDeprecated()
+ deprecatedTip("ccV3F_C4B_T2F_Quad","cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)")
+ return cc.V3F_C4B_T2F_Quad(cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV3F_C4B_T2F_Quad = ccV3FC4BT2FQuadDeprecated
+
+local function ccV2FC4FT2FQuadDeprecated()
+ deprecatedTip("ccV2F_C4F_T2F_Quad","cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)")
+ return cc.V2F_C4F_T2F_Quad(cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV2F_C4F_T2F_Quad = ccV2FC4FT2FQuadDeprecated
+
+local function ccT2FQuadDeprecated()
+ deprecatedTip("ccT2F_Quad","cc.T2F_Quad(_bl, _br, _tl, _tr)")
+ return cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0))
+end
+_G.ccT2F_Quad = ccT2FQuadDeprecated
+
+local function ccAnimationFrameDataDeprecated()
+ deprecatedTip("ccAnimationFrameData","cc.AnimationFrameData( _texCoords, _delay, _size)")
+ return cc.AnimationFrameData(cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)), 0, cc.size(0,0))
+end
+_G.ccAnimationFrameData = ccAnimationFrameDataDeprecated
+
+
+
+local function tex2(u,v)
+ deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
+ return cc.tex2f(u,v)
+end
+_G.tex2 = tex2
+
+
+--functions of CCApplication will be deprecated end
+local CCApplicationDeprecated = { }
+function CCApplicationDeprecated.sharedApplication()
+ deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance")
+ return CCApplication:getInstance()
+end
+CCApplication.sharedApplication = CCApplicationDeprecated.sharedApplication
+--functions of CCApplication will be deprecated end
+
+
+--functions of CCDirector will be deprecated end
+local CCDirectorDeprecated = { }
+function CCDirectorDeprecated.sharedDirector()
+ deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance")
+ return CCDirector:getInstance()
+end
+CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
+--functions of CCDirector will be deprecated end
+
+
+--functions of CCUserDefault will be deprecated end
+local CCUserDefaultDeprecated = { }
+function CCUserDefaultDeprecated.sharedUserDefault()
+ deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance")
+ return CCUserDefault:getInstance()
+end
+CCUserDefault.sharedUserDefault = CCUserDefaultDeprecated.sharedUserDefault
+
+function CCUserDefaultDeprecated.purgeSharedUserDefault()
+ deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance")
+ return CCUserDefault:destroyInstance()
+end
+CCUserDefault.purgeSharedUserDefault = CCUserDefaultDeprecated.purgeSharedUserDefault
+--functions of CCUserDefault will be deprecated end
+
+--functions of CCGrid3DAction will be deprecated begin
+local CCGrid3DActionDeprecated = { }
+function CCGrid3DActionDeprecated.vertex(self,pt)
+ deprecatedTip("vertex","CCGrid3DAction:getVertex")
+ return self:getVertex(pt)
+end
+CCGrid3DAction.vertex = CCGrid3DActionDeprecated.vertex
+
+function CCGrid3DActionDeprecated.originalVertex(self,pt)
+ deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex")
+ return self:getOriginalVertex(pt)
+end
+CCGrid3DAction.originalVertex = CCGrid3DActionDeprecated.originalVertex
+--functions of CCGrid3DAction will be deprecated end
+
+
+--functions of CCTiledGrid3DAction will be deprecated begin
+local CCTiledGrid3DActionDeprecated = { }
+function CCTiledGrid3DActionDeprecated.tile(self,pt)
+ deprecatedTip("tile","CCTiledGrid3DAction:getTile")
+ return self:getTile(pt)
+end
+CCTiledGrid3DAction.tile = CCTiledGrid3DActionDeprecated.tile
+
+function CCTiledGrid3DActionDeprecated.originalTile(self,pt)
+ deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile")
+ return self:getOriginalTile(pt)
+end
+CCTiledGrid3DAction.originalTile = CCTiledGrid3DActionDeprecated.originalTile
+--functions of CCTiledGrid3DAction will be deprecated end
+
+
+--functions of CCTexture2D will be deprecated begin
+local CCTexture2DDeprecated = { }
+function CCTexture2DDeprecated.stringForFormat(self)
+ deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat")
+ return self:getStringForFormat()
+end
+CCTexture2D.stringForFormat = CCTexture2DDeprecated.stringForFormat
+
+function CCTexture2DDeprecated.bitsPerPixelForFormat(self)
+ deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
+ return self:getBitsPerPixelForFormat()
+end
+CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
+
+function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat)
+ deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
+ return self:getBitsPerPixelForFormat(pixelFormat)
+end
+CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
+
+function CCTexture2DDeprecated.defaultAlphaPixelFormat(self)
+ deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat")
+ return self:getDefaultAlphaPixelFormat()
+end
+CCTexture2D.defaultAlphaPixelFormat = CCTexture2DDeprecated.defaultAlphaPixelFormat
+--functions of CCTexture2D will be deprecated end
+
+
+--functions of CCTimer will be deprecated begin
+local CCTimerDeprecated = { }
+function CCTimerDeprecated.timerWithScriptHandler(handler,seconds)
+ deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler")
+ return CCTimer:createWithScriptHandler(handler,seconds)
+end
+CCTimer.timerWithScriptHandler = CCTimerDeprecated.timerWithScriptHandler
+
+function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target)
+ deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget")
+ return self:getNumberOfRunningActionsInTarget(target)
+end
+CCTimer.numberOfRunningActionsInTarget = CCTimerDeprecated.numberOfRunningActionsInTarget
+--functions of CCTimer will be deprecated end
+
+
+--functions of CCMenuItemFont will be deprecated begin
+local CCMenuItemFontDeprecated = { }
+function CCMenuItemFontDeprecated.fontSize()
+ deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize")
+ return CCMenuItemFont:getFontSize()
+end
+CCMenuItemFont.fontSize = CCMenuItemFontDeprecated.fontSize
+
+function CCMenuItemFontDeprecated.fontName()
+ deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName")
+ return CCMenuItemFont:getFontName()
+end
+CCMenuItemFont.fontName = CCMenuItemFontDeprecated.fontName
+
+function CCMenuItemFontDeprecated.fontSizeObj(self)
+ deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj")
+ return self:getFontSizeObj()
+end
+CCMenuItemFont.fontSizeObj = CCMenuItemFontDeprecated.fontSizeObj
+
+function CCMenuItemFontDeprecated.fontNameObj(self)
+ deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj")
+ return self:getFontNameObj()
+end
+CCMenuItemFont.fontNameObj = CCMenuItemFontDeprecated.fontNameObj
+--functions of CCMenuItemFont will be deprecated end
+
+
+--functions of CCMenuItemToggle will be deprecated begin
+local CCMenuItemToggleDeprecated = { }
+function CCMenuItemToggleDeprecated.selectedItem(self)
+ deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem")
+ return self:getSelectedItem()
+end
+CCMenuItemToggle.selectedItem = CCMenuItemToggleDeprecated.selectedItem
+--functions of CCMenuItemToggle will be deprecated end
+
+
+--functions of CCTileMapAtlas will be deprecated begin
+local CCTileMapAtlasDeprecated = { }
+function CCTileMapAtlasDeprecated.tileAt(self,pos)
+ deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt")
+ return self:getTileAt(pos)
+end
+CCTileMapAtlas.tileAt = CCTileMapAtlasDeprecated.tileAt
+--functions of CCTileMapAtlas will be deprecated end
+
+
+--functions of CCTMXLayer will be deprecated begin
+local CCTMXLayerDeprecated = { }
+function CCTMXLayerDeprecated.tileAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt")
+ return self:getTileAt(tileCoordinate)
+end
+CCTMXLayer.tileAt = CCTMXLayerDeprecated.tileAt
+
+function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt")
+ return self:getTileGIDAt(tileCoordinate)
+end
+CCTMXLayer.tileGIDAt = CCTMXLayerDeprecated.tileGIDAt
+
+function CCTMXLayerDeprecated.positionAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt")
+ return self:getPositionAt(tileCoordinate)
+end
+CCTMXLayer.positionAt = CCTMXLayerDeprecated.positionAt
+
+function CCTMXLayerDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXLayer.propertyNamed = CCTMXLayerDeprecated.propertyNamed
+--functions of CCTMXLayer will be deprecated end
+
+--functions of CCTMXTiledMap will be deprecated begin
+local CCTMXTiledMapDeprecated = { }
+function CCTMXTiledMapDeprecated.layerNamed(self,layerName)
+ deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer")
+ return self:getLayer(layerName)
+end
+CCTMXTiledMap.layerNamed = CCTMXTiledMapDeprecated.layerNamed
+
+function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXTiledMap.propertyNamed = CCTMXTiledMapDeprecated.propertyNamed
+
+function CCTMXTiledMapDeprecated.propertiesForGID(self,GID)
+ deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID")
+ return self:getPropertiesForGID(GID)
+end
+CCTMXTiledMap.propertiesForGID = CCTMXTiledMapDeprecated.propertiesForGID
+
+function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName)
+ deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup")
+ return self:getObjectGroup(groupName)
+end
+CCTMXTiledMap.objectGroupNamed = CCTMXTiledMapDeprecated.objectGroupNamed
+--functions of CCTMXTiledMap will be deprecated end
+
+
+--functions of CCTMXMapInfo will be deprecated begin
+local CCTMXMapInfoDeprecated = { }
+function CCTMXMapInfoDeprecated.getStoringCharacters(self)
+ deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters")
+ return self:isStoringCharacters()
+end
+CCTMXMapInfo.getStoringCharacters = CCTMXMapInfoDeprecated.getStoringCharacters
+
+function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile)
+ deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create")
+ return CCTMXMapInfo:create(tmxFile)
+end
+CCTMXMapInfo.formatWithTMXFile = CCTMXMapInfoDeprecated.formatWithTMXFile
+
+function CCTMXMapInfoDeprecated.formatWithXML(infoTable,tmxString,resourcePath)
+ deprecatedTip("CCTMXMapInfo:formatWithXML","TMXMapInfo:createWithXML")
+ return CCTMXMapInfo:createWithXML(tmxString,resourcePath)
+end
+CCTMXMapInfo.formatWithXML = CCTMXMapInfoDeprecated.formatWithXML
+--functions of CCTMXMapInfo will be deprecated end
+
+
+--functions of CCTMXObject will be deprecated begin
+local CCTMXObjectGroupDeprecated = { }
+function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXObjectGroup.propertyNamed = CCTMXObjectGroupDeprecated.propertyNamed
+
+function CCTMXObjectGroupDeprecated.objectNamed(self, objectName)
+ deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject")
+ return self:getObject(objectName)
+end
+CCTMXObjectGroup.objectNamed = CCTMXObjectGroupDeprecated.objectNamed
+--functions of CCTMXObject will be deprecated end
+
+--functions of CCRenderTexture will be deprecated begin
+local CCRenderTextureDeprecated = { }
+function CCRenderTextureDeprecated.newCCImage(self)
+ deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage")
+ return self:newImage()
+end
+CCRenderTexture.newCCImage = CCRenderTextureDeprecated.newCCImage
+--functions of CCRenderTexture will be deprecated end
+
+--functions of Sprite will be deprecated begin
+local CCSpriteDeprecated = { }
+function CCSpriteDeprecated.setFlipX(self,flag)
+ deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX")
+ return self:setFlippedX(flag)
+end
+cc.Sprite.setFlipX = CCSpriteDeprecated.setFlipX
+
+function CCSpriteDeprecated.setFlipY(self,flag)
+ deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY")
+ return self:setFlippedY(flag)
+end
+cc.Sprite.setFlipY = CCSpriteDeprecated.setFlipY
+--functions of Sprite will be deprecated end
+
+
+--functions of Layer will be deprecated begin
+local CCLayerDeprecated = {}
+function CCLayerDeprecated.setKeypadEnabled( self, enabled)
+ return self:setKeyboardEnabled(enabled)
+end
+cc.Layer.setKeypadEnabled = CCLayerDeprecated.setKeypadEnabled
+
+function CCLayerDeprecated.isKeypadEnabled(self)
+ return self:isKeyboardEnabled()
+end
+cc.Layer.isKeypadEnabled = CCLayerDeprecated.isKeypadEnabled
+--functions of Layer will be deprecated end
+
+--functions of cc.Node will be deprecated begin
+local NodeDeprecated = { }
+function NodeDeprecated.setZOrder(self,zOrder)
+ deprecatedTip("cc.Node:setZOrder","cc.Node:setLocalZOrder")
+ return self:setLocalZOrder(zOrder)
+end
+cc.Node.setZOrder = NodeDeprecated.setZOrder
+
+function NodeDeprecated.getZOrder(self)
+ deprecatedTip("cc.Node:getZOrder","cc.Node:getLocalZOrder")
+ return self:getLocalZOrder()
+end
+cc.Node.getZOrder = NodeDeprecated.getZOrder
+
+function NodeDeprecated.setVertexZ(self,vertexZ)
+ deprecatedTip("cc.Node:setVertexZ", "cc.Node:setPositionZ")
+ return self:setPositionZ(vertexZ)
+end
+cc.Node.setVertexZ = NodeDeprecated.setVertexZ
+
+function NodeDeprecated.getVertexZ(self)
+ deprecatedTip("cc.Node:getVertexZ", "cc.Node:getPositionZ")
+ return self:getPositionZ()
+end
+cc.Node.getVertexZ = NodeDeprecated.getVertexZ
+--functions of cc.Node will be deprecated end
+
+--functions of cc.GLProgram will be deprecated begin
+local GLProgram = { }
+function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderByteArray)
+ deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays")
+ return self:initWithByteArrays(vShaderByteArray, fShaderByteArray)
+end
+cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray
+
+function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray)
+ deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames")
+ return self:initWithFilenames(vShaderByteArray, fShaderByteArray)
+end
+cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename
+
+function GLProgram.addAttribute(self, attributeName, index)
+ deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation")
+ return self:bindAttribLocation(attributeName, index)
+end
+cc.GLProgram.addAttribute = GLProgram.addAttribute
+--functions of cc.GLProgram will be deprecated end
diff --git a/simulator/win32/src/cocos/cocos2d/DeprecatedOpenglEnum.lua b/simulator/win32/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
new file mode 100644
index 0000000..1235e8d
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
@@ -0,0 +1,288 @@
+-- This is the DeprecatedEnum
+
+DeprecatedClass = {} or DeprecatedClass
+
+_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT
+_G.GL_LINE_WIDTH = gl.LINE_WIDTH
+_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA
+_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA
+_G.GL_GREEN_BITS = gl.GREEN_BITS
+_G.GL_STENCIL_REF = gl.STENCIL_REF
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
+_G.GL_CCW = gl.CCW
+_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS
+_G.GL_BACK = gl.BACK
+_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X
+_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z
+_G.GL_ONE = gl.ONE
+_G.GL_TRUE = gl.TRUE
+_G.GL_TEXTURE12 = gl.TEXTURE12
+_G.GL_LINK_STATUS = gl.LINK_STATUS
+_G.GL_BLEND = gl.BLEND
+_G.GL_LESS = gl.LESS
+_G.GL_TEXTURE16 = gl.TEXTURE16
+_G.GL_BOOL_VEC2 = gl.BOOL_VEC2
+_G.GL_KEEP = gl.KEEP
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED
+_G.GL_EXTENSIONS = gl.EXTENSIONS
+_G.GL_FRONT = gl.FRONT
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS
+_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION
+_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE
+_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT
+_G.GL_VENDOR = gl.VENDOR
+_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y
+_G.GL_NEAREST = gl.NEAREST
+_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH
+_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING
+_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER
+_G.GL_LEQUAL = gl.LEQUAL
+_G.GL_VERSION = gl.VERSION
+_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE
+_G.GL_RENDERER = gl.RENDERER
+_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS
+_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL
+_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK
+_G.GL_BOOL = gl.BOOL
+_G.GL_VIEWPORT = gl.VIEWPORT
+_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER
+_G.GL_LUMINANCE = gl.LUMINANCE
+_G.GL_DECR_WRAP = gl.DECR_WRAP
+_G.GL_FUNC_ADD = gl.FUNC_ADD
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY
+_G.GL_BOOL_VEC4 = gl.BOOL_VEC4
+_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR
+_G.GL_STATIC_DRAW = gl.STATIC_DRAW
+_G.GL_DITHER = gl.DITHER
+_G.GL_TEXTURE31 = gl.TEXTURE31
+_G.GL_TEXTURE30 = gl.TEXTURE30
+_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE
+_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16
+_G.GL_TEXTURE23 = gl.TEXTURE23
+_G.GL_DEPTH_TEST = gl.DEPTH_TEST
+_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL
+_G.GL_BOOL_VEC3 = gl.BOOL_VEC3
+_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS
+_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D
+_G.GL_TEXTURE21 = gl.TEXTURE21
+_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT
+_G.GL_DONT_CARE = gl.DONT_CARE
+_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE
+_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3
+_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5
+_G.GL_INT_VEC2 = gl.INT_VEC2
+_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4
+_G.GL_NONE = gl.NONE
+_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA
+_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS
+_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT
+_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS
+_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS
+_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB
+_G.GL_TEXTURE = gl.TEXTURE
+_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR
+_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
+_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM
+_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT
+_G.GL_TEXTURE20 = gl.TEXTURE20
+_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH
+_G.GL_TEXTURE28 = gl.TEXTURE28
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
+_G.GL_TEXTURE22 = gl.TEXTURE22
+_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING
+_G.GL_STREAM_DRAW = gl.STREAM_DRAW
+_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX
+_G.GL_TEXTURE26 = gl.TEXTURE26
+_G.GL_TEXTURE27 = gl.TEXTURE27
+_G.GL_TEXTURE24 = gl.TEXTURE24
+_G.GL_TEXTURE25 = gl.TEXTURE25
+_G.GL_NO_ERROR = gl.NO_ERROR
+_G.GL_TEXTURE29 = gl.TEXTURE29
+_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4
+_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED
+_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
+_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3
+_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE
+_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1
+_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS
+_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION
+_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT
+_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS
+_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE
+_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR
+_G.GL_TEXTURE2 = gl.TEXTURE2
+_G.GL_TEXTURE1 = gl.TEXTURE1
+_G.GL_GEQUAL = gl.GEQUAL
+_G.GL_TEXTURE7 = gl.TEXTURE7
+_G.GL_TEXTURE6 = gl.TEXTURE6
+_G.GL_TEXTURE5 = gl.TEXTURE5
+_G.GL_TEXTURE4 = gl.TEXTURE4
+_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_TEXTURE9 = gl.TEXTURE9
+_G.GL_STENCIL_TEST = gl.STENCIL_TEST
+_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK
+_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT
+_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8
+_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE
+_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2
+_G.GL_BLUE_BITS = gl.BLUE_BITS
+_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER
+_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS
+_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK
+_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4
+_G.GL_TEXTURE17 = gl.TEXTURE17
+_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA
+_G.GL_TEXTURE15 = gl.TEXTURE15
+_G.GL_TEXTURE14 = gl.TEXTURE14
+_G.GL_TEXTURE13 = gl.TEXTURE13
+_G.GL_SAMPLES = gl.SAMPLES
+_G.GL_TEXTURE11 = gl.TEXTURE11
+_G.GL_TEXTURE10 = gl.TEXTURE10
+_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT
+_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT
+_G.GL_TEXTURE19 = gl.TEXTURE19
+_G.GL_TEXTURE18 = gl.TEXTURE18
+_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST
+_G.GL_SHORT = gl.SHORT
+_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING
+_G.GL_REPEAT = gl.REPEAT
+_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER
+_G.GL_RED_BITS = gl.RED_BITS
+_G.GL_FRONT_FACE = gl.FRONT_FACE
+_G.GL_BLEND_COLOR = gl.BLEND_COLOR
+_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT
+_G.GL_INT_VEC4 = gl.INT_VEC4
+_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE
+_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE
+_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT
+_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK
+_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT
+_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL
+_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC
+_G.GL_REPLACE = gl.REPLACE
+_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA
+_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE
+_G.GL_FASTEST = gl.FASTEST
+_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL
+_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT
+_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT
+_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL
+_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB
+_G.GL_TEXTURE3 = gl.TEXTURE3
+_G.GL_RENDERBUFFER = gl.RENDERBUFFER
+_G.GL_RGB5_A1 = gl.RGB5_A1
+_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE
+_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE
+_G.GL_NOTEQUAL = gl.NOTEQUAL
+_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB
+_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK
+_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP
+_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE
+_G.GL_ZERO = gl.ZERO
+_G.GL_TEXTURE0 = gl.TEXTURE0
+_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE
+_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE
+_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE
+_G.GL_BYTE = gl.BYTE
+_G.GL_CW = gl.CW
+_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW
+_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE
+_G.GL_FALSE = gl.FALSE
+_G.GL_GREATER = gl.GREATER
+_G.GL_RGBA4 = gl.RGBA4
+_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS
+_G.GL_STENCIL_BITS = gl.STENCIL_BITS
+_G.GL_RGB = gl.RGB
+_G.GL_INT = gl.INT
+_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC
+_G.GL_SAMPLER_2D = gl.SAMPLER_2D
+_G.GL_NICEST = gl.NICEST
+_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS
+_G.GL_CULL_FACE = gl.CULL_FACE
+_G.GL_INT_VEC3 = gl.INT_VEC3
+_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE
+_G.GL_INVALID_ENUM = gl.INVALID_ENUM
+_G.GL_INVERT = gl.INVERT
+_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE
+_G.GL_TEXTURE8 = gl.TEXTURE8
+_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER
+_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S
+_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE
+_G.GL_LINES = gl.LINES
+_G.GL_EQUAL = gl.EQUAL
+_G.GL_LINE_LOOP = gl.LINE_LOOP
+_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T
+_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT
+_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS
+_G.GL_SHADER_TYPE = gl.SHADER_TYPE
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+_G.GL_DECR = gl.DECR
+_G.GL_DELETE_STATUS = gl.DELETE_STATUS
+_G.GL_DEPTH_BITS = gl.DEPTH_BITS
+_G.GL_INCR = gl.INCR
+_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE
+_G.GL_ALPHA_BITS = gl.ALPHA_BITS
+_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2
+_G.GL_LINE_STRIP = gl.LINE_STRIP
+_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH
+_G.GL_INVALID_VALUE = gl.INVALID_VALUE
+_G.GL_NEVER = gl.NEVER
+_G.GL_INCR_WRAP = gl.INCR_WRAP
+_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA
+_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER
+_G.GL_POINTS = gl.POINTS
+_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0
+_G.GL_RGBA = gl.RGBA
+_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE
+_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE
+_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER
+_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP
+_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS
+_G.GL_LINEAR = gl.LINEAR
+_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST
+_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH
+_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF
+_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER
+_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE
+_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP
+_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR
+_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS
+_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE
+_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT
+_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE
+_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE
+_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION
+_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED
+_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH
+_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS
+_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK
+_G.GL_ALWAYS = gl.ALWAYS
+_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE
+_G.GL_FLOAT = gl.FLOAT
+_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING
+_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
+_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN
+_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION
+_G.GL_TEXTURE_2D = gl.TEXTURE_2D
+_G.GL_ALPHA = gl.ALPHA
+_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB
+_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST
+_G.GL_TRIANGLES = gl.TRIANGLES
diff --git a/simulator/win32/src/cocos/cocos2d/DrawPrimitives.lua b/simulator/win32/src/cocos/cocos2d/DrawPrimitives.lua
new file mode 100644
index 0000000..e4f50a9
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/DrawPrimitives.lua
@@ -0,0 +1,384 @@
+
+local dp_initialized = false
+local dp_shader = nil
+local dp_colorLocation = -1
+local dp_color = { 1.0, 1.0, 1.0, 1.0 }
+local dp_pointSizeLocation = -1
+local dp_pointSize = 1.0
+
+local SHADER_NAME_POSITION_U_COLOR = "ShaderPosition_uColor"
+
+local targetPlatform = cc.Application:getInstance():getTargetPlatform()
+
+local function lazy_init()
+ if not dp_initialized then
+ dp_shader = cc.ShaderCache:getInstance():getProgram(SHADER_NAME_POSITION_U_COLOR)
+ --dp_shader:retain()
+ if nil ~= dp_shader then
+ dp_colorLocation = gl.getUniformLocation( dp_shader:getProgram(), "u_color")
+ dp_pointSizeLocation = gl.getUniformLocation( dp_shader:getProgram(), "u_pointSize")
+ dp_Initialized = true
+ end
+ end
+
+ if nil == dp_shader then
+ print("Error:dp_shader is nil!")
+ return false
+ end
+
+ return true
+end
+
+local function setDrawProperty()
+ gl.glEnableVertexAttribs( CCConstants.VERTEX_ATTRIB_FLAG_POSITION )
+ dp_shader:use()
+ dp_shader:setUniformsForBuiltins()
+ dp_shader:setUniformLocationWith4fv(dp_colorLocation, dp_color, 1)
+end
+
+function ccDrawInit()
+ lazy_init()
+end
+
+function ccDrawFree()
+ dp_initialized = false
+end
+
+function ccDrawColor4f(r,g,b,a)
+ dp_color[1] = r
+ dp_color[2] = g
+ dp_color[3] = b
+ dp_color[4] = a
+end
+
+function ccPointSize(pointSize)
+ dp_pointSize = pointSize * cc.Director:getInstance():getContentScaleFactor()
+end
+
+function ccDrawColor4B(r,g,b,a)
+ dp_color[1] = r / 255.0
+ dp_color[2] = g / 255.0
+ dp_color[3] = b / 255.0
+ dp_color[4] = a / 255.0
+end
+
+function ccDrawPoint(point)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ local vertices = { point.x,point.y}
+ gl.bufferData(gl.ARRAY_BUFFER,2,vertices,gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ dp_shader:setUniformLocationWith1f(dp_pointSizeLocation, dp_pointSize)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.POINTS,0,1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawPoints(points,numOfPoint)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoint do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoint * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ dp_shader:setUniformLocationWith1f(dp_pointSizeLocation, dp_pointSize)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.POINTS,0,numOfPoint)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawLine(origin,destination)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = { origin.x, origin.y, destination.x, destination.y}
+ gl.bufferData(gl.ARRAY_BUFFER,4,vertices,gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINES ,0,2)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawPoly(points,numOfPoints,closePolygon)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoints do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoints * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ if closePolygon then
+ gl.drawArrays(gl.LINE_LOOP , 0, numOfPoints)
+ else
+ gl.drawArrays(gl.LINE_STRIP, 0, numOfPoints)
+ end
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawSolidPoly(points,numOfPoints,color)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoints do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoints * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ gl.glEnableVertexAttribs( CCConstants.VERTEX_ATTRIB_FLAG_POSITION )
+ dp_shader:use()
+ dp_shader:setUniformsForBuiltins()
+ dp_shader:setUniformLocationWith4fv(dp_colorLocation, color, 1)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.TRIANGLE_FAN , 0, numOfPoints)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawRect(origin,destination)
+ ccDrawLine(CCPoint:__call(origin.x, origin.y), CCPoint:__call(destination.x, origin.y))
+ ccDrawLine(CCPoint:__call(destination.x, origin.y), CCPoint:__call(destination.x, destination.y))
+ ccDrawLine(CCPoint:__call(destination.x, destination.y), CCPoint:__call(origin.x, destination.y))
+ ccDrawLine(CCPoint:__call(origin.x, destination.y), CCPoint:__call(origin.x, origin.y))
+end
+
+function ccDrawSolidRect( origin,destination,color )
+ local vertices = { origin, CCPoint:__call(destination.x, origin.y) , destination, CCPoint:__call(origin.x, destination.y) }
+ ccDrawSolidPoly(vertices,4,color)
+end
+
+function ccDrawCircleScale( center, radius, angle, segments,drawLineToCenter,scaleX,scaleY)
+ if not lazy_init() then
+ return
+ end
+
+ local additionalSegment = 1
+ if drawLineToCenter then
+ additionalSegment = additionalSegment + 1
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local coef = 2.0 * math.pi / segments
+ local i = 1
+ local vertices = {}
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ for i = 1, segments + 1 do
+ local rads = (i - 1) * coef
+ local j = radius * math.cos(rads + angle) * scaleX + center.x
+ local k = radius * math.sin(rads + angle) * scaleY + center.y
+ vertices[i * 2 - 1] = j
+ vertices[i * 2] = k
+ end
+ vertices[(segments + 2) * 2 - 1] = center.x
+ vertices[(segments + 2) * 2] = center.y
+
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 2) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + additionalSegment)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawCircle(center, radius, angle, segments, drawLineToCenter)
+ ccDrawCircleScale(center, radius, angle, segments, drawLineToCenter, 1.0, 1.0)
+end
+
+function ccDrawSolidCircle(center, radius, angle, segments,scaleX,scaleY)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local coef = 2.0 * math.pi / segments
+ local i = 1
+ local vertices = {}
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ for i = 1, segments + 1 do
+ local rads = (i - 1) * coef
+ local j = radius * math.cos(rads + angle) * scaleX + center.x
+ local k = radius * math.sin(rads + angle) * scaleY + center.y
+ vertices[i * 2 - 1] = j
+ vertices[i * 2] = k
+ end
+ vertices[(segments + 2) * 2 - 1] = center.x
+ vertices[(segments + 2) * 2] = center.y
+
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 2) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.TRIANGLE_FAN , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawQuadBezier(origin, control, destination, segments)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local vertices = { }
+ local i = 1
+ local t = 0.0
+
+ for i = 1, segments do
+ vertices[2 * i - 1] = math.pow(1 - t,2) * origin.x + 2.0 * (1 - t) * t * control.x + t * t * destination.x
+ vertices[2 * i] = math.pow(1 - t,2) * origin.y + 2.0 * (1 - t) * t * control.y + t * t * destination.y
+ t = t + 1.0 / segments
+ end
+
+ vertices[2 * (segments + 1) - 1] = destination.x
+ vertices[2 * (segments + 1)] = destination.y
+
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 1) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawCubicBezier(origin, control1, control2, destination, segments)
+ if not lazy_init then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local vertices = { }
+ local t = 0
+ local i = 1
+
+ for i = 1, segments do
+ vertices[2 * i - 1] = math.pow(1 - t,3) * origin.x + 3.0 * math.pow(1 - t, 2) * t * control1.x + 3.0 * (1 - t) * t * t * control2.x + t * t * t * destination.x
+ vertices[2 * i] = math.pow(1 - t,3) * origin.y + 3.0 * math.pow(1 - t, 2) * t * control1.y + 3.0 * (1 - t) * t * t * control2.y + t * t * t * destination.y
+ t = t + 1.0 / segments
+ end
+
+ vertices[2 * (segments + 1) - 1] = destination.x
+ vertices[2 * (segments + 1)] = destination.y
+
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 1) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
diff --git a/simulator/win32/src/cocos/cocos2d/Opengl.lua b/simulator/win32/src/cocos/cocos2d/Opengl.lua
new file mode 100644
index 0000000..7465523
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/Opengl.lua
@@ -0,0 +1,297 @@
+
+if not gl then return end
+
+--Create functions
+function gl.createTexture()
+ local retTable = {}
+ retTable.texture_id = gl._createTexture()
+ return retTable
+end
+
+function gl.createBuffer()
+ local retTable = {}
+ retTable.buffer_id = gl._createBuffer()
+ return retTable
+end
+
+function gl.createRenderbuffer()
+ local retTable = {}
+ retTable.renderbuffer_id = gl._createRenderuffer()
+ return retTable
+end
+
+function gl.createFramebuffer( )
+ local retTable = {}
+ retTable.framebuffer_id = gl._createFramebuffer()
+ return retTable
+end
+
+function gl.createProgram()
+ local retTable = {}
+ retTable.program_id = gl._createProgram()
+ return retTable
+end
+
+function gl.createShader(shaderType)
+ local retTable = {}
+ retTable.shader_id = gl._createShader(shaderType)
+ return retTable
+end
+
+--Delete Fun
+function gl.deleteTexture(texture)
+ local texture_id = 0
+ if "number" == type(texture) then
+ texture_id = texture
+ elseif "table" == type(texture) then
+ texture_id = texture.texture_id
+ end
+ gl._deleteTexture(texture_id)
+end
+
+function gl.deleteBuffer(buffer)
+ local buffer_id = 0
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+ gl._deleteBuffer(buffer_id)
+end
+
+function gl.deleteRenderbuffer(buffer)
+ local renderbuffer_id = 0
+ if "number" == type(buffer) then
+ renderbuffer_id = buffer
+ elseif "table" == type(buffer) then
+ renderbuffer_id = buffer.renderbuffer_id
+ end
+ gl._deleteRenderbuffer(renderbuffer_id)
+end
+
+function gl.deleteFramebuffer(buffer)
+ local framebuffer_id = 0
+ if "number" == type(buffer) then
+ framebuffer_id = buffer
+ elseif "table" == type(buffer) then
+ framebuffer_id = buffer.framebuffer_id
+ end
+ gl._deleteFramebuffer(framebuffer_id)
+end
+
+function gl.deleteProgram( program )
+ local program_id = 0
+ if "number" == type(buffer) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._deleteProgram(program_id)
+end
+
+function gl.deleteShader(shader)
+ local shader_id = 0
+ if "number" == type(shader) then
+ shader_id = shader
+ elseif "table" == type(shader) then
+ shader_id = shader.shader_id
+ end
+
+ gl._deleteShader(shader_id)
+end
+
+--Bind Related
+function gl.bindTexture(target, texture)
+ local texture_id = 0
+ if "number" == type(texture) then
+ texture_id = texture
+ elseif "table" == type(texture) then
+ texture_id = texture.texture_id
+ end
+
+ gl._bindTexture(target,texture_id)
+end
+
+function gl.bindBuffer( target,buffer )
+ local buffer_id = 0
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindBuffer(target, buffer_id)
+end
+
+function gl.bindRenderBuffer(target, buffer)
+ local buffer_id = 0
+
+ if "number" == type(buffer) then
+ buffer_id = buffer;
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindRenderbuffer(target, buffer_id)
+end
+
+function gl.bindFramebuffer(target, buffer)
+ local buffer_id = 0
+
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindFramebuffer(target, buffer_id)
+end
+
+--Uniform related
+function gl.getUniform(program, location)
+ local program_id = 0
+ local location_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ else
+ program_id = program.program_id
+ end
+
+ if "number" == type(location) then
+ location_id = location
+ else
+ location_id = location.location_id
+ end
+
+ return gl._getUniform(program_id, location_id)
+end
+
+--shader related
+function gl.compileShader(shader)
+ gl._compileShader( shader.shader_id)
+end
+
+function gl.shaderSource(shader, source)
+ gl._shaderSource(shader.shader_id, source)
+end
+
+function gl.getShaderParameter(shader, e)
+ return gl._getShaderParameter(shader.shader_id,e)
+end
+
+function gl.getShaderInfoLog( shader )
+ return gl._getShaderInfoLog(shader.shader_id)
+end
+
+--program related
+function gl.attachShader( program, shader )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._attachShader(program_id, shader.shader_id)
+end
+
+function gl.linkProgram( program )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._linkProgram(program_id)
+end
+
+function gl.getProgramParameter(program, e)
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getProgramParameter(program_id, e)
+end
+
+function gl.useProgram(program)
+ local program_id = 0
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._useProgram (program_id)
+end
+
+function gl.getAttribLocation(program, name )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getAttribLocation(program_id, name)
+end
+
+function gl.getUniformLocation( program, name )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getUniformLocation(program_id,name)
+end
+
+function gl.getActiveAttrib( program, index )
+ local program_id = 0
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getActiveAttrib(program_id, index);
+end
+
+function gl.getActiveUniform( program, index )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getActiveUniform(program_id, index)
+end
+
+function gl.getAttachedShaders(program)
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getAttachedShaders(program_id)
+end
+
+function gl.glNodeCreate()
+ return cc.GLNode:create()
+end
diff --git a/simulator/win32/src/cocos/cocos2d/OpenglConstants.lua b/simulator/win32/src/cocos/cocos2d/OpenglConstants.lua
new file mode 100644
index 0000000..15adb23
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/OpenglConstants.lua
@@ -0,0 +1,826 @@
+
+if not gl then return end
+
+gl.GCCSO_SHADER_BINARY_FJ = 0x9260
+gl._3DC_XY_AMD = 0x87fa
+gl._3DC_X_AMD = 0x87f9
+gl.ACTIVE_ATTRIBUTES = 0x8b89
+gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a
+gl.ACTIVE_PROGRAM_EXT = 0x8259
+gl.ACTIVE_TEXTURE = 0x84e0
+gl.ACTIVE_UNIFORMS = 0x8b86
+gl.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87
+gl.ALIASED_LINE_WIDTH_RANGE = 0x846e
+gl.ALIASED_POINT_SIZE_RANGE = 0x846d
+gl.ALL_COMPLETED_NV = 0x84f2
+gl.ALL_SHADER_BITS_EXT = 0xffffffff
+gl.ALPHA = 0x1906
+gl.ALPHA16F_EXT = 0x881c
+gl.ALPHA32F_EXT = 0x8816
+gl.ALPHA8_EXT = 0x803c
+gl.ALPHA8_OES = 0x803c
+gl.ALPHA_BITS = 0xd55
+gl.ALPHA_TEST_FUNC_QCOM = 0xbc1
+gl.ALPHA_TEST_QCOM = 0xbc0
+gl.ALPHA_TEST_REF_QCOM = 0xbc2
+gl.ALREADY_SIGNALED_APPLE = 0x911a
+gl.ALWAYS = 0x207
+gl.AMD_compressed_3DC_texture = 0x1
+gl.AMD_compressed_ATC_texture = 0x1
+gl.AMD_performance_monitor = 0x1
+gl.AMD_program_binary_Z400 = 0x1
+gl.ANGLE_depth_texture = 0x1
+gl.ANGLE_framebuffer_blit = 0x1
+gl.ANGLE_framebuffer_multisample = 0x1
+gl.ANGLE_instanced_arrays = 0x1
+gl.ANGLE_pack_reverse_row_order = 0x1
+gl.ANGLE_program_binary = 0x1
+gl.ANGLE_texture_compression_dxt3 = 0x1
+gl.ANGLE_texture_compression_dxt5 = 0x1
+gl.ANGLE_texture_usage = 0x1
+gl.ANGLE_translated_shader_source = 0x1
+gl.ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8d6a
+gl.ANY_SAMPLES_PASSED_EXT = 0x8c2f
+gl.APPLE_copy_texture_levels = 0x1
+gl.APPLE_framebuffer_multisample = 0x1
+gl.APPLE_rgb_422 = 0x1
+gl.APPLE_sync = 0x1
+gl.APPLE_texture_format_BGRA8888 = 0x1
+gl.APPLE_texture_max_level = 0x1
+gl.ARM_mali_program_binary = 0x1
+gl.ARM_mali_shader_binary = 0x1
+gl.ARM_rgba8 = 0x1
+gl.ARRAY_BUFFER = 0x8892
+gl.ARRAY_BUFFER_BINDING = 0x8894
+gl.ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8c93
+gl.ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87ee
+gl.ATC_RGB_AMD = 0x8c92
+gl.ATTACHED_SHADERS = 0x8b85
+gl.BACK = 0x405
+gl.BGRA8_EXT = 0x93a1
+gl.BGRA_EXT = 0x80e1
+gl.BGRA_IMG = 0x80e1
+gl.BINNING_CONTROL_HINT_QCOM = 0x8fb0
+gl.BLEND = 0xbe2
+gl.BLEND_COLOR = 0x8005
+gl.BLEND_DST_ALPHA = 0x80ca
+gl.BLEND_DST_RGB = 0x80c8
+gl.BLEND_EQUATION = 0x8009
+gl.BLEND_EQUATION_ALPHA = 0x883d
+gl.BLEND_EQUATION_RGB = 0x8009
+gl.BLEND_SRC_ALPHA = 0x80cb
+gl.BLEND_SRC_RGB = 0x80c9
+gl.BLUE_BITS = 0xd54
+gl.BOOL = 0x8b56
+gl.BOOL_VEC2 = 0x8b57
+gl.BOOL_VEC3 = 0x8b58
+gl.BOOL_VEC4 = 0x8b59
+gl.BUFFER = 0x82e0
+gl.BUFFER_ACCESS_OES = 0x88bb
+gl.BUFFER_MAPPED_OES = 0x88bc
+gl.BUFFER_MAP_POINTER_OES = 0x88bd
+gl.BUFFER_OBJECT_EXT = 0x9151
+gl.BUFFER_SIZE = 0x8764
+gl.BUFFER_USAGE = 0x8765
+gl.BYTE = 0x1400
+gl.CCW = 0x901
+gl.CLAMP_TO_BORDER_NV = 0x812d
+gl.CLAMP_TO_EDGE = 0x812f
+gl.COLOR_ATTACHMENT0 = 0x8ce0
+gl.COLOR_ATTACHMENT0_NV = 0x8ce0
+gl.COLOR_ATTACHMENT10_NV = 0x8cea
+gl.COLOR_ATTACHMENT11_NV = 0x8ceb
+gl.COLOR_ATTACHMENT12_NV = 0x8cec
+gl.COLOR_ATTACHMENT13_NV = 0x8ced
+gl.COLOR_ATTACHMENT14_NV = 0x8cee
+gl.COLOR_ATTACHMENT15_NV = 0x8cef
+gl.COLOR_ATTACHMENT1_NV = 0x8ce1
+gl.COLOR_ATTACHMENT2_NV = 0x8ce2
+gl.COLOR_ATTACHMENT3_NV = 0x8ce3
+gl.COLOR_ATTACHMENT4_NV = 0x8ce4
+gl.COLOR_ATTACHMENT5_NV = 0x8ce5
+gl.COLOR_ATTACHMENT6_NV = 0x8ce6
+gl.COLOR_ATTACHMENT7_NV = 0x8ce7
+gl.COLOR_ATTACHMENT8_NV = 0x8ce8
+gl.COLOR_ATTACHMENT9_NV = 0x8ce9
+gl.COLOR_ATTACHMENT_EXT = 0x90f0
+gl.COLOR_BUFFER_BIT = 0x4000
+gl.COLOR_BUFFER_BIT0_QCOM = 0x1
+gl.COLOR_BUFFER_BIT1_QCOM = 0x2
+gl.COLOR_BUFFER_BIT2_QCOM = 0x4
+gl.COLOR_BUFFER_BIT3_QCOM = 0x8
+gl.COLOR_BUFFER_BIT4_QCOM = 0x10
+gl.COLOR_BUFFER_BIT5_QCOM = 0x20
+gl.COLOR_BUFFER_BIT6_QCOM = 0x40
+gl.COLOR_BUFFER_BIT7_QCOM = 0x80
+gl.COLOR_CLEAR_VALUE = 0xc22
+gl.COLOR_EXT = 0x1800
+gl.COLOR_WRITEMASK = 0xc23
+gl.COMPARE_REF_TO_TEXTURE_EXT = 0x884e
+gl.COMPILE_STATUS = 0x8b81
+gl.COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93bb
+gl.COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93b8
+gl.COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93b9
+gl.COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93ba
+gl.COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93bc
+gl.COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93bd
+gl.COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93b0
+gl.COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93b1
+gl.COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93b2
+gl.COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93b3
+gl.COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93b4
+gl.COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93b5
+gl.COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93b6
+gl.COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93b7
+gl.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03
+gl.COMPRESSED_RGBA_PVRTC_2BPPV2_IMG = 0x9137
+gl.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02
+gl.COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138
+gl.COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1
+gl.COMPRESSED_RGBA_S3TC_DXT3_ANGLE = 0x83f2
+gl.COMPRESSED_RGBA_S3TC_DXT5_ANGLE = 0x83f3
+gl.COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01
+gl.COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00
+gl.COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93db
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93d8
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93d9
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93da
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93d0
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93d1
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93d2
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93d3
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93d4
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93d5
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93d6
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93d7
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8c4d
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV = 0x8c4e
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV = 0x8c4f
+gl.COMPRESSED_SRGB_S3TC_DXT1_NV = 0x8c4c
+gl.COMPRESSED_TEXTURE_FORMATS = 0x86a3
+gl.CONDITION_SATISFIED_APPLE = 0x911c
+gl.CONSTANT_ALPHA = 0x8003
+gl.CONSTANT_COLOR = 0x8001
+gl.CONTEXT_FLAG_DEBUG_BIT = 0x2
+gl.CONTEXT_ROBUST_ACCESS_EXT = 0x90f3
+gl.COUNTER_RANGE_AMD = 0x8bc1
+gl.COUNTER_TYPE_AMD = 0x8bc0
+gl.COVERAGE_ALL_FRAGMENTS_NV = 0x8ed5
+gl.COVERAGE_ATTACHMENT_NV = 0x8ed2
+gl.COVERAGE_AUTOMATIC_NV = 0x8ed7
+gl.COVERAGE_BUFFERS_NV = 0x8ed3
+gl.COVERAGE_BUFFER_BIT_NV = 0x8000
+gl.COVERAGE_COMPONENT4_NV = 0x8ed1
+gl.COVERAGE_COMPONENT_NV = 0x8ed0
+gl.COVERAGE_EDGE_FRAGMENTS_NV = 0x8ed6
+gl.COVERAGE_SAMPLES_NV = 0x8ed4
+gl.CPU_OPTIMIZED_QCOM = 0x8fb1
+gl.CULL_FACE = 0xb44
+gl.CULL_FACE_MODE = 0xb45
+gl.CURRENT_PROGRAM = 0x8b8d
+gl.CURRENT_QUERY_EXT = 0x8865
+gl.CURRENT_VERTEX_ATTRIB = 0x8626
+gl.CW = 0x900
+gl.DEBUG_CALLBACK_FUNCTION = 0x8244
+gl.DEBUG_CALLBACK_USER_PARAM = 0x8245
+gl.DEBUG_GROUP_STACK_DEPTH = 0x826d
+gl.DEBUG_LOGGED_MESSAGES = 0x9145
+gl.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243
+gl.DEBUG_OUTPUT = 0x92e0
+gl.DEBUG_OUTPUT_SYNCHRONOUS = 0x8242
+gl.DEBUG_SEVERITY_HIGH = 0x9146
+gl.DEBUG_SEVERITY_LOW = 0x9148
+gl.DEBUG_SEVERITY_MEDIUM = 0x9147
+gl.DEBUG_SEVERITY_NOTIFICATION = 0x826b
+gl.DEBUG_SOURCE_API = 0x8246
+gl.DEBUG_SOURCE_APPLICATION = 0x824a
+gl.DEBUG_SOURCE_OTHER = 0x824b
+gl.DEBUG_SOURCE_SHADER_COMPILER = 0x8248
+gl.DEBUG_SOURCE_THIRD_PARTY = 0x8249
+gl.DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247
+gl.DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824d
+gl.DEBUG_TYPE_ERROR = 0x824c
+gl.DEBUG_TYPE_MARKER = 0x8268
+gl.DEBUG_TYPE_OTHER = 0x8251
+gl.DEBUG_TYPE_PERFORMANCE = 0x8250
+gl.DEBUG_TYPE_POP_GROUP = 0x826a
+gl.DEBUG_TYPE_PORTABILITY = 0x824f
+gl.DEBUG_TYPE_PUSH_GROUP = 0x8269
+gl.DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824e
+gl.DECR = 0x1e03
+gl.DECR_WRAP = 0x8508
+gl.DELETE_STATUS = 0x8b80
+gl.DEPTH24_STENCIL8_OES = 0x88f0
+gl.DEPTH_ATTACHMENT = 0x8d00
+gl.DEPTH_BITS = 0xd56
+gl.DEPTH_BUFFER_BIT = 0x100
+gl.DEPTH_BUFFER_BIT0_QCOM = 0x100
+gl.DEPTH_BUFFER_BIT1_QCOM = 0x200
+gl.DEPTH_BUFFER_BIT2_QCOM = 0x400
+gl.DEPTH_BUFFER_BIT3_QCOM = 0x800
+gl.DEPTH_BUFFER_BIT4_QCOM = 0x1000
+gl.DEPTH_BUFFER_BIT5_QCOM = 0x2000
+gl.DEPTH_BUFFER_BIT6_QCOM = 0x4000
+gl.DEPTH_BUFFER_BIT7_QCOM = 0x8000
+gl.DEPTH_CLEAR_VALUE = 0xb73
+gl.DEPTH_COMPONENT = 0x1902
+gl.DEPTH_COMPONENT16 = 0x81a5
+gl.DEPTH_COMPONENT16_NONLINEAR_NV = 0x8e2c
+gl.DEPTH_COMPONENT16_OES = 0x81a5
+gl.DEPTH_COMPONENT24_OES = 0x81a6
+gl.DEPTH_COMPONENT32_OES = 0x81a7
+gl.DEPTH_EXT = 0x1801
+gl.DEPTH_FUNC = 0xb74
+gl.DEPTH_RANGE = 0xb70
+gl.DEPTH_STENCIL_OES = 0x84f9
+gl.DEPTH_TEST = 0xb71
+gl.DEPTH_WRITEMASK = 0xb72
+gl.DITHER = 0xbd0
+gl.DMP_shader_binary = 0x1
+gl.DONT_CARE = 0x1100
+gl.DRAW_BUFFER0_NV = 0x8825
+gl.DRAW_BUFFER10_NV = 0x882f
+gl.DRAW_BUFFER11_NV = 0x8830
+gl.DRAW_BUFFER12_NV = 0x8831
+gl.DRAW_BUFFER13_NV = 0x8832
+gl.DRAW_BUFFER14_NV = 0x8833
+gl.DRAW_BUFFER15_NV = 0x8834
+gl.DRAW_BUFFER1_NV = 0x8826
+gl.DRAW_BUFFER2_NV = 0x8827
+gl.DRAW_BUFFER3_NV = 0x8828
+gl.DRAW_BUFFER4_NV = 0x8829
+gl.DRAW_BUFFER5_NV = 0x882a
+gl.DRAW_BUFFER6_NV = 0x882b
+gl.DRAW_BUFFER7_NV = 0x882c
+gl.DRAW_BUFFER8_NV = 0x882d
+gl.DRAW_BUFFER9_NV = 0x882e
+gl.DRAW_BUFFER_EXT = 0xc01
+gl.DRAW_FRAMEBUFFER_ANGLE = 0x8ca9
+gl.DRAW_FRAMEBUFFER_APPLE = 0x8ca9
+gl.DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8ca6
+gl.DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8ca6
+gl.DRAW_FRAMEBUFFER_BINDING_NV = 0x8ca6
+gl.DRAW_FRAMEBUFFER_NV = 0x8ca9
+gl.DST_ALPHA = 0x304
+gl.DST_COLOR = 0x306
+gl.DYNAMIC_DRAW = 0x88e8
+gl.ELEMENT_ARRAY_BUFFER = 0x8893
+gl.ELEMENT_ARRAY_BUFFER_BINDING = 0x8895
+gl.EQUAL = 0x202
+gl.ES_VERSION_2_0 = 0x1
+gl.ETC1_RGB8_OES = 0x8d64
+gl.ETC1_SRGB8_NV = 0x88ee
+gl.EXTENSIONS = 0x1f03
+gl.EXT_blend_minmax = 0x1
+gl.EXT_color_buffer_half_float = 0x1
+gl.EXT_debug_label = 0x1
+gl.EXT_debug_marker = 0x1
+gl.EXT_discard_framebuffer = 0x1
+gl.EXT_map_buffer_range = 0x1
+gl.EXT_multi_draw_arrays = 0x1
+gl.EXT_multisampled_render_to_texture = 0x1
+gl.EXT_multiview_draw_buffers = 0x1
+gl.EXT_occlusion_query_boolean = 0x1
+gl.EXT_read_format_bgra = 0x1
+gl.EXT_robustness = 0x1
+gl.EXT_sRGB = 0x1
+gl.EXT_separate_shader_objects = 0x1
+gl.EXT_shader_framebuffer_fetch = 0x1
+gl.EXT_shader_texture_lod = 0x1
+gl.EXT_shadow_samplers = 0x1
+gl.EXT_texture_compression_dxt1 = 0x1
+gl.EXT_texture_filter_anisotropic = 0x1
+gl.EXT_texture_format_BGRA8888 = 0x1
+gl.EXT_texture_rg = 0x1
+gl.EXT_texture_storage = 0x1
+gl.EXT_texture_type_2_10_10_10_REV = 0x1
+gl.EXT_unpack_subimage = 0x1
+gl.FALSE = 0x0
+gl.FASTEST = 0x1101
+gl.FENCE_CONDITION_NV = 0x84f4
+gl.FENCE_STATUS_NV = 0x84f3
+gl.FIXED = 0x140c
+gl.FJ_shader_binary_GCCSO = 0x1
+gl.FLOAT = 0x1406
+gl.FLOAT_MAT2 = 0x8b5a
+gl.FLOAT_MAT3 = 0x8b5b
+gl.FLOAT_MAT4 = 0x8b5c
+gl.FLOAT_VEC2 = 0x8b50
+gl.FLOAT_VEC3 = 0x8b51
+gl.FLOAT_VEC4 = 0x8b52
+gl.FRAGMENT_SHADER = 0x8b30
+gl.FRAGMENT_SHADER_BIT_EXT = 0x2
+gl.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b
+gl.FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8a52
+gl.FRAMEBUFFER = 0x8d40
+gl.FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93a3
+gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210
+gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211
+gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8cd1
+gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8cd0
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8cd4
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8cd3
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8cd2
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8d6c
+gl.FRAMEBUFFER_BINDING = 0x8ca6
+gl.FRAMEBUFFER_COMPLETE = 0x8cd5
+gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8cd6
+gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8cd9
+gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8cd7
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV = 0x8d56
+gl.FRAMEBUFFER_UNDEFINED_OES = 0x8219
+gl.FRAMEBUFFER_UNSUPPORTED = 0x8cdd
+gl.FRONT = 0x404
+gl.FRONT_AND_BACK = 0x408
+gl.FRONT_FACE = 0xb46
+gl.FUNC_ADD = 0x8006
+gl.FUNC_REVERSE_SUBTRACT = 0x800b
+gl.FUNC_SUBTRACT = 0x800a
+gl.GENERATE_MIPMAP_HINT = 0x8192
+gl.GEQUAL = 0x206
+gl.GPU_OPTIMIZED_QCOM = 0x8fb2
+gl.GREATER = 0x204
+gl.GREEN_BITS = 0xd53
+gl.GUILTY_CONTEXT_RESET_EXT = 0x8253
+gl.HALF_FLOAT_OES = 0x8d61
+gl.HIGH_FLOAT = 0x8df2
+gl.HIGH_INT = 0x8df5
+gl.IMG_multisampled_render_to_texture = 0x1
+gl.IMG_program_binary = 0x1
+gl.IMG_read_format = 0x1
+gl.IMG_shader_binary = 0x1
+gl.IMG_texture_compression_pvrtc = 0x1
+gl.IMG_texture_compression_pvrtc2 = 0x1
+gl.IMPLEMENTATION_COLOR_READ_FORMAT = 0x8b9b
+gl.IMPLEMENTATION_COLOR_READ_TYPE = 0x8b9a
+gl.INCR = 0x1e02
+gl.INCR_WRAP = 0x8507
+gl.INFO_LOG_LENGTH = 0x8b84
+gl.INNOCENT_CONTEXT_RESET_EXT = 0x8254
+gl.INT = 0x1404
+gl.INT_10_10_10_2_OES = 0x8df7
+gl.INT_VEC2 = 0x8b53
+gl.INT_VEC3 = 0x8b54
+gl.INT_VEC4 = 0x8b55
+gl.INVALID_ENUM = 0x500
+gl.INVALID_FRAMEBUFFER_OPERATION = 0x506
+gl.INVALID_OPERATION = 0x502
+gl.INVALID_VALUE = 0x501
+gl.INVERT = 0x150a
+gl.KEEP = 0x1e00
+gl.KHR_debug = 0x1
+gl.KHR_texture_compression_astc_ldr = 0x1
+gl.LEQUAL = 0x203
+gl.LESS = 0x201
+gl.LINEAR = 0x2601
+gl.LINEAR_MIPMAP_LINEAR = 0x2703
+gl.LINEAR_MIPMAP_NEAREST = 0x2701
+gl.LINES = 0x1
+gl.LINE_LOOP = 0x2
+gl.LINE_STRIP = 0x3
+gl.LINE_WIDTH = 0xb21
+gl.LINK_STATUS = 0x8b82
+gl.LOSE_CONTEXT_ON_RESET_EXT = 0x8252
+gl.LOW_FLOAT = 0x8df0
+gl.LOW_INT = 0x8df3
+gl.LUMINANCE = 0x1909
+gl.LUMINANCE16F_EXT = 0x881e
+gl.LUMINANCE32F_EXT = 0x8818
+gl.LUMINANCE4_ALPHA4_OES = 0x8043
+gl.LUMINANCE8_ALPHA8_EXT = 0x8045
+gl.LUMINANCE8_ALPHA8_OES = 0x8045
+gl.LUMINANCE8_EXT = 0x8040
+gl.LUMINANCE8_OES = 0x8040
+gl.LUMINANCE_ALPHA = 0x190a
+gl.LUMINANCE_ALPHA16F_EXT = 0x881f
+gl.LUMINANCE_ALPHA32F_EXT = 0x8819
+gl.MALI_PROGRAM_BINARY_ARM = 0x8f61
+gl.MALI_SHADER_BINARY_ARM = 0x8f60
+gl.MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10
+gl.MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8
+gl.MAP_INVALIDATE_RANGE_BIT_EXT = 0x4
+gl.MAP_READ_BIT_EXT = 0x1
+gl.MAP_UNSYNCHRONIZED_BIT_EXT = 0x20
+gl.MAP_WRITE_BIT_EXT = 0x2
+gl.MAX_3D_TEXTURE_SIZE_OES = 0x8073
+gl.MAX_COLOR_ATTACHMENTS_NV = 0x8cdf
+gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d
+gl.MAX_CUBE_MAP_TEXTURE_SIZE = 0x851c
+gl.MAX_DEBUG_GROUP_STACK_DEPTH = 0x826c
+gl.MAX_DEBUG_LOGGED_MESSAGES = 0x9144
+gl.MAX_DEBUG_MESSAGE_LENGTH = 0x9143
+gl.MAX_DRAW_BUFFERS_NV = 0x8824
+gl.MAX_EXT = 0x8008
+gl.MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd
+gl.MAX_LABEL_LENGTH = 0x82e8
+gl.MAX_MULTIVIEW_BUFFERS_EXT = 0x90f2
+gl.MAX_RENDERBUFFER_SIZE = 0x84e8
+gl.MAX_SAMPLES_ANGLE = 0x8d57
+gl.MAX_SAMPLES_APPLE = 0x8d57
+gl.MAX_SAMPLES_EXT = 0x8d57
+gl.MAX_SAMPLES_IMG = 0x9135
+gl.MAX_SAMPLES_NV = 0x8d57
+gl.MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111
+gl.MAX_TEXTURE_IMAGE_UNITS = 0x8872
+gl.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff
+gl.MAX_TEXTURE_SIZE = 0xd33
+gl.MAX_VARYING_VECTORS = 0x8dfc
+gl.MAX_VERTEX_ATTRIBS = 0x8869
+gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c
+gl.MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb
+gl.MAX_VIEWPORT_DIMS = 0xd3a
+gl.MEDIUM_FLOAT = 0x8df1
+gl.MEDIUM_INT = 0x8df4
+gl.MIN_EXT = 0x8007
+gl.MIRRORED_REPEAT = 0x8370
+gl.MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000
+gl.MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000
+gl.MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000
+gl.MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000
+gl.MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000
+gl.MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000
+gl.MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000
+gl.MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000
+gl.MULTIVIEW_EXT = 0x90f1
+gl.NEAREST = 0x2600
+gl.NEAREST_MIPMAP_LINEAR = 0x2702
+gl.NEAREST_MIPMAP_NEAREST = 0x2700
+gl.NEVER = 0x200
+gl.NICEST = 0x1102
+gl.NONE = 0x0
+gl.NOTEQUAL = 0x205
+gl.NO_ERROR = 0x0
+gl.NO_RESET_NOTIFICATION_EXT = 0x8261
+gl.NUM_COMPRESSED_TEXTURE_FORMATS = 0x86a2
+gl.NUM_PROGRAM_BINARY_FORMATS_OES = 0x87fe
+gl.NUM_SHADER_BINARY_FORMATS = 0x8df9
+gl.NV_coverage_sample = 0x1
+gl.NV_depth_nonlinear = 0x1
+gl.NV_draw_buffers = 0x1
+gl.NV_draw_instanced = 0x1
+gl.NV_fbo_color_attachments = 0x1
+gl.NV_fence = 0x1
+gl.NV_framebuffer_blit = 0x1
+gl.NV_framebuffer_multisample = 0x1
+gl.NV_generate_mipmap_sRGB = 0x1
+gl.NV_instanced_arrays = 0x1
+gl.NV_read_buffer = 0x1
+gl.NV_read_buffer_front = 0x1
+gl.NV_read_depth = 0x1
+gl.NV_read_depth_stencil = 0x1
+gl.NV_read_stencil = 0x1
+gl.NV_sRGB_formats = 0x1
+gl.NV_shadow_samplers_array = 0x1
+gl.NV_shadow_samplers_cube = 0x1
+gl.NV_texture_border_clamp = 0x1
+gl.NV_texture_compression_s3tc_update = 0x1
+gl.NV_texture_npot_2D_mipmap = 0x1
+gl.OBJECT_TYPE_APPLE = 0x9112
+gl.OES_EGL_image = 0x1
+gl.OES_EGL_image_external = 0x1
+gl.OES_compressed_ETC1_RGB8_texture = 0x1
+gl.OES_compressed_paletted_texture = 0x1
+gl.OES_depth24 = 0x1
+gl.OES_depth32 = 0x1
+gl.OES_depth_texture = 0x1
+gl.OES_element_index_uint = 0x1
+gl.OES_fbo_render_mipmap = 0x1
+gl.OES_fragment_precision_high = 0x1
+gl.OES_get_program_binary = 0x1
+gl.OES_mapbuffer = 0x1
+gl.OES_packed_depth_stencil = 0x1
+gl.OES_required_internalformat = 0x1
+gl.OES_rgb8_rgba8 = 0x1
+gl.OES_standard_derivatives = 0x1
+gl.OES_stencil1 = 0x1
+gl.OES_stencil4 = 0x1
+gl.OES_surfaceless_context = 0x1
+gl.OES_texture_3D = 0x1
+gl.OES_texture_float = 0x1
+gl.OES_texture_float_linear = 0x1
+gl.OES_texture_half_float = 0x1
+gl.OES_texture_half_float_linear = 0x1
+gl.OES_texture_npot = 0x1
+gl.OES_vertex_array_object = 0x1
+gl.OES_vertex_half_float = 0x1
+gl.OES_vertex_type_10_10_10_2 = 0x1
+gl.ONE = 0x1
+gl.ONE_MINUS_CONSTANT_ALPHA = 0x8004
+gl.ONE_MINUS_CONSTANT_COLOR = 0x8002
+gl.ONE_MINUS_DST_ALPHA = 0x305
+gl.ONE_MINUS_DST_COLOR = 0x307
+gl.ONE_MINUS_SRC_ALPHA = 0x303
+gl.ONE_MINUS_SRC_COLOR = 0x301
+gl.OUT_OF_MEMORY = 0x505
+gl.PACK_ALIGNMENT = 0xd05
+gl.PACK_REVERSE_ROW_ORDER_ANGLE = 0x93a4
+gl.PALETTE4_R5_G6_B5_OES = 0x8b92
+gl.PALETTE4_RGB5_A1_OES = 0x8b94
+gl.PALETTE4_RGB8_OES = 0x8b90
+gl.PALETTE4_RGBA4_OES = 0x8b93
+gl.PALETTE4_RGBA8_OES = 0x8b91
+gl.PALETTE8_R5_G6_B5_OES = 0x8b97
+gl.PALETTE8_RGB5_A1_OES = 0x8b99
+gl.PALETTE8_RGB8_OES = 0x8b95
+gl.PALETTE8_RGBA4_OES = 0x8b98
+gl.PALETTE8_RGBA8_OES = 0x8b96
+gl.PERCENTAGE_AMD = 0x8bc3
+gl.PERFMON_GLOBAL_MODE_QCOM = 0x8fa0
+gl.PERFMON_RESULT_AMD = 0x8bc6
+gl.PERFMON_RESULT_AVAILABLE_AMD = 0x8bc4
+gl.PERFMON_RESULT_SIZE_AMD = 0x8bc5
+gl.POINTS = 0x0
+gl.POLYGON_OFFSET_FACTOR = 0x8038
+gl.POLYGON_OFFSET_FILL = 0x8037
+gl.POLYGON_OFFSET_UNITS = 0x2a00
+gl.PROGRAM = 0x82e2
+gl.PROGRAM_BINARY_ANGLE = 0x93a6
+gl.PROGRAM_BINARY_FORMATS_OES = 0x87ff
+gl.PROGRAM_BINARY_LENGTH_OES = 0x8741
+gl.PROGRAM_OBJECT_EXT = 0x8b40
+gl.PROGRAM_PIPELINE_BINDING_EXT = 0x825a
+gl.PROGRAM_PIPELINE_OBJECT_EXT = 0x8a4f
+gl.PROGRAM_SEPARABLE_EXT = 0x8258
+gl.QCOM_alpha_test = 0x1
+gl.QCOM_binning_control = 0x1
+gl.QCOM_driver_control = 0x1
+gl.QCOM_extended_get = 0x1
+gl.QCOM_extended_get2 = 0x1
+gl.QCOM_perfmon_global_mode = 0x1
+gl.QCOM_tiled_rendering = 0x1
+gl.QCOM_writeonly_rendering = 0x1
+gl.QUERY = 0x82e3
+gl.QUERY_OBJECT_EXT = 0x9153
+gl.QUERY_RESULT_AVAILABLE_EXT = 0x8867
+gl.QUERY_RESULT_EXT = 0x8866
+gl.R16F_EXT = 0x822d
+gl.R32F_EXT = 0x822e
+gl.R8_EXT = 0x8229
+gl.READ_BUFFER_EXT = 0xc02
+gl.READ_BUFFER_NV = 0xc02
+gl.READ_FRAMEBUFFER_ANGLE = 0x8ca8
+gl.READ_FRAMEBUFFER_APPLE = 0x8ca8
+gl.READ_FRAMEBUFFER_BINDING_ANGLE = 0x8caa
+gl.READ_FRAMEBUFFER_BINDING_APPLE = 0x8caa
+gl.READ_FRAMEBUFFER_BINDING_NV = 0x8caa
+gl.READ_FRAMEBUFFER_NV = 0x8ca8
+gl.RED_BITS = 0xd52
+gl.RED_EXT = 0x1903
+gl.RENDERBUFFER = 0x8d41
+gl.RENDERBUFFER_ALPHA_SIZE = 0x8d53
+gl.RENDERBUFFER_BINDING = 0x8ca7
+gl.RENDERBUFFER_BLUE_SIZE = 0x8d52
+gl.RENDERBUFFER_DEPTH_SIZE = 0x8d54
+gl.RENDERBUFFER_GREEN_SIZE = 0x8d51
+gl.RENDERBUFFER_HEIGHT = 0x8d43
+gl.RENDERBUFFER_INTERNAL_FORMAT = 0x8d44
+gl.RENDERBUFFER_RED_SIZE = 0x8d50
+gl.RENDERBUFFER_SAMPLES_ANGLE = 0x8cab
+gl.RENDERBUFFER_SAMPLES_APPLE = 0x8cab
+gl.RENDERBUFFER_SAMPLES_EXT = 0x8cab
+gl.RENDERBUFFER_SAMPLES_IMG = 0x9133
+gl.RENDERBUFFER_SAMPLES_NV = 0x8cab
+gl.RENDERBUFFER_STENCIL_SIZE = 0x8d55
+gl.RENDERBUFFER_WIDTH = 0x8d42
+gl.RENDERER = 0x1f01
+gl.RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8fb3
+gl.REPEAT = 0x2901
+gl.REPLACE = 0x1e01
+gl.REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8d68
+gl.RESET_NOTIFICATION_STRATEGY_EXT = 0x8256
+gl.RG16F_EXT = 0x822f
+gl.RG32F_EXT = 0x8230
+gl.RG8_EXT = 0x822b
+gl.RGB = 0x1907
+gl.RGB10_A2_EXT = 0x8059
+gl.RGB10_EXT = 0x8052
+gl.RGB16F_EXT = 0x881b
+gl.RGB32F_EXT = 0x8815
+gl.RGB565 = 0x8d62
+gl.RGB565_OES = 0x8d62
+gl.RGB5_A1 = 0x8057
+gl.RGB5_A1_OES = 0x8057
+gl.RGB8_OES = 0x8051
+gl.RGBA = 0x1908
+gl.RGBA16F_EXT = 0x881a
+gl.RGBA32F_EXT = 0x8814
+gl.RGBA4 = 0x8056
+gl.RGBA4_OES = 0x8056
+gl.RGBA8_OES = 0x8058
+gl.RGB_422_APPLE = 0x8a1f
+gl.RG_EXT = 0x8227
+gl.SAMPLER = 0x82e6
+gl.SAMPLER_2D = 0x8b5e
+gl.SAMPLER_2D_ARRAY_SHADOW_NV = 0x8dc4
+gl.SAMPLER_2D_SHADOW_EXT = 0x8b62
+gl.SAMPLER_3D_OES = 0x8b5f
+gl.SAMPLER_CUBE = 0x8b60
+gl.SAMPLER_CUBE_SHADOW_NV = 0x8dc5
+gl.SAMPLER_EXTERNAL_OES = 0x8d66
+gl.SAMPLES = 0x80a9
+gl.SAMPLE_ALPHA_TO_COVERAGE = 0x809e
+gl.SAMPLE_BUFFERS = 0x80a8
+gl.SAMPLE_COVERAGE = 0x80a0
+gl.SAMPLE_COVERAGE_INVERT = 0x80ab
+gl.SAMPLE_COVERAGE_VALUE = 0x80aa
+gl.SCISSOR_BOX = 0xc10
+gl.SCISSOR_TEST = 0xc11
+gl.SGX_BINARY_IMG = 0x8c0a
+gl.SGX_PROGRAM_BINARY_IMG = 0x9130
+gl.SHADER = 0x82e1
+gl.SHADER_BINARY_DMP = 0x9250
+gl.SHADER_BINARY_FORMATS = 0x8df8
+gl.SHADER_BINARY_VIV = 0x8fc4
+gl.SHADER_COMPILER = 0x8dfa
+gl.SHADER_OBJECT_EXT = 0x8b48
+gl.SHADER_SOURCE_LENGTH = 0x8b88
+gl.SHADER_TYPE = 0x8b4f
+gl.SHADING_LANGUAGE_VERSION = 0x8b8c
+gl.SHORT = 0x1402
+gl.SIGNALED_APPLE = 0x9119
+gl.SLUMINANCE8_ALPHA8_NV = 0x8c45
+gl.SLUMINANCE8_NV = 0x8c47
+gl.SLUMINANCE_ALPHA_NV = 0x8c44
+gl.SLUMINANCE_NV = 0x8c46
+gl.SRC_ALPHA = 0x302
+gl.SRC_ALPHA_SATURATE = 0x308
+gl.SRC_COLOR = 0x300
+gl.SRGB8_ALPHA8_EXT = 0x8c43
+gl.SRGB8_NV = 0x8c41
+gl.SRGB_ALPHA_EXT = 0x8c42
+gl.SRGB_EXT = 0x8c40
+gl.STACK_OVERFLOW = 0x503
+gl.STACK_UNDERFLOW = 0x504
+gl.STATE_RESTORE = 0x8bdc
+gl.STATIC_DRAW = 0x88e4
+gl.STENCIL_ATTACHMENT = 0x8d20
+gl.STENCIL_BACK_FAIL = 0x8801
+gl.STENCIL_BACK_FUNC = 0x8800
+gl.STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802
+gl.STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
+gl.STENCIL_BACK_REF = 0x8ca3
+gl.STENCIL_BACK_VALUE_MASK = 0x8ca4
+gl.STENCIL_BACK_WRITEMASK = 0x8ca5
+gl.STENCIL_BITS = 0xd57
+gl.STENCIL_BUFFER_BIT = 0x400
+gl.STENCIL_BUFFER_BIT0_QCOM = 0x10000
+gl.STENCIL_BUFFER_BIT1_QCOM = 0x20000
+gl.STENCIL_BUFFER_BIT2_QCOM = 0x40000
+gl.STENCIL_BUFFER_BIT3_QCOM = 0x80000
+gl.STENCIL_BUFFER_BIT4_QCOM = 0x100000
+gl.STENCIL_BUFFER_BIT5_QCOM = 0x200000
+gl.STENCIL_BUFFER_BIT6_QCOM = 0x400000
+gl.STENCIL_BUFFER_BIT7_QCOM = 0x800000
+gl.STENCIL_CLEAR_VALUE = 0xb91
+gl.STENCIL_EXT = 0x1802
+gl.STENCIL_FAIL = 0xb94
+gl.STENCIL_FUNC = 0xb92
+gl.STENCIL_INDEX1_OES = 0x8d46
+gl.STENCIL_INDEX4_OES = 0x8d47
+gl.STENCIL_INDEX8 = 0x8d48
+gl.STENCIL_PASS_DEPTH_FAIL = 0xb95
+gl.STENCIL_PASS_DEPTH_PASS = 0xb96
+gl.STENCIL_REF = 0xb97
+gl.STENCIL_TEST = 0xb90
+gl.STENCIL_VALUE_MASK = 0xb93
+gl.STENCIL_WRITEMASK = 0xb98
+gl.STREAM_DRAW = 0x88e0
+gl.SUBPIXEL_BITS = 0xd50
+gl.SYNC_CONDITION_APPLE = 0x9113
+gl.SYNC_FENCE_APPLE = 0x9116
+gl.SYNC_FLAGS_APPLE = 0x9115
+gl.SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1
+gl.SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117
+gl.SYNC_OBJECT_APPLE = 0x8a53
+gl.SYNC_STATUS_APPLE = 0x9114
+gl.TEXTURE = 0x1702
+gl.TEXTURE0 = 0x84c0
+gl.TEXTURE1 = 0x84c1
+gl.TEXTURE10 = 0x84ca
+gl.TEXTURE11 = 0x84cb
+gl.TEXTURE12 = 0x84cc
+gl.TEXTURE13 = 0x84cd
+gl.TEXTURE14 = 0x84ce
+gl.TEXTURE15 = 0x84cf
+gl.TEXTURE16 = 0x84d0
+gl.TEXTURE17 = 0x84d1
+gl.TEXTURE18 = 0x84d2
+gl.TEXTURE19 = 0x84d3
+gl.TEXTURE2 = 0x84c2
+gl.TEXTURE20 = 0x84d4
+gl.TEXTURE21 = 0x84d5
+gl.TEXTURE22 = 0x84d6
+gl.TEXTURE23 = 0x84d7
+gl.TEXTURE24 = 0x84d8
+gl.TEXTURE25 = 0x84d9
+gl.TEXTURE26 = 0x84da
+gl.TEXTURE27 = 0x84db
+gl.TEXTURE28 = 0x84dc
+gl.TEXTURE29 = 0x84dd
+gl.TEXTURE3 = 0x84c3
+gl.TEXTURE30 = 0x84de
+gl.TEXTURE31 = 0x84df
+gl.TEXTURE4 = 0x84c4
+gl.TEXTURE5 = 0x84c5
+gl.TEXTURE6 = 0x84c6
+gl.TEXTURE7 = 0x84c7
+gl.TEXTURE8 = 0x84c8
+gl.TEXTURE9 = 0x84c9
+gl.TEXTURE_2D = 0xde1
+gl.TEXTURE_3D_OES = 0x806f
+gl.TEXTURE_BINDING_2D = 0x8069
+gl.TEXTURE_BINDING_3D_OES = 0x806a
+gl.TEXTURE_BINDING_CUBE_MAP = 0x8514
+gl.TEXTURE_BINDING_EXTERNAL_OES = 0x8d67
+gl.TEXTURE_BORDER_COLOR_NV = 0x1004
+gl.TEXTURE_COMPARE_FUNC_EXT = 0x884d
+gl.TEXTURE_COMPARE_MODE_EXT = 0x884c
+gl.TEXTURE_CUBE_MAP = 0x8513
+gl.TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
+gl.TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518
+gl.TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851a
+gl.TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515
+gl.TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517
+gl.TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519
+gl.TEXTURE_DEPTH_QCOM = 0x8bd4
+gl.TEXTURE_EXTERNAL_OES = 0x8d65
+gl.TEXTURE_FORMAT_QCOM = 0x8bd6
+gl.TEXTURE_HEIGHT_QCOM = 0x8bd3
+gl.TEXTURE_IMAGE_VALID_QCOM = 0x8bd8
+gl.TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912f
+gl.TEXTURE_INTERNAL_FORMAT_QCOM = 0x8bd5
+gl.TEXTURE_MAG_FILTER = 0x2800
+gl.TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe
+gl.TEXTURE_MAX_LEVEL_APPLE = 0x813d
+gl.TEXTURE_MIN_FILTER = 0x2801
+gl.TEXTURE_NUM_LEVELS_QCOM = 0x8bd9
+gl.TEXTURE_OBJECT_VALID_QCOM = 0x8bdb
+gl.TEXTURE_SAMPLES_IMG = 0x9136
+gl.TEXTURE_TARGET_QCOM = 0x8bda
+gl.TEXTURE_TYPE_QCOM = 0x8bd7
+gl.TEXTURE_USAGE_ANGLE = 0x93a2
+gl.TEXTURE_WIDTH_QCOM = 0x8bd2
+gl.TEXTURE_WRAP_R_OES = 0x8072
+gl.TEXTURE_WRAP_S = 0x2802
+gl.TEXTURE_WRAP_T = 0x2803
+gl.TIMEOUT_EXPIRED_APPLE = 0x911b
+gl.TIMEOUT_IGNORED_APPLE = 0xffffffffffffffff
+gl.TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93a0
+gl.TRIANGLES = 0x4
+gl.TRIANGLE_FAN = 0x6
+gl.TRIANGLE_STRIP = 0x5
+gl.TRUE = 0x1
+gl.UNKNOWN_CONTEXT_RESET_EXT = 0x8255
+gl.UNPACK_ALIGNMENT = 0xcf5
+gl.UNPACK_ROW_LENGTH = 0xcf2
+gl.UNPACK_SKIP_PIXELS = 0xcf4
+gl.UNPACK_SKIP_ROWS = 0xcf3
+gl.UNSIGNALED_APPLE = 0x9118
+gl.UNSIGNED_BYTE = 0x1401
+gl.UNSIGNED_INT = 0x1405
+gl.UNSIGNED_INT64_AMD = 0x8bc2
+gl.UNSIGNED_INT_10_10_10_2_OES = 0x8df6
+gl.UNSIGNED_INT_24_8_OES = 0x84fa
+gl.UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368
+gl.UNSIGNED_NORMALIZED_EXT = 0x8c17
+gl.UNSIGNED_SHORT = 0x1403
+gl.UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366
+gl.UNSIGNED_SHORT_4_4_4_4 = 0x8033
+gl.UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365
+gl.UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365
+gl.UNSIGNED_SHORT_5_5_5_1 = 0x8034
+gl.UNSIGNED_SHORT_5_6_5 = 0x8363
+gl.UNSIGNED_SHORT_8_8_APPLE = 0x85ba
+gl.UNSIGNED_SHORT_8_8_REV_APPLE = 0x85bb
+gl.VALIDATE_STATUS = 0x8b83
+gl.VENDOR = 0x1f00
+gl.VERSION = 0x1f02
+gl.VERTEX_ARRAY_BINDING_OES = 0x85b5
+gl.VERTEX_ARRAY_OBJECT_EXT = 0x9154
+gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889f
+gl.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe
+gl.VERTEX_ATTRIB_ARRAY_DIVISOR_NV = 0x88fe
+gl.VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622
+gl.VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886a
+gl.VERTEX_ATTRIB_ARRAY_POINTER = 0x8645
+gl.VERTEX_ATTRIB_ARRAY_SIZE = 0x8623
+gl.VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624
+gl.VERTEX_ATTRIB_ARRAY_TYPE = 0x8625
+gl.VERTEX_SHADER = 0x8b31
+gl.VERTEX_SHADER_BIT_EXT = 0x1
+gl.VIEWPORT = 0xba2
+gl.VIV_shader_binary = 0x1
+gl.WAIT_FAILED_APPLE = 0x911d
+gl.WRITEONLY_RENDERING_QCOM = 0x8823
+gl.WRITE_ONLY_OES = 0x88b9
+gl.Z400_BINARY_AMD = 0x8740
+gl.ZERO = 0x0
+gl.VERTEX_ATTRIB_POINTER_VEC3 = 0
+gl.VERTEX_ATTRIB_POINTER_COLOR4B = 1
diff --git a/simulator/win32/src/cocos/cocos2d/bitExtend.lua b/simulator/win32/src/cocos/cocos2d/bitExtend.lua
new file mode 100644
index 0000000..fe024aa
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/bitExtend.lua
@@ -0,0 +1,96 @@
+-- bit operation
+
+bit = bit or {}
+bit.data32 = {}
+
+for i=1,32 do
+ bit.data32[i]=2^(32-i)
+end
+
+function bit._b2d(arg)
+ local nr=0
+ for i=1,32 do
+ if arg[i] ==1 then
+ nr=nr+bit.data32[i]
+ end
+ end
+ return nr
+end
+
+function bit._d2b(arg)
+ arg = arg >= 0 and arg or (0xFFFFFFFF + arg + 1)
+ local tr={}
+ for i=1,32 do
+ if arg >= bit.data32[i] then
+ tr[i]=1
+ arg=arg-bit.data32[i]
+ else
+ tr[i]=0
+ end
+ end
+ return tr
+end
+
+function bit._and(a,b)
+ local op1=bit._d2b(a)
+ local op2=bit._d2b(b)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 and op2[i]==1 then
+ r[i]=1
+ else
+ r[i]=0
+ end
+ end
+ return bit._b2d(r)
+
+end
+
+function bit._rshift(a,n)
+ local op1=bit._d2b(a)
+ n = n <= 32 and n or 32
+ n = n >= 0 and n or 0
+
+ for i=32, n+1, -1 do
+ op1[i] = op1[i-n]
+ end
+ for i=1, n do
+ op1[i] = 0
+ end
+
+ return bit._b2d(op1)
+end
+
+function bit._not(a)
+ local op1=bit._d2b(a)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 then
+ r[i]=0
+ else
+ r[i]=1
+ end
+ end
+ return bit._b2d(r)
+end
+
+function bit._or(a,b)
+ local op1=bit._d2b(a)
+ local op2=bit._d2b(b)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 or op2[i]==1 then
+ r[i]=1
+ else
+ r[i]=0
+ end
+ end
+ return bit._b2d(r)
+end
+
+bit.band = bit.band or bit._and
+bit.rshift = bit.rshift or bit._rshift
+bit.bnot = bit.bnot or bit._not
diff --git a/simulator/win32/src/cocos/cocos2d/deprecated.lua b/simulator/win32/src/cocos/cocos2d/deprecated.lua
new file mode 100644
index 0000000..9c82fa8
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/deprecated.lua
@@ -0,0 +1,15 @@
+
+function schedule(node, callback, delay)
+ local delay = cc.DelayTime:create(delay)
+ local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
+ local action = cc.RepeatForever:create(sequence)
+ node:runAction(action)
+ return action
+end
+
+function performWithDelay(node, callback, delay)
+ local delay = cc.DelayTime:create(delay)
+ local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
+ node:runAction(sequence)
+ return sequence
+end
diff --git a/simulator/win32/src/cocos/cocos2d/functions.lua b/simulator/win32/src/cocos/cocos2d/functions.lua
new file mode 100644
index 0000000..24a54f2
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/functions.lua
@@ -0,0 +1,633 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+function printLog(tag, fmt, ...)
+ local t = {
+ "[",
+ string.upper(tostring(tag)),
+ "] ",
+ string.format(tostring(fmt), ...)
+ }
+ print(table.concat(t))
+end
+
+function printError(fmt, ...)
+ printLog("ERR", fmt, ...)
+ print(debug.traceback("", 2))
+end
+
+function printInfo(fmt, ...)
+ if type(DEBUG) ~= "number" or DEBUG < 2 then return end
+ printLog("INFO", fmt, ...)
+end
+
+local function dump_value_(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+end
+
+function dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+
+ local lookupTable = {}
+ local result = {}
+
+ local traceback = string.split(debug.traceback("", 2), "\n")
+ print("dump from: " .. string.trim(traceback[3]))
+
+ local function dump_(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ local spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(dump_value_(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[#result +1 ] = string.format("%s%s%s = %s", indent, dump_value_(desciption), spc, dump_value_(value))
+ elseif lookupTable[tostring(value)] then
+ result[#result +1 ] = string.format("%s%s%s = *REF*", indent, dump_value_(desciption), spc)
+ else
+ lookupTable[tostring(value)] = true
+ if nest > nesting then
+ result[#result +1 ] = string.format("%s%s = *MAX NESTING*", indent, dump_value_(desciption))
+ else
+ result[#result +1 ] = string.format("%s%s = {", indent, dump_value_(desciption))
+ local indent2 = indent.." "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[#keys + 1] = k
+ local vk = dump_value_(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ dump_(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[#result +1] = string.format("%s}", indent)
+ end
+ end
+ end
+ dump_(value, desciption, "- ", 1)
+
+ for i, line in ipairs(result) do
+ print(line)
+ end
+end
+
+function printf(fmt, ...)
+ print(string.format(tostring(fmt), ...))
+end
+
+function checknumber(value, base)
+ return tonumber(value, base) or 0
+end
+
+function checkint(value)
+ return math.round(checknumber(value))
+end
+
+function checkbool(value)
+ return (value ~= nil and value ~= false)
+end
+
+function checktable(value)
+ if type(value) ~= "table" then value = {} end
+ return value
+end
+
+function isset(hashtable, key)
+ local t = type(hashtable)
+ return (t == "table" or t == "userdata") and hashtable[key] ~= nil
+end
+
+local setmetatableindex_
+setmetatableindex_ = function(t, index)
+ if type(t) == "userdata" then
+ local peer = tolua.getpeer(t)
+ if not peer then
+ peer = {}
+ tolua.setpeer(t, peer)
+ end
+ setmetatableindex_(peer, index)
+ else
+ local mt = getmetatable(t)
+ if not mt then mt = {} end
+ if not mt.__index then
+ mt.__index = index
+ setmetatable(t, mt)
+ elseif mt.__index ~= index then
+ setmetatableindex_(mt, index)
+ end
+ end
+end
+setmetatableindex = setmetatableindex_
+
+function clone(object)
+ local lookup_table = {}
+ local function _copy(object)
+ if type(object) ~= "table" then
+ return object
+ elseif lookup_table[object] then
+ return lookup_table[object]
+ end
+ local newObject = {}
+ lookup_table[object] = newObject
+ for key, value in pairs(object) do
+ newObject[_copy(key)] = _copy(value)
+ end
+ return setmetatable(newObject, getmetatable(object))
+ end
+ return _copy(object)
+end
+
+function class(classname, ...)
+ local cls = {__cname = classname}
+
+ local supers = {...}
+ for _, super in ipairs(supers) do
+ local superType = type(super)
+ assert(superType == "nil" or superType == "table" or superType == "function",
+ string.format("class() - create class \"%s\" with invalid super class type \"%s\"",
+ classname, superType))
+
+ if superType == "function" then
+ assert(cls.__create == nil,
+ string.format("class() - create class \"%s\" with more than one creating function",
+ classname));
+ -- if super is function, set it to __create
+ cls.__create = super
+ elseif superType == "table" then
+ if super[".isclass"] then
+ -- super is native class
+ assert(cls.__create == nil,
+ string.format("class() - create class \"%s\" with more than one creating function or native class",
+ classname));
+ cls.__create = function() return super:create() end
+ else
+ -- super is pure lua class
+ cls.__supers = cls.__supers or {}
+ cls.__supers[#cls.__supers + 1] = super
+ if not cls.super then
+ -- set first super pure lua class as class.super
+ cls.super = super
+ end
+ end
+ else
+ error(string.format("class() - create class \"%s\" with invalid super type",
+ classname), 0)
+ end
+ end
+
+ cls.__index = cls
+ if not cls.__supers or #cls.__supers == 1 then
+ setmetatable(cls, {__index = cls.super})
+ else
+ setmetatable(cls, {__index = function(_, key)
+ local supers = cls.__supers
+ for i = 1, #supers do
+ local super = supers[i]
+ if super[key] then return super[key] end
+ end
+ end})
+ end
+
+ if not cls.ctor then
+ -- add default constructor
+ cls.ctor = function() end
+ end
+ cls.new = function(...)
+ local instance
+ if cls.__create then
+ instance = cls.__create(...)
+ else
+ instance = {}
+ end
+ setmetatableindex(instance, cls)
+ instance.class = cls
+ instance:ctor(...)
+ return instance
+ end
+ cls.create = function(_, ...)
+ return cls.new(...)
+ end
+
+ return cls
+end
+
+local iskindof_
+iskindof_ = function(cls, name)
+ local __index = rawget(cls, "__index")
+ if type(__index) == "table" and rawget(__index, "__cname") == name then return true end
+
+ if rawget(cls, "__cname") == name then return true end
+ local __supers = rawget(cls, "__supers")
+ if not __supers then return false end
+ for _, super in ipairs(__supers) do
+ if iskindof_(super, name) then return true end
+ end
+ return false
+end
+
+function iskindof(obj, classname)
+ local t = type(obj)
+ if t ~= "table" and t ~= "userdata" then return false end
+
+ local mt
+ if t == "userdata" then
+ if tolua.iskindof(obj, classname) then return true end
+ mt = tolua.getpeer(obj)
+ else
+ mt = getmetatable(obj)
+ end
+ if mt then
+ return iskindof_(mt, classname)
+ end
+ return false
+end
+
+function import(moduleName, currentModuleName)
+ local currentModuleNameParts
+ local moduleFullName = moduleName
+ local offset = 1
+
+ while true do
+ if string.byte(moduleName, offset) ~= 46 then -- .
+ moduleFullName = string.sub(moduleName, offset)
+ if currentModuleNameParts and #currentModuleNameParts > 0 then
+ moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName
+ end
+ break
+ end
+ offset = offset + 1
+
+ if not currentModuleNameParts then
+ if not currentModuleName then
+ local n,v = debug.getlocal(3, 1)
+ currentModuleName = v
+ end
+
+ currentModuleNameParts = string.split(currentModuleName, ".")
+ end
+ table.remove(currentModuleNameParts, #currentModuleNameParts)
+ end
+
+ return require(moduleFullName)
+end
+
+function handler(obj, method)
+ return function(...)
+ return method(obj, ...)
+ end
+end
+
+function math.newrandomseed()
+ local ok, socket = pcall(function()
+ return require("socket")
+ end)
+
+ if ok then
+ math.randomseed(socket.gettime() * 1000)
+ else
+ math.randomseed(os.time())
+ end
+ math.random()
+ math.random()
+ math.random()
+ math.random()
+end
+
+function math.round(value)
+ value = checknumber(value)
+ return math.floor(value + 0.5)
+end
+
+local pi_div_180 = math.pi / 180
+function math.angle2radian(angle)
+ return angle * pi_div_180
+end
+
+local pi_mul_180 = math.pi * 180
+function math.radian2angle(radian)
+ return radian / pi_mul_180
+end
+
+function io.exists(path)
+ local file = io.open(path, "r")
+ if file then
+ io.close(file)
+ return true
+ end
+ return false
+end
+
+function io.readfile(path)
+ local file = io.open(path, "r")
+ if file then
+ local content = file:read("*a")
+ io.close(file)
+ return content
+ end
+ return nil
+end
+
+function io.writefile(path, content, mode)
+ mode = mode or "w+b"
+ local file = io.open(path, mode)
+ if file then
+ if file:write(content) == nil then return false end
+ io.close(file)
+ return true
+ else
+ return false
+ end
+end
+
+function io.pathinfo(path)
+ local pos = string.len(path)
+ local extpos = pos + 1
+ while pos > 0 do
+ local b = string.byte(path, pos)
+ if b == 46 then -- 46 = char "."
+ extpos = pos
+ elseif b == 47 then -- 47 = char "/"
+ break
+ end
+ pos = pos - 1
+ end
+
+ local dirname = string.sub(path, 1, pos)
+ local filename = string.sub(path, pos + 1)
+ extpos = extpos - pos
+ local basename = string.sub(filename, 1, extpos - 1)
+ local extname = string.sub(filename, extpos)
+ return {
+ dirname = dirname,
+ filename = filename,
+ basename = basename,
+ extname = extname
+ }
+end
+
+function io.filesize(path)
+ local size = false
+ local file = io.open(path, "r")
+ if file then
+ local current = file:seek()
+ size = file:seek("end")
+ file:seek("set", current)
+ io.close(file)
+ end
+ return size
+end
+
+function table.nums(t)
+ local count = 0
+ for k, v in pairs(t) do
+ count = count + 1
+ end
+ return count
+end
+
+function table.keys(hashtable)
+ local keys = {}
+ for k, v in pairs(hashtable) do
+ keys[#keys + 1] = k
+ end
+ return keys
+end
+
+function table.values(hashtable)
+ local values = {}
+ for k, v in pairs(hashtable) do
+ values[#values + 1] = v
+ end
+ return values
+end
+
+function table.merge(dest, src)
+ for k, v in pairs(src) do
+ dest[k] = v
+ end
+end
+
+function table.insertto(dest, src, begin)
+ begin = checkint(begin)
+ if begin <= 0 then
+ begin = #dest + 1
+ end
+
+ local len = #src
+ for i = 0, len - 1 do
+ dest[i + begin] = src[i + 1]
+ end
+end
+
+function table.indexof(array, value, begin)
+ for i = begin or 1, #array do
+ if array[i] == value then return i end
+ end
+ return false
+end
+
+function table.keyof(hashtable, value)
+ for k, v in pairs(hashtable) do
+ if v == value then return k end
+ end
+ return nil
+end
+
+function table.removebyvalue(array, value, removeall)
+ local c, i, max = 0, 1, #array
+ while i <= max do
+ if array[i] == value then
+ table.remove(array, i)
+ c = c + 1
+ i = i - 1
+ max = max - 1
+ if not removeall then break end
+ end
+ i = i + 1
+ end
+ return c
+end
+
+function table.map(t, fn)
+ for k, v in pairs(t) do
+ t[k] = fn(v, k)
+ end
+end
+
+function table.walk(t, fn)
+ for k,v in pairs(t) do
+ fn(v, k)
+ end
+end
+
+function table.filter(t, fn)
+ for k, v in pairs(t) do
+ if not fn(v, k) then t[k] = nil end
+ end
+end
+
+function table.unique(t, bArray)
+ local check = {}
+ local n = {}
+ local idx = 1
+ for k, v in pairs(t) do
+ if not check[v] then
+ if bArray then
+ n[idx] = v
+ idx = idx + 1
+ else
+ n[k] = v
+ end
+ check[v] = true
+ end
+ end
+ return n
+end
+
+string._htmlspecialchars_set = {}
+string._htmlspecialchars_set["&"] = "&"
+string._htmlspecialchars_set["\""] = """
+string._htmlspecialchars_set["'"] = "'"
+string._htmlspecialchars_set["<"] = "<"
+string._htmlspecialchars_set[">"] = ">"
+
+function string.htmlspecialchars(input)
+ for k, v in pairs(string._htmlspecialchars_set) do
+ input = string.gsub(input, k, v)
+ end
+ return input
+end
+
+function string.restorehtmlspecialchars(input)
+ for k, v in pairs(string._htmlspecialchars_set) do
+ input = string.gsub(input, v, k)
+ end
+ return input
+end
+
+function string.nl2br(input)
+ return string.gsub(input, "\n", "
")
+end
+
+function string.text2html(input)
+ input = string.gsub(input, "\t", " ")
+ input = string.htmlspecialchars(input)
+ input = string.gsub(input, " ", " ")
+ input = string.nl2br(input)
+ return input
+end
+
+function string.split(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if (delimiter=='') then return false end
+ local pos,arr = 0, {}
+ -- for each divider found
+ for st,sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+
+function string.ltrim(input)
+ return string.gsub(input, "^[ \t\n\r]+", "")
+end
+
+function string.rtrim(input)
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+
+function string.trim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+
+function string.ucfirst(input)
+ return string.upper(string.sub(input, 1, 1)) .. string.sub(input, 2)
+end
+
+local function urlencodechar(char)
+ return "%" .. string.format("%02X", string.byte(char))
+end
+function string.urlencode(input)
+ -- convert line endings
+ input = string.gsub(tostring(input), "\n", "\r\n")
+ -- escape all characters but alphanumeric, '.' and '-'
+ input = string.gsub(input, "([^%w%.%- ])", urlencodechar)
+ -- convert spaces to "+" symbols
+ return string.gsub(input, " ", "+")
+end
+
+function string.urldecode(input)
+ input = string.gsub (input, "+", " ")
+ input = string.gsub (input, "%%(%x%x)", function(h) return string.char(checknumber(h,16)) end)
+ input = string.gsub (input, "\r\n", "\n")
+ return input
+end
+
+function string.utf8len(input)
+ local len = string.len(input)
+ local left = len
+ local cnt = 0
+ local arr = {0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc}
+ while left ~= 0 do
+ local tmp = string.byte(input, -left)
+ local i = #arr
+ while arr[i] do
+ if tmp >= arr[i] then
+ left = left - i
+ break
+ end
+ i = i - 1
+ end
+ cnt = cnt + 1
+ end
+ return cnt
+end
+
+function string.formatnumberthousands(num)
+ local formatted = tostring(checknumber(num))
+ local k
+ while true do
+ formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
+ if k == 0 then break end
+ end
+ return formatted
+end
diff --git a/simulator/win32/src/cocos/cocos2d/json.lua b/simulator/win32/src/cocos/cocos2d/json.lua
new file mode 100644
index 0000000..0192c34
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/json.lua
@@ -0,0 +1,376 @@
+-----------------------------------------------------------------------------
+-- JSON4Lua: JSON encoding / decoding support for the Lua language.
+-- json Module.
+-- Author: Craig Mason-Jones
+-- Homepage: http://json.luaforge.net/
+-- Version: 0.9.40
+-- This module is released under the MIT License (MIT).
+-- Please see LICENCE.txt for details.
+--
+-- USAGE:
+-- This module exposes two functions:
+-- encode(o)
+-- Returns the table / string / boolean / number / nil / json.null value as a JSON-encoded string.
+-- decode(json_string)
+-- Returns a Lua object populated with the data encoded in the JSON string json_string.
+--
+-- REQUIREMENTS:
+-- compat-5.1 if using Lua 5.0
+--
+-- CHANGELOG
+-- 0.9.20 Introduction of local Lua functions for private functions (removed _ function prefix).
+-- Fixed Lua 5.1 compatibility issues.
+-- Introduced json.null to have null values in associative arrays.
+-- encode() performance improvement (more than 50%) through table.concat rather than ..
+-- Introduced decode ability to ignore /**/ comments in the JSON string.
+-- 0.9.10 Fix to array encoding / decoding to correctly manage nil/null values in arrays.
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Imports and dependencies
+-----------------------------------------------------------------------------
+local math = require('math')
+local string = require("string")
+local table = require("table")
+
+local base = _G
+
+-----------------------------------------------------------------------------
+-- Module declaration
+-----------------------------------------------------------------------------
+module("json")
+
+-- Public functions
+
+-- Private functions
+local decode_scanArray
+local decode_scanComment
+local decode_scanConstant
+local decode_scanNumber
+local decode_scanObject
+local decode_scanString
+local decode_scanWhitespace
+local encodeString
+local isArray
+local isEncodable
+
+-----------------------------------------------------------------------------
+-- PUBLIC FUNCTIONS
+-----------------------------------------------------------------------------
+--- Encodes an arbitrary Lua object / variable.
+-- @param v The Lua object / variable to be JSON encoded.
+-- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+function encode (v)
+ -- Handle nil values
+ if v==nil then
+ return "null"
+ end
+
+ local vtype = base.type(v)
+
+ -- Handle strings
+ if vtype=='string' then
+ return '"' .. encodeString(v) .. '"' -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype=='number' or vtype=='boolean' then
+ return base.tostring(v)
+ end
+
+ -- Handle tables
+ if vtype=='table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1,maxCount do
+ table.insert(rval, encode(v[i]))
+ end
+ else -- An object, not an array
+ for i,j in base.pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, '"' .. encodeString(i) .. '":' .. encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval,',') ..']'
+ else
+ return '{' .. table.concat(rval,',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype=='function' and v==null then
+ return 'null'
+ end
+
+ base.assert(false,'encode attempt to encode unsupported type ' .. vtype .. ':' .. base.tostring(v))
+end
+
+
+--- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+-- @param s The string to scan.
+-- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+-- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+-- and the position of the first character after
+-- the scanned JSON object.
+function decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s,startPos,startPos)
+ -- Object
+ if curChar=='{' then
+ return decode_scanObject(s,startPos)
+ end
+ -- Array
+ if curChar=='[' then
+ return decode_scanArray(s,startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s,startPos)
+ end
+ -- String
+ if curChar==[["]] or curChar==[[']] then
+ return decode_scanString(s,startPos)
+ end
+ if string.sub(s,startPos,startPos+1)=='/*' then
+ return decode(s, decode_scanComment(s,startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s,startPos)
+end
+
+--- The null function allows one to specify a null value in an associative array (which is otherwise
+-- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+function null()
+ return null -- so json.null() will also return null ;-)
+end
+-----------------------------------------------------------------------------
+-- Internal, PRIVATE functions.
+-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+-- functions with an underscore.
+-----------------------------------------------------------------------------
+
+--- Scans an array from JSON into a Lua object
+-- startPos begins at the start of the array.
+-- Returns the array and the next starting position
+-- @param s The string being scanned.
+-- @param startPos The starting position for the scan.
+-- @return table, int The scanned array as a table, and the position of the next character to scan.
+function decode_scanArray(s,startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ base.assert(string.sub(s,startPos,startPos)=='[','decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n'..s )
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen,'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s,startPos,startPos)
+ if (curChar==']') then
+ return array, startPos+1
+ end
+ if (curChar==',') then
+ startPos = decode_scanWhitespace(s,startPos+1)
+ end
+ base.assert(startPos<=stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = decode(s,startPos)
+ table.insert(array,object)
+ until false
+end
+
+--- Scans a comment and discards the comment.
+-- Returns the position of the next character following the comment.
+-- @param string s The JSON string to scan.
+-- @param int startPos The starting position of the comment
+function decode_scanComment(s, startPos)
+ base.assert( string.sub(s,startPos,startPos+1)=='/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s,'*/',startPos+2)
+ base.assert(endPos~=nil, "Unterminated comment in string at " .. startPos)
+ return endPos+2
+end
+
+--- Scans for given constants: true, false or null
+-- Returns the appropriate Lua type, and the position of the next character to read.
+-- @param s The string being scanned.
+-- @param startPos The position in the string at which to start scanning.
+-- @return object, int The object (true, false or nil) and the position at which the next character should be
+-- scanned.
+function decode_scanConstant(s, startPos)
+ local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
+ local constNames = {"true","false","null"}
+
+ for i,k in base.pairs(constNames) do
+ --print ("[" .. string.sub(s,startPos, startPos + string.len(k) -1) .."]", k)
+ if string.sub(s,startPos, startPos + string.len(k) -1 )==k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ base.assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+end
+
+--- Scans a number from the JSON encoded string.
+-- (in fact, also is able to scan numeric +- eqns, which is not
+-- in the JSON spec.)
+-- Returns the number, and the position of the next character
+-- after the number.
+-- @param s The string being scanned.
+-- @param startPos The position at which to start scanning.
+-- @return number, int The extracted number and the position of the next character to scan.
+function decode_scanNumber(s,startPos)
+ local endPos = startPos+1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while (string.find(acceptableChars, string.sub(s,endPos,endPos), 1, true)
+ and endPos<=stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s,startPos, endPos-1)
+ local stringEval = base.loadstring(stringValue)
+ base.assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+end
+
+--- Scans a JSON object into a Lua object.
+-- startPos begins at the start of the object.
+-- Returns the object and the next starting position.
+-- @param s The string being scanned.
+-- @param startPos The starting position of the scan.
+-- @return table, int The scanned object as a table and the position of the next character to scan.
+function decode_scanObject(s,startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ base.assert(string.sub(s,startPos,startPos)=='{','decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s,startPos,startPos)
+ if (curChar=='}') then
+ return object,startPos+1
+ end
+ if (curChar==',') then
+ startPos = decode_scanWhitespace(s,startPos+1)
+ end
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = decode(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ base.assert(string.sub(s,startPos,startPos)==':','JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s,startPos+1)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = decode(s,startPos)
+ object[key]=value
+ until false -- infinite loop while key-value pairs are found
+end
+
+--- Scans a JSON string from the opening inverted comma or single quote to the
+-- end of the string.
+-- Returns the string extracted as a Lua string,
+-- and the position of the next non-string character
+-- (after the closing inverted comma or single quote).
+-- @param s The string being scanned.
+-- @param startPos The starting position of the scan.
+-- @return string, int The extracted string as a Lua string, and the next character to parse.
+function decode_scanString(s,startPos)
+ base.assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s,startPos,startPos)
+ base.assert(startChar==[[']] or startChar==[["]],'decode_scanString called for a non-string')
+ local escaped = false
+ local endPos = startPos + 1
+ local bEnded = false
+ local stringLen = string.len(s)
+ repeat
+ local curChar = string.sub(s,endPos,endPos)
+ if not escaped then
+ if curChar==[[\]] then
+ escaped = true
+ else
+ bEnded = curChar==startChar
+ end
+ else
+ -- If we're escaped, we accept the current character come what may
+ escaped = false
+ end
+ endPos = endPos + 1
+ base.assert(endPos <= stringLen+1, "String decoding failed: unterminated string at position " .. endPos)
+ until bEnded
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos-1)
+ local stringEval = base.loadstring(stringValue)
+ base.assert(stringEval, 'Failed to load string [ ' .. stringValue .. '] in JSON4Lua.decode_scanString at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+end
+
+--- Scans a JSON string skipping all whitespace from the current start position.
+-- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+-- @param s The string being scanned
+-- @param startPos The starting position where we should begin removing whitespace.
+-- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+-- was reached.
+function decode_scanWhitespace(s,startPos)
+ local whitespace=" \n\r\t"
+ local stringLen = string.len(s)
+ while ( string.find(whitespace, string.sub(s,startPos,startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+end
+
+--- Encodes a string to be JSON-compatible.
+-- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+-- @param s The string to return as a JSON encoded (i.e. backquoted string)
+-- @return The string appropriately escaped.
+function encodeString(s)
+ s = string.gsub(s,'\\','\\\\')
+ s = string.gsub(s,'"','\\"')
+ s = string.gsub(s,"'","\\'")
+ s = string.gsub(s,'\n','\\n')
+ s = string.gsub(s,'\t','\\t')
+ return s
+end
+
+-- Determines whether the given Lua type is an array or a table / dictionary.
+-- We consider any table an array if it has indexes 1..n for its n items, and no
+-- other data in the table.
+-- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+-- @param t The table to evaluate as an array
+-- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+-- the second returned value is the maximum
+-- number of indexed elements in the array.
+function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ local maxIndex = 0
+ for k,v in base.pairs(t) do
+ if (base.type(k)=='number' and math.floor(k)==k and 1<=k) then -- k,v is an indexed pair
+ if (not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex,k)
+ else
+ if (k=='n') then
+ if v ~= table.getn(t) then return false end -- False if n does not hold the number of elements
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+end
+
+--- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+-- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+-- In this implementation, all other types are ignored.
+-- @param o The object to examine.
+-- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+function isEncodable(o)
+ local t = base.type(o)
+ return (t=='string' or t=='boolean' or t=='number' or t=='nil' or t=='table') or (t=='function' and o==null)
+end
+
diff --git a/simulator/win32/src/cocos/cocos2d/luaj.lua b/simulator/win32/src/cocos/cocos2d/luaj.lua
new file mode 100644
index 0000000..8ec45a3
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/luaj.lua
@@ -0,0 +1,34 @@
+
+local luaj = {}
+
+local callJavaStaticMethod = LuaJavaBridge.callStaticMethod
+
+local function checkArguments(args, sig)
+ if type(args) ~= "table" then args = {} end
+ if sig then return args, sig end
+
+ sig = {"("}
+ for i, v in ipairs(args) do
+ local t = type(v)
+ if t == "number" then
+ sig[#sig + 1] = "F"
+ elseif t == "boolean" then
+ sig[#sig + 1] = "Z"
+ elseif t == "function" then
+ sig[#sig + 1] = "I"
+ else
+ sig[#sig + 1] = "Ljava/lang/String;"
+ end
+ end
+ sig[#sig + 1] = ")V"
+
+ return args, table.concat(sig)
+end
+
+function luaj.callStaticMethod(className, methodName, args, sig)
+ local args, sig = checkArguments(args, sig)
+ --echoInfo("luaj.callStaticMethod(\"%s\",\n\t\"%s\",\n\targs,\n\t\"%s\"", className, methodName, sig)
+ return callJavaStaticMethod(className, methodName, args, sig)
+end
+
+return luaj
diff --git a/simulator/win32/src/cocos/cocos2d/luaoc.lua b/simulator/win32/src/cocos/cocos2d/luaoc.lua
new file mode 100644
index 0000000..ff6d157
--- /dev/null
+++ b/simulator/win32/src/cocos/cocos2d/luaoc.lua
@@ -0,0 +1,28 @@
+
+local luaoc = {}
+
+local callStaticMethod = LuaObjcBridge.callStaticMethod
+
+function luaoc.callStaticMethod(className, methodName, args)
+ local ok, ret = callStaticMethod(className, methodName, args)
+ if not ok then
+ local msg = string.format("luaoc.callStaticMethod(\"%s\", \"%s\", \"%s\") - error: [%s] ",
+ className, methodName, tostring(args), tostring(ret))
+ if ret == -1 then
+ print(msg .. "INVALID PARAMETERS")
+ elseif ret == -2 then
+ print(msg .. "CLASS NOT FOUND")
+ elseif ret == -3 then
+ print(msg .. "METHOD NOT FOUND")
+ elseif ret == -4 then
+ print(msg .. "EXCEPTION OCCURRED")
+ elseif ret == -5 then
+ print(msg .. "INVALID METHOD SIGNATURE")
+ else
+ print(msg .. "UNKNOWN")
+ end
+ end
+ return ok, ret
+end
+
+return luaoc
diff --git a/simulator/win32/src/cocos/cocosbuilder/CCBReaderLoad.lua b/simulator/win32/src/cocos/cocosbuilder/CCBReaderLoad.lua
new file mode 100644
index 0000000..30ee404
--- /dev/null
+++ b/simulator/win32/src/cocos/cocosbuilder/CCBReaderLoad.lua
@@ -0,0 +1,125 @@
+if nil == cc.CCBReader then
+ return
+end
+
+ccb = ccb or {}
+
+function CCBReaderLoad(strFilePath,proxy,owner)
+ if nil == proxy then
+ return nil
+ end
+
+ local ccbReader = proxy:createCCBReader()
+ local node = ccbReader:load(strFilePath)
+ local rootName = ""
+ --owner set in readCCBFromFile is proxy
+ if nil ~= owner then
+ --Callbacks
+ local ownerCallbackNames = ccbReader:getOwnerCallbackNames()
+ local ownerCallbackNodes = ccbReader:getOwnerCallbackNodes()
+ local ownerCallbackControlEvents = ccbReader:getOwnerCallbackControlEvents()
+ local i = 1
+ for i = 1,table.getn(ownerCallbackNames) do
+ local callbackName = ownerCallbackNames[i]
+ local callbackNode = tolua.cast(ownerCallbackNodes[i],"cc.Node")
+
+ if "function" == type(owner[callbackName]) then
+ proxy:setCallback(callbackNode, owner[callbackName], ownerCallbackControlEvents[i])
+ else
+ print("Warning: Cannot find owner's lua function:" .. ":" .. callbackName .. " for ownerVar selector")
+ end
+
+ end
+
+ --Variables
+ local ownerOutletNames = ccbReader:getOwnerOutletNames()
+ local ownerOutletNodes = ccbReader:getOwnerOutletNodes()
+
+ for i = 1, table.getn(ownerOutletNames) do
+ local outletName = ownerOutletNames[i]
+ local outletNode = tolua.cast(ownerOutletNodes[i],"cc.Node")
+ owner[outletName] = outletNode
+ end
+ end
+
+ local nodesWithAnimationManagers = ccbReader:getNodesWithAnimationManagers()
+ local animationManagersForNodes = ccbReader:getAnimationManagersForNodes()
+
+ for i = 1 , table.getn(nodesWithAnimationManagers) do
+ local innerNode = tolua.cast(nodesWithAnimationManagers[i], "cc.Node")
+ local animationManager = tolua.cast(animationManagersForNodes[i], "cc.CCBAnimationManager")
+ local documentControllerName = animationManager:getDocumentControllerName()
+ if "" == documentControllerName then
+
+ end
+ if nil ~= ccb[documentControllerName] then
+ ccb[documentControllerName]["mAnimationManager"] = animationManager
+ end
+
+ --Callbacks
+ local documentCallbackNames = animationManager:getDocumentCallbackNames()
+ local documentCallbackNodes = animationManager:getDocumentCallbackNodes()
+ local documentCallbackControlEvents = animationManager:getDocumentCallbackControlEvents()
+
+ for i = 1,table.getn(documentCallbackNames) do
+ local callbackName = documentCallbackNames[i]
+ local callbackNode = tolua.cast(documentCallbackNodes[i],"cc.Node")
+ if "" ~= documentControllerName and nil ~= ccb[documentControllerName] then
+ if "function" == type(ccb[documentControllerName][callbackName]) then
+ proxy:setCallback(callbackNode, ccb[documentControllerName][callbackName], documentCallbackControlEvents[i])
+ else
+ print("Warning: Cannot found lua function [" .. documentControllerName .. ":" .. callbackName .. "] for docRoot selector")
+ end
+ end
+ end
+
+ --Variables
+ local documentOutletNames = animationManager:getDocumentOutletNames()
+ local documentOutletNodes = animationManager:getDocumentOutletNodes()
+
+ for i = 1, table.getn(documentOutletNames) do
+ local outletName = documentOutletNames[i]
+ local outletNode = tolua.cast(documentOutletNodes[i],"cc.Node")
+
+ if nil ~= ccb[documentControllerName] then
+ ccb[documentControllerName][outletName] = tolua.cast(outletNode, proxy:getNodeTypeName(outletNode))
+ end
+ end
+ --[[
+ if (typeof(controller.onDidLoadFromCCB) == "function")
+ controller.onDidLoadFromCCB();
+ ]]--
+ --Setup timeline callbacks
+ local keyframeCallbacks = animationManager:getKeyframeCallbacks()
+
+ for i = 1 , table.getn(keyframeCallbacks) do
+ local callbackCombine = keyframeCallbacks[i]
+ local beignIndex,endIndex = string.find(callbackCombine,":")
+ local callbackType = tonumber(string.sub(callbackCombine,1,beignIndex - 1))
+ local callbackName = string.sub(callbackCombine,endIndex + 1, -1)
+ --Document callback
+
+ if 1 == callbackType and nil ~= ccb[documentControllerName] then
+ local callfunc = cc.CallFunc:create(ccb[documentControllerName][callbackName])
+ animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine);
+ elseif 2 == callbackType and nil ~= owner then --Owner callback
+ local callfunc = cc.CallFunc:create(owner[callbackName])--need check
+ animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine)
+ end
+ end
+ --start animation
+ local autoPlaySeqId = animationManager:getAutoPlaySequenceId()
+ if -1 ~= autoPlaySeqId then
+ animationManager:runAnimationsForSequenceIdTweenDuration(autoPlaySeqId, 0)
+ end
+ end
+
+ return node
+end
+
+
+local function CCBuilderReaderLoad(strFilePath,proxy,owner)
+ print("\n********** \n".."CCBuilderReaderLoad(strFilePath,proxy,owner)".." was deprecated please use ".. "CCBReaderLoad(strFilePath,proxy,owner)" .. " instead.\n**********")
+ return CCBReaderLoad(strFilePath,proxy,owner)
+end
+rawset(_G,"CCBuilderReaderLoad",CCBuilderReaderLoad)
\ No newline at end of file
diff --git a/simulator/win32/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua b/simulator/win32/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua
new file mode 100644
index 0000000..aaa6654
--- /dev/null
+++ b/simulator/win32/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua
@@ -0,0 +1,35 @@
+if nil == cc.CCBProxy then
+ return
+end
+-- This is the DeprecatedCocosBuilderClass
+
+DeprecatedCocosBuilderClass = {} or DeprecatedCocosBuilderClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCBReader class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBReader()
+ deprecatedTip("CCBReader","cc.BReader")
+ return cc.BReader
+end
+_G["CCBReader"] = DeprecatedCocosBuilderClass.CCBReader()
+--CCBReader class will be Deprecated,end
+
+--CCBAnimationManager class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBAnimationManager()
+ deprecatedTip("CCBAnimationManager","cc.BAnimationManager")
+ return cc.BAnimationManager
+end
+_G["CCBAnimationManager"] = DeprecatedCocosBuilderClass.CCBAnimationManager()
+--CCBAnimationManager class will be Deprecated,end
+
+--CCBProxy class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBProxy()
+ deprecatedTip("CCBProxy","cc.CCBProxy")
+ return cc.CCBProxy
+end
+_G["CCBProxy"] = DeprecatedCocosBuilderClass.CCBProxy()
+--CCBProxy class will be Deprecated,end
diff --git a/simulator/win32/src/cocos/cocosdenshion/AudioEngine.lua b/simulator/win32/src/cocos/cocosdenshion/AudioEngine.lua
new file mode 100644
index 0000000..deea904
--- /dev/null
+++ b/simulator/win32/src/cocos/cocosdenshion/AudioEngine.lua
@@ -0,0 +1,111 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+--Encapsulate SimpleAudioEngine to AudioEngine,Play music and sound effects.
+local M = {}
+
+function M.stopAllEffects()
+ cc.SimpleAudioEngine:getInstance():stopAllEffects()
+end
+
+function M.getMusicVolume()
+ return cc.SimpleAudioEngine:getInstance():getMusicVolume()
+end
+
+function M.isMusicPlaying()
+ return cc.SimpleAudioEngine:getInstance():isMusicPlaying()
+end
+
+function M.getEffectsVolume()
+ return cc.SimpleAudioEngine:getInstance():getEffectsVolume()
+end
+
+function M.setMusicVolume(volume)
+ cc.SimpleAudioEngine:getInstance():setMusicVolume(volume)
+end
+
+function M.stopEffect(handle)
+ cc.SimpleAudioEngine:getInstance():stopEffect(handle)
+end
+
+function M.stopMusic(isReleaseData)
+ local releaseDataValue = false
+ if nil ~= isReleaseData then
+ releaseDataValue = isReleaseData
+ end
+ cc.SimpleAudioEngine:getInstance():stopMusic(releaseDataValue)
+end
+
+function M.playMusic(filename, isLoop)
+ local loopValue = false
+ if nil ~= isLoop then
+ loopValue = isLoop
+ end
+ cc.SimpleAudioEngine:getInstance():playMusic(filename, loopValue)
+end
+
+function M.pauseAllEffects()
+ cc.SimpleAudioEngine:getInstance():pauseAllEffects()
+end
+
+function M.preloadMusic(filename)
+ cc.SimpleAudioEngine:getInstance():preloadMusic(filename)
+end
+
+function M.resumeMusic()
+ cc.SimpleAudioEngine:getInstance():resumeMusic()
+end
+
+function M.playEffect(filename, isLoop)
+ local loopValue = false
+ if nil ~= isLoop then
+ loopValue = isLoop
+ end
+ return cc.SimpleAudioEngine:getInstance():playEffect(filename, loopValue)
+end
+
+function M.rewindMusic()
+ cc.SimpleAudioEngine:getInstance():rewindMusic()
+end
+
+function M.willPlayMusic()
+ return cc.SimpleAudioEngine:getInstance():willPlayMusic()
+end
+
+function M.unloadEffect(filename)
+ cc.SimpleAudioEngine:getInstance():unloadEffect(filename)
+end
+
+function M.preloadEffect(filename)
+ cc.SimpleAudioEngine:getInstance():preloadEffect(filename)
+end
+
+function M.setEffectsVolume(volume)
+ cc.SimpleAudioEngine:getInstance():setEffectsVolume(volume)
+end
+
+function M.pauseEffect(handle)
+ cc.SimpleAudioEngine:getInstance():pauseEffect(handle)
+end
+
+function M.resumeAllEffects(handle)
+ cc.SimpleAudioEngine:getInstance():resumeAllEffects()
+end
+
+function M.pauseMusic()
+ cc.SimpleAudioEngine:getInstance():pauseMusic()
+end
+
+function M.resumeEffect(handle)
+ cc.SimpleAudioEngine:getInstance():resumeEffect(handle)
+end
+
+function M.getInstance()
+ return cc.SimpleAudioEngine:getInstance()
+end
+
+function M.destroyInstance()
+ return cc.SimpleAudioEngine:destroyInstance()
+end
+
+AudioEngine = M
diff --git a/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua b/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua
new file mode 100644
index 0000000..64f23f6
--- /dev/null
+++ b/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua
@@ -0,0 +1,19 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+-- This is the DeprecatedCocosDenshionClass
+
+DeprecatedCocosDenshionClass = {} or DeprecatedCocosDenshionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--SimpleAudioEngine class will be Deprecated,begin
+function DeprecatedCocosDenshionClass.SimpleAudioEngine()
+ deprecatedTip("SimpleAudioEngine","cc.SimpleAudioEngine")
+ return cc.SimpleAudioEngine
+end
+_G["SimpleAudioEngine"] = DeprecatedCocosDenshionClass.SimpleAudioEngine()
+--SimpleAudioEngine class will be Deprecated,end
diff --git a/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua b/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua
new file mode 100644
index 0000000..9588a1f
--- /dev/null
+++ b/simulator/win32/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua
@@ -0,0 +1,22 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of SimpleAudioEngine will be deprecated begin
+local SimpleAudioEngineDeprecated = { }
+function SimpleAudioEngineDeprecated.sharedEngine()
+ deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
+ return cc.SimpleAudioEngine:getInstance()
+end
+SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine
+
+function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
+ deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
+ return self:playMusic(...)
+end
+SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic
+--functions of SimpleAudioEngine will be deprecated end
diff --git a/simulator/win32/src/cocos/cocostudio/CocoStudio.lua b/simulator/win32/src/cocos/cocostudio/CocoStudio.lua
new file mode 100644
index 0000000..d5a3205
--- /dev/null
+++ b/simulator/win32/src/cocos/cocostudio/CocoStudio.lua
@@ -0,0 +1,389 @@
+if nil == ccs then
+ return
+end
+
+if not json then
+ require "cocos.cocos2d.json"
+end
+
+require "cocos.cocostudio.StudioConstants"
+
+function ccs.sendTriggerEvent(event)
+ local triggerObjArr = ccs.TriggerMng.getInstance():get(event)
+
+ if nil == triggerObjArr then
+ return
+ end
+
+ for i = 1, table.getn(triggerObjArr) do
+ local triObj = triggerObjArr[i]
+ if nil ~= triObj and triObj:detect() then
+ triObj:done()
+ end
+ end
+end
+
+function ccs.registerTriggerClass(className, createFunc)
+ ccs.TInfo.new(className,createFunc)
+end
+
+ccs.TInfo = class("TInfo")
+ccs.TInfo._className = ""
+ccs.TInfo._fun = nil
+
+function ccs.TInfo:ctor(c,f)
+ -- @param {String|ccs.TInfo}c
+ -- @param {Function}f
+ if nil ~= f then
+ self._className = c
+ self._fun = f
+ else
+ self._className = c._className
+ self._fun = c._fun
+ end
+
+ ccs.ObjectFactory.getInstance():registerType(self)
+end
+
+ccs.ObjectFactory = class("ObjectFactory")
+ccs.ObjectFactory._typeMap = nil
+ccs.ObjectFactory._instance = nil
+
+function ccs.ObjectFactory:ctor()
+ self._typeMap = {}
+end
+
+function ccs.ObjectFactory.getInstance()
+ if nil == ccs.ObjectFactory._instance then
+ ccs.ObjectFactory._instance = ccs.ObjectFactory.new()
+ end
+
+ return ccs.ObjectFactory._instance
+end
+
+function ccs.ObjectFactory.destroyInstance()
+ ccs.ObjectFactory._instance = nil
+end
+
+function ccs.ObjectFactory:createObject(classname)
+ local obj = nil
+ local t = self._typeMap[classname]
+ if nil ~= t then
+ obj = t._fun()
+ end
+
+ return obj
+end
+
+function ccs.ObjectFactory:registerType(t)
+ self._typeMap[t._className] = t
+end
+
+ccs.TriggerObj = class("TriggerObj")
+ccs.TriggerObj._cons = {}
+ccs.TriggerObj._acts = {}
+ccs.TriggerObj._enable = false
+ccs.TriggerObj._id = 0
+ccs.TriggerObj._vInt = {}
+
+function ccs.TriggerObj.extend(target)
+ local t = tolua.getpeer(target)
+ if not t then
+ t = {}
+ tolua.setpeer(target, t)
+ end
+ setmetatable(t, TriggerObj)
+ return target
+end
+
+function ccs.TriggerObj:ctor()
+ self:init()
+end
+
+function ccs.TriggerObj:init()
+ self._id = 0
+ self._enable = true
+ self._cons = {}
+ self._acts = {}
+ self._vInt = {}
+end
+
+function ccs.TriggerObj:detect()
+ if (not self._enable) or (table.getn(self._cons) == 0) then
+ return true
+ end
+
+ local ret = true
+ local obj = nil
+ for i = 1 , table.getn(self._cons) do
+ obj = self._cons[i]
+ if nil ~= obj and nil ~= obj.detect then
+ ret = ret and obj:detect()
+ end
+ end
+ return ret
+end
+
+function ccs.TriggerObj:done()
+ if (not self._enable) or (table.getn(self._acts) == 0) then
+ return
+ end
+
+ local obj = nil
+ for i = 1, table.getn(self._acts) do
+ obj = self._acts[i]
+ if nil ~= obj and obj.done then
+ obj:done()
+ end
+ end
+end
+
+function ccs.TriggerObj:removeAll()
+ local obj = nil
+ for i=1, table.getn(self._cons) do
+ obj = self._cons[i]
+ if nil ~= obj then
+ obj:removeAll()
+ end
+ end
+ self._cons = {}
+
+ for i=1, table.getn(self._acts) do
+ obj = self._acts[i]
+ if nil ~= obj then
+ obj:removeAll()
+ end
+ end
+ self._acts = {}
+end
+
+function ccs.TriggerObj:serialize(jsonValue)
+ self._id = jsonValue["id"]
+ local count = 0
+
+ --condition
+ local cons = jsonValue["conditions"]
+ if nil ~= cons then
+ count = table.getn(cons)
+ for i = 1, count do
+ local subDict = cons[i]
+ local className = subDict["classname"]
+ if nil ~= className then
+ local obj = ccs.ObjectFactory.getInstance():createObject(className)
+ assert(nil ~= obj, string.format("class named %s can not implement!",className))
+ obj:serialize(subDict)
+ obj:init()
+ table.insert(self._cons, obj)
+ end
+ end
+ end
+
+ local actions = jsonValue["actions"]
+ if nil ~= actions then
+ count = table.getn(actions)
+ for i = 1,count do
+ local subAction = actions[i]
+ local className = subAction["classname"]
+ if nil ~= className then
+ local act = ccs.ObjectFactory.getInstance():createObject(className)
+ assert(nil ~= act ,string.format("class named %s can not implement!",className))
+ act:serialize(subAction)
+ act:init()
+ table.insert(self._acts,act)
+ end
+ end
+ end
+
+ local events = jsonValue["events"]
+ if nil ~= events then
+ count = table.getn(events)
+ for i = 1, count do
+ local subEveent = events[i]
+ local eventID = subEveent["id"]
+ if eventID >= 0 then
+ table.insert(self._vInt,eventID)
+ end
+ end
+ end
+end
+
+function ccs.TriggerObj:getId()
+ return self._id
+end
+
+function ccs.TriggerObj:setEnable(enable)
+ self._enable = enable
+end
+
+function ccs.TriggerObj:getEvents()
+ return self._vInt
+end
+
+ccs.TriggerMng = class("TriggerMng")
+ccs.TriggerMng._eventTriggers = nil
+ccs.TriggerMng._triggerObjs = nil
+ccs.TriggerMng._movementDispatches = nil
+ccs.TriggerMng._instance = nil
+
+function ccs.TriggerMng:ctor()
+ self._triggerObjs = {}
+ self._movementDispatches = {}
+ self._eventTriggers = {}
+end
+
+function ccs.TriggerMng.getInstance()
+ if ccs.TriggerMng._instance == nil then
+ ccs.TriggerMng._instance = ccs.TriggerMng.new()
+ end
+
+ return ccs.TriggerMng._instance
+end
+
+function ccs.TriggerMng.destroyInstance()
+ if ccs.TriggerMng._instance ~= nil then
+ ccs.TriggerMng._instance:removeAll()
+ ccs.TriggerMng._instance = nil
+ end
+end
+
+function ccs.TriggerMng:triggerMngVersion()
+ return "1.0.0.0"
+end
+
+function ccs.TriggerMng:parse(jsonStr)
+ local parseTable = json.decode(jsonStr,1)
+ if nil == parseTable then
+ return
+ end
+
+ local count = table.getn(parseTable)
+ for i = 1, count do
+ local subDict = parseTable[i]
+ local triggerObj = ccs.TriggerObj.new()
+ triggerObj:serialize(subDict)
+ local events = triggerObj:getEvents()
+ for j = 1, table.getn(events) do
+ local event = events[j]
+ self:add(event, triggerObj)
+ end
+
+ self._triggerObjs[triggerObj:getId()] = triggerObj
+ end
+end
+
+function ccs.TriggerMng:get(event)
+ return self._eventTriggers[event]
+end
+
+function ccs.TriggerMng:getTriggerObj(id)
+ return self._triggerObjs[id]
+end
+
+function ccs.TriggerMng:add(event,triggerObj)
+ local eventTriggers = self._eventTriggers[event]
+ if nil == eventTriggers then
+ eventTriggers = {}
+ end
+
+ local exist = false
+ for i = 1, table.getn(eventTriggers) do
+ if eventTriggers[i] == triggers then
+ exist = true
+ break
+ end
+ end
+
+ if not exist then
+ table.insert(eventTriggers,triggerObj)
+ self._eventTriggers[event] = eventTriggers
+ end
+end
+
+function ccs.TriggerMng:removeAll( )
+ for k in pairs(self._eventTriggers) do
+ local triObjArr = self._eventTriggers[k]
+ for j = 1, table.getn(triObjArr) do
+ local obj = triObjArr[j]
+ obj:removeAll()
+ end
+ end
+ self._eventTriggers = {}
+end
+
+function ccs.TriggerMng:remove(event, obj)
+
+ if nil ~= obj then
+ return self:removeObjByEvent(event, obj)
+ end
+
+ assert(event >= 0,"event must be larger than 0")
+ if nil == self._eventTriggers then
+ return false
+ end
+
+ local triObjects = self._eventTriggers[event]
+ if nil == triObjects then
+ return false
+ end
+
+ for i = 1, table.getn(triObjects) do
+ local triObject = triggers[i]
+ if nil ~= triObject then
+ triObject:remvoeAll()
+ end
+ end
+
+ self._eventTriggers[event] = nil
+ return true
+end
+
+function ccs.TriggerMng:removeObjByEvent(event, obj)
+ assert(event >= 0,"event must be larger than 0")
+ if nil == self._eventTriggers then
+ return false
+ end
+
+ local triObjects = self._eventTriggers[event]
+ if nil == triObjects then
+ return false
+ end
+
+ for i = 1,table.getn(triObjects) do
+ local triObject = triObjects[i]
+ if nil ~= triObject and triObject == obj then
+ triObject:remvoeAll()
+ table.remove(triObjects, i)
+ return true
+ end
+ end
+end
+
+function ccs.TriggerMng:removeTriggerObj(id)
+ local obj = self.getTriggerObj(id)
+
+ if nil == obj then
+ return false
+ end
+
+ local events = obj:getEvents()
+ for i = 1, table.getn(events) do
+ self:remove(events[i],obj)
+ end
+
+ return true
+end
+
+function ccs.TriggerMng:isEmpty()
+ return (not (nil == self._eventTriggers)) or table.getn(self._eventTriggers) <= 0
+end
+
+function __onParseConfig(configType,jasonStr)
+ if configType == cc.ConfigType.COCOSTUDIO then
+ ccs.TriggerMng.getInstance():parse(jasonStr)
+ end
+end
+
+function ccs.AnimationInfo(_name, _startIndex, _endIndex)
+ assert(nil ~= _name and type(_name) == "string" and _startIndex ~= nil and type(_startIndex) == "number" and _endIndex ~= nil and type(_endIndex) == "number", "ccs.AnimationInfo() - invalid input parameters")
+ return { name = _name, startIndex = _startIndex, endIndex = _endIndex}
+end
diff --git a/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua b/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua
new file mode 100644
index 0000000..712886b
--- /dev/null
+++ b/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua
@@ -0,0 +1,307 @@
+if nil == ccs then
+ return
+end
+-- This is the DeprecatedExtensionClass
+
+DeprecatedExtensionClass = {} or DeprecatedExtensionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCArmature class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmature()
+ deprecatedTip("CCArmature","ccs.Armature")
+ return ccs.Armature
+end
+_G["CCArmature"] = DeprecatedExtensionClass.CCArmature()
+--CCArmature class will be Deprecated,end
+
+--CCArmatureAnimation class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmatureAnimation()
+ deprecatedTip("CCArmatureAnimation","ccs.ArmatureAnimation")
+ return ccs.ArmatureAnimation
+end
+_G["CCArmatureAnimation"] = DeprecatedExtensionClass.CCArmatureAnimation()
+--CCArmatureAnimation class will be Deprecated,end
+
+--CCSkin class will be Deprecated,begin
+function DeprecatedExtensionClass.CCSkin()
+ deprecatedTip("CCSkin","ccs.Skin")
+ return ccs.Skin
+end
+_G["CCSkin"] = DeprecatedExtensionClass.CCSkin()
+--CCSkin class will be Deprecated,end
+
+--CCBone class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBone()
+ deprecatedTip("CCBone","ccs.Bone")
+ return ccs.Bone
+end
+_G["CCBone"] = DeprecatedExtensionClass.CCBone()
+--CCBone class will be Deprecated,end
+
+--CCArmatureDataManager class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmatureDataManager()
+ deprecatedTip("CCArmatureDataManager","ccs.ArmatureDataManager")
+ return ccs.ArmatureDataManager
+end
+_G["CCArmatureDataManager"] = DeprecatedExtensionClass.CCArmatureDataManager()
+--CCArmatureDataManager class will be Deprecated,end
+
+--CCBatchNode class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBatchNode()
+ deprecatedTip("CCBatchNode","ccs.BatchNode")
+ return ccs.BatchNode
+end
+_G["CCBatchNode"] = DeprecatedExtensionClass.CCBatchNode()
+--CCBatchNode class will be Deprecated,end
+
+--CCTween class will be Deprecated,begin
+function DeprecatedExtensionClass.CCTween()
+ deprecatedTip("CCTween","ccs.Tween")
+ return ccs.Tween
+end
+_G["CCTween"] = DeprecatedExtensionClass.CCTween()
+--CCTween class will be Deprecated,end
+
+--CCBaseData class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBaseData()
+ deprecatedTip("CCBaseData","ccs.BaseData")
+ return ccs.BaseData
+end
+_G["CCBaseData"] = DeprecatedExtensionClass.CCBaseData()
+--CCBaseData class will be Deprecated,end
+
+--CCDisplayManager class will be Deprecated,begin
+function DeprecatedExtensionClass.CCDisplayManager()
+ deprecatedTip("CCDisplayManager","ccs.DisplayManager")
+ return ccs.DisplayManager
+end
+_G["CCDisplayManager"] = DeprecatedExtensionClass.CCDisplayManager()
+--CCDisplayManager class will be Deprecated,end
+
+--UIHelper class will be Deprecated,begin
+function DeprecatedExtensionClass.UIHelper()
+ deprecatedTip("UIHelper","ccs.UIHelper")
+ return ccs.UIHelper
+end
+_G["UIHelper"] = DeprecatedExtensionClass.UIHelper()
+--UIHelper class will be Deprecated,end
+
+--UILayout class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayout()
+ deprecatedTip("UILayout","ccs.UILayout")
+ return ccs.UILayout
+end
+_G["UILayout"] = DeprecatedExtensionClass.UILayout()
+--UILayout class will be Deprecated,end
+
+--UIWidget class will be Deprecated,begin
+function DeprecatedExtensionClass.UIWidget()
+ deprecatedTip("UIWidget","ccs.UIWidget")
+ return ccs.UIWidget
+end
+_G["UIWidget"] = DeprecatedExtensionClass.UIWidget()
+--UIWidget class will be Deprecated,end
+
+--UILayer class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayer()
+ deprecatedTip("UILayer","ccs.UILayer")
+ return ccs.UILayer
+end
+_G["UILayer"] = DeprecatedExtensionClass.UILayer()
+--UILayer class will be Deprecated,end
+
+--UIButton class will be Deprecated,begin
+function DeprecatedExtensionClass.UIButton()
+ deprecatedTip("UIButton","ccs.UIButton")
+ return ccs.UIButton
+end
+_G["UIButton"] = DeprecatedExtensionClass.UIButton()
+--UIButton class will be Deprecated,end
+
+--UICheckBox class will be Deprecated,begin
+function DeprecatedExtensionClass.UICheckBox()
+ deprecatedTip("UICheckBox","ccs.UICheckBox")
+ return ccs.UICheckBox
+end
+_G["UICheckBox"] = DeprecatedExtensionClass.UICheckBox()
+--UICheckBox class will be Deprecated,end
+
+--UIImageView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIImageView()
+ deprecatedTip("UIImageView","ccs.UIImageView")
+ return ccs.UIImageView
+end
+_G["UIImageView"] = DeprecatedExtensionClass.UIImageView()
+--UIImageView class will be Deprecated,end
+
+--UILabel class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabel()
+ deprecatedTip("UILabel","ccs.UILabel")
+ return ccs.UILabel
+end
+_G["UILabel"] = DeprecatedExtensionClass.UILabel()
+--UILabel class will be Deprecated,end
+
+--UILabelAtlas class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabelAtlas()
+ deprecatedTip("UILabelAtlas","ccs.UILabelAtlas")
+ return ccs.UILabelAtlas
+end
+_G["UILabelAtlas"] = DeprecatedExtensionClass.UILabelAtlas()
+--UILabelAtlas class will be Deprecated,end
+
+--UILabelBMFont class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabelBMFont()
+ deprecatedTip("UILabelBMFont","ccs.UILabelBMFont")
+ return ccs.UILabelBMFont
+end
+_G["UILabelBMFont"] = DeprecatedExtensionClass.UILabelBMFont()
+--UILabelBMFont class will be Deprecated,end
+
+--UILoadingBar class will be Deprecated,begin
+function DeprecatedExtensionClass.UILoadingBar()
+ deprecatedTip("UILoadingBar","ccs.UILoadingBar")
+ return ccs.UILoadingBar
+end
+_G["UILoadingBar"] = DeprecatedExtensionClass.UILoadingBar()
+--UILoadingBar class will be Deprecated,end
+
+--UISlider class will be Deprecated,begin
+function DeprecatedExtensionClass.UISlider()
+ deprecatedTip("UISlider","ccs.UISlider")
+ return ccs.UISlider
+end
+_G["UISlider"] = DeprecatedExtensionClass.UISlider()
+--UISlider class will be Deprecated,end
+
+--UITextField class will be Deprecated,begin
+function DeprecatedExtensionClass.UITextField()
+ deprecatedTip("UITextField","ccs.UITextField")
+ return ccs.UITextField
+end
+_G["UITextField"] = DeprecatedExtensionClass.UITextField()
+--UITextField class will be Deprecated,end
+
+--UIScrollView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIScrollView()
+ deprecatedTip("UIScrollView","ccs.UIScrollView")
+ return ccs.UIScrollView
+end
+_G["UIScrollView"] = DeprecatedExtensionClass.UIScrollView()
+--UIScrollView class will be Deprecated,end
+
+--UIPageView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIPageView()
+ deprecatedTip("UIPageView","ccs.UIPageView")
+ return ccs.UIPageView
+end
+_G["UIPageView"] = DeprecatedExtensionClass.UIPageView()
+--UIPageView class will be Deprecated,end
+
+--UIListView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIListView()
+ deprecatedTip("UIListView","ccs.UIListView")
+ return ccs.UIListView
+end
+_G["UIListView"] = DeprecatedExtensionClass.UIListView()
+--UIListView class will be Deprecated,end
+
+--UILayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayoutParameter()
+ deprecatedTip("UILayoutParameter","ccs.UILayoutParameter")
+ return ccs.UILayoutParameter
+end
+_G["UILayoutParameter"] = DeprecatedExtensionClass.UILayoutParameter()
+--UILayoutParameter class will be Deprecated,end
+
+--UILinearLayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UILinearLayoutParameter()
+ deprecatedTip("UILinearLayoutParameter","ccs.UILinearLayoutParameter")
+ return ccs.UILinearLayoutParameter
+end
+_G["UILinearLayoutParameter"] = DeprecatedExtensionClass.UILinearLayoutParameter()
+--UILinearLayoutParameter class will be Deprecated,end
+
+--UIRelativeLayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UIRelativeLayoutParameter()
+ deprecatedTip("UIRelativeLayoutParameter","ccs.UIRelativeLayoutParameter")
+ return ccs.UIRelativeLayoutParameter
+end
+_G["UIRelativeLayoutParameter"] = DeprecatedExtensionClass.UIRelativeLayoutParameter()
+--UIRelativeLayoutParameter class will be Deprecated,end
+
+--CCComController class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComController()
+ deprecatedTip("CCComController","ccs.ComController")
+ return ccs.CCComController
+end
+_G["CCComController"] = DeprecatedExtensionClass.CCComController()
+--CCComController class will be Deprecated,end
+
+--CCComAudio class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComAudio()
+ deprecatedTip("CCComAudio","ccs.ComAudio")
+ return ccs.ComAudio
+end
+_G["CCComAudio"] = DeprecatedExtensionClass.CCComAudio()
+--CCComAudio class will be Deprecated,end
+
+--CCComAttribute class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComAttribute()
+ deprecatedTip("CCComAttribute","ccs.ComAttribute")
+ return ccs.ComAttribute
+end
+_G["CCComAttribute"] = DeprecatedExtensionClass.CCComAttribute()
+--CCComAttribute class will be Deprecated,end
+
+--CCComRender class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComRender()
+ deprecatedTip("CCComRender","ccs.ComRender")
+ return ccs.ComRender
+end
+_G["CCComRender"] = DeprecatedExtensionClass.CCComRender()
+--CCComRender class will be Deprecated,end
+
+--ActionManager class will be Deprecated,begin
+function DeprecatedExtensionClass.ActionManager()
+ deprecatedTip("ActionManager","ccs.ActionManagerEx")
+ return ccs.ActionManagerEx
+end
+_G["ActionManager"] = DeprecatedExtensionClass.ActionManager()
+--CCComRender class will be Deprecated,end
+
+--SceneReader class will be Deprecated,begin
+function DeprecatedExtensionClass.SceneReader()
+ deprecatedTip("SceneReader","ccs.SceneReader")
+ return ccs.SceneReader
+end
+_G["SceneReader"] = DeprecatedExtensionClass.SceneReader()
+--SceneReader class will be Deprecated,end
+
+--GUIReader class will be Deprecated,begin
+function DeprecatedExtensionClass.GUIReader()
+ deprecatedTip("GUIReader","ccs.GUIReader")
+ return ccs.GUIReader
+end
+_G["GUIReader"] = DeprecatedExtensionClass.GUIReader()
+--GUIReader class will be Deprecated,end
+
+--UIRootWidget class will be Deprecated,begin
+function DeprecatedExtensionClass.UIRootWidget()
+ deprecatedTip("UIRootWidget","ccs.UIRootWidget")
+ return ccs.UIRootWidget
+end
+_G["UIRootWidget"] = DeprecatedExtensionClass.UIRootWidget()
+--UIRootWidget class will be Deprecated,end
+
+--ActionObject class will be Deprecated,begin
+function DeprecatedExtensionClass.ActionObject()
+ deprecatedTip("ActionObject","ccs.ActionObject")
+ return ccs.ActionObject
+end
+_G["ActionObject"] = DeprecatedExtensionClass.ActionObject()
+--ActionObject class will be Deprecated,end
\ No newline at end of file
diff --git a/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua b/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua
new file mode 100644
index 0000000..f8e867d
--- /dev/null
+++ b/simulator/win32/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua
@@ -0,0 +1,81 @@
+if nil == ccs then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of GUIReader will be deprecated begin
+local GUIReaderDeprecated = { }
+function GUIReaderDeprecated.shareReader()
+ deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance")
+ return ccs.GUIReader:getInstance()
+end
+GUIReader.shareReader = GUIReaderDeprecated.shareReader
+
+function GUIReaderDeprecated.purgeGUIReader()
+ deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
+ return ccs.GUIReader:destroyInstance()
+end
+GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader
+--functions of GUIReader will be deprecated end
+
+--functions of SceneReader will be deprecated begin
+local SceneReaderDeprecated = { }
+function SceneReaderDeprecated.sharedSceneReader()
+ deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance")
+ return ccs.SceneReader:getInstance()
+end
+SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader
+
+function SceneReaderDeprecated.purgeSceneReader(self)
+ deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance")
+ return self:destroyInstance()
+end
+SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader
+--functions of SceneReader will be deprecated end
+
+
+--functions of ccs.GUIReader will be deprecated begin
+local CCSGUIReaderDeprecated = { }
+function CCSGUIReaderDeprecated.purgeGUIReader()
+ deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
+ return ccs.GUIReader:destroyInstance()
+end
+ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader
+--functions of ccs.GUIReader will be deprecated end
+
+--functions of ccs.ActionManagerEx will be deprecated begin
+local CCSActionManagerExDeprecated = { }
+function CCSActionManagerExDeprecated.destroyActionManager()
+ deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance")
+ return ccs.ActionManagerEx:destroyInstance()
+end
+ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager
+--functions of ccs.ActionManagerEx will be deprecated end
+
+--functions of ccs.SceneReader will be deprecated begin
+local CCSSceneReaderDeprecated = { }
+function CCSSceneReaderDeprecated.destroySceneReader(self)
+ deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance")
+ return self:destroyInstance()
+end
+ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader
+--functions of ccs.SceneReader will be deprecated end
+
+--functions of CCArmatureDataManager will be deprecated begin
+local CCArmatureDataManagerDeprecated = { }
+function CCArmatureDataManagerDeprecated.sharedArmatureDataManager()
+ deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance")
+ return ccs.ArmatureDataManager:getInstance()
+end
+CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager
+
+function CCArmatureDataManagerDeprecated.purge()
+ deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance")
+ return ccs.ArmatureDataManager:destoryInstance()
+end
+CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge
+--functions of CCArmatureDataManager will be deprecated end
diff --git a/simulator/win32/src/cocos/cocostudio/StudioConstants.lua b/simulator/win32/src/cocos/cocostudio/StudioConstants.lua
new file mode 100644
index 0000000..34fa418
--- /dev/null
+++ b/simulator/win32/src/cocos/cocostudio/StudioConstants.lua
@@ -0,0 +1,15 @@
+if nil == ccs then
+ return
+end
+
+ccs.MovementEventType = {
+ start = 0,
+ complete = 1,
+ loopComplete = 2,
+}
+
+ccs.InnerActionType = {
+ LoopAction = 0,
+ NoLoopAction = 1,
+ SingleFrame = 2,
+}
diff --git a/simulator/win32/src/cocos/controller/ControllerConstants.lua b/simulator/win32/src/cocos/controller/ControllerConstants.lua
new file mode 100644
index 0000000..730e92a
--- /dev/null
+++ b/simulator/win32/src/cocos/controller/ControllerConstants.lua
@@ -0,0 +1,38 @@
+
+cc = cc or {}
+
+cc.ControllerKey =
+{
+ JOYSTICK_LEFT_X = 1000,
+ JOYSTICK_LEFT_Y = 1001,
+ JOYSTICK_RIGHT_X = 1002,
+ JOYSTICK_RIGHT_Y = 1003,
+
+ BUTTON_A = 1004,
+ BUTTON_B = 1005,
+ BUTTON_C = 1006,
+ BUTTON_X = 1007,
+ BUTTON_Y = 1008,
+ BUTTON_Z = 1009,
+
+ BUTTON_DPAD_UP = 1010,
+ BUTTON_DPAD_DOWN = 1011,
+ BUTTON_DPAD_LEFT = 1012,
+ BUTTON_DPAD_RIGHT = 1013,
+ BUTTON_DPAD_CENTER = 1014,
+
+ BUTTON_LEFT_SHOULDER = 1015,
+ BUTTON_RIGHT_SHOULDER = 1016,
+
+ AXIS_LEFT_TRIGGER = 1017,
+ AXIS_RIGHT_TRIGGER = 1018,
+
+ BUTTON_LEFT_THUMBSTICK = 1019,
+ BUTTON_RIGHT_THUMBSTICK = 1020,
+
+ BUTTON_START = 1021,
+ BUTTON_SELECT = 1022,
+
+ BUTTON_PAUSE = 1023,
+ KEY_MAX = 1024,
+}
diff --git a/simulator/win32/src/cocos/extension/DeprecatedExtensionClass.lua b/simulator/win32/src/cocos/extension/DeprecatedExtensionClass.lua
new file mode 100644
index 0000000..a5a5930
--- /dev/null
+++ b/simulator/win32/src/cocos/extension/DeprecatedExtensionClass.lua
@@ -0,0 +1,134 @@
+if nil == cc.Control then
+ return
+end
+
+-- This is the DeprecatedExtensionClass
+DeprecatedExtensionClass = {} or DeprecatedExtensionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCControl class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControl()
+ deprecatedTip("CCControl","cc.Control")
+ return cc.Control
+end
+_G["CCControl"] = DeprecatedExtensionClass.CCControl()
+--CCControl class will be Deprecated,end
+
+--CCScrollView class will be Deprecated,begin
+function DeprecatedExtensionClass.CCScrollView()
+ deprecatedTip("CCScrollView","cc.ScrollView")
+ return cc.ScrollView
+end
+_G["CCScrollView"] = DeprecatedExtensionClass.CCScrollView()
+--CCScrollView class will be Deprecated,end
+
+--CCTableView class will be Deprecated,begin
+function DeprecatedExtensionClass.CCTableView()
+ deprecatedTip("CCTableView","cc.TableView")
+ return cc.TableView
+end
+_G["CCTableView"] = DeprecatedExtensionClass.CCTableView()
+--CCTableView class will be Deprecated,end
+
+--CCControlPotentiometer class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlPotentiometer()
+ deprecatedTip("CCControlPotentiometer","cc.ControlPotentiometer")
+ return cc.ControlPotentiometer
+end
+_G["CCControlPotentiometer"] = DeprecatedExtensionClass.CCControlPotentiometer()
+--CCControlPotentiometer class will be Deprecated,end
+
+--CCControlStepper class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlStepper()
+ deprecatedTip("CCControlStepper","cc.ControlStepper")
+ return cc.ControlStepper
+end
+_G["CCControlStepper"] = DeprecatedExtensionClass.CCControlStepper()
+--CCControlStepper class will be Deprecated,end
+
+--CCControlHuePicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlHuePicker()
+ deprecatedTip("CCControlHuePicker","cc.ControlHuePicker")
+ return cc.ControlHuePicker
+end
+_G["CCControlHuePicker"] = DeprecatedExtensionClass.CCControlHuePicker()
+--CCControlHuePicker class will be Deprecated,end
+
+--CCControlSlider class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSlider()
+ deprecatedTip("CCControlSlider","cc.ControlSlider")
+ return cc.ControlSlider
+end
+_G["CCControlSlider"] = DeprecatedExtensionClass.CCControlSlider()
+--CCControlSlider class will be Deprecated,end
+
+--CCControlSaturationBrightnessPicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
+ deprecatedTip("CCControlSaturationBrightnessPicker","cc.ControlSaturationBrightnessPicker")
+ return cc.ControlSaturationBrightnessPicker
+end
+_G["CCControlSaturationBrightnessPicker"] = DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
+--CCControlSaturationBrightnessPicker class will be Deprecated,end
+
+--CCControlSwitch class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSwitch()
+ deprecatedTip("CCControlSwitch","cc.ControlSwitch")
+ return cc.ControlSwitch
+end
+_G["CCControlSwitch"] = DeprecatedExtensionClass.CCControlSwitch()
+--CCControlSwitch class will be Deprecated,end
+
+--CCControlButton class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlButton()
+ deprecatedTip("CCControlButton","cc.ControlButton")
+ return cc.ControlButton
+end
+_G["CCControlButton"] = DeprecatedExtensionClass.CCControlButton()
+--CCControlButton class will be Deprecated,end
+
+--CCControlColourPicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlColourPicker()
+ deprecatedTip("CCControlColourPicker","cc.ControlColourPicker")
+ return cc.ControlColourPicker
+end
+_G["CCControlColourPicker"] = DeprecatedExtensionClass.CCControlColourPicker()
+--CCControlColourPicker class will be Deprecated,end
+
+
+if nil == ccui then
+ return
+end
+
+--CCEditBox class will be Deprecated,begin
+function DeprecatedExtensionClass.CCEditBox()
+ deprecatedTip("CCEditBox","ccui.EditBox")
+ return ccui.EditBox
+end
+_G["CCEditBox"] = DeprecatedExtensionClass.CCEditBox()
+
+function DeprecatedExtensionClass.CCUIEditBox()
+ deprecatedTip("cc.EditBox","ccui.EditBox")
+ return ccui.EditBox
+end
+_G["cc"]["EditBox"] = DeprecatedExtensionClass.CCUIEditBox()
+
+--CCEditBox class will be Deprecated,end
+
+--CCScale9Sprite class will be Deprecated,begin
+function DeprecatedExtensionClass.CCScale9Sprite()
+ deprecatedTip("CCScale9Sprite","ccui.Scale9Sprite")
+ return ccui.Scale9Sprite
+end
+_G["CCScale9Sprite"] = DeprecatedExtensionClass.CCScale9Sprite()
+
+function DeprecatedExtensionClass.UIScale9Sprite()
+ deprecatedTip("cc.Scale9Sprite","ccui.Scale9Sprite")
+ return ccui.Scale9Sprite
+end
+_G["cc"]["Scale9Sprite"] = DeprecatedExtensionClass.UIScale9Sprite()
+--CCScale9Sprite class will be Deprecated,end
+
diff --git a/simulator/win32/src/cocos/extension/DeprecatedExtensionEnum.lua b/simulator/win32/src/cocos/extension/DeprecatedExtensionEnum.lua
new file mode 100644
index 0000000..9483df0
--- /dev/null
+++ b/simulator/win32/src/cocos/extension/DeprecatedExtensionEnum.lua
@@ -0,0 +1,26 @@
+if nil == cc.Control then
+ return
+end
+
+_G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS
+_G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS
+_G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE
+
+_G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN
+_G.CCControlEventTouchDragInside = cc.CONTROL_EVENTTYPE_DRAG_INSIDE
+_G.CCControlEventTouchDragOutside = cc.CONTROL_EVENTTYPE_DRAG_OUTSIDE
+_G.CCControlEventTouchDragEnter = cc.CONTROL_EVENTTYPE_DRAG_ENTER
+_G.CCControlEventTouchDragExit = cc.CONTROL_EVENTTYPE_DRAG_EXIT
+_G.CCControlEventTouchUpInside = cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE
+_G.CCControlEventTouchUpOutside = cc.CONTROL_EVENTTYPE_TOUCH_UP_OUTSIDE
+_G.CCControlEventTouchCancel = cc.CONTROL_EVENTTYPE_TOUCH_CANCEL
+_G.CCControlEventValueChanged = cc.CONTROL_EVENTTYPE_VALUE_CHANGED
+_G.CCControlStateNormal = cc.CONTROL_STATE_NORMAL
+_G.CCControlStateHighlighted = cc.CONTROL_STATE_HIGH_LIGHTED
+_G.CCControlStateDisabled = cc.CONTROL_STATE_DISABLED
+_G.CCControlStateSelected = cc.CONTROL_STATE_SELECTED
+
+_G.kCCScrollViewDirectionHorizontal = cc.SCROLLVIEW_DIRECTION_HORIZONTAL
+_G.kCCScrollViewDirectionVertical = cc.SCROLLVIEW_DIRECTION_VERTICAL
+_G.kCCTableViewFillTopDown = cc.TABLEVIEW_FILL_TOPDOWN
+_G.kCCTableViewFillBottomUp = cc.TABLEVIEW_FILL_BOTTOMUP
diff --git a/simulator/win32/src/cocos/extension/DeprecatedExtensionFunc.lua b/simulator/win32/src/cocos/extension/DeprecatedExtensionFunc.lua
new file mode 100644
index 0000000..2b617fc
--- /dev/null
+++ b/simulator/win32/src/cocos/extension/DeprecatedExtensionFunc.lua
@@ -0,0 +1,32 @@
+if nil == cc.Control then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of CCControl will be deprecated end
+local CCControlDeprecated = { }
+function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
+ deprecatedTip("addHandleOfControlEvent","registerControlEventHandler")
+ print("come in addHandleOfControlEvent")
+ self:registerControlEventHandler(func,controlEvent)
+end
+CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent
+--functions of CCControl will be deprecated end
+
+--Enums of CCTableView will be deprecated begin
+CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
+CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
+CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED
+CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX
+CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX
+CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW
+--Enums of CCTableView will be deprecated end
+
+--Enums of CCScrollView will be deprecated begin
+CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
+CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
+--Enums of CCScrollView will be deprecated end
diff --git a/simulator/win32/src/cocos/extension/ExtensionConstants.lua b/simulator/win32/src/cocos/extension/ExtensionConstants.lua
new file mode 100644
index 0000000..0bfc8f8
--- /dev/null
+++ b/simulator/win32/src/cocos/extension/ExtensionConstants.lua
@@ -0,0 +1,70 @@
+if nil == cc.Control then
+ return
+end
+
+cc.CONTROL_STATE_NORMAL = 1
+cc.CONTROL_STATE_HIGH_LIGHTED = 2
+cc.CONTROL_STATE_DISABLED = 4
+cc.CONTROL_STATE_SELECTED = 8
+
+cc.CONTROL_STEPPER_PART_MINUS = 0
+cc.CONTROL_STEPPER_PART_PLUS = 1
+cc.CONTROL_STEPPER_PART_NONE = 2
+
+cc.TABLEVIEW_FILL_TOPDOWN = 0
+cc.TABLEVIEW_FILL_BOTTOMUP = 1
+
+cc.SCROLLVIEW_SCRIPT_SCROLL = 0
+cc.SCROLLVIEW_SCRIPT_ZOOM = 1
+cc.TABLECELL_TOUCHED = 2
+cc.TABLECELL_HIGH_LIGHT = 3
+cc.TABLECELL_UNHIGH_LIGHT = 4
+cc.TABLECELL_WILL_RECYCLE = 5
+cc.TABLECELL_SIZE_FOR_INDEX = 6
+cc.TABLECELL_SIZE_AT_INDEX = 7
+cc.NUMBER_OF_CELLS_IN_TABLEVIEW = 8
+
+cc.SCROLLVIEW_DIRECTION_NONE = -1
+cc.SCROLLVIEW_DIRECTION_HORIZONTAL = 0
+cc.SCROLLVIEW_DIRECTION_VERTICAL = 1
+cc.SCROLLVIEW_DIRECTION_BOTH = 2
+
+cc.CONTROL_EVENTTYPE_TOUCH_DOWN = 1
+cc.CONTROL_EVENTTYPE_DRAG_INSIDE = 2
+cc.CONTROL_EVENTTYPE_DRAG_OUTSIDE = 4
+cc.CONTROL_EVENTTYPE_DRAG_ENTER = 8
+cc.CONTROL_EVENTTYPE_DRAG_EXIT = 16
+cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE = 32
+cc.CONTROL_EVENTTYPE_TOUCH_UP_OUTSIDE = 64
+cc.CONTROL_EVENTTYPE_TOUCH_CANCEL = 128
+cc.CONTROL_EVENTTYPE_VALUE_CHANGED = 256
+
+cc.EDITBOX_INPUT_MODE_ANY = 0
+cc.EDITBOX_INPUT_MODE_EMAILADDR = 1
+cc.EDITBOX_INPUT_MODE_NUMERIC = 2
+cc.EDITBOX_INPUT_MODE_PHONENUMBER = 3
+cc.EDITBOX_INPUT_MODE_URL = 4
+cc.EDITBOX_INPUT_MODE_DECIMAL = 5
+cc.EDITBOX_INPUT_MODE_SINGLELINE = 6
+
+cc.EDITBOX_INPUT_FLAG_PASSWORD = 0
+cc.EDITBOX_INPUT_FLAG_SENSITIVE = 1
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_WORD = 2
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_SENTENCE = 3
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_ALL_CHARACTERS = 4
+
+cc.KEYBOARD_RETURNTYPE_DEFAULT = 0
+cc.KEYBOARD_RETURNTYPE_DONE = 1
+cc.KEYBOARD_RETURNTYPE_SEND = 2
+cc.KEYBOARD_RETURNTYPE_SEARCH = 3
+cc.KEYBOARD_RETURNTYPE_GO = 4
+
+cc.ASSETSMANAGER_CREATE_FILE = 0
+cc.ASSETSMANAGER_NETWORK = 1
+cc.ASSETSMANAGER_NO_NEW_VERSION = 2
+cc.ASSETSMANAGER_UNCOMPRESS = 3
+
+cc.ASSETSMANAGER_PROTOCOL_PROGRESS = 0
+cc.ASSETSMANAGER_PROTOCOL_SUCCESS = 1
+cc.ASSETSMANAGER_PROTOCOL_ERROR = 2
+
diff --git a/simulator/win32/src/cocos/framework/audio.lua b/simulator/win32/src/cocos/framework/audio.lua
new file mode 100644
index 0000000..59eb566
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/audio.lua
@@ -0,0 +1,206 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local audio = {}
+
+local engine = cc.SimpleAudioEngine:getInstance()
+
+function audio.getMusicVolume()
+ local volume = engine:getMusicVolume()
+ if DEBUG > 1 then
+ printf("[audio] getMusicVolume() - volume: %0.2f", volume)
+ end
+ return volume
+end
+
+function audio.setMusicVolume(volume)
+ volume = checknumber(volume)
+ if DEBUG > 1 then
+ printf("[audio] setMusicVolume() - volume: %0.2f", volume)
+ end
+ engine:setMusicVolume(volume)
+end
+
+function audio.preloadMusic(filename)
+ assert(filename, "audio.preloadMusic() - invalid filename")
+ if DEBUG > 1 then
+ printf("[audio] preloadMusic() - filename: %s", tostring(filename))
+ end
+ engine:preloadMusic(filename)
+end
+
+function audio.playMusic(filename, isLoop)
+ assert(filename, "audio.playMusic() - invalid filename")
+ if type(isLoop) ~= "boolean" then isLoop = true end
+
+ audio.stopMusic()
+ if DEBUG > 1 then
+ printf("[audio] playMusic() - filename: %s, isLoop: %s", tostring(filename), tostring(isLoop))
+ end
+ engine:playMusic(filename, isLoop)
+end
+
+function audio.stopMusic(isReleaseData)
+ isReleaseData = checkbool(isReleaseData)
+ if DEBUG > 1 then
+ printf("[audio] stopMusic() - isReleaseData: %s", tostring(isReleaseData))
+ end
+ engine:stopMusic(isReleaseData)
+end
+
+function audio.pauseMusic()
+ if DEBUG > 1 then
+ printf("[audio] pauseMusic()")
+ end
+ engine:pauseMusic()
+end
+
+function audio.resumeMusic()
+ if DEBUG > 1 then
+ printf("[audio] resumeMusic()")
+ end
+ engine:resumeMusic()
+end
+
+function audio.rewindMusic()
+ if DEBUG > 1 then
+ printf("[audio] rewindMusic()")
+ end
+ engine:rewindMusic()
+end
+
+function audio.isMusicPlaying()
+ local ret = engine:isMusicPlaying()
+ if DEBUG > 1 then
+ printf("[audio] isMusicPlaying() - ret: %s", tostring(ret))
+ end
+ return ret
+end
+
+function audio.getSoundsVolume()
+ local volume = engine:getEffectsVolume()
+ if DEBUG > 1 then
+ printf("[audio] getSoundsVolume() - volume: %0.1f", volume)
+ end
+ return volume
+end
+
+function audio.setSoundsVolume(volume)
+ volume = checknumber(volume)
+ if DEBUG > 1 then
+ printf("[audio] setSoundsVolume() - volume: %0.1f", volume)
+ end
+ engine:setEffectsVolume(volume)
+end
+
+function audio.playSound(filename, isLoop)
+ if not filename then
+ printError("audio.playSound() - invalid filename")
+ return
+ end
+ if type(isLoop) ~= "boolean" then isLoop = false end
+ if DEBUG > 1 then
+ printf("[audio] playSound() - filename: %s, isLoop: %s", tostring(filename), tostring(isLoop))
+ end
+ return engine:playEffect(filename, isLoop)
+end
+
+function audio.pauseSound(handle)
+ if not handle then
+ printError("audio.pauseSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] pauseSound() - handle: %s", tostring(handle))
+ end
+ engine:pauseEffect(handle)
+end
+
+function audio.pauseAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] pauseAllSounds()")
+ end
+ engine:pauseAllEffects()
+end
+
+function audio.resumeSound(handle)
+ if not handle then
+ printError("audio.resumeSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] resumeSound() - handle: %s", tostring(handle))
+ end
+ engine:resumeEffect(handle)
+end
+
+function audio.resumeAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] resumeAllSounds()")
+ end
+ engine:resumeAllEffects()
+end
+
+function audio.stopSound(handle)
+ if not handle then
+ printError("audio.stopSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] stopSound() - handle: %s", tostring(handle))
+ end
+ engine:stopEffect(handle)
+end
+
+function audio.stopAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] stopAllSounds()")
+ end
+ engine:stopAllEffects()
+end
+audio.stopAllEffects = audio.stopAllSounds
+
+function audio.preloadSound(filename)
+ if not filename then
+ printError("audio.preloadSound() - invalid filename")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] preloadSound() - filename: %s", tostring(filename))
+ end
+ engine:preloadEffect(filename)
+end
+
+function audio.unloadSound(filename)
+ if not filename then
+ printError("audio.unloadSound() - invalid filename")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] unloadSound() - filename: %s", tostring(filename))
+ end
+ engine:unloadEffect(filename)
+end
+
+return audio
diff --git a/simulator/win32/src/cocos/framework/components/event.lua b/simulator/win32/src/cocos/framework/components/event.lua
new file mode 100644
index 0000000..a6ca22b
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/components/event.lua
@@ -0,0 +1,157 @@
+
+local Event = class("Event")
+
+local EXPORTED_METHODS = {
+ "addEventListener",
+ "dispatchEvent",
+ "removeEventListener",
+ "removeEventListenersByTag",
+ "removeEventListenersByEvent",
+ "removeAllEventListeners",
+ "hasEventListener",
+ "dumpAllEventListeners",
+}
+
+function Event:init_()
+ self.target_ = nil
+ self.listeners_ = {}
+ self.nextListenerHandleIndex_ = 0
+end
+
+function Event:bind(target)
+ self:init_()
+ cc.setmethods(target, self, EXPORTED_METHODS)
+ self.target_ = target
+end
+
+function Event:unbind(target)
+ cc.unsetmethods(target, EXPORTED_METHODS)
+ self:init_()
+end
+
+function Event:on(eventName, listener, tag)
+ assert(type(eventName) == "string" and eventName ~= "",
+ "Event:addEventListener() - invalid eventName")
+ eventName = string.upper(eventName)
+ if self.listeners_[eventName] == nil then
+ self.listeners_[eventName] = {}
+ end
+
+ self.nextListenerHandleIndex_ = self.nextListenerHandleIndex_ + 1
+ local handle = tostring(self.nextListenerHandleIndex_)
+ tag = tag or ""
+ self.listeners_[eventName][handle] = {listener, tag}
+
+ if DEBUG > 1 then
+ printInfo("%s [Event] addEventListener() - event: %s, handle: %s, tag: \"%s\"",
+ tostring(self.target_), eventName, handle, tostring(tag))
+ end
+
+ return self.target_, handle
+end
+
+Event.addEventListener = Event.on
+
+function Event:dispatchEvent(event)
+ event.name = string.upper(tostring(event.name))
+ local eventName = event.name
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - event %s", tostring(self.target_), eventName)
+ end
+
+ if self.listeners_[eventName] == nil then return end
+ event.target = self.target_
+ event.stop_ = false
+ event.stop = function(self)
+ self.stop_ = true
+ end
+
+ for handle, listener in pairs(self.listeners_[eventName]) do
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - dispatching event %s to listener %s", tostring(self.target_), eventName, handle)
+ end
+ -- listener[1] = listener
+ -- listener[2] = tag
+ event.tag = listener[2]
+ listener[1](event)
+ if event.stop_ then
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - break dispatching for event %s", tostring(self.target_), eventName)
+ end
+ break
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListener(handleToRemove)
+ for eventName, listenersForEvent in pairs(self.listeners_) do
+ for handle, _ in pairs(listenersForEvent) do
+ if handle == handleToRemove then
+ listenersForEvent[handle] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeEventListener() - remove listener [%s] for event %s", tostring(self.target_), handle, eventName)
+ end
+ return self.target_
+ end
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListenersByTag(tagToRemove)
+ for eventName, listenersForEvent in pairs(self.listeners_) do
+ for handle, listener in pairs(listenersForEvent) do
+ -- listener[1] = listener
+ -- listener[2] = tag
+ if listener[2] == tagToRemove then
+ listenersForEvent[handle] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeEventListener() - remove listener [%s] for event %s", tostring(self.target_), handle, eventName)
+ end
+ end
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListenersByEvent(eventName)
+ self.listeners_[string.upper(eventName)] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeAllEventListenersForEvent() - remove all listeners for event %s", tostring(self.target_), eventName)
+ end
+ return self.target_
+end
+
+function Event:removeAllEventListeners()
+ self.listeners_ = {}
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeAllEventListeners() - remove all listeners", tostring(self.target_))
+ end
+ return self.target_
+end
+
+function Event:hasEventListener(eventName)
+ eventName = string.upper(tostring(eventName))
+ local t = self.listeners_[eventName]
+ for _, __ in pairs(t) do
+ return true
+ end
+ return false
+end
+
+function Event:dumpAllEventListeners()
+ print("---- Event:dumpAllEventListeners() ----")
+ for name, listeners in pairs(self.listeners_) do
+ printf("-- event: %s", name)
+ for handle, listener in pairs(listeners) do
+ printf("-- listener: %s, handle: %s", tostring(listener[1]), tostring(handle))
+ end
+ end
+ return self.target_
+end
+
+return Event
diff --git a/simulator/win32/src/cocos/framework/device.lua b/simulator/win32/src/cocos/framework/device.lua
new file mode 100644
index 0000000..acf7746
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/device.lua
@@ -0,0 +1,107 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local device = {}
+
+device.platform = "unknown"
+device.model = "unknown"
+
+local app = cc.Application:getInstance()
+local target = app:getTargetPlatform()
+if target == cc.PLATFORM_OS_WINDOWS then
+ device.platform = "windows"
+elseif target == cc.PLATFORM_OS_MAC then
+ device.platform = "mac"
+elseif target == cc.PLATFORM_OS_ANDROID then
+ device.platform = "android"
+elseif target == cc.PLATFORM_OS_IPHONE or target == cc.PLATFORM_OS_IPAD then
+ device.platform = "ios"
+ local director = cc.Director:getInstance()
+ local view = director:getOpenGLView()
+ local framesize = view:getFrameSize()
+ local w, h = framesize.width, framesize.height
+ if w == 640 and h == 960 then
+ device.model = "iphone 4"
+ elseif w == 640 and h == 1136 then
+ device.model = "iphone 5"
+ elseif w == 750 and h == 1334 then
+ device.model = "iphone 6"
+ elseif w == 1242 and h == 2208 then
+ device.model = "iphone 6 plus"
+ elseif w == 768 and h == 1024 then
+ device.model = "ipad"
+ elseif w == 1536 and h == 2048 then
+ device.model = "ipad retina"
+ end
+elseif target == cc.PLATFORM_OS_WINRT then
+ device.platform = "winrt"
+elseif target == cc.PLATFORM_OS_WP8 then
+ device.platform = "wp8"
+end
+
+local language_ = app:getCurrentLanguage()
+if language_ == cc.LANGUAGE_CHINESE then
+ language_ = "cn"
+elseif language_ == cc.LANGUAGE_FRENCH then
+ language_ = "fr"
+elseif language_ == cc.LANGUAGE_ITALIAN then
+ language_ = "it"
+elseif language_ == cc.LANGUAGE_GERMAN then
+ language_ = "gr"
+elseif language_ == cc.LANGUAGE_SPANISH then
+ language_ = "sp"
+elseif language_ == cc.LANGUAGE_RUSSIAN then
+ language_ = "ru"
+elseif language_ == cc.LANGUAGE_KOREAN then
+ language_ = "kr"
+elseif language_ == cc.LANGUAGE_JAPANESE then
+ language_ = "jp"
+elseif language_ == cc.LANGUAGE_HUNGARIAN then
+ language_ = "hu"
+elseif language_ == cc.LANGUAGE_PORTUGUESE then
+ language_ = "pt"
+elseif language_ == cc.LANGUAGE_ARABIC then
+ language_ = "ar"
+else
+ language_ = "en"
+end
+
+device.language = language_
+device.writablePath = cc.FileUtils:getInstance():getWritablePath()
+device.directorySeparator = "/"
+device.pathSeparator = ":"
+if device.platform == "windows" then
+ device.directorySeparator = "\\"
+ device.pathSeparator = ";"
+end
+
+printInfo("# device.platform = " .. device.platform)
+printInfo("# device.model = " .. device.model)
+printInfo("# device.language = " .. device.language)
+printInfo("# device.writablePath = " .. device.writablePath)
+printInfo("# device.directorySeparator = " .. device.directorySeparator)
+printInfo("# device.pathSeparator = " .. device.pathSeparator)
+printInfo("#")
+
+return device
diff --git a/simulator/win32/src/cocos/framework/display.lua b/simulator/win32/src/cocos/framework/display.lua
new file mode 100644
index 0000000..8466a30
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/display.lua
@@ -0,0 +1,541 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local display = {}
+
+local director = cc.Director:getInstance()
+local view = director:getOpenGLView()
+
+if not view then
+ local width = 960
+ local height = 640
+ if CC_DESIGN_RESOLUTION then
+ if CC_DESIGN_RESOLUTION.width then
+ width = CC_DESIGN_RESOLUTION.width
+ end
+ if CC_DESIGN_RESOLUTION.height then
+ height = CC_DESIGN_RESOLUTION.height
+ end
+ end
+ view = cc.GLViewImpl:createWithRect("Cocos2d-Lua", cc.rect(0, 0, width, height))
+ director:setOpenGLView(view)
+end
+
+local framesize = view:getFrameSize()
+local textureCache = director:getTextureCache()
+local spriteFrameCache = cc.SpriteFrameCache:getInstance()
+local animationCache = cc.AnimationCache:getInstance()
+
+-- auto scale
+local function checkResolution(r)
+ r.width = checknumber(r.width)
+ r.height = checknumber(r.height)
+ r.autoscale = string.upper(r.autoscale)
+ assert(r.width > 0 and r.height > 0,
+ string.format("display - invalid design resolution size %d, %d", r.width, r.height))
+end
+
+local function setDesignResolution(r, framesize)
+ if r.autoscale == "FILL_ALL" then
+ view:setDesignResolutionSize(framesize.width, framesize.height, cc.ResolutionPolicy.FILL_ALL)
+ else
+ local scaleX, scaleY = framesize.width / r.width, framesize.height / r.height
+ local width, height = framesize.width, framesize.height
+ if r.autoscale == "FIXED_WIDTH" then
+ width = framesize.width / scaleX
+ height = framesize.height / scaleX
+ view:setDesignResolutionSize(width, height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "FIXED_HEIGHT" then
+ width = framesize.width / scaleY
+ height = framesize.height / scaleY
+ view:setDesignResolutionSize(width, height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "EXACT_FIT" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.EXACT_FIT)
+ elseif r.autoscale == "NO_BORDER" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "SHOW_ALL" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.SHOW_ALL)
+ else
+ printError(string.format("display - invalid r.autoscale \"%s\"", r.autoscale))
+ end
+ end
+end
+
+local function setConstants()
+ local sizeInPixels = view:getFrameSize()
+ display.sizeInPixels = {width = sizeInPixels.width, height = sizeInPixels.height}
+
+ local viewsize = director:getWinSize()
+ display.contentScaleFactor = director:getContentScaleFactor()
+ display.size = {width = viewsize.width, height = viewsize.height}
+ display.width = display.size.width
+ display.height = display.size.height
+ display.cx = display.width / 2
+ display.cy = display.height / 2
+ display.c_left = -display.width / 2
+ display.c_right = display.width / 2
+ display.c_top = display.height / 2
+ display.c_bottom = -display.height / 2
+ display.left = 0
+ display.right = display.width
+ display.top = display.height
+ display.bottom = 0
+ display.center = cc.p(display.cx, display.cy)
+ display.left_top = cc.p(display.left, display.top)
+ display.left_bottom = cc.p(display.left, display.bottom)
+ display.left_center = cc.p(display.left, display.cy)
+ display.right_top = cc.p(display.right, display.top)
+ display.right_bottom = cc.p(display.right, display.bottom)
+ display.right_center = cc.p(display.right, display.cy)
+ display.top_center = cc.p(display.cx, display.top)
+ display.top_bottom = cc.p(display.cx, display.bottom)
+
+ printInfo(string.format("# display.sizeInPixels = {width = %0.2f, height = %0.2f}", display.sizeInPixels.width, display.sizeInPixels.height))
+ printInfo(string.format("# display.size = {width = %0.2f, height = %0.2f}", display.size.width, display.size.height))
+ printInfo(string.format("# display.contentScaleFactor = %0.2f", display.contentScaleFactor))
+ printInfo(string.format("# display.width = %0.2f", display.width))
+ printInfo(string.format("# display.height = %0.2f", display.height))
+ printInfo(string.format("# display.cx = %0.2f", display.cx))
+ printInfo(string.format("# display.cy = %0.2f", display.cy))
+ printInfo(string.format("# display.left = %0.2f", display.left))
+ printInfo(string.format("# display.right = %0.2f", display.right))
+ printInfo(string.format("# display.top = %0.2f", display.top))
+ printInfo(string.format("# display.bottom = %0.2f", display.bottom))
+ printInfo(string.format("# display.c_left = %0.2f", display.c_left))
+ printInfo(string.format("# display.c_right = %0.2f", display.c_right))
+ printInfo(string.format("# display.c_top = %0.2f", display.c_top))
+ printInfo(string.format("# display.c_bottom = %0.2f", display.c_bottom))
+ printInfo(string.format("# display.center = {x = %0.2f, y = %0.2f}", display.center.x, display.center.y))
+ printInfo(string.format("# display.left_top = {x = %0.2f, y = %0.2f}", display.left_top.x, display.left_top.y))
+ printInfo(string.format("# display.left_bottom = {x = %0.2f, y = %0.2f}", display.left_bottom.x, display.left_bottom.y))
+ printInfo(string.format("# display.left_center = {x = %0.2f, y = %0.2f}", display.left_center.x, display.left_center.y))
+ printInfo(string.format("# display.right_top = {x = %0.2f, y = %0.2f}", display.right_top.x, display.right_top.y))
+ printInfo(string.format("# display.right_bottom = {x = %0.2f, y = %0.2f}", display.right_bottom.x, display.right_bottom.y))
+ printInfo(string.format("# display.right_center = {x = %0.2f, y = %0.2f}", display.right_center.x, display.right_center.y))
+ printInfo(string.format("# display.top_center = {x = %0.2f, y = %0.2f}", display.top_center.x, display.top_center.y))
+ printInfo(string.format("# display.top_bottom = {x = %0.2f, y = %0.2f}", display.top_bottom.x, display.top_bottom.y))
+ printInfo("#")
+end
+
+function display.setAutoScale(configs)
+ if type(configs) ~= "table" then return end
+
+ checkResolution(configs)
+ if type(configs.callback) == "function" then
+ local c = configs.callback(framesize)
+ for k, v in pairs(c or {}) do
+ configs[k] = v
+ end
+ checkResolution(configs)
+ end
+
+ setDesignResolution(configs, framesize)
+
+ printInfo(string.format("# design resolution size = {width = %0.2f, height = %0.2f}", configs.width, configs.height))
+ printInfo(string.format("# design resolution autoscale = %s", configs.autoscale))
+ setConstants()
+end
+
+if type(CC_DESIGN_RESOLUTION) == "table" then
+ display.setAutoScale(CC_DESIGN_RESOLUTION)
+end
+
+display.COLOR_WHITE = cc.c3b(255, 255, 255)
+display.COLOR_BLACK = cc.c3b(0, 0, 0)
+display.COLOR_RED = cc.c3b(255, 0, 0)
+display.COLOR_GREEN = cc.c3b(0, 255, 0)
+display.COLOR_BLUE = cc.c3b(0, 0, 255)
+
+display.AUTO_SIZE = 0
+display.FIXED_SIZE = 1
+display.LEFT_TO_RIGHT = 0
+display.RIGHT_TO_LEFT = 1
+display.TOP_TO_BOTTOM = 2
+display.BOTTOM_TO_TOP = 3
+
+display.CENTER = cc.p(0.5, 0.5)
+display.LEFT_TOP = cc.p(0, 1)
+display.LEFT_BOTTOM = cc.p(0, 0)
+display.LEFT_CENTER = cc.p(0, 0.5)
+display.RIGHT_TOP = cc.p(1, 1)
+display.RIGHT_BOTTOM = cc.p(1, 0)
+display.RIGHT_CENTER = cc.p(1, 0.5)
+display.CENTER_TOP = cc.p(0.5, 1)
+display.CENTER_BOTTOM = cc.p(0.5, 0)
+
+display.SCENE_TRANSITIONS = {
+ CROSSFADE = cc.TransitionCrossFade,
+ FADE = {cc.TransitionFade, cc.c3b(0, 0, 0)},
+ FADEBL = cc.TransitionFadeBL,
+ FADEDOWN = cc.TransitionFadeDown,
+ FADETR = cc.TransitionFadeTR,
+ FADEUP = cc.TransitionFadeUp,
+ FLIPANGULAR = {cc.TransitionFlipAngular, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ FLIPX = {cc.TransitionFlipX, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ FLIPY = {cc.TransitionFlipY, cc.TRANSITION_ORIENTATION_UP_OVER},
+ JUMPZOOM = cc.TransitionJumpZoom,
+ MOVEINB = cc.TransitionMoveInB,
+ MOVEINL = cc.TransitionMoveInL,
+ MOVEINR = cc.TransitionMoveInR,
+ MOVEINT = cc.TransitionMoveInT,
+ PAGETURN = {cc.TransitionPageTurn, false},
+ ROTOZOOM = cc.TransitionRotoZoom,
+ SHRINKGROW = cc.TransitionShrinkGrow,
+ SLIDEINB = cc.TransitionSlideInB,
+ SLIDEINL = cc.TransitionSlideInL,
+ SLIDEINR = cc.TransitionSlideInR,
+ SLIDEINT = cc.TransitionSlideInT,
+ SPLITCOLS = cc.TransitionSplitCols,
+ SPLITROWS = cc.TransitionSplitRows,
+ TURNOFFTILES = cc.TransitionTurnOffTiles,
+ ZOOMFLIPANGULAR = cc.TransitionZoomFlipAngular,
+ ZOOMFLIPX = {cc.TransitionZoomFlipX, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ ZOOMFLIPY = {cc.TransitionZoomFlipY, cc.TRANSITION_ORIENTATION_UP_OVER},
+}
+
+display.TEXTURES_PIXEL_FORMAT = {}
+
+display.DEFAULT_TTF_FONT = "Arial"
+display.DEFAULT_TTF_FONT_SIZE = 32
+
+
+local PARAMS_EMPTY = {}
+local RECT_ZERO = cc.rect(0, 0, 0, 0)
+
+local sceneIndex = 0
+function display.newScene(name, params)
+ params = params or PARAMS_EMPTY
+ sceneIndex = sceneIndex + 1
+ local scene
+ if not params.physics then
+ scene = cc.Scene:create()
+ else
+ scene = cc.Scene:createWithPhysics()
+ end
+ scene.name_ = string.format("%s:%d", name or "", sceneIndex)
+
+ if params.transition then
+ scene = display.wrapSceneWithTransition(scene, params.transition, params.time, params.more)
+ end
+
+ return scene
+end
+
+function display.wrapScene(scene, transition, time, more)
+ local key = string.upper(tostring(transition))
+
+ if key == "RANDOM" then
+ local keys = table.keys(display.SCENE_TRANSITIONS)
+ key = keys[math.random(1, #keys)]
+ end
+
+ if display.SCENE_TRANSITIONS[key] then
+ local t = display.SCENE_TRANSITIONS[key]
+ time = time or 0.2
+ more = more or t[2]
+ if type(t) == "table" then
+ scene = t[1]:create(time, scene, more)
+ else
+ scene = t:create(time, scene)
+ end
+ else
+ error(string.format("display.wrapScene() - invalid transition %s", tostring(transition)))
+ end
+ return scene
+end
+
+function display.runScene(newScene, transition, time, more)
+ if director:getRunningScene() then
+ if transition then
+ newScene = display.wrapScene(newScene, transition, time, more)
+ end
+ director:replaceScene(newScene)
+ else
+ director:runWithScene(newScene)
+ end
+end
+
+function display.getRunningScene()
+ return director:getRunningScene()
+end
+
+function display.newNode()
+ return cc.Node:create()
+end
+
+function display.newLayer(...)
+ local params = {...}
+ local c = #params
+ local layer
+ if c == 0 then
+ -- /** creates a fullscreen black layer */
+ -- static Layer *create();
+ layer = cc.Layer:create()
+ elseif c == 1 then
+ -- /** creates a Layer with color. Width and height are the window size. */
+ -- static LayerColor * create(const Color4B& color);
+ layer = cc.LayerColor:create(cc.convertColor(params[1], "4b"))
+ elseif c == 2 then
+ -- /** creates a Layer with color, width and height in Points */
+ -- static LayerColor * create(const Color4B& color, const Size& size);
+ --
+ -- /** Creates a full-screen Layer with a gradient between start and end. */
+ -- static LayerGradient* create(const Color4B& start, const Color4B& end);
+ local color1 = cc.convertColor(params[1], "4b")
+ local p2 = params[2]
+ assert(type(p2) == "table" and (p2.width or p2.r), "display.newLayer() - invalid paramerter 2")
+ if p2.r then
+ layer = cc.LayerGradient:create(color1, cc.convertColor(p2, "4b"))
+ else
+ layer = cc.LayerColor:create(color1, p2.width, p2.height)
+ end
+ elseif c == 3 then
+ -- /** creates a Layer with color, width and height in Points */
+ -- static LayerColor * create(const Color4B& color, GLfloat width, GLfloat height);
+ --
+ -- /** Creates a full-screen Layer with a gradient between start and end in the direction of v. */
+ -- static LayerGradient* create(const Color4B& start, const Color4B& end, const Vec2& v);
+ local color1 = cc.convertColor(params[1], "4b")
+ local p2 = params[2]
+ local p2type = type(p2)
+ if p2type == "table" then
+ layer = cc.LayerGradient:create(color1, cc.convertColor(p2, "4b"), params[3])
+ else
+ layer = cc.LayerColor:create(color1, p2, params[3])
+ end
+ end
+ return layer
+end
+
+function display.newSprite(source, x, y, params)
+ local spriteClass = cc.Sprite
+ local scale9 = false
+
+ if type(x) == "table" and not x.x then
+ -- x is params
+ params = x
+ x = nil
+ y = nil
+ end
+
+ local params = params or PARAMS_EMPTY
+ if params.scale9 or params.capInsets then
+ spriteClass = ccui.Scale9Sprite
+ scale9 = true
+ params.capInsets = params.capInsets or RECT_ZERO
+ params.rect = params.rect or RECT_ZERO
+ end
+
+ local sprite
+ while true do
+ -- create sprite
+ if not source then
+ sprite = spriteClass:create()
+ break
+ end
+
+ local sourceType = type(source)
+ if sourceType == "string" then
+ if string.byte(source) == 35 then -- first char is #
+ -- create sprite from spriteFrame
+ if not scale9 then
+ sprite = spriteClass:createWithSpriteFrameName(string.sub(source, 2))
+ else
+ sprite = spriteClass:createWithSpriteFrameName(string.sub(source, 2), params.capInsets)
+ end
+ break
+ end
+
+ -- create sprite from image file
+ if display.TEXTURES_PIXEL_FORMAT[source] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(display.TEXTURES_PIXEL_FORMAT[source])
+ end
+ if not scale9 then
+ sprite = spriteClass:create(source)
+ else
+ sprite = spriteClass:create(source, params.rect, params.capInsets)
+ end
+ if display.TEXTURES_PIXEL_FORMAT[source] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
+ end
+ break
+ elseif sourceType ~= "userdata" then
+ error(string.format("display.newSprite() - invalid source type \"%s\"", sourceType), 0)
+ else
+ sourceType = tolua.type(source)
+ if sourceType == "cc.SpriteFrame" then
+ if not scale9 then
+ sprite = spriteClass:createWithSpriteFrame(source)
+ else
+ sprite = spriteClass:createWithSpriteFrame(source, params.capInsets)
+ end
+ elseif sourceType == "cc.Texture2D" then
+ sprite = spriteClass:createWithTexture(source)
+ else
+ error(string.format("display.newSprite() - invalid source type \"%s\"", sourceType), 0)
+ end
+ end
+ break
+ end
+
+ if sprite then
+ if x and y then sprite:setPosition(x, y) end
+ if params.size then sprite:setContentSize(params.size) end
+ else
+ error(string.format("display.newSprite() - create sprite failure, source \"%s\"", tostring(source)), 0)
+ end
+
+ return sprite
+end
+
+function display.newSpriteFrame(source, ...)
+ local frame
+ if type(source) == "string" then
+ if string.byte(source) == 35 then -- first char is #
+ source = string.sub(source, 2)
+ end
+ frame = spriteFrameCache:getSpriteFrame(source)
+ if not frame then
+ error(string.format("display.newSpriteFrame() - invalid frame name \"%s\"", tostring(source)), 0)
+ end
+ elseif tolua.type(source) == "cc.Texture2D" then
+ frame = cc.SpriteFrame:createWithTexture(source, ...)
+ else
+ error("display.newSpriteFrame() - invalid parameters", 0)
+ end
+ return frame
+end
+
+function display.newFrames(pattern, begin, length, isReversed)
+ local frames = {}
+ local step = 1
+ local last = begin + length - 1
+ if isReversed then
+ last, begin = begin, last
+ step = -1
+ end
+
+ for index = begin, last, step do
+ local frameName = string.format(pattern, index)
+ local frame = spriteFrameCache:getSpriteFrame(frameName)
+ if not frame then
+ error(string.format("display.newFrames() - invalid frame name %s", tostring(frameName)), 0)
+ end
+ frames[#frames + 1] = frame
+ end
+ return frames
+end
+
+local function newAnimation(frames, time)
+ local count = #frames
+ assert(count > 0, "display.newAnimation() - invalid frames")
+ time = time or 1.0 / count
+ return cc.Animation:createWithSpriteFrames(frames, time),
+ cc.Sprite:createWithSpriteFrame(frames[1])
+end
+
+function display.newAnimation(...)
+ local params = {...}
+ local c = #params
+ if c == 2 then
+ -- frames, time
+ return newAnimation(params[1], params[2])
+ elseif c == 4 then
+ -- pattern, begin, length, time
+ local frames = display.newFrames(params[1], params[2], params[3])
+ return newAnimation(frames, params[4])
+ elseif c == 5 then
+ -- pattern, begin, length, isReversed, time
+ local frames = display.newFrames(params[1], params[2], params[3], params[4])
+ return newAnimation(frames, params[5])
+ else
+ error("display.newAnimation() - invalid parameters")
+ end
+end
+
+function display.loadImage(imageFilename, callback)
+ if not callback then
+ return textureCache:addImage(imageFilename)
+ else
+ textureCache:addImageAsync(imageFilename, callback)
+ end
+end
+
+local fileUtils = cc.FileUtils:getInstance()
+function display.getImage(imageFilename)
+ local fullpath = fileUtils:fullPathForFilename(imageFilename)
+ return textureCache:getTextureForKey(fullpath)
+end
+
+function display.removeImage(imageFilename)
+ textureCache:removeTextureForKey(imageFilename)
+end
+
+function display.loadSpriteFrames(dataFilename, imageFilename, callback)
+ if display.TEXTURES_PIXEL_FORMAT[imageFilename] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(display.TEXTURES_PIXEL_FORMAT[imageFilename])
+ end
+ if not callback then
+ spriteFrameCache:addSpriteFrames(dataFilename, imageFilename)
+ else
+ spriteFrameCache:addSpriteFramesAsync(dataFilename, imageFilename, callback)
+ end
+ if display.TEXTURES_PIXEL_FORMAT[imageFilename] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
+ end
+end
+
+function display.removeSpriteFrames(dataFilename, imageFilename)
+ spriteFrameCache:removeSpriteFramesFromFile(dataFilename)
+ if imageFilename then
+ display.removeImage(imageFilename)
+ end
+end
+
+function display.removeSpriteFrame(imageFilename)
+ spriteFrameCache:removeSpriteFrameByName(imageFilename)
+end
+
+function display.setTexturePixelFormat(imageFilename, format)
+ display.TEXTURES_PIXEL_FORMAT[imageFilename] = format
+end
+
+function display.setAnimationCache(name, animation)
+ animationCache:addAnimation(animation, name)
+end
+
+function display.getAnimationCache(name)
+ return animationCache:getAnimation(name)
+end
+
+function display.removeAnimationCache(name)
+ animationCache:removeAnimation(name)
+end
+
+function display.removeUnusedSpriteFrames()
+ spriteFrameCache:removeUnusedSpriteFrames()
+ textureCache:removeUnusedTextures()
+end
+
+return display
diff --git a/simulator/win32/src/cocos/framework/extends/LayerEx.lua b/simulator/win32/src/cocos/framework/extends/LayerEx.lua
new file mode 100644
index 0000000..6bba1b2
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/LayerEx.lua
@@ -0,0 +1,80 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Layer = cc.Layer
+
+function Layer:onTouch(callback, isMultiTouches, swallowTouches)
+ if type(isMultiTouches) ~= "boolean" then isMultiTouches = false end
+ if type(swallowTouches) ~= "boolean" then swallowTouches = false end
+
+ self:registerScriptTouchHandler(function(state, ...)
+ local args = {...}
+ local event = {name = state}
+ if isMultiTouches then
+ args = args[1]
+ local points = {}
+ for i = 1, #args, 3 do
+ local x, y, id = args[i], args[i + 1], args[i + 2]
+ points[id] = {x = x, y = y, id = id}
+ end
+ event.points = points
+ else
+ event.x = args[1]
+ event.y = args[2]
+ end
+ return callback( event )
+ end, isMultiTouches, 0, swallowTouches)
+ self:setTouchEnabled(true)
+ return self
+end
+
+function Layer:removeTouch()
+ self:unregisterScriptTouchHandler()
+ self:setTouchEnabled(false)
+ return self
+end
+
+function Layer:onKeypad(callback)
+ self:registerScriptKeypadHandler(callback)
+ self:setKeyboardEnabled(true)
+ return self
+end
+
+function Layer:removeKeypad()
+ self:unregisterScriptKeypadHandler()
+ self:setKeyboardEnabled(false)
+ return self
+end
+
+function Layer:onAccelerate(callback)
+ self:registerScriptAccelerateHandler(callback)
+ self:setAccelerometerEnabled(true)
+ return self
+end
+
+function Layer:removeAccelerate()
+ self:unregisterScriptAccelerateHandler()
+ self:setAccelerometerEnabled(false)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/MenuEx.lua b/simulator/win32/src/cocos/framework/extends/MenuEx.lua
new file mode 100644
index 0000000..1639327
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/MenuEx.lua
@@ -0,0 +1,31 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Menu = cc.Menu
+local MenuItem = cc.MenuItem
+
+function MenuItem:onClicked(callback)
+ self:registerScriptTapHandler(callback)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/NodeEx.lua b/simulator/win32/src/cocos/framework/extends/NodeEx.lua
new file mode 100644
index 0000000..a15807b
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/NodeEx.lua
@@ -0,0 +1,228 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Node = cc.Node
+
+function Node:add(child, zorder, tag)
+ if tag then
+ self:addChild(child, zorder, tag)
+ elseif zorder then
+ self:addChild(child, zorder)
+ else
+ self:addChild(child)
+ end
+ return self
+end
+
+function Node:addTo(parent, zorder, tag)
+ if tag then
+ parent:addChild(self, zorder, tag)
+ elseif zorder then
+ parent:addChild(self, zorder)
+ else
+ parent:addChild(self)
+ end
+ return self
+end
+
+function Node:removeSelf()
+ self:removeFromParent()
+ return self
+end
+
+function Node:align(anchorPoint, x, y)
+ self:setAnchorPoint(anchorPoint)
+ return self:move(x, y)
+end
+
+function Node:show()
+ self:setVisible(true)
+ return self
+end
+
+function Node:hide()
+ self:setVisible(false)
+ return self
+end
+
+function Node:move(x, y)
+ if y then
+ self:setPosition(x, y)
+ else
+ self:setPosition(x)
+ end
+ return self
+end
+
+function Node:moveTo(args)
+ transition.moveTo(self, args)
+ return self
+end
+
+function Node:moveBy(args)
+ transition.moveBy(self, args)
+ return self
+end
+
+function Node:fadeIn(args)
+ transition.fadeIn(self, args)
+ return self
+end
+
+function Node:fadeOut(args)
+ transition.fadeOut(self, args)
+ return self
+end
+
+function Node:fadeTo(args)
+ transition.fadeTo(self, args)
+ return self
+end
+
+function Node:rotate(rotation)
+ self:setRotation(rotation)
+ return self
+end
+
+function Node:rotateTo(args)
+ transition.rotateTo(self, args)
+ return self
+end
+
+function Node:rotateBy(args)
+ transition.rotateBy(self, args)
+ return self
+end
+
+function Node:scaleTo(args)
+ transition.scaleTo(self, args)
+ return self
+end
+
+function Node:onUpdate(callback)
+ self:scheduleUpdateWithPriorityLua(callback, 0)
+ return self
+end
+
+Node.scheduleUpdate = Node.onUpdate
+
+function Node:onNodeEvent(eventName, callback)
+ if "enter" == eventName then
+ self.onEnterCallback_ = callback
+ elseif "exit" == eventName then
+ self.onExitCallback_ = callback
+ elseif "enterTransitionFinish" == eventName then
+ self.onEnterTransitionFinishCallback_ = callback
+ elseif "exitTransitionStart" == eventName then
+ self.onExitTransitionStartCallback_ = callback
+ elseif "cleanup" == eventName then
+ self.onCleanupCallback_ = callback
+ end
+ self:enableNodeEvents()
+end
+
+function Node:enableNodeEvents()
+ if self.isNodeEventEnabled_ then
+ return self
+ end
+
+ self:registerScriptHandler(function(state)
+ if state == "enter" then
+ self:onEnter_()
+ elseif state == "exit" then
+ self:onExit_()
+ elseif state == "enterTransitionFinish" then
+ self:onEnterTransitionFinish_()
+ elseif state == "exitTransitionStart" then
+ self:onExitTransitionStart_()
+ elseif state == "cleanup" then
+ self:onCleanup_()
+ end
+ end)
+ self.isNodeEventEnabled_ = true
+
+ return self
+end
+
+function Node:disableNodeEvents()
+ self:unregisterScriptHandler()
+ self.isNodeEventEnabled_ = false
+ return self
+end
+
+
+function Node:onEnter()
+end
+
+function Node:onExit()
+end
+
+function Node:onEnterTransitionFinish()
+end
+
+function Node:onExitTransitionStart()
+end
+
+function Node:onCleanup()
+end
+
+function Node:onEnter_()
+ self:onEnter()
+ if not self.onEnterCallback_ then
+ return
+ end
+ self:onEnterCallback_()
+end
+
+function Node:onExit_()
+ self:onExit()
+ if not self.onExitCallback_ then
+ return
+ end
+ self:onExitCallback_()
+end
+
+function Node:onEnterTransitionFinish_()
+ self:onEnterTransitionFinish()
+ if not self.onEnterTransitionFinishCallback_ then
+ return
+ end
+ self:onEnterTransitionFinishCallback_()
+end
+
+function Node:onExitTransitionStart_()
+ self:onExitTransitionStart()
+ if not self.onExitTransitionStartCallback_ then
+ return
+ end
+ self:onExitTransitionStartCallback_()
+end
+
+function Node:onCleanup_()
+ self:onCleanup()
+ if not self.onCleanupCallback_ then
+ return
+ end
+ self:onCleanupCallback_()
+end
diff --git a/simulator/win32/src/cocos/framework/extends/SpriteEx.lua b/simulator/win32/src/cocos/framework/extends/SpriteEx.lua
new file mode 100644
index 0000000..0f1c8f7
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/SpriteEx.lua
@@ -0,0 +1,67 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Sprite = cc.Sprite
+
+function Sprite:playAnimationOnce(animation, args)
+ local actions = {}
+
+ local showDelay = args.showDelay or 0
+ if showDelay then
+ self:setVisible(false)
+ actions[#actions + 1] = cc.DelayTime:create(showDelay)
+ actions[#actions + 1] = cc.Show:create()
+ end
+
+ local delay = args.delay or 0
+ if delay > 0 then
+ actions[#actions + 1] = cc.DelayTime:create(delay)
+ end
+
+ actions[#actions + 1] = cc.Animate:create(animation)
+
+ if args.removeSelf then
+ actions[#actions + 1] = cc.RemoveSelf:create()
+ end
+
+ if args.onComplete then
+ actions[#actions + 1] = cc.CallFunc:create(args.onComplete)
+ end
+
+ local action
+ if #actions > 1 then
+ action = cc.Sequence:create(actions)
+ else
+ action = actions[1]
+ end
+ self:runAction(action)
+ return action
+end
+
+function Sprite:playAnimationForever(animation)
+ local animate = cc.Animate:create(animation)
+ local action = cc.RepeatForever:create(animate)
+ self:runAction(action)
+ return action
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UICheckBox.lua b/simulator/win32/src/cocos/framework/extends/UICheckBox.lua
new file mode 100644
index 0000000..0707f82
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UICheckBox.lua
@@ -0,0 +1,40 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local CheckBox = ccui.CheckBox
+
+function CheckBox:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "selected"
+ else
+ event.name = "unselected"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UIEditBox.lua b/simulator/win32/src/cocos/framework/extends/UIEditBox.lua
new file mode 100644
index 0000000..11b39ba
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UIEditBox.lua
@@ -0,0 +1,41 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local EditBox = ccui.EditBox
+
+function EditBox:onEditHandler(callback)
+ self:registerScriptEditBoxHandler(function(name, sender)
+ local event = {}
+ event.name = name
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+function EditBox:removeEditHandler()
+ self:unregisterScriptEditBoxHandler()
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UIListView.lua b/simulator/win32/src/cocos/framework/extends/UIListView.lua
new file mode 100644
index 0000000..cab47a9
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UIListView.lua
@@ -0,0 +1,68 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local ListView = ccui.ListView
+
+function ListView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ON_SELECTED_ITEM_START"
+ else
+ event.name = "ON_SELECTED_ITEM_END"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+function ListView:onScroll(callback)
+ self:addScrollViewEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "SCROLL_TO_TOP"
+ elseif eventType == 1 then
+ event.name = "SCROLL_TO_BOTTOM"
+ elseif eventType == 2 then
+ event.name = "SCROLL_TO_LEFT"
+ elseif eventType == 3 then
+ event.name = "SCROLL_TO_RIGHT"
+ elseif eventType == 4 then
+ event.name = "SCROLLING"
+ elseif eventType == 5 then
+ event.name = "BOUNCE_TOP"
+ elseif eventType == 6 then
+ event.name = "BOUNCE_BOTTOM"
+ elseif eventType == 7 then
+ event.name = "BOUNCE_LEFT"
+ elseif eventType == 8 then
+ event.name = "BOUNCE_RIGHT"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UIPageView.lua b/simulator/win32/src/cocos/framework/extends/UIPageView.lua
new file mode 100644
index 0000000..42c0c9f
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UIPageView.lua
@@ -0,0 +1,38 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local PageView = ccui.PageView
+
+function PageView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "TURNING"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UIScrollView.lua b/simulator/win32/src/cocos/framework/extends/UIScrollView.lua
new file mode 100644
index 0000000..601faf9
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UIScrollView.lua
@@ -0,0 +1,56 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local ScrollView = ccui.ScrollView
+
+function ScrollView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "SCROLL_TO_TOP"
+ elseif eventType == 1 then
+ event.name = "SCROLL_TO_BOTTOM"
+ elseif eventType == 2 then
+ event.name = "SCROLL_TO_LEFT"
+ elseif eventType == 3 then
+ event.name = "SCROLL_TO_RIGHT"
+ elseif eventType == 4 then
+ event.name = "SCROLLING"
+ elseif eventType == 5 then
+ event.name = "BOUNCE_TOP"
+ elseif eventType == 6 then
+ event.name = "BOUNCE_BOTTOM"
+ elseif eventType == 7 then
+ event.name = "BOUNCE_LEFT"
+ elseif eventType == 8 then
+ event.name = "BOUNCE_RIGHT"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+ScrollView.onScroll = ScrollView.onEvent
diff --git a/simulator/win32/src/cocos/framework/extends/UISlider.lua b/simulator/win32/src/cocos/framework/extends/UISlider.lua
new file mode 100644
index 0000000..68109b5
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UISlider.lua
@@ -0,0 +1,38 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Slider = ccui.Slider
+
+function Slider:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ON_PERCENTAGE_CHANGED"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UITextField.lua b/simulator/win32/src/cocos/framework/extends/UITextField.lua
new file mode 100644
index 0000000..2574333
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UITextField.lua
@@ -0,0 +1,44 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local TextField = ccui.TextField
+
+function TextField:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ATTACH_WITH_IME"
+ elseif eventType == 1 then
+ event.name = "DETACH_WITH_IME"
+ elseif eventType == 2 then
+ event.name = "INSERT_TEXT"
+ elseif eventType == 3 then
+ event.name = "DELETE_BACKWARD"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/extends/UIWidget.lua b/simulator/win32/src/cocos/framework/extends/UIWidget.lua
new file mode 100644
index 0000000..59754d6
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/extends/UIWidget.lua
@@ -0,0 +1,43 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Widget = ccui.Widget
+
+function Widget:onTouch(callback)
+ self:addTouchEventListener(function(sender, state)
+ local event = {x = 0, y = 0}
+ if state == 0 then
+ event.name = "began"
+ elseif state == 1 then
+ event.name = "moved"
+ elseif state == 2 then
+ event.name = "ended"
+ else
+ event.name = "cancelled"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/simulator/win32/src/cocos/framework/init.lua b/simulator/win32/src/cocos/framework/init.lua
new file mode 100644
index 0000000..89a7672
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/init.lua
@@ -0,0 +1,82 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+if type(DEBUG) ~= "number" then DEBUG = 0 end
+
+-- load framework
+printInfo("")
+printInfo("# DEBUG = " .. DEBUG)
+printInfo("#")
+
+device = require("cocos.framework.device")
+display = require("cocos.framework.display")
+audio = require("cocos.framework.audio")
+transition = require("cocos.framework.transition")
+
+require("cocos.framework.extends.NodeEx")
+require("cocos.framework.extends.SpriteEx")
+require("cocos.framework.extends.LayerEx")
+require("cocos.framework.extends.MenuEx")
+
+if ccui then
+require("cocos.framework.extends.UIWidget")
+require("cocos.framework.extends.UICheckBox")
+require("cocos.framework.extends.UIEditBox")
+require("cocos.framework.extends.UIListView")
+require("cocos.framework.extends.UIPageView")
+require("cocos.framework.extends.UIScrollView")
+require("cocos.framework.extends.UISlider")
+require("cocos.framework.extends.UITextField")
+end
+
+require("cocos.framework.package_support")
+
+-- register the build-in packages
+cc.register("event", require("cocos.framework.components.event"))
+
+-- export global variable
+local __g = _G
+cc.exports = {}
+setmetatable(cc.exports, {
+ __newindex = function(_, name, value)
+ rawset(__g, name, value)
+ end,
+
+ __index = function(_, name)
+ return rawget(__g, name)
+ end
+})
+
+-- disable create unexpected global variable
+function cc.disable_global()
+ setmetatable(__g, {
+ __newindex = function(_, name, value)
+ error(string.format("USE \" cc.exports.%s = value \" INSTEAD OF SET GLOBAL VARIABLE", name), 0)
+ end
+ })
+end
+
+if CC_DISABLE_GLOBAL then
+ cc.disable_global()
+end
diff --git a/simulator/win32/src/cocos/framework/package_support.lua b/simulator/win32/src/cocos/framework/package_support.lua
new file mode 100644
index 0000000..e5c5e14
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/package_support.lua
@@ -0,0 +1,113 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+-- Cocos2d-Lua core functions
+cc.loaded_packages = {}
+local loaded_packages = cc.loaded_packages
+
+function cc.register(name, package)
+ cc.loaded_packages[name] = package
+end
+
+function cc.load(...)
+ local names = {...}
+ assert(#names > 0, "cc.load() - invalid package names")
+
+ local packages = {}
+ for _, name in ipairs(names) do
+ assert(type(name) == "string", string.format("cc.load() - invalid package name \"%s\"", tostring(name)))
+ if not loaded_packages[name] then
+ local packageName = string.format("packages.%s.init", name)
+ local cls = require(packageName)
+ assert(cls, string.format("cc.load() - package class \"%s\" load failed", packageName))
+ loaded_packages[name] = cls
+
+ if DEBUG > 1 then
+ printInfo("cc.load() - load module \"packages.%s.init\"", name)
+ end
+ end
+ packages[#packages + 1] = loaded_packages[name]
+ end
+ return unpack(packages)
+end
+
+local load_ = cc.load
+local bind_
+bind_ = function(target, ...)
+ local t = type(target)
+ assert(t == "table" or t == "userdata", string.format("cc.bind() - invalid target, expected is object, actual is %s", t))
+ local names = {...}
+ assert(#names > 0, "cc.bind() - package names expected")
+
+ load_(...)
+ if not target.components_ then target.components_ = {} end
+ for _, name in ipairs(names) do
+ assert(type(name) == "string" and name ~= "", string.format("cc.bind() - invalid package name \"%s\"", name))
+ if not target.components_[name] then
+ local cls = loaded_packages[name]
+ for __, depend in ipairs(cls.depends or {}) do
+ if not target.components_[depend] then
+ bind_(target, depend)
+ end
+ end
+ local component = cls:create()
+ target.components_[name] = component
+ component:bind(target)
+ end
+ end
+
+ return target
+end
+cc.bind = bind_
+
+function cc.unbind(target, ...)
+ if not target.components_ then return end
+
+ local names = {...}
+ assert(#names > 0, "cc.unbind() - invalid package names")
+
+ for _, name in ipairs(names) do
+ assert(type(name) == "string" and name ~= "", string.format("cc.unbind() - invalid package name \"%s\"", name))
+ local component = target.components_[name]
+ assert(component, string.format("cc.unbind() - component \"%s\" not found", tostring(name)))
+ component:unbind(target)
+ target.components_[name] = nil
+ end
+ return target
+end
+
+function cc.setmethods(target, component, methods)
+ for _, name in ipairs(methods) do
+ local method = component[name]
+ target[name] = function(__, ...)
+ return method(component, ...)
+ end
+ end
+end
+
+function cc.unsetmethods(target, methods)
+ for _, name in ipairs(methods) do
+ target[name] = nil
+ end
+end
diff --git a/simulator/win32/src/cocos/framework/transition.lua b/simulator/win32/src/cocos/framework/transition.lua
new file mode 100644
index 0000000..78c4412
--- /dev/null
+++ b/simulator/win32/src/cocos/framework/transition.lua
@@ -0,0 +1,213 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local transition = {}
+
+local ACTION_EASING = {}
+ACTION_EASING["BACKIN"] = {cc.EaseBackIn, 1}
+ACTION_EASING["BACKINOUT"] = {cc.EaseBackInOut, 1}
+ACTION_EASING["BACKOUT"] = {cc.EaseBackOut, 1}
+ACTION_EASING["BOUNCE"] = {cc.EaseBounce, 1}
+ACTION_EASING["BOUNCEIN"] = {cc.EaseBounceIn, 1}
+ACTION_EASING["BOUNCEINOUT"] = {cc.EaseBounceInOut, 1}
+ACTION_EASING["BOUNCEOUT"] = {cc.EaseBounceOut, 1}
+ACTION_EASING["ELASTIC"] = {cc.EaseElastic, 2, 0.3}
+ACTION_EASING["ELASTICIN"] = {cc.EaseElasticIn, 2, 0.3}
+ACTION_EASING["ELASTICINOUT"] = {cc.EaseElasticInOut, 2, 0.3}
+ACTION_EASING["ELASTICOUT"] = {cc.EaseElasticOut, 2, 0.3}
+ACTION_EASING["EXPONENTIALIN"] = {cc.EaseExponentialIn, 1}
+ACTION_EASING["EXPONENTIALINOUT"] = {cc.EaseExponentialInOut, 1}
+ACTION_EASING["EXPONENTIALOUT"] = {cc.EaseExponentialOut, 1}
+ACTION_EASING["IN"] = {cc.EaseIn, 2, 1}
+ACTION_EASING["INOUT"] = {cc.EaseInOut, 2, 1}
+ACTION_EASING["OUT"] = {cc.EaseOut, 2, 1}
+ACTION_EASING["RATEACTION"] = {cc.EaseRateAction, 2, 1}
+ACTION_EASING["SINEIN"] = {cc.EaseSineIn, 1}
+ACTION_EASING["SINEINOUT"] = {cc.EaseSineInOut, 1}
+ACTION_EASING["SINEOUT"] = {cc.EaseSineOut, 1}
+
+local actionManager = cc.Director:getInstance():getActionManager()
+
+function transition.newEasing(action, easingName, more)
+ local key = string.upper(tostring(easingName))
+ local easing
+ if ACTION_EASING[key] then
+ local cls, count, default = unpack(ACTION_EASING[key])
+ if count == 2 then
+ easing = cls:create(action, more or default)
+ else
+ easing = cls:create(action)
+ end
+ end
+ return easing or action
+end
+
+function transition.create(action, args)
+ args = checktable(args)
+ if args.easing then
+ if type(args.easing) == "table" then
+ action = transition.newEasing(action, unpack(args.easing))
+ else
+ action = transition.newEasing(action, args.easing)
+ end
+ end
+
+ local actions = {}
+ local delay = checknumber(args.delay)
+ if delay > 0 then
+ actions[#actions + 1] = cc.DelayTime:create(delay)
+ end
+ actions[#actions + 1] = action
+
+ local onComplete = args.onComplete
+ if type(onComplete) ~= "function" then onComplete = nil end
+ if onComplete then
+ actions[#actions + 1] = cc.CallFunc:create(onComplete)
+ end
+
+ if args.removeSelf then
+ actions[#actions + 1] = cc.RemoveSelf:create()
+ end
+
+ if #actions > 1 then
+ return transition.sequence(actions)
+ else
+ return actions[1]
+ end
+end
+
+function transition.execute(target, action, args)
+ assert(not tolua.isnull(target), "transition.execute() - target is not cc.Node")
+ local action = transition.create(action, args)
+ target:runAction(action)
+ return action
+end
+
+function transition.moveTo(target, args)
+ assert(not tolua.isnull(target), "transition.moveTo() - target is not cc.Node")
+ local x = args.x or target:getPositionX()
+ local y = args.y or target:getPositionY()
+ local action = cc.MoveTo:create(args.time, cc.p(x, y))
+ return transition.execute(target, action, args)
+end
+
+function transition.moveBy(target, args)
+ assert(not tolua.isnull(target), "transition.moveBy() - target is not cc.Node")
+ local x = args.x or 0
+ local y = args.y or 0
+ local action = cc.MoveBy:create(args.time, cc.p(x, y))
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeIn(target, args)
+ assert(not tolua.isnull(target), "transition.fadeIn() - target is not cc.Node")
+ local action = cc.FadeIn:create(args.time)
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeOut(target, args)
+ assert(not tolua.isnull(target), "transition.fadeOut() - target is not cc.Node")
+ local action = cc.FadeOut:create(args.time)
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeTo(target, args)
+ assert(not tolua.isnull(target), "transition.fadeTo() - target is not cc.Node")
+ local opacity = checkint(args.opacity)
+ if opacity < 0 then
+ opacity = 0
+ elseif opacity > 255 then
+ opacity = 255
+ end
+ local action = cc.FadeTo:create(args.time, opacity)
+ return transition.execute(target, action, args)
+end
+
+function transition.scaleTo(target, args)
+ assert(not tolua.isnull(target), "transition.scaleTo() - target is not cc.Node")
+ local action
+ if args.scale then
+ action = cc.ScaleTo:create(checknumber(args.time), checknumber(args.scale))
+ elseif args.scaleX or args.scaleY then
+ local scaleX, scaleY
+ if args.scaleX then
+ scaleX = checknumber(args.scaleX)
+ else
+ scaleX = target:getScaleX()
+ end
+ if args.scaleY then
+ scaleY = checknumber(args.scaleY)
+ else
+ scaleY = target:getScaleY()
+ end
+ action = cc.ScaleTo:create(checknumber(args.time), scaleX, scaleY)
+ end
+ return transition.execute(target, action, args)
+end
+
+function transition.rotateTo(target, args)
+ assert(not tolua.isnull(target), "transition.rotateTo() - target is not cc.Node")
+ local rotation = args.rotation or target:getRotation()
+ local action = cc.RotateTo:create(args.time, rotation)
+ return transition.execute(target, action, args)
+end
+
+function transition.rotateBy(target, args)
+ assert(not tolua.isnull(target), "transition.rotateTo() - target is not cc.Node")
+ local rotation = args.rotation or 0
+ local action = cc.RotateBy:create(args.time, rotation)
+ return transition.execute(target, action, args)
+end
+
+function transition.sequence(actions)
+ if #actions < 1 then return end
+ if #actions < 2 then return actions[1] end
+ return cc.Sequence:create(actions)
+end
+
+function transition.removeAction(action)
+ if not tolua.isnull(action) then
+ actionManager:removeAction(action)
+ end
+end
+
+function transition.stopTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:removeAllActionsFromTarget(target)
+ end
+end
+
+function transition.pauseTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:pauseTarget(target)
+ end
+end
+
+function transition.resumeTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:resumeTarget(target)
+ end
+end
+
+return transition
diff --git a/simulator/win32/src/cocos/init.lua b/simulator/win32/src/cocos/init.lua
new file mode 100644
index 0000000..92fc120
--- /dev/null
+++ b/simulator/win32/src/cocos/init.lua
@@ -0,0 +1,109 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+require "cocos.cocos2d.Cocos2d"
+require "cocos.cocos2d.Cocos2dConstants"
+require "cocos.cocos2d.functions"
+
+__G__TRACKBACK__ = function(msg)
+ local msg = debug.traceback(msg, 3)
+ print(msg)
+ return msg
+end
+
+-- opengl
+require "cocos.cocos2d.Opengl"
+require "cocos.cocos2d.OpenglConstants"
+-- audio
+require "cocos.cocosdenshion.AudioEngine"
+-- cocosstudio
+if nil ~= ccs then
+ require "cocos.cocostudio.CocoStudio"
+end
+-- ui
+if nil ~= ccui then
+ require "cocos.ui.GuiConstants"
+ require "cocos.ui.experimentalUIConstants"
+end
+
+-- extensions
+require "cocos.extension.ExtensionConstants"
+-- network
+require "cocos.network.NetworkConstants"
+-- Spine
+if nil ~= sp then
+ require "cocos.spine.SpineConstants"
+end
+
+require "cocos.cocos2d.deprecated"
+require "cocos.cocos2d.DrawPrimitives"
+
+-- Lua extensions
+require "cocos.cocos2d.bitExtend"
+
+-- CCLuaEngine
+require "cocos.cocos2d.DeprecatedCocos2dClass"
+require "cocos.cocos2d.DeprecatedCocos2dEnum"
+require "cocos.cocos2d.DeprecatedCocos2dFunc"
+require "cocos.cocos2d.DeprecatedOpenglEnum"
+
+-- register_cocostudio_module
+if nil ~= ccs then
+ require "cocos.cocostudio.DeprecatedCocoStudioClass"
+ require "cocos.cocostudio.DeprecatedCocoStudioFunc"
+end
+
+
+-- register_cocosbuilder_module
+require "cocos.cocosbuilder.DeprecatedCocosBuilderClass"
+
+-- register_cocosdenshion_module
+require "cocos.cocosdenshion.DeprecatedCocosDenshionClass"
+require "cocos.cocosdenshion.DeprecatedCocosDenshionFunc"
+
+-- register_extension_module
+require "cocos.extension.DeprecatedExtensionClass"
+require "cocos.extension.DeprecatedExtensionEnum"
+require "cocos.extension.DeprecatedExtensionFunc"
+
+-- register_network_module
+require "cocos.network.DeprecatedNetworkClass"
+require "cocos.network.DeprecatedNetworkEnum"
+require "cocos.network.DeprecatedNetworkFunc"
+
+-- register_ui_moudle
+if nil ~= ccui then
+ require "cocos.ui.DeprecatedUIEnum"
+ require "cocos.ui.DeprecatedUIFunc"
+end
+
+-- cocosbuilder
+require "cocos.cocosbuilder.CCBReaderLoad"
+
+-- physics3d
+require "cocos.physics3d.physics3d-constants"
+
+if CC_USE_FRAMEWORK then
+ require "cocos.framework.init"
+end
diff --git a/simulator/win32/src/cocos/network/DeprecatedNetworkClass.lua b/simulator/win32/src/cocos/network/DeprecatedNetworkClass.lua
new file mode 100644
index 0000000..06e280b
--- /dev/null
+++ b/simulator/win32/src/cocos/network/DeprecatedNetworkClass.lua
@@ -0,0 +1,19 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+-- This is the DeprecatedNetworkClass
+
+DeprecatedNetworkClass = {} or DeprecatedNetworkClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--WebSocket class will be Deprecated,begin
+function DeprecatedNetworkClass.WebSocket()
+ deprecatedTip("WebSocket","cc.WebSocket")
+ return cc.WebSocket
+end
+_G["WebSocket"] = DeprecatedNetworkClass.WebSocket()
+--WebSocket class will be Deprecated,end
diff --git a/simulator/win32/src/cocos/network/DeprecatedNetworkEnum.lua b/simulator/win32/src/cocos/network/DeprecatedNetworkEnum.lua
new file mode 100644
index 0000000..da08d35
--- /dev/null
+++ b/simulator/win32/src/cocos/network/DeprecatedNetworkEnum.lua
@@ -0,0 +1,13 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+_G.kWebSocketScriptHandlerOpen = cc.WEBSOCKET_OPEN
+_G.kWebSocketScriptHandlerMessage = cc.WEBSOCKET_MESSAGE
+_G.kWebSocketScriptHandlerClose = cc.WEBSOCKET_CLOSE
+_G.kWebSocketScriptHandlerError = cc.WEBSOCKET_ERROR
+
+_G.kStateConnecting = cc.WEBSOCKET_STATE_CONNECTING
+_G.kStateOpen = cc.WEBSOCKET_STATE_OPEN
+_G.kStateClosing = cc.WEBSOCKET_STATE_CLOSING
+_G.kStateClosed = cc.WEBSOCKET_STATE_CLOSED
diff --git a/simulator/win32/src/cocos/network/DeprecatedNetworkFunc.lua b/simulator/win32/src/cocos/network/DeprecatedNetworkFunc.lua
new file mode 100644
index 0000000..f114392
--- /dev/null
+++ b/simulator/win32/src/cocos/network/DeprecatedNetworkFunc.lua
@@ -0,0 +1,27 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of WebSocket will be deprecated begin
+local targetPlatform = CCApplication:getInstance():getTargetPlatform()
+if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTargetAndroid == targetPlatform) or (kTargetWindows == targetPlatform) then
+ local WebSocketDeprecated = { }
+ function WebSocketDeprecated.sendTextMsg(self, string)
+ deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString")
+ return self:sendString(string)
+ end
+ WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg
+
+ function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize)
+ deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString")
+ string.char(unpack(table))
+ return self:sendString(string.char(unpack(table)))
+ end
+ WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg
+end
+--functions of WebSocket will be deprecated end
diff --git a/simulator/win32/src/cocos/network/NetworkConstants.lua b/simulator/win32/src/cocos/network/NetworkConstants.lua
new file mode 100644
index 0000000..ee18d55
--- /dev/null
+++ b/simulator/win32/src/cocos/network/NetworkConstants.lua
@@ -0,0 +1,19 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+cc.WEBSOCKET_OPEN = 0
+cc.WEBSOCKET_MESSAGE = 1
+cc.WEBSOCKET_CLOSE = 2
+cc.WEBSOCKET_ERROR = 3
+
+cc.WEBSOCKET_STATE_CONNECTING = 0
+cc.WEBSOCKET_STATE_OPEN = 1
+cc.WEBSOCKET_STATE_CLOSING = 2
+cc.WEBSOCKET_STATE_CLOSED = 3
+
+cc.XMLHTTPREQUEST_RESPONSE_STRING = 0
+cc.XMLHTTPREQUEST_RESPONSE_ARRAY_BUFFER = 1
+cc.XMLHTTPREQUEST_RESPONSE_BLOB = 2
+cc.XMLHTTPREQUEST_RESPONSE_DOCUMENT = 3
+cc.XMLHTTPREQUEST_RESPONSE_JSON = 4
diff --git a/simulator/win32/src/cocos/physics3d/physics3d-constants.lua b/simulator/win32/src/cocos/physics3d/physics3d-constants.lua
new file mode 100644
index 0000000..f33cef9
--- /dev/null
+++ b/simulator/win32/src/cocos/physics3d/physics3d-constants.lua
@@ -0,0 +1,17 @@
+if nil == cc.Physics3DComponent then
+ return
+end
+
+cc.Physics3DComponent.PhysicsSyncFlag =
+{
+ NONE = 0,
+ NODE_TO_PHYSICS = 1,
+ PHYSICS_TO_NODE = 2,
+ NODE_AND_NODE = 3,
+}
+
+cc.Physics3DObject.PhysicsObjType =
+{
+ UNKNOWN = 0,
+ RIGID_BODY = 1,
+}
\ No newline at end of file
diff --git a/simulator/win32/src/cocos/spine/SpineConstants.lua b/simulator/win32/src/cocos/spine/SpineConstants.lua
new file mode 100644
index 0000000..a7d7dfa
--- /dev/null
+++ b/simulator/win32/src/cocos/spine/SpineConstants.lua
@@ -0,0 +1,11 @@
+if nil == sp then
+ return
+end
+
+sp.EventType =
+{
+ ANIMATION_START = 0,
+ ANIMATION_END = 1,
+ ANIMATION_COMPLETE = 2,
+ ANIMATION_EVENT = 3,
+}
diff --git a/simulator/win32/src/cocos/ui/DeprecatedUIEnum.lua b/simulator/win32/src/cocos/ui/DeprecatedUIEnum.lua
new file mode 100644
index 0000000..ae7d63f
--- /dev/null
+++ b/simulator/win32/src/cocos/ui/DeprecatedUIEnum.lua
@@ -0,0 +1,94 @@
+if nil == ccui then
+ return
+end
+
+LAYOUT_COLOR_NONE = ccui.LayoutBackGroundColorType.none
+LAYOUT_COLOR_SOLID = ccui.LayoutBackGroundColorType.solid
+LAYOUT_COLOR_GRADIENT = ccui.LayoutBackGroundColorType.gradient
+
+LAYOUT_ABSOLUTE = ccui.LayoutType.ABSOLUTE
+LAYOUT_LINEAR_VERTICAL = ccui.LayoutType.VERTICAL
+LAYOUT_LINEAR_HORIZONTAL = ccui.LayoutType.HORIZONTAL
+LAYOUT_RELATIVE = ccui.LayoutType.RELATIVE
+
+BRIGHT_NONE = ccui.BrightStyle.none
+BRIGHT_NORMAL = ccui.BrightStyle.normal
+BRIGHT_HIGHLIGHT = ccui.BrightStyle.highlight
+
+UI_TEX_TYPE_LOCAL = ccui.TextureResType.localType
+UI_TEX_TYPE_PLIST = ccui.TextureResType.plistType
+
+TOUCH_EVENT_BEGAN = ccui.TouchEventType.began
+TOUCH_EVENT_MOVED = ccui.TouchEventType.moved
+TOUCH_EVENT_ENDED = ccui.TouchEventType.ended
+TOUCH_EVENT_CANCELED = ccui.TouchEventType.canceled
+
+SIZE_ABSOLUTE = ccui.SizeType.absolute
+SIZE_PERCENT = ccui.SizeType.percent
+
+POSITION_ABSOLUTE = ccui.PositionType.absolute
+POSITION_PERCENT = ccui.PositionType.percent
+
+CHECKBOX_STATE_EVENT_SELECTED = ccui.CheckBoxEventType.selected
+CHECKBOX_STATE_EVENT_UNSELECTED = ccui.CheckBoxEventType.unselected
+
+CHECKBOX_STATE_EVENT_SELECTED = ccui.CheckBoxEventType.selected
+CHECKBOX_STATE_EVENT_UNSELECTED = ccui.CheckBoxEventType.unselected
+
+LoadingBarTypeLeft = ccui.LoadingBarDirection.LEFT
+LoadingBarTypeRight = ccui.LoadingBarDirection.RIGHT
+
+LoadingBarTypeRight = ccui.SliderEventType.percent_changed
+
+TEXTFIELD_EVENT_ATTACH_WITH_IME = ccui.TextFiledEventType.attach_with_ime
+TEXTFIELD_EVENT_DETACH_WITH_IME = ccui.TextFiledEventType.detach_with_ime
+TEXTFIELD_EVENT_INSERT_TEXT = ccui.TextFiledEventType.insert_text
+TEXTFIELD_EVENT_DELETE_BACKWARD = ccui.TextFiledEventType.delete_backward
+
+SCROLLVIEW_EVENT_SCROLL_TO_TOP = ccui.ScrollViewDir.none
+SCROLLVIEW_DIR_VERTICAL = ccui.ScrollViewDir.vertical
+SCROLLVIEW_DIR_HORIZONTAL = ccui.ScrollViewDir.horizontal
+SCROLLVIEW_DIR_BOTH = ccui.ScrollViewDir.both
+
+SCROLLVIEW_EVENT_SCROLL_TO_TOP = ccui.ScrollviewEventType.scrollToTop
+SCROLLVIEW_EVENT_SCROLL_TO_BOTTOM = ccui.ScrollviewEventType.scrollToBottom
+SCROLLVIEW_EVENT_SCROLL_TO_LEFT = ccui.ScrollviewEventType.scrollToLeft
+SCROLLVIEW_EVENT_SCROLL_TO_RIGHT = ccui.ScrollviewEventType.scrollToRight
+SCROLLVIEW_EVENT_SCROLLING = ccui.ScrollviewEventType.scrolling
+SCROLLVIEW_EVENT_BOUNCE_TOP = ccui.ScrollviewEventType.bounceTop
+SCROLLVIEW_EVENT_BOUNCE_BOTTOM = ccui.ScrollviewEventType.bounceBottom
+SCROLLVIEW_EVENT_BOUNCE_LEFT = ccui.ScrollviewEventType.bounceLeft
+SCROLLVIEW_EVENT_BOUNCE_RIGHT = ccui.ScrollviewEventType.bounceRight
+
+PAGEVIEW_EVENT_TURNING = ccui.PageViewEventType.turning
+
+PAGEVIEW_TOUCHLEFT = ccui.PVTouchDir.touch_left
+PAGEVIEW_TOUCHRIGHT = ccui.PVTouchDir.touch_right
+
+LISTVIEW_DIR_NONE = ccui.ListViewDirection.none
+LISTVIEW_DIR_VERTICAL = ccui.ListViewDirection.vertical
+LISTVIEW_DIR_HORIZONTAL = ccui.ListViewDirection.horizontal
+
+LISTVIEW_MOVE_DIR_NONE = ccui.ListViewMoveDirection.none
+LISTVIEW_MOVE_DIR_UP = ccui.ListViewMoveDirection.up
+LISTVIEW_MOVE_DIR_DOWN = ccui.ListViewMoveDirection.down
+LISTVIEW_MOVE_DIR_LEFT = ccui.ListViewMoveDirection.left
+LISTVIEW_MOVE_DIR_RIGHT = ccui.ListViewMoveDirection.right
+
+LISTVIEW_EVENT_INIT_CHILD = ccui.ListViewEventType.init_child
+LISTVIEW_EVENT_UPDATE_CHILD = ccui.ListViewEventType.update_child
+
+LAYOUT_PARAMETER_NONE = ccui.LayoutParameterType.none
+LAYOUT_PARAMETER_LINEAR = ccui.LayoutParameterType.linear
+LAYOUT_PARAMETER_RELATIVE = ccui.LayoutParameterType.relative
+
+ccui.LoadingBarType = ccui.LoadingBarDirection
+ccui.LoadingBarType.left = ccui.LoadingBarDirection.LEFT
+ccui.LoadingBarType.right = ccui.LoadingBarDirection.RIGHT
+
+ccui.LayoutType.absolute = ccui.LayoutType.ABSOLUTE
+ccui.LayoutType.linearVertical = ccui.LayoutType.VERTICAL
+ccui.LayoutType.linearHorizontal = ccui.LayoutType.HORIZONTAL
+ccui.LayoutType.relative = ccui.LayoutType.RELATIVE
+
+ccui.ListViewEventType.onsSelectedItem = ccui.ListViewEventType.ONSELECTEDITEM_START
diff --git a/simulator/win32/src/cocos/ui/DeprecatedUIFunc.lua b/simulator/win32/src/cocos/ui/DeprecatedUIFunc.lua
new file mode 100644
index 0000000..52c5e2e
--- /dev/null
+++ b/simulator/win32/src/cocos/ui/DeprecatedUIFunc.lua
@@ -0,0 +1,183 @@
+if nil == ccui then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of ccui.Text will be deprecated begin
+local TextDeprecated = { }
+function TextDeprecated.setText(self, str)
+ deprecatedTip("ccui.Text:setText","ccui.Text:setString")
+ return self:setString(str)
+end
+ccui.Text.setText = TextDeprecated.setText
+
+function TextDeprecated.getStringValue(self)
+ deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString")
+ return self:getString()
+end
+ccui.Text.getStringValue = TextDeprecated.getStringValue
+
+--functions of ccui.Text will be deprecated begin
+
+--functions of ccui.TextAtlas will be deprecated begin
+local TextAtlasDeprecated = { }
+function TextAtlasDeprecated.setStringValue(self, str)
+ deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString")
+ return self:setString(str)
+end
+ccui.TextAtlas.setStringValue = TextAtlasDeprecated.setStringValue
+
+function TextAtlasDeprecated.getStringValue(self)
+ deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString")
+ return self:getString()
+end
+ccui.TextAtlas.getStringValue = TextAtlasDeprecated.getStringValue
+--functions of ccui.TextAtlas will be deprecated begin
+
+
+--functions of ccui.TextBMFont will be deprecated begin
+local TextBMFontDeprecated = { }
+function TextBMFontDeprecated.setText(self, str)
+ deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString")
+ return self:setString(str)
+end
+ccui.TextBMFont.setText = TextBMFontDeprecated.setText
+
+function TextBMFontDeprecated.getStringValue(self)
+ deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString")
+ return self:getString()
+end
+ccui.Text.getStringValue = TextBMFontDeprecated.getStringValue
+--functions of ccui.TextBMFont will be deprecated begin
+
+--functions of cc.ShaderCache will be deprecated begin
+local ShaderCacheDeprecated = { }
+function ShaderCacheDeprecated.getProgram(self,strShader)
+ deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram")
+ return self:getGLProgram(strShader)
+end
+cc.ShaderCache.getProgram = ShaderCacheDeprecated.getProgram
+--functions of ccui.TextBMFont will be deprecated begin
+
+--functions of ccui.Widget will be deprecated begin
+local UIWidgetDeprecated = { }
+function UIWidgetDeprecated.getLeftInParent(self)
+ deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary")
+ return self:getLeftBoundary()
+end
+ccui.Widget.getLeftInParent = UIWidgetDeprecated.getLeftInParent
+
+function UIWidgetDeprecated.getBottomInParent(self)
+ deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary")
+ return self:getBottomBoundary()
+end
+ccui.Widget.getBottomInParent = UIWidgetDeprecated.getBottomInParent
+
+function UIWidgetDeprecated.getRightInParent(self)
+ deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary")
+ return self:getRightBoundary()
+end
+ccui.Widget.getRightInParent = UIWidgetDeprecated.getRightInParent
+
+function UIWidgetDeprecated.getTopInParent(self)
+ deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary")
+ return self:getTopBoundary()
+end
+ccui.Widget.getTopInParent = UIWidgetDeprecated.getTopInParent
+
+function UIWidgetDeprecated.getSize(self)
+ deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize")
+ return self:getContentSize()
+end
+ccui.Widget.getSize = UIWidgetDeprecated.getSize
+
+function UIWidgetDeprecated.setSize(self, ...)
+ deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize")
+ return self:setContentSize(...)
+end
+ccui.Widget.setSize = UIWidgetDeprecated.setSize
+
+--functions of ccui.Widget will be deprecated end
+
+--functions of ccui.CheckBox will be deprecated begin
+local UICheckBoxDeprecated = { }
+function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler)
+ deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.CheckBox.addEventListenerCheckBox = UICheckBoxDeprecated.addEventListenerCheckBox
+
+function UICheckBoxDeprecated.setSelectedState(self,flag)
+ deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected")
+ return self:setSelected(flag)
+end
+ccui.CheckBox.setSelectedState = UICheckBoxDeprecated.setSelectedState
+
+function UICheckBoxDeprecated.getSelectedState(self)
+ deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected")
+ return self:getSelected()
+end
+ccui.CheckBox.getSelectedState = UICheckBoxDeprecated.setSelectedState
+
+--functions of ccui.CheckBox will be deprecated end
+
+--functions of ccui.Slider will be deprecated begin
+local UISliderDeprecated = { }
+function UISliderDeprecated.addEventListenerSlider(self,handler)
+ deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.Slider.addEventListenerSlider = UISliderDeprecated.addEventListenerSlider
+--functions of ccui.Slider will be deprecated end
+
+--functions of ccui.TextField will be deprecated begin
+local UITextFieldDeprecated = { }
+function UITextFieldDeprecated.addEventListenerTextField(self,handler)
+ deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.TextField.addEventListenerTextField = UITextFieldDeprecated.addEventListenerTextField
+
+function UITextFieldDeprecated.setText(self, str)
+ deprecatedTip("ccui.TextField:setText","ccui.TextField:setString")
+ return self:setString(str)
+end
+ccui.TextField.setText = UITextFieldDeprecated.setText
+
+function UITextFieldDeprecated.getStringValue(self)
+ deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString")
+ return self:getString()
+end
+ccui.TextField.getStringValue = UITextFieldDeprecated.getStringValue
+--functions of ccui.TextField will be deprecated end
+
+--functions of ccui.PageView will be deprecated begin
+local UIPageViewDeprecated = { }
+function UIPageViewDeprecated.addEventListenerPageView(self,handler)
+ deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView
+--functions of ccui.PageView will be deprecated end
+
+--functions of ccui.ScrollView will be deprecated begin
+local UIScrollViewDeprecated = { }
+function UIScrollViewDeprecated.addEventListenerScrollView(self,handler)
+ deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.ScrollView.addEventListenerScrollView = UIScrollViewDeprecated.addEventListenerScrollView
+--functions of ccui.ScrollView will be deprecated end
+
+--functions of ccui.ListView will be deprecated begin
+local UIListViewDeprecated = { }
+function UIListViewDeprecated.addEventListenerListView(self,handler)
+ deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView
+--functions of ccui.ListView will be deprecated end
diff --git a/simulator/win32/src/cocos/ui/GuiConstants.lua b/simulator/win32/src/cocos/ui/GuiConstants.lua
new file mode 100644
index 0000000..3a522ff
--- /dev/null
+++ b/simulator/win32/src/cocos/ui/GuiConstants.lua
@@ -0,0 +1,218 @@
+if nil == ccui then
+ return
+end
+
+ccui.BrightStyle =
+{
+ none = -1,
+ normal = 0,
+ highlight = 1,
+}
+
+ccui.TextureResType =
+{
+ localType = 0,
+ plistType = 1,
+}
+
+ccui.TouchEventType =
+{
+ began = 0,
+ moved = 1,
+ ended = 2,
+ canceled = 3,
+}
+
+ccui.SizeType =
+{
+ absolute = 0,
+ percent = 1,
+}
+
+ccui.PositionType = {
+ absolute = 0,
+ percent = 1,
+}
+
+ccui.CheckBoxEventType =
+{
+ selected = 0,
+ unselected = 1,
+}
+
+ccui.RadioButtonEventType=
+{
+ selected = 0,
+ unselected = 1
+}
+
+ccui.RadioButtonGroupEventType=
+{
+ select_changed = 0
+}
+
+ccui.TextFiledEventType =
+{
+ attach_with_ime = 0,
+ detach_with_ime = 1,
+ insert_text = 2,
+ delete_backward = 3,
+}
+
+ccui.LayoutBackGroundColorType =
+{
+ none = 0,
+ solid = 1,
+ gradient = 2,
+}
+
+ccui.LayoutType =
+{
+ ABSOLUTE = 0,
+ VERTICAL = 1,
+ HORIZONTAL = 2,
+ RELATIVE = 3,
+}
+
+ccui.LayoutParameterType =
+{
+ none = 0,
+ linear = 1,
+ relative = 2,
+}
+
+ccui.LinearGravity =
+{
+ none = 0,
+ left = 1,
+ top = 2,
+ right = 3,
+ bottom = 4,
+ centerVertical = 5,
+ centerHorizontal = 6,
+}
+
+ccui.RelativeAlign =
+{
+ alignNone = 0,
+ alignParentTopLeft = 1,
+ alignParentTopCenterHorizontal = 2,
+ alignParentTopRight = 3,
+ alignParentLeftCenterVertical = 4,
+ centerInParent = 5,
+ alignParentRightCenterVertical = 6,
+ alignParentLeftBottom = 7,
+ alignParentBottomCenterHorizontal = 8,
+ alignParentRightBottom = 9,
+ locationAboveLeftAlign = 10,
+ locationAboveCenter = 11,
+ locationAboveRightAlign = 12,
+ locationLeftOfTopAlign = 13,
+ locationLeftOfCenter = 14,
+ locationLeftOfBottomAlign = 15,
+ locationRightOfTopAlign = 16,
+ locationRightOfCenter = 17,
+ locationRightOfBottomAlign = 18,
+ locationBelowLeftAlign = 19,
+ locationBelowCenter = 20,
+ locationBelowRightAlign = 21,
+}
+
+ccui.SliderEventType = {
+ percentChanged = 0,
+ slideBallDown = 1,
+ slideBallUp = 2,
+ slideBallCancel = 3
+}
+
+ccui.LoadingBarDirection = { LEFT = 0, RIGHT = 1}
+
+ccui.ScrollViewDir = {
+ none = 0,
+ vertical = 1,
+ horizontal = 2,
+ both = 3,
+}
+
+ccui.ScrollViewMoveDir = {
+ none = 0,
+ up = 1,
+ down = 2,
+ left = 3,
+ right = 4,
+}
+
+ccui.ScrollviewEventType = {
+ scrollToTop = 0,
+ scrollToBottom = 1,
+ scrollToLeft = 2,
+ scrollToRight = 3,
+ scrolling = 4,
+ bounceTop = 5,
+ bounceBottom = 6,
+ bounceLeft = 7,
+ bounceRight = 8,
+}
+
+ccui.ListViewDirection = {
+ none = 0,
+ vertical = 1,
+ horizontal = 2,
+}
+
+ccui.ListViewMoveDirection = {
+ none = 0,
+ up = 1,
+ down = 2,
+ left = 3,
+ right = 4,
+}
+
+ccui.ListViewEventType = {
+ ONSELECTEDITEM_START = 0,
+ ONSELECTEDITEM_END = 1,
+}
+
+ccui.PageViewEventType = {
+ turning = 0,
+}
+
+ccui.PageViewDirection = {
+ HORIZONTAL = 0,
+ VERTICAL = 1
+}
+
+ccui.PVTouchDir = {
+ touchLeft = 0,
+ touchRight = 1,
+ touchUp = 2,
+ touchDown = 3
+}
+
+ccui.ListViewGravity = {
+ left = 0,
+ right = 1,
+ centerHorizontal = 2,
+ top = 3,
+ bottom = 4 ,
+ centerVertical = 5,
+}
+
+ccui.TextType = {
+ SYSTEM = 0,
+ TTF = 1,
+}
+
+ccui.LayoutComponent.HorizontalEdge = {
+ None = 0,
+ Left = 1,
+ Right = 2,
+ Center = 3,
+}
+
+ccui.LayoutComponent.VerticalEdge = {
+ None = 0,
+ Bottom = 1,
+ Top = 2,
+ Center = 3,
+}
diff --git a/simulator/win32/src/cocos/ui/experimentalUIConstants.lua b/simulator/win32/src/cocos/ui/experimentalUIConstants.lua
new file mode 100644
index 0000000..b2bcc05
--- /dev/null
+++ b/simulator/win32/src/cocos/ui/experimentalUIConstants.lua
@@ -0,0 +1,10 @@
+if nil == ccexp then
+ return
+end
+
+ccexp.VideoPlayerEvent = {
+ PLAYING = 0,
+ PAUSED = 1,
+ STOPPED= 2,
+ COMPLETED =3,
+}
diff --git a/simulator/win32/src/config.lua b/simulator/win32/src/config.lua
new file mode 100644
index 0000000..2a7389f
--- /dev/null
+++ b/simulator/win32/src/config.lua
@@ -0,0 +1,26 @@
+
+-- 0 - disable debug info, 1 - less debug info, 2 - verbose debug info
+DEBUG = 2
+
+-- use framework, will disable all deprecated API, false - use legacy API
+CC_USE_FRAMEWORK = true
+
+-- show FPS on screen
+CC_SHOW_FPS = true
+
+-- disable create unexpected global variable
+CC_DISABLE_GLOBAL = true
+
+-- for module display
+CC_DESIGN_RESOLUTION = {
+ width = 960,
+ height = 640,
+ autoscale = "SHOW_ALL",
+ callback = function(framesize)
+ local ratio = framesize.width / framesize.height
+ if ratio <= 1.34 then
+ -- iPad 768*1024(1536*2048) is 4:3 screen
+ return {autoscale = "SHOW_ALL"}
+ end
+ end
+}
diff --git a/simulator/win32/src/main.lua b/simulator/win32/src/main.lua
new file mode 100644
index 0000000..403dc79
--- /dev/null
+++ b/simulator/win32/src/main.lua
@@ -0,0 +1,87 @@
+local breakSocketHandle,debugXpCall
+local luaIdeDebug = true
+if luaIdeDebug == true then
+ breakSocketHandle,debugXpCall = require("LuaIdeDebug.LuaDebugjit")("localhost",7003)
+ cc.Director:getInstance():getScheduler():scheduleScriptFunc(breakSocketHandle, 0.3, false)
+end
+cc.FileUtils:getInstance():setPopupNotify(false)
+cc.FileUtils:getInstance():addSearchPath("src/")
+cc.FileUtils:getInstance():addSearchPath("res/")
+
+require "config"
+require "cocos.init"
+
+local function main()
+ require("app.MyApp"):create():run()
+end
+
+if ST_MYPROJECT_ISLOG then
+ --清除日志记录
+ local function clearLog()
+ local date = os.date("%Y-%m-%d %H:%M:%S")
+
+ local file = io.open('print_log.txt', "w")
+ io.output(file)
+ io.write("["..date.."]")
+ io.close(file)
+ end
+ --打印日志
+ local function printLog()
+ _print = print
+ function print( ... )
+ -- 写日志文件
+ local tableP = { ... }
+ local filename = "print_log.txt"
+ local file
+ file = io.open(filename,"a")
+ io.output(file)
+ for i, v in pairs(tableP) do
+ if type(v) == "boolean" then
+ if v then v = "true" else v = "false" end
+ io.write(v)
+ io.write('\n')
+ elseif type(v) == "userdata" then
+ elseif type(v) == "table" then
+ elseif type(v) == "function" then
+ else
+ io.write(v)
+ io.write('\n')
+ end
+ end
+ file:close()
+ _print(...)
+ end
+ end
+ clearLog()
+ printLog()
+end
+
+
+function __G__TRACKBACK__(errorMessage)
+ if luaIdeDebug == true then debugXpCall() end
+ print("----------------------------------------")
+ print("LUA ERROR: " .. tostring(errorMessage) .. "\n")
+ print(debug.traceback("", 2))
+ print("----------------------------------------")
+
+ local msg = debug.traceback(errorMessage, 2)
+ --写入文件
+ local file = io.open('errorInfo.txt', "a")
+ io.output(file)
+ io.write('\n')
+ io.write('\n')
+ io.write('\n')
+ io.write(msg)
+ io.write('\n')
+ --追加时间
+ io.write(os.date('%c') .. '\n')
+ io.write('\n')
+ io.write('\n')
+ io.write('\n')
+ io.close(file)
+end
+
+local status, msg = xpcall(main, __G__TRACKBACK__)
+if not status then
+ print(msg)
+end
diff --git a/simulator/win32/src/packages/mvc/AppBase.lua b/simulator/win32/src/packages/mvc/AppBase.lua
new file mode 100644
index 0000000..ccf9f57
--- /dev/null
+++ b/simulator/win32/src/packages/mvc/AppBase.lua
@@ -0,0 +1,67 @@
+
+local AppBase = class("AppBase")
+
+function AppBase:ctor(configs)
+ self.configs_ = {
+ viewsRoot = "app.views",
+ modelsRoot = "app.models",
+ defaultSceneName = "MainScene",
+ }
+
+ for k, v in pairs(configs or {}) do
+ self.configs_[k] = v
+ end
+
+ if type(self.configs_.viewsRoot) ~= "table" then
+ self.configs_.viewsRoot = {self.configs_.viewsRoot}
+ end
+ if type(self.configs_.modelsRoot) ~= "table" then
+ self.configs_.modelsRoot = {self.configs_.modelsRoot}
+ end
+
+ if DEBUG > 1 then
+ dump(self.configs_, "AppBase configs")
+ end
+
+ if CC_SHOW_FPS then
+ cc.Director:getInstance():setDisplayStats(true)
+ end
+
+ -- event
+ self:onCreate()
+end
+
+function AppBase:run(initSceneName)
+ initSceneName = initSceneName or self.configs_.defaultSceneName
+ self:enterScene(initSceneName)
+end
+
+function AppBase:enterScene(sceneName, transition, time, more)
+ local view = self:createView(sceneName)
+ view:showWithScene(transition, time, more)
+ return view
+end
+
+function AppBase:createView(name)
+ for _, root in ipairs(self.configs_.viewsRoot) do
+ local packageName = string.format("%s.%s", root, name)
+ local status, view = xpcall(function()
+ return require(packageName)
+ end, function(msg)
+ if not string.find(msg, string.format("'%s' not found:", packageName)) then
+ print("load view error: ", msg)
+ end
+ end)
+ local t = type(view)
+ if status and (t == "table" or t == "userdata") then
+ return view:create(self, name)
+ end
+ end
+ error(string.format("AppBase:createView() - not found view \"%s\" in search paths \"%s\"",
+ name, table.concat(self.configs_.viewsRoot, ",")), 0)
+end
+
+function AppBase:onCreate()
+end
+
+return AppBase
diff --git a/simulator/win32/src/packages/mvc/ViewBase.lua b/simulator/win32/src/packages/mvc/ViewBase.lua
new file mode 100644
index 0000000..64a26bd
--- /dev/null
+++ b/simulator/win32/src/packages/mvc/ViewBase.lua
@@ -0,0 +1,68 @@
+
+local ViewBase = class("ViewBase", cc.Node)
+
+function ViewBase:ctor(app, name)
+ self:enableNodeEvents()
+ self.app_ = app
+ self.name_ = name
+
+ -- check CSB resource file
+ local res = rawget(self.class, "RESOURCE_FILENAME")
+ if res then
+ self:createResoueceNode(res)
+ end
+
+ local binding = rawget(self.class, "RESOURCE_BINDING")
+ if res and binding then
+ self:createResoueceBinding(binding)
+ end
+
+ if self.onCreate then self:onCreate() end
+end
+
+function ViewBase:getApp()
+ return self.app_
+end
+
+function ViewBase:getName()
+ return self.name_
+end
+
+function ViewBase:getResourceNode()
+ return self.resourceNode_
+end
+
+function ViewBase:createResoueceNode(resourceFilename)
+ if self.resourceNode_ then
+ self.resourceNode_:removeSelf()
+ self.resourceNode_ = nil
+ end
+ self.resourceNode_ = cc.CSLoader:createNode(resourceFilename)
+ assert(self.resourceNode_, string.format("ViewBase:createResoueceNode() - load resouce node from file \"%s\" failed", resourceFilename))
+ self:addChild(self.resourceNode_)
+end
+
+function ViewBase:createResoueceBinding(binding)
+ assert(self.resourceNode_, "ViewBase:createResoueceBinding() - not load resource node")
+ for nodeName, nodeBinding in pairs(binding) do
+ local node = self.resourceNode_:getChildByName(nodeName)
+ if nodeBinding.varname then
+ self[nodeBinding.varname] = node
+ end
+ for _, event in ipairs(nodeBinding.events or {}) do
+ if event.event == "touch" then
+ node:onTouch(handler(self, self[event.method]))
+ end
+ end
+ end
+end
+
+function ViewBase:showWithScene(transition, time, more)
+ self:setVisible(true)
+ local scene = display.newScene(self.name_)
+ scene:addChild(self)
+ display.runScene(scene, transition, time, more)
+ return self
+end
+
+return ViewBase
diff --git a/simulator/win32/src/packages/mvc/init.lua b/simulator/win32/src/packages/mvc/init.lua
new file mode 100644
index 0000000..3eb980c
--- /dev/null
+++ b/simulator/win32/src/packages/mvc/init.lua
@@ -0,0 +1,7 @@
+
+local _M = {}
+
+_M.AppBase = import(".AppBase")
+_M.ViewBase = import(".ViewBase")
+
+return _M
diff --git a/simulator/win32/websockets.dll b/simulator/win32/websockets.dll
new file mode 100644
index 0000000..5b26886
Binary files /dev/null and b/simulator/win32/websockets.dll differ
diff --git a/simulator/win32/zlib1.dll b/simulator/win32/zlib1.dll
new file mode 100644
index 0000000..56337e4
Binary files /dev/null and b/simulator/win32/zlib1.dll differ
diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json
new file mode 100644
index 0000000..158b399
--- /dev/null
+++ b/src/.vscode/launch.json
@@ -0,0 +1,71 @@
+{
+ // 使用 IntelliSense 了解相关属性。
+ // 悬停以查看现有属性的描述。
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+
+ {
+ "name": "Cocos2-launch",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua",
+ "port": 7003,
+ "exePath": "${workspaceRoot}/../simulator/win32/TestLua.exe",
+ "printType": 1
+ },
+ {
+ "name": "COCOS(remote debugging)",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Cocos2",
+ "localRoot": "${workspaceRoot}",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-ulua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".lua",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-slua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".txt",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "Unity-xlua",
+ "type": "lua",
+ "request": "attach",
+ "runtimeType": "Unity",
+ "localRoot": "${workspaceRoot}",
+ "fileExtname": ".txt",
+ "port": 7003,
+ "printType": 1
+ },
+ {
+ "name": "LuaTest",
+ "type": "lua",
+ "request": "launch",
+ "runtimeType": "LuaTest",
+ "mainFile": "${fileBasenameNoExtension}",
+ "localRoot": "${fileDirname}",
+ "curFileExtname": "${fileExtname}",
+ "fileExtname": ".lua",
+ "port": 7003,
+ "printType": 1
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/src/.vscode/settings.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/src/LuaIdeDebug/LuaDebug.lua b/src/LuaIdeDebug/LuaDebug.lua
new file mode 100644
index 0000000..9d86288
--- /dev/null
+++ b/src/LuaIdeDebug/LuaDebug.lua
@@ -0,0 +1,1759 @@
+local debugger_stackInfo = nil
+local coro_debugger = nil
+local debugger_require = require
+local debugger_exeLuaString = nil
+local loadstring_ = nil
+if(loadstring) then
+loadstring_ = loadstring
+else
+loadstring_ = load
+end
+local ZZBase64 = {}
+local LuaDebugTool_ = nil
+if(LuaDebugTool) then
+
+ LuaDebugTool_ = LuaDebugTool
+elseif(CS and CS.LuaDebugTool) then
+
+ LuaDebugTool_ = CS.LuaDebugTool;
+
+end
+local LuaDebugTool = LuaDebugTool_
+local loadstring = loadstring_
+
+local getinfo = debug.getinfo
+local function createSocket()
+ local base = _G
+ local string = require("string")
+ local math = require("math")
+ local socket = require("socket.core")
+
+ local _M = socket
+
+ -----------------------------------------------------------------------------
+ -- Exported auxiliar functions
+ -----------------------------------------------------------------------------
+ function _M.connect4(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet")
+ end
+
+ function _M.connect6(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet6")
+ end
+
+ if(not _M.connect) then
+ function _M.connect(address, port, laddress, lport)
+ local sock, err = socket.tcp()
+ if not sock then return nil, err end
+ if laddress then
+ local res, err = sock:bind(laddress, lport, -1)
+ if not res then return nil, err end
+ end
+ local res, err = sock:connect(address, port)
+ if not res then return nil, err end
+ return sock
+ end
+ end
+ function _M.bind(host, port, backlog)
+ if host == "*" then host = "0.0.0.0" end
+ local addrinfo, err = socket.dns.getaddrinfo(host);
+ if not addrinfo then return nil, err end
+ local sock, res
+ err = "no info on address"
+ for i, alt in base.ipairs(addrinfo) do
+ if alt.family == "inet" then
+ sock, err = socket.tcp4()
+ else
+ sock, err = socket.tcp6()
+ end
+ if not sock then return nil, err end
+ sock:setoption("reuseaddr", true)
+ res, err = sock:bind(alt.addr, port)
+ if not res then
+ sock:close()
+ else
+ res, err = sock:listen(backlog)
+ if not res then
+ sock:close()
+ else
+ return sock
+ end
+ end
+ end
+ return nil, err
+ end
+
+ _M.try = _M.newtry()
+
+ function _M.choose(table)
+ return function(name, opt1, opt2)
+ if base.type(name) ~= "string" then
+ name, opt1, opt2 = "default", name, opt1
+ end
+ local f = table[name or "nil"]
+ if not f then base.error("unknown key (" .. base.tostring(name) .. ")", 3)
+ else return f(opt1, opt2) end
+ end
+ end
+
+ -----------------------------------------------------------------------------
+ -- Socket sources and sinks, conforming to LTN12
+ -----------------------------------------------------------------------------
+ -- create namespaces inside LuaSocket namespace
+ local sourcet, sinkt = {}, {}
+ _M.sourcet = sourcet
+ _M.sinkt = sinkt
+
+ _M.BLOCKSIZE = 2048
+
+ sinkt["close-when-done"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if not chunk then
+ sock:close()
+ return 1
+ else return sock:send(chunk) end
+ end
+ })
+ end
+
+ sinkt["keep-open"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if chunk then return sock:send(chunk)
+ else return 1 end
+ end
+ })
+ end
+
+ sinkt["default"] = sinkt["keep-open"]
+
+ _M.sink = _M.choose(sinkt)
+
+ sourcet["by-length"] = function(sock, length)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if length <= 0 then return nil end
+ local size = math.min(socket.BLOCKSIZE, length)
+ local chunk, err = sock:receive(size)
+ if err then return nil, err end
+ length = length - string.len(chunk)
+ return chunk
+ end
+ })
+ end
+
+ sourcet["until-closed"] = function(sock)
+ local done
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if done then return nil end
+ local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
+ if not err then return chunk
+ elseif err == "closed" then
+ sock:close()
+ done = 1
+ return partial
+ else return nil, err end
+ end
+ })
+ end
+
+
+ sourcet["default"] = sourcet["until-closed"]
+
+ _M.source = _M.choose(sourcet)
+
+ return _M
+end
+
+local function createJson()
+ local math = require('math')
+ local string = require("string")
+ local table = require("table")
+ local object = nil
+ -----------------------------------------------------------------------------
+ -- Module declaration
+ -----------------------------------------------------------------------------
+ local json = {} -- Public namespace
+ local json_private = {} -- Private namespace
+
+ -- Public constants
+ json.EMPTY_ARRAY = {}
+ json.EMPTY_OBJECT = {}
+ -- Public functions
+ -- Private functions
+ local decode_scanArray
+ local decode_scanComment
+ local decode_scanConstant
+ local decode_scanNumber
+ local decode_scanObject
+ local decode_scanString
+ local decode_scanWhitespace
+ local encodeString
+ local isArray
+ local isEncodable
+
+ -----------------------------------------------------------------------------
+ -- PUBLIC FUNCTIONS
+ -----------------------------------------------------------------------------
+ --- Encodes an arbitrary Lua object / variable.
+ -- @param v The Lua object / variable to be JSON encoded.
+ -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+ function json.encode(v)
+ -- Handle nil values
+ if v == nil then
+ return "null"
+ end
+
+ local vtype = type(v)
+
+ -- Handle strings
+ if vtype == 'string' then
+ return "\"" .. json_private.encodeString(v) .. "\"" -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype == 'number' or vtype == 'boolean' then
+ return tostring(v)
+ end
+
+ -- Handle tables
+ if vtype == 'table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1, maxCount do
+ table.insert(rval, json.encode(v[i]))
+ end
+ else -- An object, not an array
+ for i, j in pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, "\"" .. json_private.encodeString(i) .. '\":' .. json.encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval, ',') .. ']'
+ else
+ return '{' .. table.concat(rval, ',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype == 'function' and v == json.null then
+ return 'null'
+ end
+
+ assert(false, 'encode attempt to encode unsupported type ' .. vtype .. ':' .. tostring(v))
+ end
+
+
+ --- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+ -- @param s The string to scan.
+ -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+ -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+ -- and the position of the first character after
+ -- the scanned JSON object.
+ function json.decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s, startPos, startPos)
+ -- Object
+ if curChar == '{' then
+ return decode_scanObject(s, startPos)
+ end
+ -- Array
+ if curChar == '[' then
+ return decode_scanArray(s, startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s, startPos)
+ end
+ -- String
+ if curChar == "\"" or curChar == [[']] then
+ return decode_scanString(s, startPos)
+ end
+ if string.sub(s, startPos, startPos + 1) == '/*' then
+ return json.decode(s, decode_scanComment(s, startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s, startPos)
+ end
+
+ --- The null function allows one to specify a null value in an associative array (which is otherwise
+ -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+ function json.null()
+ return json.null -- so json.null() will also return null ;-)
+ end
+ -----------------------------------------------------------------------------
+ -- Internal, PRIVATE functions.
+ -- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+ -- functions with an underscore.
+ -----------------------------------------------------------------------------
+ --- Scans an array from JSON into a Lua object
+ -- startPos begins at the start of the array.
+ -- Returns the array and the next starting position
+ -- @param s The string being scanned.
+ -- @param startPos The starting position for the scan.
+ -- @return table, int The scanned array as a table, and the position of the next character to scan.
+ function decode_scanArray(s, startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ assert(string.sub(s, startPos, startPos) == '[', 'decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == ']') then
+ return array, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = json.decode(s, startPos)
+ table.insert(array, object)
+ until false
+ end
+
+ --- Scans a comment and discards the comment.
+ -- Returns the position of the next character following the comment.
+ -- @param string s The JSON string to scan.
+ -- @param int startPos The starting position of the comment
+ function decode_scanComment(s, startPos)
+ assert(string.sub(s, startPos, startPos + 1) == '/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s, '*/', startPos + 2)
+ assert(endPos ~= nil, "Unterminated comment in string at " .. startPos)
+ return endPos + 2
+ end
+
+ --- Scans for given constants: true, false or null
+ -- Returns the appropriate Lua type, and the position of the next character to read.
+ -- @param s The string being scanned.
+ -- @param startPos The position in the string at which to start scanning.
+ -- @return object, int The object (true, false or nil) and the position at which the next character should be
+ -- scanned.
+ function decode_scanConstant(s, startPos)
+ local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
+ local constNames = {"true", "false", "null"}
+
+ for i, k in pairs(constNames) do
+ if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+ end
+
+ --- Scans a number from the JSON encoded string.
+ -- (in fact, also is able to scan numeric +- eqns, which is not
+ -- in the JSON spec.)
+ -- Returns the number, and the position of the next character
+ -- after the number.
+ -- @param s The string being scanned.
+ -- @param startPos The position at which to start scanning.
+ -- @return number, int The extracted number and the position of the next character to scan.
+ function decode_scanNumber(s, startPos)
+ local endPos = startPos + 1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while(string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true)
+ and endPos <= stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos - 1)
+ local stringEval = loadstring(stringValue)
+ assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+ end
+
+ --- Scans a JSON object into a Lua object.
+ -- startPos begins at the start of the object.
+ -- Returns the object and the next starting position.
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return table, int The scanned object as a table and the position of the next character to scan.
+ function decode_scanObject(s, startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ assert(string.sub(s, startPos, startPos) == '{', 'decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == '}') then
+ return object, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = json.decode(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ assert(string.sub(s, startPos, startPos) == ':', 'JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = json.decode(s, startPos)
+ object[key] = value
+ until false -- infinite loop while key-value pairs are found
+ end
+
+ -- START SoniEx2
+ -- Initialize some things used by decode_scanString
+ -- You know, for efficiency
+ local escapeSequences = {
+ ["\\t"] = "\t",
+ ["\\f"] = "\f",
+ ["\\r"] = "\r",
+ ["\\n"] = "\n",
+ ["\\b"] = ""
+ }
+ setmetatable(escapeSequences, {__index = function(t, k)
+ -- skip "\" aka strip escape
+ return string.sub(k, 2)
+ end})
+ -- END SoniEx2
+ --- Scans a JSON string from the opening inverted comma or single quote to the
+ -- end of the string.
+ -- Returns the string extracted as a Lua string,
+ -- and the position of the next non-string character
+ -- (after the closing inverted comma or single quote).
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return string, int The extracted string as a Lua string, and the next character to parse.
+ function decode_scanString(s, startPos)
+ assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s, startPos, startPos)
+ -- START SoniEx2
+ -- PS: I don't think single quotes are valid JSON
+ assert(startChar == "\"" or startChar == [[']], 'decode_scanString called for a non-string')
+ --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart)
+ local t = {}
+ local i, j = startPos, startPos
+ while string.find(s, startChar, j + 1) ~= j + 1 do
+ local oldj = j
+ i, j = string.find(s, "\\.", j + 1)
+ local x, y = string.find(s, startChar, oldj + 1)
+ if not i or x < i then
+ i, j = x, y - 1
+ end
+ table.insert(t, string.sub(s, oldj + 1, i - 1))
+ if string.sub(s, i, j) == "\\u" then
+ local a = string.sub(s, j + 1, j + 4)
+ j = j + 4
+ local n = tonumber(a, 16)
+ assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j)
+ -- math.floor(x/2^y) == lazy right shift
+ -- a % 2^b == bitwise_and(a, (2^b)-1)
+ -- 64 = 2^6
+ -- 4096 = 2^12 (or 2^6 * 2^6)
+ local x
+ if n < 128 then
+ x = string.char(n % 128)
+ elseif n < 2048 then
+ -- [110x xxxx] [10xx xxxx]
+ x = string.char(192 +(math.floor(n / 64) % 32), 128 +(n % 64))
+ else
+ -- [1110 xxxx] [10xx xxxx] [10xx xxxx]
+ x = string.char(224 +(math.floor(n / 4096) % 16), 128 +(math.floor(n / 64) % 64), 128 +(n % 64))
+ end
+ table.insert(t, x)
+ else
+ table.insert(t, escapeSequences[string.sub(s, i, j)])
+ end
+ end
+ table.insert(t, string.sub(j, j + 1))
+ assert(string.find(s, startChar, j + 1), "String decoding failed: missing closing " .. startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")")
+ return table.concat(t, ""), j + 2
+ -- END SoniEx2
+ end
+
+ --- Scans a JSON string skipping all whitespace from the current start position.
+ -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+ -- @param s The string being scanned
+ -- @param startPos The starting position where we should begin removing whitespace.
+ -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+ -- was reached.
+ function decode_scanWhitespace(s, startPos)
+ local whitespace = " \n\r\t"
+ local stringLen = string.len(s)
+ while(string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+ end
+
+ --- Encodes a string to be JSON-compatible.
+ -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+ -- @param s The string to return as a JSON encoded (i.e. backquoted string)
+ -- @return The string appropriately escaped.
+ local escapeList = {
+ ["\""] = '\\\"',
+ ['\\'] = '\\\\',
+ ['/'] = '\\/',
+ [''] = '\\b',
+ ['\f'] = '\\f',
+ ['\n'] = '\\n',
+ ['\r'] = '\\r',
+ ['\t'] = '\\t'
+ }
+
+ function json_private.encodeString(s)
+ local s = tostring(s)
+ return s:gsub(".", function(c) return escapeList[c] end) -- SoniEx2: 5.0 compat
+ end
+
+ -- Determines whether the given Lua type is an array or a table / dictionary.
+ -- We consider any table an array if it has indexes 1..n for its n items, and no
+ -- other data in the table.
+ -- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+ -- @param t The table to evaluate as an array
+ -- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+ -- the second returned value is the maximum
+ -- number of indexed elements in the array.
+ function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ if(t == json.EMPTY_ARRAY) then return true, 0 end
+ if(t == json.EMPTY_OBJECT) then return false end
+
+ local maxIndex = 0
+ for k, v in pairs(t) do
+ if(type(k) == 'number' and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair
+ if(not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex, k)
+ else
+ if(k == 'n') then
+ if v ~=(t.n or # t) then return false end -- False if n does not hold the number of elements
+
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+ end
+
+ --- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+ -- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+ -- In this implementation, all other types are ignored.
+ -- @param o The object to examine.
+ -- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+ function isEncodable(o)
+ local t = type(o)
+ return(t == 'string' or t == 'boolean' or t == 'number' or t == 'nil' or t == 'table') or
+ (t == 'function' and o == json.null)
+ end
+
+ return json
+end
+local debugger_print = print
+local debug_server = nil
+local breakInfoSocket = nil
+local json = createJson()
+local LuaDebugger = {
+ fileMaps = {},
+ Run = true, --表示正常运行只检测断点
+ StepIn = false,
+ StepInLevel = 0,
+ StepNext = false,
+ StepNextLevel = 0,
+ StepOut = false,
+ breakInfos = {},
+ runTimeType = nil,
+ isHook = true,
+ pathCachePaths = {},
+ isProntToConsole = 1,
+ isDebugPrint = true,
+ hookType = "lrc",
+ currentFileName = "",
+ currentTempFunc = nil,
+ --分割字符串缓存
+ splitFilePaths = {},
+ DebugLuaFie="",
+ version="1.0.4"
+}
+LuaDebugger.event = {
+ S2C_SetBreakPoints = 1,
+ C2S_SetBreakPoints = 2,
+ S2C_RUN = 3,
+ C2S_HITBreakPoint = 4,
+ S2C_ReqVar = 5,
+ C2S_ReqVar = 6,
+ --单步跳过请求
+ S2C_NextRequest = 7,
+ --单步跳过反馈
+ C2S_NextResponse = 8,
+ -- 单步跳过 结束 没有下一步
+ C2S_NextResponseOver = 9,
+ --单步跳入
+ S2C_StepInRequest = 10,
+ C2S_StepInResponse = 11,
+ --单步跳出
+ S2C_StepOutRequest = 12,
+ --单步跳出返回
+ C2S_StepOutResponse = 13,
+ --打印
+ C2S_LuaPrint = 14,
+ S2C_LoadLuaScript = 16,
+ C2S_SetSocketName = 17,
+ C2S_LoadLuaScript = 18,
+ C2S_DebugXpCall = 20,
+ S2C_DebugClose = 21
+}
+function print1(...)
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=1}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+print = print1
+
+
+function luaIdePrintWarn( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=2}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintErr( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=3}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+
+
+
+----=============================工具方法=============================================
+local debug_hook = nil
+local function debugger_strSplit(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if(delimiter == '') then return false end
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+local function debugger_strTrim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+local function debugger_dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+ local lookupTable = {}
+ local result = {}
+ local function _v(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+ end
+ local traceback = debugger_strSplit(debug.traceback("", 2), "\n")
+ print1("dump from: " .. debugger_strTrim(traceback[3]))
+ local function _dump(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(_v(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[# result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value))
+ elseif lookupTable[value] then
+ result[# result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc)
+ else
+ lookupTable[value] = true
+ if nest > nesting then
+ result[# result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption)
+ else
+ result[# result + 1] = string.format("%s%s = {", indent, _v(desciption))
+ local indent2 = indent .. " "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[# keys + 1] = k
+ local vk = _v(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ _dump(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[# result + 1] = string.format("%s}", indent)
+ end
+ end
+ end
+ _dump(value, desciption, "- ", 1)
+ for i, line in ipairs(result) do
+ print1(line)
+ end
+end
+
+local function debugger_setVarInfo(name, value)
+ local vt = type(value)
+ local valueStr = ""
+ if(vt ~= "table") then
+ valueStr = tostring(value)
+ valueStr =ZZBase64.encode(valueStr)
+ else
+ -- valueStr = topointer(value)
+ end
+ local valueInfo = {
+ name = name,
+ valueType = vt,
+ valueStr = valueStr
+ }
+ return valueInfo;
+end
+local function debugger_getvalue(f)
+ local i = 1
+ local locals = {}
+ -- get locals
+ while true do
+ local name, value = debug.getlocal(f, i)
+ if not name then break end
+ if(name ~= "(*temporary)") then
+ locals[name] = value
+ end
+ i = i + 1
+ end
+ local func = getinfo(f, "f").func
+ i = 1
+ local ups = {}
+ while func do -- check for func as it may be nil for tail calls
+ local name, value = debug.getupvalue(func, i)
+ if not name then break end
+ ups[name] = value
+ i = i + 1
+ end
+ return {locals = locals, ups = ups}
+end
+--获取堆栈
+debugger_stackInfo = function(ignoreCount, event)
+ local datas = {}
+ local stack = {}
+ local varInfos = {}
+ local funcs = {}
+ local index = 0;
+ for i = ignoreCount, 100 do
+ local source = getinfo(i)
+ local isadd = true
+ if(i == ignoreCount) then
+ local file = source.source
+ if(file:find(LuaDebugger.DebugLuaFie)) then
+ return
+ end
+ if(file == "=[C]") then
+ isadd = false
+ end
+ end
+ if not source then
+ break;
+ end
+ if(isadd) then
+ local file = source.source
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local info =
+ {
+ src = file,
+ scoreName = source.name,
+ currentline = source.currentline,
+ linedefined = source.linedefined,
+ what = source.what,
+ nameWhat = source.namewhat
+ }
+ index = i
+ local vars = debugger_getvalue(i + 1)
+ table.insert(stack, info)
+ table.insert(varInfos, vars)
+ table.insert(funcs, source.func)
+ end
+ if source.what == 'main' then break end
+ end
+ local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
+ local data = {
+ stack = stackInfo.stack,
+ vars = stackInfo.vars,
+ funcs = stackInfo.funcs,
+ event = event,
+ funcsLength = #stackInfo.funcs
+ }
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ return data
+end
+--==============================工具方法 end======================================================
+--===========================点断信息==================================================
+--根据不同的游戏引擎进行定时获取断点信息
+--CCDirector:sharedDirector():getScheduler()
+local debugger_setBreak = nil
+local function debugger_receiveDebugBreakInfo()
+ if(jit) then
+ if(LuaDebugger.debugLuaType ~= "jit") then
+ local msg = "当前luajit版本为: "..jit.version.." 请使用LuaDebugjit 进行调试!"
+ print(msg)
+
+ end
+ end
+
+
+ if(breakInfoSocket) then
+ local msg, status = breakInfoSocket:receive()
+ if(msg) then
+ local netData = json.decode(msg)
+ if netData.event == LuaDebugger.event.S2C_SetBreakPoints then
+ debugger_setBreak(netData.data)
+ elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
+
+ debugger_exeLuaString(netData.data, false)
+ end
+ end
+ end
+end
+local function splitFilePath(path)
+ if(LuaDebugger.splitFilePaths[path]) then
+ return LuaDebugger.splitFilePaths[path]
+ end
+
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(path, '/', pos, true) end do
+ table.insert(arr, string.sub(path, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(path, pos))
+ LuaDebugger.splitFilePaths[path] = arr
+ return arr
+end
+debugger_setBreak = function(datas)
+ local breakInfos = LuaDebugger.breakInfos
+ for i, data in ipairs(datas) do
+ local breakInfo = breakInfos[data.fileName]
+ if(not breakInfo) then
+ breakInfos[data.fileName] = {}
+ breakInfo = breakInfos[data.fileName]
+ end
+ if(not data.lines or # data.lines == 0) then
+ breakInfo[data.serverPath] = nil
+ else
+ local lineInfos = {}
+ for li, line in ipairs(data.lines) do
+ lineInfos[line] = true
+ end
+ breakInfo[data.serverPath] = {
+ pathNames = splitFilePath(data.serverPath),
+ lines = lineInfos
+ }
+ end
+ local count = 0
+ for i, linesInfo in pairs(breakInfo) do
+ count = count + 1
+ end
+ if(count == 0) then
+ breakInfos[data.fileName] = nil
+ end
+ end
+ --debugger_dump(breakInfos, "breakInfos", 6)
+ --检查是否需要断点
+ local isHook = false
+ for k, v in pairs(breakInfos) do
+ isHook = true
+ break
+ end
+
+ --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次
+ if(isHook) then
+ if(not LuaDebugger.isHook) then
+ debug.sethook(debug_hook, "lrc")
+ end
+ LuaDebugger.isHook = true
+
+ else
+
+ if(LuaDebugger.isHook) then
+ debug.sethook()
+ end
+ LuaDebugger.isHook = false
+ end
+end
+local function debugger_checkFileIsBreak(fileName)
+ return LuaDebugger.breakInfos[fileName]
+end
+local function debugger_checkIsBreak(fileName, line)
+ local breakInfo = LuaDebugger.breakInfos[fileName]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = getinfo(3)
+ local source = info.source
+ source = source:gsub("\\", "/")
+ if source:find("@") == 1 then
+ source = source:sub(2);
+ if not source:find("/") then
+ source = source:gsub("%.", "/")
+ end
+ end
+ local index = source:find("%.lua")
+ if not index then
+ source = source .. ".lua"
+ end
+ local hitPathNames = splitFilePath(source)
+ local isHit = true
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+ isHit = false
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ if(# hitPathNames == 1 or(# hitPathNames > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ return hitFieName
+ end
+ end
+ end
+ return false
+end
+--=====================================断点信息 end ----------------------------------------------
+local controller_host = "192.168.1.102"
+local controller_port = 7003
+local function debugger_sendMsg(serverSocket, eventName, data)
+ local sendMsg = {
+ event = eventName,
+ data = data
+ }
+ local sendStr = json.encode(sendMsg)
+ serverSocket:send(sendStr .. "__debugger_k0204__")
+end
+--执行lua字符串
+debugger_exeLuaString = function(data, isBreakPoint)
+ local function loadScript()
+ local luastr = data.luastr
+ if(isBreakPoint) then
+ local currentTabble = {_G = _G}
+ local frameId = data.frameId
+ frameId = frameId + 1
+ local func = LuaDebugger.currentDebuggerData.funcs[frameId];
+ local vars = LuaDebugger.currentDebuggerData.vars[frameId]
+ local locals = vars.locals;
+ local ups = vars.ups
+ for k, v in pairs(ups) do
+ currentTabble[k] = v
+ end
+ for k, v in pairs(locals) do
+ currentTabble[k] = v
+ end
+ setmetatable(currentTabble, {__index = _G})
+ local fun = loadstring(luastr)
+ setfenv(fun, currentTabble)
+ fun()
+ else
+ local fun = loadstring(luastr)
+ fun()
+ end
+ end
+ local status, msg = xpcall(loadScript, function(error)
+ print(error)
+ end)
+ if(status) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "执行代码成功"})
+ if(isBreakPoint) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_HITBreakPoint, LuaDebugger.currentDebuggerData.stack)
+ end
+ else
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "加载代码失败"})
+ end
+end
+local function getLuaFileName(str)
+
+ local pos = 0
+ local fileName = "";
+ -- for each divider found
+ for st, sp in function() return string.find(str, '/', pos, true) end do
+ pos = sp + 1
+ end
+ fileName = string.sub(str, pos)
+
+ return fileName;
+end
+local function getSource(source)
+ if(LuaDebugger.pathCachePaths[source]) then
+ return LuaDebugger.pathCachePaths[source]
+ end
+
+ local file = source
+ file = file:gsub("\\", "/")
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local index = file:find("%.lua")
+ if not index then
+ file = file .. ".lua"
+ end
+ file = getLuaFileName(file)
+ LuaDebugger.pathCachePaths[source] = file
+ return file;
+end
+local function debugger_GeVarInfoBytUserData(server,var,variablesReference,debugSpeedIndex)
+ local fileds = LuaDebugTool.getUserDataInfo(var)
+
+ local varInfos = {}
+ if(tolua) then
+ local luavars = tolua.getpeer(vars)
+ if(luavars) then
+ for k, v in pairs(luavars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(varInfos, vinfo)
+ end
+ end
+ end
+
+ --c# vars
+ for i=1,fileds.Count do
+ local filed = fileds[i-1]
+ local valueInfo = {
+ name = filed.name,
+ valueType = filed.valueType,
+ valueStr = ZZBase64.encode(filed.valueStr),
+ isValue = filed.isValue
+ }
+
+ table.insert( varInfos,valueInfo)
+
+ end
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = varInfos,
+ isComplete = 1
+ })
+end
+--获取lua 变量的方法
+local function debugger_getBreakVar(body, server)
+ local variablesReference = body.variablesReference
+ local debugSpeedIndex = body.debugSpeedIndex
+ local vinfos = {}
+ local function exe()
+
+ local frameId = body.frameId;
+ local type_ = body.type;
+ local keys = body.keys;
+ --找到对应的var
+ local vars = nil
+ if(type_ == 1) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.locals
+ elseif(type_ == 2) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.ups
+ elseif(type_ == 3) then
+ vars = _G
+ end
+
+ --特殊处理下
+ for i, v in ipairs(keys) do
+ local start_m = string.sub(v,1,1)
+ if(start_m == "[") then
+ local len = string.len( v )
+ local end_m = string.sub(v,len,len)
+ if(end_m == "]") then
+ v = string.sub(v,2,len-1);
+ end
+ vars = vars[v]
+ else
+ vars = vars[v]
+ end
+
+ if(type(vars) == "userdata" and tolua ~= nil and LuaDebugTool == nil) then
+ vars = tolua.getpeer(vars)
+ end
+ if(vars == nil) then
+ break;
+ end
+ end
+ local varType = type(vars)
+ if(varType == "userdata" ) then
+ if(LuaDebugTool) then
+ debugger_GeVarInfoBytUserData(server,vars,variablesReference,debugSpeedIndex)
+ return;
+ elseif(tolua == nil) then
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ return
+ end
+ end
+
+ local count = 0;
+ if(vars ~= nil) then
+ for k, v in pairs(vars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(vinfos, vinfo)
+ if(# vinfos > 10) then
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 0
+ })
+ vinfos = {}
+ end
+ end
+
+ end
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ end
+ xpcall(exe, function(error)
+ print("获取变量错误 错误消息-----------------")
+ print(error)
+ print(debug.traceback("", 2))
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = {
+ {
+ name ="error",
+ valueType = "string",
+ valueStr = ZZBase64.encode("无法获取属性值"),
+ isValue = false
+ }
+ },
+ isComplete = 1
+ })
+ end)
+end
+local function ResetDebugInfo()
+ LuaDebugger.Run = false
+ LuaDebugger.StepIn = false
+ LuaDebugger.StepNext = false
+ LuaDebugger.StepOut = false
+ LuaDebugger.StepNextLevel = 0
+
+end
+local function debugger_loop(server)
+ server = debug_server
+ --命令
+ local command
+ local eval_env = {}
+ local arg
+ while true do
+ local line, status = server:receive()
+ if(status == "closed") then
+ debug.sethook()
+ coroutine.yield()
+ end
+ if(line) then
+ local netData = json.decode(line)
+ local event = netData.event;
+ local body = netData.data;
+ if(event == LuaDebugger.event.S2C_DebugClose) then
+ debug.sethook()
+ coroutine.yield()
+ elseif event == LuaDebugger.event.S2C_SetBreakPoints then
+ --设置断点信息
+ local function setB()
+ debugger_setBreak(body)
+ end
+ xpcall(setB, function(error)
+ print(error)
+ end)
+ elseif event == LuaDebugger.event.S2C_RUN then
+ LuaDebugger.runTimeType = body.runTimeType
+ LuaDebugger.isProntToConsole = body.isProntToConsole
+ ResetDebugInfo()
+ LuaDebugger.Run = true
+ local data = coroutine.yield()
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif event == LuaDebugger.event.S2C_ReqVar then
+ --请求数据信息
+ debugger_getBreakVar(body, server)
+ elseif event == LuaDebugger.event.S2C_NextRequest then
+ ResetDebugInfo()
+
+ LuaDebugger.StepNext = true
+ LuaDebugger.StepNextLevel = 0;
+
+ --设置当前文件名和当前行数
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif(event == LuaDebugger.event.S2C_StepInRequest) then
+ --单步跳入
+
+ ResetDebugInfo()
+ LuaDebugger.StepIn = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif(event == LuaDebugger.event.S2C_StepOutRequest) then
+ --单步跳出
+
+ ResetDebugInfo()
+ LuaDebugger.StepOut = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif event == LuaDebugger.event.S2C_LoadLuaScript then
+ debugger_exeLuaString(body, true)
+ end
+ end
+ end
+end
+coro_debugger = coroutine.create(debugger_loop)
+debug_hook = function(event, line)
+
+ if(not LuaDebugger.isHook) then
+ return
+ end
+
+ if(LuaDebugger.Run) then
+ if(event == "line") then
+ local isCheck = false
+
+ for k, breakInfo in pairs(LuaDebugger.breakInfos) do
+
+ for bk, linesInfo in pairs(breakInfo) do
+
+ if(linesInfo.lines[line]) then
+ isCheck = true
+ break
+ end
+ end
+ if(isCheck) then
+ break
+ end
+ end
+
+ if(not isCheck) then
+ return
+ end
+ else
+
+ LuaDebugger.currentFileName = nil
+ LuaDebugger.currentTempFunc = nil
+ return
+
+ end
+ end
+ --跳出
+ if(LuaDebugger.StepOut) then
+
+ if(event == "line" or event == "call") then
+ return
+ end
+ local tempFun = getinfo(2,"f").func
+
+ if(LuaDebugger.currentDebuggerData.funcsLength == 1) then
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+
+ else
+ if(LuaDebugger.currentDebuggerData.funcs[2] == tempFun) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+ return
+ end
+ -- debugger_dump(LuaDebugger,"LuaDebugger")
+ -- print1(LuaDebugger.StepNextLevel,"LuaDebugger.StepNextLevel")
+ local file = nil
+ if(event == "call") then
+ -- if(not LuaDebugger.StepOut) then
+ if(not LuaDebugger.Run) then
+ LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel+1
+ end
+ -- print1("stepIn",LuaDebugger.StepNextLevel)
+
+ local stepInfo = getinfo(2,"S")
+ local source = stepInfo.source
+ if(source:find(LuaDebugger.DebugLuaFie) or source == "=[C]") then
+ return
+ end
+
+ file = getSource(source);
+ LuaDebugger.currentFileName = file
+ -- end
+ elseif(event == "return" or event == "tail return") then
+ -- if(not LuaDebugger.StepOut) then
+
+ if(not LuaDebugger.Run) then
+ LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel-1
+ end
+
+ LuaDebugger.currentFileName = nil
+ -- end
+ elseif(event == "line") then
+ if(LuaDebugger.StepIn) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ --挂起等待调试器作出反应
+ if(data) then
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ coroutine.resume(coro_debugger, data)
+ return;
+ end
+ end
+ if(LuaDebugger.StepNext ) then
+ if( LuaDebugger.StepNextLevel <= 0) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ --挂起等待调试器作出反应
+ if(data)then
+ LuaDebugger.currentTempFunc = data.funcs[1]
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+
+ end
+
+ end
+
+ local stepInfo = nil
+ if(not LuaDebugger.currentFileName) then
+ stepInfo = getinfo(2,"S")
+ local source = stepInfo.source
+ if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
+ file = getSource(source);
+ LuaDebugger.currentFileName = file
+ end
+ file = LuaDebugger.currentFileName
+
+
+ --判断断点
+ local breakInfo = LuaDebugger.breakInfos[file]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = stepInfo
+ if(not info) then
+ info = getinfo(2)
+ end
+ local hitPathNames = splitFilePath(file)
+
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ local hitPathNamesLength = #hitPathNames
+ if(hitPathNamesLength == 1 or(hitPathNamesLength > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+ end
+ end
+end
+local function debugger_xpcall()
+ --调用 coro_debugger 并传入 参数
+ local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+end
+--调试开始
+local function start()
+ LuaDebugger.DebugLuaFie = getLuaFileName(getinfo(1).source)
+ local socket = createSocket()
+ print(controller_host)
+ print(controller_port)
+
+ local server = socket.connect(controller_host, controller_port)
+ debug_server = server;
+ if server then
+ --创建breakInfo socket
+ socket = createSocket()
+ breakInfoSocket = socket.connect(controller_host, controller_port)
+ if(breakInfoSocket) then
+ breakInfoSocket:settimeout(0)
+ debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
+ name = "breakPointSocket"
+ })
+ debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, {
+ name = "mainSocket",
+ version = LuaDebugger.version
+
+ })
+ xpcall(function()
+ debug.sethook(debug_hook, "lrc")
+ end, function(error)
+ print("error:", error)
+ end)
+ if(jit) then
+ if(LuaDebugger.debugLuaType ~= "jit") then
+ print("error======================================================")
+ local msg = "当前luajit版本为: "..jit.version.." 请使用LuaDebugjit 进行调试!"
+
+ print(msg)
+ end
+ end
+ coroutine.resume(coro_debugger, server)
+ end
+ end
+end
+function StartDebug(host, port)
+
+ if(not host) then
+ print("error host nil")
+ end
+ if(not port) then
+ print("error prot nil")
+ end
+ if(type(host) ~= "string") then
+ print("error host not string")
+ end
+ if(type(port) ~= "number") then
+ print("error host not number")
+ end
+ controller_host = host
+ controller_port = port
+ xpcall(start, function(error)
+ -- body
+ print(error)
+ end)
+ return debugger_receiveDebugBreakInfo, debugger_xpcall
+end
+
+
+
+--base64
+
+local string = string
+
+ZZBase64.__code = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
+ };
+ZZBase64.__decode = {}
+for k,v in pairs(ZZBase64.__code) do
+ ZZBase64.__decode[string.byte(v,1)] = k - 1
+end
+
+function ZZBase64.encode(text)
+ local len = string.len(text)
+ local left = len % 3
+ len = len - left
+ local res = {}
+ local index = 1
+ for i = 1, len, 3 do
+ local a = string.byte(text, i )
+ local b = string.byte(text, i + 1)
+ local c = string.byte(text, i + 2)
+ -- num = a<<16 + b<<8 + c
+ local num = a * 65536 + b * 256 + c
+ for j = 1, 4 do
+ --tmp = num >> ((4 -j) * 6)
+ local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
+ --curPos = tmp&0x3f
+ local curPos = tmp % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+ index = index + 1
+ end
+ end
+
+ if left == 1 then
+ ZZBase64.__left1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__left2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__left2(res, index, text, len)
+ local num1 = string.byte(text, len + 1)
+ num1 = num1 * 1024 --lshift 10
+ local num2 = string.byte(text, len + 2)
+ num2 = num2 * 4 --lshift 2
+ local num = num1 + num2
+
+ local tmp1 = math.floor(num / 4096) --rShift 12
+ local curPos = tmp1 % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+
+ local tmp2 = math.floor(num / 64)
+ curPos = tmp2 % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 2] = ZZBase64.__code[curPos]
+
+ res[index + 3] = "="
+end
+
+function ZZBase64.__left1(res, index,text, len)
+ local num = string.byte(text, len + 1)
+ num = num * 16
+
+ local tmp = math.floor(num / 64)
+ local curPos = tmp % 64 + 1
+ res[index ] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ res[index + 2] = "="
+ res[index + 3] = "="
+end
+
+function ZZBase64.decode(text)
+ local len = string.len(text)
+ local left = 0
+ if string.sub(text, len - 1) == "==" then
+ left = 2
+ len = len - 4
+ elseif string.sub(text, len) == "=" then
+ left = 1
+ len = len - 4
+ end
+
+ local res = {}
+ local index = 1
+ local decode = ZZBase64.__decode
+ for i =1, len, 4 do
+ local a = decode[string.byte(text,i )]
+ local b = decode[string.byte(text,i + 1)]
+ local c = decode[string.byte(text,i + 2)]
+ local d = decode[string.byte(text,i + 3)]
+
+ --num = a<<18 + b<<12 + c<<6 + d
+ local num = a * 262144 + b * 4096 + c * 64 + d
+
+ local e = string.char(num % 256)
+ num = math.floor(num / 256)
+ local f = string.char(num % 256)
+ num = math.floor(num / 256)
+ res[index ] = string.char(num % 256)
+ res[index + 1] = f
+ res[index + 2] = e
+ index = index + 3
+ end
+
+ if left == 1 then
+ ZZBase64.__decodeLeft1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__decodeLeft2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__decodeLeft1(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local c = decode[string.byte(text, len + 3)]
+ local num = a * 4096 + b * 64 + c
+
+ local num1 = math.floor(num / 1024) % 256
+ local num2 = math.floor(num / 4) % 256
+ res[index] = string.char(num1)
+ res[index + 1] = string.char(num2)
+end
+
+function ZZBase64.__decodeLeft2(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local num = a * 64 + b
+ num = math.floor(num / 16)
+ res[index] = string.char(num)
+end
+
+
+
+
+return StartDebug
diff --git a/src/LuaIdeDebug/LuaDebugjit.lua b/src/LuaIdeDebug/LuaDebugjit.lua
new file mode 100644
index 0000000..0c95429
--- /dev/null
+++ b/src/LuaIdeDebug/LuaDebugjit.lua
@@ -0,0 +1,1655 @@
+local sethook = debug.sethook
+local debugger_stackInfo = nil
+local coro_debugger = nil
+local debugger_require = require
+local debugger_exeLuaString = nil
+local loadstring_ = nil
+if(loadstring) then
+loadstring_ = loadstring
+else
+loadstring_ = load
+end
+local ZZBase64 = {}
+local LuaDebugTool_ = nil
+if(LuaDebugTool) then
+
+ LuaDebugTool_ = LuaDebugTool
+elseif(CS and CS.LuaDebugTool) then
+
+ LuaDebugTool_ = CS.LuaDebugTool;
+
+end
+local LuaDebugTool = LuaDebugTool_
+local loadstring = loadstring_
+local getinfo = debug.getinfo
+local function createSocket()
+ local base = _G
+ local string = require("string")
+ local math = require("math")
+ local socket = require("socket.core")
+
+ local _M = socket
+
+ -----------------------------------------------------------------------------
+ -- Exported auxiliar functions
+ -----------------------------------------------------------------------------
+ function _M.connect4(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet")
+ end
+
+ function _M.connect6(address, port, laddress, lport)
+ return socket.connect(address, port, laddress, lport, "inet6")
+ end
+
+
+ if(not _M.connect) then
+ function _M.connect(address, port, laddress, lport)
+ local sock, err = socket.tcp()
+ if not sock then return nil, err end
+ if laddress then
+ local res, err = sock:bind(laddress, lport, -1)
+ if not res then return nil, err end
+ end
+ local res, err = sock:connect(address, port)
+ if not res then return nil, err end
+ return sock
+ end
+ end
+ function _M.bind(host, port, backlog)
+ if host == "*" then host = "0.0.0.0" end
+ local addrinfo, err = socket.dns.getaddrinfo(host);
+ if not addrinfo then return nil, err end
+ local sock, res
+ err = "no info on address"
+ for i, alt in base.ipairs(addrinfo) do
+ if alt.family == "inet" then
+ sock, err = socket.tcp4()
+ else
+ sock, err = socket.tcp6()
+ end
+ if not sock then return nil, err end
+ sock:setoption("reuseaddr", true)
+ res, err = sock:bind(alt.addr, port)
+ if not res then
+ sock:close()
+ else
+ res, err = sock:listen(backlog)
+ if not res then
+ sock:close()
+ else
+ return sock
+ end
+ end
+ end
+ return nil, err
+ end
+
+ _M.try = _M.newtry()
+
+ function _M.choose(table)
+ return function(name, opt1, opt2)
+ if base.type(name) ~= "string" then
+ name, opt1, opt2 = "default", name, opt1
+ end
+ local f = table[name or "nil"]
+ if not f then base.error("unknown key (" .. base.tostring(name) .. ")", 3)
+ else return f(opt1, opt2) end
+ end
+ end
+
+ -----------------------------------------------------------------------------
+ -- Socket sources and sinks, conforming to LTN12
+ -----------------------------------------------------------------------------
+ -- create namespaces inside LuaSocket namespace
+ local sourcet, sinkt = {}, {}
+ _M.sourcet = sourcet
+ _M.sinkt = sinkt
+
+ _M.BLOCKSIZE = 2048
+
+ sinkt["close-when-done"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if not chunk then
+ sock:close()
+ return 1
+ else return sock:send(chunk) end
+ end
+ })
+ end
+
+ sinkt["keep-open"] = function(sock)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function(self, chunk, err)
+ if chunk then return sock:send(chunk)
+ else return 1 end
+ end
+ })
+ end
+
+ sinkt["default"] = sinkt["keep-open"]
+
+ _M.sink = _M.choose(sinkt)
+
+ sourcet["by-length"] = function(sock, length)
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if length <= 0 then return nil end
+ local size = math.min(socket.BLOCKSIZE, length)
+ local chunk, err = sock:receive(size)
+ if err then return nil, err end
+ length = length - string.len(chunk)
+ return chunk
+ end
+ })
+ end
+
+ sourcet["until-closed"] = function(sock)
+ local done
+ return base.setmetatable({
+ getfd = function() return sock:getfd() end,
+ dirty = function() return sock:dirty() end
+ }, {
+ __call = function()
+ if done then return nil end
+ local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
+ if not err then return chunk
+ elseif err == "closed" then
+ sock:close()
+ done = 1
+ return partial
+ else return nil, err end
+ end
+ })
+ end
+
+
+ sourcet["default"] = sourcet["until-closed"]
+
+ _M.source = _M.choose(sourcet)
+
+ return _M
+end
+
+local function createJson()
+ local math = require('math')
+ local string = require("string")
+ local table = require("table")
+ local object = nil
+ -----------------------------------------------------------------------------
+ -- Module declaration
+ -----------------------------------------------------------------------------
+ local json = {} -- Public namespace
+ local json_private = {} -- Private namespace
+
+ -- Public constants
+ json.EMPTY_ARRAY = {}
+ json.EMPTY_OBJECT = {}
+ -- Public functions
+
+ -- Private functions
+ local decode_scanArray
+ local decode_scanComment
+ local decode_scanConstant
+ local decode_scanNumber
+ local decode_scanObject
+ local decode_scanString
+ local decode_scanWhitespace
+ local encodeString
+ local isArray
+ local isEncodable
+
+ -----------------------------------------------------------------------------
+ -- PUBLIC FUNCTIONS
+ -----------------------------------------------------------------------------
+ --- Encodes an arbitrary Lua object / variable.
+ -- @param v The Lua object / variable to be JSON encoded.
+ -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+ function json.encode(v)
+ -- Handle nil values
+ if v == nil then
+ return "null"
+ end
+
+ local vtype = type(v)
+
+ -- Handle strings
+ if vtype == 'string' then
+ return "\"" .. json_private.encodeString(v) .. "\"" -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype == 'number' or vtype == 'boolean' then
+ return tostring(v)
+ end
+
+ -- Handle tables
+ if vtype == 'table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1, maxCount do
+ table.insert(rval, json.encode(v[i]))
+ end
+ else -- An object, not an array
+ for i, j in pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, "\"" .. json_private.encodeString(i) .. '":' .. json.encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval, ',') .. ']'
+ else
+ return '{' .. table.concat(rval, ',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype == 'function' and v == json.null then
+ return 'null'
+ end
+
+ assert(false, 'encode attempt to encode unsupported type ' .. vtype .. ':' .. tostring(v))
+ end
+
+
+ --- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+ -- @param s The string to scan.
+ -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+ -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+ -- and the position of the first character after
+ -- the scanned JSON object.
+ function json.decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s, startPos, startPos)
+ -- Object
+ if curChar == '{' then
+ return decode_scanObject(s, startPos)
+ end
+ -- Array
+ if curChar == '[' then
+ return decode_scanArray(s, startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s, startPos)
+ end
+ -- String
+ if curChar == "\"" or curChar == [[']] then
+ return decode_scanString(s, startPos)
+ end
+ if string.sub(s, startPos, startPos + 1) == '/*' then
+ return json.decode(s, decode_scanComment(s, startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s, startPos)
+ end
+
+ --- The null function allows one to specify a null value in an associative array (which is otherwise
+ -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+ function json.null()
+ return json.null -- so json.null() will also return null ;-)
+ end
+ -----------------------------------------------------------------------------
+ -- Internal, PRIVATE functions.
+ -- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+ -- functions with an underscore.
+ -----------------------------------------------------------------------------
+
+ --- Scans an array from JSON into a Lua object
+ -- startPos begins at the start of the array.
+ -- Returns the array and the next starting position
+ -- @param s The string being scanned.
+ -- @param startPos The starting position for the scan.
+ -- @return table, int The scanned array as a table, and the position of the next character to scan.
+ function decode_scanArray(s, startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ assert(string.sub(s, startPos, startPos) == '[', 'decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == ']') then
+ return array, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = json.decode(s, startPos)
+ table.insert(array, object)
+ until false
+ end
+
+ --- Scans a comment and discards the comment.
+ -- Returns the position of the next character following the comment.
+ -- @param string s The JSON string to scan.
+ -- @param int startPos The starting position of the comment
+ function decode_scanComment(s, startPos)
+ assert(string.sub(s, startPos, startPos + 1) == '/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s, '*/', startPos + 2)
+ assert(endPos ~= nil, "Unterminated comment in string at " .. startPos)
+ return endPos + 2
+ end
+
+ --- Scans for given constants: true, false or null
+ -- Returns the appropriate Lua type, and the position of the next character to read.
+ -- @param s The string being scanned.
+ -- @param startPos The position in the string at which to start scanning.
+ -- @return object, int The object (true, false or nil) and the position at which the next character should be
+ -- scanned.
+ function decode_scanConstant(s, startPos)
+ local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
+ local constNames = {"true", "false", "null"}
+
+ for i, k in pairs(constNames) do
+ if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+ end
+
+ --- Scans a number from the JSON encoded string.
+ -- (in fact, also is able to scan numeric +- eqns, which is not
+ -- in the JSON spec.)
+ -- Returns the number, and the position of the next character
+ -- after the number.
+ -- @param s The string being scanned.
+ -- @param startPos The position at which to start scanning.
+ -- @return number, int The extracted number and the position of the next character to scan.
+ function decode_scanNumber(s, startPos)
+ local endPos = startPos + 1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while(string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true)
+ and endPos <= stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos - 1)
+ local stringEval = loadstring(stringValue)
+ assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+ end
+
+ --- Scans a JSON object into a Lua object.
+ -- startPos begins at the start of the object.
+ -- Returns the object and the next starting position.
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return table, int The scanned object as a table and the position of the next character to scan.
+ function decode_scanObject(s, startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ assert(string.sub(s, startPos, startPos) == '{', 'decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s, startPos, startPos)
+ if(curChar == '}') then
+ return object, startPos + 1
+ end
+ if(curChar == ',') then
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ end
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = json.decode(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s, startPos)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ assert(string.sub(s, startPos, startPos) == ':', 'JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s, startPos + 1)
+ assert(startPos <= stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = json.decode(s, startPos)
+ object[key] = value
+ until false -- infinite loop while key-value pairs are found
+ end
+
+ -- START SoniEx2
+ -- Initialize some things used by decode_scanString
+ -- You know, for efficiency
+ local escapeSequences = {
+ ["\\t"] = "\t",
+ ["\\f"] = "\f",
+ ["\\r"] = "\r",
+ ["\\n"] = "\n",
+ ["\\b"] = ""
+ }
+ setmetatable(escapeSequences, {__index = function(t, k)
+ -- skip "\" aka strip escape
+ return string.sub(k, 2)
+ end})
+ -- END SoniEx2
+
+ --- Scans a JSON string from the opening inverted comma or single quote to the
+ -- end of the string.
+ -- Returns the string extracted as a Lua string,
+ -- and the position of the next non-string character
+ -- (after the closing inverted comma or single quote).
+ -- @param s The string being scanned.
+ -- @param startPos The starting position of the scan.
+ -- @return string, int The extracted string as a Lua string, and the next character to parse.
+ function decode_scanString(s, startPos)
+ assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s, startPos, startPos)
+ -- START SoniEx2
+ -- PS: I don't think single quotes are valid JSON
+ assert(startChar == "\"" or startChar == [[']], 'decode_scanString called for a non-string')
+ --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart)
+ local t = {}
+ local i, j = startPos, startPos
+ while string.find(s, startChar, j + 1) ~= j + 1 do
+ local oldj = j
+ i, j = string.find(s, "\\.", j + 1)
+ local x, y = string.find(s, startChar, oldj + 1)
+ if not i or x < i then
+ i, j = x, y - 1
+ end
+ table.insert(t, string.sub(s, oldj + 1, i - 1))
+ if string.sub(s, i, j) == "\\u" then
+ local a = string.sub(s, j + 1, j + 4)
+ j = j + 4
+ local n = tonumber(a, 16)
+ assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j)
+ -- math.floor(x/2^y) == lazy right shift
+ -- a % 2^b == bitwise_and(a, (2^b)-1)
+ -- 64 = 2^6
+ -- 4096 = 2^12 (or 2^6 * 2^6)
+ local x
+ if n < 128 then
+ x = string.char(n % 128)
+ elseif n < 2048 then
+ -- [110x xxxx] [10xx xxxx]
+ x = string.char(192 +(math.floor(n / 64) % 32), 128 +(n % 64))
+ else
+ -- [1110 xxxx] [10xx xxxx] [10xx xxxx]
+ x = string.char(224 +(math.floor(n / 4096) % 16), 128 +(math.floor(n / 64) % 64), 128 +(n % 64))
+ end
+ table.insert(t, x)
+ else
+ table.insert(t, escapeSequences[string.sub(s, i, j)])
+ end
+ end
+ table.insert(t, string.sub(j, j + 1))
+ assert(string.find(s, startChar, j + 1), "String decoding failed: missing closing " .. startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")")
+ return table.concat(t, ""), j + 2
+ -- END SoniEx2
+ end
+
+ --- Scans a JSON string skipping all whitespace from the current start position.
+ -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+ -- @param s The string being scanned
+ -- @param startPos The starting position where we should begin removing whitespace.
+ -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+ -- was reached.
+ function decode_scanWhitespace(s, startPos)
+ local whitespace = " \n\r\t"
+ local stringLen = string.len(s)
+ while(string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+ end
+
+ --- Encodes a string to be JSON-compatible.
+ -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+ -- @param s The string to return as a JSON encoded (i.e. backquoted string)
+ -- @return The string appropriately escaped.
+
+ local escapeList = {
+ ["\""] = '\\"',
+ ['\\'] = '\\\\',
+ ['/'] = '\\/',
+ [''] = '\\b',
+ ['\f'] = '\\f',
+ ['\n'] = '\\n',
+ ['\r'] = '\\r',
+ ['\t'] = '\\t'
+ }
+
+ function json_private.encodeString(s)
+ local s = tostring(s)
+ return s:gsub(".", function(c) return escapeList[c] end) -- SoniEx2: 5.0 compat
+ end
+
+ -- Determines whether the given Lua type is an array or a table / dictionary.
+ -- We consider any table an array if it has indexes 1..n for its n items, and no
+ -- other data in the table.
+ -- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+ -- @param t The table to evaluate as an array
+ -- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+ -- the second returned value is the maximum
+ -- number of indexed elements in the array.
+ function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ if(t == json.EMPTY_ARRAY) then return true, 0 end
+ if(t == json.EMPTY_OBJECT) then return false end
+
+ local maxIndex = 0
+ for k, v in pairs(t) do
+ if(type(k) == 'number' and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair
+ if(not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex, k)
+ else
+ if(k == 'n') then
+ if v ~=(t.n or # t) then return false end -- False if n does not hold the number of elements
+
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+ end
+
+ --- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+ -- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+ -- In this implementation, all other types are ignored.
+ -- @param o The object to examine.
+ -- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+ function isEncodable(o)
+ local t = type(o)
+ return(t == 'string' or t == 'boolean' or t == 'number' or t == 'nil' or t == 'table') or
+ (t == 'function' and o == json.null)
+ end
+
+ return json
+end
+local debugger_print = print
+local debug_server = nil
+local breakInfoSocket = nil
+local json = createJson()
+ LuaDebugger = {
+ fileMaps = {},
+ Run = true, --表示正常运行只检测断点
+ StepIn = false,
+ StepNext = false,
+ StepOut = false,
+ breakInfos = {},
+ runTimeType = nil,
+ isHook = true,
+ pathCachePaths = {},
+ isProntToConsole = 1,
+ isDebugPrint = true,
+ hookType = "lrc",
+ stepNextFun = nil,
+ DebugLuaFie = "",
+ runLineCount = 0,
+ version="1.0.4"
+
+
+}
+LuaDebugger.event = {
+ S2C_SetBreakPoints = 1,
+ C2S_SetBreakPoints = 2,
+ S2C_RUN = 3,
+ C2S_HITBreakPoint = 4,
+ S2C_ReqVar = 5,
+ C2S_ReqVar = 6,
+ --单步跳过请求
+ S2C_NextRequest = 7,
+ --单步跳过反馈
+ C2S_NextResponse = 8,
+ -- 单步跳过 结束 没有下一步
+ C2S_NextResponseOver = 9,
+ --单步跳入
+ S2C_StepInRequest = 10,
+ C2S_StepInResponse = 11,
+ --单步跳出
+ S2C_StepOutRequest = 12,
+ --单步跳出返回
+ C2S_StepOutResponse = 13,
+ --打印
+ C2S_LuaPrint = 14,
+ S2C_LoadLuaScript = 16,
+ C2S_SetSocketName = 17,
+ C2S_LoadLuaScript = 18,
+ C2S_DebugXpCall = 20,
+ S2C_DebugClose = 21
+}
+function print(...)
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=1}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintWarn( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=2}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+function luaIdePrintErr( ... )
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
+ debugger_print(...)
+ end
+ if(LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
+ if(debug_server) then
+ local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
+ local str = ""
+ if(#arg==0) then
+ arg = { "nil" }
+ end
+ for k, v in pairs(arg) do
+ str = str .. tostring(v) .. "\t"
+ end
+ local sendMsg = {
+ event = LuaDebugger.event.C2S_LuaPrint,
+ data = {msg = ZZBase64.encode( str),type=3}
+ }
+ local sendStr = json.encode(sendMsg)
+ debug_server:send(sendStr .. "__debugger_k0204__")
+ end
+ end
+end
+----=============================工具方法=============================================
+local debug_hook = nil
+local function debugger_strSplit(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if(delimiter == '') then return false end
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+local function debugger_strTrim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+local function debugger_dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+ local lookupTable = {}
+ local result = {}
+ local function _v(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+ end
+ local traceback = debugger_strSplit(debug.traceback("", 2), "\n")
+ print("dump from: " .. debugger_strTrim(traceback[3]))
+ local function _dump(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(_v(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[# result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value))
+ elseif lookupTable[value] then
+ result[# result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc)
+ else
+ lookupTable[value] = true
+ if nest > nesting then
+ result[# result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption)
+ else
+ result[# result + 1] = string.format("%s%s = {", indent, _v(desciption))
+ local indent2 = indent .. " "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[# keys + 1] = k
+ local vk = _v(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ _dump(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[# result + 1] = string.format("%s}", indent)
+ end
+ end
+ end
+ _dump(value, desciption, "- ", 1)
+ for i, line in ipairs(result) do
+ print(line)
+ end
+end
+
+local function debugger_setVarInfo(name, value)
+ local vt = type(value)
+ local valueStr = ""
+ if(vt ~= "table") then
+ valueStr = tostring(value)
+ valueStr = ZZBase64.encode(valueStr)
+ else
+ -- valueStr = topointer(value)
+ end
+ local valueInfo = {
+ name = name,
+ valueType = vt,
+ valueStr = valueStr
+ }
+ return valueInfo;
+end
+local function debugger_getvalue(f)
+ local i = 1
+ local locals = {}
+ -- get locals
+ while true do
+ local name, value = debug.getlocal(f, i)
+ if not name then break end
+ if(name ~= "(*temporary)") then
+ locals[name] = value
+ end
+ i = i + 1
+ end
+ local func = getinfo(f, "f").func
+ i = 1
+ local ups = {}
+ while func do -- check for func as it may be nil for tail calls
+ local name, value = debug.getupvalue(func, i)
+ if not name then break end
+ ups[name] = value
+ i = i + 1
+ end
+ return {locals = locals, ups = ups}
+end
+--获取堆栈
+debugger_stackInfo = function(ignoreCount, event)
+ local datas = {}
+ local stack = {}
+ local varInfos = {}
+ local funcs = {}
+ local index = 0;
+ for i = ignoreCount, 100 do
+ local source = getinfo(i)
+ local isadd = true
+ if(i == ignoreCount) then
+ local file = source.source
+ if(file:find(LuaDebugger.DebugLuaFie)) then
+ return
+ end
+ if(file == "=[C]") then
+ isadd = false
+
+ end
+ end
+ if not source then
+ break;
+ end
+ if(isadd) then
+ local file = source.source
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local info =
+ {
+ src = file,
+ scoreName = source.name,
+ currentline = source.currentline,
+ linedefined = source.linedefined,
+ what = source.what,
+ nameWhat = source.namewhat
+ }
+ index = i
+ local vars = debugger_getvalue(i + 1)
+ table.insert(stack, info)
+ table.insert(varInfos, vars)
+ table.insert(funcs, source.func)
+ end
+ if source.what == 'main' then break end
+ end
+ local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
+ local data = {
+ stack = stackInfo.stack,
+ vars = stackInfo.vars,
+ funcs = stackInfo.funcs,
+ event = event
+ }
+ return data
+end
+--==============================工具方法 end======================================================
+--===========================点断信息==================================================
+--根据不同的游戏引擎进行定时获取断点信息
+--CCDirector:sharedDirector():getScheduler()
+local debugger_setBreak = nil
+local function debugger_receiveDebugBreakInfo()
+ if(not jit) then
+ if(_VERSION)then
+ print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!")
+ else
+ print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
+ end
+
+ end
+ if(breakInfoSocket) then
+ local msg, status = breakInfoSocket:receive()
+ if(msg) then
+ local netData = json.decode(msg)
+ if netData.event == LuaDebugger.event.S2C_SetBreakPoints then
+ debugger_setBreak(netData.data)
+ elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
+ -- print("获取数据")
+ debugger_exeLuaString(netData.data, false)
+ end
+ end
+ end
+end
+local function splitFilePath(path)
+ local pos, arr = 0, {}
+ -- for each divider found
+ for st, sp in function() return string.find(path, '/', pos, true) end do
+ table.insert(arr, string.sub(path, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(path, pos))
+ return arr
+end
+debugger_setBreak = function(datas)
+ local breakInfos = LuaDebugger.breakInfos
+ for i, data in ipairs(datas) do
+ local breakInfo = breakInfos[data.fileName]
+ if(not breakInfo) then
+ breakInfos[data.fileName] = {}
+ breakInfo = breakInfos[data.fileName]
+ end
+ if(not data.lines or # data.lines == 0) then
+ breakInfo[data.serverPath] = nil
+ else
+ local lineInfos = {}
+ for li, line in ipairs(data.lines) do
+ lineInfos[line] = true
+ end
+ breakInfo[data.serverPath] = {
+ pathNames = splitFilePath(data.serverPath),
+ lines = lineInfos
+ }
+ end
+ local count = 0
+ for i, linesInfo in pairs(breakInfo) do
+ count = count + 1
+ end
+ if(count == 0) then
+ breakInfos[data.fileName] = nil
+ end
+ end
+ -- debugger_dump(breakInfos, "breakInfos", 6)
+ --检查是否需要断点
+ local isHook = false
+ for k, v in pairs(breakInfos) do
+ isHook = true
+ break
+ end
+ --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次
+ if(isHook) then
+ if(not LuaDebugger.isHook) then
+ debug.sethook(debug_hook, "lrc")
+ end
+ LuaDebugger.isHook = true
+
+ else
+
+ if(LuaDebugger.isHook) then
+ debug.sethook()
+ end
+ LuaDebugger.isHook = false
+ end
+end
+local function debugger_checkFileIsBreak(fileName)
+ return LuaDebugger.breakInfos[fileName]
+end
+local function debugger_checkIsBreak(fileName, line)
+ local breakInfo = LuaDebugger.breakInfos[fileName]
+ if(breakInfo) then
+ local ischeck = false
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ if(lines and lines[line]) then
+ ischeck = true
+ break
+ end
+ end
+ if(not ischeck) then return end
+ --并且在断点中
+ local info = getinfo(3)
+ local source = info.source
+ source = source:gsub("\\", "/")
+ if source:find("@") == 1 then
+ source = source:sub(2);
+ if not source:find("/") then
+ source = source:gsub("%.", "/")
+ end
+ end
+ local index = source:find("%.lua")
+ if not index then
+ source = source .. ".lua"
+ end
+ local hitPathNames = splitFilePath(source)
+ local isHit = true
+ local hitCounts = {}
+ for k, lineInfo in pairs(breakInfo) do
+ local lines = lineInfo.lines
+ local pathNames = lineInfo.pathNames
+ if(lines and lines[line]) then
+ --判断路径
+ hitCounts[k] = 0
+ local hitPathNamesCount = # hitPathNames
+ local pathNamesCount = # pathNames
+ while(true) do
+ if(pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
+ isHit = false
+ break
+ else
+ hitCounts[k] = hitCounts[k] + 1
+ end
+ pathNamesCount = pathNamesCount - 1
+ hitPathNamesCount = hitPathNamesCount - 1
+ if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
+ break;
+ end
+ end
+ end
+ end
+ local hitFieName = ""
+ local maxCount = 0
+ for k, v in pairs(hitCounts) do
+ if(v > maxCount) then
+ maxCount = v
+ hitFieName = k;
+ end
+ end
+ if(# hitPathNames == 1 or(# hitPathNames > 1 and maxCount > 1)) then
+ if(hitFieName ~= "") then
+ return hitFieName
+ end
+ end
+ end
+ return false
+end
+--=====================================断点信息 end ----------------------------------------------
+local controller_host = "192.168.1.102"
+local controller_port = 7003
+local function debugger_sendMsg(serverSocket, eventName, data)
+ local sendMsg = {
+ event = eventName,
+ data = data
+ }
+ local sendStr = json.encode(sendMsg)
+ serverSocket:send(sendStr .. "__debugger_k0204__")
+end
+--执行lua字符串
+debugger_exeLuaString = function(data, isBreakPoint)
+ local function loadScript()
+ local luastr = data.luastr
+ if(isBreakPoint) then
+ local currentTabble = {_G = _G}
+ local frameId = data.frameId
+ frameId = frameId + 1
+ local func = LuaDebugger.currentDebuggerData.funcs[frameId];
+ local vars = LuaDebugger.currentDebuggerData.vars[frameId]
+ local locals = vars.locals;
+ local ups = vars.ups
+ for k, v in pairs(ups) do
+ currentTabble[k] = v
+ end
+ for k, v in pairs(locals) do
+ currentTabble[k] = v
+ end
+ setmetatable(currentTabble, {__index = _G})
+ local fun = loadstring(luastr)
+ setfenv(fun, currentTabble)
+ fun()
+ else
+ local fun = loadstring(luastr)
+ fun()
+ end
+ end
+ local status, msg = xpcall(loadScript, function(error)
+ print(error)
+ end)
+ if(status) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "执行代码成功"})
+ if(isBreakPoint) then
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_HITBreakPoint, LuaDebugger.currentDebuggerData.stack)
+ end
+ else
+ debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, {msg = "加载代码失败"})
+ end
+end
+local function getLuaFileName(str)
+ local pos = 0
+ local fileName = "";
+ -- for each divider found
+ for st, sp in function() return string.find(str, '/', pos, true) end do
+ pos = sp + 1
+ end
+ fileName = string.sub(str, pos)
+ return fileName;
+end
+local function getSource(source)
+ if(LuaDebugger.pathCachePaths[source]) then
+ return LuaDebugger.pathCachePaths[source]
+ end
+ local file = source
+ file = file:gsub("\\", "/")
+ if file:find("@") == 1 then
+ file = file:sub(2);
+ if not file:find("/") then
+ file = file:gsub("%.", "/")
+ end
+ end
+ local index = file:find("%.lua")
+ if not index then
+ file = file .. ".lua"
+ end
+ file = getLuaFileName(file)
+ LuaDebugger.pathCachePaths[source] = file
+ return file;
+end
+local function debugger_GeVarInfoBytUserData(server,var,variablesReference,debugSpeedIndex)
+ local fileds = LuaDebugTool.getUserDataInfo(var)
+
+ local varInfos = {}
+ if(tolua) then
+ local luavars = tolua.getpeer(vars)
+ if(luavars) then
+ for k, v in pairs(luavars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(varInfos, vinfo)
+ end
+ end
+ end
+
+ --c# vars
+ for i=1,fileds.Count do
+ local filed = fileds[i-1]
+ local valueInfo = {
+ name = filed.name,
+ valueType = filed.valueType,
+ valueStr = ZZBase64.encode(filed.valueStr),
+ isValue = filed.isValue
+ }
+
+ table.insert( varInfos,valueInfo)
+
+ end
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = varInfos,
+ isComplete = 1
+ })
+end
+--获取lua 变量的方法
+local function debugger_getBreakVar(body, server)
+ local variablesReference = body.variablesReference
+ local debugSpeedIndex = body.debugSpeedIndex
+ local vinfos = {}
+ local function exe()
+
+ local frameId = body.frameId;
+ local type_ = body.type;
+ local keys = body.keys;
+ --找到对应的var
+ local vars = nil
+ if(type_ == 1) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.locals
+ elseif(type_ == 2) then
+ vars = LuaDebugger.currentDebuggerData.vars[frameId + 1]
+ vars = vars.ups
+ elseif(type_ == 3) then
+ vars = _G
+ end
+
+ --特殊处理下
+ for i, v in ipairs(keys) do
+ local start_m = string.sub(v,1,1)
+ if(start_m == "[") then
+ local len = string.len( v )
+ local end_m = string.sub(v,len,len)
+ if(end_m == "]") then
+ v = string.sub(v,2,len-1);
+ end
+ vars = vars[v]
+ else
+ vars = vars[v]
+ end
+ if(type(vars) == "userdata" and tolua ~= nil and LuaDebugTool == nil) then
+ vars = tolua.getpeer(vars)
+ end
+ if(vars == nil) then
+ break;
+ end
+ end
+
+if(varType == "userdata" ) then
+ if(LuaDebugTool) then
+ debugger_GeVarInfoBytUserData(server,vars,variablesReference,debugSpeedIndex)
+ return;
+ elseif(tolua == nil) then
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ return
+ end
+ end
+
+ local count = 0;
+ if(vars ~= nil) then
+ for k, v in pairs(vars) do
+ local vinfo = debugger_setVarInfo(k, v)
+ table.insert(vinfos, vinfo)
+ if(# vinfos > 10) then
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 0
+ })
+ vinfos = {}
+ end
+ end
+ end
+ debugger_sendMsg(server, LuaDebugger.event.C2S_ReqVar, {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = vinfos,
+ isComplete = 1
+ })
+ end
+ xpcall(exe, function(error)
+ print("获取变量错误 错误消息-----------------")
+ print(error)
+ print(debug.traceback("", 2))
+ debugger_sendMsg(server,
+ LuaDebugger.event.C2S_ReqVar,
+ {
+ variablesReference = variablesReference,
+ debugSpeedIndex = debugSpeedIndex,
+ vars = {
+ {
+ name ="error",
+ valueType = "string",
+ valueStr = ZZBase64.encode("无法获取属性值"),
+ isValue = false
+ }
+ },
+ isComplete = 1
+ })
+ end)
+end
+local function ResetDebugInfo()
+ LuaDebugger.Run = false
+ LuaDebugger.StepIn = false
+ LuaDebugger.StepNext = false
+ LuaDebugger.StepOut = false
+end
+local function debugger_loop(server)
+ server = debug_server
+ --命令
+ local command
+ local eval_env = {}
+ local arg
+ while true do
+ local line, status,tempaaa = server:receive()
+
+ if(status == "closed") then
+ debug.sethook()
+ coroutine.yield()
+ end
+ if(line) then
+ local netData = json.decode(line)
+ local event = netData.event;
+ local body = netData.data;
+ if(event == LuaDebugger.event.S2C_DebugClose) then
+ debug.sethook()
+ coroutine.yield()
+
+ elseif event == LuaDebugger.event.S2C_SetBreakPoints then --设置断点信息
+
+ local function setB()
+ debugger_setBreak(body)
+ end
+ xpcall(setB, function(error)
+ print(error)
+ end)
+ elseif event == LuaDebugger.event.S2C_RUN then --开始运行
+
+ LuaDebugger.runTimeType = body.runTimeType
+ LuaDebugger.isProntToConsole = body.isProntToConsole
+
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+
+ local data = coroutine.yield()
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息
+ --请求数据信息
+ debugger_getBreakVar(body, server)
+ elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过
+
+
+ ResetDebugInfo()
+ LuaDebugger.StepNext = true
+
+
+ --设置当前文件名和当前行数
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack
+ })
+ elseif(event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入
+ --单步跳入
+ ResetDebugInfo();
+ LuaDebugger.StepIn = true
+
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif(event == LuaDebugger.event.S2C_StepOutRequest) then
+ --单步跳出
+ ResetDebugInfo()
+ LuaDebugger.StepOut = true
+ local data = coroutine.yield()
+ --重置调试信息
+ LuaDebugger.currentDebuggerData = data;
+ debugger_sendMsg(server, data.event, {
+ stack = data.stack,
+ eventType = data.eventType
+ })
+ elseif event == LuaDebugger.event.S2C_LoadLuaScript then
+ debugger_exeLuaString(body, true)
+ end
+ end
+ end
+end
+coro_debugger = coroutine.create(debugger_loop)
+debug_hook = function(event, line)
+ local file = nil
+ if(event == "line") then
+ local funs = nil
+ local funlength =0
+ if(LuaDebugger.currentDebuggerData) then
+ funs = LuaDebugger.currentDebuggerData.funcs
+ funlength = #funs
+ end
+ local stepInfo = getinfo(2)
+ local tempFunc = stepInfo.func
+ local source = stepInfo.source
+ file = getSource(source);
+ if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
+ if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
+ LuaDebugger.runLineCount = LuaDebugger.runLineCount+1
+ end
+ if(LuaDebugger.StepOut) then
+ if(funlength == 1) then
+ ResetDebugInfo();
+ LuaDebugger.Run = true
+ return
+ else
+ if(funs[2] == tempFunc) then
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ -- print("StepIn 挂起")
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ end
+ end
+ if(LuaDebugger.StepIn) then
+ if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
+ return
+ end
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
+ -- print("StepIn 挂起")
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ if(LuaDebugger.StepNext ) then
+ if(LuaDebugger.currentLine == line) then
+ return
+ end
+ if(funs) then
+ if(funs[1] ~= tempFunc) then
+ --判断是否是和下一个fun 相同如果相同
+ if(funlength >1) then
+ if(funs[2] == tempFunc) then
+ else
+ return
+ end
+ else
+ return
+ end
+ end
+ end
+ local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
+ LuaDebugger.runLineCount = 0
+ LuaDebugger.currentLine = line
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ return
+ end
+ local isHit = false
+ local sevent = nil
+ --断点判断
+ if(isHit == false and debugger_checkIsBreak(file, line)) then
+ if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
+ LuaDebugger.runLineCount = 0
+ return
+ end
+ LuaDebugger.runLineCount = 0
+ LuaDebugger.currentLine = line
+ isHit = true
+ sevent = LuaDebugger.event.C2S_HITBreakPoint
+ --调用 coro_debugger 并传入 参数
+ local data = debugger_stackInfo(3, sevent)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+ end
+ end
+end
+local function debugger_xpcall()
+ --调用 coro_debugger 并传入 参数
+
+ local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
+ --挂起等待调试器作出反应
+ coroutine.resume(coro_debugger, data)
+end
+--调试开始
+local function start()
+
+ local socket = createSocket()
+ print(controller_host)
+ print(controller_port)
+
+
+ local server = socket.connect(controller_host, controller_port)
+ debug_server = server;
+ if server then
+ --创建breakInfo socket
+ socket = createSocket()
+ breakInfoSocket = socket.connect(controller_host, controller_port)
+ if(breakInfoSocket) then
+ breakInfoSocket:settimeout(0)
+ debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
+ name = "breakPointSocket"
+ })
+
+
+ debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, {
+ name = "mainSocket",
+ version = LuaDebugger.version
+ })
+ xpcall(function()
+ sethook(debug_hook, "lrc")
+ end, function(error)
+ print("error:", error)
+ end)
+ if(not jit) then
+ if(_VERSION)then
+ print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!")
+ else
+ print("当前为lua版本,请使用LuaDebug 进行调试!")
+ end
+
+ end
+ coroutine.resume(coro_debugger, server)
+ end
+ end
+end
+function StartDebug(host, port)
+
+
+ LuaDebugger.DebugLuaFie = getLuaFileName(getinfo(1).source)
+ local index = LuaDebugger.DebugLuaFie:find("%.lua")
+ if index then
+ local fileNameLength = string.len(LuaDebugger.DebugLuaFie)
+ LuaDebugger.DebugLuaFie = LuaDebugger.DebugLuaFie:sub(1,fileNameLength-4)
+
+ end
+ if(not host) then
+ print("error host nil")
+ end
+ if(not port) then
+ print("error prot nil")
+ end
+ if(type(host) ~= "string") then
+ print("error host not string")
+ end
+ if(type(port) ~= "number") then
+ print("error host not number")
+ end
+ controller_host = host
+ controller_port = port
+ xpcall(start, function(error)
+ -- body
+ print(error)
+ end)
+ return debugger_receiveDebugBreakInfo, debugger_xpcall
+end
+
+
+--base64
+
+local string = string
+
+ZZBase64.__code = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
+ };
+ZZBase64.__decode = {}
+for k,v in pairs(ZZBase64.__code) do
+ ZZBase64.__decode[string.byte(v,1)] = k - 1
+end
+
+function ZZBase64.encode(text)
+ local len = string.len(text)
+ local left = len % 3
+ len = len - left
+ local res = {}
+ local index = 1
+ for i = 1, len, 3 do
+ local a = string.byte(text, i )
+ local b = string.byte(text, i + 1)
+ local c = string.byte(text, i + 2)
+ -- num = a<<16 + b<<8 + c
+ local num = a * 65536 + b * 256 + c
+ for j = 1, 4 do
+ --tmp = num >> ((4 -j) * 6)
+ local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
+ --curPos = tmp&0x3f
+ local curPos = tmp % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+ index = index + 1
+ end
+ end
+
+ if left == 1 then
+ ZZBase64.__left1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__left2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__left2(res, index, text, len)
+ local num1 = string.byte(text, len + 1)
+ num1 = num1 * 1024 --lshift 10
+ local num2 = string.byte(text, len + 2)
+ num2 = num2 * 4 --lshift 2
+ local num = num1 + num2
+
+ local tmp1 = math.floor(num / 4096) --rShift 12
+ local curPos = tmp1 % 64 + 1
+ res[index] = ZZBase64.__code[curPos]
+
+ local tmp2 = math.floor(num / 64)
+ curPos = tmp2 % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 2] = ZZBase64.__code[curPos]
+
+ res[index + 3] = "="
+end
+
+function ZZBase64.__left1(res, index,text, len)
+ local num = string.byte(text, len + 1)
+ num = num * 16
+
+ local tmp = math.floor(num / 64)
+ local curPos = tmp % 64 + 1
+ res[index ] = ZZBase64.__code[curPos]
+
+ curPos = num % 64 + 1
+ res[index + 1] = ZZBase64.__code[curPos]
+
+ res[index + 2] = "="
+ res[index + 3] = "="
+end
+
+function ZZBase64.decode(text)
+ local len = string.len(text)
+ local left = 0
+ if string.sub(text, len - 1) == "==" then
+ left = 2
+ len = len - 4
+ elseif string.sub(text, len) == "=" then
+ left = 1
+ len = len - 4
+ end
+
+ local res = {}
+ local index = 1
+ local decode = ZZBase64.__decode
+ for i =1, len, 4 do
+ local a = decode[string.byte(text,i )]
+ local b = decode[string.byte(text,i + 1)]
+ local c = decode[string.byte(text,i + 2)]
+ local d = decode[string.byte(text,i + 3)]
+
+ --num = a<<18 + b<<12 + c<<6 + d
+ local num = a * 262144 + b * 4096 + c * 64 + d
+
+ local e = string.char(num % 256)
+ num = math.floor(num / 256)
+ local f = string.char(num % 256)
+ num = math.floor(num / 256)
+ res[index ] = string.char(num % 256)
+ res[index + 1] = f
+ res[index + 2] = e
+ index = index + 3
+ end
+
+ if left == 1 then
+ ZZBase64.__decodeLeft1(res, index, text, len)
+ elseif left == 2 then
+ ZZBase64.__decodeLeft2(res, index, text, len)
+ end
+ return table.concat(res)
+end
+
+function ZZBase64.__decodeLeft1(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local c = decode[string.byte(text, len + 3)]
+ local num = a * 4096 + b * 64 + c
+
+ local num1 = math.floor(num / 1024) % 256
+ local num2 = math.floor(num / 4) % 256
+ res[index] = string.char(num1)
+ res[index + 1] = string.char(num2)
+end
+
+function ZZBase64.__decodeLeft2(res, index, text, len)
+ local decode = ZZBase64.__decode
+ local a = decode[string.byte(text, len + 1)]
+ local b = decode[string.byte(text, len + 2)]
+ local num = a * 64 + b
+ num = math.floor(num / 16)
+ res[index] = string.char(num)
+end
+return StartDebug
diff --git a/src/app/MyApp.lua b/src/app/MyApp.lua
new file mode 100644
index 0000000..e8d1a9f
--- /dev/null
+++ b/src/app/MyApp.lua
@@ -0,0 +1,8 @@
+
+local MyApp = class("MyApp", cc.load("mvc").AppBase)
+
+function MyApp:onCreate()
+ math.randomseed(os.time())
+end
+
+return MyApp
diff --git a/src/app/views/MainScene.lua b/src/app/views/MainScene.lua
new file mode 100644
index 0000000..f494f2a
--- /dev/null
+++ b/src/app/views/MainScene.lua
@@ -0,0 +1,47 @@
+
+local MainScene = class("MainScene", cc.load("mvc").ViewBase)
+
+local pukeEffect = import(".pokerEffects")
+
+--MainScene.RESOURCE_FILENAME = "MainScene.csb"
+
+function MainScene:onCreate()
+ printf("resource node = %s", tostring(self:getResourceNode()))
+
+ -- you can create scene with following comment code instead of using csb file.
+ -- add background image
+ -- display.newSprite("HelloWorld.png")
+ -- :move(display.center)
+ -- :addTo(self)
+
+ -- -- add HelloWorld label
+ -- local s = cc.Label:createWithSystemFont("Hello World", "Arial", 60)
+ -- :move(display.cx, display.cy + 200)
+ -- :addTo(self)
+
+ -- self:cutpuc("vsc.png",s,function( path )
+ -- -- body
+ -- end)
+
+ local pukeLayer = pukeEffect("paibei.png","1.png")
+ pukeLayer:addTo(self)
+
+end
+
+
+function MainScene:cutpuc(path,node,call_func)
+ local size = node:getContentSize()
+ local _render_texture = cc.RenderTexture:create(size.width,size.height)
+ local x,y = node:getPosition()
+ --node:setPosition(0,0)
+ _render_texture:beginWithClear(0,0,0,0)
+ node:visit()
+ _render_texture:endToLua()
+ node:setPosition(x,y)
+ _render_texture:saveToFile(path,cc.IMAGE_FORMAT_PNG,true,function(_save)
+ Log.d("render texture save succeed:".._save)
+ call_func(_save)
+ end)
+end
+
+return MainScene
diff --git a/src/app/views/pokerEffects.lua b/src/app/views/pokerEffects.lua
new file mode 100644
index 0000000..0bcb985
--- /dev/null
+++ b/src/app/views/pokerEffects.lua
@@ -0,0 +1,263 @@
+-- date:2017/9/26
+-- author:looyer
+-- purpose:3D搓牌效果层,
+
+-- 顶点着色器
+local strVertSource =
+[[
+attribute vec4 a_position;
+attribute vec2 a_texCoord;
+attribute vec4 a_color;
+
+uniform float ratio; //牌初始状态到搓牌最终位置的完成度比例
+uniform float radius; //搓牌类似于绕圆柱滚起,其圆柱的半径
+uniform float width;
+uniform float finish; //是否完成搓牌
+
+uniform float offx;
+uniform float offy;
+
+varying vec4 v_fragmentColor;
+varying vec2 v_texCoord;
+
+void main()
+{
+ //注意OpenGL-ES中:1.attribute修饰的变量是常量。2.没有自动转类型float a = 1;或者5.0/3都是错误的
+
+ //这两个问题改了两天,可以通过修改CPP代码,打印log来调试cocos2dx程序
+ vec4 tmp_pos = a_position;
+
+ //顺时针旋转90度
+ tmp_pos = vec4(tmp_pos.y, -tmp_pos.x, tmp_pos.z, tmp_pos.w);
+
+ if(finish > 0.5) {
+ tmp_pos = vec4(tmp_pos.x, -width - tmp_pos.y, tmp_pos.z, tmp_pos.w);
+
+ }else {
+ //计算卡牌弯曲的位置,类似于卡牌绕圆柱卷起的原理
+
+ float halfPeri = radius * 3.14159; //半周长
+ float hr = halfPeri * ratio;
+ if(tmp_pos.y < -width + hr) {
+ float dy = -tmp_pos.y - (width - hr);
+ float arc = dy/radius;
+ tmp_pos.y = -width + hr - sin(arc)*radius;
+ tmp_pos.z = radius * (1.0-cos(arc)); //注意之前这里是1,是错误的,opengles不自动类型转换
+ }
+ }
+
+
+ tmp_pos += vec4(offx, offy, 0.0, 0.0);
+
+ gl_Position = CC_MVPMatrix * tmp_pos;
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+}
+]]
+
+-- 片段着色器
+local strFragSource =
+[[
+varying vec4 v_fragmentColor;
+varying vec2 v_texCoord;
+
+void main()
+{
+ //TODO, 这里可以做些片段着色特效
+
+ gl_FragColor = texture2D(CC_Texture0, v_texCoord);
+}
+]]
+
+-- 通过图片取得纹理id,和该纹理在plist图中的纹理坐标范围
+local function getTextureAndRange(szImage)
+ -- local FrameCache = cc.SpriteFrameCache:getInstance()
+ -- local sprite = FrameCache:getSpriteFrameByName(szImage)
+ local sprite = cc.Sprite:create(szImage)
+ local rect = sprite:getTextureRect()
+ local tex = sprite:getTexture()
+ local id = tex:getName() --纹理ID
+ local bigWide = tex:getPixelsWide() --plist图集的宽度
+ local bigHigh = tex:getPixelsHigh()
+
+ -- 左右上下的纹理范围
+ local ll, rr, tt, bb = rect.x/bigWide, (rect.x + rect.width)/bigWide, rect.y/bigHigh, (rect.y + rect.height)/bigHigh
+ return id, {ll, rr, tt, bb}, {rect.width, rect.height}
+end
+
+-- 创建3D牌面,所需的顶点和纹理数据, size:宽高, texRange:纹理范围, bFront:是否正面
+local function initCardVertex(size, texRange, bFront)
+ local nDiv = 200 --将宽分成100份
+
+ local verts = {} --位置坐标
+ local texs = {} --纹理坐标
+ local dh = size.height
+ local dw = size.width/nDiv
+
+ --计算顶点位置
+ for c = 1, nDiv do
+ local x, y = (c-1)*dw, 0
+ local quad = {}
+ if bFront then
+ quad = {x, y, x+dw, y, x, y+dh, x+dw, y, x+dw, y+dh, x, y+dh}
+ else
+ quad = {x, y, x, y+dh, x+dw, y, x+dw, y, x, y+dh, x+dw, y+dh}
+ end
+ for _, v in ipairs(quad) do table.insert(verts, v) end
+ end
+
+ local bXTex = true --是否当前在计算横坐标纹理坐标,
+ for _, v in ipairs(verts) do
+ if bXTex then
+ if bFront then
+ table.insert(texs, v/size.width * (texRange[2] - texRange[1]) + texRange[1])
+ else
+ table.insert(texs, v/size.width * (texRange[1] - texRange[2]) + texRange[2])
+ end
+ else
+ if bFront then
+ table.insert(texs, (1-v/size.height) * (texRange[4] - texRange[3]) + texRange[3])
+ else
+ table.insert(texs, v/size.height * (texRange[3] - texRange[4]) + texRange[4])
+ end
+ end
+ bXTex = not bXTex
+ end
+
+ local res = {}
+ local tmp = {verts, texs}
+ for _, v in ipairs(tmp) do
+ local buffid = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffid)
+ gl.bufferData(gl.ARRAY_BUFFER, table.getn(v), v, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ table.insert(res, buffid)
+ end
+ return res, #verts
+end
+
+-- 创建搓牌效果层, pList:图片合集.plist文件, szBack:牌背面图片名, szFont:牌正面图片名, 注意:默认传入的牌在plist文件中是竖直的, scale缩放比
+local function createRubCardEffectLayer(--[[pList,]] szBack, szFont, scale)
+ scale = scale or 1.0
+
+ --预加载pList图集(注重复添加没关系,只会保存一份)
+-- local FrameCache = cc.SpriteFrameCache:getInstance()
+-- FrameCache:addSpriteFrames(pList)
+
+ -- 取得屏幕宽高
+ local Director = cc.Director:getInstance()
+ local WinSize = Director:getWinSize()
+
+ -- 创建广角60度,视口宽高比是屏幕宽高比,近平面1.0,远平面1000.0,的视景体
+ local camera = cc.Camera:createPerspective(45, WinSize.width/WinSize.height, 1, 1000)
+ camera:setCameraFlag(cc.CameraFlag.USER2)
+ --设置摄像机的绘制顺序,越大的深度越绘制的靠上,所以默认摄像机默认是0,其他摄像机默认是1, 这句很重要!!
+ camera:setDepth(1)
+ camera:setPosition3D(cc.vec3(0, 0, 800))
+ camera:lookAt(cc.vec3(0, 0, 0), cc.vec3(0, 1, 0))
+
+ -- 创建用于OpenGL绘制的节点
+ local glNode = gl.glNodeCreate()
+ local glProgram = cc.GLProgram:createWithByteArrays(strVertSource, strFragSource)
+ glProgram:retain()
+ glProgram:updateUniforms()
+
+ -- 创建搓牌图层
+ local layer = cc.Layer:create()
+ layer:setCameraMask(cc.CameraFlag.USER2)
+ layer:addChild(glNode)
+ layer:addChild(camera)
+
+ -- 退出时,释放glProgram程序
+ local function onNodeEvent(event)
+ if "exit" == event then
+ glProgram:release()
+ end
+ end
+ layer:registerScriptHandler(onNodeEvent)
+
+ local posNow = cc.p(0, 0)
+ --创建触摸回调
+ local function touchBegin(touch, event)
+ posNow = touch:getLocation()
+ return true
+ end
+ local function touchMove(touch, event)
+ local location = touch:getLocation()
+ local dy = location.y - posNow.y
+
+ layer.ratioVal = cc.clampf(layer.ratioVal + dy/100, 0.0, 0.9) --最大程度默认0.9
+ posNow = location
+ return true
+ end
+ local function touchEnd(touch, event)
+ layer.ratioVal = 0.0
+ return true
+ end
+ local listener = cc.EventListenerTouchOneByOne:create()
+ listener:registerScriptHandler(touchBegin, cc.Handler.EVENT_TOUCH_BEGAN )
+ listener:registerScriptHandler(touchMove, cc.Handler.EVENT_TOUCH_MOVED )
+ listener:registerScriptHandler(touchEnd, cc.Handler.EVENT_TOUCH_ENDED )
+ local eventDispatcher = layer:getEventDispatcher()
+ eventDispatcher:addEventListenerWithSceneGraphPriority(listener, layer)
+
+ --创建牌的背面
+ local id1, texRange1, sz1 = getTextureAndRange(szBack)
+ local msh1, nVerts1 = initCardVertex(cc.size(sz1[1] * scale, sz1[2] * scale), texRange1, true)
+ --创建牌的正面
+ local id2, texRange2, sz2 = getTextureAndRange(szFont)
+ local msh2, nVerts2 = initCardVertex(cc.size(sz2[1] * scale, sz2[2] * scale), texRange2, false)
+
+ --搓牌的程度控制, 搓牌类似于通过一个圆柱滚动将牌粘着起来的效果。下面的参数就是滚动程度和圆柱半径
+ layer.ratioVal = 0.0
+ layer.radiusVal = sz1[1]*scale/math.pi;
+
+ --牌的渲染信息
+ local cardMesh = {{id1, msh1, nVerts1}, {id2, msh2, nVerts2}}
+ -- OpenGL绘制函数
+ local function draw(transform, transformUpdated)
+ gl.enable(gl.CULL_FACE)
+ glProgram:use()
+ glProgram:setUniformsForBuiltins()
+
+ for _, v in ipairs(cardMesh) do
+ gl.bindTexture(gl.TEXTURE_2D, v[1])
+
+ -- 传入搓牌程度到着色器中,进行位置计算
+ local ratio = gl.getUniformLocation(glProgram:getProgram(), "ratio")
+ glProgram:setUniformLocationF32(ratio, layer.ratioVal)
+ local radius = gl.getUniformLocation(glProgram:getProgram(), "radius")
+ glProgram:setUniformLocationF32(radius, layer.radiusVal)
+
+ -- 偏移牌,使得居中
+ local offx = gl.getUniformLocation(glProgram:getProgram(), "offx")
+ glProgram:setUniformLocationF32(offx, WinSize.width/2 - sz1[2]/2*scale)
+ local offy = gl.getUniformLocation(glProgram:getProgram(), "offy")
+ glProgram:setUniformLocationF32(offy, WinSize.height/2 + sz1[1]/2*scale)
+
+ local width = gl.getUniformLocation(glProgram:getProgram(), "width")
+ glProgram:setUniformLocationF32(width, sz1[1]*scale)
+ local progress = 0
+ if layer.ratioVal > 0.8 then
+ progress = 1
+ end
+ print("Pregress"..progress)
+ local width = gl.getUniformLocation(glProgram:getProgram(), "finish")
+ glProgram:setUniformLocationF32(finish,progress)
+
+ gl.glEnableVertexAttribs(bit._or(cc.VERTEX_ATTRIB_FLAG_TEX_COORDS, cc.VERTEX_ATTRIB_FLAG_POSITION))
+ gl.bindBuffer(gl.ARRAY_BUFFER, v[2][1])
+ gl.vertexAttribPointer(cc.VERTEX_ATTRIB_POSITION,2,gl.FLOAT,false,0,0)
+ gl.bindBuffer(gl.ARRAY_BUFFER, v[2][2])
+ gl.vertexAttribPointer(cc.VERTEX_ATTRIB_TEX_COORD,2,gl.FLOAT,false,0,0)
+ gl.drawArrays(gl.TRIANGLES, 0, v[3])
+ end
+ gl.bindTexture(gl.TEXTURE_2D, 0)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+ glNode:registerScriptDrawHandler(draw)
+
+ return layer
+end
+
+return createRubCardEffectLayer
\ No newline at end of file
diff --git a/src/cocos/3d/3dConstants.lua b/src/cocos/3d/3dConstants.lua
new file mode 100644
index 0000000..cd0d602
--- /dev/null
+++ b/src/cocos/3d/3dConstants.lua
@@ -0,0 +1,16 @@
+if nil == cc.Terrain then
+ return
+end
+
+cc.Terrain.CrackFixedType =
+{
+ SKIRT = 0,
+ INCREASE_LOWER = 1,
+}
+
+cc.Animate3DQuality =
+{
+ QUALITY_NONE = 0,
+ QUALITY_LOW = 1,
+ QUALITY_HIGH = 2,
+}
diff --git a/src/cocos/cocos2d/Cocos2d.lua b/src/cocos/cocos2d/Cocos2d.lua
new file mode 100644
index 0000000..6b451c3
--- /dev/null
+++ b/src/cocos/cocos2d/Cocos2d.lua
@@ -0,0 +1,580 @@
+
+cc = cc or {}
+
+function cc.clampf(value, min_inclusive, max_inclusive)
+ -- body
+ local temp = 0
+ if min_inclusive > max_inclusive then
+ temp = min_inclusive
+ min_inclusive = max_inclusive
+ max_inclusive = temp
+ end
+
+ if value < min_inclusive then
+ return min_inclusive
+ elseif value < max_inclusive then
+ return value
+ else
+ return max_inclusive
+ end
+end
+
+--Point
+function cc.p(_x,_y)
+ if nil == _y then
+ return { x = _x.x, y = _x.y }
+ else
+ return { x = _x, y = _y }
+ end
+end
+
+function cc.pAdd(pt1,pt2)
+ return {x = pt1.x + pt2.x , y = pt1.y + pt2.y }
+end
+
+function cc.pSub(pt1,pt2)
+ return {x = pt1.x - pt2.x , y = pt1.y - pt2.y }
+end
+
+function cc.pMul(pt1,factor)
+ return { x = pt1.x * factor , y = pt1.y * factor }
+end
+
+function cc.pMidpoint(pt1,pt2)
+ return { x = (pt1.x + pt2.x) / 2.0 , y = ( pt1.y + pt2.y) / 2.0 }
+end
+
+function cc.pForAngle(a)
+ return { x = math.cos(a), y = math.sin(a) }
+end
+
+function cc.pGetLength(pt)
+ return math.sqrt( pt.x * pt.x + pt.y * pt.y )
+end
+
+function cc.pNormalize(pt)
+ local length = cc.pGetLength(pt)
+ if 0 == length then
+ return { x = 1.0,y = 0.0 }
+ end
+
+ return { x = pt.x / length, y = pt.y / length }
+end
+
+function cc.pCross(self,other)
+ return self.x * other.y - self.y * other.x
+end
+
+function cc.pDot(self,other)
+ return self.x * other.x + self.y * other.y
+end
+
+function cc.pToAngleSelf(self)
+ return math.atan2(self.y, self.x)
+end
+
+function cc.pGetAngle(self,other)
+ local a2 = cc.pNormalize(self)
+ local b2 = cc.pNormalize(other)
+ local angle = math.atan2(cc.pCross(a2, b2), cc.pDot(a2, b2) )
+ if math.abs(angle) < 1.192092896e-7 then
+ return 0.0
+ end
+
+ return angle
+end
+
+function cc.pGetDistance(startP,endP)
+ return cc.pGetLength(cc.pSub(startP,endP))
+end
+
+function cc.pIsLineIntersect(A, B, C, D, s, t)
+ if ((A.x == B.x) and (A.y == B.y)) or ((C.x == D.x) and (C.y == D.y))then
+ return false, s, t
+ end
+
+ local BAx = B.x - A.x
+ local BAy = B.y - A.y
+ local DCx = D.x - C.x
+ local DCy = D.y - C.y
+ local ACx = A.x - C.x
+ local ACy = A.y - C.y
+
+ local denom = DCy * BAx - DCx * BAy
+ s = DCx * ACy - DCy * ACx
+ t = BAx * ACy - BAy * ACx
+
+ if (denom == 0) then
+ if (s == 0 or t == 0) then
+ return true, s , t
+ end
+
+ return false, s, t
+ end
+
+ s = s / denom
+ t = t / denom
+
+ return true,s,t
+end
+
+function cc.pPerp(pt)
+ return { x = -pt.y, y = pt.x }
+end
+
+function cc.RPerp(pt)
+ return { x = pt.y, y = -pt.x }
+end
+
+function cc.pProject(pt1, pt2)
+ return { x = pt2.x * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) , y = pt2.y * (cc.pDot(pt1,pt2) / cc.pDot(pt2,pt2)) }
+end
+
+function cc.pRotate(pt1, pt2)
+ return { x = pt1.x * pt2.x - pt1.y * pt2.y, y = pt1.x * pt2.y + pt1.y * pt2.x }
+end
+
+function cc.pUnrotate(pt1, pt2)
+ return { x = pt1.x * pt2.x + pt1.y * pt2.y, pt1.y * pt2.x - pt1.x * pt2.y }
+end
+--Calculates the square length of pt
+function cc.pLengthSQ(pt)
+ return cc.pDot(pt,pt)
+end
+--Calculates the square distance between pt1 and pt2
+function cc.pDistanceSQ(pt1,pt2)
+ return cc.pLengthSQ(cc.pSub(pt1,pt2))
+end
+
+function cc.pGetClampPoint(pt1,pt2,pt3)
+ return { x = cc.clampf(pt1.x, pt2.x, pt3.x), y = cc.clampf(pt1.y, pt2.y, pt3.y) }
+end
+
+function cc.pFromSize(sz)
+ return { x = sz.width, y = sz.height }
+end
+
+function cc.pLerp(pt1,pt2,alpha)
+ return cc.pAdd(cc.pMul(pt1, 1.0 - alpha), cc.pMul(pt2,alpha) )
+end
+
+function cc.pFuzzyEqual(pt1,pt2,variance)
+ if (pt1.x - variance <= pt2.x) and (pt2.x <= pt1.x + variance) and (pt1.y - variance <= pt2.y) and (pt2.y <= pt1.y + variance) then
+ return true
+ else
+ return false
+ end
+end
+
+function cc.pRotateByAngle(pt1, pt2, angle)
+ return cc.pAdd(pt2, cc.pRotate( cc.pSub(pt1, pt2),cc.pForAngle(angle)))
+end
+
+function cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
+ local s,t,ret = 0,0,false
+ ret,s,t =cc.pIsLineIntersect(pt1, pt2, pt3, pt4,s,t)
+
+ if ret and s >= 0.0 and s <= 1.0 and t >= 0.0 and t <= 1.0 then
+ return true
+ end
+
+ return false
+end
+
+function cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
+ local s,t, ret = 0,0,false
+ ret,s,t = cc.pIsLineIntersect(pt1,pt2,pt3,pt4,s,t)
+ if ret then
+ return cc.p(pt1.x + s * (pt2.x - pt1.x), pt1.y + s * (pt2.y - pt1.y))
+ else
+ return cc.p(0,0)
+ end
+end
+--Size
+function cc.size( _width,_height )
+ return { width = _width, height = _height }
+end
+
+--Rect
+function cc.rect(_x,_y,_width,_height)
+ return { x = _x, y = _y, width = _width, height = _height }
+end
+
+function cc.rectEqualToRect(rect1,rect2)
+ if ((rect1.x >= rect2.x) or (rect1.y >= rect2.y) or
+ ( rect1.x + rect1.width <= rect2.x + rect2.width) or
+ ( rect1.y + rect1.height <= rect2.y + rect2.height)) then
+ return false
+ end
+
+ return true
+end
+
+function cc.rectGetMaxX(rect)
+ return rect.x + rect.width
+end
+
+function cc.rectGetMidX(rect)
+ return rect.x + rect.width / 2.0
+end
+
+function cc.rectGetMinX(rect)
+ return rect.x
+end
+
+function cc.rectGetMaxY(rect)
+ return rect.y + rect.height
+end
+
+function cc.rectGetMidY(rect)
+ return rect.y + rect.height / 2.0
+end
+
+function cc.rectGetMinY(rect)
+ return rect.y
+end
+
+function cc.rectContainsPoint( rect, point )
+ local ret = false
+
+ if (point.x >= rect.x) and (point.x <= rect.x + rect.width) and
+ (point.y >= rect.y) and (point.y <= rect.y + rect.height) then
+ ret = true
+ end
+
+ return ret
+end
+
+function cc.rectIntersectsRect( rect1, rect2 )
+ local intersect = not ( rect1.x > rect2.x + rect2.width or
+ rect1.x + rect1.width < rect2.x or
+ rect1.y > rect2.y + rect2.height or
+ rect1.y + rect1.height < rect2.y )
+
+ return intersect
+end
+
+function cc.rectUnion( rect1, rect2 )
+ local rect = cc.rect(0, 0, 0, 0)
+ rect.x = math.min(rect1.x, rect2.x)
+ rect.y = math.min(rect1.y, rect2.y)
+ rect.width = math.max(rect1.x + rect1.width, rect2.x + rect2.width) - rect.x
+ rect.height = math.max(rect1.y + rect1.height, rect2.y + rect2.height) - rect.y
+ return rect
+end
+
+function cc.rectIntersection( rect1, rect2 )
+ local intersection = cc.rect(
+ math.max(rect1.x, rect2.x),
+ math.max(rect1.y, rect2.y),
+ 0, 0)
+
+ intersection.width = math.min(rect1.x + rect1.width, rect2.x + rect2.width) - intersection.x
+ intersection.height = math.min(rect1.y + rect1.height, rect2.y + rect2.height) - intersection.y
+ return intersection
+end
+
+--Color3B
+function cc.c3b( _r,_g,_b )
+ return { r = _r, g = _g, b = _b }
+end
+
+--Color4B
+function cc.c4b( _r,_g,_b,_a )
+ return { r = _r, g = _g, b = _b, a = _a }
+end
+
+--Color4F
+function cc.c4f( _r,_g,_b,_a )
+ return { r = _r, g = _g, b = _b, a = _a }
+end
+
+local function isFloatColor(c)
+ return (c.r <= 1 and c.g <= 1 and c.b <= 1) and (math.ceil(c.r) ~= c.r or math.ceil(c.g) ~= c.g or math.ceil(c.b) ~= c.b)
+end
+
+function cc.convertColor(input, typ)
+ assert(type(input) == "table" and input.r and input.g and input.b, "cc.convertColor() - invalid input color")
+ local ret
+ if typ == "3b" then
+ if isFloatColor(input) then
+ ret = {r = math.ceil(input.r * 255), g = math.ceil(input.g * 255), b = math.ceil(input.b * 255)}
+ else
+ ret = {r = input.r, g = input.g, b = input.b}
+ end
+ elseif typ == "4b" then
+ if isFloatColor(input) then
+ ret = {r = math.ceil(input.r * 255), g = math.ceil(input.g * 255), b = math.ceil(input.b * 255)}
+ else
+ ret = {r = input.r, g = input.g, b = input.b}
+ end
+ if input.a then
+ if math.ceil(input.a) ~= input.a or input.a >= 1 then
+ ret.a = input.a * 255
+ else
+ ret.a = input.a
+ end
+ else
+ ret.a = 255
+ end
+ elseif typ == "4f" then
+ if isFloatColor(input) then
+ ret = {r = input.r, g = input.g, b = input.b}
+ else
+ ret = {r = input.r / 255, g = input.g / 255, b = input.b / 255}
+ end
+ if input.a then
+ if math.ceil(input.a) ~= input.a or input.a >= 1 then
+ ret.a = input.a
+ else
+ ret.a = input.a / 255
+ end
+ else
+ ret.a = 255
+ end
+ else
+ error(string.format("cc.convertColor() - invalid type %s", typ), 0)
+ end
+ return ret
+end
+
+--Vertex2F
+function cc.vertex2F(_x,_y)
+ return { x = _x, y = _y }
+end
+
+--Vertex3F
+function cc.Vertex3F(_x,_y,_z)
+ return { x = _x, y = _y, z = _z }
+end
+
+--Tex2F
+function cc.tex2F(_u,_v)
+ return { u = _u, v = _v }
+end
+
+--PointSprite
+function cc.PointSprite(_pos,_color,_size)
+ return { pos = _pos, color = _color, size = _size }
+end
+
+--Quad2
+function cc.Quad2(_tl,_tr,_bl,_br)
+ return { tl = _tl, tr = _tr, bl = _bl, br = _br }
+end
+
+--Quad3
+function cc.Quad3(_tl, _tr, _bl, _br)
+ return { tl = _tl, tr = _tr, bl = _bl, br = _br }
+end
+
+--V2F_C4B_T2F
+function cc.V2F_C4B_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V2F_C4F_T2F
+function cc.V2F_C4F_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V3F_C4B_T2F
+function cc.V3F_C4B_T2F(_vertices, _colors, _texCoords)
+ return { vertices = _vertices, colors = _colors, texCoords = _texCoords }
+end
+
+--V2F_C4B_T2F_Quad
+function cc.V2F_C4B_T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--V3F_C4B_T2F_Quad
+function cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)
+ return { tl = _tl, bl = _bl, tr = _tr, br = _br }
+end
+
+--V2F_C4F_T2F_Quad
+function cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--T2F_Quad
+function cc.T2F_Quad(_bl, _br, _tl, _tr)
+ return { bl = _bl, br = _br, tl = _tl, tr = _tr }
+end
+
+--AnimationFrameData
+function cc.AnimationFrameData( _texCoords, _delay, _size)
+ return { texCoords = _texCoords, delay = _delay, size = _size }
+end
+
+--PhysicsMaterial
+function cc.PhysicsMaterial(_density, _restitution, _friction)
+ return { density = _density, restitution = _restitution, friction = _friction }
+end
+
+function cc.vec3(_x, _y, _z)
+ return { x = _x, y = _y, z = _z }
+end
+
+function cc.vec4(_x, _y, _z, _w)
+ return { x = _x, y = _y, z = _z, w = _w }
+end
+
+function cc.vec3normalize(vec3)
+ local n = vec3.x * vec3.x + vec3.y * vec3.y + vec3.z * vec3.z
+ if n == 1.0 then
+ return vec3
+ end
+
+ n = math.sqrt(n)
+
+ if n < 2e-37 then
+ return vec3
+ end
+
+ n = 1.0 / n
+ return {x = vec3.x * n, y = vec3.y * n, z = vec3.z * n}
+end
+
+function cc.quaternion(_x, _y ,_z,_w)
+ return { x = _x, y = _y, z = _z, w = _w }
+end
+
+function cc.quaternion_createFromAxisAngle(axis, angle)
+
+ local halfAngle = angle * 0.5
+ local sinHalfAngle = math.sin(halfAngle)
+
+ local normal = cc.vec3(axis.x, axis.y, axis.z)
+ normal = cc.vec3normalize(normal)
+ local dst = cc.vec3(0.0, 0.0, 0.0)
+ dst.x = normal.x * sinHalfAngle
+ dst.y = normal.y * sinHalfAngle
+ dst.z = normal.z * sinHalfAngle
+ dst.w = math.cos(halfAngle)
+
+ return dst
+end
+
+function cc.blendFunc(_src, _dst)
+ return {src = _src, dst = _dst}
+end
+
+cc.mat4 = cc.mat4 or {}
+
+function cc.mat4.new(...)
+ local params = {...}
+ local size = #params
+ local obj = {}
+
+ if 1 == size then
+ assert(type(params[1]) == "table" , "type of input params are wrong to new a mat4 when num of params is 1")
+ for i= 1, 16 do
+ if params[1][i] ~= nil then
+ obj[i] = params[1][i]
+ else
+ obj[i] = 0
+ end
+ end
+ elseif 16 == size then
+ for i= 1, 16 do
+ obj[i] = params[i]
+ end
+ end
+
+ setmetatable(obj, {__index = cc.mat4})
+
+ return obj
+end
+
+function cc.mat4.getInversed(self)
+ return mat4_getInversed(self)
+end
+
+function cc.mat4.transformVector(self, vector, dst)
+ return mat4_transformVector(self, vector, dst)
+end
+
+function cc.mat4.multiply(self, mat)
+ return mat4_multiply(self, mat)
+end
+
+function cc.mat4.decompose(self, scale, rotation, translation)
+ return mat4_decompose(self, scale ,rotation, translation)
+end
+
+function cc.mat4.createIdentity()
+ return cc.mat4.new(1.0 ,0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0)
+end
+
+function cc.mat4.createTranslation(translation, dst)
+ assert(type(translation) == "table" and type(dst) == "table", "The type of input parameters should be table")
+ dst = cc.mat4.createIdentity()
+ dst[13] = translation.x
+ dst[14] = translation.y
+ dst[15] = translation.z
+ return dst
+end
+
+function cc.mat4.createRotation(q, dst)
+ assert(type(q) == "table" and type(dst) == "table", "The type of input parameters should be table")
+ local x2 = q.x + q.x
+ local y2 = q.y + q.y
+ local z2 = q.z + q.z
+
+ local xx2 = q.x * x2
+ local yy2 = q.y * y2
+ local zz2 = q.z * z2
+ local xy2 = q.x * y2
+ local xz2 = q.x * z2
+ local yz2 = q.y * z2
+ local wx2 = q.w * x2
+ local wy2 = q.w * y2
+ local wz2 = q.w * z2
+
+ dst[1] = 1.0 - yy2 - zz2
+ dst[2] = xy2 + wz2
+ dst[3] = xz2 - wy2
+ dst[4] = 0.0
+
+ dst[5] = xy2 - wz2
+ dst[6] = 1.0 - xx2 - zz2
+ dst[7] = yz2 + wx2
+ dst[8] = 0.0
+
+ dst[9] = xz2 + wy2
+ dst[10] = yz2 - wx2
+ dst[11] = 1.0 - xx2 - yy2
+ dst[12] = 0.0
+
+ dst[13] = 0.0
+ dst[14] = 0.0
+ dst[15] = 0.0
+ dst[16] = 1.0
+
+ return dst
+end
+
+function cc.mat4.translate(self,vec3)
+ return mat4_translate(self,vec3)
+end
+
+function cc.mat4.createRotationZ(self,angle)
+ return mat4_createRotationZ(self,angle)
+end
+
+function cc.mat4.setIdentity(self)
+ return mat4_setIdentity(self)
+end
+
+function cc.mat4.createTranslation(...)
+ return mat4_createTranslation(...)
+end
+
+function cc.mat4.createRotation(...)
+ return mat4_createRotation(...)
+end
\ No newline at end of file
diff --git a/src/cocos/cocos2d/Cocos2dConstants.lua b/src/cocos/cocos2d/Cocos2dConstants.lua
new file mode 100644
index 0000000..ff51b72
--- /dev/null
+++ b/src/cocos/cocos2d/Cocos2dConstants.lua
@@ -0,0 +1,647 @@
+
+cc = cc or {}
+
+cc.SPRITE_INDEX_NOT_INITIALIZED = 0xffffffff
+cc.TMX_ORIENTATION_HEX = 0x1
+cc.TMX_ORIENTATION_ISO = 0x2
+cc.TMX_ORIENTATION_ORTHO = 0x0
+cc.Z_COMPRESSION_BZIP2 = 0x1
+cc.Z_COMPRESSION_GZIP = 0x2
+cc.Z_COMPRESSION_NONE = 0x3
+cc.Z_COMPRESSION_ZLIB = 0x0
+cc.BLEND_DST = 0x303
+cc.BLEND_SRC = 0x1
+cc.DIRECTOR_IOS_USE_BACKGROUND_THREAD = 0x0
+cc.DIRECTOR_MAC_THREAD = 0x0
+cc.DIRECTOR_STATS_INTERVAL = 0.1
+cc.ENABLE_BOX2_D_INTEGRATION = 0x0
+cc.ENABLE_DEPRECATED = 0x1
+cc.ENABLE_GL_STATE_CACHE = 0x1
+cc.ENABLE_PROFILERS = 0x0
+cc.ENABLE_STACKABLE_ACTIONS = 0x1
+cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0x0
+cc.GL_ALL = 0x0
+cc.LABELATLAS_DEBUG_DRAW = 0x0
+cc.LABELBMFONT_DEBUG_DRAW = 0x0
+cc.MAC_USE_DISPLAY_LINK_THREAD = 0x0
+cc.MAC_USE_MAIN_THREAD = 0x2
+cc.MAC_USE_OWN_THREAD = 0x1
+cc.NODE_RENDER_SUBPIXEL = 0x1
+cc.PVRMIPMAP_MAX = 0x10
+cc.SPRITEBATCHNODE_RENDER_SUBPIXEL = 0x1
+cc.SPRITE_DEBUG_DRAW = 0x0
+cc.TEXTURE_ATLAS_USE_TRIANGLE_STRIP = 0x0
+cc.TEXTURE_ATLAS_USE_VAO = 0x1
+cc.USE_L_A88_LABELS = 0x1
+cc.ACTION_TAG_INVALID = -1
+cc.DEVICE_MAC = 0x6
+cc.DEVICE_MAC_RETINA_DISPLAY = 0x7
+cc.DEVICEI_PAD = 0x4
+cc.DEVICEI_PAD_RETINA_DISPLAY = 0x5
+cc.DEVICEI_PHONE = 0x0
+cc.DEVICEI_PHONE5 = 0x2
+cc.DEVICEI_PHONE5_RETINA_DISPLAY = 0x3
+cc.DEVICEI_PHONE_RETINA_DISPLAY = 0x1
+cc.DIRECTOR_PROJECTION2_D = 0x0
+cc.DIRECTOR_PROJECTION3_D = 0x1
+cc.DIRECTOR_PROJECTION_CUSTOM = 0x2
+cc.DIRECTOR_PROJECTION_DEFAULT = 0x1
+cc.FILE_UTILS_SEARCH_DIRECTORY_MODE = 0x1
+cc.FILE_UTILS_SEARCH_SUFFIX_MODE = 0x0
+cc.FLIPED_ALL = 0xe0000000
+cc.FLIPPED_MASK = 0x1fffffff
+cc.IMAGE_FORMAT_JPEG = 0x0
+cc.IMAGE_FORMAT_PNG = 0x1
+cc.ITEM_SIZE = 0x20
+cc.LABEL_AUTOMATIC_WIDTH = -1
+cc.LINE_BREAK_MODE_CHARACTER_WRAP = 0x1
+cc.LINE_BREAK_MODE_CLIP = 0x2
+cc.LINE_BREAK_MODE_HEAD_TRUNCATION = 0x3
+cc.LINE_BREAK_MODE_MIDDLE_TRUNCATION = 0x5
+cc.LINE_BREAK_MODE_TAIL_TRUNCATION = 0x4
+cc.LINE_BREAK_MODE_WORD_WRAP = 0x0
+cc.MAC_VERSION_10_6 = 0xa060000
+cc.MAC_VERSION_10_7 = 0xa070000
+cc.MAC_VERSION_10_8 = 0xa080000
+cc.MENU_HANDLER_PRIORITY = -128
+cc.MENU_STATE_TRACKING_TOUCH = 0x1
+cc.MENU_STATE_WAITING = 0x0
+cc.NODE_TAG_INVALID = -1
+cc.PARTICLE_DURATION_INFINITY = -1
+cc.PARTICLE_MODE_GRAVITY = 0x0
+cc.PARTICLE_MODE_RADIUS = 0x1
+cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS = -1
+cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE = -1
+cc.POSITION_TYPE_FREE = 0x0
+cc.POSITION_TYPE_GROUPED = 0x2
+cc.POSITION_TYPE_RELATIVE = 0x1
+cc.PRIORITY_NON_SYSTEM_MIN = -2147483647
+cc.PRIORITY_SYSTEM = -2147483648
+cc.PROGRESS_TIMER_TYPE_BAR = 0x1
+cc.PROGRESS_TIMER_TYPE_RADIAL = 0x0
+cc.REPEAT_FOREVER = 0xfffffffe
+cc.RESOLUTION_MAC = 0x1
+cc.RESOLUTION_MAC_RETINA_DISPLAY = 0x2
+cc.RESOLUTION_UNKNOWN = 0x0
+cc.TMX_TILE_DIAGONAL_FLAG = 0x20000000
+cc.TMX_TILE_HORIZONTAL_FLAG = 0x80000000
+cc.TMX_TILE_VERTICAL_FLAG = 0x40000000
+cc.TEXT_ALIGNMENT_CENTER = 0x1
+cc.TEXT_ALIGNMENT_LEFT = 0x0
+cc.TEXT_ALIGNMENT_RIGHT = 0x2
+
+cc.TEXTURE2_D_PIXEL_FORMAT_AUTO = 0x0
+cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888 = 0x1
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888 = 0x2
+cc.TEXTURE2_D_PIXEL_FORMAT_RG_B888 = 0x3
+cc.TEXTURE2_D_PIXEL_FORMAT_RG_B565 = 0x4
+cc.TEXTURE2_D_PIXEL_FORMAT_A8 = 0x5
+cc.TEXTURE2_D_PIXEL_FORMAT_I8 = 0x6
+cc.TEXTURE2_D_PIXEL_FORMAT_A_I88 = 0x7
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A4444 = 0x8
+cc.TEXTURE2_D_PIXEL_FORMAT_RGB5_A1 = 0x9
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4 = 0xa
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4A = 0xb
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2 = 0xc
+cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2A = 0xd
+cc.TEXTURE2_D_PIXEL_FORMAT_ETC = 0xe
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT1 = 0xf
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT3 = 0x10
+cc.TEXTURE2_D_PIXEL_FORMAT_S3TC_DXT5 = 0x11
+cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT = 0x0
+cc.TOUCHES_ALL_AT_ONCE = 0x0
+cc.TOUCHES_ONE_BY_ONE = 0x1
+cc.TRANSITION_ORIENTATION_DOWN_OVER = 0x1
+cc.TRANSITION_ORIENTATION_LEFT_OVER = 0x0
+cc.TRANSITION_ORIENTATION_RIGHT_OVER = 0x1
+cc.TRANSITION_ORIENTATION_UP_OVER = 0x0
+cc.UNIFORM_COS_TIME = 0x5
+cc.UNIFORM_MV_MATRIX = 0x1
+cc.UNIFORM_MVP_MATRIX = 0x2
+cc.UNIFORM_P_MATRIX = 0x0
+cc.UNIFORM_RANDOM01 = 0x6
+cc.UNIFORM_SAMPLER = 0x7
+cc.UNIFORM_SIN_TIME = 0x4
+cc.UNIFORM_TIME = 0x3
+cc.UNIFORM_MAX = 0x8
+cc.VERTEX_ATTRIB_FLAG_COLOR = 0x2
+cc.VERTEX_ATTRIB_FLAG_NONE = 0x0
+cc.VERTEX_ATTRIB_FLAG_POS_COLOR_TEX = 0x7
+cc.VERTEX_ATTRIB_FLAG_POSITION = 0x1
+cc.VERTEX_ATTRIB_FLAG_TEX_COORDS = 0x4
+cc.VERTEX_ATTRIB_COLOR = 0x1
+cc.VERTEX_ATTRIB_MAX = 0x3
+cc.VERTEX_ATTRIB_POSITION = 0x0
+cc.VERTEX_ATTRIB_TEX_COORD = 0x2
+
+cc.VERTEX_ATTRIB_TEX_COORDS = 0x2
+cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM = 0x2
+cc.VERTICAL_TEXT_ALIGNMENT_CENTER = 0x1
+cc.VERTICAL_TEXT_ALIGNMENT_TOP = 0x0
+cc.OS_VERSION_4_0 = 0x4000000
+cc.OS_VERSION_4_0_1 = 0x4000100
+cc.OS_VERSION_4_1 = 0x4010000
+cc.OS_VERSION_4_2 = 0x4020000
+cc.OS_VERSION_4_2_1 = 0x4020100
+cc.OS_VERSION_4_3 = 0x4030000
+cc.OS_VERSION_4_3_1 = 0x4030100
+cc.OS_VERSION_4_3_2 = 0x4030200
+cc.OS_VERSION_4_3_3 = 0x4030300
+cc.OS_VERSION_4_3_4 = 0x4030400
+cc.OS_VERSION_4_3_5 = 0x4030500
+cc.OS_VERSION_5_0 = 0x5000000
+cc.OS_VERSION_5_0_1 = 0x5000100
+cc.OS_VERSION_5_1_0 = 0x5010000
+cc.OS_VERSION_6_0_0 = 0x6000000
+cc.ANIMATION_FRAME_DISPLAYED_NOTIFICATION = 'CCAnimationFrameDisplayedNotification'
+cc.CHIPMUNK_IMPORT = 'chipmunk.h'
+cc.ATTRIBUTE_NAME_COLOR = 'a_color'
+cc.ATTRIBUTE_NAME_POSITION = 'a_position'
+cc.ATTRIBUTE_NAME_TEX_COORD = 'a_texCoord'
+cc.SHADER_POSITION_COLOR = 'ShaderPositionColor'
+cc.SHADER_POSITION_LENGTH_TEXURE_COLOR = 'ShaderPositionLengthTextureColor'
+cc.SHADER_POSITION_TEXTURE = 'ShaderPositionTexture'
+cc.SHADER_POSITION_TEXTURE_A8_COLOR = 'ShaderPositionTextureA8Color'
+cc.SHADER_POSITION_TEXTURE_COLOR = 'ShaderPositionTextureColor'
+cc.SHADER_POSITION_TEXTURE_COLOR_ALPHA_TEST = 'ShaderPositionTextureColorAlphaTest'
+cc.SHADER_POSITION_TEXTURE_U_COLOR = 'ShaderPositionTexture_uColor'
+cc.SHADER_POSITION_U_COLOR = 'ShaderPosition_uColor'
+cc.UNIFORM_ALPHA_TEST_VALUE_S = 'CC_AlphaValue'
+cc.UNIFORM_COS_TIME_S = 'CC_CosTime'
+cc.UNIFORM_MV_MATRIX_S = 'CC_MVMatrix'
+cc.UNIFORM_MVP_MATRIX_S = 'CC_MVPMatrix'
+cc.UNIFORM_P_MATRIX_S = 'CC_PMatrix'
+cc.UNIFORM_RANDOM01_S = 'CC_Random01'
+cc.UNIFORM_SAMPLER_S = 'CC_Texture0'
+cc.UNIFORM_SIN_TIME_S = 'CC_SinTime'
+cc.UNIFORM_TIME_S = 'CC_Time'
+
+cc.PLATFORM_OS_WINDOWS = 0
+cc.PLATFORM_OS_LINUX = 1
+cc.PLATFORM_OS_MAC = 2
+cc.PLATFORM_OS_ANDROID = 3
+cc.PLATFORM_OS_IPHONE = 4
+cc.PLATFORM_OS_IPAD = 5
+cc.PLATFORM_OS_BLACKBERRY = 6
+cc.PLATFORM_OS_NACL = 7
+cc.PLATFORM_OS_EMSCRIPTEN = 8
+cc.PLATFORM_OS_TIZEN = 9
+cc.PLATFORM_OS_WINRT = 10
+cc.PLATFORM_OS_WP8 = 11
+
+cc.LANGUAGE_ENGLISH = 0
+cc.LANGUAGE_CHINESE = 1
+cc.LANGUAGE_FRENCH = 2
+cc.LANGUAGE_ITALIAN = 3
+cc.LANGUAGE_GERMAN = 4
+cc.LANGUAGE_SPANISH = 5
+cc.LANGUAGE_RUSSIAN = 6
+cc.LANGUAGE_KOREAN = 7
+cc.LANGUAGE_JAPANESE = 8
+cc.LANGUAGE_HUNGARIAN = 9
+cc.LANGUAGE_PORTUGUESE = 10
+cc.LANGUAGE_ARABIC = 11
+
+cc.NODE_ON_ENTER = 0
+cc.NODE_ON_EXIT = 1
+cc.NODE_ON_ENTER_TRANSITION_DID_FINISH = 2
+cc.NODE_ON_EXIT_TRANSITION_DID_START = 3
+cc.NODE_ON_CLEAN_UP = 4
+
+cc.Handler = cc.Handler or {}
+cc.Handler.NODE = 0
+cc.Handler.MENU_CLICKED = 1
+cc.Handler.CALLFUNC = 2
+cc.Handler.SCHEDULE = 3
+cc.Handler.TOUCHES = 4
+cc.Handler.KEYPAD = 5
+cc.Handler.ACCELEROMETER = 6
+cc.Handler.CONTROL_TOUCH_DOWN = 7
+cc.Handler.CONTROL_TOUCH_DRAG_INSIDE = 8
+cc.Handler.CONTROL_TOUCH_DRAG_OUTSIDE = 9
+cc.Handler.CONTROL_TOUCH_DRAG_ENTER = 10
+cc.Handler.CONTROL_TOUCH_DRAG_EXIT = 11
+cc.Handler.CONTROL_TOUCH_UP_INSIDE = 12
+cc.Handler.CONTROL_TOUCH_UP_OUTSIDE = 13
+cc.Handler.CONTROL_TOUCH_UP_CANCEL = 14
+cc.Handler.CONTROL_VALUE_CHANGED = 15
+cc.Handler.WEBSOCKET_OPEN = 16
+cc.Handler.WEBSOCKET_MESSAGE = 17
+cc.Handler.WEBSOCKET_CLOSE = 18
+cc.Handler.WEBSOCKET_ERROR = 19
+cc.Handler.GL_NODE_DRAW = 20
+cc.Handler.SCROLLVIEW_SCROLL = 21
+cc.Handler.SCROLLVIEW_ZOOM = 22
+cc.Handler.TABLECELL_TOUCHED = 23
+cc.Handler.TABLECELL_HIGHLIGHT = 24
+cc.Handler.TABLECELL_UNHIGHLIGHT = 25
+cc.Handler.TABLECELL_WILL_RECYCLE = 26
+cc.Handler.TABLECELL_SIZE_FOR_INDEX = 27
+cc.Handler.TABLECELL_AT_INDEX = 28
+cc.Handler.TABLEVIEW_NUMS_OF_CELLS = 29
+cc.Handler.HTTPREQUEST_STATE_CHANGE = 30
+cc.Handler.ASSETSMANAGER_PROGRESS = 31
+cc.Handler.ASSETSMANAGER_SUCCESS = 32
+cc.Handler.ASSETSMANAGER_ERROR = 33
+cc.Handler.STUDIO_EVENT_LISTENER = 34
+cc.Handler.ARMATURE_EVENT = 35
+cc.Handler.EVENT_ACC = 36
+cc.Handler.EVENT_CUSTIOM = 37
+cc.Handler.EVENT_KEYBOARD_PRESSED = 38
+cc.Handler.EVENT_KEYBOARD_RELEASED = 39
+cc.Handler.EVENT_TOUCH_BEGAN = 40
+cc.Handler.EVENT_TOUCH_MOVED = 41
+cc.Handler.EVENT_TOUCH_ENDED = 42
+cc.Handler.EVENT_TOUCH_CANCELLED = 43
+cc.Handler.EVENT_TOUCHES_BEGAN = 44
+cc.Handler.EVENT_TOUCHES_MOVED = 45
+cc.Handler.EVENT_TOUCHES_ENDED = 46
+cc.Handler.EVENT_TOUCHES_CANCELLED = 47
+cc.Handler.EVENT_MOUSE_DOWN = 48
+cc.Handler.EVENT_MOUSE_UP = 49
+cc.Handler.EVENT_MOUSE_MOVE = 50
+cc.Handler.EVENT_MOUSE_SCROLL = 51
+cc.Handler.EVENT_SPINE = 52
+cc.Handler.EVENT_PHYSICS_CONTACT_BEGIN = 53
+cc.Handler.EVENT_PHYSICS_CONTACT_PRESOLVE = 54
+cc.Handler.EVENT_PHYSICS_CONTACT_POSTSOLVE = 55
+cc.Handler.EVENT_PHYSICS_CONTACT_SEPARATE = 56
+cc.Handler.EVENT_FOCUS = 57
+cc.Handler.EVENT_CONTROLLER_CONNECTED = 58
+cc.Handler.EVENT_CONTROLLER_DISCONNECTED = 59
+cc.Handler.EVENT_CONTROLLER_KEYDOWN = 60
+cc.Handler.EVENT_CONTROLLER_KEYUP = 61
+cc.Handler.EVENT_CONTROLLER_KEYREPEAT = 62
+cc.Handler.EVENT_CONTROLLER_AXIS = 63
+cc.Handler.EVENT_SPINE_ANIMATION_START = 64
+cc.Handler.EVENT_SPINE_ANIMATION_END = 65
+cc.Handler.EVENT_SPINE_ANIMATION_COMPLETE = 66
+cc.Handler.EVENT_SPINE_ANIMATION_EVENT = 67
+
+
+cc.EVENT_UNKNOWN = 0
+cc.EVENT_TOUCH_ONE_BY_ONE = 1
+cc.EVENT_TOUCH_ALL_AT_ONCE = 2
+cc.EVENT_KEYBOARD = 3
+cc.EVENT_MOUSE = 4
+cc.EVENT_ACCELERATION = 5
+cc.EVENT_CUSTOM = 6
+
+cc.PHYSICSSHAPE_MATERIAL_DEFAULT = {density = 0.0, restitution = 0.5, friction = 0.5}
+cc.PHYSICSBODY_MATERIAL_DEFAULT = {density = 0.1, restitution = 0.5, friction = 0.5}
+cc.GLYPHCOLLECTION_DYNAMIC = 0
+cc.GLYPHCOLLECTION_NEHE = 1
+cc.GLYPHCOLLECTION_ASCII = 2
+cc.GLYPHCOLLECTION_CUSTOM = 3
+
+cc.ResolutionPolicy =
+{
+ EXACT_FIT = 0,
+ NO_BORDER = 1,
+ SHOW_ALL = 2,
+ FIXED_HEIGHT = 3,
+ FIXED_WIDTH = 4,
+ UNKNOWN = 5,
+}
+
+cc.LabelEffect =
+{
+ NORMAL = 0,
+ OUTLINE = 1,
+ SHADOW = 2,
+ GLOW = 3,
+}
+
+cc.LabelOverflow =
+{
+ NONE = 0,
+ CLAMP = 1,
+ SHRINK = 2,
+ RESIZE_HEIGHT = 3
+};
+
+cc.KeyCodeKey =
+{
+ "KEY_NONE",
+ "KEY_PAUSE",
+ "KEY_SCROLL_LOCK",
+ "KEY_PRINT",
+ "KEY_SYSREQ",
+ "KEY_BREAK",
+ "KEY_ESCAPE",
+ "KEY_BACKSPACE",
+ "KEY_TAB",
+ "KEY_BACK_TAB",
+ "KEY_RETURN",
+ "KEY_CAPS_LOCK",
+ "KEY_SHIFT",
+ "KEY_RIGHT_SHIFT",
+ "KEY_CTRL",
+ "KEY_RIGHT_CTRL",
+ "KEY_ALT",
+ "KEY_RIGHT_ALT",
+ "KEY_MENU",
+ "KEY_HYPER",
+ "KEY_INSERT",
+ "KEY_HOME",
+ "KEY_PG_UP",
+ "KEY_DELETE",
+ "KEY_END",
+ "KEY_PG_DOWN",
+ "KEY_LEFT_ARROW",
+ "KEY_RIGHT_ARROW",
+ "KEY_UP_ARROW",
+ "KEY_DOWN_ARROW",
+ "KEY_NUM_LOCK",
+ "KEY_KP_PLUS",
+ "KEY_KP_MINUS",
+ "KEY_KP_MULTIPLY",
+ "KEY_KP_DIVIDE",
+ "KEY_KP_ENTER",
+ "KEY_KP_HOME",
+ "KEY_KP_UP",
+ "KEY_KP_PG_UP",
+ "KEY_KP_LEFT",
+ "KEY_KP_FIVE",
+ "KEY_KP_RIGHT",
+ "KEY_KP_END",
+ "KEY_KP_DOWN",
+ "KEY_KP_PG_DOWN",
+ "KEY_KP_INSERT",
+ "KEY_KP_DELETE",
+ "KEY_F1",
+ "KEY_F2",
+ "KEY_F3",
+ "KEY_F4",
+ "KEY_F5",
+ "KEY_F6",
+ "KEY_F7",
+ "KEY_F8",
+ "KEY_F9",
+ "KEY_F10",
+ "KEY_F11",
+ "KEY_F12",
+ "KEY_SPACE",
+ "KEY_EXCLAM",
+ "KEY_QUOTE",
+ "KEY_NUMBER",
+ "KEY_DOLLAR",
+ "KEY_PERCENT",
+ "KEY_CIRCUMFLEX",
+ "KEY_AMPERSAND",
+ "KEY_APOSTROPHE",
+ "KEY_LEFT_PARENTHESIS",
+ "KEY_RIGHT_PARENTHESIS",
+ "KEY_ASTERISK",
+ "KEY_PLUS",
+ "KEY_COMMA",
+ "KEY_MINUS",
+ "KEY_PERIOD",
+ "KEY_SLASH",
+ "KEY_0",
+ "KEY_1",
+ "KEY_2",
+ "KEY_3",
+ "KEY_4",
+ "KEY_5",
+ "KEY_6",
+ "KEY_7",
+ "KEY_8",
+ "KEY_9",
+ "KEY_COLON",
+ "KEY_SEMICOLON",
+ "KEY_LESS_THAN",
+ "KEY_EQUAL",
+ "KEY_GREATER_THAN",
+ "KEY_QUESTION",
+ "KEY_AT",
+ "KEY_CAPITAL_A",
+ "KEY_CAPITAL_B",
+ "KEY_CAPITAL_C",
+ "KEY_CAPITAL_D",
+ "KEY_CAPITAL_E",
+ "KEY_CAPITAL_F",
+ "KEY_CAPITAL_G",
+ "KEY_CAPITAL_H",
+ "KEY_CAPITAL_I",
+ "KEY_CAPITAL_J",
+ "KEY_CAPITAL_K",
+ "KEY_CAPITAL_L",
+ "KEY_CAPITAL_M",
+ "KEY_CAPITAL_N",
+ "KEY_CAPITAL_O",
+ "KEY_CAPITAL_P",
+ "KEY_CAPITAL_Q",
+ "KEY_CAPITAL_R",
+ "KEY_CAPITAL_S",
+ "KEY_CAPITAL_T",
+ "KEY_CAPITAL_U",
+ "KEY_CAPITAL_V",
+ "KEY_CAPITAL_W",
+ "KEY_CAPITAL_X",
+ "KEY_CAPITAL_Y",
+ "KEY_CAPITAL_Z",
+ "KEY_LEFT_BRACKET",
+ "KEY_BACK_SLASH",
+ "KEY_RIGHT_BRACKET",
+ "KEY_UNDERSCORE",
+ "KEY_GRAVE",
+ "KEY_A",
+ "KEY_B",
+ "KEY_C",
+ "KEY_D",
+ "KEY_E",
+ "KEY_F",
+ "KEY_G",
+ "KEY_H",
+ "KEY_I",
+ "KEY_J",
+ "KEY_K",
+ "KEY_L",
+ "KEY_M",
+ "KEY_N",
+ "KEY_O",
+ "KEY_P",
+ "KEY_Q",
+ "KEY_R",
+ "KEY_S",
+ "KEY_T",
+ "KEY_U",
+ "KEY_V",
+ "KEY_W",
+ "KEY_X",
+ "KEY_Y",
+ "KEY_Z",
+ "KEY_LEFT_BRACE",
+ "KEY_BAR",
+ "KEY_RIGHT_BRACE",
+ "KEY_TILDE",
+ "KEY_EURO",
+ "KEY_POUND",
+ "KEY_YEN",
+ "KEY_MIDDLE_DOT",
+ "KEY_SEARCH",
+ "KEY_DPAD_LEFT",
+ "KEY_DPAD_RIGHT",
+ "KEY_DPAD_UP",
+ "KEY_DPAD_DOWN",
+ "KEY_DPAD_CENTER",
+ "KEY_ENTER",
+ "KEY_PLAY",
+}
+
+cc.KeyCode =
+{
+}
+
+for k,v in ipairs(cc.KeyCodeKey) do
+ cc.KeyCode[v] = k - 1
+end
+
+cc.KeyCode.KEY_BACK = cc.KeyCode.KEY_ESCAPE
+cc.KeyCode.KEY_LEFT_SHIFT = cc.KeyCode.KEY_SHIFT
+cc.KeyCode.KEY_LEFT_CTRL = cc.KeyCode.KEY_CTRL
+cc.KeyCode.KEY_LEFT_ALT = cc.KeyCode.KEY_ALT
+
+cc.EventAssetsManagerEx =
+{
+ EventCode =
+ {
+ ERROR_NO_LOCAL_MANIFEST = 0,
+ ERROR_DOWNLOAD_MANIFEST = 1,
+ ERROR_PARSE_MANIFEST = 2,
+ NEW_VERSION_FOUND = 3,
+ ALREADY_UP_TO_DATE = 4,
+ UPDATE_PROGRESSION = 5,
+ ASSET_UPDATED = 6,
+ ERROR_UPDATING = 7,
+ UPDATE_FINISHED = 8,
+ UPDATE_FAILED = 9,
+ ERROR_DECOMPRESS = 10
+ },
+}
+
+cc.AssetsManagerExStatic =
+{
+ VERSION_ID = "@version",
+ MANIFEST_ID = "@manifest",
+}
+
+cc.EventCode =
+{
+ BEGAN = 0,
+ MOVED = 1,
+ ENDED = 2,
+ CANCELLED = 3,
+}
+
+cc.DIRECTOR_PROJECTION_2D = 0
+cc.DIRECTOR_PROJECTION_3D = 1
+
+cc.ConfigType =
+{
+ NONE = 0,
+ COCOSTUDIO = 1,
+}
+
+cc.AUDIO_INVAILD_ID = -1
+cc.AUDIO_TIME_UNKNOWN = -1.0
+
+cc.CameraFlag =
+{
+ DEFAULT = 1,
+ USER1 = 2,
+ USER2 = 4,
+ USER3 = 8,
+ USER4 = 16,
+ USER5 = 32,
+ USER6 = 64,
+ USER7 = 128,
+ USER8 = 256,
+}
+
+cc.CameraBackgroundBrush.BrushType =
+{
+ NONE = 0,
+ DEPTH = 1,
+ COLOR = 2,
+ SKYBOX = 3,
+}
+
+cc.BillBoard_Mode =
+{
+ VIEW_POINT_ORIENTED = 0,
+ VIEW_PLANE_ORIENTED = 1,
+}
+
+cc.GLProgram_VERTEX_ATTRIB =
+{
+ POSITION = 0,
+ COLOR = 1,
+ TEX_COORD = 2,
+ TEX_COORD1 = 3,
+ TEX_COORD2 = 4,
+ TEX_COORD3 = 5,
+ TEX_COORD4 = 6,
+ TEX_COORD5 = 7,
+ TEX_COORD6 = 8,
+ TEX_COORD7 = 9,
+ NORMAL = 10,
+ BLEND_WEIGHT = 11,
+ BLEND_INDEX =12,
+ MAX = 13,
+ --backward compatibility
+ TEX_COORDS = 2,
+}
+
+cc.MATRIX_STACK_TYPE =
+{
+ MODELVIEW = 0,
+ PROJECTION = 1,
+ TEXTURE = 2,
+}
+
+cc.LightType =
+{
+ DIRECTIONAL = 0,
+ POINT = 1,
+ SPOT = 2,
+ AMBIENT = 3,
+}
+
+cc.LightFlag =
+{
+ LIGHT0 = math.pow(2,0),
+ LIGHT1 = math.pow(2,1),
+ LIGHT2 = math.pow(2,2),
+ LIGHT3 = math.pow(2,3),
+ LIGHT4 = math.pow(2,4),
+ LIGHT5 = math.pow(2,5),
+ LIGHT6 = math.pow(2,6),
+ LIGHT7 = math.pow(2,7),
+ LIGHT8 = math.pow(2,8),
+ LIGHT9 = math.pow(2,9),
+ LIGHT10 = math.pow(2,10),
+ LIGHT11 = math.pow(2,11),
+ LIGHT12 = math.pow(2,12),
+ LIGHT13 = math.pow(2,13),
+ LIGHT14 = math.pow(2,14),
+ LIGHT15 = math.pow(2,15),
+}
+
+cc.AsyncTaskPool.TaskType =
+{
+ TASK_IO = 0,
+ TASK_NETWORK = 1,
+ TASK_OTHER = 2,
+ TASK_MAX_TYPE = 3,
+}
+
+
+cc.RED = cc.c3b(255,0,0)
+cc.GREEN = cc.c3b(0,255,0)
+cc.BLUE = cc.c3b(0,0,255)
+cc.BLACK = cc.c3b(0,0,0)
+cc.WHITE = cc.c3b(255,255,255)
+cc.YELLOW = cc.c3b(255,255,0)
+
diff --git a/src/cocos/cocos2d/DeprecatedCocos2dClass.lua b/src/cocos/cocos2d/DeprecatedCocos2dClass.lua
new file mode 100644
index 0000000..3228789
--- /dev/null
+++ b/src/cocos/cocos2d/DeprecatedCocos2dClass.lua
@@ -0,0 +1,1767 @@
+-- This is the DeprecatedClass
+
+DeprecatedClass = {} or DeprecatedClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCProgressTo class will be Deprecated,begin
+function DeprecatedClass.CCProgressTo()
+ deprecatedTip("CCProgressTo","cc.ProgressTo")
+ return cc.ProgressTo
+end
+_G["CCProgressTo"] = DeprecatedClass.CCProgressTo()
+--CCProgressTo class will be Deprecated,end
+
+--CCHide class will be Deprecated,begin
+function DeprecatedClass.CCHide()
+ deprecatedTip("CCHide","cc.Hide")
+ return cc.Hide
+end
+_G["CCHide"] = DeprecatedClass.CCHide()
+--CCHide class will be Deprecated,end
+
+--CCTransitionMoveInB class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInB()
+ deprecatedTip("CCTransitionMoveInB","cc.TransitionMoveInB")
+ return cc.TransitionMoveInB
+end
+_G["CCTransitionMoveInB"] = DeprecatedClass.CCTransitionMoveInB()
+--CCTransitionMoveInB class will be Deprecated,end
+
+--CCEaseSineIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineIn()
+ deprecatedTip("CCEaseSineIn","cc.EaseSineIn")
+ return cc.EaseSineIn
+end
+_G["CCEaseSineIn"] = DeprecatedClass.CCEaseSineIn()
+--CCEaseSineIn class will be Deprecated,end
+
+--CCTransitionMoveInL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInL()
+ deprecatedTip("CCTransitionMoveInL","cc.TransitionMoveInL")
+ return cc.TransitionMoveInL
+end
+_G["CCTransitionMoveInL"] = DeprecatedClass.CCTransitionMoveInL()
+--CCTransitionMoveInL class will be Deprecated,end
+
+--CCEaseInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseInOut()
+ deprecatedTip("CCEaseInOut","cc.EaseInOut")
+ return cc.EaseInOut
+end
+_G["CCEaseInOut"] = DeprecatedClass.CCEaseInOut()
+--CCEaseInOut class will be Deprecated,end
+
+--CCTransitionMoveInT class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInT()
+ deprecatedTip("CCTransitionMoveInT","cc.TransitionMoveInT")
+ return cc.TransitionMoveInT
+end
+_G["CCTransitionMoveInT"] = DeprecatedClass.CCTransitionMoveInT()
+--CCTransitionMoveInT class will be Deprecated,end
+
+--CCTransitionMoveInR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionMoveInR()
+ deprecatedTip("CCTransitionMoveInR","cc.TransitionMoveInR")
+ return cc.TransitionMoveInR
+end
+_G["CCTransitionMoveInR"] = DeprecatedClass.CCTransitionMoveInR()
+--CCTransitionMoveInR class will be Deprecated,end
+
+--CCParticleSnow class will be Deprecated,begin
+function DeprecatedClass.CCParticleSnow()
+ deprecatedTip("CCParticleSnow","cc.ParticleSnow")
+ return cc.ParticleSnow
+end
+_G["CCParticleSnow"] = DeprecatedClass.CCParticleSnow()
+--CCParticleSnow class will be Deprecated,end
+
+--CCActionCamera class will be Deprecated,begin
+function DeprecatedClass.CCActionCamera()
+ deprecatedTip("CCActionCamera","cc.ActionCamera")
+ return cc.ActionCamera
+end
+_G["CCActionCamera"] = DeprecatedClass.CCActionCamera()
+--CCActionCamera class will be Deprecated,end
+
+--CCProgressFromTo class will be Deprecated,begin
+function DeprecatedClass.CCProgressFromTo()
+ deprecatedTip("CCProgressFromTo","cc.ProgressFromTo")
+ return cc.ProgressFromTo
+end
+_G["CCProgressFromTo"] = DeprecatedClass.CCProgressFromTo()
+--CCProgressFromTo class will be Deprecated,end
+
+--CCMoveTo class will be Deprecated,begin
+function DeprecatedClass.CCMoveTo()
+ deprecatedTip("CCMoveTo","cc.MoveTo")
+ return cc.MoveTo
+end
+_G["CCMoveTo"] = DeprecatedClass.CCMoveTo()
+--CCMoveTo class will be Deprecated,end
+
+--CCJumpBy class will be Deprecated,begin
+function DeprecatedClass.CCJumpBy()
+ deprecatedTip("CCJumpBy","cc.JumpBy")
+ return cc.JumpBy
+end
+_G["CCJumpBy"] = DeprecatedClass.CCJumpBy()
+--CCJumpBy class will be Deprecated,end
+
+--CCObject class will be Deprecated,begin
+function DeprecatedClass.CCObject()
+ deprecatedTip("CCObject","cc.Object")
+ return cc.Object
+end
+_G["CCObject"] = DeprecatedClass.CCObject()
+--CCObject class will be Deprecated,end
+
+--CCTransitionRotoZoom class will be Deprecated,begin
+function DeprecatedClass.CCTransitionRotoZoom()
+ deprecatedTip("CCTransitionRotoZoom","cc.TransitionRotoZoom")
+ return cc.TransitionRotoZoom
+end
+_G["CCTransitionRotoZoom"] = DeprecatedClass.CCTransitionRotoZoom()
+--CCTransitionRotoZoom class will be Deprecated,end
+
+--CCDirector class will be Deprecated,begin
+function DeprecatedClass.CCDirector()
+ deprecatedTip("CCDirector","cc.Director")
+ return cc.Director
+end
+_G["CCDirector"] = DeprecatedClass.CCDirector()
+--CCDirector class will be Deprecated,end
+
+--CCScheduler class will be Deprecated,begin
+function DeprecatedClass.CCScheduler()
+ deprecatedTip("CCScheduler","cc.Scheduler")
+ return cc.Scheduler
+end
+_G["CCScheduler"] = DeprecatedClass.CCScheduler()
+--CCScheduler class will be Deprecated,end
+
+--CCEaseElasticOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticOut()
+ deprecatedTip("CCEaseElasticOut","cc.EaseElasticOut")
+ return cc.EaseElasticOut
+end
+_G["CCEaseElasticOut"] = DeprecatedClass.CCEaseElasticOut()
+--CCEaseElasticOut class will be Deprecated,end
+
+--CCTableViewCell class will be Deprecated,begin
+function DeprecatedClass.CCTableViewCell()
+ deprecatedTip("CCTableViewCell","cc.TableViewCell")
+ return cc.TableViewCell
+end
+_G["CCTableViewCell"] = DeprecatedClass.CCTableViewCell()
+--CCTableViewCell class will be Deprecated,end
+
+
+--CCEaseBackOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackOut()
+ deprecatedTip("CCEaseBackOut","cc.EaseBackOut")
+ return cc.EaseBackOut
+end
+_G["CCEaseBackOut"] = DeprecatedClass.CCEaseBackOut()
+--CCEaseBackOut class will be Deprecated,end
+
+--CCParticleSystemQuad class will be Deprecated,begin
+function DeprecatedClass.CCParticleSystemQuad()
+ deprecatedTip("CCParticleSystemQuad","cc.ParticleSystemQuad")
+ return cc.ParticleSystemQuad
+end
+_G["CCParticleSystemQuad"] = DeprecatedClass.CCParticleSystemQuad()
+--CCParticleSystemQuad class will be Deprecated,end
+
+--CCMenuItemToggle class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemToggle()
+ deprecatedTip("CCMenuItemToggle","cc.MenuItemToggle")
+ return cc.MenuItemToggle
+end
+_G["CCMenuItemToggle"] = DeprecatedClass.CCMenuItemToggle()
+--CCMenuItemToggle class will be Deprecated,end
+
+--CCStopGrid class will be Deprecated,begin
+function DeprecatedClass.CCStopGrid()
+ deprecatedTip("CCStopGrid","cc.StopGrid")
+ return cc.StopGrid
+end
+_G["CCStopGrid"] = DeprecatedClass.CCStopGrid()
+--CCStopGrid class will be Deprecated,end
+
+--CCTransitionScene class will be Deprecated,begin
+function DeprecatedClass.CCTransitionScene()
+ deprecatedTip("CCTransitionScene","cc.TransitionScene")
+ return cc.TransitionScene
+end
+_G["CCTransitionScene"] = DeprecatedClass.CCTransitionScene()
+--CCTransitionScene class will be Deprecated,end
+
+--CCSkewBy class will be Deprecated,begin
+function DeprecatedClass.CCSkewBy()
+ deprecatedTip("CCSkewBy","cc.SkewBy")
+ return cc.SkewBy
+end
+_G["CCSkewBy"] = DeprecatedClass.CCSkewBy()
+--CCSkewBy class will be Deprecated,end
+
+--CCLayer class will be Deprecated,begin
+function DeprecatedClass.CCLayer()
+ deprecatedTip("CCLayer","cc.Layer")
+ return cc.Layer
+end
+_G["CCLayer"] = DeprecatedClass.CCLayer()
+--CCLayer class will be Deprecated,end
+
+--CCEaseElastic class will be Deprecated,begin
+function DeprecatedClass.CCEaseElastic()
+ deprecatedTip("CCEaseElastic","cc.EaseElastic")
+ return cc.EaseElastic
+end
+_G["CCEaseElastic"] = DeprecatedClass.CCEaseElastic()
+--CCEaseElastic class will be Deprecated,end
+
+--CCTMXTiledMap class will be Deprecated,begin
+function DeprecatedClass.CCTMXTiledMap()
+ deprecatedTip("CCTMXTiledMap","cc.TMXTiledMap")
+ return cc.TMXTiledMap
+end
+_G["CCTMXTiledMap"] = DeprecatedClass.CCTMXTiledMap()
+--CCTMXTiledMap class will be Deprecated,end
+
+--CCGrid3DAction class will be Deprecated,begin
+function DeprecatedClass.CCGrid3DAction()
+ deprecatedTip("CCGrid3DAction","cc.Grid3DAction")
+ return cc.Grid3DAction
+end
+_G["CCGrid3DAction"] = DeprecatedClass.CCGrid3DAction()
+--CCGrid3DAction class will be Deprecated,end
+
+--CCFadeIn class will be Deprecated,begin
+function DeprecatedClass.CCFadeIn()
+ deprecatedTip("CCFadeIn","cc.FadeIn")
+ return cc.FadeIn
+end
+_G["CCFadeIn"] = DeprecatedClass.CCFadeIn()
+--CCFadeIn class will be Deprecated,end
+
+--CCNodeRGBA class will be Deprecated,begin
+function DeprecatedClass.CCNodeRGBA()
+ deprecatedTip("CCNodeRGBA","cc.Node")
+ return cc.Node
+end
+_G["CCNodeRGBA"] = DeprecatedClass.CCNodeRGBA()
+--CCNodeRGBA class will be Deprecated,end
+
+--NodeRGBA class will be Deprecated,begin
+function DeprecatedClass.NodeRGBA()
+ deprecatedTip("cc.NodeRGBA","cc.Node")
+ return cc.Node
+end
+_G["cc"]["NodeRGBA"] = DeprecatedClass.NodeRGBA()
+--NodeRGBA class will be Deprecated,end
+
+--CCAnimationCache class will be Deprecated,begin
+function DeprecatedClass.CCAnimationCache()
+ deprecatedTip("CCAnimationCache","cc.AnimationCache")
+ return cc.AnimationCache
+end
+_G["CCAnimationCache"] = DeprecatedClass.CCAnimationCache()
+--CCAnimationCache class will be Deprecated,end
+
+--CCFlipY3D class will be Deprecated,begin
+function DeprecatedClass.CCFlipY3D()
+ deprecatedTip("CCFlipY3D","cc.FlipY3D")
+ return cc.FlipY3D
+end
+_G["CCFlipY3D"] = DeprecatedClass.CCFlipY3D()
+--CCFlipY3D class will be Deprecated,end
+
+--CCEaseSineInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineInOut()
+ deprecatedTip("CCEaseSineInOut","cc.EaseSineInOut")
+ return cc.EaseSineInOut
+end
+_G["CCEaseSineInOut"] = DeprecatedClass.CCEaseSineInOut()
+--CCEaseSineInOut class will be Deprecated,end
+
+--CCTransitionFlipAngular class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipAngular()
+ deprecatedTip("CCTransitionFlipAngular","cc.TransitionFlipAngular")
+ return cc.TransitionFlipAngular
+end
+_G["CCTransitionFlipAngular"] = DeprecatedClass.CCTransitionFlipAngular()
+--CCTransitionFlipAngular class will be Deprecated,end
+
+--CCEaseElasticInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticInOut()
+ deprecatedTip("CCEaseElasticInOut","cc.EaseElasticInOut")
+ return cc.EaseElasticInOut
+end
+_G["CCEaseElasticInOut"] = DeprecatedClass.CCEaseElasticInOut()
+--CCEaseElasticInOut class will be Deprecated,end
+
+--CCEaseBounce class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounce()
+ deprecatedTip("CCEaseBounce","cc.EaseBounce")
+ return cc.EaseBounce
+end
+_G["CCEaseBounce"] = DeprecatedClass.CCEaseBounce()
+--CCEaseBounce class will be Deprecated,end
+
+--CCShow class will be Deprecated,begin
+function DeprecatedClass.CCShow()
+ deprecatedTip("CCShow","cc.Show")
+ return cc.Show
+end
+_G["CCShow"] = DeprecatedClass.CCShow()
+--CCShow class will be Deprecated,end
+
+--CCFadeOut class will be Deprecated,begin
+function DeprecatedClass.CCFadeOut()
+ deprecatedTip("CCFadeOut","cc.FadeOut")
+ return cc.FadeOut
+end
+_G["CCFadeOut"] = DeprecatedClass.CCFadeOut()
+--CCFadeOut class will be Deprecated,end
+
+--CCCallFunc class will be Deprecated,begin
+function DeprecatedClass.CCCallFunc()
+ deprecatedTip("CCCallFunc","cc.CallFunc")
+ return cc.CallFunc
+end
+_G["CCCallFunc"] = DeprecatedClass.CCCallFunc()
+--CCCallFunc class will be Deprecated,end
+
+--CCWaves3D class will be Deprecated,begin
+function DeprecatedClass.CCWaves3D()
+ deprecatedTip("CCWaves3D","cc.Waves3D")
+ return cc.Waves3D
+end
+_G["CCWaves3D"] = DeprecatedClass.CCWaves3D()
+--CCWaves3D class will be Deprecated,end
+
+--CCFlipX3D class will be Deprecated,begin
+function DeprecatedClass.CCFlipX3D()
+ deprecatedTip("CCFlipX3D","cc.FlipX3D")
+ return cc.FlipX3D
+end
+_G["CCFlipX3D"] = DeprecatedClass.CCFlipX3D()
+--CCFlipX3D class will be Deprecated,end
+
+--CCParticleFireworks class will be Deprecated,begin
+function DeprecatedClass.CCParticleFireworks()
+ deprecatedTip("CCParticleFireworks","cc.ParticleFireworks")
+ return cc.ParticleFireworks
+end
+_G["CCParticleFireworks"] = DeprecatedClass.CCParticleFireworks()
+--CCParticleFireworks class will be Deprecated,end
+
+--CCMenuItemImage class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemImage()
+ deprecatedTip("CCMenuItemImage","cc.MenuItemImage")
+ return cc.MenuItemImage
+end
+_G["CCMenuItemImage"] = DeprecatedClass.CCMenuItemImage()
+--CCMenuItemImage class will be Deprecated,end
+
+--CCParticleFire class will be Deprecated,begin
+function DeprecatedClass.CCParticleFire()
+ deprecatedTip("CCParticleFire","cc.ParticleFire")
+ return cc.ParticleFire
+end
+_G["CCParticleFire"] = DeprecatedClass.CCParticleFire()
+--CCParticleFire class will be Deprecated,end
+
+--CCMenuItem class will be Deprecated,begin
+function DeprecatedClass.CCMenuItem()
+ deprecatedTip("CCMenuItem","cc.MenuItem")
+ return cc.MenuItem
+end
+_G["CCMenuItem"] = DeprecatedClass.CCMenuItem()
+--CCMenuItem class will be Deprecated,end
+
+--CCActionEase class will be Deprecated,begin
+function DeprecatedClass.CCActionEase()
+ deprecatedTip("CCActionEase","cc.ActionEase")
+ return cc.ActionEase
+end
+_G["CCActionEase"] = DeprecatedClass.CCActionEase()
+--CCActionEase class will be Deprecated,end
+
+--CCTransitionSceneOriented class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSceneOriented()
+ deprecatedTip("CCTransitionSceneOriented","cc.TransitionSceneOriented")
+ return cc.TransitionSceneOriented
+end
+_G["CCTransitionSceneOriented"] = DeprecatedClass.CCTransitionSceneOriented()
+--CCTransitionSceneOriented class will be Deprecated,end
+
+--CCTransitionZoomFlipAngular class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipAngular()
+ deprecatedTip("CCTransitionZoomFlipAngular","cc.TransitionZoomFlipAngular")
+ return cc.TransitionZoomFlipAngular
+end
+_G["CCTransitionZoomFlipAngular"] = DeprecatedClass.CCTransitionZoomFlipAngular()
+--CCTransitionZoomFlipAngular class will be Deprecated,end
+
+--CCEaseIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseIn()
+ deprecatedTip("CCEaseIn","cc.EaseIn")
+ return cc.EaseIn
+end
+_G["CCEaseIn"] = DeprecatedClass.CCEaseIn()
+--CCEaseIn class will be Deprecated,end
+
+--CCEaseExponentialInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialInOut()
+ deprecatedTip("CCEaseExponentialInOut","cc.EaseExponentialInOut")
+ return cc.EaseExponentialInOut
+end
+_G["CCEaseExponentialInOut"] = DeprecatedClass.CCEaseExponentialInOut()
+--CCEaseExponentialInOut class will be Deprecated,end
+
+--CCTransitionFlipX class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipX()
+ deprecatedTip("CCTransitionFlipX","cc.TransitionFlipX")
+ return cc.TransitionFlipX
+end
+_G["CCTransitionFlipX"] = DeprecatedClass.CCTransitionFlipX()
+--CCTransitionFlipX class will be Deprecated,end
+
+--CCEaseExponentialOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialOut()
+ deprecatedTip("CCEaseExponentialOut","cc.EaseExponentialOut")
+ return cc.EaseExponentialOut
+end
+_G["CCEaseExponentialOut"] = DeprecatedClass.CCEaseExponentialOut()
+--CCEaseExponentialOut class will be Deprecated,end
+
+--CCLabel class will be Deprecated,begin
+function DeprecatedClass.CCLabel()
+ deprecatedTip("CCLabel","cc.Label")
+ return cc.Label
+end
+_G["CCLabel"] = DeprecatedClass.CCLabel()
+--CCLabel class will be Deprecated,end
+
+--CCApplication class will be Deprecated,begin
+function DeprecatedClass.CCApplication()
+ deprecatedTip("CCApplication","cc.Application")
+ return cc.Application
+end
+_G["CCApplication"] = DeprecatedClass.CCApplication()
+--CCApplication class will be Deprecated,end
+
+--CCDelayTime class will be Deprecated,begin
+function DeprecatedClass.CCDelayTime()
+ deprecatedTip("CCDelayTime","cc.DelayTime")
+ return cc.DelayTime
+end
+_G["CCDelayTime"] = DeprecatedClass.CCDelayTime()
+--CCDelayTime class will be Deprecated,end
+
+--CCLabelAtlas class will be Deprecated,begin
+function DeprecatedClass.CCLabelAtlas()
+ deprecatedTip("CCLabelAtlas","cc.LabelAtlas")
+ return cc.LabelAtlas
+end
+_G["CCLabelAtlas"] = DeprecatedClass.CCLabelAtlas()
+--CCLabelAtlas class will be Deprecated,end
+
+--CCLabelBMFont class will be Deprecated,begin
+function DeprecatedClass.CCLabelBMFont()
+ deprecatedTip("CCLabelBMFont","cc.LabelBMFont")
+ return cc.LabelBMFont
+end
+_G["CCLabelBMFont"] = DeprecatedClass.CCLabelBMFont()
+--CCLabelBMFont class will be Deprecated,end
+
+--CCFadeOutTRTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutTRTiles()
+ deprecatedTip("CCFadeOutTRTiles","cc.FadeOutTRTiles")
+ return cc.FadeOutTRTiles
+end
+_G["CCFadeOutTRTiles"] = DeprecatedClass.CCFadeOutTRTiles()
+--CCFadeOutTRTiles class will be Deprecated,end
+
+--CCEaseElasticIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseElasticIn()
+ deprecatedTip("CCEaseElasticIn","cc.EaseElasticIn")
+ return cc.EaseElasticIn
+end
+_G["CCEaseElasticIn"] = DeprecatedClass.CCEaseElasticIn()
+--CCEaseElasticIn class will be Deprecated,end
+
+--CCParticleSpiral class will be Deprecated,begin
+function DeprecatedClass.CCParticleSpiral()
+ deprecatedTip("CCParticleSpiral","cc.ParticleSpiral")
+ return cc.ParticleSpiral
+end
+_G["CCParticleSpiral"] = DeprecatedClass.CCParticleSpiral()
+--CCParticleSpiral class will be Deprecated,end
+
+--CCFiniteTimeAction class will be Deprecated,begin
+function DeprecatedClass.CCFiniteTimeAction()
+ deprecatedTip("CCFiniteTimeAction","cc.FiniteTimeAction")
+ return cc.FiniteTimeAction
+end
+_G["CCFiniteTimeAction"] = DeprecatedClass.CCFiniteTimeAction()
+--CCFiniteTimeAction class will be Deprecated,end
+
+--CCFadeOutDownTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutDownTiles()
+ deprecatedTip("CCFadeOutDownTiles","cc.FadeOutDownTiles")
+ return cc.FadeOutDownTiles
+end
+_G["CCFadeOutDownTiles"] = DeprecatedClass.CCFadeOutDownTiles()
+--CCFadeOutDownTiles class will be Deprecated,end
+
+--CCJumpTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCJumpTiles3D()
+ deprecatedTip("CCJumpTiles3D","cc.JumpTiles3D")
+ return cc.JumpTiles3D
+end
+_G["CCJumpTiles3D"] = DeprecatedClass.CCJumpTiles3D()
+--CCJumpTiles3D class will be Deprecated,end
+
+--CCEaseBackIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackIn()
+ deprecatedTip("CCEaseBackIn","cc.EaseBackIn")
+ return cc.EaseBackIn
+end
+_G["CCEaseBackIn"] = DeprecatedClass.CCEaseBackIn()
+--CCEaseBackIn class will be Deprecated,end
+
+--CCSpriteBatchNode class will be Deprecated,begin
+function DeprecatedClass.CCSpriteBatchNode()
+ deprecatedTip("CCSpriteBatchNode","cc.SpriteBatchNode")
+ return cc.SpriteBatchNode
+end
+_G["CCSpriteBatchNode"] = DeprecatedClass.CCSpriteBatchNode()
+--CCSpriteBatchNode class will be Deprecated,end
+
+--CCParticleSystem class will be Deprecated,begin
+function DeprecatedClass.CCParticleSystem()
+ deprecatedTip("CCParticleSystem","cc.ParticleSystem")
+ return cc.ParticleSystem
+end
+_G["CCParticleSystem"] = DeprecatedClass.CCParticleSystem()
+--CCParticleSystem class will be Deprecated,end
+
+--CCActionTween class will be Deprecated,begin
+function DeprecatedClass.CCActionTween()
+ deprecatedTip("CCActionTween","cc.ActionTween")
+ return cc.ActionTween
+end
+_G["CCActionTween"] = DeprecatedClass.CCActionTween()
+--CCActionTween class will be Deprecated,end
+
+--CCTransitionFadeDown class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeDown()
+ deprecatedTip("CCTransitionFadeDown","cc.TransitionFadeDown")
+ return cc.TransitionFadeDown
+end
+_G["CCTransitionFadeDown"] = DeprecatedClass.CCTransitionFadeDown()
+--CCTransitionFadeDown class will be Deprecated,end
+
+--CCParticleSun class will be Deprecated,begin
+function DeprecatedClass.CCParticleSun()
+ deprecatedTip("CCParticleSun","cc.ParticleSun")
+ return cc.ParticleSun
+end
+_G["CCParticleSun"] = DeprecatedClass.CCParticleSun()
+--CCParticleSun class will be Deprecated,end
+
+--CCTransitionProgressHorizontal class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressHorizontal()
+ deprecatedTip("CCTransitionProgressHorizontal","cc.TransitionProgressHorizontal")
+ return cc.TransitionProgressHorizontal
+end
+_G["CCTransitionProgressHorizontal"] = DeprecatedClass.CCTransitionProgressHorizontal()
+--CCTransitionProgressHorizontal class will be Deprecated,end
+
+--CCRipple3D class will be Deprecated,begin
+function DeprecatedClass.CCRipple3D()
+ deprecatedTip("CCRipple3D","cc.Ripple3D")
+ return cc.Ripple3D
+end
+_G["CCRipple3D"] = DeprecatedClass.CCRipple3D()
+--CCRipple3D class will be Deprecated,end
+
+--CCTMXLayer class will be Deprecated,begin
+function DeprecatedClass.CCTMXLayer()
+ deprecatedTip("CCTMXLayer","cc.TMXLayer")
+ return cc.TMXLayer
+end
+_G["CCTMXLayer"] = DeprecatedClass.CCTMXLayer()
+--CCTMXLayer class will be Deprecated,end
+
+--CCFlipX class will be Deprecated,begin
+function DeprecatedClass.CCFlipX()
+ deprecatedTip("CCFlipX","cc.FlipX")
+ return cc.FlipX
+end
+_G["CCFlipX"] = DeprecatedClass.CCFlipX()
+--CCFlipX class will be Deprecated,end
+
+--CCFlipY class will be Deprecated,begin
+function DeprecatedClass.CCFlipY()
+ deprecatedTip("CCFlipY","cc.FlipY")
+ return cc.FlipY
+end
+_G["CCFlipY"] = DeprecatedClass.CCFlipY()
+--CCFlipY class will be Deprecated,end
+
+--CCTransitionSplitCols class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSplitCols()
+ deprecatedTip("CCTransitionSplitCols","cc.TransitionSplitCols")
+ return cc.TransitionSplitCols
+end
+_G["CCTransitionSplitCols"] = DeprecatedClass.CCTransitionSplitCols()
+--CCTransitionSplitCols class will be Deprecated,end
+
+--CCTimer class will be Deprecated,begin
+function DeprecatedClass.CCTimer()
+ deprecatedTip("CCTimer","cc.Timer")
+ return cc.Timer
+end
+_G["CCTimer"] = DeprecatedClass.CCTimer()
+--CCTimer class will be Deprecated,end
+
+--CCFadeTo class will be Deprecated,begin
+function DeprecatedClass.CCFadeTo()
+ deprecatedTip("CCFadeTo","cc.FadeTo")
+ return cc.FadeTo
+end
+_G["CCFadeTo"] = DeprecatedClass.CCFadeTo()
+--CCFadeTo class will be Deprecated,end
+
+--CCRepeatForever class will be Deprecated,begin
+function DeprecatedClass.CCRepeatForever()
+ deprecatedTip("CCRepeatForever","cc.RepeatForever")
+ return cc.RepeatForever
+end
+_G["CCRepeatForever"] = DeprecatedClass.CCRepeatForever()
+--CCRepeatForever class will be Deprecated,end
+
+--CCPlace class will be Deprecated,begin
+function DeprecatedClass.CCPlace()
+ deprecatedTip("CCPlace","cc.Place")
+ return cc.Place
+end
+_G["CCPlace"] = DeprecatedClass.CCPlace()
+--CCPlace class will be Deprecated,end
+
+
+--CCGLProgram class will be Deprecated,begin
+function DeprecatedClass.CCGLProgram()
+ deprecatedTip("CCGLProgram","cc.GLProgram")
+ return cc.GLProgram
+end
+_G["CCGLProgram"] = DeprecatedClass.CCGLProgram()
+--CCGLProgram class will be Deprecated,end
+
+--CCEaseBounceOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceOut()
+ deprecatedTip("CCEaseBounceOut","cc.EaseBounceOut")
+ return cc.EaseBounceOut
+end
+_G["CCEaseBounceOut"] = DeprecatedClass.CCEaseBounceOut()
+--CCEaseBounceOut class will be Deprecated,end
+
+--CCCardinalSplineBy class will be Deprecated,begin
+function DeprecatedClass.CCCardinalSplineBy()
+ deprecatedTip("CCCardinalSplineBy","cc.CardinalSplineBy")
+ return cc.CardinalSplineBy
+end
+_G["CCCardinalSplineBy"] = DeprecatedClass.CCCardinalSplineBy()
+--CCCardinalSplineBy class will be Deprecated,end
+
+--CCSpriteFrameCache class will be Deprecated,begin
+function DeprecatedClass.CCSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache","cc.SpriteFrameCache")
+ return cc.SpriteFrameCache
+end
+_G["CCSpriteFrameCache"] = DeprecatedClass.CCSpriteFrameCache()
+--CCSpriteFrameCache class will be Deprecated,end
+
+--CCTransitionShrinkGrow class will be Deprecated,begin
+function DeprecatedClass.CCTransitionShrinkGrow()
+ deprecatedTip("CCTransitionShrinkGrow","cc.TransitionShrinkGrow")
+ return cc.TransitionShrinkGrow
+end
+_G["CCTransitionShrinkGrow"] = DeprecatedClass.CCTransitionShrinkGrow()
+--CCTransitionShrinkGrow class will be Deprecated,end
+
+--CCSplitCols class will be Deprecated,begin
+function DeprecatedClass.CCSplitCols()
+ deprecatedTip("CCSplitCols","cc.SplitCols")
+ return cc.SplitCols
+end
+_G["CCSplitCols"] = DeprecatedClass.CCSplitCols()
+--CCSplitCols class will be Deprecated,end
+
+--CCClippingNode class will be Deprecated,begin
+function DeprecatedClass.CCClippingNode()
+ deprecatedTip("CCClippingNode","cc.ClippingNode")
+ return cc.ClippingNode
+end
+_G["CCClippingNode"] = DeprecatedClass.CCClippingNode()
+--CCClippingNode class will be Deprecated,end
+
+--CCEaseBounceInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceInOut()
+ deprecatedTip("CCEaseBounceInOut","cc.EaseBounceInOut")
+ return cc.EaseBounceInOut
+end
+_G["CCEaseBounceInOut"] = DeprecatedClass.CCEaseBounceInOut()
+--CCEaseBounceInOut class will be Deprecated,end
+
+--CCLiquid class will be Deprecated,begin
+function DeprecatedClass.CCLiquid()
+ deprecatedTip("CCLiquid","cc.Liquid")
+ return cc.Liquid
+end
+_G["CCLiquid"] = DeprecatedClass.CCLiquid()
+--CCLiquid class will be Deprecated,end
+
+--CCParticleFlower class will be Deprecated,begin
+function DeprecatedClass.CCParticleFlower()
+ deprecatedTip("CCParticleFlower","cc.ParticleFlower")
+ return cc.ParticleFlower
+end
+_G["CCParticleFlower"] = DeprecatedClass.CCParticleFlower()
+--CCParticleFlower class will be Deprecated,end
+
+--CCParticleSmoke class will be Deprecated,begin
+function DeprecatedClass.CCParticleSmoke()
+ deprecatedTip("CCParticleSmoke","cc.ParticleSmoke")
+ return cc.ParticleSmoke
+end
+_G["CCParticleSmoke"] = DeprecatedClass.CCParticleSmoke()
+--CCParticleSmoke class will be Deprecated,end
+
+--CCImage class will be Deprecated,begin
+function DeprecatedClass.CCImage()
+ deprecatedTip("CCImage","cc.Image")
+ return cc.Image
+end
+_G["CCImage"] = DeprecatedClass.CCImage()
+--CCImage class will be Deprecated,end
+
+--CCTurnOffTiles class will be Deprecated,begin
+function DeprecatedClass.CCTurnOffTiles()
+ deprecatedTip("CCTurnOffTiles","cc.TurnOffTiles")
+ return cc.TurnOffTiles
+end
+_G["CCTurnOffTiles"] = DeprecatedClass.CCTurnOffTiles()
+--CCTurnOffTiles class will be Deprecated,end
+
+--CCBlink class will be Deprecated,begin
+function DeprecatedClass.CCBlink()
+ deprecatedTip("CCBlink","cc.Blink")
+ return cc.Blink
+end
+_G["CCBlink"] = DeprecatedClass.CCBlink()
+--CCBlink class will be Deprecated,end
+
+--CCShaderCache class will be Deprecated,begin
+function DeprecatedClass.CCShaderCache()
+ deprecatedTip("CCShaderCache","cc.ShaderCache")
+ return cc.ShaderCache
+end
+_G["CCShaderCache"] = DeprecatedClass.CCShaderCache()
+--CCShaderCache class will be Deprecated,end
+
+--CCJumpTo class will be Deprecated,begin
+function DeprecatedClass.CCJumpTo()
+ deprecatedTip("CCJumpTo","cc.JumpTo")
+ return cc.JumpTo
+end
+_G["CCJumpTo"] = DeprecatedClass.CCJumpTo()
+--CCJumpTo class will be Deprecated,end
+
+--CCAtlasNode class will be Deprecated,begin
+function DeprecatedClass.CCAtlasNode()
+ deprecatedTip("CCAtlasNode","cc.AtlasNode")
+ return cc.AtlasNode
+end
+_G["CCAtlasNode"] = DeprecatedClass.CCAtlasNode()
+--CCAtlasNode class will be Deprecated,end
+
+--CCTransitionJumpZoom class will be Deprecated,begin
+function DeprecatedClass.CCTransitionJumpZoom()
+ deprecatedTip("CCTransitionJumpZoom","cc.TransitionJumpZoom")
+ return cc.TransitionJumpZoom
+end
+_G["CCTransitionJumpZoom"] = DeprecatedClass.CCTransitionJumpZoom()
+--CCTransitionJumpZoom class will be Deprecated,end
+
+--CCTransitionProgressVertical class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressVertical()
+ deprecatedTip("CCTransitionProgressVertical","cc.TransitionProgressVertical")
+ return cc.TransitionProgressVertical
+end
+_G["CCTransitionProgressVertical"] = DeprecatedClass.CCTransitionProgressVertical()
+--CCTransitionProgressVertical class will be Deprecated,end
+
+--CCAnimationFrame class will be Deprecated,begin
+function DeprecatedClass.CCAnimationFrame()
+ deprecatedTip("CCAnimationFrame","cc.AnimationFrame")
+ return cc.AnimationFrame
+end
+_G["CCAnimationFrame"] = DeprecatedClass.CCAnimationFrame()
+--CCAnimationFrame class will be Deprecated,end
+
+--CCTintTo class will be Deprecated,begin
+function DeprecatedClass.CCTintTo()
+ deprecatedTip("CCTintTo","cc.TintTo")
+ return cc.TintTo
+end
+_G["CCTintTo"] = DeprecatedClass.CCTintTo()
+--CCTintTo class will be Deprecated,end
+
+--CCTiledGrid3DAction class will be Deprecated,begin
+function DeprecatedClass.CCTiledGrid3DAction()
+ deprecatedTip("CCTiledGrid3DAction","cc.TiledGrid3DAction")
+ return cc.TiledGrid3DAction
+end
+_G["CCTiledGrid3DAction"] = DeprecatedClass.CCTiledGrid3DAction()
+--CCTiledGrid3DAction class will be Deprecated,end
+
+--CCTMXTilesetInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXTilesetInfo()
+ deprecatedTip("CCTMXTilesetInfo","cc.TMXTilesetInfo")
+ return cc.TMXTilesetInfo
+end
+_G["CCTMXTilesetInfo"] = DeprecatedClass.CCTMXTilesetInfo()
+--CCTMXTilesetInfo class will be Deprecated,end
+
+--CCTMXObjectGroup class will be Deprecated,begin
+function DeprecatedClass.CCTMXObjectGroup()
+ deprecatedTip("CCTMXObjectGroup","cc.TMXObjectGroup")
+ return cc.TMXObjectGroup
+end
+_G["CCTMXObjectGroup"] = DeprecatedClass.CCTMXObjectGroup()
+--CCTMXObjectGroup class will be Deprecated,end
+
+--CCParticleGalaxy class will be Deprecated,begin
+function DeprecatedClass.CCParticleGalaxy()
+ deprecatedTip("CCParticleGalaxy","cc.ParticleGalaxy")
+ return cc.ParticleGalaxy
+end
+_G["CCParticleGalaxy"] = DeprecatedClass.CCParticleGalaxy()
+--CCParticleGalaxy class will be Deprecated,end
+
+--CCTwirl class will be Deprecated,begin
+function DeprecatedClass.CCTwirl()
+ deprecatedTip("CCTwirl","cc.Twirl")
+ return cc.Twirl
+end
+_G["CCTwirl"] = DeprecatedClass.CCTwirl()
+--CCTwirl class will be Deprecated,end
+
+--CCMenuItemLabel class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemLabel()
+ deprecatedTip("CCMenuItemLabel","cc.MenuItemLabel")
+ return cc.MenuItemLabel
+end
+_G["CCMenuItemLabel"] = DeprecatedClass.CCMenuItemLabel()
+--CCMenuItemLabel class will be Deprecated,end
+
+--CCLayerColor class will be Deprecated,begin
+function DeprecatedClass.CCLayerColor()
+ deprecatedTip("CCLayerColor","cc.LayerColor")
+ return cc.LayerColor
+end
+_G["CCLayerColor"] = DeprecatedClass.CCLayerColor()
+--CCLayerColor class will be Deprecated,end
+
+--CCFadeOutBLTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutBLTiles()
+ deprecatedTip("CCFadeOutBLTiles","cc.FadeOutBLTiles")
+ return cc.FadeOutBLTiles
+end
+_G["CCFadeOutBLTiles"] = DeprecatedClass.CCFadeOutBLTiles()
+--CCFadeOutBLTiles class will be Deprecated,end
+
+--CCTransitionProgress class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgress()
+ deprecatedTip("CCTransitionProgress","cc.TransitionProgress")
+ return cc.TransitionProgress
+end
+_G["CCTransitionProgress"] = DeprecatedClass.CCTransitionProgress()
+--CCTransitionProgress class will be Deprecated,end
+
+--CCEaseRateAction class will be Deprecated,begin
+function DeprecatedClass.CCEaseRateAction()
+ deprecatedTip("CCEaseRateAction","cc.EaseRateAction")
+ return cc.EaseRateAction
+end
+_G["CCEaseRateAction"] = DeprecatedClass.CCEaseRateAction()
+--CCEaseRateAction class will be Deprecated,end
+
+--CCLayerGradient class will be Deprecated,begin
+function DeprecatedClass.CCLayerGradient()
+ deprecatedTip("CCLayerGradient","cc.LayerGradient")
+ return cc.LayerGradient
+end
+_G["CCLayerGradient"] = DeprecatedClass.CCLayerGradient()
+--CCLayerGradient class will be Deprecated,end
+
+--CCMenuItemSprite class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemSprite()
+ deprecatedTip("CCMenuItemSprite","cc.MenuItemSprite")
+ return cc.MenuItemSprite
+end
+_G["CCMenuItemSprite"] = DeprecatedClass.CCMenuItemSprite()
+--CCMenuItemSprite class will be Deprecated,end
+
+--CCNode class will be Deprecated,begin
+function DeprecatedClass.CCNode()
+ deprecatedTip("CCNode","cc.Node")
+ return cc.Node
+end
+_G["CCNode"] = DeprecatedClass.CCNode()
+--CCNode class will be Deprecated,end
+
+--CCToggleVisibility class will be Deprecated,begin
+function DeprecatedClass.CCToggleVisibility()
+ deprecatedTip("CCToggleVisibility","cc.ToggleVisibility")
+ return cc.ToggleVisibility
+end
+_G["CCToggleVisibility"] = DeprecatedClass.CCToggleVisibility()
+--CCToggleVisibility class will be Deprecated,end
+
+--CCRepeat class will be Deprecated,begin
+function DeprecatedClass.CCRepeat()
+ deprecatedTip("CCRepeat","cc.Repeat")
+ return cc.Repeat
+end
+_G["CCRepeat"] = DeprecatedClass.CCRepeat()
+--CCRepeat class will be Deprecated,end
+
+--CCRenderTexture class will be Deprecated,begin
+function DeprecatedClass.CCRenderTexture()
+ deprecatedTip("CCRenderTexture","cc.RenderTexture")
+ return cc.RenderTexture
+end
+_G["CCRenderTexture"] = DeprecatedClass.CCRenderTexture()
+--CCRenderTexture class will be Deprecated,end
+
+--CCTransitionFlipY class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFlipY()
+ deprecatedTip("CCTransitionFlipY","cc.TransitionFlipY")
+ return cc.TransitionFlipY
+end
+_G["CCTransitionFlipY"] = DeprecatedClass.CCTransitionFlipY()
+--CCTransitionFlipY class will be Deprecated,end
+
+--CCLayerMultiplex class will be Deprecated,begin
+function DeprecatedClass.CCLayerMultiplex()
+ deprecatedTip("CCLayerMultiplex","cc.LayerMultiplex")
+ return cc.LayerMultiplex
+end
+_G["CCLayerMultiplex"] = DeprecatedClass.CCLayerMultiplex()
+--CCLayerMultiplex class will be Deprecated,end
+
+--CCTMXLayerInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXLayerInfo()
+ deprecatedTip("CCTMXLayerInfo","cc.TMXLayerInfo")
+ return cc.TMXLayerInfo
+end
+_G["CCTMXLayerInfo"] = DeprecatedClass.CCTMXLayerInfo()
+--CCTMXLayerInfo class will be Deprecated,end
+
+--CCEaseBackInOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseBackInOut()
+ deprecatedTip("CCEaseBackInOut","cc.EaseBackInOut")
+ return cc.EaseBackInOut
+end
+_G["CCEaseBackInOut"] = DeprecatedClass.CCEaseBackInOut()
+--CCEaseBackInOut class will be Deprecated,end
+
+--CCActionInstant class will be Deprecated,begin
+function DeprecatedClass.CCActionInstant()
+ deprecatedTip("CCActionInstant","cc.ActionInstant")
+ return cc.ActionInstant
+end
+_G["CCActionInstant"] = DeprecatedClass.CCActionInstant()
+--CCActionInstant class will be Deprecated,end
+
+--CCTargetedAction class will be Deprecated,begin
+function DeprecatedClass.CCTargetedAction()
+ deprecatedTip("CCTargetedAction","cc.TargetedAction")
+ return cc.TargetedAction
+end
+_G["CCTargetedAction"] = DeprecatedClass.CCTargetedAction()
+--CCTargetedAction class will be Deprecated,end
+
+--CCDrawNode class will be Deprecated,begin
+function DeprecatedClass.CCDrawNode()
+ deprecatedTip("CCDrawNode","cc.DrawNode")
+ return cc.DrawNode
+end
+_G["CCDrawNode"] = DeprecatedClass.CCDrawNode()
+--CCDrawNode class will be Deprecated,end
+
+--CCTransitionTurnOffTiles class will be Deprecated,begin
+function DeprecatedClass.CCTransitionTurnOffTiles()
+ deprecatedTip("CCTransitionTurnOffTiles","cc.TransitionTurnOffTiles")
+ return cc.TransitionTurnOffTiles
+end
+_G["CCTransitionTurnOffTiles"] = DeprecatedClass.CCTransitionTurnOffTiles()
+--CCTransitionTurnOffTiles class will be Deprecated,end
+
+--CCRotateTo class will be Deprecated,begin
+function DeprecatedClass.CCRotateTo()
+ deprecatedTip("CCRotateTo","cc.RotateTo")
+ return cc.RotateTo
+end
+_G["CCRotateTo"] = DeprecatedClass.CCRotateTo()
+--CCRotateTo class will be Deprecated,end
+
+--CCTransitionSplitRows class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSplitRows()
+ deprecatedTip("CCTransitionSplitRows","cc.TransitionSplitRows")
+ return cc.TransitionSplitRows
+end
+_G["CCTransitionSplitRows"] = DeprecatedClass.CCTransitionSplitRows()
+--CCTransitionSplitRows class will be Deprecated,end
+
+--CCTransitionProgressRadialCCW class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressRadialCCW()
+ deprecatedTip("CCTransitionProgressRadialCCW","cc.TransitionProgressRadialCCW")
+ return cc.TransitionProgressRadialCCW
+end
+_G["CCTransitionProgressRadialCCW"] = DeprecatedClass.CCTransitionProgressRadialCCW()
+--CCTransitionProgressRadialCCW class will be Deprecated,end
+
+--CCScaleTo class will be Deprecated,begin
+function DeprecatedClass.CCScaleTo()
+ deprecatedTip("CCScaleTo","cc.ScaleTo")
+ return cc.ScaleTo
+end
+_G["CCScaleTo"] = DeprecatedClass.CCScaleTo()
+--CCScaleTo class will be Deprecated,end
+
+--CCTransitionPageTurn class will be Deprecated,begin
+function DeprecatedClass.CCTransitionPageTurn()
+ deprecatedTip("CCTransitionPageTurn","cc.TransitionPageTurn")
+ return cc.TransitionPageTurn
+end
+_G["CCTransitionPageTurn"] = DeprecatedClass.CCTransitionPageTurn()
+--CCTransitionPageTurn class will be Deprecated,end
+
+--CCParticleExplosion class will be Deprecated,begin
+function DeprecatedClass.CCParticleExplosion()
+ deprecatedTip("CCParticleExplosion","cc.ParticleExplosion")
+ return cc.ParticleExplosion
+end
+_G["CCParticleExplosion"] = DeprecatedClass.CCParticleExplosion()
+--CCParticleExplosion class will be Deprecated,end
+
+--CCMenu class will be Deprecated,begin
+function DeprecatedClass.CCMenu()
+ deprecatedTip("CCMenu","cc.Menu")
+ return cc.Menu
+end
+_G["CCMenu"] = DeprecatedClass.CCMenu()
+--CCMenu class will be Deprecated,end
+
+--CCTexture2D class will be Deprecated,begin
+function DeprecatedClass.CCTexture2D()
+ deprecatedTip("CCTexture2D","cc.Texture2D")
+ return cc.Texture2D
+end
+_G["CCTexture2D"] = DeprecatedClass.CCTexture2D()
+--CCTexture2D class will be Deprecated,end
+
+--CCActionManager class will be Deprecated,begin
+function DeprecatedClass.CCActionManager()
+ deprecatedTip("CCActionManager","cc.ActionManager")
+ return cc.ActionManager
+end
+_G["CCActionManager"] = DeprecatedClass.CCActionManager()
+--CCActionManager class will be Deprecated,end
+
+--CCParticleBatchNode class will be Deprecated,begin
+function DeprecatedClass.CCParticleBatchNode()
+ deprecatedTip("CCParticleBatchNode","cc.ParticleBatchNode")
+ return cc.ParticleBatchNode
+end
+_G["CCParticleBatchNode"] = DeprecatedClass.CCParticleBatchNode()
+--CCParticleBatchNode class will be Deprecated,end
+
+--CCTransitionZoomFlipX class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipX()
+ deprecatedTip("CCTransitionZoomFlipX","cc.TransitionZoomFlipX")
+ return cc.TransitionZoomFlipX
+end
+_G["CCTransitionZoomFlipX"] = DeprecatedClass.CCTransitionZoomFlipX()
+--CCTransitionZoomFlipX class will be Deprecated,end
+
+--CCScaleBy class will be Deprecated,begin
+function DeprecatedClass.CCScaleBy()
+ deprecatedTip("CCScaleBy","cc.ScaleBy")
+ return cc.ScaleBy
+end
+_G["CCScaleBy"] = DeprecatedClass.CCScaleBy()
+--CCScaleBy class will be Deprecated,end
+
+--CCTileMapAtlas class will be Deprecated,begin
+function DeprecatedClass.CCTileMapAtlas()
+ deprecatedTip("CCTileMapAtlas","cc.TileMapAtlas")
+ return cc.TileMapAtlas
+end
+_G["CCTileMapAtlas"] = DeprecatedClass.CCTileMapAtlas()
+--CCTileMapAtlas class will be Deprecated,end
+
+--CCAction class will be Deprecated,begin
+function DeprecatedClass.CCAction()
+ deprecatedTip("CCAction","cc.Action")
+ return cc.Action
+end
+_G["CCAction"] = DeprecatedClass.CCAction()
+--CCAction class will be Deprecated,end
+
+--CCLens3D class will be Deprecated,begin
+function DeprecatedClass.CCLens3D()
+ deprecatedTip("CCLens3D","cc.Lens3D")
+ return cc.Lens3D
+end
+_G["CCLens3D"] = DeprecatedClass.CCLens3D()
+--CCLens3D class will be Deprecated,end
+
+--CCAnimation class will be Deprecated,begin
+function DeprecatedClass.CCAnimation()
+ deprecatedTip("CCAnimation","cc.Animation")
+ return cc.Animation
+end
+_G["CCAnimation"] = DeprecatedClass.CCAnimation()
+--CCAnimation class will be Deprecated,end
+
+--CCTransitionSlideInT class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInT()
+ deprecatedTip("CCTransitionSlideInT","cc.TransitionSlideInT")
+ return cc.TransitionSlideInT
+end
+_G["CCTransitionSlideInT"] = DeprecatedClass.CCTransitionSlideInT()
+--CCTransitionSlideInT class will be Deprecated,end
+
+--CCSpawn class will be Deprecated,begin
+function DeprecatedClass.CCSpawn()
+ deprecatedTip("CCSpawn","cc.Spawn")
+ return cc.Spawn
+end
+_G["CCSpawn"] = DeprecatedClass.CCSpawn()
+--CCSpawn class will be Deprecated,end
+
+--CCSet class will be Deprecated,begin
+function DeprecatedClass.CCSet()
+ deprecatedTip("CCSet","cc.Set")
+ return cc.Set
+end
+_G["CCSet"] = DeprecatedClass.CCSet()
+--CCSet class will be Deprecated,end
+
+--CCShakyTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCShakyTiles3D()
+ deprecatedTip("CCShakyTiles3D","cc.ShakyTiles3D")
+ return cc.ShakyTiles3D
+end
+_G["CCShakyTiles3D"] = DeprecatedClass.CCShakyTiles3D()
+--CCShakyTiles3D class will be Deprecated,end
+
+--CCPageTurn3D class will be Deprecated,begin
+function DeprecatedClass.CCPageTurn3D()
+ deprecatedTip("CCPageTurn3D","cc.PageTurn3D")
+ return cc.PageTurn3D
+end
+_G["CCPageTurn3D"] = DeprecatedClass.CCPageTurn3D()
+--CCPageTurn3D class will be Deprecated,end
+
+--CCGrid3D class will be Deprecated,begin
+function DeprecatedClass.CCGrid3D()
+ deprecatedTip("CCGrid3D","cc.Grid3D")
+ return cc.Grid3D
+end
+_G["CCGrid3D"] = DeprecatedClass.CCGrid3D()
+--CCGrid3D class will be Deprecated,end
+
+--CCTransitionProgressInOut class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressInOut()
+ deprecatedTip("CCTransitionProgressInOut","cc.TransitionProgressInOut")
+ return cc.TransitionProgressInOut
+end
+_G["CCTransitionProgressInOut"] = DeprecatedClass.CCTransitionProgressInOut()
+--CCTransitionProgressInOut class will be Deprecated,end
+
+--CCTransitionFadeBL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeBL()
+ deprecatedTip("CCTransitionFadeBL","cc.TransitionFadeBL")
+ return cc.TransitionFadeBL
+end
+_G["CCTransitionFadeBL"] = DeprecatedClass.CCTransitionFadeBL()
+--CCTransitionFadeBL class will be Deprecated,end
+
+--CCCamera class will be Deprecated,begin
+function DeprecatedClass.CCCamera()
+ deprecatedTip("CCCamera","cc.Camera")
+ return cc.Camera
+end
+_G["CCCamera"] = DeprecatedClass.CCCamera()
+--CCCamera class will be Deprecated,end
+
+--CCLayerRGBA class will be Deprecated,begin
+function DeprecatedClass.CCLayerRGBA()
+ deprecatedTip("CCLayerRGBA","cc.Layer")
+ return cc.Layer
+end
+_G["CCLayerRGBA"] = DeprecatedClass.CCLayerRGBA()
+--CCLayerRGBA class will be Deprecated,end
+
+--LayerRGBA class will be Deprecated,begin
+function DeprecatedClass.LayerRGBA()
+ deprecatedTip("cc.LayerRGBA","cc.Layer")
+ return cc.Layer
+end
+_G["cc"]["LayerRGBA"] = DeprecatedClass.LayerRGBA()
+--LayerRGBA class will be Deprecated,end
+
+--CCBezierTo class will be Deprecated,begin
+function DeprecatedClass.CCBezierTo()
+ deprecatedTip("CCBezierTo","cc.BezierTo")
+ return cc.BezierTo
+end
+_G["CCBezierTo"] = DeprecatedClass.CCBezierTo()
+--CCBezierTo class will be Deprecated,end
+
+--CCFollow class will be Deprecated,begin
+function DeprecatedClass.CCFollow()
+ deprecatedTip("CCFollow","cc.Follow")
+ return cc.Follow
+end
+_G["CCFollow"] = DeprecatedClass.CCFollow()
+--CCFollow class will be Deprecated,end
+
+--CCTintBy class will be Deprecated,begin
+function DeprecatedClass.CCTintBy()
+ deprecatedTip("CCTintBy","cc.TintBy")
+ return cc.TintBy
+end
+_G["CCTintBy"] = DeprecatedClass.CCTintBy()
+--CCTintBy class will be Deprecated,end
+
+--CCActionInterval class will be Deprecated,begin
+function DeprecatedClass.CCActionInterval()
+ deprecatedTip("CCActionInterval","cc.ActionInterval")
+ return cc.ActionInterval
+end
+_G["CCActionInterval"] = DeprecatedClass.CCActionInterval()
+--CCActionInterval class will be Deprecated,end
+
+--CCAnimate class will be Deprecated,begin
+function DeprecatedClass.CCAnimate()
+ deprecatedTip("CCAnimate","cc.Animate")
+ return cc.Animate
+end
+_G["CCAnimate"] = DeprecatedClass.CCAnimate()
+--CCAnimate class will be Deprecated,end
+
+--CCProgressTimer class will be Deprecated,begin
+function DeprecatedClass.CCProgressTimer()
+ deprecatedTip("CCProgressTimer","cc.ProgressTimer")
+ return cc.ProgressTimer
+end
+_G["CCProgressTimer"] = DeprecatedClass.CCProgressTimer()
+--CCProgressTimer class will be Deprecated,end
+
+--CCParticleMeteor class will be Deprecated,begin
+function DeprecatedClass.CCParticleMeteor()
+ deprecatedTip("CCParticleMeteor","cc.ParticleMeteor")
+ return cc.ParticleMeteor
+end
+_G["CCParticleMeteor"] = DeprecatedClass.CCParticleMeteor()
+--CCParticleMeteor class will be Deprecated,end
+
+--CCTransitionFadeTR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeTR()
+ deprecatedTip("CCTransitionFadeTR","cc.TransitionFadeTR")
+ return cc.TransitionFadeTR
+end
+_G["CCTransitionFadeTR"] = DeprecatedClass.CCTransitionFadeTR()
+--CCTransitionFadeTR class will be Deprecated,end
+
+--CCCatmullRomTo class will be Deprecated,begin
+function DeprecatedClass.CCCatmullRomTo()
+ deprecatedTip("CCCatmullRomTo","cc.CatmullRomTo")
+ return cc.CatmullRomTo
+end
+_G["CCCatmullRomTo"] = DeprecatedClass.CCCatmullRomTo()
+--CCCatmullRomTo class will be Deprecated,end
+
+--CCTransitionZoomFlipY class will be Deprecated,begin
+function DeprecatedClass.CCTransitionZoomFlipY()
+ deprecatedTip("CCTransitionZoomFlipY","cc.TransitionZoomFlipY")
+ return cc.TransitionZoomFlipY
+end
+_G["CCTransitionZoomFlipY"] = DeprecatedClass.CCTransitionZoomFlipY()
+--CCTransitionZoomFlipY class will be Deprecated,end
+
+--CCTransitionCrossFade class will be Deprecated,begin
+function DeprecatedClass.CCTransitionCrossFade()
+ deprecatedTip("CCTransitionCrossFade","cc.TransitionCrossFade")
+ return cc.TransitionCrossFade
+end
+_G["CCTransitionCrossFade"] = DeprecatedClass.CCTransitionCrossFade()
+--CCTransitionCrossFade class will be Deprecated,end
+
+--CCGridBase class will be Deprecated,begin
+function DeprecatedClass.CCGridBase()
+ deprecatedTip("CCGridBase","cc.GridBase")
+ return cc.GridBase
+end
+_G["CCGridBase"] = DeprecatedClass.CCGridBase()
+--CCGridBase class will be Deprecated,end
+
+--CCSkewTo class will be Deprecated,begin
+function DeprecatedClass.CCSkewTo()
+ deprecatedTip("CCSkewTo","cc.SkewTo")
+ return cc.SkewTo
+end
+_G["CCSkewTo"] = DeprecatedClass.CCSkewTo()
+--CCSkewTo class will be Deprecated,end
+
+--CCCardinalSplineTo class will be Deprecated,begin
+function DeprecatedClass.CCCardinalSplineTo()
+ deprecatedTip("CCCardinalSplineTo","cc.CardinalSplineTo")
+ return cc.CardinalSplineTo
+end
+_G["CCCardinalSplineTo"] = DeprecatedClass.CCCardinalSplineTo()
+--CCCardinalSplineTo class will be Deprecated,end
+
+--CCTMXMapInfo class will be Deprecated,begin
+function DeprecatedClass.CCTMXMapInfo()
+ deprecatedTip("CCTMXMapInfo","cc.TMXMapInfo")
+ return cc.TMXMapInfo
+end
+_G["CCTMXMapInfo"] = DeprecatedClass.CCTMXMapInfo()
+--CCTMXMapInfo class will be Deprecated,end
+
+--CCEaseExponentialIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseExponentialIn()
+ deprecatedTip("CCEaseExponentialIn","cc.EaseExponentialIn")
+ return cc.EaseExponentialIn
+end
+_G["CCEaseExponentialIn"] = DeprecatedClass.CCEaseExponentialIn()
+--CCEaseExponentialIn class will be Deprecated,end
+
+--CCReuseGrid class will be Deprecated,begin
+function DeprecatedClass.CCReuseGrid()
+ deprecatedTip("CCReuseGrid","cc.ReuseGrid")
+ return cc.ReuseGrid
+end
+_G["CCReuseGrid"] = DeprecatedClass.CCReuseGrid()
+--CCReuseGrid class will be Deprecated,end
+
+--CCMenuItemAtlasFont class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemAtlasFont()
+ deprecatedTip("CCMenuItemAtlasFont","cc.MenuItemAtlasFont")
+ return cc.MenuItemAtlasFont
+end
+_G["CCMenuItemAtlasFont"] = DeprecatedClass.CCMenuItemAtlasFont()
+--CCMenuItemAtlasFont class will be Deprecated,end
+
+--CCSpriteFrame class will be Deprecated,begin
+function DeprecatedClass.CCSpriteFrame()
+ deprecatedTip("CCSpriteFrame","cc.SpriteFrame")
+ return cc.SpriteFrame
+end
+_G["CCSpriteFrame"] = DeprecatedClass.CCSpriteFrame()
+--CCSpriteFrame class will be Deprecated,end
+
+--CCSplitRows class will be Deprecated,begin
+function DeprecatedClass.CCSplitRows()
+ deprecatedTip("CCSplitRows","cc.SplitRows")
+ return cc.SplitRows
+end
+_G["CCSplitRows"] = DeprecatedClass.CCSplitRows()
+--CCSplitRows class will be Deprecated,end
+
+--CCSprite class will be Deprecated,begin
+function DeprecatedClass.CCSprite()
+ deprecatedTip("CCSprite","cc.Sprite")
+ return cc.Sprite
+end
+_G["CCSprite"] = DeprecatedClass.CCSprite()
+--CCSprite class will be Deprecated,end
+
+--CCOrbitCamera class will be Deprecated,begin
+function DeprecatedClass.CCOrbitCamera()
+ deprecatedTip("CCOrbitCamera","cc.OrbitCamera")
+ return cc.OrbitCamera
+end
+_G["CCOrbitCamera"] = DeprecatedClass.CCOrbitCamera()
+--CCOrbitCamera class will be Deprecated,end
+
+--CCUserDefault class will be Deprecated,begin
+function DeprecatedClass.CCUserDefault()
+ deprecatedTip("CCUserDefault","cc.UserDefault")
+ return cc.UserDefault
+end
+_G["CCUserDefault"] = DeprecatedClass.CCUserDefault()
+--CCUserDefault class will be Deprecated,end
+
+--CCFadeOutUpTiles class will be Deprecated,begin
+function DeprecatedClass.CCFadeOutUpTiles()
+ deprecatedTip("CCFadeOutUpTiles","cc.FadeOutUpTiles")
+ return cc.FadeOutUpTiles
+end
+_G["CCFadeOutUpTiles"] = DeprecatedClass.CCFadeOutUpTiles()
+--CCFadeOutUpTiles class will be Deprecated,end
+
+--CCParticleRain class will be Deprecated,begin
+function DeprecatedClass.CCParticleRain()
+ deprecatedTip("CCParticleRain","cc.ParticleRain")
+ return cc.ParticleRain
+end
+_G["CCParticleRain"] = DeprecatedClass.CCParticleRain()
+--CCParticleRain class will be Deprecated,end
+
+--CCWaves class will be Deprecated,begin
+function DeprecatedClass.CCWaves()
+ deprecatedTip("CCWaves","cc.Waves")
+ return cc.Waves
+end
+_G["CCWaves"] = DeprecatedClass.CCWaves()
+--CCWaves class will be Deprecated,end
+
+--CCEaseOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseOut()
+ deprecatedTip("CCEaseOut","cc.EaseOut")
+ return cc.EaseOut
+end
+_G["CCEaseOut"] = DeprecatedClass.CCEaseOut()
+--CCEaseOut class will be Deprecated,end
+
+--CCEaseBounceIn class will be Deprecated,begin
+function DeprecatedClass.CCEaseBounceIn()
+ deprecatedTip("CCEaseBounceIn","cc.EaseBounceIn")
+ return cc.EaseBounceIn
+end
+_G["CCEaseBounceIn"] = DeprecatedClass.CCEaseBounceIn()
+--CCEaseBounceIn class will be Deprecated,end
+
+--CCMenuItemFont class will be Deprecated,begin
+function DeprecatedClass.CCMenuItemFont()
+ deprecatedTip("CCMenuItemFont","cc.MenuItemFont")
+ return cc.MenuItemFont
+end
+_G["CCMenuItemFont"] = DeprecatedClass.CCMenuItemFont()
+--CCMenuItemFont class will be Deprecated,end
+
+--CCEaseSineOut class will be Deprecated,begin
+function DeprecatedClass.CCEaseSineOut()
+ deprecatedTip("CCEaseSineOut","cc.EaseSineOut")
+ return cc.EaseSineOut
+end
+_G["CCEaseSineOut"] = DeprecatedClass.CCEaseSineOut()
+--CCEaseSineOut class will be Deprecated,end
+
+--CCTextureCache class will be Deprecated,begin
+function DeprecatedClass.CCTextureCache()
+ deprecatedTip("CCTextureCache","cc.TextureCache")
+ return cc.TextureCache
+end
+_G["CCTextureCache"] = DeprecatedClass.CCTextureCache()
+--CCTextureCache class will be Deprecated,end
+
+--CCTiledGrid3D class will be Deprecated,begin
+function DeprecatedClass.CCTiledGrid3D()
+ deprecatedTip("CCTiledGrid3D","cc.TiledGrid3D")
+ return cc.TiledGrid3D
+end
+_G["CCTiledGrid3D"] = DeprecatedClass.CCTiledGrid3D()
+--CCTiledGrid3D class will be Deprecated,end
+
+--CCRemoveSelf class will be Deprecated,begin
+function DeprecatedClass.CCRemoveSelf()
+ deprecatedTip("CCRemoveSelf","cc.RemoveSelf")
+ return cc.RemoveSelf
+end
+_G["CCRemoveSelf"] = DeprecatedClass.CCRemoveSelf()
+--CCRemoveSelf class will be Deprecated,end
+
+--CCLabelTTF class will be Deprecated,begin
+function DeprecatedClass.CCLabelTTF()
+ deprecatedTip("CCLabelTTF","cc.LabelTTF")
+ return cc.LabelTTF
+end
+_G["CCLabelTTF"] = DeprecatedClass.CCLabelTTF()
+--CCLabelTTF class will be Deprecated,end
+
+--CCTouch class will be Deprecated,begin
+function DeprecatedClass.CCTouch()
+ deprecatedTip("CCTouch","cc.Touch")
+ return cc.Touch
+end
+_G["CCTouch"] = DeprecatedClass.CCTouch()
+--CCTouch class will be Deprecated,end
+
+--CCMoveBy class will be Deprecated,begin
+function DeprecatedClass.CCMoveBy()
+ deprecatedTip("CCMoveBy","cc.MoveBy")
+ return cc.MoveBy
+end
+_G["CCMoveBy"] = DeprecatedClass.CCMoveBy()
+--CCMoveBy class will be Deprecated,end
+
+--CCMotionStreak class will be Deprecated,begin
+function DeprecatedClass.CCMotionStreak()
+ deprecatedTip("CCMotionStreak","cc.MotionStreak")
+ return cc.MotionStreak
+end
+_G["CCMotionStreak"] = DeprecatedClass.CCMotionStreak()
+--CCMotionStreak class will be Deprecated,end
+
+--CCRotateBy class will be Deprecated,begin
+function DeprecatedClass.CCRotateBy()
+ deprecatedTip("CCRotateBy","cc.RotateBy")
+ return cc.RotateBy
+end
+_G["CCRotateBy"] = DeprecatedClass.CCRotateBy()
+--CCRotateBy class will be Deprecated,end
+
+--CCFileUtils class will be Deprecated,begin
+function DeprecatedClass.CCFileUtils()
+ deprecatedTip("CCFileUtils","cc.FileUtils")
+ return cc.FileUtils
+end
+_G["CCFileUtils"] = DeprecatedClass.CCFileUtils()
+--CCFileUtils class will be Deprecated,end
+
+--CCBezierBy class will be Deprecated,begin
+function DeprecatedClass.CCBezierBy()
+ deprecatedTip("CCBezierBy","cc.BezierBy")
+ return cc.BezierBy
+end
+_G["CCBezierBy"] = DeprecatedClass.CCBezierBy()
+--CCBezierBy class will be Deprecated,end
+
+--CCTransitionFade class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFade()
+ deprecatedTip("CCTransitionFade","cc.TransitionFade")
+ return cc.TransitionFade
+end
+_G["CCTransitionFade"] = DeprecatedClass.CCTransitionFade()
+--CCTransitionFade class will be Deprecated,end
+
+--CCTransitionProgressOutIn class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressOutIn()
+ deprecatedTip("CCTransitionProgressOutIn","cc.TransitionProgressOutIn")
+ return cc.TransitionProgressOutIn
+end
+_G["CCTransitionProgressOutIn"] = DeprecatedClass.CCTransitionProgressOutIn()
+--CCTransitionProgressOutIn class will be Deprecated,end
+
+--CCCatmullRomBy class will be Deprecated,begin
+function DeprecatedClass.CCCatmullRomBy()
+ deprecatedTip("CCCatmullRomBy","cc.CatmullRomBy")
+ return cc.CatmullRomBy
+end
+_G["CCCatmullRomBy"] = DeprecatedClass.CCCatmullRomBy()
+--CCCatmullRomBy class will be Deprecated,end
+
+--CCGridAction class will be Deprecated,begin
+function DeprecatedClass.CCGridAction()
+ deprecatedTip("CCGridAction","cc.GridAction")
+ return cc.GridAction
+end
+_G["CCGridAction"] = DeprecatedClass.CCGridAction()
+--CCGridAction class will be Deprecated,end
+
+--CCShaky3D class will be Deprecated,begin
+function DeprecatedClass.CCShaky3D()
+ deprecatedTip("CCShaky3D","cc.Shaky3D")
+ return cc.Shaky3D
+end
+_G["CCShaky3D"] = DeprecatedClass.CCShaky3D()
+--CCShaky3D class will be Deprecated,end
+
+--CCTransitionEaseScene class will be Deprecated,begin
+function DeprecatedClass.CCTransitionEaseScene()
+ deprecatedTip("CCTransitionEaseScene","cc.TransitionEaseScene")
+ return cc.TransitionEaseScene
+end
+_G["CCTransitionEaseScene"] = DeprecatedClass.CCTransitionEaseScene()
+--CCTransitionEaseScene class will be Deprecated,end
+
+--CCSequence class will be Deprecated,begin
+function DeprecatedClass.CCSequence()
+ deprecatedTip("CCSequence","cc.Sequence")
+ return cc.Sequence
+end
+_G["CCSequence"] = DeprecatedClass.CCSequence()
+--CCSequence class will be Deprecated,end
+
+--CCTransitionFadeUp class will be Deprecated,begin
+function DeprecatedClass.CCTransitionFadeUp()
+ deprecatedTip("CCTransitionFadeUp","cc.TransitionFadeUp")
+ return cc.TransitionFadeUp
+end
+_G["CCTransitionFadeUp"] = DeprecatedClass.CCTransitionFadeUp()
+--CCTransitionFadeUp class will be Deprecated,end
+
+--CCTransitionProgressRadialCW class will be Deprecated,begin
+function DeprecatedClass.CCTransitionProgressRadialCW()
+ deprecatedTip("CCTransitionProgressRadialCW","cc.TransitionProgressRadialCW")
+ return cc.TransitionProgressRadialCW
+end
+_G["CCTransitionProgressRadialCW"] = DeprecatedClass.CCTransitionProgressRadialCW()
+--CCTransitionProgressRadialCW class will be Deprecated,end
+
+--CCShuffleTiles class will be Deprecated,begin
+function DeprecatedClass.CCShuffleTiles()
+ deprecatedTip("CCShuffleTiles","cc.ShuffleTiles")
+ return cc.ShuffleTiles
+end
+_G["CCShuffleTiles"] = DeprecatedClass.CCShuffleTiles()
+--CCShuffleTiles class will be Deprecated,end
+
+--CCTransitionSlideInR class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInR()
+ deprecatedTip("CCTransitionSlideInR","cc.TransitionSlideInR")
+ return cc.TransitionSlideInR
+end
+_G["CCTransitionSlideInR"] = DeprecatedClass.CCTransitionSlideInR()
+--CCTransitionSlideInR class will be Deprecated,end
+
+--CCScene class will be Deprecated,begin
+function DeprecatedClass.CCScene()
+ deprecatedTip("CCScene","cc.Scene")
+ return cc.Scene
+end
+_G["CCScene"] = DeprecatedClass.CCScene()
+--CCScene class will be Deprecated,end
+
+--CCParallaxNode class will be Deprecated,begin
+function DeprecatedClass.CCParallaxNode()
+ deprecatedTip("CCParallaxNode","cc.ParallaxNode")
+ return cc.ParallaxNode
+end
+_G["CCParallaxNode"] = DeprecatedClass.CCParallaxNode()
+--CCParallaxNode class will be Deprecated,end
+
+--CCTransitionSlideInL class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInL()
+ deprecatedTip("CCTransitionSlideInL","cc.TransitionSlideInL")
+ return cc.TransitionSlideInL
+end
+_G["CCTransitionSlideInL"] = DeprecatedClass.CCTransitionSlideInL()
+--CCTransitionSlideInL class will be Deprecated,end
+
+--CCWavesTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCWavesTiles3D()
+ deprecatedTip("CCWavesTiles3D","cc.WavesTiles3D")
+ return cc.WavesTiles3D
+end
+_G["CCWavesTiles3D"] = DeprecatedClass.CCWavesTiles3D()
+--CCWavesTiles3D class will be Deprecated,end
+
+--CCTransitionSlideInB class will be Deprecated,begin
+function DeprecatedClass.CCTransitionSlideInB()
+ deprecatedTip("CCTransitionSlideInB","cc.TransitionSlideInB")
+ return cc.TransitionSlideInB
+end
+_G["CCTransitionSlideInB"] = DeprecatedClass.CCTransitionSlideInB()
+--CCTransitionSlideInB class will be Deprecated,end
+
+--CCSpeed class will be Deprecated,begin
+function DeprecatedClass.CCSpeed()
+ deprecatedTip("CCSpeed","cc.Speed")
+ return cc.Speed
+end
+_G["CCSpeed"] = DeprecatedClass.CCSpeed()
+--CCSpeed class will be Deprecated,end
+
+--CCShatteredTiles3D class will be Deprecated,begin
+function DeprecatedClass.CCShatteredTiles3D()
+ deprecatedTip("CCShatteredTiles3D","cc.ShatteredTiles3D")
+ return cc.ShatteredTiles3D
+end
+_G["CCShatteredTiles3D"] = DeprecatedClass.CCShatteredTiles3D()
+--CCShatteredTiles3D class will be Deprecated,end
+
+--CCCallFuncN class will be Deprecated,begin
+function DeprecatedClass.CCCallFuncN()
+ deprecatedTip("CCCallFuncN","cc.CallFunc")
+ return cc.CallFunc
+end
+_G["CCCallFuncN"] = DeprecatedClass.CCCallFuncN()
+--CCCallFuncN class will be Deprecated,end
+
+--CCEGLViewProtocol class will be Deprecated,begin
+function DeprecatedClass.CCEGLViewProtocol()
+ deprecatedTip("CCEGLViewProtocol","cc.GLViewProtocol")
+ return cc.GLViewProtocol
+end
+_G["CCEGLViewProtocol"] = DeprecatedClass.CCEGLViewProtocol()
+--CCEGLViewProtocol class will be Deprecated,end
+
+--CCEGLView class will be Deprecated,begin
+function DeprecatedClass.CCEGLView()
+ deprecatedTip("CCEGLView","cc.GLView")
+ return cc.GLView
+end
+
+_G["CCEGLView"] = DeprecatedClass.CCEGLView()
+--CCEGLView class will be Deprecated,end
+
+--XMLHttpRequest class will be Deprecated,begin
+function DeprecatedClass.XMLHttpRequest()
+ deprecatedTip("XMLHttpRequest","cc.XMLHttpRequest")
+ return cc.XMLHttpRequest
+end
+_G["XMLHttpRequest"] = DeprecatedClass.XMLHttpRequest()
+--XMLHttpRequest class will be Deprecated,end
+
+--EGLViewProtocol class will be Deprecated,begin
+function DeprecatedClass.EGLViewProtocol()
+ deprecatedTip("cc.EGLViewProtocol","cc.GLViewProtocol")
+ return cc.GLViewProtocol
+end
+_G["cc.EGLViewProtocol"] = DeprecatedClass.EGLViewProtocol()
+--EGLViewProtocol class will be Deprecated,end
+
+--EGLView class will be Deprecated,begin
+function DeprecatedClass.EGLView()
+ deprecatedTip("cc.EGLView","cc.GLView")
+ return cc.GLView
+end
+_G["cc.EGLView"] = DeprecatedClass.EGLView()
+--EGLView class will be Deprecated,end
+
+--EGLView class will be Deprecated,begin
+function DeprecatedClass.EGLView()
+ deprecatedTip("cc.EGLView","cc.GLView")
+ print(cc.GLView)
+ return cc.GLView
+end
+_G["cc.EGLView"] = DeprecatedClass.EGLView()
+--EGLView class will be Deprecated,end
+
+--ShaderCache class will be Deprecated,begin
+function DeprecatedClass.ShaderCache()
+ deprecatedTip("cc.ShaderCache","cc.GLProgramCache")
+ return cc.GLProgramCache
+end
+cc.ShaderCache = DeprecatedClass.ShaderCache()
+--ShaderCache class will be Deprecated,end
+
+
+
diff --git a/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua b/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua
new file mode 100644
index 0000000..e28ae3e
--- /dev/null
+++ b/src/cocos/cocos2d/DeprecatedCocos2dEnum.lua
@@ -0,0 +1,371 @@
+
+--Enums will be deprecated,begin
+_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
+_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
+_G.kCCTextAlignmentCenter = cc.TEXT_ALIGNMENT_CENTER
+_G.kCCVerticalTextAlignmentTop = cc.VERTICAL_TEXT_ALIGNMENT_TOP
+_G.kCCVerticalTextAlignmentCenter = cc.VERTICAL_TEXT_ALIGNMENT_CENTER
+_G.kCCVerticalTextAlignmentBottom = cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM
+_G.kCCDirectorProjection3D = cc.DIRECTOR_PROJECTION3_D
+_G.kCCDirectorProjection2D = cc.DIRECTOR_PROJECTION2_D
+_G.kCCDirectorProjectionCustom = cc.DIRECTOR_PROJECTION_CUSTOM
+_G.kCCDirectorProjectionDefault = cc.DIRECTOR_PROJECTION_DEFAULT
+_G.kCCNodeTagInvalid = cc.NODE_TAG_INVALID
+_G.kCCNodeOnEnter = cc.NODE_ON_ENTER
+_G.kCCNodeOnExit = cc.NODE_ON_EXIT
+_G.kCCTexture2DPixelFormat_RGBA8888 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888
+_G.kCCTexture2DPixelFormat_RGB888 = cc.TEXTURE2_D_PIXEL_FORMAT_RG_B888
+_G.kCCTexture2DPixelFormat_RGB565 = cc.TEXTURE2_D_PIXEL_FORMAT_RG_B565
+_G.kCCTexture2DPixelFormat_A8 = cc.TEXTURE2_D_PIXEL_FORMAT_A8
+_G.kCCTexture2DPixelFormat_I8 = cc.TEXTURE2_D_PIXEL_FORMAT_I8
+_G.kCCTexture2DPixelFormat_AI88 = cc.TEXTURE2_D_PIXEL_FORMAT_A_I88
+_G.kCCTexture2DPixelFormat_RGBA4444 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A4444
+_G.kCCTexture2DPixelFormat_RGB5A1 = cc.TEXTURE2_D_PIXEL_FORMAT_RGB5_A1
+_G.kCCTexture2DPixelFormat_PVRTC4 = cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC4
+_G.kCCTexture2DPixelFormat_PVRTC2 = cc.TEXTURE2_D_PIXEL_FORMAT_PVRTC2
+_G.kCCTexture2DPixelFormat_Default = cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT
+_G.kCCImageFormatPNG = cc.IMAGE_FORMAT_PNG
+_G.kCCImageFormatJPEG = cc.IMAGE_FORMAT_JPEG
+_G.kCCTouchesOneByOne = cc.TOUCHES_ONE_BY_ONE
+_G.kCCTouchesAllAtOnce = cc.TOUCHES_ALL_AT_ONCE
+_G.kCCTransitionOrientationLeftOver = cc.TRANSITION_ORIENTATION_LEFT_OVER
+_G.kCCTransitionOrientationRightOver = cc.TRANSITION_ORIENTATION_RIGHT_OVER
+_G.kCCTransitionOrientationUpOver = cc.TRANSITION_ORIENTATION_UP_OVER
+_G.kCCTransitionOrientationDownOver = cc.TRANSITION_ORIENTATION_DOWN_OVER
+_G.kCCActionTagInvalid = cc.ACTION_TAG_INVALID
+_G.kCCLabelAutomaticWidth = cc.LABEL_AUTOMATIC_WIDTH
+_G.kCCMenuStateWaiting = cc.MENU_STATE_WAITING
+_G.kCCMenuStateTrackingTouch = cc.MENU_STATE_TRACKING_TOUCH
+_G.kCCMenuHandlerPriority = cc.MENU_HANDLER_PRIORITY
+_G.kCCParticleDurationInfinity = cc.PARTICLE_DURATION_INFINITY
+_G.kCCParticleStartSizeEqualToEndSize = cc.PARTICLE_START_SIZE_EQUAL_TO_END_SIZE
+_G.kCCParticleStartRadiusEqualToEndRadius = cc.PARTICLE_START_RADIUS_EQUAL_TO_END_RADIUS
+_G.kCCParticleModeGravity = cc.PARTICLE_MODE_GRAVITY
+_G.kCCParticleModeRadius = cc.PARTICLE_MODE_RADIUS
+_G.kCCPositionTypeFree = cc.POSITION_TYPE_FREE
+_G.kCCPositionTypeRelative = cc.POSITION_TYPE_RELATIVE
+_G.kCCPositionTypeGrouped = cc.POSITION_TYPE_GROUPED
+_G.kCCProgressTimerTypeRadial = cc.PROGRESS_TIMER_TYPE_RADIAL
+_G.kCCProgressTimerTypeBar = cc.PROGRESS_TIMER_TYPE_BAR
+_G.kCCTMXTileHorizontalFlag = cc.TMX_TILE_HORIZONTAL_FLAG
+_G.kCCTMXTileVerticalFlag = cc.TMX_TILE_VERTICAL_FLAG
+_G.kCCTMXTileDiagonalFlag = cc.TMX_TILE_DIAGONAL_FLAG
+_G.kCCFlipedAll = cc.FLIPED_ALL
+_G.kCCFlippedMask = cc.FLIPPED_MASK
+
+_G.kLanguageEnglish = cc.LANGUAGE_ENGLISH
+_G.kLanguageChinese = cc.LANGUAGE_CHINESE
+_G.kLanguageFrench = cc.LANGUAGE_FRENCH
+_G.kLanguageItalian = cc.LANGUAGE_ITALIAN
+_G.kLanguageGerman = cc.LANGUAGE_GERMAN
+_G.kLanguageSpanish = cc.LANGUAGE_SPANISH
+_G.kLanguageRussian = cc.LANGUAGE_RUSSIAN
+_G.kLanguageKorean = cc.LANGUAGE_KOREAN
+_G.kLanguageJapanese = cc.LANGUAGE_JAPANESE
+_G.kLanguageHungarian = cc.LANGUAGE_HUNGARIAN
+_G.kLanguagePortuguese = cc.LANGUAGE_PORTUGUESE
+_G.kLanguageArabic = cc.LANGUAGE_ARABIC
+_G.kTargetWindows = cc.PLATFORM_OS_WINDOWS
+_G.kTargetLinux = cc.PLATFORM_OS_LINUX
+_G.kTargetMacOS = cc.PLATFORM_OS_MAC
+_G.kTargetAndroid = cc.PLATFORM_OS_ANDROID
+_G.kTargetIphone = cc.PLATFORM_OS_IPHONE
+_G.kTargetIpad = cc.PLATFORM_OS_IPAD
+_G.kTargetBlackBerry = cc.PLATFORM_OS_BLACKBERRY
+
+_G.GL_ZERO = gl.ZERO
+_G.GL_ONE = gl.ONE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT
+_G.GL_LINE_WIDTH = gl.LINE_WIDTH
+_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA
+_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA
+_G.GL_GREEN_BITS = gl.GREEN_BITS
+_G.GL_STENCIL_REF = gl.STENCIL_REF
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
+_G.GL_CCW = gl.CCW
+_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS
+_G.GL_BACK = gl.BACK
+_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X
+_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z
+_G.GL_ONE = gl.ONE
+_G.GL_TRUE = gl.TRUE
+_G.GL_TEXTURE12 = gl.TEXTURE12
+_G.GL_LINK_STATUS = gl.LINK_STATUS
+_G.GL_BLEND = gl.BLEND
+_G.GL_LESS = gl.LESS
+_G.GL_TEXTURE16 = gl.TEXTURE16
+_G.GL_BOOL_VEC2 = gl.BOOL_VEC2
+_G.GL_KEEP = gl.KEEP
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED
+_G.GL_EXTENSIONS = gl.EXTENSIONS
+_G.GL_FRONT = gl.FRONT
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS
+_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION
+_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE
+_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT
+_G.GL_VENDOR = gl.VENDOR
+_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y
+_G.GL_NEAREST = gl.NEAREST
+_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH
+_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING
+_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER
+_G.GL_LEQUAL = gl.LEQUAL
+_G.GL_VERSION = gl.VERSION
+_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE
+_G.GL_RENDERER = gl.RENDERER
+_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS
+_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL
+_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK
+_G.GL_BOOL = gl.BOOL
+_G.GL_VIEWPORT = gl.VIEWPORT
+_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER
+_G.GL_LUMINANCE = gl.LUMINANCE
+_G.GL_DECR_WRAP = gl.DECR_WRAP
+_G.GL_FUNC_ADD = gl.FUNC_ADD
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY
+_G.GL_BOOL_VEC4 = gl.BOOL_VEC4
+_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR
+_G.GL_STATIC_DRAW = gl.STATIC_DRAW
+_G.GL_DITHER = gl.DITHER
+_G.GL_TEXTURE31 = gl.TEXTURE31
+_G.GL_TEXTURE30 = gl.TEXTURE30
+_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE
+_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16
+_G.GL_TEXTURE23 = gl.TEXTURE23
+_G.GL_DEPTH_TEST = gl.DEPTH_TEST
+_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL
+_G.GL_BOOL_VEC3 = gl.BOOL_VEC3
+_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS
+_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D
+_G.GL_TEXTURE21 = gl.TEXTURE21
+_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT
+_G.GL_DONT_CARE = gl.DONT_CARE
+_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE
+_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3
+_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5
+_G.GL_INT_VEC2 = gl.INT_VEC2
+_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4
+_G.GL_NONE = gl.NONE
+_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA
+_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS
+_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT
+_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS
+_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS
+_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB
+_G.GL_TEXTURE = gl.TEXTURE
+_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR
+_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
+_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM
+_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT
+_G.GL_TEXTURE20 = gl.TEXTURE20
+_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH
+_G.GL_TEXTURE28 = gl.TEXTURE28
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
+_G.GL_TEXTURE22 = gl.TEXTURE22
+_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING
+_G.GL_STREAM_DRAW = gl.STREAM_DRAW
+_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX
+_G.GL_TEXTURE26 = gl.TEXTURE26
+_G.GL_TEXTURE27 = gl.TEXTURE27
+_G.GL_TEXTURE24 = gl.TEXTURE24
+_G.GL_TEXTURE25 = gl.TEXTURE25
+_G.GL_NO_ERROR = gl.NO_ERROR
+_G.GL_TEXTURE29 = gl.TEXTURE29
+_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4
+_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED
+_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
+_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3
+_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE
+_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1
+_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS
+_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION
+_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT
+_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS
+_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE
+_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR
+_G.GL_TEXTURE2 = gl.TEXTURE2
+_G.GL_TEXTURE1 = gl.TEXTURE1
+_G.GL_GEQUAL = gl.GEQUAL
+_G.GL_TEXTURE7 = gl.TEXTURE7
+_G.GL_TEXTURE6 = gl.TEXTURE6
+_G.GL_TEXTURE5 = gl.TEXTURE5
+_G.GL_TEXTURE4 = gl.TEXTURE4
+_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_TEXTURE9 = gl.TEXTURE9
+_G.GL_STENCIL_TEST = gl.STENCIL_TEST
+_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK
+_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT
+_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8
+_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE
+_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2
+_G.GL_BLUE_BITS = gl.BLUE_BITS
+_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER
+_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS
+_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK
+_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4
+_G.GL_TEXTURE17 = gl.TEXTURE17
+_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA
+_G.GL_TEXTURE15 = gl.TEXTURE15
+_G.GL_TEXTURE14 = gl.TEXTURE14
+_G.GL_TEXTURE13 = gl.TEXTURE13
+_G.GL_SAMPLES = gl.SAMPLES
+_G.GL_TEXTURE11 = gl.TEXTURE11
+_G.GL_TEXTURE10 = gl.TEXTURE10
+_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT
+_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT
+_G.GL_TEXTURE19 = gl.TEXTURE19
+_G.GL_TEXTURE18 = gl.TEXTURE18
+_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST
+_G.GL_SHORT = gl.SHORT
+_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING
+_G.GL_REPEAT = gl.REPEAT
+_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER
+_G.GL_RED_BITS = gl.RED_BITS
+_G.GL_FRONT_FACE = gl.FRONT_FACE
+_G.GL_BLEND_COLOR = gl.BLEND_COLOR
+_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT
+_G.GL_INT_VEC4 = gl.INT_VEC4
+_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE
+_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE
+_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT
+_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK
+_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT
+_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL
+_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC
+_G.GL_REPLACE = gl.REPLACE
+_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA
+_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE
+_G.GL_FASTEST = gl.FASTEST
+_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL
+_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT
+_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT
+_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL
+_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB
+_G.GL_TEXTURE3 = gl.TEXTURE3
+_G.GL_RENDERBUFFER = gl.RENDERBUFFER
+_G.GL_RGB5_A1 = gl.RGB5_A1
+_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE
+_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE
+_G.GL_NOTEQUAL = gl.NOTEQUAL
+_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB
+_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK
+_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP
+_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE
+_G.GL_ZERO = gl.ZERO
+_G.GL_TEXTURE0 = gl.TEXTURE0
+_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE
+_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE
+_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE
+_G.GL_BYTE = gl.BYTE
+_G.GL_CW = gl.CW
+_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW
+_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE
+_G.GL_FALSE = gl.FALSE
+_G.GL_GREATER = gl.GREATER
+_G.GL_RGBA4 = gl.RGBA4
+_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS
+_G.GL_STENCIL_BITS = gl.STENCIL_BITS
+_G.GL_RGB = gl.RGB
+_G.GL_INT = gl.INT
+_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC
+_G.GL_SAMPLER_2D = gl.SAMPLER_2D
+_G.GL_NICEST = gl.NICEST
+_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS
+_G.GL_CULL_FACE = gl.CULL_FACE
+_G.GL_INT_VEC3 = gl.INT_VEC3
+_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE
+_G.GL_INVALID_ENUM = gl.INVALID_ENUM
+_G.GL_INVERT = gl.INVERT
+_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE
+_G.GL_TEXTURE8 = gl.TEXTURE8
+_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER
+_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S
+_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE
+_G.GL_LINES = gl.LINES
+_G.GL_EQUAL = gl.EQUAL
+_G.GL_LINE_LOOP = gl.LINE_LOOP
+_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T
+_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT
+_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS
+_G.GL_SHADER_TYPE = gl.SHADER_TYPE
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+_G.GL_DECR = gl.DECR
+_G.GL_DELETE_STATUS = gl.DELETE_STATUS
+_G.GL_DEPTH_BITS = gl.DEPTH_BITS
+_G.GL_INCR = gl.INCR
+_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE
+_G.GL_ALPHA_BITS = gl.ALPHA_BITS
+_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2
+_G.GL_LINE_STRIP = gl.LINE_STRIP
+_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH
+_G.GL_INVALID_VALUE = gl.INVALID_VALUE
+_G.GL_NEVER = gl.NEVER
+_G.GL_INCR_WRAP = gl.INCR_WRAP
+_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA
+_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER
+_G.GL_POINTS = gl.POINTS
+_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0
+_G.GL_RGBA = gl.RGBA
+_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE
+_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE
+_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER
+_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP
+_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS
+_G.GL_LINEAR = gl.LINEAR
+_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST
+_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH
+_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF
+_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER
+_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE
+_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP
+_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR
+_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS
+_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE
+_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT
+_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE
+_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE
+_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION
+_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED
+_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH
+_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS
+_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK
+_G.GL_ALWAYS = gl.ALWAYS
+_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE
+_G.GL_FLOAT = gl.FLOAT
+_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING
+_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
+_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN
+_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION
+_G.GL_TEXTURE_2D = gl.TEXTURE_2D
+_G.GL_ALPHA = gl.ALPHA
+_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB
+_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST
+_G.GL_TRIANGLES = gl.TRIANGLES
+
+cc.TEXTURE_PIXELFORMAT_DEFAULT = cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT
diff --git a/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua b/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua
new file mode 100644
index 0000000..2c83429
--- /dev/null
+++ b/src/cocos/cocos2d/DeprecatedCocos2dFunc.lua
@@ -0,0 +1,1014 @@
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of CCDirector will be deprecated,begin
+local CCDirectorDeprecated = { }
+function CCDirectorDeprecated.sharedDirector()
+ deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance")
+ return cc.Director:getInstance()
+end
+CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
+--functions of CCDirector will be deprecated,end
+
+
+--functions of CCTextureCache will be deprecated begin
+local TextureCacheDeprecated = {}
+function TextureCacheDeprecated.getInstance(self)
+ deprecatedTip("cc.TextureCache:getInstance","cc.Director:getInstance():getTextureCache")
+ return cc.Director:getInstance():getTextureCache()
+end
+cc.TextureCache.getInstance = TextureCacheDeprecated.getInstance
+
+function TextureCacheDeprecated.destroyInstance(self)
+ deprecatedTip("cc.TextureCache:destroyInstance","cc.Director:getInstance():destroyTextureCache")
+ return cc.Director:getInstance():destroyTextureCache()
+end
+cc.TextureCache.destroyInstance = TextureCacheDeprecated.destroyInstance
+
+function TextureCacheDeprecated.dumpCachedTextureInfo(self)
+ deprecatedTip("self:dumpCachedTextureInfo","self:getCachedTextureInfo")
+ return print(self:getCachedTextureInfo())
+end
+cc.TextureCache.dumpCachedTextureInfo = TextureCacheDeprecated.dumpCachedTextureInfo
+
+local CCTextureCacheDeprecated = { }
+function CCTextureCacheDeprecated.sharedTextureCache()
+ deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
+ return cc.TextureCache:getInstance()
+end
+rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
+
+function CCTextureCacheDeprecated.purgeSharedTextureCache()
+ deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
+ return cc.TextureCache:destroyInstance()
+end
+rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
+
+function CCTextureCacheDeprecated.addUIImage(self, image, key)
+ deprecatedTip("CCTextureCache:addUIImage","CCTextureCache:addImage")
+ return self:addImage(image,key)
+end
+CCTextureCache.addUIImage = CCTextureCacheDeprecated.addUIImage
+--functions of CCTextureCache will be deprecated end
+
+--functions of CCAnimation will be deprecated begin
+local CCAnimationDeprecated = {}
+function CCAnimationDeprecated.addSpriteFrameWithFileName(self,...)
+ deprecatedTip("CCAnimationDeprecated:addSpriteFrameWithFileName","cc.Animation:addSpriteFrameWithFile")
+ return self:addSpriteFrameWithFile(...)
+end
+CCAnimation.addSpriteFrameWithFileName = CCAnimationDeprecated.addSpriteFrameWithFileName
+--functions of CCAnimation will be deprecated end
+
+
+--functions of CCAnimationCache will be deprecated begin
+local CCAnimationCacheDeprecated = { }
+function CCAnimationCacheDeprecated.sharedAnimationCache()
+ deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance")
+ return CCAnimationCache:getInstance()
+end
+CCAnimationCache.sharedAnimationCache = CCAnimationCacheDeprecated.sharedAnimationCache
+
+function CCAnimationCacheDeprecated.purgeSharedAnimationCache()
+ deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance")
+ return CCAnimationCache:destroyInstance()
+end
+CCAnimationCache.purgeSharedAnimationCache = CCAnimationCacheDeprecated.purgeSharedAnimationCache
+
+function CCAnimationCacheDeprecated.addAnimationsWithFile(self,...)
+ deprecatedTip("CCAnimationCache:addAnimationsWithFile","cc.AnimationCache:addAnimations")
+ return self:addAnimations(...)
+end
+CCAnimationCache.addAnimationsWithFile = CCAnimationCacheDeprecated.addAnimationsWithFile
+
+function CCAnimationCacheDeprecated.animationByName(self,...)
+ deprecatedTip("CCAnimationCache:animationByName","cc.AnimationCache:getAnimation")
+ return self:getAnimation(...)
+end
+CCAnimationCache.animationByName = CCAnimationCacheDeprecated.animationByName
+
+function CCAnimationCacheDeprecated.removeAnimationByName(self)
+ deprecatedTip("CCAnimationCache:removeAnimationByName","cc.AnimationCache:removeAnimation")
+ return self:removeAnimation()
+end
+CCAnimationCache.removeAnimationByName = CCAnimationCacheDeprecated.removeAnimationByName
+--functions of CCAnimationCache will be deprecated end
+
+--functions of CCFileUtils will be deprecated end
+local CCFileUtilsDeprecated = { }
+function CCFileUtilsDeprecated.sharedFileUtils()
+ deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
+ return cc.FileUtils:getInstance()
+end
+CCFileUtils.sharedFileUtils = CCFileUtilsDeprecated.sharedFileUtils
+
+function CCFileUtilsDeprecated.purgeFileUtils()
+ deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
+ return cc.FileUtils:destroyInstance()
+end
+CCFileUtils.purgeFileUtils = CCFileUtilsDeprecated.purgeFileUtils
+--functions of CCFileUtils will be deprecated end
+
+--functions of CCMenu will be deprecated begin
+local CCMenuDeprecated = { }
+function CCMenuDeprecated.createWithItem(self,...)
+ deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem")
+ return self:create(...)
+end
+CCMenu.createWithItem = CCMenuDeprecated.createWithItem
+
+function CCMenuDeprecated.setHandlerPriority(self)
+ print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********")
+end
+CCMenu.setHandlerPriority = CCMenuDeprecated.setHandlerPriority
+--functions of CCMenu will be deprecated end
+
+--functions of CCNode will be deprecated begin
+local CCNodeDeprecated = { }
+
+function CCNodeDeprecated.boundingBox(self)
+ deprecatedTip("CCNode:boundingBox","cc.Node:getBoundingBox")
+ return self:getBoundingBox()
+end
+CCNode.boundingBox = CCNodeDeprecated.boundingBox
+
+
+function CCNodeDeprecated.numberOfRunningActions(self)
+ deprecatedTip("CCNode:numberOfRunningActions","cc.Node:getNumberOfRunningActions")
+ return self:getNumberOfRunningActions()
+end
+CCNode.numberOfRunningActions = CCNodeDeprecated.numberOfRunningActions
+
+
+function CCNodeDeprecated.removeFromParentAndCleanup(self,...)
+ deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent")
+ return self:removeFromParent(...)
+end
+CCNode.removeFromParentAndCleanup = CCNodeDeprecated.removeFromParentAndCleanup
+--functions of CCNode will be deprecated end
+
+--CCDrawPrimitives will be deprecated begin
+local function CCDrawPrimitivesClassDeprecated()
+ deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives")
+ return cc.DrawPrimitives
+end
+_G.CCDrawPrimitives = CCDrawPrimitivesClassDeprecated()
+--functions of CCDrawPrimitives will be deprecated begin
+local CCDrawPrimitivesDeprecated = { }
+function CCDrawPrimitivesDeprecated.ccDrawPoint(pt)
+ deprecatedTip("ccDrawPoint","cc.DrawPrimitives.drawPoint")
+ return cc.DrawPrimitives.drawPoint(pt)
+end
+_G.ccDrawPoint = CCDrawPrimitivesDeprecated.ccDrawPoint
+
+function CCDrawPrimitivesDeprecated.ccDrawLine(origin,destination)
+ deprecatedTip("ccDrawLine","cc.DrawPrimitives.drawLine")
+ return cc.DrawPrimitives.drawLine(origin,destination)
+end
+_G.ccDrawLine = CCDrawPrimitivesDeprecated.ccDrawLine
+
+function CCDrawPrimitivesDeprecated.ccDrawRect(origin,destination)
+ deprecatedTip("ccDrawRect","cc.DrawPrimitives.drawRect")
+ return cc.DrawPrimitives.drawRect(origin,destination)
+end
+_G.ccDrawRect = CCDrawPrimitivesDeprecated.ccDrawRect
+
+function CCDrawPrimitivesDeprecated.ccDrawSolidRect(origin,destination,color)
+ deprecatedTip("ccDrawSolidRect","cc.DrawPrimitives.drawSolidRect")
+ return cc.DrawPrimitives.drawSolidRect(origin,destination,color)
+end
+_G.ccDrawSolidRect = CCDrawPrimitivesDeprecated.ccDrawSolidRect
+
+-- params:... may represent two param(xScale,yScale) or nil
+function CCDrawPrimitivesDeprecated.ccDrawCircle(center,radius,angle,segments,drawLineToCenter,...)
+ deprecatedTip("ccDrawCircle","cc.DrawPrimitives.drawCircle")
+ return cc.DrawPrimitives.drawCircle(center,radius,angle,segments,drawLineToCenter,...)
+end
+_G.ccDrawCircle = CCDrawPrimitivesDeprecated.ccDrawCircle
+
+-- params:... may represent two param(xScale,yScale) or nil
+function CCDrawPrimitivesDeprecated.ccDrawSolidCircle(center,radius,angle,segments,...)
+ deprecatedTip("ccDrawSolidCircle","cc.DrawPrimitives.drawSolidCircle")
+ return cc.DrawPrimitives.drawSolidCircle(center,radius,angle,segments,...)
+end
+_G.ccDrawSolidCircle = CCDrawPrimitivesDeprecated.ccDrawSolidCircle
+
+function CCDrawPrimitivesDeprecated.ccDrawQuadBezier(origin,control,destination,segments)
+ deprecatedTip("ccDrawQuadBezier","cc.DrawPrimitives.drawQuadBezier")
+ return cc.DrawPrimitives.drawQuadBezier(origin,control,destination,segments)
+end
+_G.ccDrawQuadBezier = CCDrawPrimitivesDeprecated.ccDrawQuadBezier
+
+function CCDrawPrimitivesDeprecated.ccDrawCubicBezier(origin,control1,control2,destination,segments)
+ deprecatedTip("ccDrawCubicBezier","cc.DrawPrimitives.drawCubicBezier")
+ return cc.DrawPrimitives.drawCubicBezier(origin,control1,control2,destination,segments)
+end
+_G.ccDrawCubicBezier = CCDrawPrimitivesDeprecated.ccDrawCubicBezier
+
+function CCDrawPrimitivesDeprecated.ccDrawCatmullRom(arrayOfControlPoints,segments)
+ deprecatedTip("ccDrawCatmullRom","cc.DrawPrimitives.drawCatmullRom")
+ return cc.DrawPrimitives.drawCatmullRom(arrayOfControlPoints,segments)
+end
+_G.ccDrawCatmullRom = CCDrawPrimitivesDeprecated.ccDrawCatmullRom
+
+function CCDrawPrimitivesDeprecated.ccDrawCardinalSpline(config,tension,segments)
+ deprecatedTip("ccDrawCardinalSpline","cc.DrawPrimitives.drawCardinalSpline")
+ return cc.DrawPrimitives.drawCardinalSpline(config,tension,segments)
+end
+_G.ccDrawCardinalSpline = CCDrawPrimitivesDeprecated.ccDrawCardinalSpline
+
+function CCDrawPrimitivesDeprecated.ccDrawColor4B(r,g,b,a)
+ deprecatedTip("ccDrawColor4B","cc.DrawPrimitives.drawColor4B")
+ return cc.DrawPrimitives.drawColor4B(r,g,b,a)
+end
+_G.ccDrawColor4B = CCDrawPrimitivesDeprecated.ccDrawColor4B
+
+function CCDrawPrimitivesDeprecated.ccDrawColor4F(r,g,b,a)
+ deprecatedTip("ccDrawColor4F","cc.DrawPrimitives.drawColor4F")
+ return cc.DrawPrimitives.drawColor4F(r,g,b,a)
+end
+_G.ccDrawColor4F = CCDrawPrimitivesDeprecated.ccDrawColor4F
+
+function CCDrawPrimitivesDeprecated.ccPointSize(pointSize)
+ deprecatedTip("ccPointSize","cc.DrawPrimitives.setPointSize")
+ return cc.DrawPrimitives.setPointSize(pointSize)
+end
+_G.ccPointSize = CCDrawPrimitivesDeprecated.ccPointSize
+--functions of CCDrawPrimitives will be deprecated end
+--CCDrawPrimitives will be deprecated end
+
+local CCProgressTimerDeprecated = {}
+function CCProgressTimerDeprecated.setReverseProgress(self,...)
+ deprecatedTip("CCProgressTimer","CCProgressTimer:setReverseDirection")
+ return self:setReverseDirection(...)
+end
+CCProgressTimer.setReverseProgress = CCProgressTimerDeprecated.setReverseProgress
+
+--functions of CCSpriteFrameCache will be deprecated begin
+local CCSpriteFrameCacheDeprecated = { }
+function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName)
+ deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName")
+ return self:getSpriteFrameByName(szName)
+end
+CCSpriteFrameCache.spriteFrameByName = CCSpriteFrameCacheDeprecated.spriteFrameByName
+
+function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance")
+ return CCSpriteFrameCache:getInstance()
+end
+CCSpriteFrameCache.sharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache
+
+function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache()
+ deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance")
+ return CCSpriteFrameCache:destroyInstance()
+end
+CCSpriteFrameCache.purgeSharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache
+
+function CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile(self,...)
+ deprecatedTip("CCSpriteFrameCache:addSpriteFramesWithFile","CCSpriteFrameCache:addSpriteFrames")
+ return self:addSpriteFrames(...)
+end
+rawset(CCSpriteFrameCache,"addSpriteFramesWithFile",CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile)
+
+function CCSpriteFrameCacheDeprecated.getSpriteFrameByName(self,...)
+ deprecatedTip("CCSpriteFrameCache:getSpriteFrameByName","CCSpriteFrameCache:getSpriteFrame")
+ return self:getSpriteFrame(...)
+end
+CCSpriteFrameCache.getSpriteFrameByName = CCSpriteFrameCacheDeprecated.getSpriteFrameByName
+--functions of CCSpriteFrameCache will be deprecated end
+
+--functions of CCLabelAtlas will be deprecated begin
+local CCLabelAtlasDeprecated = {}
+function CCLabelAtlasDeprecated.create(self,...)
+ deprecatedTip("CCLabelAtlas:create","CCLabelAtlas:_create")
+ return self:_create(...)
+end
+CCLabelAtlas.create = CCLabelAtlasDeprecated.create
+--functions of CCLabelAtlas will be deprecated end
+
+
+---------------------------
+--global functions wil be deprecated, begin
+local function CCRectMake(x,y,width,height)
+ deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua")
+ return cc.rect(x,y,width,height)
+end
+_G.CCRectMake = CCRectMake
+
+local function ccc3(r,g,b)
+ deprecatedTip("ccc3(r,g,b)","cc.c3b(r,g,b)")
+ return cc.c3b(r,g,b)
+end
+_G.ccc3 = ccc3
+
+local function ccp(x,y)
+ deprecatedTip("ccp(x,y)","cc.p(x,y)")
+ return cc.p(x,y)
+end
+_G.ccp = ccp
+
+local function CCSizeMake(width,height)
+ deprecatedTip("CCSizeMake(width,height)","cc.size(width,height)")
+ return cc.size(width,height)
+end
+_G.CCSizeMake = CCSizeMake
+
+local function ccc4(r,g,b,a)
+ deprecatedTip("ccc4(r,g,b,a)","cc.c4b(r,g,b,a)")
+ return cc.c4b(r,g,b,a)
+end
+_G.ccc4 = ccc4
+
+local function ccc4FFromccc3B(color3B)
+ deprecatedTip("ccc4FFromccc3B(color3B)","cc.c4f(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)")
+ return cc.c4f(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0)
+end
+_G.ccc4FFromccc3B = ccc4FFromccc3B
+
+local function ccc4f(r,g,b,a)
+ deprecatedTip("ccc4f(r,g,b,a)","cc.c4f(r,g,b,a)")
+ return cc.c4f(r,g,b,a)
+end
+_G.ccc4f = ccc4f
+
+local function ccc4FFromccc4B(color4B)
+ deprecatedTip("ccc4FFromccc4B(color4B)","cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)")
+ return cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)
+end
+_G.ccc4FFromccc4B = ccc4FFromccc4B
+
+local function ccc4FEqual(a,b)
+ deprecatedTip("ccc4FEqual(a,b)","a:equals(b)")
+ return a:equals(b)
+end
+_G.ccc4FEqual = ccc4FEqual
+--global functions wil be deprecated, end
+
+
+--functions of _G will be deprecated begin
+local function ccpLineIntersect(a,b,c,d,s,t)
+ deprecatedTip("ccpLineIntersect","cc.pIsLineIntersect")
+ return cc.pIsLineIntersect(a,b,c,d,s,t)
+end
+_G.ccpLineIntersect = ccpLineIntersect
+
+
+local function CCPointMake(x,y)
+ deprecatedTip("CCPointMake(x,y)","cc.p(x,y)")
+ return cc.p(x,y)
+end
+_G.CCPointMake = CCPointMake
+
+
+
+local function ccpNeg(pt)
+ deprecatedTip("ccpNeg","cc.pSub")
+ return cc.pSub({x = 0,y = 0}, pt)
+end
+_G.ccpNeg = ccpNeg
+
+local function ccpAdd(pt1,pt2)
+ deprecatedTip("ccpAdd","cc.pAdd")
+ return cc.pAdd(pt1,pt2)
+end
+_G.ccpAdd = ccpAdd
+
+local function ccpSub(pt1,pt2)
+ deprecatedTip("ccpSub","cc.pSub")
+ return cc.pSub(pt1,pt2)
+end
+_G.ccpSub = ccpSub
+
+local function ccpMult(pt,factor)
+ deprecatedTip("ccpMult","cc.pMul")
+ return cc.pMul(pt,factor)
+end
+_G.ccpMult = ccpMult
+
+local function ccpMidpoint(pt1,pt2)
+ deprecatedTip("ccpMidpoint","cc.pMidpoint")
+ return cc.pMidpoint(pt1,pt2)
+end
+_G.ccpMidpoint = ccpMidpoint
+
+local function ccpDot(pt1,pt2)
+ deprecatedTip("ccpDot","cc.pDot")
+ return cc.pDot(pt1,pt2)
+end
+_G.ccpDot = ccpDot
+
+local function ccpCross(pt1,pt2)
+ deprecatedTip("ccpCross","cc.pCross")
+ return cc.pCross(pt1, pt2)
+end
+_G.ccpCross = ccpCross
+
+local function ccpPerp(pt)
+ deprecatedTip("ccpPerp","cc.pPerp")
+ return cc.pPerp(pt)
+end
+_G.ccpPerp = ccpPerp
+
+local function ccpRPerp(pt)
+ deprecatedTip("ccpRPerp","cc.RPerp")
+ return cc.RPerp(pt)
+end
+_G.ccpRPerp = ccpRPerp
+
+local function ccpProject(pt1,pt2)
+ deprecatedTip("ccpProject","cc.pProject")
+ return cc.pProject(pt1,pt2)
+end
+_G.ccpProject = ccpProject
+
+local function ccpRotate(pt1,pt2)
+ deprecatedTip("ccpRotate","cc.pRotate")
+ return cc.pRotate(pt1,pt2)
+end
+_G.ccpRotate = ccpRotate
+
+local function ccpUnrotate(pt1,pt2)
+ deprecatedTip("ccpUnrotate","cc.pUnrotate")
+ return cc.pUnrotate(pt1,pt2)
+end
+_G.ccpUnrotate = ccpUnrotate
+
+local function ccpLengthSQ(pt)
+ deprecatedTip("ccpLengthSQ","cc.pLengthSQ")
+ return cc.pLengthSQ(pt)
+end
+_G.ccpLengthSQ = ccpLengthSQ
+
+local function ccpDistanceSQ(pt1,pt2)
+ deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ")
+ return cc.pDistanceSQ(pt1,pt2)
+end
+_G.ccpDistanceSQ = ccpDistanceSQ
+
+local function ccpLength(pt)
+ deprecatedTip("ccpLength","cc.pGetLength")
+ return cc.pGetLength(pt)
+end
+_G.ccpLength = ccpLength
+
+local function ccpDistance(pt1,pt2)
+ deprecatedTip("ccpDistance","cc.pGetDistance")
+ return cc.pGetDistance(pt1, pt2)
+end
+_G.ccpDistance = ccpDistance
+
+local function ccpNormalize(pt)
+ deprecatedTip("ccpNormalize","cc.pNormalize")
+ return cc.pNormalize(pt)
+end
+_G.ccpNormalize = ccpNormalize
+
+local function ccpForAngle(angle)
+ deprecatedTip("ccpForAngle","cc.pForAngle")
+ return cc.pForAngle(angle)
+end
+_G.ccpForAngle = ccpForAngle
+
+local function ccpToAngle(pt)
+ deprecatedTip("ccpToAngle","cc.pToAngleSelf")
+ return cc.pToAngleSelf(pt)
+end
+_G.ccpToAngle = ccpToAngle
+
+local function ccpClamp(pt1,pt2,pt3)
+ deprecatedTip("ccpClamp","cc.pGetClampPoint")
+ return cc.pGetClampPoint(pt1,pt2,pt3)
+end
+_G.ccpClamp = ccpClamp
+
+
+local function ccpFromSize(sz)
+ deprecatedTip("ccpFromSize(sz)","cc.pFromSize")
+ return cc.pFromSize(sz)
+end
+_G.ccpFromSize = ccpFromSize
+
+local function ccpLerp(pt1,pt2,alpha)
+ deprecatedTip("ccpLerp","cc.pLerp")
+ return cc.pLerp(pt1,pt2,alpha)
+end
+_G.ccpLerp = ccpLerp
+
+local function ccpFuzzyEqual(pt1,pt2,variance)
+ deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual")
+ return cc.pFuzzyEqual(pt1,pt2,variance)
+end
+_G.ccpFuzzyEqual = ccpFuzzyEqual
+
+local function ccpCompMult(pt1,pt2)
+ deprecatedTip("ccpCompMult","cc.p")
+ return cc.p(pt1.x * pt2.x , pt1.y * pt2.y)
+end
+_G.ccpCompMult = ccpCompMult
+
+local function ccpAngleSigned(pt1,pt2)
+ deprecatedTip("ccpAngleSigned","cc.pGetAngle")
+ return cc.pGetAngle(pt1, pt2)
+end
+_G.ccpAngleSigned = ccpAngleSigned
+
+local function ccpAngle(pt1,pt2)
+ deprecatedTip("ccpAngle","cc.pGetAngle")
+ return cc.pGetAngle(pt1,ptw)
+end
+_G.ccpAngle = ccpAngle
+
+local function ccpRotateByAngle(pt1,pt2,angle)
+ deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle")
+ return cc.pRotateByAngle(pt1, pt2, angle)
+end
+_G.ccpRotateByAngle = ccpRotateByAngle
+
+local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
+ deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect")
+ return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
+end
+_G.ccpSegmentIntersect = ccpSegmentIntersect
+
+local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
+ deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint")
+ return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
+end
+_G.ccpIntersectPoint = ccpIntersectPoint
+
+
+local function vertex2(x,y)
+ deprecatedTip("vertex2(x,y)","cc.vertex2F(x,y)")
+ return cc.vertex2F(x,y)
+end
+_G.vertex2 = vertex2
+
+local function vertex3(x,y,z)
+ deprecatedTip("vertex3(x,y,z)","cc.Vertex3F(x,y,z)")
+ return cc.Vertex3F(x,y,z)
+end
+_G.vertex3 = vertex3
+
+local function tex2(u,v)
+ deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
+ return cc.tex2f(u,v)
+end
+_G.tex2 = tex2
+
+local function ccc4BFromccc4F(color4F)
+ deprecatedTip("ccc4BFromccc4F(color4F)","Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)")
+ return Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)
+end
+_G.ccc4BFromccc4F = ccc4BFromccc4F
+
+local function ccColor3BDeprecated()
+ deprecatedTip("ccColor3B","cc.c3b(0,0,0)")
+ return cc.c3b(0,0,0)
+end
+_G.ccColor3B = ccColor3BDeprecated
+
+local function ccColor4BDeprecated()
+ deprecatedTip("ccColor4B","cc.c4b(0,0,0,0)")
+ return cc.c4b(0,0,0,0)
+end
+_G.ccColor4B = ccColor4BDeprecated
+
+local function ccColor4FDeprecated()
+ deprecatedTip("ccColor4F","cc.c4f(0.0,0.0,0.0,0.0)")
+ return cc.c4f(0.0,0.0,0.0,0.0)
+end
+_G.ccColor4F = ccColor4FDeprecated
+
+local function ccVertex2FDeprecated()
+ deprecatedTip("ccVertex2F","cc.vertex2F(0.0,0.0)")
+ return cc.vertex2F(0.0,0.0)
+end
+_G.ccVertex2F = ccVertex2FDeprecated
+
+local function ccVertex3FDeprecated()
+ deprecatedTip("ccVertex3F","cc.Vertex3F(0.0, 0.0, 0.0)")
+ return cc.Vertex3F(0.0, 0.0, 0.0)
+end
+_G.ccVertex3F = ccVertex3FDeprecated
+
+local function ccTex2FDeprecated()
+ deprecatedTip("ccTex2F","cc.tex2F(0.0, 0.0)")
+ return cc.tex2F(0.0, 0.0)
+end
+_G.ccTex2F = ccTex2FDeprecated
+
+local function ccPointSpriteDeprecated()
+ deprecatedTip("ccPointSprite","cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)")
+ return cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)
+end
+_G.ccPointSprite = ccPointSpriteDeprecated
+
+local function ccQuad2Deprecated()
+ deprecatedTip("ccQuad2","cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))")
+ return cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))
+end
+_G.ccQuad2 = ccQuad2Deprecated
+
+local function ccQuad3Deprecated()
+ deprecatedTip("ccQuad3","cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))")
+ return cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))
+end
+_G.ccQuad3 = ccQuad3Deprecated
+
+local function ccV2FC4BT2FDeprecated()
+ deprecatedTip("ccV2F_C4B_T2F","cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))
+end
+_G.ccV2F_C4B_T2F = ccV2FC4BT2FDeprecated
+
+
+local function ccV2FC4FT2FDeprecated()
+ deprecatedTip("ccV2F_C4F_T2F","cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0), cc.tex2F(0.0, 0.0))
+end
+_G.ccV2F_C4F_T2F = ccV2FC4FT2FDeprecated
+
+local function ccV3FC4BT2FDeprecated()
+ deprecatedTip("ccV3F_C4B_T2F","cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))")
+ return cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))
+end
+_G.ccV3F_C4B_T2F = ccV3FC4BT2FDeprecated
+
+local function ccV2FC4BT2FQuadDeprecated()
+ deprecatedTip("ccV2F_C4B_T2F_Quad","cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))")
+ return cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV2F_C4B_T2F_Quad = ccV2FC4BT2FQuadDeprecated
+
+local function ccV3FC4BT2FQuadDeprecated()
+ deprecatedTip("ccV3F_C4B_T2F_Quad","cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)")
+ return cc.V3F_C4B_T2F_Quad(cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV3F_C4B_T2F_Quad = ccV3FC4BT2FQuadDeprecated
+
+local function ccV2FC4FT2FQuadDeprecated()
+ deprecatedTip("ccV2F_C4F_T2F_Quad","cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)")
+ return cc.V2F_C4F_T2F_Quad(cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)))
+end
+_G.ccV2F_C4F_T2F_Quad = ccV2FC4FT2FQuadDeprecated
+
+local function ccT2FQuadDeprecated()
+ deprecatedTip("ccT2F_Quad","cc.T2F_Quad(_bl, _br, _tl, _tr)")
+ return cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0))
+end
+_G.ccT2F_Quad = ccT2FQuadDeprecated
+
+local function ccAnimationFrameDataDeprecated()
+ deprecatedTip("ccAnimationFrameData","cc.AnimationFrameData( _texCoords, _delay, _size)")
+ return cc.AnimationFrameData(cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)), 0, cc.size(0,0))
+end
+_G.ccAnimationFrameData = ccAnimationFrameDataDeprecated
+
+
+
+local function tex2(u,v)
+ deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
+ return cc.tex2f(u,v)
+end
+_G.tex2 = tex2
+
+
+--functions of CCApplication will be deprecated end
+local CCApplicationDeprecated = { }
+function CCApplicationDeprecated.sharedApplication()
+ deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance")
+ return CCApplication:getInstance()
+end
+CCApplication.sharedApplication = CCApplicationDeprecated.sharedApplication
+--functions of CCApplication will be deprecated end
+
+
+--functions of CCDirector will be deprecated end
+local CCDirectorDeprecated = { }
+function CCDirectorDeprecated.sharedDirector()
+ deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance")
+ return CCDirector:getInstance()
+end
+CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
+--functions of CCDirector will be deprecated end
+
+
+--functions of CCUserDefault will be deprecated end
+local CCUserDefaultDeprecated = { }
+function CCUserDefaultDeprecated.sharedUserDefault()
+ deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance")
+ return CCUserDefault:getInstance()
+end
+CCUserDefault.sharedUserDefault = CCUserDefaultDeprecated.sharedUserDefault
+
+function CCUserDefaultDeprecated.purgeSharedUserDefault()
+ deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance")
+ return CCUserDefault:destroyInstance()
+end
+CCUserDefault.purgeSharedUserDefault = CCUserDefaultDeprecated.purgeSharedUserDefault
+--functions of CCUserDefault will be deprecated end
+
+--functions of CCGrid3DAction will be deprecated begin
+local CCGrid3DActionDeprecated = { }
+function CCGrid3DActionDeprecated.vertex(self,pt)
+ deprecatedTip("vertex","CCGrid3DAction:getVertex")
+ return self:getVertex(pt)
+end
+CCGrid3DAction.vertex = CCGrid3DActionDeprecated.vertex
+
+function CCGrid3DActionDeprecated.originalVertex(self,pt)
+ deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex")
+ return self:getOriginalVertex(pt)
+end
+CCGrid3DAction.originalVertex = CCGrid3DActionDeprecated.originalVertex
+--functions of CCGrid3DAction will be deprecated end
+
+
+--functions of CCTiledGrid3DAction will be deprecated begin
+local CCTiledGrid3DActionDeprecated = { }
+function CCTiledGrid3DActionDeprecated.tile(self,pt)
+ deprecatedTip("tile","CCTiledGrid3DAction:getTile")
+ return self:getTile(pt)
+end
+CCTiledGrid3DAction.tile = CCTiledGrid3DActionDeprecated.tile
+
+function CCTiledGrid3DActionDeprecated.originalTile(self,pt)
+ deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile")
+ return self:getOriginalTile(pt)
+end
+CCTiledGrid3DAction.originalTile = CCTiledGrid3DActionDeprecated.originalTile
+--functions of CCTiledGrid3DAction will be deprecated end
+
+
+--functions of CCTexture2D will be deprecated begin
+local CCTexture2DDeprecated = { }
+function CCTexture2DDeprecated.stringForFormat(self)
+ deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat")
+ return self:getStringForFormat()
+end
+CCTexture2D.stringForFormat = CCTexture2DDeprecated.stringForFormat
+
+function CCTexture2DDeprecated.bitsPerPixelForFormat(self)
+ deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
+ return self:getBitsPerPixelForFormat()
+end
+CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
+
+function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat)
+ deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
+ return self:getBitsPerPixelForFormat(pixelFormat)
+end
+CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
+
+function CCTexture2DDeprecated.defaultAlphaPixelFormat(self)
+ deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat")
+ return self:getDefaultAlphaPixelFormat()
+end
+CCTexture2D.defaultAlphaPixelFormat = CCTexture2DDeprecated.defaultAlphaPixelFormat
+--functions of CCTexture2D will be deprecated end
+
+
+--functions of CCTimer will be deprecated begin
+local CCTimerDeprecated = { }
+function CCTimerDeprecated.timerWithScriptHandler(handler,seconds)
+ deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler")
+ return CCTimer:createWithScriptHandler(handler,seconds)
+end
+CCTimer.timerWithScriptHandler = CCTimerDeprecated.timerWithScriptHandler
+
+function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target)
+ deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget")
+ return self:getNumberOfRunningActionsInTarget(target)
+end
+CCTimer.numberOfRunningActionsInTarget = CCTimerDeprecated.numberOfRunningActionsInTarget
+--functions of CCTimer will be deprecated end
+
+
+--functions of CCMenuItemFont will be deprecated begin
+local CCMenuItemFontDeprecated = { }
+function CCMenuItemFontDeprecated.fontSize()
+ deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize")
+ return CCMenuItemFont:getFontSize()
+end
+CCMenuItemFont.fontSize = CCMenuItemFontDeprecated.fontSize
+
+function CCMenuItemFontDeprecated.fontName()
+ deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName")
+ return CCMenuItemFont:getFontName()
+end
+CCMenuItemFont.fontName = CCMenuItemFontDeprecated.fontName
+
+function CCMenuItemFontDeprecated.fontSizeObj(self)
+ deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj")
+ return self:getFontSizeObj()
+end
+CCMenuItemFont.fontSizeObj = CCMenuItemFontDeprecated.fontSizeObj
+
+function CCMenuItemFontDeprecated.fontNameObj(self)
+ deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj")
+ return self:getFontNameObj()
+end
+CCMenuItemFont.fontNameObj = CCMenuItemFontDeprecated.fontNameObj
+--functions of CCMenuItemFont will be deprecated end
+
+
+--functions of CCMenuItemToggle will be deprecated begin
+local CCMenuItemToggleDeprecated = { }
+function CCMenuItemToggleDeprecated.selectedItem(self)
+ deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem")
+ return self:getSelectedItem()
+end
+CCMenuItemToggle.selectedItem = CCMenuItemToggleDeprecated.selectedItem
+--functions of CCMenuItemToggle will be deprecated end
+
+
+--functions of CCTileMapAtlas will be deprecated begin
+local CCTileMapAtlasDeprecated = { }
+function CCTileMapAtlasDeprecated.tileAt(self,pos)
+ deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt")
+ return self:getTileAt(pos)
+end
+CCTileMapAtlas.tileAt = CCTileMapAtlasDeprecated.tileAt
+--functions of CCTileMapAtlas will be deprecated end
+
+
+--functions of CCTMXLayer will be deprecated begin
+local CCTMXLayerDeprecated = { }
+function CCTMXLayerDeprecated.tileAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt")
+ return self:getTileAt(tileCoordinate)
+end
+CCTMXLayer.tileAt = CCTMXLayerDeprecated.tileAt
+
+function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt")
+ return self:getTileGIDAt(tileCoordinate)
+end
+CCTMXLayer.tileGIDAt = CCTMXLayerDeprecated.tileGIDAt
+
+function CCTMXLayerDeprecated.positionAt(self,tileCoordinate)
+ deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt")
+ return self:getPositionAt(tileCoordinate)
+end
+CCTMXLayer.positionAt = CCTMXLayerDeprecated.positionAt
+
+function CCTMXLayerDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXLayer.propertyNamed = CCTMXLayerDeprecated.propertyNamed
+--functions of CCTMXLayer will be deprecated end
+
+--functions of CCTMXTiledMap will be deprecated begin
+local CCTMXTiledMapDeprecated = { }
+function CCTMXTiledMapDeprecated.layerNamed(self,layerName)
+ deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer")
+ return self:getLayer(layerName)
+end
+CCTMXTiledMap.layerNamed = CCTMXTiledMapDeprecated.layerNamed
+
+function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXTiledMap.propertyNamed = CCTMXTiledMapDeprecated.propertyNamed
+
+function CCTMXTiledMapDeprecated.propertiesForGID(self,GID)
+ deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID")
+ return self:getPropertiesForGID(GID)
+end
+CCTMXTiledMap.propertiesForGID = CCTMXTiledMapDeprecated.propertiesForGID
+
+function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName)
+ deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup")
+ return self:getObjectGroup(groupName)
+end
+CCTMXTiledMap.objectGroupNamed = CCTMXTiledMapDeprecated.objectGroupNamed
+--functions of CCTMXTiledMap will be deprecated end
+
+
+--functions of CCTMXMapInfo will be deprecated begin
+local CCTMXMapInfoDeprecated = { }
+function CCTMXMapInfoDeprecated.getStoringCharacters(self)
+ deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters")
+ return self:isStoringCharacters()
+end
+CCTMXMapInfo.getStoringCharacters = CCTMXMapInfoDeprecated.getStoringCharacters
+
+function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile)
+ deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create")
+ return CCTMXMapInfo:create(tmxFile)
+end
+CCTMXMapInfo.formatWithTMXFile = CCTMXMapInfoDeprecated.formatWithTMXFile
+
+function CCTMXMapInfoDeprecated.formatWithXML(infoTable,tmxString,resourcePath)
+ deprecatedTip("CCTMXMapInfo:formatWithXML","TMXMapInfo:createWithXML")
+ return CCTMXMapInfo:createWithXML(tmxString,resourcePath)
+end
+CCTMXMapInfo.formatWithXML = CCTMXMapInfoDeprecated.formatWithXML
+--functions of CCTMXMapInfo will be deprecated end
+
+
+--functions of CCTMXObject will be deprecated begin
+local CCTMXObjectGroupDeprecated = { }
+function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName)
+ deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty")
+ return self:getProperty(propertyName)
+end
+CCTMXObjectGroup.propertyNamed = CCTMXObjectGroupDeprecated.propertyNamed
+
+function CCTMXObjectGroupDeprecated.objectNamed(self, objectName)
+ deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject")
+ return self:getObject(objectName)
+end
+CCTMXObjectGroup.objectNamed = CCTMXObjectGroupDeprecated.objectNamed
+--functions of CCTMXObject will be deprecated end
+
+--functions of CCRenderTexture will be deprecated begin
+local CCRenderTextureDeprecated = { }
+function CCRenderTextureDeprecated.newCCImage(self)
+ deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage")
+ return self:newImage()
+end
+CCRenderTexture.newCCImage = CCRenderTextureDeprecated.newCCImage
+--functions of CCRenderTexture will be deprecated end
+
+--functions of Sprite will be deprecated begin
+local CCSpriteDeprecated = { }
+function CCSpriteDeprecated.setFlipX(self,flag)
+ deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX")
+ return self:setFlippedX(flag)
+end
+cc.Sprite.setFlipX = CCSpriteDeprecated.setFlipX
+
+function CCSpriteDeprecated.setFlipY(self,flag)
+ deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY")
+ return self:setFlippedY(flag)
+end
+cc.Sprite.setFlipY = CCSpriteDeprecated.setFlipY
+--functions of Sprite will be deprecated end
+
+
+--functions of Layer will be deprecated begin
+local CCLayerDeprecated = {}
+function CCLayerDeprecated.setKeypadEnabled( self, enabled)
+ return self:setKeyboardEnabled(enabled)
+end
+cc.Layer.setKeypadEnabled = CCLayerDeprecated.setKeypadEnabled
+
+function CCLayerDeprecated.isKeypadEnabled(self)
+ return self:isKeyboardEnabled()
+end
+cc.Layer.isKeypadEnabled = CCLayerDeprecated.isKeypadEnabled
+--functions of Layer will be deprecated end
+
+--functions of cc.Node will be deprecated begin
+local NodeDeprecated = { }
+function NodeDeprecated.setZOrder(self,zOrder)
+ deprecatedTip("cc.Node:setZOrder","cc.Node:setLocalZOrder")
+ return self:setLocalZOrder(zOrder)
+end
+cc.Node.setZOrder = NodeDeprecated.setZOrder
+
+function NodeDeprecated.getZOrder(self)
+ deprecatedTip("cc.Node:getZOrder","cc.Node:getLocalZOrder")
+ return self:getLocalZOrder()
+end
+cc.Node.getZOrder = NodeDeprecated.getZOrder
+
+function NodeDeprecated.setVertexZ(self,vertexZ)
+ deprecatedTip("cc.Node:setVertexZ", "cc.Node:setPositionZ")
+ return self:setPositionZ(vertexZ)
+end
+cc.Node.setVertexZ = NodeDeprecated.setVertexZ
+
+function NodeDeprecated.getVertexZ(self)
+ deprecatedTip("cc.Node:getVertexZ", "cc.Node:getPositionZ")
+ return self:getPositionZ()
+end
+cc.Node.getVertexZ = NodeDeprecated.getVertexZ
+--functions of cc.Node will be deprecated end
+
+--functions of cc.GLProgram will be deprecated begin
+local GLProgram = { }
+function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderByteArray)
+ deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays")
+ return self:initWithByteArrays(vShaderByteArray, fShaderByteArray)
+end
+cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray
+
+function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray)
+ deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames")
+ return self:initWithFilenames(vShaderByteArray, fShaderByteArray)
+end
+cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename
+
+function GLProgram.addAttribute(self, attributeName, index)
+ deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation")
+ return self:bindAttribLocation(attributeName, index)
+end
+cc.GLProgram.addAttribute = GLProgram.addAttribute
+--functions of cc.GLProgram will be deprecated end
diff --git a/src/cocos/cocos2d/DeprecatedOpenglEnum.lua b/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
new file mode 100644
index 0000000..1235e8d
--- /dev/null
+++ b/src/cocos/cocos2d/DeprecatedOpenglEnum.lua
@@ -0,0 +1,288 @@
+-- This is the DeprecatedEnum
+
+DeprecatedClass = {} or DeprecatedClass
+
+_G.GL_RENDERBUFFER_INTERNAL_FORMAT = gl.RENDERBUFFER_INTERNAL_FORMAT
+_G.GL_LINE_WIDTH = gl.LINE_WIDTH
+_G.GL_CONSTANT_ALPHA = gl.CONSTANT_ALPHA
+_G.GL_BLEND_SRC_ALPHA = gl.BLEND_SRC_ALPHA
+_G.GL_GREEN_BITS = gl.GREEN_BITS
+_G.GL_STENCIL_REF = gl.STENCIL_REF
+_G.GL_ONE_MINUS_SRC_ALPHA = gl.ONE_MINUS_SRC_ALPHA
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
+_G.GL_CCW = gl.CCW
+_G.GL_MAX_TEXTURE_IMAGE_UNITS = gl.MAX_TEXTURE_IMAGE_UNITS
+_G.GL_BACK = gl.BACK
+_G.GL_ACTIVE_ATTRIBUTES = gl.ACTIVE_ATTRIBUTES
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_X = gl.TEXTURE_CUBE_MAP_POSITIVE_X
+_G.GL_STENCIL_BACK_VALUE_MASK = gl.STENCIL_BACK_VALUE_MASK
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Z = gl.TEXTURE_CUBE_MAP_POSITIVE_Z
+_G.GL_ONE = gl.ONE
+_G.GL_TRUE = gl.TRUE
+_G.GL_TEXTURE12 = gl.TEXTURE12
+_G.GL_LINK_STATUS = gl.LINK_STATUS
+_G.GL_BLEND = gl.BLEND
+_G.GL_LESS = gl.LESS
+_G.GL_TEXTURE16 = gl.TEXTURE16
+_G.GL_BOOL_VEC2 = gl.BOOL_VEC2
+_G.GL_KEEP = gl.KEEP
+_G.GL_DST_COLOR = gl.DST_COLOR
+_G.GL_VERTEX_ATTRIB_ARRAY_ENABLED = gl.VERTEX_ATTRIB_ARRAY_ENABLED
+_G.GL_EXTENSIONS = gl.EXTENSIONS
+_G.GL_FRONT = gl.FRONT
+_G.GL_DST_ALPHA = gl.DST_ALPHA
+_G.GL_ATTACHED_SHADERS = gl.ATTACHED_SHADERS
+_G.GL_STENCIL_BACK_FUNC = gl.STENCIL_BACK_FUNC
+_G.GL_ONE_MINUS_DST_COLOR = gl.ONE_MINUS_DST_COLOR
+_G.GL_BLEND_EQUATION = gl.BLEND_EQUATION
+_G.GL_RENDERBUFFER_DEPTH_SIZE = gl.RENDERBUFFER_DEPTH_SIZE
+_G.GL_PACK_ALIGNMENT = gl.PACK_ALIGNMENT
+_G.GL_VENDOR = gl.VENDOR
+_G.GL_NEAREST_MIPMAP_LINEAR = gl.NEAREST_MIPMAP_LINEAR
+_G.GL_TEXTURE_CUBE_MAP_POSITIVE_Y = gl.TEXTURE_CUBE_MAP_POSITIVE_Y
+_G.GL_NEAREST = gl.NEAREST
+_G.GL_RENDERBUFFER_WIDTH = gl.RENDERBUFFER_WIDTH
+_G.GL_ARRAY_BUFFER_BINDING = gl.ARRAY_BUFFER_BINDING
+_G.GL_ARRAY_BUFFER = gl.ARRAY_BUFFER
+_G.GL_LEQUAL = gl.LEQUAL
+_G.GL_VERSION = gl.VERSION
+_G.GL_COLOR_CLEAR_VALUE = gl.COLOR_CLEAR_VALUE
+_G.GL_RENDERER = gl.RENDERER
+_G.GL_STENCIL_BACK_PASS_DEPTH_PASS = gl.STENCIL_BACK_PASS_DEPTH_PASS
+_G.GL_STENCIL_BACK_PASS_DEPTH_FAIL = gl.STENCIL_BACK_PASS_DEPTH_FAIL
+_G.GL_STENCIL_BACK_WRITEMASK = gl.STENCIL_BACK_WRITEMASK
+_G.GL_BOOL = gl.BOOL
+_G.GL_VIEWPORT = gl.VIEWPORT
+_G.GL_FRAGMENT_SHADER = gl.FRAGMENT_SHADER
+_G.GL_LUMINANCE = gl.LUMINANCE
+_G.GL_DECR_WRAP = gl.DECR_WRAP
+_G.GL_FUNC_ADD = gl.FUNC_ADD
+_G.GL_ONE_MINUS_DST_ALPHA = gl.ONE_MINUS_DST_ALPHA
+_G.GL_OUT_OF_MEMORY = gl.OUT_OF_MEMORY
+_G.GL_BOOL_VEC4 = gl.BOOL_VEC4
+_G.GL_POLYGON_OFFSET_FACTOR = gl.POLYGON_OFFSET_FACTOR
+_G.GL_STATIC_DRAW = gl.STATIC_DRAW
+_G.GL_DITHER = gl.DITHER
+_G.GL_TEXTURE31 = gl.TEXTURE31
+_G.GL_TEXTURE30 = gl.TEXTURE30
+_G.GL_UNSIGNED_BYTE = gl.UNSIGNED_BYTE
+_G.GL_DEPTH_COMPONENT16 = gl.DEPTH_COMPONENT16
+_G.GL_TEXTURE23 = gl.TEXTURE23
+_G.GL_DEPTH_TEST = gl.DEPTH_TEST
+_G.GL_STENCIL_PASS_DEPTH_FAIL = gl.STENCIL_PASS_DEPTH_FAIL
+_G.GL_BOOL_VEC3 = gl.BOOL_VEC3
+_G.GL_POLYGON_OFFSET_UNITS = gl.POLYGON_OFFSET_UNITS
+_G.GL_TEXTURE_BINDING_2D = gl.TEXTURE_BINDING_2D
+_G.GL_TEXTURE21 = gl.TEXTURE21
+_G.GL_UNPACK_ALIGNMENT = gl.UNPACK_ALIGNMENT
+_G.GL_DONT_CARE = gl.DONT_CARE
+_G.GL_BUFFER_SIZE = gl.BUFFER_SIZE
+_G.GL_FLOAT_MAT3 = gl.FLOAT_MAT3
+_G.GL_UNSIGNED_SHORT_5_6_5 = gl.UNSIGNED_SHORT_5_6_5
+_G.GL_INT_VEC2 = gl.INT_VEC2
+_G.GL_UNSIGNED_SHORT_4_4_4_4 = gl.UNSIGNED_SHORT_4_4_4_4
+_G.GL_NONE = gl.NONE
+_G.GL_BLEND_DST_ALPHA = gl.BLEND_DST_ALPHA
+_G.GL_VERTEX_ATTRIB_ARRAY_SIZE = gl.VERTEX_ATTRIB_ARRAY_SIZE
+_G.GL_SRC_COLOR = gl.SRC_COLOR
+_G.GL_COMPRESSED_TEXTURE_FORMATS = gl.COMPRESSED_TEXTURE_FORMATS
+_G.GL_STENCIL_ATTACHMENT = gl.STENCIL_ATTACHMENT
+_G.GL_MAX_VERTEX_ATTRIBS = gl.MAX_VERTEX_ATTRIBS
+_G.GL_NUM_COMPRESSED_TEXTURE_FORMATS = gl.NUM_COMPRESSED_TEXTURE_FORMATS
+_G.GL_BLEND_EQUATION_RGB = gl.BLEND_EQUATION_RGB
+_G.GL_TEXTURE = gl.TEXTURE
+_G.GL_LINEAR_MIPMAP_LINEAR = gl.LINEAR_MIPMAP_LINEAR
+_G.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
+_G.GL_CURRENT_PROGRAM = gl.CURRENT_PROGRAM
+_G.GL_COLOR_BUFFER_BIT = gl.COLOR_BUFFER_BIT
+_G.GL_TEXTURE20 = gl.TEXTURE20
+_G.GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = gl.ACTIVE_ATTRIBUTE_MAX_LENGTH
+_G.GL_TEXTURE28 = gl.TEXTURE28
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
+_G.GL_TEXTURE22 = gl.TEXTURE22
+_G.GL_ELEMENT_ARRAY_BUFFER_BINDING = gl.ELEMENT_ARRAY_BUFFER_BINDING
+_G.GL_STREAM_DRAW = gl.STREAM_DRAW
+_G.GL_SCISSOR_BOX = gl.SCISSOR_BOX
+_G.GL_TEXTURE26 = gl.TEXTURE26
+_G.GL_TEXTURE27 = gl.TEXTURE27
+_G.GL_TEXTURE24 = gl.TEXTURE24
+_G.GL_TEXTURE25 = gl.TEXTURE25
+_G.GL_NO_ERROR = gl.NO_ERROR
+_G.GL_TEXTURE29 = gl.TEXTURE29
+_G.GL_FLOAT_MAT4 = gl.FLOAT_MAT4
+_G.GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = gl.VERTEX_ATTRIB_ARRAY_NORMALIZED
+_G.GL_SAMPLE_COVERAGE_INVERT = gl.SAMPLE_COVERAGE_INVERT
+_G.GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
+_G.GL_FLOAT_VEC3 = gl.FLOAT_VEC3
+_G.GL_STENCIL_CLEAR_VALUE = gl.STENCIL_CLEAR_VALUE
+_G.GL_UNSIGNED_SHORT_5_5_5_1 = gl.UNSIGNED_SHORT_5_5_5_1
+_G.GL_ACTIVE_UNIFORMS = gl.ACTIVE_UNIFORMS
+_G.GL_INVALID_OPERATION = gl.INVALID_OPERATION
+_G.GL_DEPTH_ATTACHMENT = gl.DEPTH_ATTACHMENT
+_G.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS
+_G.GL_FRAMEBUFFER_COMPLETE = gl.FRAMEBUFFER_COMPLETE
+_G.GL_ONE_MINUS_CONSTANT_COLOR = gl.ONE_MINUS_CONSTANT_COLOR
+_G.GL_TEXTURE2 = gl.TEXTURE2
+_G.GL_TEXTURE1 = gl.TEXTURE1
+_G.GL_GEQUAL = gl.GEQUAL
+_G.GL_TEXTURE7 = gl.TEXTURE7
+_G.GL_TEXTURE6 = gl.TEXTURE6
+_G.GL_TEXTURE5 = gl.TEXTURE5
+_G.GL_TEXTURE4 = gl.TEXTURE4
+_G.GL_GENERATE_MIPMAP_HINT = gl.GENERATE_MIPMAP_HINT
+_G.GL_ONE_MINUS_SRC_COLOR = gl.ONE_MINUS_SRC_COLOR
+_G.GL_TEXTURE9 = gl.TEXTURE9
+_G.GL_STENCIL_TEST = gl.STENCIL_TEST
+_G.GL_COLOR_WRITEMASK = gl.COLOR_WRITEMASK
+_G.GL_DEPTH_COMPONENT = gl.DEPTH_COMPONENT
+_G.GL_STENCIL_INDEX8 = gl.STENCIL_INDEX8
+_G.GL_VERTEX_ATTRIB_ARRAY_TYPE = gl.VERTEX_ATTRIB_ARRAY_TYPE
+_G.GL_FLOAT_VEC2 = gl.FLOAT_VEC2
+_G.GL_BLUE_BITS = gl.BLUE_BITS
+_G.GL_VERTEX_SHADER = gl.VERTEX_SHADER
+_G.GL_SUBPIXEL_BITS = gl.SUBPIXEL_BITS
+_G.GL_STENCIL_WRITEMASK = gl.STENCIL_WRITEMASK
+_G.GL_FLOAT_VEC4 = gl.FLOAT_VEC4
+_G.GL_TEXTURE17 = gl.TEXTURE17
+_G.GL_ONE_MINUS_CONSTANT_ALPHA = gl.ONE_MINUS_CONSTANT_ALPHA
+_G.GL_TEXTURE15 = gl.TEXTURE15
+_G.GL_TEXTURE14 = gl.TEXTURE14
+_G.GL_TEXTURE13 = gl.TEXTURE13
+_G.GL_SAMPLES = gl.SAMPLES
+_G.GL_TEXTURE11 = gl.TEXTURE11
+_G.GL_TEXTURE10 = gl.TEXTURE10
+_G.GL_FUNC_SUBTRACT = gl.FUNC_SUBTRACT
+_G.GL_STENCIL_BUFFER_BIT = gl.STENCIL_BUFFER_BIT
+_G.GL_TEXTURE19 = gl.TEXTURE19
+_G.GL_TEXTURE18 = gl.TEXTURE18
+_G.GL_NEAREST_MIPMAP_NEAREST = gl.NEAREST_MIPMAP_NEAREST
+_G.GL_SHORT = gl.SHORT
+_G.GL_RENDERBUFFER_BINDING = gl.RENDERBUFFER_BINDING
+_G.GL_REPEAT = gl.REPEAT
+_G.GL_TEXTURE_MIN_FILTER = gl.TEXTURE_MIN_FILTER
+_G.GL_RED_BITS = gl.RED_BITS
+_G.GL_FRONT_FACE = gl.FRONT_FACE
+_G.GL_BLEND_COLOR = gl.BLEND_COLOR
+_G.GL_MIRRORED_REPEAT = gl.MIRRORED_REPEAT
+_G.GL_INT_VEC4 = gl.INT_VEC4
+_G.GL_MAX_CUBE_MAP_TEXTURE_SIZE = gl.MAX_CUBE_MAP_TEXTURE_SIZE
+_G.GL_RENDERBUFFER_BLUE_SIZE = gl.RENDERBUFFER_BLUE_SIZE
+_G.GL_SAMPLE_COVERAGE = gl.SAMPLE_COVERAGE
+_G.GL_SRC_ALPHA = gl.SRC_ALPHA
+_G.GL_FUNC_REVERSE_SUBTRACT = gl.FUNC_REVERSE_SUBTRACT
+_G.GL_DEPTH_WRITEMASK = gl.DEPTH_WRITEMASK
+_G.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT
+_G.GL_POLYGON_OFFSET_FILL = gl.POLYGON_OFFSET_FILL
+_G.GL_STENCIL_FUNC = gl.STENCIL_FUNC
+_G.GL_REPLACE = gl.REPLACE
+_G.GL_LUMINANCE_ALPHA = gl.LUMINANCE_ALPHA
+_G.GL_DEPTH_RANGE = gl.DEPTH_RANGE
+_G.GL_FASTEST = gl.FASTEST
+_G.GL_STENCIL_FAIL = gl.STENCIL_FAIL
+_G.GL_UNSIGNED_SHORT = gl.UNSIGNED_SHORT
+_G.GL_RENDERBUFFER_HEIGHT = gl.RENDERBUFFER_HEIGHT
+_G.GL_STENCIL_BACK_FAIL = gl.STENCIL_BACK_FAIL
+_G.GL_BLEND_SRC_RGB = gl.BLEND_SRC_RGB
+_G.GL_TEXTURE3 = gl.TEXTURE3
+_G.GL_RENDERBUFFER = gl.RENDERBUFFER
+_G.GL_RGB5_A1 = gl.RGB5_A1
+_G.GL_RENDERBUFFER_ALPHA_SIZE = gl.RENDERBUFFER_ALPHA_SIZE
+_G.GL_RENDERBUFFER_STENCIL_SIZE = gl.RENDERBUFFER_STENCIL_SIZE
+_G.GL_NOTEQUAL = gl.NOTEQUAL
+_G.GL_BLEND_DST_RGB = gl.BLEND_DST_RGB
+_G.GL_FRONT_AND_BACK = gl.FRONT_AND_BACK
+_G.GL_TEXTURE_BINDING_CUBE_MAP = gl.TEXTURE_BINDING_CUBE_MAP
+_G.GL_MAX_RENDERBUFFER_SIZE = gl.MAX_RENDERBUFFER_SIZE
+_G.GL_ZERO = gl.ZERO
+_G.GL_TEXTURE0 = gl.TEXTURE0
+_G.GL_SAMPLE_ALPHA_TO_COVERAGE = gl.SAMPLE_ALPHA_TO_COVERAGE
+_G.GL_BUFFER_USAGE = gl.BUFFER_USAGE
+_G.GL_ACTIVE_TEXTURE = gl.ACTIVE_TEXTURE
+_G.GL_BYTE = gl.BYTE
+_G.GL_CW = gl.CW
+_G.GL_DYNAMIC_DRAW = gl.DYNAMIC_DRAW
+_G.GL_RENDERBUFFER_RED_SIZE = gl.RENDERBUFFER_RED_SIZE
+_G.GL_FALSE = gl.FALSE
+_G.GL_GREATER = gl.GREATER
+_G.GL_RGBA4 = gl.RGBA4
+_G.GL_VALIDATE_STATUS = gl.VALIDATE_STATUS
+_G.GL_STENCIL_BITS = gl.STENCIL_BITS
+_G.GL_RGB = gl.RGB
+_G.GL_INT = gl.INT
+_G.GL_DEPTH_FUNC = gl.DEPTH_FUNC
+_G.GL_SAMPLER_2D = gl.SAMPLER_2D
+_G.GL_NICEST = gl.NICEST
+_G.GL_MAX_VIEWPORT_DIMS = gl.MAX_VIEWPORT_DIMS
+_G.GL_CULL_FACE = gl.CULL_FACE
+_G.GL_INT_VEC3 = gl.INT_VEC3
+_G.GL_ALIASED_POINT_SIZE_RANGE = gl.ALIASED_POINT_SIZE_RANGE
+_G.GL_INVALID_ENUM = gl.INVALID_ENUM
+_G.GL_INVERT = gl.INVERT
+_G.GL_CULL_FACE_MODE = gl.CULL_FACE_MODE
+_G.GL_TEXTURE8 = gl.TEXTURE8
+_G.GL_VERTEX_ATTRIB_ARRAY_POINTER = gl.VERTEX_ATTRIB_ARRAY_POINTER
+_G.GL_TEXTURE_WRAP_S = gl.TEXTURE_WRAP_S
+_G.GL_VERTEX_ATTRIB_ARRAY_STRIDE = gl.VERTEX_ATTRIB_ARRAY_STRIDE
+_G.GL_LINES = gl.LINES
+_G.GL_EQUAL = gl.EQUAL
+_G.GL_LINE_LOOP = gl.LINE_LOOP
+_G.GL_TEXTURE_WRAP_T = gl.TEXTURE_WRAP_T
+_G.GL_DEPTH_BUFFER_BIT = gl.DEPTH_BUFFER_BIT
+_G.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS
+_G.GL_SHADER_TYPE = gl.SHADER_TYPE
+_G.GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_X = gl.TEXTURE_CUBE_MAP_NEGATIVE_X
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = gl.TEXTURE_CUBE_MAP_NEGATIVE_Y
+_G.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+_G.GL_DECR = gl.DECR
+_G.GL_DELETE_STATUS = gl.DELETE_STATUS
+_G.GL_DEPTH_BITS = gl.DEPTH_BITS
+_G.GL_INCR = gl.INCR
+_G.GL_SAMPLE_COVERAGE_VALUE = gl.SAMPLE_COVERAGE_VALUE
+_G.GL_ALPHA_BITS = gl.ALPHA_BITS
+_G.GL_FLOAT_MAT2 = gl.FLOAT_MAT2
+_G.GL_LINE_STRIP = gl.LINE_STRIP
+_G.GL_SHADER_SOURCE_LENGTH = gl.SHADER_SOURCE_LENGTH
+_G.GL_INVALID_VALUE = gl.INVALID_VALUE
+_G.GL_NEVER = gl.NEVER
+_G.GL_INCR_WRAP = gl.INCR_WRAP
+_G.GL_BLEND_EQUATION_ALPHA = gl.BLEND_EQUATION_ALPHA
+_G.GL_TEXTURE_MAG_FILTER = gl.TEXTURE_MAG_FILTER
+_G.GL_POINTS = gl.POINTS
+_G.GL_COLOR_ATTACHMENT0 = gl.COLOR_ATTACHMENT0
+_G.GL_RGBA = gl.RGBA
+_G.GL_SRC_ALPHA_SATURATE = gl.SRC_ALPHA_SATURATE
+_G.GL_SAMPLER_CUBE = gl.SAMPLER_CUBE
+_G.GL_FRAMEBUFFER = gl.FRAMEBUFFER
+_G.GL_TEXTURE_CUBE_MAP = gl.TEXTURE_CUBE_MAP
+_G.GL_SAMPLE_BUFFERS = gl.SAMPLE_BUFFERS
+_G.GL_LINEAR = gl.LINEAR
+_G.GL_LINEAR_MIPMAP_NEAREST = gl.LINEAR_MIPMAP_NEAREST
+_G.GL_ACTIVE_UNIFORM_MAX_LENGTH = gl.ACTIVE_UNIFORM_MAX_LENGTH
+_G.GL_STENCIL_BACK_REF = gl.STENCIL_BACK_REF
+_G.GL_ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER
+_G.GL_CLAMP_TO_EDGE = gl.CLAMP_TO_EDGE
+_G.GL_TRIANGLE_STRIP = gl.TRIANGLE_STRIP
+_G.GL_CONSTANT_COLOR = gl.CONSTANT_COLOR
+_G.GL_COMPILE_STATUS = gl.COMPILE_STATUS
+_G.GL_RENDERBUFFER_GREEN_SIZE = gl.RENDERBUFFER_GREEN_SIZE
+_G.GL_UNSIGNED_INT = gl.UNSIGNED_INT
+_G.GL_DEPTH_CLEAR_VALUE = gl.DEPTH_CLEAR_VALUE
+_G.GL_ALIASED_LINE_WIDTH_RANGE = gl.ALIASED_LINE_WIDTH_RANGE
+_G.GL_SHADING_LANGUAGE_VERSION = gl.SHADING_LANGUAGE_VERSION
+_G.GL_FRAMEBUFFER_UNSUPPORTED = gl.FRAMEBUFFER_UNSUPPORTED
+_G.GL_INFO_LOG_LENGTH = gl.INFO_LOG_LENGTH
+_G.GL_STENCIL_PASS_DEPTH_PASS = gl.STENCIL_PASS_DEPTH_PASS
+_G.GL_STENCIL_VALUE_MASK = gl.STENCIL_VALUE_MASK
+_G.GL_ALWAYS = gl.ALWAYS
+_G.GL_MAX_TEXTURE_SIZE = gl.MAX_TEXTURE_SIZE
+_G.GL_FLOAT = gl.FLOAT
+_G.GL_FRAMEBUFFER_BINDING = gl.FRAMEBUFFER_BINDING
+_G.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
+_G.GL_TRIANGLE_FAN = gl.TRIANGLE_FAN
+_G.GL_INVALID_FRAMEBUFFER_OPERATION = gl.INVALID_FRAMEBUFFER_OPERATION
+_G.GL_TEXTURE_2D = gl.TEXTURE_2D
+_G.GL_ALPHA = gl.ALPHA
+_G.GL_CURRENT_VERTEX_ATTRIB = gl.CURRENT_VERTEX_ATTRIB
+_G.GL_SCISSOR_TEST = gl.SCISSOR_TEST
+_G.GL_TRIANGLES = gl.TRIANGLES
diff --git a/src/cocos/cocos2d/DrawPrimitives.lua b/src/cocos/cocos2d/DrawPrimitives.lua
new file mode 100644
index 0000000..e4f50a9
--- /dev/null
+++ b/src/cocos/cocos2d/DrawPrimitives.lua
@@ -0,0 +1,384 @@
+
+local dp_initialized = false
+local dp_shader = nil
+local dp_colorLocation = -1
+local dp_color = { 1.0, 1.0, 1.0, 1.0 }
+local dp_pointSizeLocation = -1
+local dp_pointSize = 1.0
+
+local SHADER_NAME_POSITION_U_COLOR = "ShaderPosition_uColor"
+
+local targetPlatform = cc.Application:getInstance():getTargetPlatform()
+
+local function lazy_init()
+ if not dp_initialized then
+ dp_shader = cc.ShaderCache:getInstance():getProgram(SHADER_NAME_POSITION_U_COLOR)
+ --dp_shader:retain()
+ if nil ~= dp_shader then
+ dp_colorLocation = gl.getUniformLocation( dp_shader:getProgram(), "u_color")
+ dp_pointSizeLocation = gl.getUniformLocation( dp_shader:getProgram(), "u_pointSize")
+ dp_Initialized = true
+ end
+ end
+
+ if nil == dp_shader then
+ print("Error:dp_shader is nil!")
+ return false
+ end
+
+ return true
+end
+
+local function setDrawProperty()
+ gl.glEnableVertexAttribs( CCConstants.VERTEX_ATTRIB_FLAG_POSITION )
+ dp_shader:use()
+ dp_shader:setUniformsForBuiltins()
+ dp_shader:setUniformLocationWith4fv(dp_colorLocation, dp_color, 1)
+end
+
+function ccDrawInit()
+ lazy_init()
+end
+
+function ccDrawFree()
+ dp_initialized = false
+end
+
+function ccDrawColor4f(r,g,b,a)
+ dp_color[1] = r
+ dp_color[2] = g
+ dp_color[3] = b
+ dp_color[4] = a
+end
+
+function ccPointSize(pointSize)
+ dp_pointSize = pointSize * cc.Director:getInstance():getContentScaleFactor()
+end
+
+function ccDrawColor4B(r,g,b,a)
+ dp_color[1] = r / 255.0
+ dp_color[2] = g / 255.0
+ dp_color[3] = b / 255.0
+ dp_color[4] = a / 255.0
+end
+
+function ccDrawPoint(point)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ local vertices = { point.x,point.y}
+ gl.bufferData(gl.ARRAY_BUFFER,2,vertices,gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ dp_shader:setUniformLocationWith1f(dp_pointSizeLocation, dp_pointSize)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.POINTS,0,1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawPoints(points,numOfPoint)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoint do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoint * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ dp_shader:setUniformLocationWith1f(dp_pointSizeLocation, dp_pointSize)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.POINTS,0,numOfPoint)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawLine(origin,destination)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = { origin.x, origin.y, destination.x, destination.y}
+ gl.bufferData(gl.ARRAY_BUFFER,4,vertices,gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINES ,0,2)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawPoly(points,numOfPoints,closePolygon)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoints do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoints * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ if closePolygon then
+ gl.drawArrays(gl.LINE_LOOP , 0, numOfPoints)
+ else
+ gl.drawArrays(gl.LINE_STRIP, 0, numOfPoints)
+ end
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawSolidPoly(points,numOfPoints,color)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = {}
+ local i = 1
+
+ local function initBuffer()
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ local vertices = {}
+ for i = 1, numOfPoints do
+ vertices[2 * i - 1] = points[i].x
+ vertices[2 * i] = points[i].y
+
+ end
+ gl.bufferData(gl.ARRAY_BUFFER, numOfPoints * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ gl.glEnableVertexAttribs( CCConstants.VERTEX_ATTRIB_FLAG_POSITION )
+ dp_shader:use()
+ dp_shader:setUniformsForBuiltins()
+ dp_shader:setUniformLocationWith4fv(dp_colorLocation, color, 1)
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.TRIANGLE_FAN , 0, numOfPoints)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawRect(origin,destination)
+ ccDrawLine(CCPoint:__call(origin.x, origin.y), CCPoint:__call(destination.x, origin.y))
+ ccDrawLine(CCPoint:__call(destination.x, origin.y), CCPoint:__call(destination.x, destination.y))
+ ccDrawLine(CCPoint:__call(destination.x, destination.y), CCPoint:__call(origin.x, destination.y))
+ ccDrawLine(CCPoint:__call(origin.x, destination.y), CCPoint:__call(origin.x, origin.y))
+end
+
+function ccDrawSolidRect( origin,destination,color )
+ local vertices = { origin, CCPoint:__call(destination.x, origin.y) , destination, CCPoint:__call(origin.x, destination.y) }
+ ccDrawSolidPoly(vertices,4,color)
+end
+
+function ccDrawCircleScale( center, radius, angle, segments,drawLineToCenter,scaleX,scaleY)
+ if not lazy_init() then
+ return
+ end
+
+ local additionalSegment = 1
+ if drawLineToCenter then
+ additionalSegment = additionalSegment + 1
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local coef = 2.0 * math.pi / segments
+ local i = 1
+ local vertices = {}
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ for i = 1, segments + 1 do
+ local rads = (i - 1) * coef
+ local j = radius * math.cos(rads + angle) * scaleX + center.x
+ local k = radius * math.sin(rads + angle) * scaleY + center.y
+ vertices[i * 2 - 1] = j
+ vertices[i * 2] = k
+ end
+ vertices[(segments + 2) * 2 - 1] = center.x
+ vertices[(segments + 2) * 2] = center.y
+
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 2) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + additionalSegment)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawCircle(center, radius, angle, segments, drawLineToCenter)
+ ccDrawCircleScale(center, radius, angle, segments, drawLineToCenter, 1.0, 1.0)
+end
+
+function ccDrawSolidCircle(center, radius, angle, segments,scaleX,scaleY)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local coef = 2.0 * math.pi / segments
+ local i = 1
+ local vertices = {}
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ for i = 1, segments + 1 do
+ local rads = (i - 1) * coef
+ local j = radius * math.cos(rads + angle) * scaleX + center.x
+ local k = radius * math.sin(rads + angle) * scaleY + center.y
+ vertices[i * 2 - 1] = j
+ vertices[i * 2] = k
+ end
+ vertices[(segments + 2) * 2 - 1] = center.x
+ vertices[(segments + 2) * 2] = center.y
+
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 2) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.TRIANGLE_FAN , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawQuadBezier(origin, control, destination, segments)
+ if not lazy_init() then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local vertices = { }
+ local i = 1
+ local t = 0.0
+
+ for i = 1, segments do
+ vertices[2 * i - 1] = math.pow(1 - t,2) * origin.x + 2.0 * (1 - t) * t * control.x + t * t * destination.x
+ vertices[2 * i] = math.pow(1 - t,2) * origin.y + 2.0 * (1 - t) * t * control.y + t * t * destination.y
+ t = t + 1.0 / segments
+ end
+
+ vertices[2 * (segments + 1) - 1] = destination.x
+ vertices[2 * (segments + 1)] = destination.y
+
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 1) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
+
+function ccDrawCubicBezier(origin, control1, control2, destination, segments)
+ if not lazy_init then
+ return
+ end
+
+ local vertexBuffer = { }
+
+ local function initBuffer()
+ local vertices = { }
+ local t = 0
+ local i = 1
+
+ for i = 1, segments do
+ vertices[2 * i - 1] = math.pow(1 - t,3) * origin.x + 3.0 * math.pow(1 - t, 2) * t * control1.x + 3.0 * (1 - t) * t * t * control2.x + t * t * t * destination.x
+ vertices[2 * i] = math.pow(1 - t,3) * origin.y + 3.0 * math.pow(1 - t, 2) * t * control1.y + 3.0 * (1 - t) * t * t * control2.y + t * t * t * destination.y
+ t = t + 1.0 / segments
+ end
+
+ vertices[2 * (segments + 1) - 1] = destination.x
+ vertices[2 * (segments + 1)] = destination.y
+
+ vertexBuffer.buffer_id = gl.createBuffer()
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer.buffer_id)
+ gl.bufferData(gl.ARRAY_BUFFER, (segments + 1) * 2, vertices, gl.STATIC_DRAW)
+ gl.bindBuffer(gl.ARRAY_BUFFER, 0)
+ end
+
+ initBuffer()
+
+ setDrawProperty()
+
+ gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer.buffer_id)
+ gl.vertexAttribPointer(CCConstants.VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, false, 0, 0)
+ gl.drawArrays(gl.LINE_STRIP , 0, segments + 1)
+ gl.bindBuffer(gl.ARRAY_BUFFER,0)
+end
diff --git a/src/cocos/cocos2d/Opengl.lua b/src/cocos/cocos2d/Opengl.lua
new file mode 100644
index 0000000..7465523
--- /dev/null
+++ b/src/cocos/cocos2d/Opengl.lua
@@ -0,0 +1,297 @@
+
+if not gl then return end
+
+--Create functions
+function gl.createTexture()
+ local retTable = {}
+ retTable.texture_id = gl._createTexture()
+ return retTable
+end
+
+function gl.createBuffer()
+ local retTable = {}
+ retTable.buffer_id = gl._createBuffer()
+ return retTable
+end
+
+function gl.createRenderbuffer()
+ local retTable = {}
+ retTable.renderbuffer_id = gl._createRenderuffer()
+ return retTable
+end
+
+function gl.createFramebuffer( )
+ local retTable = {}
+ retTable.framebuffer_id = gl._createFramebuffer()
+ return retTable
+end
+
+function gl.createProgram()
+ local retTable = {}
+ retTable.program_id = gl._createProgram()
+ return retTable
+end
+
+function gl.createShader(shaderType)
+ local retTable = {}
+ retTable.shader_id = gl._createShader(shaderType)
+ return retTable
+end
+
+--Delete Fun
+function gl.deleteTexture(texture)
+ local texture_id = 0
+ if "number" == type(texture) then
+ texture_id = texture
+ elseif "table" == type(texture) then
+ texture_id = texture.texture_id
+ end
+ gl._deleteTexture(texture_id)
+end
+
+function gl.deleteBuffer(buffer)
+ local buffer_id = 0
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+ gl._deleteBuffer(buffer_id)
+end
+
+function gl.deleteRenderbuffer(buffer)
+ local renderbuffer_id = 0
+ if "number" == type(buffer) then
+ renderbuffer_id = buffer
+ elseif "table" == type(buffer) then
+ renderbuffer_id = buffer.renderbuffer_id
+ end
+ gl._deleteRenderbuffer(renderbuffer_id)
+end
+
+function gl.deleteFramebuffer(buffer)
+ local framebuffer_id = 0
+ if "number" == type(buffer) then
+ framebuffer_id = buffer
+ elseif "table" == type(buffer) then
+ framebuffer_id = buffer.framebuffer_id
+ end
+ gl._deleteFramebuffer(framebuffer_id)
+end
+
+function gl.deleteProgram( program )
+ local program_id = 0
+ if "number" == type(buffer) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._deleteProgram(program_id)
+end
+
+function gl.deleteShader(shader)
+ local shader_id = 0
+ if "number" == type(shader) then
+ shader_id = shader
+ elseif "table" == type(shader) then
+ shader_id = shader.shader_id
+ end
+
+ gl._deleteShader(shader_id)
+end
+
+--Bind Related
+function gl.bindTexture(target, texture)
+ local texture_id = 0
+ if "number" == type(texture) then
+ texture_id = texture
+ elseif "table" == type(texture) then
+ texture_id = texture.texture_id
+ end
+
+ gl._bindTexture(target,texture_id)
+end
+
+function gl.bindBuffer( target,buffer )
+ local buffer_id = 0
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindBuffer(target, buffer_id)
+end
+
+function gl.bindRenderBuffer(target, buffer)
+ local buffer_id = 0
+
+ if "number" == type(buffer) then
+ buffer_id = buffer;
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindRenderbuffer(target, buffer_id)
+end
+
+function gl.bindFramebuffer(target, buffer)
+ local buffer_id = 0
+
+ if "number" == type(buffer) then
+ buffer_id = buffer
+ elseif "table" == type(buffer) then
+ buffer_id = buffer.buffer_id
+ end
+
+ gl._bindFramebuffer(target, buffer_id)
+end
+
+--Uniform related
+function gl.getUniform(program, location)
+ local program_id = 0
+ local location_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ else
+ program_id = program.program_id
+ end
+
+ if "number" == type(location) then
+ location_id = location
+ else
+ location_id = location.location_id
+ end
+
+ return gl._getUniform(program_id, location_id)
+end
+
+--shader related
+function gl.compileShader(shader)
+ gl._compileShader( shader.shader_id)
+end
+
+function gl.shaderSource(shader, source)
+ gl._shaderSource(shader.shader_id, source)
+end
+
+function gl.getShaderParameter(shader, e)
+ return gl._getShaderParameter(shader.shader_id,e)
+end
+
+function gl.getShaderInfoLog( shader )
+ return gl._getShaderInfoLog(shader.shader_id)
+end
+
+--program related
+function gl.attachShader( program, shader )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._attachShader(program_id, shader.shader_id)
+end
+
+function gl.linkProgram( program )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._linkProgram(program_id)
+end
+
+function gl.getProgramParameter(program, e)
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getProgramParameter(program_id, e)
+end
+
+function gl.useProgram(program)
+ local program_id = 0
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ gl._useProgram (program_id)
+end
+
+function gl.getAttribLocation(program, name )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getAttribLocation(program_id, name)
+end
+
+function gl.getUniformLocation( program, name )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getUniformLocation(program_id,name)
+end
+
+function gl.getActiveAttrib( program, index )
+ local program_id = 0
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getActiveAttrib(program_id, index);
+end
+
+function gl.getActiveUniform( program, index )
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getActiveUniform(program_id, index)
+end
+
+function gl.getAttachedShaders(program)
+ local program_id = 0
+
+ if "number" == type(program) then
+ program_id = program
+ elseif "table" == type(program) then
+ program_id = program.program_id
+ end
+
+ return gl._getAttachedShaders(program_id)
+end
+
+function gl.glNodeCreate()
+ return cc.GLNode:create()
+end
diff --git a/src/cocos/cocos2d/OpenglConstants.lua b/src/cocos/cocos2d/OpenglConstants.lua
new file mode 100644
index 0000000..15adb23
--- /dev/null
+++ b/src/cocos/cocos2d/OpenglConstants.lua
@@ -0,0 +1,826 @@
+
+if not gl then return end
+
+gl.GCCSO_SHADER_BINARY_FJ = 0x9260
+gl._3DC_XY_AMD = 0x87fa
+gl._3DC_X_AMD = 0x87f9
+gl.ACTIVE_ATTRIBUTES = 0x8b89
+gl.ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8b8a
+gl.ACTIVE_PROGRAM_EXT = 0x8259
+gl.ACTIVE_TEXTURE = 0x84e0
+gl.ACTIVE_UNIFORMS = 0x8b86
+gl.ACTIVE_UNIFORM_MAX_LENGTH = 0x8b87
+gl.ALIASED_LINE_WIDTH_RANGE = 0x846e
+gl.ALIASED_POINT_SIZE_RANGE = 0x846d
+gl.ALL_COMPLETED_NV = 0x84f2
+gl.ALL_SHADER_BITS_EXT = 0xffffffff
+gl.ALPHA = 0x1906
+gl.ALPHA16F_EXT = 0x881c
+gl.ALPHA32F_EXT = 0x8816
+gl.ALPHA8_EXT = 0x803c
+gl.ALPHA8_OES = 0x803c
+gl.ALPHA_BITS = 0xd55
+gl.ALPHA_TEST_FUNC_QCOM = 0xbc1
+gl.ALPHA_TEST_QCOM = 0xbc0
+gl.ALPHA_TEST_REF_QCOM = 0xbc2
+gl.ALREADY_SIGNALED_APPLE = 0x911a
+gl.ALWAYS = 0x207
+gl.AMD_compressed_3DC_texture = 0x1
+gl.AMD_compressed_ATC_texture = 0x1
+gl.AMD_performance_monitor = 0x1
+gl.AMD_program_binary_Z400 = 0x1
+gl.ANGLE_depth_texture = 0x1
+gl.ANGLE_framebuffer_blit = 0x1
+gl.ANGLE_framebuffer_multisample = 0x1
+gl.ANGLE_instanced_arrays = 0x1
+gl.ANGLE_pack_reverse_row_order = 0x1
+gl.ANGLE_program_binary = 0x1
+gl.ANGLE_texture_compression_dxt3 = 0x1
+gl.ANGLE_texture_compression_dxt5 = 0x1
+gl.ANGLE_texture_usage = 0x1
+gl.ANGLE_translated_shader_source = 0x1
+gl.ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8d6a
+gl.ANY_SAMPLES_PASSED_EXT = 0x8c2f
+gl.APPLE_copy_texture_levels = 0x1
+gl.APPLE_framebuffer_multisample = 0x1
+gl.APPLE_rgb_422 = 0x1
+gl.APPLE_sync = 0x1
+gl.APPLE_texture_format_BGRA8888 = 0x1
+gl.APPLE_texture_max_level = 0x1
+gl.ARM_mali_program_binary = 0x1
+gl.ARM_mali_shader_binary = 0x1
+gl.ARM_rgba8 = 0x1
+gl.ARRAY_BUFFER = 0x8892
+gl.ARRAY_BUFFER_BINDING = 0x8894
+gl.ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8c93
+gl.ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87ee
+gl.ATC_RGB_AMD = 0x8c92
+gl.ATTACHED_SHADERS = 0x8b85
+gl.BACK = 0x405
+gl.BGRA8_EXT = 0x93a1
+gl.BGRA_EXT = 0x80e1
+gl.BGRA_IMG = 0x80e1
+gl.BINNING_CONTROL_HINT_QCOM = 0x8fb0
+gl.BLEND = 0xbe2
+gl.BLEND_COLOR = 0x8005
+gl.BLEND_DST_ALPHA = 0x80ca
+gl.BLEND_DST_RGB = 0x80c8
+gl.BLEND_EQUATION = 0x8009
+gl.BLEND_EQUATION_ALPHA = 0x883d
+gl.BLEND_EQUATION_RGB = 0x8009
+gl.BLEND_SRC_ALPHA = 0x80cb
+gl.BLEND_SRC_RGB = 0x80c9
+gl.BLUE_BITS = 0xd54
+gl.BOOL = 0x8b56
+gl.BOOL_VEC2 = 0x8b57
+gl.BOOL_VEC3 = 0x8b58
+gl.BOOL_VEC4 = 0x8b59
+gl.BUFFER = 0x82e0
+gl.BUFFER_ACCESS_OES = 0x88bb
+gl.BUFFER_MAPPED_OES = 0x88bc
+gl.BUFFER_MAP_POINTER_OES = 0x88bd
+gl.BUFFER_OBJECT_EXT = 0x9151
+gl.BUFFER_SIZE = 0x8764
+gl.BUFFER_USAGE = 0x8765
+gl.BYTE = 0x1400
+gl.CCW = 0x901
+gl.CLAMP_TO_BORDER_NV = 0x812d
+gl.CLAMP_TO_EDGE = 0x812f
+gl.COLOR_ATTACHMENT0 = 0x8ce0
+gl.COLOR_ATTACHMENT0_NV = 0x8ce0
+gl.COLOR_ATTACHMENT10_NV = 0x8cea
+gl.COLOR_ATTACHMENT11_NV = 0x8ceb
+gl.COLOR_ATTACHMENT12_NV = 0x8cec
+gl.COLOR_ATTACHMENT13_NV = 0x8ced
+gl.COLOR_ATTACHMENT14_NV = 0x8cee
+gl.COLOR_ATTACHMENT15_NV = 0x8cef
+gl.COLOR_ATTACHMENT1_NV = 0x8ce1
+gl.COLOR_ATTACHMENT2_NV = 0x8ce2
+gl.COLOR_ATTACHMENT3_NV = 0x8ce3
+gl.COLOR_ATTACHMENT4_NV = 0x8ce4
+gl.COLOR_ATTACHMENT5_NV = 0x8ce5
+gl.COLOR_ATTACHMENT6_NV = 0x8ce6
+gl.COLOR_ATTACHMENT7_NV = 0x8ce7
+gl.COLOR_ATTACHMENT8_NV = 0x8ce8
+gl.COLOR_ATTACHMENT9_NV = 0x8ce9
+gl.COLOR_ATTACHMENT_EXT = 0x90f0
+gl.COLOR_BUFFER_BIT = 0x4000
+gl.COLOR_BUFFER_BIT0_QCOM = 0x1
+gl.COLOR_BUFFER_BIT1_QCOM = 0x2
+gl.COLOR_BUFFER_BIT2_QCOM = 0x4
+gl.COLOR_BUFFER_BIT3_QCOM = 0x8
+gl.COLOR_BUFFER_BIT4_QCOM = 0x10
+gl.COLOR_BUFFER_BIT5_QCOM = 0x20
+gl.COLOR_BUFFER_BIT6_QCOM = 0x40
+gl.COLOR_BUFFER_BIT7_QCOM = 0x80
+gl.COLOR_CLEAR_VALUE = 0xc22
+gl.COLOR_EXT = 0x1800
+gl.COLOR_WRITEMASK = 0xc23
+gl.COMPARE_REF_TO_TEXTURE_EXT = 0x884e
+gl.COMPILE_STATUS = 0x8b81
+gl.COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93bb
+gl.COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93b8
+gl.COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93b9
+gl.COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93ba
+gl.COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93bc
+gl.COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93bd
+gl.COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93b0
+gl.COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93b1
+gl.COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93b2
+gl.COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93b3
+gl.COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93b4
+gl.COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93b5
+gl.COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93b6
+gl.COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93b7
+gl.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8c03
+gl.COMPRESSED_RGBA_PVRTC_2BPPV2_IMG = 0x9137
+gl.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8c02
+gl.COMPRESSED_RGBA_PVRTC_4BPPV2_IMG = 0x9138
+gl.COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1
+gl.COMPRESSED_RGBA_S3TC_DXT3_ANGLE = 0x83f2
+gl.COMPRESSED_RGBA_S3TC_DXT5_ANGLE = 0x83f3
+gl.COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8c01
+gl.COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8c00
+gl.COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93db
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93d8
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93d9
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93da
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93dc
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93dd
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93d0
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93d1
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93d2
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93d3
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93d4
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93d5
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93d6
+gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93d7
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8c4d
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV = 0x8c4e
+gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV = 0x8c4f
+gl.COMPRESSED_SRGB_S3TC_DXT1_NV = 0x8c4c
+gl.COMPRESSED_TEXTURE_FORMATS = 0x86a3
+gl.CONDITION_SATISFIED_APPLE = 0x911c
+gl.CONSTANT_ALPHA = 0x8003
+gl.CONSTANT_COLOR = 0x8001
+gl.CONTEXT_FLAG_DEBUG_BIT = 0x2
+gl.CONTEXT_ROBUST_ACCESS_EXT = 0x90f3
+gl.COUNTER_RANGE_AMD = 0x8bc1
+gl.COUNTER_TYPE_AMD = 0x8bc0
+gl.COVERAGE_ALL_FRAGMENTS_NV = 0x8ed5
+gl.COVERAGE_ATTACHMENT_NV = 0x8ed2
+gl.COVERAGE_AUTOMATIC_NV = 0x8ed7
+gl.COVERAGE_BUFFERS_NV = 0x8ed3
+gl.COVERAGE_BUFFER_BIT_NV = 0x8000
+gl.COVERAGE_COMPONENT4_NV = 0x8ed1
+gl.COVERAGE_COMPONENT_NV = 0x8ed0
+gl.COVERAGE_EDGE_FRAGMENTS_NV = 0x8ed6
+gl.COVERAGE_SAMPLES_NV = 0x8ed4
+gl.CPU_OPTIMIZED_QCOM = 0x8fb1
+gl.CULL_FACE = 0xb44
+gl.CULL_FACE_MODE = 0xb45
+gl.CURRENT_PROGRAM = 0x8b8d
+gl.CURRENT_QUERY_EXT = 0x8865
+gl.CURRENT_VERTEX_ATTRIB = 0x8626
+gl.CW = 0x900
+gl.DEBUG_CALLBACK_FUNCTION = 0x8244
+gl.DEBUG_CALLBACK_USER_PARAM = 0x8245
+gl.DEBUG_GROUP_STACK_DEPTH = 0x826d
+gl.DEBUG_LOGGED_MESSAGES = 0x9145
+gl.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243
+gl.DEBUG_OUTPUT = 0x92e0
+gl.DEBUG_OUTPUT_SYNCHRONOUS = 0x8242
+gl.DEBUG_SEVERITY_HIGH = 0x9146
+gl.DEBUG_SEVERITY_LOW = 0x9148
+gl.DEBUG_SEVERITY_MEDIUM = 0x9147
+gl.DEBUG_SEVERITY_NOTIFICATION = 0x826b
+gl.DEBUG_SOURCE_API = 0x8246
+gl.DEBUG_SOURCE_APPLICATION = 0x824a
+gl.DEBUG_SOURCE_OTHER = 0x824b
+gl.DEBUG_SOURCE_SHADER_COMPILER = 0x8248
+gl.DEBUG_SOURCE_THIRD_PARTY = 0x8249
+gl.DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247
+gl.DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824d
+gl.DEBUG_TYPE_ERROR = 0x824c
+gl.DEBUG_TYPE_MARKER = 0x8268
+gl.DEBUG_TYPE_OTHER = 0x8251
+gl.DEBUG_TYPE_PERFORMANCE = 0x8250
+gl.DEBUG_TYPE_POP_GROUP = 0x826a
+gl.DEBUG_TYPE_PORTABILITY = 0x824f
+gl.DEBUG_TYPE_PUSH_GROUP = 0x8269
+gl.DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824e
+gl.DECR = 0x1e03
+gl.DECR_WRAP = 0x8508
+gl.DELETE_STATUS = 0x8b80
+gl.DEPTH24_STENCIL8_OES = 0x88f0
+gl.DEPTH_ATTACHMENT = 0x8d00
+gl.DEPTH_BITS = 0xd56
+gl.DEPTH_BUFFER_BIT = 0x100
+gl.DEPTH_BUFFER_BIT0_QCOM = 0x100
+gl.DEPTH_BUFFER_BIT1_QCOM = 0x200
+gl.DEPTH_BUFFER_BIT2_QCOM = 0x400
+gl.DEPTH_BUFFER_BIT3_QCOM = 0x800
+gl.DEPTH_BUFFER_BIT4_QCOM = 0x1000
+gl.DEPTH_BUFFER_BIT5_QCOM = 0x2000
+gl.DEPTH_BUFFER_BIT6_QCOM = 0x4000
+gl.DEPTH_BUFFER_BIT7_QCOM = 0x8000
+gl.DEPTH_CLEAR_VALUE = 0xb73
+gl.DEPTH_COMPONENT = 0x1902
+gl.DEPTH_COMPONENT16 = 0x81a5
+gl.DEPTH_COMPONENT16_NONLINEAR_NV = 0x8e2c
+gl.DEPTH_COMPONENT16_OES = 0x81a5
+gl.DEPTH_COMPONENT24_OES = 0x81a6
+gl.DEPTH_COMPONENT32_OES = 0x81a7
+gl.DEPTH_EXT = 0x1801
+gl.DEPTH_FUNC = 0xb74
+gl.DEPTH_RANGE = 0xb70
+gl.DEPTH_STENCIL_OES = 0x84f9
+gl.DEPTH_TEST = 0xb71
+gl.DEPTH_WRITEMASK = 0xb72
+gl.DITHER = 0xbd0
+gl.DMP_shader_binary = 0x1
+gl.DONT_CARE = 0x1100
+gl.DRAW_BUFFER0_NV = 0x8825
+gl.DRAW_BUFFER10_NV = 0x882f
+gl.DRAW_BUFFER11_NV = 0x8830
+gl.DRAW_BUFFER12_NV = 0x8831
+gl.DRAW_BUFFER13_NV = 0x8832
+gl.DRAW_BUFFER14_NV = 0x8833
+gl.DRAW_BUFFER15_NV = 0x8834
+gl.DRAW_BUFFER1_NV = 0x8826
+gl.DRAW_BUFFER2_NV = 0x8827
+gl.DRAW_BUFFER3_NV = 0x8828
+gl.DRAW_BUFFER4_NV = 0x8829
+gl.DRAW_BUFFER5_NV = 0x882a
+gl.DRAW_BUFFER6_NV = 0x882b
+gl.DRAW_BUFFER7_NV = 0x882c
+gl.DRAW_BUFFER8_NV = 0x882d
+gl.DRAW_BUFFER9_NV = 0x882e
+gl.DRAW_BUFFER_EXT = 0xc01
+gl.DRAW_FRAMEBUFFER_ANGLE = 0x8ca9
+gl.DRAW_FRAMEBUFFER_APPLE = 0x8ca9
+gl.DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8ca6
+gl.DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8ca6
+gl.DRAW_FRAMEBUFFER_BINDING_NV = 0x8ca6
+gl.DRAW_FRAMEBUFFER_NV = 0x8ca9
+gl.DST_ALPHA = 0x304
+gl.DST_COLOR = 0x306
+gl.DYNAMIC_DRAW = 0x88e8
+gl.ELEMENT_ARRAY_BUFFER = 0x8893
+gl.ELEMENT_ARRAY_BUFFER_BINDING = 0x8895
+gl.EQUAL = 0x202
+gl.ES_VERSION_2_0 = 0x1
+gl.ETC1_RGB8_OES = 0x8d64
+gl.ETC1_SRGB8_NV = 0x88ee
+gl.EXTENSIONS = 0x1f03
+gl.EXT_blend_minmax = 0x1
+gl.EXT_color_buffer_half_float = 0x1
+gl.EXT_debug_label = 0x1
+gl.EXT_debug_marker = 0x1
+gl.EXT_discard_framebuffer = 0x1
+gl.EXT_map_buffer_range = 0x1
+gl.EXT_multi_draw_arrays = 0x1
+gl.EXT_multisampled_render_to_texture = 0x1
+gl.EXT_multiview_draw_buffers = 0x1
+gl.EXT_occlusion_query_boolean = 0x1
+gl.EXT_read_format_bgra = 0x1
+gl.EXT_robustness = 0x1
+gl.EXT_sRGB = 0x1
+gl.EXT_separate_shader_objects = 0x1
+gl.EXT_shader_framebuffer_fetch = 0x1
+gl.EXT_shader_texture_lod = 0x1
+gl.EXT_shadow_samplers = 0x1
+gl.EXT_texture_compression_dxt1 = 0x1
+gl.EXT_texture_filter_anisotropic = 0x1
+gl.EXT_texture_format_BGRA8888 = 0x1
+gl.EXT_texture_rg = 0x1
+gl.EXT_texture_storage = 0x1
+gl.EXT_texture_type_2_10_10_10_REV = 0x1
+gl.EXT_unpack_subimage = 0x1
+gl.FALSE = 0x0
+gl.FASTEST = 0x1101
+gl.FENCE_CONDITION_NV = 0x84f4
+gl.FENCE_STATUS_NV = 0x84f3
+gl.FIXED = 0x140c
+gl.FJ_shader_binary_GCCSO = 0x1
+gl.FLOAT = 0x1406
+gl.FLOAT_MAT2 = 0x8b5a
+gl.FLOAT_MAT3 = 0x8b5b
+gl.FLOAT_MAT4 = 0x8b5c
+gl.FLOAT_VEC2 = 0x8b50
+gl.FLOAT_VEC3 = 0x8b51
+gl.FLOAT_VEC4 = 0x8b52
+gl.FRAGMENT_SHADER = 0x8b30
+gl.FRAGMENT_SHADER_BIT_EXT = 0x2
+gl.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8b8b
+gl.FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8a52
+gl.FRAMEBUFFER = 0x8d40
+gl.FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93a3
+gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210
+gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211
+gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8cd1
+gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8cd0
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8cd4
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8cd3
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8cd2
+gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8d6c
+gl.FRAMEBUFFER_BINDING = 0x8ca6
+gl.FRAMEBUFFER_COMPLETE = 0x8cd5
+gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8cd6
+gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8cd9
+gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8cd7
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8d56
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134
+gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV = 0x8d56
+gl.FRAMEBUFFER_UNDEFINED_OES = 0x8219
+gl.FRAMEBUFFER_UNSUPPORTED = 0x8cdd
+gl.FRONT = 0x404
+gl.FRONT_AND_BACK = 0x408
+gl.FRONT_FACE = 0xb46
+gl.FUNC_ADD = 0x8006
+gl.FUNC_REVERSE_SUBTRACT = 0x800b
+gl.FUNC_SUBTRACT = 0x800a
+gl.GENERATE_MIPMAP_HINT = 0x8192
+gl.GEQUAL = 0x206
+gl.GPU_OPTIMIZED_QCOM = 0x8fb2
+gl.GREATER = 0x204
+gl.GREEN_BITS = 0xd53
+gl.GUILTY_CONTEXT_RESET_EXT = 0x8253
+gl.HALF_FLOAT_OES = 0x8d61
+gl.HIGH_FLOAT = 0x8df2
+gl.HIGH_INT = 0x8df5
+gl.IMG_multisampled_render_to_texture = 0x1
+gl.IMG_program_binary = 0x1
+gl.IMG_read_format = 0x1
+gl.IMG_shader_binary = 0x1
+gl.IMG_texture_compression_pvrtc = 0x1
+gl.IMG_texture_compression_pvrtc2 = 0x1
+gl.IMPLEMENTATION_COLOR_READ_FORMAT = 0x8b9b
+gl.IMPLEMENTATION_COLOR_READ_TYPE = 0x8b9a
+gl.INCR = 0x1e02
+gl.INCR_WRAP = 0x8507
+gl.INFO_LOG_LENGTH = 0x8b84
+gl.INNOCENT_CONTEXT_RESET_EXT = 0x8254
+gl.INT = 0x1404
+gl.INT_10_10_10_2_OES = 0x8df7
+gl.INT_VEC2 = 0x8b53
+gl.INT_VEC3 = 0x8b54
+gl.INT_VEC4 = 0x8b55
+gl.INVALID_ENUM = 0x500
+gl.INVALID_FRAMEBUFFER_OPERATION = 0x506
+gl.INVALID_OPERATION = 0x502
+gl.INVALID_VALUE = 0x501
+gl.INVERT = 0x150a
+gl.KEEP = 0x1e00
+gl.KHR_debug = 0x1
+gl.KHR_texture_compression_astc_ldr = 0x1
+gl.LEQUAL = 0x203
+gl.LESS = 0x201
+gl.LINEAR = 0x2601
+gl.LINEAR_MIPMAP_LINEAR = 0x2703
+gl.LINEAR_MIPMAP_NEAREST = 0x2701
+gl.LINES = 0x1
+gl.LINE_LOOP = 0x2
+gl.LINE_STRIP = 0x3
+gl.LINE_WIDTH = 0xb21
+gl.LINK_STATUS = 0x8b82
+gl.LOSE_CONTEXT_ON_RESET_EXT = 0x8252
+gl.LOW_FLOAT = 0x8df0
+gl.LOW_INT = 0x8df3
+gl.LUMINANCE = 0x1909
+gl.LUMINANCE16F_EXT = 0x881e
+gl.LUMINANCE32F_EXT = 0x8818
+gl.LUMINANCE4_ALPHA4_OES = 0x8043
+gl.LUMINANCE8_ALPHA8_EXT = 0x8045
+gl.LUMINANCE8_ALPHA8_OES = 0x8045
+gl.LUMINANCE8_EXT = 0x8040
+gl.LUMINANCE8_OES = 0x8040
+gl.LUMINANCE_ALPHA = 0x190a
+gl.LUMINANCE_ALPHA16F_EXT = 0x881f
+gl.LUMINANCE_ALPHA32F_EXT = 0x8819
+gl.MALI_PROGRAM_BINARY_ARM = 0x8f61
+gl.MALI_SHADER_BINARY_ARM = 0x8f60
+gl.MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10
+gl.MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8
+gl.MAP_INVALIDATE_RANGE_BIT_EXT = 0x4
+gl.MAP_READ_BIT_EXT = 0x1
+gl.MAP_UNSYNCHRONIZED_BIT_EXT = 0x20
+gl.MAP_WRITE_BIT_EXT = 0x2
+gl.MAX_3D_TEXTURE_SIZE_OES = 0x8073
+gl.MAX_COLOR_ATTACHMENTS_NV = 0x8cdf
+gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8b4d
+gl.MAX_CUBE_MAP_TEXTURE_SIZE = 0x851c
+gl.MAX_DEBUG_GROUP_STACK_DEPTH = 0x826c
+gl.MAX_DEBUG_LOGGED_MESSAGES = 0x9144
+gl.MAX_DEBUG_MESSAGE_LENGTH = 0x9143
+gl.MAX_DRAW_BUFFERS_NV = 0x8824
+gl.MAX_EXT = 0x8008
+gl.MAX_FRAGMENT_UNIFORM_VECTORS = 0x8dfd
+gl.MAX_LABEL_LENGTH = 0x82e8
+gl.MAX_MULTIVIEW_BUFFERS_EXT = 0x90f2
+gl.MAX_RENDERBUFFER_SIZE = 0x84e8
+gl.MAX_SAMPLES_ANGLE = 0x8d57
+gl.MAX_SAMPLES_APPLE = 0x8d57
+gl.MAX_SAMPLES_EXT = 0x8d57
+gl.MAX_SAMPLES_IMG = 0x9135
+gl.MAX_SAMPLES_NV = 0x8d57
+gl.MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111
+gl.MAX_TEXTURE_IMAGE_UNITS = 0x8872
+gl.MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff
+gl.MAX_TEXTURE_SIZE = 0xd33
+gl.MAX_VARYING_VECTORS = 0x8dfc
+gl.MAX_VERTEX_ATTRIBS = 0x8869
+gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8b4c
+gl.MAX_VERTEX_UNIFORM_VECTORS = 0x8dfb
+gl.MAX_VIEWPORT_DIMS = 0xd3a
+gl.MEDIUM_FLOAT = 0x8df1
+gl.MEDIUM_INT = 0x8df4
+gl.MIN_EXT = 0x8007
+gl.MIRRORED_REPEAT = 0x8370
+gl.MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000
+gl.MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000
+gl.MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000
+gl.MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000
+gl.MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000
+gl.MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000
+gl.MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000
+gl.MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000
+gl.MULTIVIEW_EXT = 0x90f1
+gl.NEAREST = 0x2600
+gl.NEAREST_MIPMAP_LINEAR = 0x2702
+gl.NEAREST_MIPMAP_NEAREST = 0x2700
+gl.NEVER = 0x200
+gl.NICEST = 0x1102
+gl.NONE = 0x0
+gl.NOTEQUAL = 0x205
+gl.NO_ERROR = 0x0
+gl.NO_RESET_NOTIFICATION_EXT = 0x8261
+gl.NUM_COMPRESSED_TEXTURE_FORMATS = 0x86a2
+gl.NUM_PROGRAM_BINARY_FORMATS_OES = 0x87fe
+gl.NUM_SHADER_BINARY_FORMATS = 0x8df9
+gl.NV_coverage_sample = 0x1
+gl.NV_depth_nonlinear = 0x1
+gl.NV_draw_buffers = 0x1
+gl.NV_draw_instanced = 0x1
+gl.NV_fbo_color_attachments = 0x1
+gl.NV_fence = 0x1
+gl.NV_framebuffer_blit = 0x1
+gl.NV_framebuffer_multisample = 0x1
+gl.NV_generate_mipmap_sRGB = 0x1
+gl.NV_instanced_arrays = 0x1
+gl.NV_read_buffer = 0x1
+gl.NV_read_buffer_front = 0x1
+gl.NV_read_depth = 0x1
+gl.NV_read_depth_stencil = 0x1
+gl.NV_read_stencil = 0x1
+gl.NV_sRGB_formats = 0x1
+gl.NV_shadow_samplers_array = 0x1
+gl.NV_shadow_samplers_cube = 0x1
+gl.NV_texture_border_clamp = 0x1
+gl.NV_texture_compression_s3tc_update = 0x1
+gl.NV_texture_npot_2D_mipmap = 0x1
+gl.OBJECT_TYPE_APPLE = 0x9112
+gl.OES_EGL_image = 0x1
+gl.OES_EGL_image_external = 0x1
+gl.OES_compressed_ETC1_RGB8_texture = 0x1
+gl.OES_compressed_paletted_texture = 0x1
+gl.OES_depth24 = 0x1
+gl.OES_depth32 = 0x1
+gl.OES_depth_texture = 0x1
+gl.OES_element_index_uint = 0x1
+gl.OES_fbo_render_mipmap = 0x1
+gl.OES_fragment_precision_high = 0x1
+gl.OES_get_program_binary = 0x1
+gl.OES_mapbuffer = 0x1
+gl.OES_packed_depth_stencil = 0x1
+gl.OES_required_internalformat = 0x1
+gl.OES_rgb8_rgba8 = 0x1
+gl.OES_standard_derivatives = 0x1
+gl.OES_stencil1 = 0x1
+gl.OES_stencil4 = 0x1
+gl.OES_surfaceless_context = 0x1
+gl.OES_texture_3D = 0x1
+gl.OES_texture_float = 0x1
+gl.OES_texture_float_linear = 0x1
+gl.OES_texture_half_float = 0x1
+gl.OES_texture_half_float_linear = 0x1
+gl.OES_texture_npot = 0x1
+gl.OES_vertex_array_object = 0x1
+gl.OES_vertex_half_float = 0x1
+gl.OES_vertex_type_10_10_10_2 = 0x1
+gl.ONE = 0x1
+gl.ONE_MINUS_CONSTANT_ALPHA = 0x8004
+gl.ONE_MINUS_CONSTANT_COLOR = 0x8002
+gl.ONE_MINUS_DST_ALPHA = 0x305
+gl.ONE_MINUS_DST_COLOR = 0x307
+gl.ONE_MINUS_SRC_ALPHA = 0x303
+gl.ONE_MINUS_SRC_COLOR = 0x301
+gl.OUT_OF_MEMORY = 0x505
+gl.PACK_ALIGNMENT = 0xd05
+gl.PACK_REVERSE_ROW_ORDER_ANGLE = 0x93a4
+gl.PALETTE4_R5_G6_B5_OES = 0x8b92
+gl.PALETTE4_RGB5_A1_OES = 0x8b94
+gl.PALETTE4_RGB8_OES = 0x8b90
+gl.PALETTE4_RGBA4_OES = 0x8b93
+gl.PALETTE4_RGBA8_OES = 0x8b91
+gl.PALETTE8_R5_G6_B5_OES = 0x8b97
+gl.PALETTE8_RGB5_A1_OES = 0x8b99
+gl.PALETTE8_RGB8_OES = 0x8b95
+gl.PALETTE8_RGBA4_OES = 0x8b98
+gl.PALETTE8_RGBA8_OES = 0x8b96
+gl.PERCENTAGE_AMD = 0x8bc3
+gl.PERFMON_GLOBAL_MODE_QCOM = 0x8fa0
+gl.PERFMON_RESULT_AMD = 0x8bc6
+gl.PERFMON_RESULT_AVAILABLE_AMD = 0x8bc4
+gl.PERFMON_RESULT_SIZE_AMD = 0x8bc5
+gl.POINTS = 0x0
+gl.POLYGON_OFFSET_FACTOR = 0x8038
+gl.POLYGON_OFFSET_FILL = 0x8037
+gl.POLYGON_OFFSET_UNITS = 0x2a00
+gl.PROGRAM = 0x82e2
+gl.PROGRAM_BINARY_ANGLE = 0x93a6
+gl.PROGRAM_BINARY_FORMATS_OES = 0x87ff
+gl.PROGRAM_BINARY_LENGTH_OES = 0x8741
+gl.PROGRAM_OBJECT_EXT = 0x8b40
+gl.PROGRAM_PIPELINE_BINDING_EXT = 0x825a
+gl.PROGRAM_PIPELINE_OBJECT_EXT = 0x8a4f
+gl.PROGRAM_SEPARABLE_EXT = 0x8258
+gl.QCOM_alpha_test = 0x1
+gl.QCOM_binning_control = 0x1
+gl.QCOM_driver_control = 0x1
+gl.QCOM_extended_get = 0x1
+gl.QCOM_extended_get2 = 0x1
+gl.QCOM_perfmon_global_mode = 0x1
+gl.QCOM_tiled_rendering = 0x1
+gl.QCOM_writeonly_rendering = 0x1
+gl.QUERY = 0x82e3
+gl.QUERY_OBJECT_EXT = 0x9153
+gl.QUERY_RESULT_AVAILABLE_EXT = 0x8867
+gl.QUERY_RESULT_EXT = 0x8866
+gl.R16F_EXT = 0x822d
+gl.R32F_EXT = 0x822e
+gl.R8_EXT = 0x8229
+gl.READ_BUFFER_EXT = 0xc02
+gl.READ_BUFFER_NV = 0xc02
+gl.READ_FRAMEBUFFER_ANGLE = 0x8ca8
+gl.READ_FRAMEBUFFER_APPLE = 0x8ca8
+gl.READ_FRAMEBUFFER_BINDING_ANGLE = 0x8caa
+gl.READ_FRAMEBUFFER_BINDING_APPLE = 0x8caa
+gl.READ_FRAMEBUFFER_BINDING_NV = 0x8caa
+gl.READ_FRAMEBUFFER_NV = 0x8ca8
+gl.RED_BITS = 0xd52
+gl.RED_EXT = 0x1903
+gl.RENDERBUFFER = 0x8d41
+gl.RENDERBUFFER_ALPHA_SIZE = 0x8d53
+gl.RENDERBUFFER_BINDING = 0x8ca7
+gl.RENDERBUFFER_BLUE_SIZE = 0x8d52
+gl.RENDERBUFFER_DEPTH_SIZE = 0x8d54
+gl.RENDERBUFFER_GREEN_SIZE = 0x8d51
+gl.RENDERBUFFER_HEIGHT = 0x8d43
+gl.RENDERBUFFER_INTERNAL_FORMAT = 0x8d44
+gl.RENDERBUFFER_RED_SIZE = 0x8d50
+gl.RENDERBUFFER_SAMPLES_ANGLE = 0x8cab
+gl.RENDERBUFFER_SAMPLES_APPLE = 0x8cab
+gl.RENDERBUFFER_SAMPLES_EXT = 0x8cab
+gl.RENDERBUFFER_SAMPLES_IMG = 0x9133
+gl.RENDERBUFFER_SAMPLES_NV = 0x8cab
+gl.RENDERBUFFER_STENCIL_SIZE = 0x8d55
+gl.RENDERBUFFER_WIDTH = 0x8d42
+gl.RENDERER = 0x1f01
+gl.RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8fb3
+gl.REPEAT = 0x2901
+gl.REPLACE = 0x1e01
+gl.REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8d68
+gl.RESET_NOTIFICATION_STRATEGY_EXT = 0x8256
+gl.RG16F_EXT = 0x822f
+gl.RG32F_EXT = 0x8230
+gl.RG8_EXT = 0x822b
+gl.RGB = 0x1907
+gl.RGB10_A2_EXT = 0x8059
+gl.RGB10_EXT = 0x8052
+gl.RGB16F_EXT = 0x881b
+gl.RGB32F_EXT = 0x8815
+gl.RGB565 = 0x8d62
+gl.RGB565_OES = 0x8d62
+gl.RGB5_A1 = 0x8057
+gl.RGB5_A1_OES = 0x8057
+gl.RGB8_OES = 0x8051
+gl.RGBA = 0x1908
+gl.RGBA16F_EXT = 0x881a
+gl.RGBA32F_EXT = 0x8814
+gl.RGBA4 = 0x8056
+gl.RGBA4_OES = 0x8056
+gl.RGBA8_OES = 0x8058
+gl.RGB_422_APPLE = 0x8a1f
+gl.RG_EXT = 0x8227
+gl.SAMPLER = 0x82e6
+gl.SAMPLER_2D = 0x8b5e
+gl.SAMPLER_2D_ARRAY_SHADOW_NV = 0x8dc4
+gl.SAMPLER_2D_SHADOW_EXT = 0x8b62
+gl.SAMPLER_3D_OES = 0x8b5f
+gl.SAMPLER_CUBE = 0x8b60
+gl.SAMPLER_CUBE_SHADOW_NV = 0x8dc5
+gl.SAMPLER_EXTERNAL_OES = 0x8d66
+gl.SAMPLES = 0x80a9
+gl.SAMPLE_ALPHA_TO_COVERAGE = 0x809e
+gl.SAMPLE_BUFFERS = 0x80a8
+gl.SAMPLE_COVERAGE = 0x80a0
+gl.SAMPLE_COVERAGE_INVERT = 0x80ab
+gl.SAMPLE_COVERAGE_VALUE = 0x80aa
+gl.SCISSOR_BOX = 0xc10
+gl.SCISSOR_TEST = 0xc11
+gl.SGX_BINARY_IMG = 0x8c0a
+gl.SGX_PROGRAM_BINARY_IMG = 0x9130
+gl.SHADER = 0x82e1
+gl.SHADER_BINARY_DMP = 0x9250
+gl.SHADER_BINARY_FORMATS = 0x8df8
+gl.SHADER_BINARY_VIV = 0x8fc4
+gl.SHADER_COMPILER = 0x8dfa
+gl.SHADER_OBJECT_EXT = 0x8b48
+gl.SHADER_SOURCE_LENGTH = 0x8b88
+gl.SHADER_TYPE = 0x8b4f
+gl.SHADING_LANGUAGE_VERSION = 0x8b8c
+gl.SHORT = 0x1402
+gl.SIGNALED_APPLE = 0x9119
+gl.SLUMINANCE8_ALPHA8_NV = 0x8c45
+gl.SLUMINANCE8_NV = 0x8c47
+gl.SLUMINANCE_ALPHA_NV = 0x8c44
+gl.SLUMINANCE_NV = 0x8c46
+gl.SRC_ALPHA = 0x302
+gl.SRC_ALPHA_SATURATE = 0x308
+gl.SRC_COLOR = 0x300
+gl.SRGB8_ALPHA8_EXT = 0x8c43
+gl.SRGB8_NV = 0x8c41
+gl.SRGB_ALPHA_EXT = 0x8c42
+gl.SRGB_EXT = 0x8c40
+gl.STACK_OVERFLOW = 0x503
+gl.STACK_UNDERFLOW = 0x504
+gl.STATE_RESTORE = 0x8bdc
+gl.STATIC_DRAW = 0x88e4
+gl.STENCIL_ATTACHMENT = 0x8d20
+gl.STENCIL_BACK_FAIL = 0x8801
+gl.STENCIL_BACK_FUNC = 0x8800
+gl.STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802
+gl.STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
+gl.STENCIL_BACK_REF = 0x8ca3
+gl.STENCIL_BACK_VALUE_MASK = 0x8ca4
+gl.STENCIL_BACK_WRITEMASK = 0x8ca5
+gl.STENCIL_BITS = 0xd57
+gl.STENCIL_BUFFER_BIT = 0x400
+gl.STENCIL_BUFFER_BIT0_QCOM = 0x10000
+gl.STENCIL_BUFFER_BIT1_QCOM = 0x20000
+gl.STENCIL_BUFFER_BIT2_QCOM = 0x40000
+gl.STENCIL_BUFFER_BIT3_QCOM = 0x80000
+gl.STENCIL_BUFFER_BIT4_QCOM = 0x100000
+gl.STENCIL_BUFFER_BIT5_QCOM = 0x200000
+gl.STENCIL_BUFFER_BIT6_QCOM = 0x400000
+gl.STENCIL_BUFFER_BIT7_QCOM = 0x800000
+gl.STENCIL_CLEAR_VALUE = 0xb91
+gl.STENCIL_EXT = 0x1802
+gl.STENCIL_FAIL = 0xb94
+gl.STENCIL_FUNC = 0xb92
+gl.STENCIL_INDEX1_OES = 0x8d46
+gl.STENCIL_INDEX4_OES = 0x8d47
+gl.STENCIL_INDEX8 = 0x8d48
+gl.STENCIL_PASS_DEPTH_FAIL = 0xb95
+gl.STENCIL_PASS_DEPTH_PASS = 0xb96
+gl.STENCIL_REF = 0xb97
+gl.STENCIL_TEST = 0xb90
+gl.STENCIL_VALUE_MASK = 0xb93
+gl.STENCIL_WRITEMASK = 0xb98
+gl.STREAM_DRAW = 0x88e0
+gl.SUBPIXEL_BITS = 0xd50
+gl.SYNC_CONDITION_APPLE = 0x9113
+gl.SYNC_FENCE_APPLE = 0x9116
+gl.SYNC_FLAGS_APPLE = 0x9115
+gl.SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1
+gl.SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117
+gl.SYNC_OBJECT_APPLE = 0x8a53
+gl.SYNC_STATUS_APPLE = 0x9114
+gl.TEXTURE = 0x1702
+gl.TEXTURE0 = 0x84c0
+gl.TEXTURE1 = 0x84c1
+gl.TEXTURE10 = 0x84ca
+gl.TEXTURE11 = 0x84cb
+gl.TEXTURE12 = 0x84cc
+gl.TEXTURE13 = 0x84cd
+gl.TEXTURE14 = 0x84ce
+gl.TEXTURE15 = 0x84cf
+gl.TEXTURE16 = 0x84d0
+gl.TEXTURE17 = 0x84d1
+gl.TEXTURE18 = 0x84d2
+gl.TEXTURE19 = 0x84d3
+gl.TEXTURE2 = 0x84c2
+gl.TEXTURE20 = 0x84d4
+gl.TEXTURE21 = 0x84d5
+gl.TEXTURE22 = 0x84d6
+gl.TEXTURE23 = 0x84d7
+gl.TEXTURE24 = 0x84d8
+gl.TEXTURE25 = 0x84d9
+gl.TEXTURE26 = 0x84da
+gl.TEXTURE27 = 0x84db
+gl.TEXTURE28 = 0x84dc
+gl.TEXTURE29 = 0x84dd
+gl.TEXTURE3 = 0x84c3
+gl.TEXTURE30 = 0x84de
+gl.TEXTURE31 = 0x84df
+gl.TEXTURE4 = 0x84c4
+gl.TEXTURE5 = 0x84c5
+gl.TEXTURE6 = 0x84c6
+gl.TEXTURE7 = 0x84c7
+gl.TEXTURE8 = 0x84c8
+gl.TEXTURE9 = 0x84c9
+gl.TEXTURE_2D = 0xde1
+gl.TEXTURE_3D_OES = 0x806f
+gl.TEXTURE_BINDING_2D = 0x8069
+gl.TEXTURE_BINDING_3D_OES = 0x806a
+gl.TEXTURE_BINDING_CUBE_MAP = 0x8514
+gl.TEXTURE_BINDING_EXTERNAL_OES = 0x8d67
+gl.TEXTURE_BORDER_COLOR_NV = 0x1004
+gl.TEXTURE_COMPARE_FUNC_EXT = 0x884d
+gl.TEXTURE_COMPARE_MODE_EXT = 0x884c
+gl.TEXTURE_CUBE_MAP = 0x8513
+gl.TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516
+gl.TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518
+gl.TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851a
+gl.TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515
+gl.TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517
+gl.TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519
+gl.TEXTURE_DEPTH_QCOM = 0x8bd4
+gl.TEXTURE_EXTERNAL_OES = 0x8d65
+gl.TEXTURE_FORMAT_QCOM = 0x8bd6
+gl.TEXTURE_HEIGHT_QCOM = 0x8bd3
+gl.TEXTURE_IMAGE_VALID_QCOM = 0x8bd8
+gl.TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912f
+gl.TEXTURE_INTERNAL_FORMAT_QCOM = 0x8bd5
+gl.TEXTURE_MAG_FILTER = 0x2800
+gl.TEXTURE_MAX_ANISOTROPY_EXT = 0x84fe
+gl.TEXTURE_MAX_LEVEL_APPLE = 0x813d
+gl.TEXTURE_MIN_FILTER = 0x2801
+gl.TEXTURE_NUM_LEVELS_QCOM = 0x8bd9
+gl.TEXTURE_OBJECT_VALID_QCOM = 0x8bdb
+gl.TEXTURE_SAMPLES_IMG = 0x9136
+gl.TEXTURE_TARGET_QCOM = 0x8bda
+gl.TEXTURE_TYPE_QCOM = 0x8bd7
+gl.TEXTURE_USAGE_ANGLE = 0x93a2
+gl.TEXTURE_WIDTH_QCOM = 0x8bd2
+gl.TEXTURE_WRAP_R_OES = 0x8072
+gl.TEXTURE_WRAP_S = 0x2802
+gl.TEXTURE_WRAP_T = 0x2803
+gl.TIMEOUT_EXPIRED_APPLE = 0x911b
+gl.TIMEOUT_IGNORED_APPLE = 0xffffffffffffffff
+gl.TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93a0
+gl.TRIANGLES = 0x4
+gl.TRIANGLE_FAN = 0x6
+gl.TRIANGLE_STRIP = 0x5
+gl.TRUE = 0x1
+gl.UNKNOWN_CONTEXT_RESET_EXT = 0x8255
+gl.UNPACK_ALIGNMENT = 0xcf5
+gl.UNPACK_ROW_LENGTH = 0xcf2
+gl.UNPACK_SKIP_PIXELS = 0xcf4
+gl.UNPACK_SKIP_ROWS = 0xcf3
+gl.UNSIGNALED_APPLE = 0x9118
+gl.UNSIGNED_BYTE = 0x1401
+gl.UNSIGNED_INT = 0x1405
+gl.UNSIGNED_INT64_AMD = 0x8bc2
+gl.UNSIGNED_INT_10_10_10_2_OES = 0x8df6
+gl.UNSIGNED_INT_24_8_OES = 0x84fa
+gl.UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368
+gl.UNSIGNED_NORMALIZED_EXT = 0x8c17
+gl.UNSIGNED_SHORT = 0x1403
+gl.UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366
+gl.UNSIGNED_SHORT_4_4_4_4 = 0x8033
+gl.UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365
+gl.UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365
+gl.UNSIGNED_SHORT_5_5_5_1 = 0x8034
+gl.UNSIGNED_SHORT_5_6_5 = 0x8363
+gl.UNSIGNED_SHORT_8_8_APPLE = 0x85ba
+gl.UNSIGNED_SHORT_8_8_REV_APPLE = 0x85bb
+gl.VALIDATE_STATUS = 0x8b83
+gl.VENDOR = 0x1f00
+gl.VERSION = 0x1f02
+gl.VERTEX_ARRAY_BINDING_OES = 0x85b5
+gl.VERTEX_ARRAY_OBJECT_EXT = 0x9154
+gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889f
+gl.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88fe
+gl.VERTEX_ATTRIB_ARRAY_DIVISOR_NV = 0x88fe
+gl.VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622
+gl.VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886a
+gl.VERTEX_ATTRIB_ARRAY_POINTER = 0x8645
+gl.VERTEX_ATTRIB_ARRAY_SIZE = 0x8623
+gl.VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624
+gl.VERTEX_ATTRIB_ARRAY_TYPE = 0x8625
+gl.VERTEX_SHADER = 0x8b31
+gl.VERTEX_SHADER_BIT_EXT = 0x1
+gl.VIEWPORT = 0xba2
+gl.VIV_shader_binary = 0x1
+gl.WAIT_FAILED_APPLE = 0x911d
+gl.WRITEONLY_RENDERING_QCOM = 0x8823
+gl.WRITE_ONLY_OES = 0x88b9
+gl.Z400_BINARY_AMD = 0x8740
+gl.ZERO = 0x0
+gl.VERTEX_ATTRIB_POINTER_VEC3 = 0
+gl.VERTEX_ATTRIB_POINTER_COLOR4B = 1
diff --git a/src/cocos/cocos2d/bitExtend.lua b/src/cocos/cocos2d/bitExtend.lua
new file mode 100644
index 0000000..fe024aa
--- /dev/null
+++ b/src/cocos/cocos2d/bitExtend.lua
@@ -0,0 +1,96 @@
+-- bit operation
+
+bit = bit or {}
+bit.data32 = {}
+
+for i=1,32 do
+ bit.data32[i]=2^(32-i)
+end
+
+function bit._b2d(arg)
+ local nr=0
+ for i=1,32 do
+ if arg[i] ==1 then
+ nr=nr+bit.data32[i]
+ end
+ end
+ return nr
+end
+
+function bit._d2b(arg)
+ arg = arg >= 0 and arg or (0xFFFFFFFF + arg + 1)
+ local tr={}
+ for i=1,32 do
+ if arg >= bit.data32[i] then
+ tr[i]=1
+ arg=arg-bit.data32[i]
+ else
+ tr[i]=0
+ end
+ end
+ return tr
+end
+
+function bit._and(a,b)
+ local op1=bit._d2b(a)
+ local op2=bit._d2b(b)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 and op2[i]==1 then
+ r[i]=1
+ else
+ r[i]=0
+ end
+ end
+ return bit._b2d(r)
+
+end
+
+function bit._rshift(a,n)
+ local op1=bit._d2b(a)
+ n = n <= 32 and n or 32
+ n = n >= 0 and n or 0
+
+ for i=32, n+1, -1 do
+ op1[i] = op1[i-n]
+ end
+ for i=1, n do
+ op1[i] = 0
+ end
+
+ return bit._b2d(op1)
+end
+
+function bit._not(a)
+ local op1=bit._d2b(a)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 then
+ r[i]=0
+ else
+ r[i]=1
+ end
+ end
+ return bit._b2d(r)
+end
+
+function bit._or(a,b)
+ local op1=bit._d2b(a)
+ local op2=bit._d2b(b)
+ local r={}
+
+ for i=1,32 do
+ if op1[i]==1 or op2[i]==1 then
+ r[i]=1
+ else
+ r[i]=0
+ end
+ end
+ return bit._b2d(r)
+end
+
+bit.band = bit.band or bit._and
+bit.rshift = bit.rshift or bit._rshift
+bit.bnot = bit.bnot or bit._not
diff --git a/src/cocos/cocos2d/deprecated.lua b/src/cocos/cocos2d/deprecated.lua
new file mode 100644
index 0000000..9c82fa8
--- /dev/null
+++ b/src/cocos/cocos2d/deprecated.lua
@@ -0,0 +1,15 @@
+
+function schedule(node, callback, delay)
+ local delay = cc.DelayTime:create(delay)
+ local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
+ local action = cc.RepeatForever:create(sequence)
+ node:runAction(action)
+ return action
+end
+
+function performWithDelay(node, callback, delay)
+ local delay = cc.DelayTime:create(delay)
+ local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback))
+ node:runAction(sequence)
+ return sequence
+end
diff --git a/src/cocos/cocos2d/functions.lua b/src/cocos/cocos2d/functions.lua
new file mode 100644
index 0000000..24a54f2
--- /dev/null
+++ b/src/cocos/cocos2d/functions.lua
@@ -0,0 +1,633 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+function printLog(tag, fmt, ...)
+ local t = {
+ "[",
+ string.upper(tostring(tag)),
+ "] ",
+ string.format(tostring(fmt), ...)
+ }
+ print(table.concat(t))
+end
+
+function printError(fmt, ...)
+ printLog("ERR", fmt, ...)
+ print(debug.traceback("", 2))
+end
+
+function printInfo(fmt, ...)
+ if type(DEBUG) ~= "number" or DEBUG < 2 then return end
+ printLog("INFO", fmt, ...)
+end
+
+local function dump_value_(v)
+ if type(v) == "string" then
+ v = "\"" .. v .. "\""
+ end
+ return tostring(v)
+end
+
+function dump(value, desciption, nesting)
+ if type(nesting) ~= "number" then nesting = 3 end
+
+ local lookupTable = {}
+ local result = {}
+
+ local traceback = string.split(debug.traceback("", 2), "\n")
+ print("dump from: " .. string.trim(traceback[3]))
+
+ local function dump_(value, desciption, indent, nest, keylen)
+ desciption = desciption or ""
+ local spc = ""
+ if type(keylen) == "number" then
+ spc = string.rep(" ", keylen - string.len(dump_value_(desciption)))
+ end
+ if type(value) ~= "table" then
+ result[#result +1 ] = string.format("%s%s%s = %s", indent, dump_value_(desciption), spc, dump_value_(value))
+ elseif lookupTable[tostring(value)] then
+ result[#result +1 ] = string.format("%s%s%s = *REF*", indent, dump_value_(desciption), spc)
+ else
+ lookupTable[tostring(value)] = true
+ if nest > nesting then
+ result[#result +1 ] = string.format("%s%s = *MAX NESTING*", indent, dump_value_(desciption))
+ else
+ result[#result +1 ] = string.format("%s%s = {", indent, dump_value_(desciption))
+ local indent2 = indent.." "
+ local keys = {}
+ local keylen = 0
+ local values = {}
+ for k, v in pairs(value) do
+ keys[#keys + 1] = k
+ local vk = dump_value_(k)
+ local vkl = string.len(vk)
+ if vkl > keylen then keylen = vkl end
+ values[k] = v
+ end
+ table.sort(keys, function(a, b)
+ if type(a) == "number" and type(b) == "number" then
+ return a < b
+ else
+ return tostring(a) < tostring(b)
+ end
+ end)
+ for i, k in ipairs(keys) do
+ dump_(values[k], k, indent2, nest + 1, keylen)
+ end
+ result[#result +1] = string.format("%s}", indent)
+ end
+ end
+ end
+ dump_(value, desciption, "- ", 1)
+
+ for i, line in ipairs(result) do
+ print(line)
+ end
+end
+
+function printf(fmt, ...)
+ print(string.format(tostring(fmt), ...))
+end
+
+function checknumber(value, base)
+ return tonumber(value, base) or 0
+end
+
+function checkint(value)
+ return math.round(checknumber(value))
+end
+
+function checkbool(value)
+ return (value ~= nil and value ~= false)
+end
+
+function checktable(value)
+ if type(value) ~= "table" then value = {} end
+ return value
+end
+
+function isset(hashtable, key)
+ local t = type(hashtable)
+ return (t == "table" or t == "userdata") and hashtable[key] ~= nil
+end
+
+local setmetatableindex_
+setmetatableindex_ = function(t, index)
+ if type(t) == "userdata" then
+ local peer = tolua.getpeer(t)
+ if not peer then
+ peer = {}
+ tolua.setpeer(t, peer)
+ end
+ setmetatableindex_(peer, index)
+ else
+ local mt = getmetatable(t)
+ if not mt then mt = {} end
+ if not mt.__index then
+ mt.__index = index
+ setmetatable(t, mt)
+ elseif mt.__index ~= index then
+ setmetatableindex_(mt, index)
+ end
+ end
+end
+setmetatableindex = setmetatableindex_
+
+function clone(object)
+ local lookup_table = {}
+ local function _copy(object)
+ if type(object) ~= "table" then
+ return object
+ elseif lookup_table[object] then
+ return lookup_table[object]
+ end
+ local newObject = {}
+ lookup_table[object] = newObject
+ for key, value in pairs(object) do
+ newObject[_copy(key)] = _copy(value)
+ end
+ return setmetatable(newObject, getmetatable(object))
+ end
+ return _copy(object)
+end
+
+function class(classname, ...)
+ local cls = {__cname = classname}
+
+ local supers = {...}
+ for _, super in ipairs(supers) do
+ local superType = type(super)
+ assert(superType == "nil" or superType == "table" or superType == "function",
+ string.format("class() - create class \"%s\" with invalid super class type \"%s\"",
+ classname, superType))
+
+ if superType == "function" then
+ assert(cls.__create == nil,
+ string.format("class() - create class \"%s\" with more than one creating function",
+ classname));
+ -- if super is function, set it to __create
+ cls.__create = super
+ elseif superType == "table" then
+ if super[".isclass"] then
+ -- super is native class
+ assert(cls.__create == nil,
+ string.format("class() - create class \"%s\" with more than one creating function or native class",
+ classname));
+ cls.__create = function() return super:create() end
+ else
+ -- super is pure lua class
+ cls.__supers = cls.__supers or {}
+ cls.__supers[#cls.__supers + 1] = super
+ if not cls.super then
+ -- set first super pure lua class as class.super
+ cls.super = super
+ end
+ end
+ else
+ error(string.format("class() - create class \"%s\" with invalid super type",
+ classname), 0)
+ end
+ end
+
+ cls.__index = cls
+ if not cls.__supers or #cls.__supers == 1 then
+ setmetatable(cls, {__index = cls.super})
+ else
+ setmetatable(cls, {__index = function(_, key)
+ local supers = cls.__supers
+ for i = 1, #supers do
+ local super = supers[i]
+ if super[key] then return super[key] end
+ end
+ end})
+ end
+
+ if not cls.ctor then
+ -- add default constructor
+ cls.ctor = function() end
+ end
+ cls.new = function(...)
+ local instance
+ if cls.__create then
+ instance = cls.__create(...)
+ else
+ instance = {}
+ end
+ setmetatableindex(instance, cls)
+ instance.class = cls
+ instance:ctor(...)
+ return instance
+ end
+ cls.create = function(_, ...)
+ return cls.new(...)
+ end
+
+ return cls
+end
+
+local iskindof_
+iskindof_ = function(cls, name)
+ local __index = rawget(cls, "__index")
+ if type(__index) == "table" and rawget(__index, "__cname") == name then return true end
+
+ if rawget(cls, "__cname") == name then return true end
+ local __supers = rawget(cls, "__supers")
+ if not __supers then return false end
+ for _, super in ipairs(__supers) do
+ if iskindof_(super, name) then return true end
+ end
+ return false
+end
+
+function iskindof(obj, classname)
+ local t = type(obj)
+ if t ~= "table" and t ~= "userdata" then return false end
+
+ local mt
+ if t == "userdata" then
+ if tolua.iskindof(obj, classname) then return true end
+ mt = tolua.getpeer(obj)
+ else
+ mt = getmetatable(obj)
+ end
+ if mt then
+ return iskindof_(mt, classname)
+ end
+ return false
+end
+
+function import(moduleName, currentModuleName)
+ local currentModuleNameParts
+ local moduleFullName = moduleName
+ local offset = 1
+
+ while true do
+ if string.byte(moduleName, offset) ~= 46 then -- .
+ moduleFullName = string.sub(moduleName, offset)
+ if currentModuleNameParts and #currentModuleNameParts > 0 then
+ moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName
+ end
+ break
+ end
+ offset = offset + 1
+
+ if not currentModuleNameParts then
+ if not currentModuleName then
+ local n,v = debug.getlocal(3, 1)
+ currentModuleName = v
+ end
+
+ currentModuleNameParts = string.split(currentModuleName, ".")
+ end
+ table.remove(currentModuleNameParts, #currentModuleNameParts)
+ end
+
+ return require(moduleFullName)
+end
+
+function handler(obj, method)
+ return function(...)
+ return method(obj, ...)
+ end
+end
+
+function math.newrandomseed()
+ local ok, socket = pcall(function()
+ return require("socket")
+ end)
+
+ if ok then
+ math.randomseed(socket.gettime() * 1000)
+ else
+ math.randomseed(os.time())
+ end
+ math.random()
+ math.random()
+ math.random()
+ math.random()
+end
+
+function math.round(value)
+ value = checknumber(value)
+ return math.floor(value + 0.5)
+end
+
+local pi_div_180 = math.pi / 180
+function math.angle2radian(angle)
+ return angle * pi_div_180
+end
+
+local pi_mul_180 = math.pi * 180
+function math.radian2angle(radian)
+ return radian / pi_mul_180
+end
+
+function io.exists(path)
+ local file = io.open(path, "r")
+ if file then
+ io.close(file)
+ return true
+ end
+ return false
+end
+
+function io.readfile(path)
+ local file = io.open(path, "r")
+ if file then
+ local content = file:read("*a")
+ io.close(file)
+ return content
+ end
+ return nil
+end
+
+function io.writefile(path, content, mode)
+ mode = mode or "w+b"
+ local file = io.open(path, mode)
+ if file then
+ if file:write(content) == nil then return false end
+ io.close(file)
+ return true
+ else
+ return false
+ end
+end
+
+function io.pathinfo(path)
+ local pos = string.len(path)
+ local extpos = pos + 1
+ while pos > 0 do
+ local b = string.byte(path, pos)
+ if b == 46 then -- 46 = char "."
+ extpos = pos
+ elseif b == 47 then -- 47 = char "/"
+ break
+ end
+ pos = pos - 1
+ end
+
+ local dirname = string.sub(path, 1, pos)
+ local filename = string.sub(path, pos + 1)
+ extpos = extpos - pos
+ local basename = string.sub(filename, 1, extpos - 1)
+ local extname = string.sub(filename, extpos)
+ return {
+ dirname = dirname,
+ filename = filename,
+ basename = basename,
+ extname = extname
+ }
+end
+
+function io.filesize(path)
+ local size = false
+ local file = io.open(path, "r")
+ if file then
+ local current = file:seek()
+ size = file:seek("end")
+ file:seek("set", current)
+ io.close(file)
+ end
+ return size
+end
+
+function table.nums(t)
+ local count = 0
+ for k, v in pairs(t) do
+ count = count + 1
+ end
+ return count
+end
+
+function table.keys(hashtable)
+ local keys = {}
+ for k, v in pairs(hashtable) do
+ keys[#keys + 1] = k
+ end
+ return keys
+end
+
+function table.values(hashtable)
+ local values = {}
+ for k, v in pairs(hashtable) do
+ values[#values + 1] = v
+ end
+ return values
+end
+
+function table.merge(dest, src)
+ for k, v in pairs(src) do
+ dest[k] = v
+ end
+end
+
+function table.insertto(dest, src, begin)
+ begin = checkint(begin)
+ if begin <= 0 then
+ begin = #dest + 1
+ end
+
+ local len = #src
+ for i = 0, len - 1 do
+ dest[i + begin] = src[i + 1]
+ end
+end
+
+function table.indexof(array, value, begin)
+ for i = begin or 1, #array do
+ if array[i] == value then return i end
+ end
+ return false
+end
+
+function table.keyof(hashtable, value)
+ for k, v in pairs(hashtable) do
+ if v == value then return k end
+ end
+ return nil
+end
+
+function table.removebyvalue(array, value, removeall)
+ local c, i, max = 0, 1, #array
+ while i <= max do
+ if array[i] == value then
+ table.remove(array, i)
+ c = c + 1
+ i = i - 1
+ max = max - 1
+ if not removeall then break end
+ end
+ i = i + 1
+ end
+ return c
+end
+
+function table.map(t, fn)
+ for k, v in pairs(t) do
+ t[k] = fn(v, k)
+ end
+end
+
+function table.walk(t, fn)
+ for k,v in pairs(t) do
+ fn(v, k)
+ end
+end
+
+function table.filter(t, fn)
+ for k, v in pairs(t) do
+ if not fn(v, k) then t[k] = nil end
+ end
+end
+
+function table.unique(t, bArray)
+ local check = {}
+ local n = {}
+ local idx = 1
+ for k, v in pairs(t) do
+ if not check[v] then
+ if bArray then
+ n[idx] = v
+ idx = idx + 1
+ else
+ n[k] = v
+ end
+ check[v] = true
+ end
+ end
+ return n
+end
+
+string._htmlspecialchars_set = {}
+string._htmlspecialchars_set["&"] = "&"
+string._htmlspecialchars_set["\""] = """
+string._htmlspecialchars_set["'"] = "'"
+string._htmlspecialchars_set["<"] = "<"
+string._htmlspecialchars_set[">"] = ">"
+
+function string.htmlspecialchars(input)
+ for k, v in pairs(string._htmlspecialchars_set) do
+ input = string.gsub(input, k, v)
+ end
+ return input
+end
+
+function string.restorehtmlspecialchars(input)
+ for k, v in pairs(string._htmlspecialchars_set) do
+ input = string.gsub(input, v, k)
+ end
+ return input
+end
+
+function string.nl2br(input)
+ return string.gsub(input, "\n", "
")
+end
+
+function string.text2html(input)
+ input = string.gsub(input, "\t", " ")
+ input = string.htmlspecialchars(input)
+ input = string.gsub(input, " ", " ")
+ input = string.nl2br(input)
+ return input
+end
+
+function string.split(input, delimiter)
+ input = tostring(input)
+ delimiter = tostring(delimiter)
+ if (delimiter=='') then return false end
+ local pos,arr = 0, {}
+ -- for each divider found
+ for st,sp in function() return string.find(input, delimiter, pos, true) end do
+ table.insert(arr, string.sub(input, pos, st - 1))
+ pos = sp + 1
+ end
+ table.insert(arr, string.sub(input, pos))
+ return arr
+end
+
+function string.ltrim(input)
+ return string.gsub(input, "^[ \t\n\r]+", "")
+end
+
+function string.rtrim(input)
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+
+function string.trim(input)
+ input = string.gsub(input, "^[ \t\n\r]+", "")
+ return string.gsub(input, "[ \t\n\r]+$", "")
+end
+
+function string.ucfirst(input)
+ return string.upper(string.sub(input, 1, 1)) .. string.sub(input, 2)
+end
+
+local function urlencodechar(char)
+ return "%" .. string.format("%02X", string.byte(char))
+end
+function string.urlencode(input)
+ -- convert line endings
+ input = string.gsub(tostring(input), "\n", "\r\n")
+ -- escape all characters but alphanumeric, '.' and '-'
+ input = string.gsub(input, "([^%w%.%- ])", urlencodechar)
+ -- convert spaces to "+" symbols
+ return string.gsub(input, " ", "+")
+end
+
+function string.urldecode(input)
+ input = string.gsub (input, "+", " ")
+ input = string.gsub (input, "%%(%x%x)", function(h) return string.char(checknumber(h,16)) end)
+ input = string.gsub (input, "\r\n", "\n")
+ return input
+end
+
+function string.utf8len(input)
+ local len = string.len(input)
+ local left = len
+ local cnt = 0
+ local arr = {0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc}
+ while left ~= 0 do
+ local tmp = string.byte(input, -left)
+ local i = #arr
+ while arr[i] do
+ if tmp >= arr[i] then
+ left = left - i
+ break
+ end
+ i = i - 1
+ end
+ cnt = cnt + 1
+ end
+ return cnt
+end
+
+function string.formatnumberthousands(num)
+ local formatted = tostring(checknumber(num))
+ local k
+ while true do
+ formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
+ if k == 0 then break end
+ end
+ return formatted
+end
diff --git a/src/cocos/cocos2d/json.lua b/src/cocos/cocos2d/json.lua
new file mode 100644
index 0000000..0192c34
--- /dev/null
+++ b/src/cocos/cocos2d/json.lua
@@ -0,0 +1,376 @@
+-----------------------------------------------------------------------------
+-- JSON4Lua: JSON encoding / decoding support for the Lua language.
+-- json Module.
+-- Author: Craig Mason-Jones
+-- Homepage: http://json.luaforge.net/
+-- Version: 0.9.40
+-- This module is released under the MIT License (MIT).
+-- Please see LICENCE.txt for details.
+--
+-- USAGE:
+-- This module exposes two functions:
+-- encode(o)
+-- Returns the table / string / boolean / number / nil / json.null value as a JSON-encoded string.
+-- decode(json_string)
+-- Returns a Lua object populated with the data encoded in the JSON string json_string.
+--
+-- REQUIREMENTS:
+-- compat-5.1 if using Lua 5.0
+--
+-- CHANGELOG
+-- 0.9.20 Introduction of local Lua functions for private functions (removed _ function prefix).
+-- Fixed Lua 5.1 compatibility issues.
+-- Introduced json.null to have null values in associative arrays.
+-- encode() performance improvement (more than 50%) through table.concat rather than ..
+-- Introduced decode ability to ignore /**/ comments in the JSON string.
+-- 0.9.10 Fix to array encoding / decoding to correctly manage nil/null values in arrays.
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Imports and dependencies
+-----------------------------------------------------------------------------
+local math = require('math')
+local string = require("string")
+local table = require("table")
+
+local base = _G
+
+-----------------------------------------------------------------------------
+-- Module declaration
+-----------------------------------------------------------------------------
+module("json")
+
+-- Public functions
+
+-- Private functions
+local decode_scanArray
+local decode_scanComment
+local decode_scanConstant
+local decode_scanNumber
+local decode_scanObject
+local decode_scanString
+local decode_scanWhitespace
+local encodeString
+local isArray
+local isEncodable
+
+-----------------------------------------------------------------------------
+-- PUBLIC FUNCTIONS
+-----------------------------------------------------------------------------
+--- Encodes an arbitrary Lua object / variable.
+-- @param v The Lua object / variable to be JSON encoded.
+-- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode)
+function encode (v)
+ -- Handle nil values
+ if v==nil then
+ return "null"
+ end
+
+ local vtype = base.type(v)
+
+ -- Handle strings
+ if vtype=='string' then
+ return '"' .. encodeString(v) .. '"' -- Need to handle encoding in string
+ end
+
+ -- Handle booleans
+ if vtype=='number' or vtype=='boolean' then
+ return base.tostring(v)
+ end
+
+ -- Handle tables
+ if vtype=='table' then
+ local rval = {}
+ -- Consider arrays separately
+ local bArray, maxCount = isArray(v)
+ if bArray then
+ for i = 1,maxCount do
+ table.insert(rval, encode(v[i]))
+ end
+ else -- An object, not an array
+ for i,j in base.pairs(v) do
+ if isEncodable(i) and isEncodable(j) then
+ table.insert(rval, '"' .. encodeString(i) .. '":' .. encode(j))
+ end
+ end
+ end
+ if bArray then
+ return '[' .. table.concat(rval,',') ..']'
+ else
+ return '{' .. table.concat(rval,',') .. '}'
+ end
+ end
+
+ -- Handle null values
+ if vtype=='function' and v==null then
+ return 'null'
+ end
+
+ base.assert(false,'encode attempt to encode unsupported type ' .. vtype .. ':' .. base.tostring(v))
+end
+
+
+--- Decodes a JSON string and returns the decoded value as a Lua data structure / value.
+-- @param s The string to scan.
+-- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1.
+-- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil,
+-- and the position of the first character after
+-- the scanned JSON object.
+function decode(s, startPos)
+ startPos = startPos and startPos or 1
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=string.len(s), 'Unterminated JSON encoded object found at position in [' .. s .. ']')
+ local curChar = string.sub(s,startPos,startPos)
+ -- Object
+ if curChar=='{' then
+ return decode_scanObject(s,startPos)
+ end
+ -- Array
+ if curChar=='[' then
+ return decode_scanArray(s,startPos)
+ end
+ -- Number
+ if string.find("+-0123456789.e", curChar, 1, true) then
+ return decode_scanNumber(s,startPos)
+ end
+ -- String
+ if curChar==[["]] or curChar==[[']] then
+ return decode_scanString(s,startPos)
+ end
+ if string.sub(s,startPos,startPos+1)=='/*' then
+ return decode(s, decode_scanComment(s,startPos))
+ end
+ -- Otherwise, it must be a constant
+ return decode_scanConstant(s,startPos)
+end
+
+--- The null function allows one to specify a null value in an associative array (which is otherwise
+-- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null }
+function null()
+ return null -- so json.null() will also return null ;-)
+end
+-----------------------------------------------------------------------------
+-- Internal, PRIVATE functions.
+-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
+-- functions with an underscore.
+-----------------------------------------------------------------------------
+
+--- Scans an array from JSON into a Lua object
+-- startPos begins at the start of the array.
+-- Returns the array and the next starting position
+-- @param s The string being scanned.
+-- @param startPos The starting position for the scan.
+-- @return table, int The scanned array as a table, and the position of the next character to scan.
+function decode_scanArray(s,startPos)
+ local array = {} -- The return value
+ local stringLen = string.len(s)
+ base.assert(string.sub(s,startPos,startPos)=='[','decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n'..s )
+ startPos = startPos + 1
+ -- Infinite loop for array elements
+ repeat
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen,'JSON String ended unexpectedly scanning array.')
+ local curChar = string.sub(s,startPos,startPos)
+ if (curChar==']') then
+ return array, startPos+1
+ end
+ if (curChar==',') then
+ startPos = decode_scanWhitespace(s,startPos+1)
+ end
+ base.assert(startPos<=stringLen, 'JSON String ended unexpectedly scanning array.')
+ object, startPos = decode(s,startPos)
+ table.insert(array,object)
+ until false
+end
+
+--- Scans a comment and discards the comment.
+-- Returns the position of the next character following the comment.
+-- @param string s The JSON string to scan.
+-- @param int startPos The starting position of the comment
+function decode_scanComment(s, startPos)
+ base.assert( string.sub(s,startPos,startPos+1)=='/*', "decode_scanComment called but comment does not start at position " .. startPos)
+ local endPos = string.find(s,'*/',startPos+2)
+ base.assert(endPos~=nil, "Unterminated comment in string at " .. startPos)
+ return endPos+2
+end
+
+--- Scans for given constants: true, false or null
+-- Returns the appropriate Lua type, and the position of the next character to read.
+-- @param s The string being scanned.
+-- @param startPos The position in the string at which to start scanning.
+-- @return object, int The object (true, false or nil) and the position at which the next character should be
+-- scanned.
+function decode_scanConstant(s, startPos)
+ local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
+ local constNames = {"true","false","null"}
+
+ for i,k in base.pairs(constNames) do
+ --print ("[" .. string.sub(s,startPos, startPos + string.len(k) -1) .."]", k)
+ if string.sub(s,startPos, startPos + string.len(k) -1 )==k then
+ return consts[k], startPos + string.len(k)
+ end
+ end
+ base.assert(nil, 'Failed to scan constant from string ' .. s .. ' at starting position ' .. startPos)
+end
+
+--- Scans a number from the JSON encoded string.
+-- (in fact, also is able to scan numeric +- eqns, which is not
+-- in the JSON spec.)
+-- Returns the number, and the position of the next character
+-- after the number.
+-- @param s The string being scanned.
+-- @param startPos The position at which to start scanning.
+-- @return number, int The extracted number and the position of the next character to scan.
+function decode_scanNumber(s,startPos)
+ local endPos = startPos+1
+ local stringLen = string.len(s)
+ local acceptableChars = "+-0123456789.e"
+ while (string.find(acceptableChars, string.sub(s,endPos,endPos), 1, true)
+ and endPos<=stringLen
+ ) do
+ endPos = endPos + 1
+ end
+ local stringValue = 'return ' .. string.sub(s,startPos, endPos-1)
+ local stringEval = base.loadstring(stringValue)
+ base.assert(stringEval, 'Failed to scan number [ ' .. stringValue .. '] in JSON string at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+end
+
+--- Scans a JSON object into a Lua object.
+-- startPos begins at the start of the object.
+-- Returns the object and the next starting position.
+-- @param s The string being scanned.
+-- @param startPos The starting position of the scan.
+-- @return table, int The scanned object as a table and the position of the next character to scan.
+function decode_scanObject(s,startPos)
+ local object = {}
+ local stringLen = string.len(s)
+ local key, value
+ base.assert(string.sub(s,startPos,startPos)=='{','decode_scanObject called but object does not start at position ' .. startPos .. ' in string:\n' .. s)
+ startPos = startPos + 1
+ repeat
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly while scanning object.')
+ local curChar = string.sub(s,startPos,startPos)
+ if (curChar=='}') then
+ return object,startPos+1
+ end
+ if (curChar==',') then
+ startPos = decode_scanWhitespace(s,startPos+1)
+ end
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly scanning object.')
+ -- Scan the key
+ key, startPos = decode(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ startPos = decode_scanWhitespace(s,startPos)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ base.assert(string.sub(s,startPos,startPos)==':','JSON object key-value assignment mal-formed at ' .. startPos)
+ startPos = decode_scanWhitespace(s,startPos+1)
+ base.assert(startPos<=stringLen, 'JSON string ended unexpectedly searching for value of key ' .. key)
+ value, startPos = decode(s,startPos)
+ object[key]=value
+ until false -- infinite loop while key-value pairs are found
+end
+
+--- Scans a JSON string from the opening inverted comma or single quote to the
+-- end of the string.
+-- Returns the string extracted as a Lua string,
+-- and the position of the next non-string character
+-- (after the closing inverted comma or single quote).
+-- @param s The string being scanned.
+-- @param startPos The starting position of the scan.
+-- @return string, int The extracted string as a Lua string, and the next character to parse.
+function decode_scanString(s,startPos)
+ base.assert(startPos, 'decode_scanString(..) called without start position')
+ local startChar = string.sub(s,startPos,startPos)
+ base.assert(startChar==[[']] or startChar==[["]],'decode_scanString called for a non-string')
+ local escaped = false
+ local endPos = startPos + 1
+ local bEnded = false
+ local stringLen = string.len(s)
+ repeat
+ local curChar = string.sub(s,endPos,endPos)
+ if not escaped then
+ if curChar==[[\]] then
+ escaped = true
+ else
+ bEnded = curChar==startChar
+ end
+ else
+ -- If we're escaped, we accept the current character come what may
+ escaped = false
+ end
+ endPos = endPos + 1
+ base.assert(endPos <= stringLen+1, "String decoding failed: unterminated string at position " .. endPos)
+ until bEnded
+ local stringValue = 'return ' .. string.sub(s, startPos, endPos-1)
+ local stringEval = base.loadstring(stringValue)
+ base.assert(stringEval, 'Failed to load string [ ' .. stringValue .. '] in JSON4Lua.decode_scanString at position ' .. startPos .. ' : ' .. endPos)
+ return stringEval(), endPos
+end
+
+--- Scans a JSON string skipping all whitespace from the current start position.
+-- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached.
+-- @param s The string being scanned
+-- @param startPos The starting position where we should begin removing whitespace.
+-- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string
+-- was reached.
+function decode_scanWhitespace(s,startPos)
+ local whitespace=" \n\r\t"
+ local stringLen = string.len(s)
+ while ( string.find(whitespace, string.sub(s,startPos,startPos), 1, true) and startPos <= stringLen) do
+ startPos = startPos + 1
+ end
+ return startPos
+end
+
+--- Encodes a string to be JSON-compatible.
+-- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-)
+-- @param s The string to return as a JSON encoded (i.e. backquoted string)
+-- @return The string appropriately escaped.
+function encodeString(s)
+ s = string.gsub(s,'\\','\\\\')
+ s = string.gsub(s,'"','\\"')
+ s = string.gsub(s,"'","\\'")
+ s = string.gsub(s,'\n','\\n')
+ s = string.gsub(s,'\t','\\t')
+ return s
+end
+
+-- Determines whether the given Lua type is an array or a table / dictionary.
+-- We consider any table an array if it has indexes 1..n for its n items, and no
+-- other data in the table.
+-- I think this method is currently a little 'flaky', but can't think of a good way around it yet...
+-- @param t The table to evaluate as an array
+-- @return boolean, number True if the table can be represented as an array, false otherwise. If true,
+-- the second returned value is the maximum
+-- number of indexed elements in the array.
+function isArray(t)
+ -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable
+ -- (with the possible exception of 'n')
+ local maxIndex = 0
+ for k,v in base.pairs(t) do
+ if (base.type(k)=='number' and math.floor(k)==k and 1<=k) then -- k,v is an indexed pair
+ if (not isEncodable(v)) then return false end -- All array elements must be encodable
+ maxIndex = math.max(maxIndex,k)
+ else
+ if (k=='n') then
+ if v ~= table.getn(t) then return false end -- False if n does not hold the number of elements
+ else -- Else of (k=='n')
+ if isEncodable(v) then return false end
+ end -- End of (k~='n')
+ end -- End of k,v not an indexed pair
+ end -- End of loop across all pairs
+ return true, maxIndex
+end
+
+--- Determines whether the given Lua object / table / variable can be JSON encoded. The only
+-- types that are JSON encodable are: string, boolean, number, nil, table and json.null.
+-- In this implementation, all other types are ignored.
+-- @param o The object to examine.
+-- @return boolean True if the object should be JSON encoded, false if it should be ignored.
+function isEncodable(o)
+ local t = base.type(o)
+ return (t=='string' or t=='boolean' or t=='number' or t=='nil' or t=='table') or (t=='function' and o==null)
+end
+
diff --git a/src/cocos/cocos2d/luaj.lua b/src/cocos/cocos2d/luaj.lua
new file mode 100644
index 0000000..8ec45a3
--- /dev/null
+++ b/src/cocos/cocos2d/luaj.lua
@@ -0,0 +1,34 @@
+
+local luaj = {}
+
+local callJavaStaticMethod = LuaJavaBridge.callStaticMethod
+
+local function checkArguments(args, sig)
+ if type(args) ~= "table" then args = {} end
+ if sig then return args, sig end
+
+ sig = {"("}
+ for i, v in ipairs(args) do
+ local t = type(v)
+ if t == "number" then
+ sig[#sig + 1] = "F"
+ elseif t == "boolean" then
+ sig[#sig + 1] = "Z"
+ elseif t == "function" then
+ sig[#sig + 1] = "I"
+ else
+ sig[#sig + 1] = "Ljava/lang/String;"
+ end
+ end
+ sig[#sig + 1] = ")V"
+
+ return args, table.concat(sig)
+end
+
+function luaj.callStaticMethod(className, methodName, args, sig)
+ local args, sig = checkArguments(args, sig)
+ --echoInfo("luaj.callStaticMethod(\"%s\",\n\t\"%s\",\n\targs,\n\t\"%s\"", className, methodName, sig)
+ return callJavaStaticMethod(className, methodName, args, sig)
+end
+
+return luaj
diff --git a/src/cocos/cocos2d/luaoc.lua b/src/cocos/cocos2d/luaoc.lua
new file mode 100644
index 0000000..ff6d157
--- /dev/null
+++ b/src/cocos/cocos2d/luaoc.lua
@@ -0,0 +1,28 @@
+
+local luaoc = {}
+
+local callStaticMethod = LuaObjcBridge.callStaticMethod
+
+function luaoc.callStaticMethod(className, methodName, args)
+ local ok, ret = callStaticMethod(className, methodName, args)
+ if not ok then
+ local msg = string.format("luaoc.callStaticMethod(\"%s\", \"%s\", \"%s\") - error: [%s] ",
+ className, methodName, tostring(args), tostring(ret))
+ if ret == -1 then
+ print(msg .. "INVALID PARAMETERS")
+ elseif ret == -2 then
+ print(msg .. "CLASS NOT FOUND")
+ elseif ret == -3 then
+ print(msg .. "METHOD NOT FOUND")
+ elseif ret == -4 then
+ print(msg .. "EXCEPTION OCCURRED")
+ elseif ret == -5 then
+ print(msg .. "INVALID METHOD SIGNATURE")
+ else
+ print(msg .. "UNKNOWN")
+ end
+ end
+ return ok, ret
+end
+
+return luaoc
diff --git a/src/cocos/cocosbuilder/CCBReaderLoad.lua b/src/cocos/cocosbuilder/CCBReaderLoad.lua
new file mode 100644
index 0000000..30ee404
--- /dev/null
+++ b/src/cocos/cocosbuilder/CCBReaderLoad.lua
@@ -0,0 +1,125 @@
+if nil == cc.CCBReader then
+ return
+end
+
+ccb = ccb or {}
+
+function CCBReaderLoad(strFilePath,proxy,owner)
+ if nil == proxy then
+ return nil
+ end
+
+ local ccbReader = proxy:createCCBReader()
+ local node = ccbReader:load(strFilePath)
+ local rootName = ""
+ --owner set in readCCBFromFile is proxy
+ if nil ~= owner then
+ --Callbacks
+ local ownerCallbackNames = ccbReader:getOwnerCallbackNames()
+ local ownerCallbackNodes = ccbReader:getOwnerCallbackNodes()
+ local ownerCallbackControlEvents = ccbReader:getOwnerCallbackControlEvents()
+ local i = 1
+ for i = 1,table.getn(ownerCallbackNames) do
+ local callbackName = ownerCallbackNames[i]
+ local callbackNode = tolua.cast(ownerCallbackNodes[i],"cc.Node")
+
+ if "function" == type(owner[callbackName]) then
+ proxy:setCallback(callbackNode, owner[callbackName], ownerCallbackControlEvents[i])
+ else
+ print("Warning: Cannot find owner's lua function:" .. ":" .. callbackName .. " for ownerVar selector")
+ end
+
+ end
+
+ --Variables
+ local ownerOutletNames = ccbReader:getOwnerOutletNames()
+ local ownerOutletNodes = ccbReader:getOwnerOutletNodes()
+
+ for i = 1, table.getn(ownerOutletNames) do
+ local outletName = ownerOutletNames[i]
+ local outletNode = tolua.cast(ownerOutletNodes[i],"cc.Node")
+ owner[outletName] = outletNode
+ end
+ end
+
+ local nodesWithAnimationManagers = ccbReader:getNodesWithAnimationManagers()
+ local animationManagersForNodes = ccbReader:getAnimationManagersForNodes()
+
+ for i = 1 , table.getn(nodesWithAnimationManagers) do
+ local innerNode = tolua.cast(nodesWithAnimationManagers[i], "cc.Node")
+ local animationManager = tolua.cast(animationManagersForNodes[i], "cc.CCBAnimationManager")
+ local documentControllerName = animationManager:getDocumentControllerName()
+ if "" == documentControllerName then
+
+ end
+ if nil ~= ccb[documentControllerName] then
+ ccb[documentControllerName]["mAnimationManager"] = animationManager
+ end
+
+ --Callbacks
+ local documentCallbackNames = animationManager:getDocumentCallbackNames()
+ local documentCallbackNodes = animationManager:getDocumentCallbackNodes()
+ local documentCallbackControlEvents = animationManager:getDocumentCallbackControlEvents()
+
+ for i = 1,table.getn(documentCallbackNames) do
+ local callbackName = documentCallbackNames[i]
+ local callbackNode = tolua.cast(documentCallbackNodes[i],"cc.Node")
+ if "" ~= documentControllerName and nil ~= ccb[documentControllerName] then
+ if "function" == type(ccb[documentControllerName][callbackName]) then
+ proxy:setCallback(callbackNode, ccb[documentControllerName][callbackName], documentCallbackControlEvents[i])
+ else
+ print("Warning: Cannot found lua function [" .. documentControllerName .. ":" .. callbackName .. "] for docRoot selector")
+ end
+ end
+ end
+
+ --Variables
+ local documentOutletNames = animationManager:getDocumentOutletNames()
+ local documentOutletNodes = animationManager:getDocumentOutletNodes()
+
+ for i = 1, table.getn(documentOutletNames) do
+ local outletName = documentOutletNames[i]
+ local outletNode = tolua.cast(documentOutletNodes[i],"cc.Node")
+
+ if nil ~= ccb[documentControllerName] then
+ ccb[documentControllerName][outletName] = tolua.cast(outletNode, proxy:getNodeTypeName(outletNode))
+ end
+ end
+ --[[
+ if (typeof(controller.onDidLoadFromCCB) == "function")
+ controller.onDidLoadFromCCB();
+ ]]--
+ --Setup timeline callbacks
+ local keyframeCallbacks = animationManager:getKeyframeCallbacks()
+
+ for i = 1 , table.getn(keyframeCallbacks) do
+ local callbackCombine = keyframeCallbacks[i]
+ local beignIndex,endIndex = string.find(callbackCombine,":")
+ local callbackType = tonumber(string.sub(callbackCombine,1,beignIndex - 1))
+ local callbackName = string.sub(callbackCombine,endIndex + 1, -1)
+ --Document callback
+
+ if 1 == callbackType and nil ~= ccb[documentControllerName] then
+ local callfunc = cc.CallFunc:create(ccb[documentControllerName][callbackName])
+ animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine);
+ elseif 2 == callbackType and nil ~= owner then --Owner callback
+ local callfunc = cc.CallFunc:create(owner[callbackName])--need check
+ animationManager:setCallFuncForLuaCallbackNamed(callfunc, callbackCombine)
+ end
+ end
+ --start animation
+ local autoPlaySeqId = animationManager:getAutoPlaySequenceId()
+ if -1 ~= autoPlaySeqId then
+ animationManager:runAnimationsForSequenceIdTweenDuration(autoPlaySeqId, 0)
+ end
+ end
+
+ return node
+end
+
+
+local function CCBuilderReaderLoad(strFilePath,proxy,owner)
+ print("\n********** \n".."CCBuilderReaderLoad(strFilePath,proxy,owner)".." was deprecated please use ".. "CCBReaderLoad(strFilePath,proxy,owner)" .. " instead.\n**********")
+ return CCBReaderLoad(strFilePath,proxy,owner)
+end
+rawset(_G,"CCBuilderReaderLoad",CCBuilderReaderLoad)
\ No newline at end of file
diff --git a/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua b/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua
new file mode 100644
index 0000000..aaa6654
--- /dev/null
+++ b/src/cocos/cocosbuilder/DeprecatedCocosBuilderClass.lua
@@ -0,0 +1,35 @@
+if nil == cc.CCBProxy then
+ return
+end
+-- This is the DeprecatedCocosBuilderClass
+
+DeprecatedCocosBuilderClass = {} or DeprecatedCocosBuilderClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCBReader class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBReader()
+ deprecatedTip("CCBReader","cc.BReader")
+ return cc.BReader
+end
+_G["CCBReader"] = DeprecatedCocosBuilderClass.CCBReader()
+--CCBReader class will be Deprecated,end
+
+--CCBAnimationManager class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBAnimationManager()
+ deprecatedTip("CCBAnimationManager","cc.BAnimationManager")
+ return cc.BAnimationManager
+end
+_G["CCBAnimationManager"] = DeprecatedCocosBuilderClass.CCBAnimationManager()
+--CCBAnimationManager class will be Deprecated,end
+
+--CCBProxy class will be Deprecated,begin
+function DeprecatedCocosBuilderClass.CCBProxy()
+ deprecatedTip("CCBProxy","cc.CCBProxy")
+ return cc.CCBProxy
+end
+_G["CCBProxy"] = DeprecatedCocosBuilderClass.CCBProxy()
+--CCBProxy class will be Deprecated,end
diff --git a/src/cocos/cocosdenshion/AudioEngine.lua b/src/cocos/cocosdenshion/AudioEngine.lua
new file mode 100644
index 0000000..deea904
--- /dev/null
+++ b/src/cocos/cocosdenshion/AudioEngine.lua
@@ -0,0 +1,111 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+--Encapsulate SimpleAudioEngine to AudioEngine,Play music and sound effects.
+local M = {}
+
+function M.stopAllEffects()
+ cc.SimpleAudioEngine:getInstance():stopAllEffects()
+end
+
+function M.getMusicVolume()
+ return cc.SimpleAudioEngine:getInstance():getMusicVolume()
+end
+
+function M.isMusicPlaying()
+ return cc.SimpleAudioEngine:getInstance():isMusicPlaying()
+end
+
+function M.getEffectsVolume()
+ return cc.SimpleAudioEngine:getInstance():getEffectsVolume()
+end
+
+function M.setMusicVolume(volume)
+ cc.SimpleAudioEngine:getInstance():setMusicVolume(volume)
+end
+
+function M.stopEffect(handle)
+ cc.SimpleAudioEngine:getInstance():stopEffect(handle)
+end
+
+function M.stopMusic(isReleaseData)
+ local releaseDataValue = false
+ if nil ~= isReleaseData then
+ releaseDataValue = isReleaseData
+ end
+ cc.SimpleAudioEngine:getInstance():stopMusic(releaseDataValue)
+end
+
+function M.playMusic(filename, isLoop)
+ local loopValue = false
+ if nil ~= isLoop then
+ loopValue = isLoop
+ end
+ cc.SimpleAudioEngine:getInstance():playMusic(filename, loopValue)
+end
+
+function M.pauseAllEffects()
+ cc.SimpleAudioEngine:getInstance():pauseAllEffects()
+end
+
+function M.preloadMusic(filename)
+ cc.SimpleAudioEngine:getInstance():preloadMusic(filename)
+end
+
+function M.resumeMusic()
+ cc.SimpleAudioEngine:getInstance():resumeMusic()
+end
+
+function M.playEffect(filename, isLoop)
+ local loopValue = false
+ if nil ~= isLoop then
+ loopValue = isLoop
+ end
+ return cc.SimpleAudioEngine:getInstance():playEffect(filename, loopValue)
+end
+
+function M.rewindMusic()
+ cc.SimpleAudioEngine:getInstance():rewindMusic()
+end
+
+function M.willPlayMusic()
+ return cc.SimpleAudioEngine:getInstance():willPlayMusic()
+end
+
+function M.unloadEffect(filename)
+ cc.SimpleAudioEngine:getInstance():unloadEffect(filename)
+end
+
+function M.preloadEffect(filename)
+ cc.SimpleAudioEngine:getInstance():preloadEffect(filename)
+end
+
+function M.setEffectsVolume(volume)
+ cc.SimpleAudioEngine:getInstance():setEffectsVolume(volume)
+end
+
+function M.pauseEffect(handle)
+ cc.SimpleAudioEngine:getInstance():pauseEffect(handle)
+end
+
+function M.resumeAllEffects(handle)
+ cc.SimpleAudioEngine:getInstance():resumeAllEffects()
+end
+
+function M.pauseMusic()
+ cc.SimpleAudioEngine:getInstance():pauseMusic()
+end
+
+function M.resumeEffect(handle)
+ cc.SimpleAudioEngine:getInstance():resumeEffect(handle)
+end
+
+function M.getInstance()
+ return cc.SimpleAudioEngine:getInstance()
+end
+
+function M.destroyInstance()
+ return cc.SimpleAudioEngine:destroyInstance()
+end
+
+AudioEngine = M
diff --git a/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua b/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua
new file mode 100644
index 0000000..64f23f6
--- /dev/null
+++ b/src/cocos/cocosdenshion/DeprecatedCocosDenshionClass.lua
@@ -0,0 +1,19 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+-- This is the DeprecatedCocosDenshionClass
+
+DeprecatedCocosDenshionClass = {} or DeprecatedCocosDenshionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--SimpleAudioEngine class will be Deprecated,begin
+function DeprecatedCocosDenshionClass.SimpleAudioEngine()
+ deprecatedTip("SimpleAudioEngine","cc.SimpleAudioEngine")
+ return cc.SimpleAudioEngine
+end
+_G["SimpleAudioEngine"] = DeprecatedCocosDenshionClass.SimpleAudioEngine()
+--SimpleAudioEngine class will be Deprecated,end
diff --git a/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua b/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua
new file mode 100644
index 0000000..9588a1f
--- /dev/null
+++ b/src/cocos/cocosdenshion/DeprecatedCocosDenshionFunc.lua
@@ -0,0 +1,22 @@
+if nil == cc.SimpleAudioEngine then
+ return
+end
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of SimpleAudioEngine will be deprecated begin
+local SimpleAudioEngineDeprecated = { }
+function SimpleAudioEngineDeprecated.sharedEngine()
+ deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
+ return cc.SimpleAudioEngine:getInstance()
+end
+SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine
+
+function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
+ deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
+ return self:playMusic(...)
+end
+SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic
+--functions of SimpleAudioEngine will be deprecated end
diff --git a/src/cocos/cocostudio/CocoStudio.lua b/src/cocos/cocostudio/CocoStudio.lua
new file mode 100644
index 0000000..d5a3205
--- /dev/null
+++ b/src/cocos/cocostudio/CocoStudio.lua
@@ -0,0 +1,389 @@
+if nil == ccs then
+ return
+end
+
+if not json then
+ require "cocos.cocos2d.json"
+end
+
+require "cocos.cocostudio.StudioConstants"
+
+function ccs.sendTriggerEvent(event)
+ local triggerObjArr = ccs.TriggerMng.getInstance():get(event)
+
+ if nil == triggerObjArr then
+ return
+ end
+
+ for i = 1, table.getn(triggerObjArr) do
+ local triObj = triggerObjArr[i]
+ if nil ~= triObj and triObj:detect() then
+ triObj:done()
+ end
+ end
+end
+
+function ccs.registerTriggerClass(className, createFunc)
+ ccs.TInfo.new(className,createFunc)
+end
+
+ccs.TInfo = class("TInfo")
+ccs.TInfo._className = ""
+ccs.TInfo._fun = nil
+
+function ccs.TInfo:ctor(c,f)
+ -- @param {String|ccs.TInfo}c
+ -- @param {Function}f
+ if nil ~= f then
+ self._className = c
+ self._fun = f
+ else
+ self._className = c._className
+ self._fun = c._fun
+ end
+
+ ccs.ObjectFactory.getInstance():registerType(self)
+end
+
+ccs.ObjectFactory = class("ObjectFactory")
+ccs.ObjectFactory._typeMap = nil
+ccs.ObjectFactory._instance = nil
+
+function ccs.ObjectFactory:ctor()
+ self._typeMap = {}
+end
+
+function ccs.ObjectFactory.getInstance()
+ if nil == ccs.ObjectFactory._instance then
+ ccs.ObjectFactory._instance = ccs.ObjectFactory.new()
+ end
+
+ return ccs.ObjectFactory._instance
+end
+
+function ccs.ObjectFactory.destroyInstance()
+ ccs.ObjectFactory._instance = nil
+end
+
+function ccs.ObjectFactory:createObject(classname)
+ local obj = nil
+ local t = self._typeMap[classname]
+ if nil ~= t then
+ obj = t._fun()
+ end
+
+ return obj
+end
+
+function ccs.ObjectFactory:registerType(t)
+ self._typeMap[t._className] = t
+end
+
+ccs.TriggerObj = class("TriggerObj")
+ccs.TriggerObj._cons = {}
+ccs.TriggerObj._acts = {}
+ccs.TriggerObj._enable = false
+ccs.TriggerObj._id = 0
+ccs.TriggerObj._vInt = {}
+
+function ccs.TriggerObj.extend(target)
+ local t = tolua.getpeer(target)
+ if not t then
+ t = {}
+ tolua.setpeer(target, t)
+ end
+ setmetatable(t, TriggerObj)
+ return target
+end
+
+function ccs.TriggerObj:ctor()
+ self:init()
+end
+
+function ccs.TriggerObj:init()
+ self._id = 0
+ self._enable = true
+ self._cons = {}
+ self._acts = {}
+ self._vInt = {}
+end
+
+function ccs.TriggerObj:detect()
+ if (not self._enable) or (table.getn(self._cons) == 0) then
+ return true
+ end
+
+ local ret = true
+ local obj = nil
+ for i = 1 , table.getn(self._cons) do
+ obj = self._cons[i]
+ if nil ~= obj and nil ~= obj.detect then
+ ret = ret and obj:detect()
+ end
+ end
+ return ret
+end
+
+function ccs.TriggerObj:done()
+ if (not self._enable) or (table.getn(self._acts) == 0) then
+ return
+ end
+
+ local obj = nil
+ for i = 1, table.getn(self._acts) do
+ obj = self._acts[i]
+ if nil ~= obj and obj.done then
+ obj:done()
+ end
+ end
+end
+
+function ccs.TriggerObj:removeAll()
+ local obj = nil
+ for i=1, table.getn(self._cons) do
+ obj = self._cons[i]
+ if nil ~= obj then
+ obj:removeAll()
+ end
+ end
+ self._cons = {}
+
+ for i=1, table.getn(self._acts) do
+ obj = self._acts[i]
+ if nil ~= obj then
+ obj:removeAll()
+ end
+ end
+ self._acts = {}
+end
+
+function ccs.TriggerObj:serialize(jsonValue)
+ self._id = jsonValue["id"]
+ local count = 0
+
+ --condition
+ local cons = jsonValue["conditions"]
+ if nil ~= cons then
+ count = table.getn(cons)
+ for i = 1, count do
+ local subDict = cons[i]
+ local className = subDict["classname"]
+ if nil ~= className then
+ local obj = ccs.ObjectFactory.getInstance():createObject(className)
+ assert(nil ~= obj, string.format("class named %s can not implement!",className))
+ obj:serialize(subDict)
+ obj:init()
+ table.insert(self._cons, obj)
+ end
+ end
+ end
+
+ local actions = jsonValue["actions"]
+ if nil ~= actions then
+ count = table.getn(actions)
+ for i = 1,count do
+ local subAction = actions[i]
+ local className = subAction["classname"]
+ if nil ~= className then
+ local act = ccs.ObjectFactory.getInstance():createObject(className)
+ assert(nil ~= act ,string.format("class named %s can not implement!",className))
+ act:serialize(subAction)
+ act:init()
+ table.insert(self._acts,act)
+ end
+ end
+ end
+
+ local events = jsonValue["events"]
+ if nil ~= events then
+ count = table.getn(events)
+ for i = 1, count do
+ local subEveent = events[i]
+ local eventID = subEveent["id"]
+ if eventID >= 0 then
+ table.insert(self._vInt,eventID)
+ end
+ end
+ end
+end
+
+function ccs.TriggerObj:getId()
+ return self._id
+end
+
+function ccs.TriggerObj:setEnable(enable)
+ self._enable = enable
+end
+
+function ccs.TriggerObj:getEvents()
+ return self._vInt
+end
+
+ccs.TriggerMng = class("TriggerMng")
+ccs.TriggerMng._eventTriggers = nil
+ccs.TriggerMng._triggerObjs = nil
+ccs.TriggerMng._movementDispatches = nil
+ccs.TriggerMng._instance = nil
+
+function ccs.TriggerMng:ctor()
+ self._triggerObjs = {}
+ self._movementDispatches = {}
+ self._eventTriggers = {}
+end
+
+function ccs.TriggerMng.getInstance()
+ if ccs.TriggerMng._instance == nil then
+ ccs.TriggerMng._instance = ccs.TriggerMng.new()
+ end
+
+ return ccs.TriggerMng._instance
+end
+
+function ccs.TriggerMng.destroyInstance()
+ if ccs.TriggerMng._instance ~= nil then
+ ccs.TriggerMng._instance:removeAll()
+ ccs.TriggerMng._instance = nil
+ end
+end
+
+function ccs.TriggerMng:triggerMngVersion()
+ return "1.0.0.0"
+end
+
+function ccs.TriggerMng:parse(jsonStr)
+ local parseTable = json.decode(jsonStr,1)
+ if nil == parseTable then
+ return
+ end
+
+ local count = table.getn(parseTable)
+ for i = 1, count do
+ local subDict = parseTable[i]
+ local triggerObj = ccs.TriggerObj.new()
+ triggerObj:serialize(subDict)
+ local events = triggerObj:getEvents()
+ for j = 1, table.getn(events) do
+ local event = events[j]
+ self:add(event, triggerObj)
+ end
+
+ self._triggerObjs[triggerObj:getId()] = triggerObj
+ end
+end
+
+function ccs.TriggerMng:get(event)
+ return self._eventTriggers[event]
+end
+
+function ccs.TriggerMng:getTriggerObj(id)
+ return self._triggerObjs[id]
+end
+
+function ccs.TriggerMng:add(event,triggerObj)
+ local eventTriggers = self._eventTriggers[event]
+ if nil == eventTriggers then
+ eventTriggers = {}
+ end
+
+ local exist = false
+ for i = 1, table.getn(eventTriggers) do
+ if eventTriggers[i] == triggers then
+ exist = true
+ break
+ end
+ end
+
+ if not exist then
+ table.insert(eventTriggers,triggerObj)
+ self._eventTriggers[event] = eventTriggers
+ end
+end
+
+function ccs.TriggerMng:removeAll( )
+ for k in pairs(self._eventTriggers) do
+ local triObjArr = self._eventTriggers[k]
+ for j = 1, table.getn(triObjArr) do
+ local obj = triObjArr[j]
+ obj:removeAll()
+ end
+ end
+ self._eventTriggers = {}
+end
+
+function ccs.TriggerMng:remove(event, obj)
+
+ if nil ~= obj then
+ return self:removeObjByEvent(event, obj)
+ end
+
+ assert(event >= 0,"event must be larger than 0")
+ if nil == self._eventTriggers then
+ return false
+ end
+
+ local triObjects = self._eventTriggers[event]
+ if nil == triObjects then
+ return false
+ end
+
+ for i = 1, table.getn(triObjects) do
+ local triObject = triggers[i]
+ if nil ~= triObject then
+ triObject:remvoeAll()
+ end
+ end
+
+ self._eventTriggers[event] = nil
+ return true
+end
+
+function ccs.TriggerMng:removeObjByEvent(event, obj)
+ assert(event >= 0,"event must be larger than 0")
+ if nil == self._eventTriggers then
+ return false
+ end
+
+ local triObjects = self._eventTriggers[event]
+ if nil == triObjects then
+ return false
+ end
+
+ for i = 1,table.getn(triObjects) do
+ local triObject = triObjects[i]
+ if nil ~= triObject and triObject == obj then
+ triObject:remvoeAll()
+ table.remove(triObjects, i)
+ return true
+ end
+ end
+end
+
+function ccs.TriggerMng:removeTriggerObj(id)
+ local obj = self.getTriggerObj(id)
+
+ if nil == obj then
+ return false
+ end
+
+ local events = obj:getEvents()
+ for i = 1, table.getn(events) do
+ self:remove(events[i],obj)
+ end
+
+ return true
+end
+
+function ccs.TriggerMng:isEmpty()
+ return (not (nil == self._eventTriggers)) or table.getn(self._eventTriggers) <= 0
+end
+
+function __onParseConfig(configType,jasonStr)
+ if configType == cc.ConfigType.COCOSTUDIO then
+ ccs.TriggerMng.getInstance():parse(jasonStr)
+ end
+end
+
+function ccs.AnimationInfo(_name, _startIndex, _endIndex)
+ assert(nil ~= _name and type(_name) == "string" and _startIndex ~= nil and type(_startIndex) == "number" and _endIndex ~= nil and type(_endIndex) == "number", "ccs.AnimationInfo() - invalid input parameters")
+ return { name = _name, startIndex = _startIndex, endIndex = _endIndex}
+end
diff --git a/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua b/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua
new file mode 100644
index 0000000..712886b
--- /dev/null
+++ b/src/cocos/cocostudio/DeprecatedCocoStudioClass.lua
@@ -0,0 +1,307 @@
+if nil == ccs then
+ return
+end
+-- This is the DeprecatedExtensionClass
+
+DeprecatedExtensionClass = {} or DeprecatedExtensionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCArmature class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmature()
+ deprecatedTip("CCArmature","ccs.Armature")
+ return ccs.Armature
+end
+_G["CCArmature"] = DeprecatedExtensionClass.CCArmature()
+--CCArmature class will be Deprecated,end
+
+--CCArmatureAnimation class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmatureAnimation()
+ deprecatedTip("CCArmatureAnimation","ccs.ArmatureAnimation")
+ return ccs.ArmatureAnimation
+end
+_G["CCArmatureAnimation"] = DeprecatedExtensionClass.CCArmatureAnimation()
+--CCArmatureAnimation class will be Deprecated,end
+
+--CCSkin class will be Deprecated,begin
+function DeprecatedExtensionClass.CCSkin()
+ deprecatedTip("CCSkin","ccs.Skin")
+ return ccs.Skin
+end
+_G["CCSkin"] = DeprecatedExtensionClass.CCSkin()
+--CCSkin class will be Deprecated,end
+
+--CCBone class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBone()
+ deprecatedTip("CCBone","ccs.Bone")
+ return ccs.Bone
+end
+_G["CCBone"] = DeprecatedExtensionClass.CCBone()
+--CCBone class will be Deprecated,end
+
+--CCArmatureDataManager class will be Deprecated,begin
+function DeprecatedExtensionClass.CCArmatureDataManager()
+ deprecatedTip("CCArmatureDataManager","ccs.ArmatureDataManager")
+ return ccs.ArmatureDataManager
+end
+_G["CCArmatureDataManager"] = DeprecatedExtensionClass.CCArmatureDataManager()
+--CCArmatureDataManager class will be Deprecated,end
+
+--CCBatchNode class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBatchNode()
+ deprecatedTip("CCBatchNode","ccs.BatchNode")
+ return ccs.BatchNode
+end
+_G["CCBatchNode"] = DeprecatedExtensionClass.CCBatchNode()
+--CCBatchNode class will be Deprecated,end
+
+--CCTween class will be Deprecated,begin
+function DeprecatedExtensionClass.CCTween()
+ deprecatedTip("CCTween","ccs.Tween")
+ return ccs.Tween
+end
+_G["CCTween"] = DeprecatedExtensionClass.CCTween()
+--CCTween class will be Deprecated,end
+
+--CCBaseData class will be Deprecated,begin
+function DeprecatedExtensionClass.CCBaseData()
+ deprecatedTip("CCBaseData","ccs.BaseData")
+ return ccs.BaseData
+end
+_G["CCBaseData"] = DeprecatedExtensionClass.CCBaseData()
+--CCBaseData class will be Deprecated,end
+
+--CCDisplayManager class will be Deprecated,begin
+function DeprecatedExtensionClass.CCDisplayManager()
+ deprecatedTip("CCDisplayManager","ccs.DisplayManager")
+ return ccs.DisplayManager
+end
+_G["CCDisplayManager"] = DeprecatedExtensionClass.CCDisplayManager()
+--CCDisplayManager class will be Deprecated,end
+
+--UIHelper class will be Deprecated,begin
+function DeprecatedExtensionClass.UIHelper()
+ deprecatedTip("UIHelper","ccs.UIHelper")
+ return ccs.UIHelper
+end
+_G["UIHelper"] = DeprecatedExtensionClass.UIHelper()
+--UIHelper class will be Deprecated,end
+
+--UILayout class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayout()
+ deprecatedTip("UILayout","ccs.UILayout")
+ return ccs.UILayout
+end
+_G["UILayout"] = DeprecatedExtensionClass.UILayout()
+--UILayout class will be Deprecated,end
+
+--UIWidget class will be Deprecated,begin
+function DeprecatedExtensionClass.UIWidget()
+ deprecatedTip("UIWidget","ccs.UIWidget")
+ return ccs.UIWidget
+end
+_G["UIWidget"] = DeprecatedExtensionClass.UIWidget()
+--UIWidget class will be Deprecated,end
+
+--UILayer class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayer()
+ deprecatedTip("UILayer","ccs.UILayer")
+ return ccs.UILayer
+end
+_G["UILayer"] = DeprecatedExtensionClass.UILayer()
+--UILayer class will be Deprecated,end
+
+--UIButton class will be Deprecated,begin
+function DeprecatedExtensionClass.UIButton()
+ deprecatedTip("UIButton","ccs.UIButton")
+ return ccs.UIButton
+end
+_G["UIButton"] = DeprecatedExtensionClass.UIButton()
+--UIButton class will be Deprecated,end
+
+--UICheckBox class will be Deprecated,begin
+function DeprecatedExtensionClass.UICheckBox()
+ deprecatedTip("UICheckBox","ccs.UICheckBox")
+ return ccs.UICheckBox
+end
+_G["UICheckBox"] = DeprecatedExtensionClass.UICheckBox()
+--UICheckBox class will be Deprecated,end
+
+--UIImageView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIImageView()
+ deprecatedTip("UIImageView","ccs.UIImageView")
+ return ccs.UIImageView
+end
+_G["UIImageView"] = DeprecatedExtensionClass.UIImageView()
+--UIImageView class will be Deprecated,end
+
+--UILabel class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabel()
+ deprecatedTip("UILabel","ccs.UILabel")
+ return ccs.UILabel
+end
+_G["UILabel"] = DeprecatedExtensionClass.UILabel()
+--UILabel class will be Deprecated,end
+
+--UILabelAtlas class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabelAtlas()
+ deprecatedTip("UILabelAtlas","ccs.UILabelAtlas")
+ return ccs.UILabelAtlas
+end
+_G["UILabelAtlas"] = DeprecatedExtensionClass.UILabelAtlas()
+--UILabelAtlas class will be Deprecated,end
+
+--UILabelBMFont class will be Deprecated,begin
+function DeprecatedExtensionClass.UILabelBMFont()
+ deprecatedTip("UILabelBMFont","ccs.UILabelBMFont")
+ return ccs.UILabelBMFont
+end
+_G["UILabelBMFont"] = DeprecatedExtensionClass.UILabelBMFont()
+--UILabelBMFont class will be Deprecated,end
+
+--UILoadingBar class will be Deprecated,begin
+function DeprecatedExtensionClass.UILoadingBar()
+ deprecatedTip("UILoadingBar","ccs.UILoadingBar")
+ return ccs.UILoadingBar
+end
+_G["UILoadingBar"] = DeprecatedExtensionClass.UILoadingBar()
+--UILoadingBar class will be Deprecated,end
+
+--UISlider class will be Deprecated,begin
+function DeprecatedExtensionClass.UISlider()
+ deprecatedTip("UISlider","ccs.UISlider")
+ return ccs.UISlider
+end
+_G["UISlider"] = DeprecatedExtensionClass.UISlider()
+--UISlider class will be Deprecated,end
+
+--UITextField class will be Deprecated,begin
+function DeprecatedExtensionClass.UITextField()
+ deprecatedTip("UITextField","ccs.UITextField")
+ return ccs.UITextField
+end
+_G["UITextField"] = DeprecatedExtensionClass.UITextField()
+--UITextField class will be Deprecated,end
+
+--UIScrollView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIScrollView()
+ deprecatedTip("UIScrollView","ccs.UIScrollView")
+ return ccs.UIScrollView
+end
+_G["UIScrollView"] = DeprecatedExtensionClass.UIScrollView()
+--UIScrollView class will be Deprecated,end
+
+--UIPageView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIPageView()
+ deprecatedTip("UIPageView","ccs.UIPageView")
+ return ccs.UIPageView
+end
+_G["UIPageView"] = DeprecatedExtensionClass.UIPageView()
+--UIPageView class will be Deprecated,end
+
+--UIListView class will be Deprecated,begin
+function DeprecatedExtensionClass.UIListView()
+ deprecatedTip("UIListView","ccs.UIListView")
+ return ccs.UIListView
+end
+_G["UIListView"] = DeprecatedExtensionClass.UIListView()
+--UIListView class will be Deprecated,end
+
+--UILayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UILayoutParameter()
+ deprecatedTip("UILayoutParameter","ccs.UILayoutParameter")
+ return ccs.UILayoutParameter
+end
+_G["UILayoutParameter"] = DeprecatedExtensionClass.UILayoutParameter()
+--UILayoutParameter class will be Deprecated,end
+
+--UILinearLayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UILinearLayoutParameter()
+ deprecatedTip("UILinearLayoutParameter","ccs.UILinearLayoutParameter")
+ return ccs.UILinearLayoutParameter
+end
+_G["UILinearLayoutParameter"] = DeprecatedExtensionClass.UILinearLayoutParameter()
+--UILinearLayoutParameter class will be Deprecated,end
+
+--UIRelativeLayoutParameter class will be Deprecated,begin
+function DeprecatedExtensionClass.UIRelativeLayoutParameter()
+ deprecatedTip("UIRelativeLayoutParameter","ccs.UIRelativeLayoutParameter")
+ return ccs.UIRelativeLayoutParameter
+end
+_G["UIRelativeLayoutParameter"] = DeprecatedExtensionClass.UIRelativeLayoutParameter()
+--UIRelativeLayoutParameter class will be Deprecated,end
+
+--CCComController class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComController()
+ deprecatedTip("CCComController","ccs.ComController")
+ return ccs.CCComController
+end
+_G["CCComController"] = DeprecatedExtensionClass.CCComController()
+--CCComController class will be Deprecated,end
+
+--CCComAudio class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComAudio()
+ deprecatedTip("CCComAudio","ccs.ComAudio")
+ return ccs.ComAudio
+end
+_G["CCComAudio"] = DeprecatedExtensionClass.CCComAudio()
+--CCComAudio class will be Deprecated,end
+
+--CCComAttribute class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComAttribute()
+ deprecatedTip("CCComAttribute","ccs.ComAttribute")
+ return ccs.ComAttribute
+end
+_G["CCComAttribute"] = DeprecatedExtensionClass.CCComAttribute()
+--CCComAttribute class will be Deprecated,end
+
+--CCComRender class will be Deprecated,begin
+function DeprecatedExtensionClass.CCComRender()
+ deprecatedTip("CCComRender","ccs.ComRender")
+ return ccs.ComRender
+end
+_G["CCComRender"] = DeprecatedExtensionClass.CCComRender()
+--CCComRender class will be Deprecated,end
+
+--ActionManager class will be Deprecated,begin
+function DeprecatedExtensionClass.ActionManager()
+ deprecatedTip("ActionManager","ccs.ActionManagerEx")
+ return ccs.ActionManagerEx
+end
+_G["ActionManager"] = DeprecatedExtensionClass.ActionManager()
+--CCComRender class will be Deprecated,end
+
+--SceneReader class will be Deprecated,begin
+function DeprecatedExtensionClass.SceneReader()
+ deprecatedTip("SceneReader","ccs.SceneReader")
+ return ccs.SceneReader
+end
+_G["SceneReader"] = DeprecatedExtensionClass.SceneReader()
+--SceneReader class will be Deprecated,end
+
+--GUIReader class will be Deprecated,begin
+function DeprecatedExtensionClass.GUIReader()
+ deprecatedTip("GUIReader","ccs.GUIReader")
+ return ccs.GUIReader
+end
+_G["GUIReader"] = DeprecatedExtensionClass.GUIReader()
+--GUIReader class will be Deprecated,end
+
+--UIRootWidget class will be Deprecated,begin
+function DeprecatedExtensionClass.UIRootWidget()
+ deprecatedTip("UIRootWidget","ccs.UIRootWidget")
+ return ccs.UIRootWidget
+end
+_G["UIRootWidget"] = DeprecatedExtensionClass.UIRootWidget()
+--UIRootWidget class will be Deprecated,end
+
+--ActionObject class will be Deprecated,begin
+function DeprecatedExtensionClass.ActionObject()
+ deprecatedTip("ActionObject","ccs.ActionObject")
+ return ccs.ActionObject
+end
+_G["ActionObject"] = DeprecatedExtensionClass.ActionObject()
+--ActionObject class will be Deprecated,end
\ No newline at end of file
diff --git a/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua b/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua
new file mode 100644
index 0000000..f8e867d
--- /dev/null
+++ b/src/cocos/cocostudio/DeprecatedCocoStudioFunc.lua
@@ -0,0 +1,81 @@
+if nil == ccs then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of GUIReader will be deprecated begin
+local GUIReaderDeprecated = { }
+function GUIReaderDeprecated.shareReader()
+ deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance")
+ return ccs.GUIReader:getInstance()
+end
+GUIReader.shareReader = GUIReaderDeprecated.shareReader
+
+function GUIReaderDeprecated.purgeGUIReader()
+ deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
+ return ccs.GUIReader:destroyInstance()
+end
+GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader
+--functions of GUIReader will be deprecated end
+
+--functions of SceneReader will be deprecated begin
+local SceneReaderDeprecated = { }
+function SceneReaderDeprecated.sharedSceneReader()
+ deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance")
+ return ccs.SceneReader:getInstance()
+end
+SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader
+
+function SceneReaderDeprecated.purgeSceneReader(self)
+ deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance")
+ return self:destroyInstance()
+end
+SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader
+--functions of SceneReader will be deprecated end
+
+
+--functions of ccs.GUIReader will be deprecated begin
+local CCSGUIReaderDeprecated = { }
+function CCSGUIReaderDeprecated.purgeGUIReader()
+ deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
+ return ccs.GUIReader:destroyInstance()
+end
+ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader
+--functions of ccs.GUIReader will be deprecated end
+
+--functions of ccs.ActionManagerEx will be deprecated begin
+local CCSActionManagerExDeprecated = { }
+function CCSActionManagerExDeprecated.destroyActionManager()
+ deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance")
+ return ccs.ActionManagerEx:destroyInstance()
+end
+ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager
+--functions of ccs.ActionManagerEx will be deprecated end
+
+--functions of ccs.SceneReader will be deprecated begin
+local CCSSceneReaderDeprecated = { }
+function CCSSceneReaderDeprecated.destroySceneReader(self)
+ deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance")
+ return self:destroyInstance()
+end
+ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader
+--functions of ccs.SceneReader will be deprecated end
+
+--functions of CCArmatureDataManager will be deprecated begin
+local CCArmatureDataManagerDeprecated = { }
+function CCArmatureDataManagerDeprecated.sharedArmatureDataManager()
+ deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance")
+ return ccs.ArmatureDataManager:getInstance()
+end
+CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager
+
+function CCArmatureDataManagerDeprecated.purge()
+ deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance")
+ return ccs.ArmatureDataManager:destoryInstance()
+end
+CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge
+--functions of CCArmatureDataManager will be deprecated end
diff --git a/src/cocos/cocostudio/StudioConstants.lua b/src/cocos/cocostudio/StudioConstants.lua
new file mode 100644
index 0000000..34fa418
--- /dev/null
+++ b/src/cocos/cocostudio/StudioConstants.lua
@@ -0,0 +1,15 @@
+if nil == ccs then
+ return
+end
+
+ccs.MovementEventType = {
+ start = 0,
+ complete = 1,
+ loopComplete = 2,
+}
+
+ccs.InnerActionType = {
+ LoopAction = 0,
+ NoLoopAction = 1,
+ SingleFrame = 2,
+}
diff --git a/src/cocos/controller/ControllerConstants.lua b/src/cocos/controller/ControllerConstants.lua
new file mode 100644
index 0000000..730e92a
--- /dev/null
+++ b/src/cocos/controller/ControllerConstants.lua
@@ -0,0 +1,38 @@
+
+cc = cc or {}
+
+cc.ControllerKey =
+{
+ JOYSTICK_LEFT_X = 1000,
+ JOYSTICK_LEFT_Y = 1001,
+ JOYSTICK_RIGHT_X = 1002,
+ JOYSTICK_RIGHT_Y = 1003,
+
+ BUTTON_A = 1004,
+ BUTTON_B = 1005,
+ BUTTON_C = 1006,
+ BUTTON_X = 1007,
+ BUTTON_Y = 1008,
+ BUTTON_Z = 1009,
+
+ BUTTON_DPAD_UP = 1010,
+ BUTTON_DPAD_DOWN = 1011,
+ BUTTON_DPAD_LEFT = 1012,
+ BUTTON_DPAD_RIGHT = 1013,
+ BUTTON_DPAD_CENTER = 1014,
+
+ BUTTON_LEFT_SHOULDER = 1015,
+ BUTTON_RIGHT_SHOULDER = 1016,
+
+ AXIS_LEFT_TRIGGER = 1017,
+ AXIS_RIGHT_TRIGGER = 1018,
+
+ BUTTON_LEFT_THUMBSTICK = 1019,
+ BUTTON_RIGHT_THUMBSTICK = 1020,
+
+ BUTTON_START = 1021,
+ BUTTON_SELECT = 1022,
+
+ BUTTON_PAUSE = 1023,
+ KEY_MAX = 1024,
+}
diff --git a/src/cocos/extension/DeprecatedExtensionClass.lua b/src/cocos/extension/DeprecatedExtensionClass.lua
new file mode 100644
index 0000000..a5a5930
--- /dev/null
+++ b/src/cocos/extension/DeprecatedExtensionClass.lua
@@ -0,0 +1,134 @@
+if nil == cc.Control then
+ return
+end
+
+-- This is the DeprecatedExtensionClass
+DeprecatedExtensionClass = {} or DeprecatedExtensionClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--CCControl class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControl()
+ deprecatedTip("CCControl","cc.Control")
+ return cc.Control
+end
+_G["CCControl"] = DeprecatedExtensionClass.CCControl()
+--CCControl class will be Deprecated,end
+
+--CCScrollView class will be Deprecated,begin
+function DeprecatedExtensionClass.CCScrollView()
+ deprecatedTip("CCScrollView","cc.ScrollView")
+ return cc.ScrollView
+end
+_G["CCScrollView"] = DeprecatedExtensionClass.CCScrollView()
+--CCScrollView class will be Deprecated,end
+
+--CCTableView class will be Deprecated,begin
+function DeprecatedExtensionClass.CCTableView()
+ deprecatedTip("CCTableView","cc.TableView")
+ return cc.TableView
+end
+_G["CCTableView"] = DeprecatedExtensionClass.CCTableView()
+--CCTableView class will be Deprecated,end
+
+--CCControlPotentiometer class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlPotentiometer()
+ deprecatedTip("CCControlPotentiometer","cc.ControlPotentiometer")
+ return cc.ControlPotentiometer
+end
+_G["CCControlPotentiometer"] = DeprecatedExtensionClass.CCControlPotentiometer()
+--CCControlPotentiometer class will be Deprecated,end
+
+--CCControlStepper class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlStepper()
+ deprecatedTip("CCControlStepper","cc.ControlStepper")
+ return cc.ControlStepper
+end
+_G["CCControlStepper"] = DeprecatedExtensionClass.CCControlStepper()
+--CCControlStepper class will be Deprecated,end
+
+--CCControlHuePicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlHuePicker()
+ deprecatedTip("CCControlHuePicker","cc.ControlHuePicker")
+ return cc.ControlHuePicker
+end
+_G["CCControlHuePicker"] = DeprecatedExtensionClass.CCControlHuePicker()
+--CCControlHuePicker class will be Deprecated,end
+
+--CCControlSlider class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSlider()
+ deprecatedTip("CCControlSlider","cc.ControlSlider")
+ return cc.ControlSlider
+end
+_G["CCControlSlider"] = DeprecatedExtensionClass.CCControlSlider()
+--CCControlSlider class will be Deprecated,end
+
+--CCControlSaturationBrightnessPicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
+ deprecatedTip("CCControlSaturationBrightnessPicker","cc.ControlSaturationBrightnessPicker")
+ return cc.ControlSaturationBrightnessPicker
+end
+_G["CCControlSaturationBrightnessPicker"] = DeprecatedExtensionClass.CCControlSaturationBrightnessPicker()
+--CCControlSaturationBrightnessPicker class will be Deprecated,end
+
+--CCControlSwitch class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlSwitch()
+ deprecatedTip("CCControlSwitch","cc.ControlSwitch")
+ return cc.ControlSwitch
+end
+_G["CCControlSwitch"] = DeprecatedExtensionClass.CCControlSwitch()
+--CCControlSwitch class will be Deprecated,end
+
+--CCControlButton class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlButton()
+ deprecatedTip("CCControlButton","cc.ControlButton")
+ return cc.ControlButton
+end
+_G["CCControlButton"] = DeprecatedExtensionClass.CCControlButton()
+--CCControlButton class will be Deprecated,end
+
+--CCControlColourPicker class will be Deprecated,begin
+function DeprecatedExtensionClass.CCControlColourPicker()
+ deprecatedTip("CCControlColourPicker","cc.ControlColourPicker")
+ return cc.ControlColourPicker
+end
+_G["CCControlColourPicker"] = DeprecatedExtensionClass.CCControlColourPicker()
+--CCControlColourPicker class will be Deprecated,end
+
+
+if nil == ccui then
+ return
+end
+
+--CCEditBox class will be Deprecated,begin
+function DeprecatedExtensionClass.CCEditBox()
+ deprecatedTip("CCEditBox","ccui.EditBox")
+ return ccui.EditBox
+end
+_G["CCEditBox"] = DeprecatedExtensionClass.CCEditBox()
+
+function DeprecatedExtensionClass.CCUIEditBox()
+ deprecatedTip("cc.EditBox","ccui.EditBox")
+ return ccui.EditBox
+end
+_G["cc"]["EditBox"] = DeprecatedExtensionClass.CCUIEditBox()
+
+--CCEditBox class will be Deprecated,end
+
+--CCScale9Sprite class will be Deprecated,begin
+function DeprecatedExtensionClass.CCScale9Sprite()
+ deprecatedTip("CCScale9Sprite","ccui.Scale9Sprite")
+ return ccui.Scale9Sprite
+end
+_G["CCScale9Sprite"] = DeprecatedExtensionClass.CCScale9Sprite()
+
+function DeprecatedExtensionClass.UIScale9Sprite()
+ deprecatedTip("cc.Scale9Sprite","ccui.Scale9Sprite")
+ return ccui.Scale9Sprite
+end
+_G["cc"]["Scale9Sprite"] = DeprecatedExtensionClass.UIScale9Sprite()
+--CCScale9Sprite class will be Deprecated,end
+
diff --git a/src/cocos/extension/DeprecatedExtensionEnum.lua b/src/cocos/extension/DeprecatedExtensionEnum.lua
new file mode 100644
index 0000000..9483df0
--- /dev/null
+++ b/src/cocos/extension/DeprecatedExtensionEnum.lua
@@ -0,0 +1,26 @@
+if nil == cc.Control then
+ return
+end
+
+_G.kCCControlStepperPartMinus = cc.CONTROL_STEPPER_PART_MINUS
+_G.kCCControlStepperPartPlus = cc.CONTROL_STEPPER_PART_PLUS
+_G.kCCControlStepperPartNone = cc.CONTROL_STEPPER_PART_NONE
+
+_G.CCControlEventTouchDown = cc.CONTROL_EVENTTYPE_TOUCH_DOWN
+_G.CCControlEventTouchDragInside = cc.CONTROL_EVENTTYPE_DRAG_INSIDE
+_G.CCControlEventTouchDragOutside = cc.CONTROL_EVENTTYPE_DRAG_OUTSIDE
+_G.CCControlEventTouchDragEnter = cc.CONTROL_EVENTTYPE_DRAG_ENTER
+_G.CCControlEventTouchDragExit = cc.CONTROL_EVENTTYPE_DRAG_EXIT
+_G.CCControlEventTouchUpInside = cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE
+_G.CCControlEventTouchUpOutside = cc.CONTROL_EVENTTYPE_TOUCH_UP_OUTSIDE
+_G.CCControlEventTouchCancel = cc.CONTROL_EVENTTYPE_TOUCH_CANCEL
+_G.CCControlEventValueChanged = cc.CONTROL_EVENTTYPE_VALUE_CHANGED
+_G.CCControlStateNormal = cc.CONTROL_STATE_NORMAL
+_G.CCControlStateHighlighted = cc.CONTROL_STATE_HIGH_LIGHTED
+_G.CCControlStateDisabled = cc.CONTROL_STATE_DISABLED
+_G.CCControlStateSelected = cc.CONTROL_STATE_SELECTED
+
+_G.kCCScrollViewDirectionHorizontal = cc.SCROLLVIEW_DIRECTION_HORIZONTAL
+_G.kCCScrollViewDirectionVertical = cc.SCROLLVIEW_DIRECTION_VERTICAL
+_G.kCCTableViewFillTopDown = cc.TABLEVIEW_FILL_TOPDOWN
+_G.kCCTableViewFillBottomUp = cc.TABLEVIEW_FILL_BOTTOMUP
diff --git a/src/cocos/extension/DeprecatedExtensionFunc.lua b/src/cocos/extension/DeprecatedExtensionFunc.lua
new file mode 100644
index 0000000..2b617fc
--- /dev/null
+++ b/src/cocos/extension/DeprecatedExtensionFunc.lua
@@ -0,0 +1,32 @@
+if nil == cc.Control then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of CCControl will be deprecated end
+local CCControlDeprecated = { }
+function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
+ deprecatedTip("addHandleOfControlEvent","registerControlEventHandler")
+ print("come in addHandleOfControlEvent")
+ self:registerControlEventHandler(func,controlEvent)
+end
+CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent
+--functions of CCControl will be deprecated end
+
+--Enums of CCTableView will be deprecated begin
+CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
+CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
+CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED
+CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX
+CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX
+CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW
+--Enums of CCTableView will be deprecated end
+
+--Enums of CCScrollView will be deprecated begin
+CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
+CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
+--Enums of CCScrollView will be deprecated end
diff --git a/src/cocos/extension/ExtensionConstants.lua b/src/cocos/extension/ExtensionConstants.lua
new file mode 100644
index 0000000..0bfc8f8
--- /dev/null
+++ b/src/cocos/extension/ExtensionConstants.lua
@@ -0,0 +1,70 @@
+if nil == cc.Control then
+ return
+end
+
+cc.CONTROL_STATE_NORMAL = 1
+cc.CONTROL_STATE_HIGH_LIGHTED = 2
+cc.CONTROL_STATE_DISABLED = 4
+cc.CONTROL_STATE_SELECTED = 8
+
+cc.CONTROL_STEPPER_PART_MINUS = 0
+cc.CONTROL_STEPPER_PART_PLUS = 1
+cc.CONTROL_STEPPER_PART_NONE = 2
+
+cc.TABLEVIEW_FILL_TOPDOWN = 0
+cc.TABLEVIEW_FILL_BOTTOMUP = 1
+
+cc.SCROLLVIEW_SCRIPT_SCROLL = 0
+cc.SCROLLVIEW_SCRIPT_ZOOM = 1
+cc.TABLECELL_TOUCHED = 2
+cc.TABLECELL_HIGH_LIGHT = 3
+cc.TABLECELL_UNHIGH_LIGHT = 4
+cc.TABLECELL_WILL_RECYCLE = 5
+cc.TABLECELL_SIZE_FOR_INDEX = 6
+cc.TABLECELL_SIZE_AT_INDEX = 7
+cc.NUMBER_OF_CELLS_IN_TABLEVIEW = 8
+
+cc.SCROLLVIEW_DIRECTION_NONE = -1
+cc.SCROLLVIEW_DIRECTION_HORIZONTAL = 0
+cc.SCROLLVIEW_DIRECTION_VERTICAL = 1
+cc.SCROLLVIEW_DIRECTION_BOTH = 2
+
+cc.CONTROL_EVENTTYPE_TOUCH_DOWN = 1
+cc.CONTROL_EVENTTYPE_DRAG_INSIDE = 2
+cc.CONTROL_EVENTTYPE_DRAG_OUTSIDE = 4
+cc.CONTROL_EVENTTYPE_DRAG_ENTER = 8
+cc.CONTROL_EVENTTYPE_DRAG_EXIT = 16
+cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE = 32
+cc.CONTROL_EVENTTYPE_TOUCH_UP_OUTSIDE = 64
+cc.CONTROL_EVENTTYPE_TOUCH_CANCEL = 128
+cc.CONTROL_EVENTTYPE_VALUE_CHANGED = 256
+
+cc.EDITBOX_INPUT_MODE_ANY = 0
+cc.EDITBOX_INPUT_MODE_EMAILADDR = 1
+cc.EDITBOX_INPUT_MODE_NUMERIC = 2
+cc.EDITBOX_INPUT_MODE_PHONENUMBER = 3
+cc.EDITBOX_INPUT_MODE_URL = 4
+cc.EDITBOX_INPUT_MODE_DECIMAL = 5
+cc.EDITBOX_INPUT_MODE_SINGLELINE = 6
+
+cc.EDITBOX_INPUT_FLAG_PASSWORD = 0
+cc.EDITBOX_INPUT_FLAG_SENSITIVE = 1
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_WORD = 2
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_SENTENCE = 3
+cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_ALL_CHARACTERS = 4
+
+cc.KEYBOARD_RETURNTYPE_DEFAULT = 0
+cc.KEYBOARD_RETURNTYPE_DONE = 1
+cc.KEYBOARD_RETURNTYPE_SEND = 2
+cc.KEYBOARD_RETURNTYPE_SEARCH = 3
+cc.KEYBOARD_RETURNTYPE_GO = 4
+
+cc.ASSETSMANAGER_CREATE_FILE = 0
+cc.ASSETSMANAGER_NETWORK = 1
+cc.ASSETSMANAGER_NO_NEW_VERSION = 2
+cc.ASSETSMANAGER_UNCOMPRESS = 3
+
+cc.ASSETSMANAGER_PROTOCOL_PROGRESS = 0
+cc.ASSETSMANAGER_PROTOCOL_SUCCESS = 1
+cc.ASSETSMANAGER_PROTOCOL_ERROR = 2
+
diff --git a/src/cocos/framework/audio.lua b/src/cocos/framework/audio.lua
new file mode 100644
index 0000000..59eb566
--- /dev/null
+++ b/src/cocos/framework/audio.lua
@@ -0,0 +1,206 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local audio = {}
+
+local engine = cc.SimpleAudioEngine:getInstance()
+
+function audio.getMusicVolume()
+ local volume = engine:getMusicVolume()
+ if DEBUG > 1 then
+ printf("[audio] getMusicVolume() - volume: %0.2f", volume)
+ end
+ return volume
+end
+
+function audio.setMusicVolume(volume)
+ volume = checknumber(volume)
+ if DEBUG > 1 then
+ printf("[audio] setMusicVolume() - volume: %0.2f", volume)
+ end
+ engine:setMusicVolume(volume)
+end
+
+function audio.preloadMusic(filename)
+ assert(filename, "audio.preloadMusic() - invalid filename")
+ if DEBUG > 1 then
+ printf("[audio] preloadMusic() - filename: %s", tostring(filename))
+ end
+ engine:preloadMusic(filename)
+end
+
+function audio.playMusic(filename, isLoop)
+ assert(filename, "audio.playMusic() - invalid filename")
+ if type(isLoop) ~= "boolean" then isLoop = true end
+
+ audio.stopMusic()
+ if DEBUG > 1 then
+ printf("[audio] playMusic() - filename: %s, isLoop: %s", tostring(filename), tostring(isLoop))
+ end
+ engine:playMusic(filename, isLoop)
+end
+
+function audio.stopMusic(isReleaseData)
+ isReleaseData = checkbool(isReleaseData)
+ if DEBUG > 1 then
+ printf("[audio] stopMusic() - isReleaseData: %s", tostring(isReleaseData))
+ end
+ engine:stopMusic(isReleaseData)
+end
+
+function audio.pauseMusic()
+ if DEBUG > 1 then
+ printf("[audio] pauseMusic()")
+ end
+ engine:pauseMusic()
+end
+
+function audio.resumeMusic()
+ if DEBUG > 1 then
+ printf("[audio] resumeMusic()")
+ end
+ engine:resumeMusic()
+end
+
+function audio.rewindMusic()
+ if DEBUG > 1 then
+ printf("[audio] rewindMusic()")
+ end
+ engine:rewindMusic()
+end
+
+function audio.isMusicPlaying()
+ local ret = engine:isMusicPlaying()
+ if DEBUG > 1 then
+ printf("[audio] isMusicPlaying() - ret: %s", tostring(ret))
+ end
+ return ret
+end
+
+function audio.getSoundsVolume()
+ local volume = engine:getEffectsVolume()
+ if DEBUG > 1 then
+ printf("[audio] getSoundsVolume() - volume: %0.1f", volume)
+ end
+ return volume
+end
+
+function audio.setSoundsVolume(volume)
+ volume = checknumber(volume)
+ if DEBUG > 1 then
+ printf("[audio] setSoundsVolume() - volume: %0.1f", volume)
+ end
+ engine:setEffectsVolume(volume)
+end
+
+function audio.playSound(filename, isLoop)
+ if not filename then
+ printError("audio.playSound() - invalid filename")
+ return
+ end
+ if type(isLoop) ~= "boolean" then isLoop = false end
+ if DEBUG > 1 then
+ printf("[audio] playSound() - filename: %s, isLoop: %s", tostring(filename), tostring(isLoop))
+ end
+ return engine:playEffect(filename, isLoop)
+end
+
+function audio.pauseSound(handle)
+ if not handle then
+ printError("audio.pauseSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] pauseSound() - handle: %s", tostring(handle))
+ end
+ engine:pauseEffect(handle)
+end
+
+function audio.pauseAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] pauseAllSounds()")
+ end
+ engine:pauseAllEffects()
+end
+
+function audio.resumeSound(handle)
+ if not handle then
+ printError("audio.resumeSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] resumeSound() - handle: %s", tostring(handle))
+ end
+ engine:resumeEffect(handle)
+end
+
+function audio.resumeAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] resumeAllSounds()")
+ end
+ engine:resumeAllEffects()
+end
+
+function audio.stopSound(handle)
+ if not handle then
+ printError("audio.stopSound() - invalid handle")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] stopSound() - handle: %s", tostring(handle))
+ end
+ engine:stopEffect(handle)
+end
+
+function audio.stopAllSounds()
+ if DEBUG > 1 then
+ printf("[audio] stopAllSounds()")
+ end
+ engine:stopAllEffects()
+end
+audio.stopAllEffects = audio.stopAllSounds
+
+function audio.preloadSound(filename)
+ if not filename then
+ printError("audio.preloadSound() - invalid filename")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] preloadSound() - filename: %s", tostring(filename))
+ end
+ engine:preloadEffect(filename)
+end
+
+function audio.unloadSound(filename)
+ if not filename then
+ printError("audio.unloadSound() - invalid filename")
+ return
+ end
+ if DEBUG > 1 then
+ printf("[audio] unloadSound() - filename: %s", tostring(filename))
+ end
+ engine:unloadEffect(filename)
+end
+
+return audio
diff --git a/src/cocos/framework/components/event.lua b/src/cocos/framework/components/event.lua
new file mode 100644
index 0000000..a6ca22b
--- /dev/null
+++ b/src/cocos/framework/components/event.lua
@@ -0,0 +1,157 @@
+
+local Event = class("Event")
+
+local EXPORTED_METHODS = {
+ "addEventListener",
+ "dispatchEvent",
+ "removeEventListener",
+ "removeEventListenersByTag",
+ "removeEventListenersByEvent",
+ "removeAllEventListeners",
+ "hasEventListener",
+ "dumpAllEventListeners",
+}
+
+function Event:init_()
+ self.target_ = nil
+ self.listeners_ = {}
+ self.nextListenerHandleIndex_ = 0
+end
+
+function Event:bind(target)
+ self:init_()
+ cc.setmethods(target, self, EXPORTED_METHODS)
+ self.target_ = target
+end
+
+function Event:unbind(target)
+ cc.unsetmethods(target, EXPORTED_METHODS)
+ self:init_()
+end
+
+function Event:on(eventName, listener, tag)
+ assert(type(eventName) == "string" and eventName ~= "",
+ "Event:addEventListener() - invalid eventName")
+ eventName = string.upper(eventName)
+ if self.listeners_[eventName] == nil then
+ self.listeners_[eventName] = {}
+ end
+
+ self.nextListenerHandleIndex_ = self.nextListenerHandleIndex_ + 1
+ local handle = tostring(self.nextListenerHandleIndex_)
+ tag = tag or ""
+ self.listeners_[eventName][handle] = {listener, tag}
+
+ if DEBUG > 1 then
+ printInfo("%s [Event] addEventListener() - event: %s, handle: %s, tag: \"%s\"",
+ tostring(self.target_), eventName, handle, tostring(tag))
+ end
+
+ return self.target_, handle
+end
+
+Event.addEventListener = Event.on
+
+function Event:dispatchEvent(event)
+ event.name = string.upper(tostring(event.name))
+ local eventName = event.name
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - event %s", tostring(self.target_), eventName)
+ end
+
+ if self.listeners_[eventName] == nil then return end
+ event.target = self.target_
+ event.stop_ = false
+ event.stop = function(self)
+ self.stop_ = true
+ end
+
+ for handle, listener in pairs(self.listeners_[eventName]) do
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - dispatching event %s to listener %s", tostring(self.target_), eventName, handle)
+ end
+ -- listener[1] = listener
+ -- listener[2] = tag
+ event.tag = listener[2]
+ listener[1](event)
+ if event.stop_ then
+ if DEBUG > 1 then
+ printInfo("%s [Event] dispatchEvent() - break dispatching for event %s", tostring(self.target_), eventName)
+ end
+ break
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListener(handleToRemove)
+ for eventName, listenersForEvent in pairs(self.listeners_) do
+ for handle, _ in pairs(listenersForEvent) do
+ if handle == handleToRemove then
+ listenersForEvent[handle] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeEventListener() - remove listener [%s] for event %s", tostring(self.target_), handle, eventName)
+ end
+ return self.target_
+ end
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListenersByTag(tagToRemove)
+ for eventName, listenersForEvent in pairs(self.listeners_) do
+ for handle, listener in pairs(listenersForEvent) do
+ -- listener[1] = listener
+ -- listener[2] = tag
+ if listener[2] == tagToRemove then
+ listenersForEvent[handle] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeEventListener() - remove listener [%s] for event %s", tostring(self.target_), handle, eventName)
+ end
+ end
+ end
+ end
+
+ return self.target_
+end
+
+function Event:removeEventListenersByEvent(eventName)
+ self.listeners_[string.upper(eventName)] = nil
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeAllEventListenersForEvent() - remove all listeners for event %s", tostring(self.target_), eventName)
+ end
+ return self.target_
+end
+
+function Event:removeAllEventListeners()
+ self.listeners_ = {}
+ if DEBUG > 1 then
+ printInfo("%s [Event] removeAllEventListeners() - remove all listeners", tostring(self.target_))
+ end
+ return self.target_
+end
+
+function Event:hasEventListener(eventName)
+ eventName = string.upper(tostring(eventName))
+ local t = self.listeners_[eventName]
+ for _, __ in pairs(t) do
+ return true
+ end
+ return false
+end
+
+function Event:dumpAllEventListeners()
+ print("---- Event:dumpAllEventListeners() ----")
+ for name, listeners in pairs(self.listeners_) do
+ printf("-- event: %s", name)
+ for handle, listener in pairs(listeners) do
+ printf("-- listener: %s, handle: %s", tostring(listener[1]), tostring(handle))
+ end
+ end
+ return self.target_
+end
+
+return Event
diff --git a/src/cocos/framework/device.lua b/src/cocos/framework/device.lua
new file mode 100644
index 0000000..acf7746
--- /dev/null
+++ b/src/cocos/framework/device.lua
@@ -0,0 +1,107 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local device = {}
+
+device.platform = "unknown"
+device.model = "unknown"
+
+local app = cc.Application:getInstance()
+local target = app:getTargetPlatform()
+if target == cc.PLATFORM_OS_WINDOWS then
+ device.platform = "windows"
+elseif target == cc.PLATFORM_OS_MAC then
+ device.platform = "mac"
+elseif target == cc.PLATFORM_OS_ANDROID then
+ device.platform = "android"
+elseif target == cc.PLATFORM_OS_IPHONE or target == cc.PLATFORM_OS_IPAD then
+ device.platform = "ios"
+ local director = cc.Director:getInstance()
+ local view = director:getOpenGLView()
+ local framesize = view:getFrameSize()
+ local w, h = framesize.width, framesize.height
+ if w == 640 and h == 960 then
+ device.model = "iphone 4"
+ elseif w == 640 and h == 1136 then
+ device.model = "iphone 5"
+ elseif w == 750 and h == 1334 then
+ device.model = "iphone 6"
+ elseif w == 1242 and h == 2208 then
+ device.model = "iphone 6 plus"
+ elseif w == 768 and h == 1024 then
+ device.model = "ipad"
+ elseif w == 1536 and h == 2048 then
+ device.model = "ipad retina"
+ end
+elseif target == cc.PLATFORM_OS_WINRT then
+ device.platform = "winrt"
+elseif target == cc.PLATFORM_OS_WP8 then
+ device.platform = "wp8"
+end
+
+local language_ = app:getCurrentLanguage()
+if language_ == cc.LANGUAGE_CHINESE then
+ language_ = "cn"
+elseif language_ == cc.LANGUAGE_FRENCH then
+ language_ = "fr"
+elseif language_ == cc.LANGUAGE_ITALIAN then
+ language_ = "it"
+elseif language_ == cc.LANGUAGE_GERMAN then
+ language_ = "gr"
+elseif language_ == cc.LANGUAGE_SPANISH then
+ language_ = "sp"
+elseif language_ == cc.LANGUAGE_RUSSIAN then
+ language_ = "ru"
+elseif language_ == cc.LANGUAGE_KOREAN then
+ language_ = "kr"
+elseif language_ == cc.LANGUAGE_JAPANESE then
+ language_ = "jp"
+elseif language_ == cc.LANGUAGE_HUNGARIAN then
+ language_ = "hu"
+elseif language_ == cc.LANGUAGE_PORTUGUESE then
+ language_ = "pt"
+elseif language_ == cc.LANGUAGE_ARABIC then
+ language_ = "ar"
+else
+ language_ = "en"
+end
+
+device.language = language_
+device.writablePath = cc.FileUtils:getInstance():getWritablePath()
+device.directorySeparator = "/"
+device.pathSeparator = ":"
+if device.platform == "windows" then
+ device.directorySeparator = "\\"
+ device.pathSeparator = ";"
+end
+
+printInfo("# device.platform = " .. device.platform)
+printInfo("# device.model = " .. device.model)
+printInfo("# device.language = " .. device.language)
+printInfo("# device.writablePath = " .. device.writablePath)
+printInfo("# device.directorySeparator = " .. device.directorySeparator)
+printInfo("# device.pathSeparator = " .. device.pathSeparator)
+printInfo("#")
+
+return device
diff --git a/src/cocos/framework/display.lua b/src/cocos/framework/display.lua
new file mode 100644
index 0000000..8466a30
--- /dev/null
+++ b/src/cocos/framework/display.lua
@@ -0,0 +1,541 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local display = {}
+
+local director = cc.Director:getInstance()
+local view = director:getOpenGLView()
+
+if not view then
+ local width = 960
+ local height = 640
+ if CC_DESIGN_RESOLUTION then
+ if CC_DESIGN_RESOLUTION.width then
+ width = CC_DESIGN_RESOLUTION.width
+ end
+ if CC_DESIGN_RESOLUTION.height then
+ height = CC_DESIGN_RESOLUTION.height
+ end
+ end
+ view = cc.GLViewImpl:createWithRect("Cocos2d-Lua", cc.rect(0, 0, width, height))
+ director:setOpenGLView(view)
+end
+
+local framesize = view:getFrameSize()
+local textureCache = director:getTextureCache()
+local spriteFrameCache = cc.SpriteFrameCache:getInstance()
+local animationCache = cc.AnimationCache:getInstance()
+
+-- auto scale
+local function checkResolution(r)
+ r.width = checknumber(r.width)
+ r.height = checknumber(r.height)
+ r.autoscale = string.upper(r.autoscale)
+ assert(r.width > 0 and r.height > 0,
+ string.format("display - invalid design resolution size %d, %d", r.width, r.height))
+end
+
+local function setDesignResolution(r, framesize)
+ if r.autoscale == "FILL_ALL" then
+ view:setDesignResolutionSize(framesize.width, framesize.height, cc.ResolutionPolicy.FILL_ALL)
+ else
+ local scaleX, scaleY = framesize.width / r.width, framesize.height / r.height
+ local width, height = framesize.width, framesize.height
+ if r.autoscale == "FIXED_WIDTH" then
+ width = framesize.width / scaleX
+ height = framesize.height / scaleX
+ view:setDesignResolutionSize(width, height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "FIXED_HEIGHT" then
+ width = framesize.width / scaleY
+ height = framesize.height / scaleY
+ view:setDesignResolutionSize(width, height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "EXACT_FIT" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.EXACT_FIT)
+ elseif r.autoscale == "NO_BORDER" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.NO_BORDER)
+ elseif r.autoscale == "SHOW_ALL" then
+ view:setDesignResolutionSize(r.width, r.height, cc.ResolutionPolicy.SHOW_ALL)
+ else
+ printError(string.format("display - invalid r.autoscale \"%s\"", r.autoscale))
+ end
+ end
+end
+
+local function setConstants()
+ local sizeInPixels = view:getFrameSize()
+ display.sizeInPixels = {width = sizeInPixels.width, height = sizeInPixels.height}
+
+ local viewsize = director:getWinSize()
+ display.contentScaleFactor = director:getContentScaleFactor()
+ display.size = {width = viewsize.width, height = viewsize.height}
+ display.width = display.size.width
+ display.height = display.size.height
+ display.cx = display.width / 2
+ display.cy = display.height / 2
+ display.c_left = -display.width / 2
+ display.c_right = display.width / 2
+ display.c_top = display.height / 2
+ display.c_bottom = -display.height / 2
+ display.left = 0
+ display.right = display.width
+ display.top = display.height
+ display.bottom = 0
+ display.center = cc.p(display.cx, display.cy)
+ display.left_top = cc.p(display.left, display.top)
+ display.left_bottom = cc.p(display.left, display.bottom)
+ display.left_center = cc.p(display.left, display.cy)
+ display.right_top = cc.p(display.right, display.top)
+ display.right_bottom = cc.p(display.right, display.bottom)
+ display.right_center = cc.p(display.right, display.cy)
+ display.top_center = cc.p(display.cx, display.top)
+ display.top_bottom = cc.p(display.cx, display.bottom)
+
+ printInfo(string.format("# display.sizeInPixels = {width = %0.2f, height = %0.2f}", display.sizeInPixels.width, display.sizeInPixels.height))
+ printInfo(string.format("# display.size = {width = %0.2f, height = %0.2f}", display.size.width, display.size.height))
+ printInfo(string.format("# display.contentScaleFactor = %0.2f", display.contentScaleFactor))
+ printInfo(string.format("# display.width = %0.2f", display.width))
+ printInfo(string.format("# display.height = %0.2f", display.height))
+ printInfo(string.format("# display.cx = %0.2f", display.cx))
+ printInfo(string.format("# display.cy = %0.2f", display.cy))
+ printInfo(string.format("# display.left = %0.2f", display.left))
+ printInfo(string.format("# display.right = %0.2f", display.right))
+ printInfo(string.format("# display.top = %0.2f", display.top))
+ printInfo(string.format("# display.bottom = %0.2f", display.bottom))
+ printInfo(string.format("# display.c_left = %0.2f", display.c_left))
+ printInfo(string.format("# display.c_right = %0.2f", display.c_right))
+ printInfo(string.format("# display.c_top = %0.2f", display.c_top))
+ printInfo(string.format("# display.c_bottom = %0.2f", display.c_bottom))
+ printInfo(string.format("# display.center = {x = %0.2f, y = %0.2f}", display.center.x, display.center.y))
+ printInfo(string.format("# display.left_top = {x = %0.2f, y = %0.2f}", display.left_top.x, display.left_top.y))
+ printInfo(string.format("# display.left_bottom = {x = %0.2f, y = %0.2f}", display.left_bottom.x, display.left_bottom.y))
+ printInfo(string.format("# display.left_center = {x = %0.2f, y = %0.2f}", display.left_center.x, display.left_center.y))
+ printInfo(string.format("# display.right_top = {x = %0.2f, y = %0.2f}", display.right_top.x, display.right_top.y))
+ printInfo(string.format("# display.right_bottom = {x = %0.2f, y = %0.2f}", display.right_bottom.x, display.right_bottom.y))
+ printInfo(string.format("# display.right_center = {x = %0.2f, y = %0.2f}", display.right_center.x, display.right_center.y))
+ printInfo(string.format("# display.top_center = {x = %0.2f, y = %0.2f}", display.top_center.x, display.top_center.y))
+ printInfo(string.format("# display.top_bottom = {x = %0.2f, y = %0.2f}", display.top_bottom.x, display.top_bottom.y))
+ printInfo("#")
+end
+
+function display.setAutoScale(configs)
+ if type(configs) ~= "table" then return end
+
+ checkResolution(configs)
+ if type(configs.callback) == "function" then
+ local c = configs.callback(framesize)
+ for k, v in pairs(c or {}) do
+ configs[k] = v
+ end
+ checkResolution(configs)
+ end
+
+ setDesignResolution(configs, framesize)
+
+ printInfo(string.format("# design resolution size = {width = %0.2f, height = %0.2f}", configs.width, configs.height))
+ printInfo(string.format("# design resolution autoscale = %s", configs.autoscale))
+ setConstants()
+end
+
+if type(CC_DESIGN_RESOLUTION) == "table" then
+ display.setAutoScale(CC_DESIGN_RESOLUTION)
+end
+
+display.COLOR_WHITE = cc.c3b(255, 255, 255)
+display.COLOR_BLACK = cc.c3b(0, 0, 0)
+display.COLOR_RED = cc.c3b(255, 0, 0)
+display.COLOR_GREEN = cc.c3b(0, 255, 0)
+display.COLOR_BLUE = cc.c3b(0, 0, 255)
+
+display.AUTO_SIZE = 0
+display.FIXED_SIZE = 1
+display.LEFT_TO_RIGHT = 0
+display.RIGHT_TO_LEFT = 1
+display.TOP_TO_BOTTOM = 2
+display.BOTTOM_TO_TOP = 3
+
+display.CENTER = cc.p(0.5, 0.5)
+display.LEFT_TOP = cc.p(0, 1)
+display.LEFT_BOTTOM = cc.p(0, 0)
+display.LEFT_CENTER = cc.p(0, 0.5)
+display.RIGHT_TOP = cc.p(1, 1)
+display.RIGHT_BOTTOM = cc.p(1, 0)
+display.RIGHT_CENTER = cc.p(1, 0.5)
+display.CENTER_TOP = cc.p(0.5, 1)
+display.CENTER_BOTTOM = cc.p(0.5, 0)
+
+display.SCENE_TRANSITIONS = {
+ CROSSFADE = cc.TransitionCrossFade,
+ FADE = {cc.TransitionFade, cc.c3b(0, 0, 0)},
+ FADEBL = cc.TransitionFadeBL,
+ FADEDOWN = cc.TransitionFadeDown,
+ FADETR = cc.TransitionFadeTR,
+ FADEUP = cc.TransitionFadeUp,
+ FLIPANGULAR = {cc.TransitionFlipAngular, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ FLIPX = {cc.TransitionFlipX, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ FLIPY = {cc.TransitionFlipY, cc.TRANSITION_ORIENTATION_UP_OVER},
+ JUMPZOOM = cc.TransitionJumpZoom,
+ MOVEINB = cc.TransitionMoveInB,
+ MOVEINL = cc.TransitionMoveInL,
+ MOVEINR = cc.TransitionMoveInR,
+ MOVEINT = cc.TransitionMoveInT,
+ PAGETURN = {cc.TransitionPageTurn, false},
+ ROTOZOOM = cc.TransitionRotoZoom,
+ SHRINKGROW = cc.TransitionShrinkGrow,
+ SLIDEINB = cc.TransitionSlideInB,
+ SLIDEINL = cc.TransitionSlideInL,
+ SLIDEINR = cc.TransitionSlideInR,
+ SLIDEINT = cc.TransitionSlideInT,
+ SPLITCOLS = cc.TransitionSplitCols,
+ SPLITROWS = cc.TransitionSplitRows,
+ TURNOFFTILES = cc.TransitionTurnOffTiles,
+ ZOOMFLIPANGULAR = cc.TransitionZoomFlipAngular,
+ ZOOMFLIPX = {cc.TransitionZoomFlipX, cc.TRANSITION_ORIENTATION_LEFT_OVER},
+ ZOOMFLIPY = {cc.TransitionZoomFlipY, cc.TRANSITION_ORIENTATION_UP_OVER},
+}
+
+display.TEXTURES_PIXEL_FORMAT = {}
+
+display.DEFAULT_TTF_FONT = "Arial"
+display.DEFAULT_TTF_FONT_SIZE = 32
+
+
+local PARAMS_EMPTY = {}
+local RECT_ZERO = cc.rect(0, 0, 0, 0)
+
+local sceneIndex = 0
+function display.newScene(name, params)
+ params = params or PARAMS_EMPTY
+ sceneIndex = sceneIndex + 1
+ local scene
+ if not params.physics then
+ scene = cc.Scene:create()
+ else
+ scene = cc.Scene:createWithPhysics()
+ end
+ scene.name_ = string.format("%s:%d", name or "", sceneIndex)
+
+ if params.transition then
+ scene = display.wrapSceneWithTransition(scene, params.transition, params.time, params.more)
+ end
+
+ return scene
+end
+
+function display.wrapScene(scene, transition, time, more)
+ local key = string.upper(tostring(transition))
+
+ if key == "RANDOM" then
+ local keys = table.keys(display.SCENE_TRANSITIONS)
+ key = keys[math.random(1, #keys)]
+ end
+
+ if display.SCENE_TRANSITIONS[key] then
+ local t = display.SCENE_TRANSITIONS[key]
+ time = time or 0.2
+ more = more or t[2]
+ if type(t) == "table" then
+ scene = t[1]:create(time, scene, more)
+ else
+ scene = t:create(time, scene)
+ end
+ else
+ error(string.format("display.wrapScene() - invalid transition %s", tostring(transition)))
+ end
+ return scene
+end
+
+function display.runScene(newScene, transition, time, more)
+ if director:getRunningScene() then
+ if transition then
+ newScene = display.wrapScene(newScene, transition, time, more)
+ end
+ director:replaceScene(newScene)
+ else
+ director:runWithScene(newScene)
+ end
+end
+
+function display.getRunningScene()
+ return director:getRunningScene()
+end
+
+function display.newNode()
+ return cc.Node:create()
+end
+
+function display.newLayer(...)
+ local params = {...}
+ local c = #params
+ local layer
+ if c == 0 then
+ -- /** creates a fullscreen black layer */
+ -- static Layer *create();
+ layer = cc.Layer:create()
+ elseif c == 1 then
+ -- /** creates a Layer with color. Width and height are the window size. */
+ -- static LayerColor * create(const Color4B& color);
+ layer = cc.LayerColor:create(cc.convertColor(params[1], "4b"))
+ elseif c == 2 then
+ -- /** creates a Layer with color, width and height in Points */
+ -- static LayerColor * create(const Color4B& color, const Size& size);
+ --
+ -- /** Creates a full-screen Layer with a gradient between start and end. */
+ -- static LayerGradient* create(const Color4B& start, const Color4B& end);
+ local color1 = cc.convertColor(params[1], "4b")
+ local p2 = params[2]
+ assert(type(p2) == "table" and (p2.width or p2.r), "display.newLayer() - invalid paramerter 2")
+ if p2.r then
+ layer = cc.LayerGradient:create(color1, cc.convertColor(p2, "4b"))
+ else
+ layer = cc.LayerColor:create(color1, p2.width, p2.height)
+ end
+ elseif c == 3 then
+ -- /** creates a Layer with color, width and height in Points */
+ -- static LayerColor * create(const Color4B& color, GLfloat width, GLfloat height);
+ --
+ -- /** Creates a full-screen Layer with a gradient between start and end in the direction of v. */
+ -- static LayerGradient* create(const Color4B& start, const Color4B& end, const Vec2& v);
+ local color1 = cc.convertColor(params[1], "4b")
+ local p2 = params[2]
+ local p2type = type(p2)
+ if p2type == "table" then
+ layer = cc.LayerGradient:create(color1, cc.convertColor(p2, "4b"), params[3])
+ else
+ layer = cc.LayerColor:create(color1, p2, params[3])
+ end
+ end
+ return layer
+end
+
+function display.newSprite(source, x, y, params)
+ local spriteClass = cc.Sprite
+ local scale9 = false
+
+ if type(x) == "table" and not x.x then
+ -- x is params
+ params = x
+ x = nil
+ y = nil
+ end
+
+ local params = params or PARAMS_EMPTY
+ if params.scale9 or params.capInsets then
+ spriteClass = ccui.Scale9Sprite
+ scale9 = true
+ params.capInsets = params.capInsets or RECT_ZERO
+ params.rect = params.rect or RECT_ZERO
+ end
+
+ local sprite
+ while true do
+ -- create sprite
+ if not source then
+ sprite = spriteClass:create()
+ break
+ end
+
+ local sourceType = type(source)
+ if sourceType == "string" then
+ if string.byte(source) == 35 then -- first char is #
+ -- create sprite from spriteFrame
+ if not scale9 then
+ sprite = spriteClass:createWithSpriteFrameName(string.sub(source, 2))
+ else
+ sprite = spriteClass:createWithSpriteFrameName(string.sub(source, 2), params.capInsets)
+ end
+ break
+ end
+
+ -- create sprite from image file
+ if display.TEXTURES_PIXEL_FORMAT[source] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(display.TEXTURES_PIXEL_FORMAT[source])
+ end
+ if not scale9 then
+ sprite = spriteClass:create(source)
+ else
+ sprite = spriteClass:create(source, params.rect, params.capInsets)
+ end
+ if display.TEXTURES_PIXEL_FORMAT[source] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
+ end
+ break
+ elseif sourceType ~= "userdata" then
+ error(string.format("display.newSprite() - invalid source type \"%s\"", sourceType), 0)
+ else
+ sourceType = tolua.type(source)
+ if sourceType == "cc.SpriteFrame" then
+ if not scale9 then
+ sprite = spriteClass:createWithSpriteFrame(source)
+ else
+ sprite = spriteClass:createWithSpriteFrame(source, params.capInsets)
+ end
+ elseif sourceType == "cc.Texture2D" then
+ sprite = spriteClass:createWithTexture(source)
+ else
+ error(string.format("display.newSprite() - invalid source type \"%s\"", sourceType), 0)
+ end
+ end
+ break
+ end
+
+ if sprite then
+ if x and y then sprite:setPosition(x, y) end
+ if params.size then sprite:setContentSize(params.size) end
+ else
+ error(string.format("display.newSprite() - create sprite failure, source \"%s\"", tostring(source)), 0)
+ end
+
+ return sprite
+end
+
+function display.newSpriteFrame(source, ...)
+ local frame
+ if type(source) == "string" then
+ if string.byte(source) == 35 then -- first char is #
+ source = string.sub(source, 2)
+ end
+ frame = spriteFrameCache:getSpriteFrame(source)
+ if not frame then
+ error(string.format("display.newSpriteFrame() - invalid frame name \"%s\"", tostring(source)), 0)
+ end
+ elseif tolua.type(source) == "cc.Texture2D" then
+ frame = cc.SpriteFrame:createWithTexture(source, ...)
+ else
+ error("display.newSpriteFrame() - invalid parameters", 0)
+ end
+ return frame
+end
+
+function display.newFrames(pattern, begin, length, isReversed)
+ local frames = {}
+ local step = 1
+ local last = begin + length - 1
+ if isReversed then
+ last, begin = begin, last
+ step = -1
+ end
+
+ for index = begin, last, step do
+ local frameName = string.format(pattern, index)
+ local frame = spriteFrameCache:getSpriteFrame(frameName)
+ if not frame then
+ error(string.format("display.newFrames() - invalid frame name %s", tostring(frameName)), 0)
+ end
+ frames[#frames + 1] = frame
+ end
+ return frames
+end
+
+local function newAnimation(frames, time)
+ local count = #frames
+ assert(count > 0, "display.newAnimation() - invalid frames")
+ time = time or 1.0 / count
+ return cc.Animation:createWithSpriteFrames(frames, time),
+ cc.Sprite:createWithSpriteFrame(frames[1])
+end
+
+function display.newAnimation(...)
+ local params = {...}
+ local c = #params
+ if c == 2 then
+ -- frames, time
+ return newAnimation(params[1], params[2])
+ elseif c == 4 then
+ -- pattern, begin, length, time
+ local frames = display.newFrames(params[1], params[2], params[3])
+ return newAnimation(frames, params[4])
+ elseif c == 5 then
+ -- pattern, begin, length, isReversed, time
+ local frames = display.newFrames(params[1], params[2], params[3], params[4])
+ return newAnimation(frames, params[5])
+ else
+ error("display.newAnimation() - invalid parameters")
+ end
+end
+
+function display.loadImage(imageFilename, callback)
+ if not callback then
+ return textureCache:addImage(imageFilename)
+ else
+ textureCache:addImageAsync(imageFilename, callback)
+ end
+end
+
+local fileUtils = cc.FileUtils:getInstance()
+function display.getImage(imageFilename)
+ local fullpath = fileUtils:fullPathForFilename(imageFilename)
+ return textureCache:getTextureForKey(fullpath)
+end
+
+function display.removeImage(imageFilename)
+ textureCache:removeTextureForKey(imageFilename)
+end
+
+function display.loadSpriteFrames(dataFilename, imageFilename, callback)
+ if display.TEXTURES_PIXEL_FORMAT[imageFilename] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(display.TEXTURES_PIXEL_FORMAT[imageFilename])
+ end
+ if not callback then
+ spriteFrameCache:addSpriteFrames(dataFilename, imageFilename)
+ else
+ spriteFrameCache:addSpriteFramesAsync(dataFilename, imageFilename, callback)
+ end
+ if display.TEXTURES_PIXEL_FORMAT[imageFilename] then
+ cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
+ end
+end
+
+function display.removeSpriteFrames(dataFilename, imageFilename)
+ spriteFrameCache:removeSpriteFramesFromFile(dataFilename)
+ if imageFilename then
+ display.removeImage(imageFilename)
+ end
+end
+
+function display.removeSpriteFrame(imageFilename)
+ spriteFrameCache:removeSpriteFrameByName(imageFilename)
+end
+
+function display.setTexturePixelFormat(imageFilename, format)
+ display.TEXTURES_PIXEL_FORMAT[imageFilename] = format
+end
+
+function display.setAnimationCache(name, animation)
+ animationCache:addAnimation(animation, name)
+end
+
+function display.getAnimationCache(name)
+ return animationCache:getAnimation(name)
+end
+
+function display.removeAnimationCache(name)
+ animationCache:removeAnimation(name)
+end
+
+function display.removeUnusedSpriteFrames()
+ spriteFrameCache:removeUnusedSpriteFrames()
+ textureCache:removeUnusedTextures()
+end
+
+return display
diff --git a/src/cocos/framework/extends/LayerEx.lua b/src/cocos/framework/extends/LayerEx.lua
new file mode 100644
index 0000000..6bba1b2
--- /dev/null
+++ b/src/cocos/framework/extends/LayerEx.lua
@@ -0,0 +1,80 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Layer = cc.Layer
+
+function Layer:onTouch(callback, isMultiTouches, swallowTouches)
+ if type(isMultiTouches) ~= "boolean" then isMultiTouches = false end
+ if type(swallowTouches) ~= "boolean" then swallowTouches = false end
+
+ self:registerScriptTouchHandler(function(state, ...)
+ local args = {...}
+ local event = {name = state}
+ if isMultiTouches then
+ args = args[1]
+ local points = {}
+ for i = 1, #args, 3 do
+ local x, y, id = args[i], args[i + 1], args[i + 2]
+ points[id] = {x = x, y = y, id = id}
+ end
+ event.points = points
+ else
+ event.x = args[1]
+ event.y = args[2]
+ end
+ return callback( event )
+ end, isMultiTouches, 0, swallowTouches)
+ self:setTouchEnabled(true)
+ return self
+end
+
+function Layer:removeTouch()
+ self:unregisterScriptTouchHandler()
+ self:setTouchEnabled(false)
+ return self
+end
+
+function Layer:onKeypad(callback)
+ self:registerScriptKeypadHandler(callback)
+ self:setKeyboardEnabled(true)
+ return self
+end
+
+function Layer:removeKeypad()
+ self:unregisterScriptKeypadHandler()
+ self:setKeyboardEnabled(false)
+ return self
+end
+
+function Layer:onAccelerate(callback)
+ self:registerScriptAccelerateHandler(callback)
+ self:setAccelerometerEnabled(true)
+ return self
+end
+
+function Layer:removeAccelerate()
+ self:unregisterScriptAccelerateHandler()
+ self:setAccelerometerEnabled(false)
+ return self
+end
diff --git a/src/cocos/framework/extends/MenuEx.lua b/src/cocos/framework/extends/MenuEx.lua
new file mode 100644
index 0000000..1639327
--- /dev/null
+++ b/src/cocos/framework/extends/MenuEx.lua
@@ -0,0 +1,31 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Menu = cc.Menu
+local MenuItem = cc.MenuItem
+
+function MenuItem:onClicked(callback)
+ self:registerScriptTapHandler(callback)
+ return self
+end
diff --git a/src/cocos/framework/extends/NodeEx.lua b/src/cocos/framework/extends/NodeEx.lua
new file mode 100644
index 0000000..a15807b
--- /dev/null
+++ b/src/cocos/framework/extends/NodeEx.lua
@@ -0,0 +1,228 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Node = cc.Node
+
+function Node:add(child, zorder, tag)
+ if tag then
+ self:addChild(child, zorder, tag)
+ elseif zorder then
+ self:addChild(child, zorder)
+ else
+ self:addChild(child)
+ end
+ return self
+end
+
+function Node:addTo(parent, zorder, tag)
+ if tag then
+ parent:addChild(self, zorder, tag)
+ elseif zorder then
+ parent:addChild(self, zorder)
+ else
+ parent:addChild(self)
+ end
+ return self
+end
+
+function Node:removeSelf()
+ self:removeFromParent()
+ return self
+end
+
+function Node:align(anchorPoint, x, y)
+ self:setAnchorPoint(anchorPoint)
+ return self:move(x, y)
+end
+
+function Node:show()
+ self:setVisible(true)
+ return self
+end
+
+function Node:hide()
+ self:setVisible(false)
+ return self
+end
+
+function Node:move(x, y)
+ if y then
+ self:setPosition(x, y)
+ else
+ self:setPosition(x)
+ end
+ return self
+end
+
+function Node:moveTo(args)
+ transition.moveTo(self, args)
+ return self
+end
+
+function Node:moveBy(args)
+ transition.moveBy(self, args)
+ return self
+end
+
+function Node:fadeIn(args)
+ transition.fadeIn(self, args)
+ return self
+end
+
+function Node:fadeOut(args)
+ transition.fadeOut(self, args)
+ return self
+end
+
+function Node:fadeTo(args)
+ transition.fadeTo(self, args)
+ return self
+end
+
+function Node:rotate(rotation)
+ self:setRotation(rotation)
+ return self
+end
+
+function Node:rotateTo(args)
+ transition.rotateTo(self, args)
+ return self
+end
+
+function Node:rotateBy(args)
+ transition.rotateBy(self, args)
+ return self
+end
+
+function Node:scaleTo(args)
+ transition.scaleTo(self, args)
+ return self
+end
+
+function Node:onUpdate(callback)
+ self:scheduleUpdateWithPriorityLua(callback, 0)
+ return self
+end
+
+Node.scheduleUpdate = Node.onUpdate
+
+function Node:onNodeEvent(eventName, callback)
+ if "enter" == eventName then
+ self.onEnterCallback_ = callback
+ elseif "exit" == eventName then
+ self.onExitCallback_ = callback
+ elseif "enterTransitionFinish" == eventName then
+ self.onEnterTransitionFinishCallback_ = callback
+ elseif "exitTransitionStart" == eventName then
+ self.onExitTransitionStartCallback_ = callback
+ elseif "cleanup" == eventName then
+ self.onCleanupCallback_ = callback
+ end
+ self:enableNodeEvents()
+end
+
+function Node:enableNodeEvents()
+ if self.isNodeEventEnabled_ then
+ return self
+ end
+
+ self:registerScriptHandler(function(state)
+ if state == "enter" then
+ self:onEnter_()
+ elseif state == "exit" then
+ self:onExit_()
+ elseif state == "enterTransitionFinish" then
+ self:onEnterTransitionFinish_()
+ elseif state == "exitTransitionStart" then
+ self:onExitTransitionStart_()
+ elseif state == "cleanup" then
+ self:onCleanup_()
+ end
+ end)
+ self.isNodeEventEnabled_ = true
+
+ return self
+end
+
+function Node:disableNodeEvents()
+ self:unregisterScriptHandler()
+ self.isNodeEventEnabled_ = false
+ return self
+end
+
+
+function Node:onEnter()
+end
+
+function Node:onExit()
+end
+
+function Node:onEnterTransitionFinish()
+end
+
+function Node:onExitTransitionStart()
+end
+
+function Node:onCleanup()
+end
+
+function Node:onEnter_()
+ self:onEnter()
+ if not self.onEnterCallback_ then
+ return
+ end
+ self:onEnterCallback_()
+end
+
+function Node:onExit_()
+ self:onExit()
+ if not self.onExitCallback_ then
+ return
+ end
+ self:onExitCallback_()
+end
+
+function Node:onEnterTransitionFinish_()
+ self:onEnterTransitionFinish()
+ if not self.onEnterTransitionFinishCallback_ then
+ return
+ end
+ self:onEnterTransitionFinishCallback_()
+end
+
+function Node:onExitTransitionStart_()
+ self:onExitTransitionStart()
+ if not self.onExitTransitionStartCallback_ then
+ return
+ end
+ self:onExitTransitionStartCallback_()
+end
+
+function Node:onCleanup_()
+ self:onCleanup()
+ if not self.onCleanupCallback_ then
+ return
+ end
+ self:onCleanupCallback_()
+end
diff --git a/src/cocos/framework/extends/SpriteEx.lua b/src/cocos/framework/extends/SpriteEx.lua
new file mode 100644
index 0000000..0f1c8f7
--- /dev/null
+++ b/src/cocos/framework/extends/SpriteEx.lua
@@ -0,0 +1,67 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Sprite = cc.Sprite
+
+function Sprite:playAnimationOnce(animation, args)
+ local actions = {}
+
+ local showDelay = args.showDelay or 0
+ if showDelay then
+ self:setVisible(false)
+ actions[#actions + 1] = cc.DelayTime:create(showDelay)
+ actions[#actions + 1] = cc.Show:create()
+ end
+
+ local delay = args.delay or 0
+ if delay > 0 then
+ actions[#actions + 1] = cc.DelayTime:create(delay)
+ end
+
+ actions[#actions + 1] = cc.Animate:create(animation)
+
+ if args.removeSelf then
+ actions[#actions + 1] = cc.RemoveSelf:create()
+ end
+
+ if args.onComplete then
+ actions[#actions + 1] = cc.CallFunc:create(args.onComplete)
+ end
+
+ local action
+ if #actions > 1 then
+ action = cc.Sequence:create(actions)
+ else
+ action = actions[1]
+ end
+ self:runAction(action)
+ return action
+end
+
+function Sprite:playAnimationForever(animation)
+ local animate = cc.Animate:create(animation)
+ local action = cc.RepeatForever:create(animate)
+ self:runAction(action)
+ return action
+end
diff --git a/src/cocos/framework/extends/UICheckBox.lua b/src/cocos/framework/extends/UICheckBox.lua
new file mode 100644
index 0000000..0707f82
--- /dev/null
+++ b/src/cocos/framework/extends/UICheckBox.lua
@@ -0,0 +1,40 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local CheckBox = ccui.CheckBox
+
+function CheckBox:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "selected"
+ else
+ event.name = "unselected"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/extends/UIEditBox.lua b/src/cocos/framework/extends/UIEditBox.lua
new file mode 100644
index 0000000..11b39ba
--- /dev/null
+++ b/src/cocos/framework/extends/UIEditBox.lua
@@ -0,0 +1,41 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local EditBox = ccui.EditBox
+
+function EditBox:onEditHandler(callback)
+ self:registerScriptEditBoxHandler(function(name, sender)
+ local event = {}
+ event.name = name
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+function EditBox:removeEditHandler()
+ self:unregisterScriptEditBoxHandler()
+ return self
+end
diff --git a/src/cocos/framework/extends/UIListView.lua b/src/cocos/framework/extends/UIListView.lua
new file mode 100644
index 0000000..cab47a9
--- /dev/null
+++ b/src/cocos/framework/extends/UIListView.lua
@@ -0,0 +1,68 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local ListView = ccui.ListView
+
+function ListView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ON_SELECTED_ITEM_START"
+ else
+ event.name = "ON_SELECTED_ITEM_END"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+function ListView:onScroll(callback)
+ self:addScrollViewEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "SCROLL_TO_TOP"
+ elseif eventType == 1 then
+ event.name = "SCROLL_TO_BOTTOM"
+ elseif eventType == 2 then
+ event.name = "SCROLL_TO_LEFT"
+ elseif eventType == 3 then
+ event.name = "SCROLL_TO_RIGHT"
+ elseif eventType == 4 then
+ event.name = "SCROLLING"
+ elseif eventType == 5 then
+ event.name = "BOUNCE_TOP"
+ elseif eventType == 6 then
+ event.name = "BOUNCE_BOTTOM"
+ elseif eventType == 7 then
+ event.name = "BOUNCE_LEFT"
+ elseif eventType == 8 then
+ event.name = "BOUNCE_RIGHT"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/extends/UIPageView.lua b/src/cocos/framework/extends/UIPageView.lua
new file mode 100644
index 0000000..42c0c9f
--- /dev/null
+++ b/src/cocos/framework/extends/UIPageView.lua
@@ -0,0 +1,38 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local PageView = ccui.PageView
+
+function PageView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "TURNING"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/extends/UIScrollView.lua b/src/cocos/framework/extends/UIScrollView.lua
new file mode 100644
index 0000000..601faf9
--- /dev/null
+++ b/src/cocos/framework/extends/UIScrollView.lua
@@ -0,0 +1,56 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local ScrollView = ccui.ScrollView
+
+function ScrollView:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "SCROLL_TO_TOP"
+ elseif eventType == 1 then
+ event.name = "SCROLL_TO_BOTTOM"
+ elseif eventType == 2 then
+ event.name = "SCROLL_TO_LEFT"
+ elseif eventType == 3 then
+ event.name = "SCROLL_TO_RIGHT"
+ elseif eventType == 4 then
+ event.name = "SCROLLING"
+ elseif eventType == 5 then
+ event.name = "BOUNCE_TOP"
+ elseif eventType == 6 then
+ event.name = "BOUNCE_BOTTOM"
+ elseif eventType == 7 then
+ event.name = "BOUNCE_LEFT"
+ elseif eventType == 8 then
+ event.name = "BOUNCE_RIGHT"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
+
+ScrollView.onScroll = ScrollView.onEvent
diff --git a/src/cocos/framework/extends/UISlider.lua b/src/cocos/framework/extends/UISlider.lua
new file mode 100644
index 0000000..68109b5
--- /dev/null
+++ b/src/cocos/framework/extends/UISlider.lua
@@ -0,0 +1,38 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Slider = ccui.Slider
+
+function Slider:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ON_PERCENTAGE_CHANGED"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/extends/UITextField.lua b/src/cocos/framework/extends/UITextField.lua
new file mode 100644
index 0000000..2574333
--- /dev/null
+++ b/src/cocos/framework/extends/UITextField.lua
@@ -0,0 +1,44 @@
+
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local TextField = ccui.TextField
+
+function TextField:onEvent(callback)
+ self:addEventListener(function(sender, eventType)
+ local event = {}
+ if eventType == 0 then
+ event.name = "ATTACH_WITH_IME"
+ elseif eventType == 1 then
+ event.name = "DETACH_WITH_IME"
+ elseif eventType == 2 then
+ event.name = "INSERT_TEXT"
+ elseif eventType == 3 then
+ event.name = "DELETE_BACKWARD"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/extends/UIWidget.lua b/src/cocos/framework/extends/UIWidget.lua
new file mode 100644
index 0000000..59754d6
--- /dev/null
+++ b/src/cocos/framework/extends/UIWidget.lua
@@ -0,0 +1,43 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local Widget = ccui.Widget
+
+function Widget:onTouch(callback)
+ self:addTouchEventListener(function(sender, state)
+ local event = {x = 0, y = 0}
+ if state == 0 then
+ event.name = "began"
+ elseif state == 1 then
+ event.name = "moved"
+ elseif state == 2 then
+ event.name = "ended"
+ else
+ event.name = "cancelled"
+ end
+ event.target = sender
+ callback(event)
+ end)
+ return self
+end
diff --git a/src/cocos/framework/init.lua b/src/cocos/framework/init.lua
new file mode 100644
index 0000000..89a7672
--- /dev/null
+++ b/src/cocos/framework/init.lua
@@ -0,0 +1,82 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+if type(DEBUG) ~= "number" then DEBUG = 0 end
+
+-- load framework
+printInfo("")
+printInfo("# DEBUG = " .. DEBUG)
+printInfo("#")
+
+device = require("cocos.framework.device")
+display = require("cocos.framework.display")
+audio = require("cocos.framework.audio")
+transition = require("cocos.framework.transition")
+
+require("cocos.framework.extends.NodeEx")
+require("cocos.framework.extends.SpriteEx")
+require("cocos.framework.extends.LayerEx")
+require("cocos.framework.extends.MenuEx")
+
+if ccui then
+require("cocos.framework.extends.UIWidget")
+require("cocos.framework.extends.UICheckBox")
+require("cocos.framework.extends.UIEditBox")
+require("cocos.framework.extends.UIListView")
+require("cocos.framework.extends.UIPageView")
+require("cocos.framework.extends.UIScrollView")
+require("cocos.framework.extends.UISlider")
+require("cocos.framework.extends.UITextField")
+end
+
+require("cocos.framework.package_support")
+
+-- register the build-in packages
+cc.register("event", require("cocos.framework.components.event"))
+
+-- export global variable
+local __g = _G
+cc.exports = {}
+setmetatable(cc.exports, {
+ __newindex = function(_, name, value)
+ rawset(__g, name, value)
+ end,
+
+ __index = function(_, name)
+ return rawget(__g, name)
+ end
+})
+
+-- disable create unexpected global variable
+function cc.disable_global()
+ setmetatable(__g, {
+ __newindex = function(_, name, value)
+ error(string.format("USE \" cc.exports.%s = value \" INSTEAD OF SET GLOBAL VARIABLE", name), 0)
+ end
+ })
+end
+
+if CC_DISABLE_GLOBAL then
+ cc.disable_global()
+end
diff --git a/src/cocos/framework/package_support.lua b/src/cocos/framework/package_support.lua
new file mode 100644
index 0000000..e5c5e14
--- /dev/null
+++ b/src/cocos/framework/package_support.lua
@@ -0,0 +1,113 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+-- Cocos2d-Lua core functions
+cc.loaded_packages = {}
+local loaded_packages = cc.loaded_packages
+
+function cc.register(name, package)
+ cc.loaded_packages[name] = package
+end
+
+function cc.load(...)
+ local names = {...}
+ assert(#names > 0, "cc.load() - invalid package names")
+
+ local packages = {}
+ for _, name in ipairs(names) do
+ assert(type(name) == "string", string.format("cc.load() - invalid package name \"%s\"", tostring(name)))
+ if not loaded_packages[name] then
+ local packageName = string.format("packages.%s.init", name)
+ local cls = require(packageName)
+ assert(cls, string.format("cc.load() - package class \"%s\" load failed", packageName))
+ loaded_packages[name] = cls
+
+ if DEBUG > 1 then
+ printInfo("cc.load() - load module \"packages.%s.init\"", name)
+ end
+ end
+ packages[#packages + 1] = loaded_packages[name]
+ end
+ return unpack(packages)
+end
+
+local load_ = cc.load
+local bind_
+bind_ = function(target, ...)
+ local t = type(target)
+ assert(t == "table" or t == "userdata", string.format("cc.bind() - invalid target, expected is object, actual is %s", t))
+ local names = {...}
+ assert(#names > 0, "cc.bind() - package names expected")
+
+ load_(...)
+ if not target.components_ then target.components_ = {} end
+ for _, name in ipairs(names) do
+ assert(type(name) == "string" and name ~= "", string.format("cc.bind() - invalid package name \"%s\"", name))
+ if not target.components_[name] then
+ local cls = loaded_packages[name]
+ for __, depend in ipairs(cls.depends or {}) do
+ if not target.components_[depend] then
+ bind_(target, depend)
+ end
+ end
+ local component = cls:create()
+ target.components_[name] = component
+ component:bind(target)
+ end
+ end
+
+ return target
+end
+cc.bind = bind_
+
+function cc.unbind(target, ...)
+ if not target.components_ then return end
+
+ local names = {...}
+ assert(#names > 0, "cc.unbind() - invalid package names")
+
+ for _, name in ipairs(names) do
+ assert(type(name) == "string" and name ~= "", string.format("cc.unbind() - invalid package name \"%s\"", name))
+ local component = target.components_[name]
+ assert(component, string.format("cc.unbind() - component \"%s\" not found", tostring(name)))
+ component:unbind(target)
+ target.components_[name] = nil
+ end
+ return target
+end
+
+function cc.setmethods(target, component, methods)
+ for _, name in ipairs(methods) do
+ local method = component[name]
+ target[name] = function(__, ...)
+ return method(component, ...)
+ end
+ end
+end
+
+function cc.unsetmethods(target, methods)
+ for _, name in ipairs(methods) do
+ target[name] = nil
+ end
+end
diff --git a/src/cocos/framework/transition.lua b/src/cocos/framework/transition.lua
new file mode 100644
index 0000000..78c4412
--- /dev/null
+++ b/src/cocos/framework/transition.lua
@@ -0,0 +1,213 @@
+--[[
+
+Copyright (c) 2011-2014 chukong-inc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+local transition = {}
+
+local ACTION_EASING = {}
+ACTION_EASING["BACKIN"] = {cc.EaseBackIn, 1}
+ACTION_EASING["BACKINOUT"] = {cc.EaseBackInOut, 1}
+ACTION_EASING["BACKOUT"] = {cc.EaseBackOut, 1}
+ACTION_EASING["BOUNCE"] = {cc.EaseBounce, 1}
+ACTION_EASING["BOUNCEIN"] = {cc.EaseBounceIn, 1}
+ACTION_EASING["BOUNCEINOUT"] = {cc.EaseBounceInOut, 1}
+ACTION_EASING["BOUNCEOUT"] = {cc.EaseBounceOut, 1}
+ACTION_EASING["ELASTIC"] = {cc.EaseElastic, 2, 0.3}
+ACTION_EASING["ELASTICIN"] = {cc.EaseElasticIn, 2, 0.3}
+ACTION_EASING["ELASTICINOUT"] = {cc.EaseElasticInOut, 2, 0.3}
+ACTION_EASING["ELASTICOUT"] = {cc.EaseElasticOut, 2, 0.3}
+ACTION_EASING["EXPONENTIALIN"] = {cc.EaseExponentialIn, 1}
+ACTION_EASING["EXPONENTIALINOUT"] = {cc.EaseExponentialInOut, 1}
+ACTION_EASING["EXPONENTIALOUT"] = {cc.EaseExponentialOut, 1}
+ACTION_EASING["IN"] = {cc.EaseIn, 2, 1}
+ACTION_EASING["INOUT"] = {cc.EaseInOut, 2, 1}
+ACTION_EASING["OUT"] = {cc.EaseOut, 2, 1}
+ACTION_EASING["RATEACTION"] = {cc.EaseRateAction, 2, 1}
+ACTION_EASING["SINEIN"] = {cc.EaseSineIn, 1}
+ACTION_EASING["SINEINOUT"] = {cc.EaseSineInOut, 1}
+ACTION_EASING["SINEOUT"] = {cc.EaseSineOut, 1}
+
+local actionManager = cc.Director:getInstance():getActionManager()
+
+function transition.newEasing(action, easingName, more)
+ local key = string.upper(tostring(easingName))
+ local easing
+ if ACTION_EASING[key] then
+ local cls, count, default = unpack(ACTION_EASING[key])
+ if count == 2 then
+ easing = cls:create(action, more or default)
+ else
+ easing = cls:create(action)
+ end
+ end
+ return easing or action
+end
+
+function transition.create(action, args)
+ args = checktable(args)
+ if args.easing then
+ if type(args.easing) == "table" then
+ action = transition.newEasing(action, unpack(args.easing))
+ else
+ action = transition.newEasing(action, args.easing)
+ end
+ end
+
+ local actions = {}
+ local delay = checknumber(args.delay)
+ if delay > 0 then
+ actions[#actions + 1] = cc.DelayTime:create(delay)
+ end
+ actions[#actions + 1] = action
+
+ local onComplete = args.onComplete
+ if type(onComplete) ~= "function" then onComplete = nil end
+ if onComplete then
+ actions[#actions + 1] = cc.CallFunc:create(onComplete)
+ end
+
+ if args.removeSelf then
+ actions[#actions + 1] = cc.RemoveSelf:create()
+ end
+
+ if #actions > 1 then
+ return transition.sequence(actions)
+ else
+ return actions[1]
+ end
+end
+
+function transition.execute(target, action, args)
+ assert(not tolua.isnull(target), "transition.execute() - target is not cc.Node")
+ local action = transition.create(action, args)
+ target:runAction(action)
+ return action
+end
+
+function transition.moveTo(target, args)
+ assert(not tolua.isnull(target), "transition.moveTo() - target is not cc.Node")
+ local x = args.x or target:getPositionX()
+ local y = args.y or target:getPositionY()
+ local action = cc.MoveTo:create(args.time, cc.p(x, y))
+ return transition.execute(target, action, args)
+end
+
+function transition.moveBy(target, args)
+ assert(not tolua.isnull(target), "transition.moveBy() - target is not cc.Node")
+ local x = args.x or 0
+ local y = args.y or 0
+ local action = cc.MoveBy:create(args.time, cc.p(x, y))
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeIn(target, args)
+ assert(not tolua.isnull(target), "transition.fadeIn() - target is not cc.Node")
+ local action = cc.FadeIn:create(args.time)
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeOut(target, args)
+ assert(not tolua.isnull(target), "transition.fadeOut() - target is not cc.Node")
+ local action = cc.FadeOut:create(args.time)
+ return transition.execute(target, action, args)
+end
+
+function transition.fadeTo(target, args)
+ assert(not tolua.isnull(target), "transition.fadeTo() - target is not cc.Node")
+ local opacity = checkint(args.opacity)
+ if opacity < 0 then
+ opacity = 0
+ elseif opacity > 255 then
+ opacity = 255
+ end
+ local action = cc.FadeTo:create(args.time, opacity)
+ return transition.execute(target, action, args)
+end
+
+function transition.scaleTo(target, args)
+ assert(not tolua.isnull(target), "transition.scaleTo() - target is not cc.Node")
+ local action
+ if args.scale then
+ action = cc.ScaleTo:create(checknumber(args.time), checknumber(args.scale))
+ elseif args.scaleX or args.scaleY then
+ local scaleX, scaleY
+ if args.scaleX then
+ scaleX = checknumber(args.scaleX)
+ else
+ scaleX = target:getScaleX()
+ end
+ if args.scaleY then
+ scaleY = checknumber(args.scaleY)
+ else
+ scaleY = target:getScaleY()
+ end
+ action = cc.ScaleTo:create(checknumber(args.time), scaleX, scaleY)
+ end
+ return transition.execute(target, action, args)
+end
+
+function transition.rotateTo(target, args)
+ assert(not tolua.isnull(target), "transition.rotateTo() - target is not cc.Node")
+ local rotation = args.rotation or target:getRotation()
+ local action = cc.RotateTo:create(args.time, rotation)
+ return transition.execute(target, action, args)
+end
+
+function transition.rotateBy(target, args)
+ assert(not tolua.isnull(target), "transition.rotateTo() - target is not cc.Node")
+ local rotation = args.rotation or 0
+ local action = cc.RotateBy:create(args.time, rotation)
+ return transition.execute(target, action, args)
+end
+
+function transition.sequence(actions)
+ if #actions < 1 then return end
+ if #actions < 2 then return actions[1] end
+ return cc.Sequence:create(actions)
+end
+
+function transition.removeAction(action)
+ if not tolua.isnull(action) then
+ actionManager:removeAction(action)
+ end
+end
+
+function transition.stopTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:removeAllActionsFromTarget(target)
+ end
+end
+
+function transition.pauseTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:pauseTarget(target)
+ end
+end
+
+function transition.resumeTarget(target)
+ if not tolua.isnull(target) then
+ actionManager:resumeTarget(target)
+ end
+end
+
+return transition
diff --git a/src/cocos/init.lua b/src/cocos/init.lua
new file mode 100644
index 0000000..92fc120
--- /dev/null
+++ b/src/cocos/init.lua
@@ -0,0 +1,109 @@
+--[[
+
+Copyright (c) 2011-2015 chukong-incc.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+]]
+
+require "cocos.cocos2d.Cocos2d"
+require "cocos.cocos2d.Cocos2dConstants"
+require "cocos.cocos2d.functions"
+
+__G__TRACKBACK__ = function(msg)
+ local msg = debug.traceback(msg, 3)
+ print(msg)
+ return msg
+end
+
+-- opengl
+require "cocos.cocos2d.Opengl"
+require "cocos.cocos2d.OpenglConstants"
+-- audio
+require "cocos.cocosdenshion.AudioEngine"
+-- cocosstudio
+if nil ~= ccs then
+ require "cocos.cocostudio.CocoStudio"
+end
+-- ui
+if nil ~= ccui then
+ require "cocos.ui.GuiConstants"
+ require "cocos.ui.experimentalUIConstants"
+end
+
+-- extensions
+require "cocos.extension.ExtensionConstants"
+-- network
+require "cocos.network.NetworkConstants"
+-- Spine
+if nil ~= sp then
+ require "cocos.spine.SpineConstants"
+end
+
+require "cocos.cocos2d.deprecated"
+require "cocos.cocos2d.DrawPrimitives"
+
+-- Lua extensions
+require "cocos.cocos2d.bitExtend"
+
+-- CCLuaEngine
+require "cocos.cocos2d.DeprecatedCocos2dClass"
+require "cocos.cocos2d.DeprecatedCocos2dEnum"
+require "cocos.cocos2d.DeprecatedCocos2dFunc"
+require "cocos.cocos2d.DeprecatedOpenglEnum"
+
+-- register_cocostudio_module
+if nil ~= ccs then
+ require "cocos.cocostudio.DeprecatedCocoStudioClass"
+ require "cocos.cocostudio.DeprecatedCocoStudioFunc"
+end
+
+
+-- register_cocosbuilder_module
+require "cocos.cocosbuilder.DeprecatedCocosBuilderClass"
+
+-- register_cocosdenshion_module
+require "cocos.cocosdenshion.DeprecatedCocosDenshionClass"
+require "cocos.cocosdenshion.DeprecatedCocosDenshionFunc"
+
+-- register_extension_module
+require "cocos.extension.DeprecatedExtensionClass"
+require "cocos.extension.DeprecatedExtensionEnum"
+require "cocos.extension.DeprecatedExtensionFunc"
+
+-- register_network_module
+require "cocos.network.DeprecatedNetworkClass"
+require "cocos.network.DeprecatedNetworkEnum"
+require "cocos.network.DeprecatedNetworkFunc"
+
+-- register_ui_moudle
+if nil ~= ccui then
+ require "cocos.ui.DeprecatedUIEnum"
+ require "cocos.ui.DeprecatedUIFunc"
+end
+
+-- cocosbuilder
+require "cocos.cocosbuilder.CCBReaderLoad"
+
+-- physics3d
+require "cocos.physics3d.physics3d-constants"
+
+if CC_USE_FRAMEWORK then
+ require "cocos.framework.init"
+end
diff --git a/src/cocos/network/DeprecatedNetworkClass.lua b/src/cocos/network/DeprecatedNetworkClass.lua
new file mode 100644
index 0000000..06e280b
--- /dev/null
+++ b/src/cocos/network/DeprecatedNetworkClass.lua
@@ -0,0 +1,19 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+-- This is the DeprecatedNetworkClass
+
+DeprecatedNetworkClass = {} or DeprecatedNetworkClass
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--WebSocket class will be Deprecated,begin
+function DeprecatedNetworkClass.WebSocket()
+ deprecatedTip("WebSocket","cc.WebSocket")
+ return cc.WebSocket
+end
+_G["WebSocket"] = DeprecatedNetworkClass.WebSocket()
+--WebSocket class will be Deprecated,end
diff --git a/src/cocos/network/DeprecatedNetworkEnum.lua b/src/cocos/network/DeprecatedNetworkEnum.lua
new file mode 100644
index 0000000..da08d35
--- /dev/null
+++ b/src/cocos/network/DeprecatedNetworkEnum.lua
@@ -0,0 +1,13 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+_G.kWebSocketScriptHandlerOpen = cc.WEBSOCKET_OPEN
+_G.kWebSocketScriptHandlerMessage = cc.WEBSOCKET_MESSAGE
+_G.kWebSocketScriptHandlerClose = cc.WEBSOCKET_CLOSE
+_G.kWebSocketScriptHandlerError = cc.WEBSOCKET_ERROR
+
+_G.kStateConnecting = cc.WEBSOCKET_STATE_CONNECTING
+_G.kStateOpen = cc.WEBSOCKET_STATE_OPEN
+_G.kStateClosing = cc.WEBSOCKET_STATE_CLOSING
+_G.kStateClosed = cc.WEBSOCKET_STATE_CLOSED
diff --git a/src/cocos/network/DeprecatedNetworkFunc.lua b/src/cocos/network/DeprecatedNetworkFunc.lua
new file mode 100644
index 0000000..f114392
--- /dev/null
+++ b/src/cocos/network/DeprecatedNetworkFunc.lua
@@ -0,0 +1,27 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of WebSocket will be deprecated begin
+local targetPlatform = CCApplication:getInstance():getTargetPlatform()
+if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTargetAndroid == targetPlatform) or (kTargetWindows == targetPlatform) then
+ local WebSocketDeprecated = { }
+ function WebSocketDeprecated.sendTextMsg(self, string)
+ deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString")
+ return self:sendString(string)
+ end
+ WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg
+
+ function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize)
+ deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString")
+ string.char(unpack(table))
+ return self:sendString(string.char(unpack(table)))
+ end
+ WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg
+end
+--functions of WebSocket will be deprecated end
diff --git a/src/cocos/network/NetworkConstants.lua b/src/cocos/network/NetworkConstants.lua
new file mode 100644
index 0000000..ee18d55
--- /dev/null
+++ b/src/cocos/network/NetworkConstants.lua
@@ -0,0 +1,19 @@
+if nil == cc.XMLHttpRequest then
+ return
+end
+
+cc.WEBSOCKET_OPEN = 0
+cc.WEBSOCKET_MESSAGE = 1
+cc.WEBSOCKET_CLOSE = 2
+cc.WEBSOCKET_ERROR = 3
+
+cc.WEBSOCKET_STATE_CONNECTING = 0
+cc.WEBSOCKET_STATE_OPEN = 1
+cc.WEBSOCKET_STATE_CLOSING = 2
+cc.WEBSOCKET_STATE_CLOSED = 3
+
+cc.XMLHTTPREQUEST_RESPONSE_STRING = 0
+cc.XMLHTTPREQUEST_RESPONSE_ARRAY_BUFFER = 1
+cc.XMLHTTPREQUEST_RESPONSE_BLOB = 2
+cc.XMLHTTPREQUEST_RESPONSE_DOCUMENT = 3
+cc.XMLHTTPREQUEST_RESPONSE_JSON = 4
diff --git a/src/cocos/physics3d/physics3d-constants.lua b/src/cocos/physics3d/physics3d-constants.lua
new file mode 100644
index 0000000..f33cef9
--- /dev/null
+++ b/src/cocos/physics3d/physics3d-constants.lua
@@ -0,0 +1,17 @@
+if nil == cc.Physics3DComponent then
+ return
+end
+
+cc.Physics3DComponent.PhysicsSyncFlag =
+{
+ NONE = 0,
+ NODE_TO_PHYSICS = 1,
+ PHYSICS_TO_NODE = 2,
+ NODE_AND_NODE = 3,
+}
+
+cc.Physics3DObject.PhysicsObjType =
+{
+ UNKNOWN = 0,
+ RIGID_BODY = 1,
+}
\ No newline at end of file
diff --git a/src/cocos/spine/SpineConstants.lua b/src/cocos/spine/SpineConstants.lua
new file mode 100644
index 0000000..a7d7dfa
--- /dev/null
+++ b/src/cocos/spine/SpineConstants.lua
@@ -0,0 +1,11 @@
+if nil == sp then
+ return
+end
+
+sp.EventType =
+{
+ ANIMATION_START = 0,
+ ANIMATION_END = 1,
+ ANIMATION_COMPLETE = 2,
+ ANIMATION_EVENT = 3,
+}
diff --git a/src/cocos/ui/DeprecatedUIEnum.lua b/src/cocos/ui/DeprecatedUIEnum.lua
new file mode 100644
index 0000000..ae7d63f
--- /dev/null
+++ b/src/cocos/ui/DeprecatedUIEnum.lua
@@ -0,0 +1,94 @@
+if nil == ccui then
+ return
+end
+
+LAYOUT_COLOR_NONE = ccui.LayoutBackGroundColorType.none
+LAYOUT_COLOR_SOLID = ccui.LayoutBackGroundColorType.solid
+LAYOUT_COLOR_GRADIENT = ccui.LayoutBackGroundColorType.gradient
+
+LAYOUT_ABSOLUTE = ccui.LayoutType.ABSOLUTE
+LAYOUT_LINEAR_VERTICAL = ccui.LayoutType.VERTICAL
+LAYOUT_LINEAR_HORIZONTAL = ccui.LayoutType.HORIZONTAL
+LAYOUT_RELATIVE = ccui.LayoutType.RELATIVE
+
+BRIGHT_NONE = ccui.BrightStyle.none
+BRIGHT_NORMAL = ccui.BrightStyle.normal
+BRIGHT_HIGHLIGHT = ccui.BrightStyle.highlight
+
+UI_TEX_TYPE_LOCAL = ccui.TextureResType.localType
+UI_TEX_TYPE_PLIST = ccui.TextureResType.plistType
+
+TOUCH_EVENT_BEGAN = ccui.TouchEventType.began
+TOUCH_EVENT_MOVED = ccui.TouchEventType.moved
+TOUCH_EVENT_ENDED = ccui.TouchEventType.ended
+TOUCH_EVENT_CANCELED = ccui.TouchEventType.canceled
+
+SIZE_ABSOLUTE = ccui.SizeType.absolute
+SIZE_PERCENT = ccui.SizeType.percent
+
+POSITION_ABSOLUTE = ccui.PositionType.absolute
+POSITION_PERCENT = ccui.PositionType.percent
+
+CHECKBOX_STATE_EVENT_SELECTED = ccui.CheckBoxEventType.selected
+CHECKBOX_STATE_EVENT_UNSELECTED = ccui.CheckBoxEventType.unselected
+
+CHECKBOX_STATE_EVENT_SELECTED = ccui.CheckBoxEventType.selected
+CHECKBOX_STATE_EVENT_UNSELECTED = ccui.CheckBoxEventType.unselected
+
+LoadingBarTypeLeft = ccui.LoadingBarDirection.LEFT
+LoadingBarTypeRight = ccui.LoadingBarDirection.RIGHT
+
+LoadingBarTypeRight = ccui.SliderEventType.percent_changed
+
+TEXTFIELD_EVENT_ATTACH_WITH_IME = ccui.TextFiledEventType.attach_with_ime
+TEXTFIELD_EVENT_DETACH_WITH_IME = ccui.TextFiledEventType.detach_with_ime
+TEXTFIELD_EVENT_INSERT_TEXT = ccui.TextFiledEventType.insert_text
+TEXTFIELD_EVENT_DELETE_BACKWARD = ccui.TextFiledEventType.delete_backward
+
+SCROLLVIEW_EVENT_SCROLL_TO_TOP = ccui.ScrollViewDir.none
+SCROLLVIEW_DIR_VERTICAL = ccui.ScrollViewDir.vertical
+SCROLLVIEW_DIR_HORIZONTAL = ccui.ScrollViewDir.horizontal
+SCROLLVIEW_DIR_BOTH = ccui.ScrollViewDir.both
+
+SCROLLVIEW_EVENT_SCROLL_TO_TOP = ccui.ScrollviewEventType.scrollToTop
+SCROLLVIEW_EVENT_SCROLL_TO_BOTTOM = ccui.ScrollviewEventType.scrollToBottom
+SCROLLVIEW_EVENT_SCROLL_TO_LEFT = ccui.ScrollviewEventType.scrollToLeft
+SCROLLVIEW_EVENT_SCROLL_TO_RIGHT = ccui.ScrollviewEventType.scrollToRight
+SCROLLVIEW_EVENT_SCROLLING = ccui.ScrollviewEventType.scrolling
+SCROLLVIEW_EVENT_BOUNCE_TOP = ccui.ScrollviewEventType.bounceTop
+SCROLLVIEW_EVENT_BOUNCE_BOTTOM = ccui.ScrollviewEventType.bounceBottom
+SCROLLVIEW_EVENT_BOUNCE_LEFT = ccui.ScrollviewEventType.bounceLeft
+SCROLLVIEW_EVENT_BOUNCE_RIGHT = ccui.ScrollviewEventType.bounceRight
+
+PAGEVIEW_EVENT_TURNING = ccui.PageViewEventType.turning
+
+PAGEVIEW_TOUCHLEFT = ccui.PVTouchDir.touch_left
+PAGEVIEW_TOUCHRIGHT = ccui.PVTouchDir.touch_right
+
+LISTVIEW_DIR_NONE = ccui.ListViewDirection.none
+LISTVIEW_DIR_VERTICAL = ccui.ListViewDirection.vertical
+LISTVIEW_DIR_HORIZONTAL = ccui.ListViewDirection.horizontal
+
+LISTVIEW_MOVE_DIR_NONE = ccui.ListViewMoveDirection.none
+LISTVIEW_MOVE_DIR_UP = ccui.ListViewMoveDirection.up
+LISTVIEW_MOVE_DIR_DOWN = ccui.ListViewMoveDirection.down
+LISTVIEW_MOVE_DIR_LEFT = ccui.ListViewMoveDirection.left
+LISTVIEW_MOVE_DIR_RIGHT = ccui.ListViewMoveDirection.right
+
+LISTVIEW_EVENT_INIT_CHILD = ccui.ListViewEventType.init_child
+LISTVIEW_EVENT_UPDATE_CHILD = ccui.ListViewEventType.update_child
+
+LAYOUT_PARAMETER_NONE = ccui.LayoutParameterType.none
+LAYOUT_PARAMETER_LINEAR = ccui.LayoutParameterType.linear
+LAYOUT_PARAMETER_RELATIVE = ccui.LayoutParameterType.relative
+
+ccui.LoadingBarType = ccui.LoadingBarDirection
+ccui.LoadingBarType.left = ccui.LoadingBarDirection.LEFT
+ccui.LoadingBarType.right = ccui.LoadingBarDirection.RIGHT
+
+ccui.LayoutType.absolute = ccui.LayoutType.ABSOLUTE
+ccui.LayoutType.linearVertical = ccui.LayoutType.VERTICAL
+ccui.LayoutType.linearHorizontal = ccui.LayoutType.HORIZONTAL
+ccui.LayoutType.relative = ccui.LayoutType.RELATIVE
+
+ccui.ListViewEventType.onsSelectedItem = ccui.ListViewEventType.ONSELECTEDITEM_START
diff --git a/src/cocos/ui/DeprecatedUIFunc.lua b/src/cocos/ui/DeprecatedUIFunc.lua
new file mode 100644
index 0000000..52c5e2e
--- /dev/null
+++ b/src/cocos/ui/DeprecatedUIFunc.lua
@@ -0,0 +1,183 @@
+if nil == ccui then
+ return
+end
+
+--tip
+local function deprecatedTip(old_name,new_name)
+ print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
+end
+
+--functions of ccui.Text will be deprecated begin
+local TextDeprecated = { }
+function TextDeprecated.setText(self, str)
+ deprecatedTip("ccui.Text:setText","ccui.Text:setString")
+ return self:setString(str)
+end
+ccui.Text.setText = TextDeprecated.setText
+
+function TextDeprecated.getStringValue(self)
+ deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString")
+ return self:getString()
+end
+ccui.Text.getStringValue = TextDeprecated.getStringValue
+
+--functions of ccui.Text will be deprecated begin
+
+--functions of ccui.TextAtlas will be deprecated begin
+local TextAtlasDeprecated = { }
+function TextAtlasDeprecated.setStringValue(self, str)
+ deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString")
+ return self:setString(str)
+end
+ccui.TextAtlas.setStringValue = TextAtlasDeprecated.setStringValue
+
+function TextAtlasDeprecated.getStringValue(self)
+ deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString")
+ return self:getString()
+end
+ccui.TextAtlas.getStringValue = TextAtlasDeprecated.getStringValue
+--functions of ccui.TextAtlas will be deprecated begin
+
+
+--functions of ccui.TextBMFont will be deprecated begin
+local TextBMFontDeprecated = { }
+function TextBMFontDeprecated.setText(self, str)
+ deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString")
+ return self:setString(str)
+end
+ccui.TextBMFont.setText = TextBMFontDeprecated.setText
+
+function TextBMFontDeprecated.getStringValue(self)
+ deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString")
+ return self:getString()
+end
+ccui.Text.getStringValue = TextBMFontDeprecated.getStringValue
+--functions of ccui.TextBMFont will be deprecated begin
+
+--functions of cc.ShaderCache will be deprecated begin
+local ShaderCacheDeprecated = { }
+function ShaderCacheDeprecated.getProgram(self,strShader)
+ deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram")
+ return self:getGLProgram(strShader)
+end
+cc.ShaderCache.getProgram = ShaderCacheDeprecated.getProgram
+--functions of ccui.TextBMFont will be deprecated begin
+
+--functions of ccui.Widget will be deprecated begin
+local UIWidgetDeprecated = { }
+function UIWidgetDeprecated.getLeftInParent(self)
+ deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary")
+ return self:getLeftBoundary()
+end
+ccui.Widget.getLeftInParent = UIWidgetDeprecated.getLeftInParent
+
+function UIWidgetDeprecated.getBottomInParent(self)
+ deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary")
+ return self:getBottomBoundary()
+end
+ccui.Widget.getBottomInParent = UIWidgetDeprecated.getBottomInParent
+
+function UIWidgetDeprecated.getRightInParent(self)
+ deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary")
+ return self:getRightBoundary()
+end
+ccui.Widget.getRightInParent = UIWidgetDeprecated.getRightInParent
+
+function UIWidgetDeprecated.getTopInParent(self)
+ deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary")
+ return self:getTopBoundary()
+end
+ccui.Widget.getTopInParent = UIWidgetDeprecated.getTopInParent
+
+function UIWidgetDeprecated.getSize(self)
+ deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize")
+ return self:getContentSize()
+end
+ccui.Widget.getSize = UIWidgetDeprecated.getSize
+
+function UIWidgetDeprecated.setSize(self, ...)
+ deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize")
+ return self:setContentSize(...)
+end
+ccui.Widget.setSize = UIWidgetDeprecated.setSize
+
+--functions of ccui.Widget will be deprecated end
+
+--functions of ccui.CheckBox will be deprecated begin
+local UICheckBoxDeprecated = { }
+function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler)
+ deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.CheckBox.addEventListenerCheckBox = UICheckBoxDeprecated.addEventListenerCheckBox
+
+function UICheckBoxDeprecated.setSelectedState(self,flag)
+ deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected")
+ return self:setSelected(flag)
+end
+ccui.CheckBox.setSelectedState = UICheckBoxDeprecated.setSelectedState
+
+function UICheckBoxDeprecated.getSelectedState(self)
+ deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected")
+ return self:getSelected()
+end
+ccui.CheckBox.getSelectedState = UICheckBoxDeprecated.setSelectedState
+
+--functions of ccui.CheckBox will be deprecated end
+
+--functions of ccui.Slider will be deprecated begin
+local UISliderDeprecated = { }
+function UISliderDeprecated.addEventListenerSlider(self,handler)
+ deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.Slider.addEventListenerSlider = UISliderDeprecated.addEventListenerSlider
+--functions of ccui.Slider will be deprecated end
+
+--functions of ccui.TextField will be deprecated begin
+local UITextFieldDeprecated = { }
+function UITextFieldDeprecated.addEventListenerTextField(self,handler)
+ deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.TextField.addEventListenerTextField = UITextFieldDeprecated.addEventListenerTextField
+
+function UITextFieldDeprecated.setText(self, str)
+ deprecatedTip("ccui.TextField:setText","ccui.TextField:setString")
+ return self:setString(str)
+end
+ccui.TextField.setText = UITextFieldDeprecated.setText
+
+function UITextFieldDeprecated.getStringValue(self)
+ deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString")
+ return self:getString()
+end
+ccui.TextField.getStringValue = UITextFieldDeprecated.getStringValue
+--functions of ccui.TextField will be deprecated end
+
+--functions of ccui.PageView will be deprecated begin
+local UIPageViewDeprecated = { }
+function UIPageViewDeprecated.addEventListenerPageView(self,handler)
+ deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView
+--functions of ccui.PageView will be deprecated end
+
+--functions of ccui.ScrollView will be deprecated begin
+local UIScrollViewDeprecated = { }
+function UIScrollViewDeprecated.addEventListenerScrollView(self,handler)
+ deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.ScrollView.addEventListenerScrollView = UIScrollViewDeprecated.addEventListenerScrollView
+--functions of ccui.ScrollView will be deprecated end
+
+--functions of ccui.ListView will be deprecated begin
+local UIListViewDeprecated = { }
+function UIListViewDeprecated.addEventListenerListView(self,handler)
+ deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener")
+ return self:addEventListener(handler)
+end
+ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView
+--functions of ccui.ListView will be deprecated end
diff --git a/src/cocos/ui/GuiConstants.lua b/src/cocos/ui/GuiConstants.lua
new file mode 100644
index 0000000..3a522ff
--- /dev/null
+++ b/src/cocos/ui/GuiConstants.lua
@@ -0,0 +1,218 @@
+if nil == ccui then
+ return
+end
+
+ccui.BrightStyle =
+{
+ none = -1,
+ normal = 0,
+ highlight = 1,
+}
+
+ccui.TextureResType =
+{
+ localType = 0,
+ plistType = 1,
+}
+
+ccui.TouchEventType =
+{
+ began = 0,
+ moved = 1,
+ ended = 2,
+ canceled = 3,
+}
+
+ccui.SizeType =
+{
+ absolute = 0,
+ percent = 1,
+}
+
+ccui.PositionType = {
+ absolute = 0,
+ percent = 1,
+}
+
+ccui.CheckBoxEventType =
+{
+ selected = 0,
+ unselected = 1,
+}
+
+ccui.RadioButtonEventType=
+{
+ selected = 0,
+ unselected = 1
+}
+
+ccui.RadioButtonGroupEventType=
+{
+ select_changed = 0
+}
+
+ccui.TextFiledEventType =
+{
+ attach_with_ime = 0,
+ detach_with_ime = 1,
+ insert_text = 2,
+ delete_backward = 3,
+}
+
+ccui.LayoutBackGroundColorType =
+{
+ none = 0,
+ solid = 1,
+ gradient = 2,
+}
+
+ccui.LayoutType =
+{
+ ABSOLUTE = 0,
+ VERTICAL = 1,
+ HORIZONTAL = 2,
+ RELATIVE = 3,
+}
+
+ccui.LayoutParameterType =
+{
+ none = 0,
+ linear = 1,
+ relative = 2,
+}
+
+ccui.LinearGravity =
+{
+ none = 0,
+ left = 1,
+ top = 2,
+ right = 3,
+ bottom = 4,
+ centerVertical = 5,
+ centerHorizontal = 6,
+}
+
+ccui.RelativeAlign =
+{
+ alignNone = 0,
+ alignParentTopLeft = 1,
+ alignParentTopCenterHorizontal = 2,
+ alignParentTopRight = 3,
+ alignParentLeftCenterVertical = 4,
+ centerInParent = 5,
+ alignParentRightCenterVertical = 6,
+ alignParentLeftBottom = 7,
+ alignParentBottomCenterHorizontal = 8,
+ alignParentRightBottom = 9,
+ locationAboveLeftAlign = 10,
+ locationAboveCenter = 11,
+ locationAboveRightAlign = 12,
+ locationLeftOfTopAlign = 13,
+ locationLeftOfCenter = 14,
+ locationLeftOfBottomAlign = 15,
+ locationRightOfTopAlign = 16,
+ locationRightOfCenter = 17,
+ locationRightOfBottomAlign = 18,
+ locationBelowLeftAlign = 19,
+ locationBelowCenter = 20,
+ locationBelowRightAlign = 21,
+}
+
+ccui.SliderEventType = {
+ percentChanged = 0,
+ slideBallDown = 1,
+ slideBallUp = 2,
+ slideBallCancel = 3
+}
+
+ccui.LoadingBarDirection = { LEFT = 0, RIGHT = 1}
+
+ccui.ScrollViewDir = {
+ none = 0,
+ vertical = 1,
+ horizontal = 2,
+ both = 3,
+}
+
+ccui.ScrollViewMoveDir = {
+ none = 0,
+ up = 1,
+ down = 2,
+ left = 3,
+ right = 4,
+}
+
+ccui.ScrollviewEventType = {
+ scrollToTop = 0,
+ scrollToBottom = 1,
+ scrollToLeft = 2,
+ scrollToRight = 3,
+ scrolling = 4,
+ bounceTop = 5,
+ bounceBottom = 6,
+ bounceLeft = 7,
+ bounceRight = 8,
+}
+
+ccui.ListViewDirection = {
+ none = 0,
+ vertical = 1,
+ horizontal = 2,
+}
+
+ccui.ListViewMoveDirection = {
+ none = 0,
+ up = 1,
+ down = 2,
+ left = 3,
+ right = 4,
+}
+
+ccui.ListViewEventType = {
+ ONSELECTEDITEM_START = 0,
+ ONSELECTEDITEM_END = 1,
+}
+
+ccui.PageViewEventType = {
+ turning = 0,
+}
+
+ccui.PageViewDirection = {
+ HORIZONTAL = 0,
+ VERTICAL = 1
+}
+
+ccui.PVTouchDir = {
+ touchLeft = 0,
+ touchRight = 1,
+ touchUp = 2,
+ touchDown = 3
+}
+
+ccui.ListViewGravity = {
+ left = 0,
+ right = 1,
+ centerHorizontal = 2,
+ top = 3,
+ bottom = 4 ,
+ centerVertical = 5,
+}
+
+ccui.TextType = {
+ SYSTEM = 0,
+ TTF = 1,
+}
+
+ccui.LayoutComponent.HorizontalEdge = {
+ None = 0,
+ Left = 1,
+ Right = 2,
+ Center = 3,
+}
+
+ccui.LayoutComponent.VerticalEdge = {
+ None = 0,
+ Bottom = 1,
+ Top = 2,
+ Center = 3,
+}
diff --git a/src/cocos/ui/experimentalUIConstants.lua b/src/cocos/ui/experimentalUIConstants.lua
new file mode 100644
index 0000000..b2bcc05
--- /dev/null
+++ b/src/cocos/ui/experimentalUIConstants.lua
@@ -0,0 +1,10 @@
+if nil == ccexp then
+ return
+end
+
+ccexp.VideoPlayerEvent = {
+ PLAYING = 0,
+ PAUSED = 1,
+ STOPPED= 2,
+ COMPLETED =3,
+}
diff --git a/src/config.lua b/src/config.lua
new file mode 100644
index 0000000..2a7389f
--- /dev/null
+++ b/src/config.lua
@@ -0,0 +1,26 @@
+
+-- 0 - disable debug info, 1 - less debug info, 2 - verbose debug info
+DEBUG = 2
+
+-- use framework, will disable all deprecated API, false - use legacy API
+CC_USE_FRAMEWORK = true
+
+-- show FPS on screen
+CC_SHOW_FPS = true
+
+-- disable create unexpected global variable
+CC_DISABLE_GLOBAL = true
+
+-- for module display
+CC_DESIGN_RESOLUTION = {
+ width = 960,
+ height = 640,
+ autoscale = "SHOW_ALL",
+ callback = function(framesize)
+ local ratio = framesize.width / framesize.height
+ if ratio <= 1.34 then
+ -- iPad 768*1024(1536*2048) is 4:3 screen
+ return {autoscale = "SHOW_ALL"}
+ end
+ end
+}
diff --git a/src/main.lua b/src/main.lua
new file mode 100644
index 0000000..403dc79
--- /dev/null
+++ b/src/main.lua
@@ -0,0 +1,87 @@
+local breakSocketHandle,debugXpCall
+local luaIdeDebug = true
+if luaIdeDebug == true then
+ breakSocketHandle,debugXpCall = require("LuaIdeDebug.LuaDebugjit")("localhost",7003)
+ cc.Director:getInstance():getScheduler():scheduleScriptFunc(breakSocketHandle, 0.3, false)
+end
+cc.FileUtils:getInstance():setPopupNotify(false)
+cc.FileUtils:getInstance():addSearchPath("src/")
+cc.FileUtils:getInstance():addSearchPath("res/")
+
+require "config"
+require "cocos.init"
+
+local function main()
+ require("app.MyApp"):create():run()
+end
+
+if ST_MYPROJECT_ISLOG then
+ --清除日志记录
+ local function clearLog()
+ local date = os.date("%Y-%m-%d %H:%M:%S")
+
+ local file = io.open('print_log.txt', "w")
+ io.output(file)
+ io.write("["..date.."]")
+ io.close(file)
+ end
+ --打印日志
+ local function printLog()
+ _print = print
+ function print( ... )
+ -- 写日志文件
+ local tableP = { ... }
+ local filename = "print_log.txt"
+ local file
+ file = io.open(filename,"a")
+ io.output(file)
+ for i, v in pairs(tableP) do
+ if type(v) == "boolean" then
+ if v then v = "true" else v = "false" end
+ io.write(v)
+ io.write('\n')
+ elseif type(v) == "userdata" then
+ elseif type(v) == "table" then
+ elseif type(v) == "function" then
+ else
+ io.write(v)
+ io.write('\n')
+ end
+ end
+ file:close()
+ _print(...)
+ end
+ end
+ clearLog()
+ printLog()
+end
+
+
+function __G__TRACKBACK__(errorMessage)
+ if luaIdeDebug == true then debugXpCall() end
+ print("----------------------------------------")
+ print("LUA ERROR: " .. tostring(errorMessage) .. "\n")
+ print(debug.traceback("", 2))
+ print("----------------------------------------")
+
+ local msg = debug.traceback(errorMessage, 2)
+ --写入文件
+ local file = io.open('errorInfo.txt', "a")
+ io.output(file)
+ io.write('\n')
+ io.write('\n')
+ io.write('\n')
+ io.write(msg)
+ io.write('\n')
+ --追加时间
+ io.write(os.date('%c') .. '\n')
+ io.write('\n')
+ io.write('\n')
+ io.write('\n')
+ io.close(file)
+end
+
+local status, msg = xpcall(main, __G__TRACKBACK__)
+if not status then
+ print(msg)
+end
diff --git a/src/packages/mvc/AppBase.lua b/src/packages/mvc/AppBase.lua
new file mode 100644
index 0000000..ccf9f57
--- /dev/null
+++ b/src/packages/mvc/AppBase.lua
@@ -0,0 +1,67 @@
+
+local AppBase = class("AppBase")
+
+function AppBase:ctor(configs)
+ self.configs_ = {
+ viewsRoot = "app.views",
+ modelsRoot = "app.models",
+ defaultSceneName = "MainScene",
+ }
+
+ for k, v in pairs(configs or {}) do
+ self.configs_[k] = v
+ end
+
+ if type(self.configs_.viewsRoot) ~= "table" then
+ self.configs_.viewsRoot = {self.configs_.viewsRoot}
+ end
+ if type(self.configs_.modelsRoot) ~= "table" then
+ self.configs_.modelsRoot = {self.configs_.modelsRoot}
+ end
+
+ if DEBUG > 1 then
+ dump(self.configs_, "AppBase configs")
+ end
+
+ if CC_SHOW_FPS then
+ cc.Director:getInstance():setDisplayStats(true)
+ end
+
+ -- event
+ self:onCreate()
+end
+
+function AppBase:run(initSceneName)
+ initSceneName = initSceneName or self.configs_.defaultSceneName
+ self:enterScene(initSceneName)
+end
+
+function AppBase:enterScene(sceneName, transition, time, more)
+ local view = self:createView(sceneName)
+ view:showWithScene(transition, time, more)
+ return view
+end
+
+function AppBase:createView(name)
+ for _, root in ipairs(self.configs_.viewsRoot) do
+ local packageName = string.format("%s.%s", root, name)
+ local status, view = xpcall(function()
+ return require(packageName)
+ end, function(msg)
+ if not string.find(msg, string.format("'%s' not found:", packageName)) then
+ print("load view error: ", msg)
+ end
+ end)
+ local t = type(view)
+ if status and (t == "table" or t == "userdata") then
+ return view:create(self, name)
+ end
+ end
+ error(string.format("AppBase:createView() - not found view \"%s\" in search paths \"%s\"",
+ name, table.concat(self.configs_.viewsRoot, ",")), 0)
+end
+
+function AppBase:onCreate()
+end
+
+return AppBase
diff --git a/src/packages/mvc/ViewBase.lua b/src/packages/mvc/ViewBase.lua
new file mode 100644
index 0000000..64a26bd
--- /dev/null
+++ b/src/packages/mvc/ViewBase.lua
@@ -0,0 +1,68 @@
+
+local ViewBase = class("ViewBase", cc.Node)
+
+function ViewBase:ctor(app, name)
+ self:enableNodeEvents()
+ self.app_ = app
+ self.name_ = name
+
+ -- check CSB resource file
+ local res = rawget(self.class, "RESOURCE_FILENAME")
+ if res then
+ self:createResoueceNode(res)
+ end
+
+ local binding = rawget(self.class, "RESOURCE_BINDING")
+ if res and binding then
+ self:createResoueceBinding(binding)
+ end
+
+ if self.onCreate then self:onCreate() end
+end
+
+function ViewBase:getApp()
+ return self.app_
+end
+
+function ViewBase:getName()
+ return self.name_
+end
+
+function ViewBase:getResourceNode()
+ return self.resourceNode_
+end
+
+function ViewBase:createResoueceNode(resourceFilename)
+ if self.resourceNode_ then
+ self.resourceNode_:removeSelf()
+ self.resourceNode_ = nil
+ end
+ self.resourceNode_ = cc.CSLoader:createNode(resourceFilename)
+ assert(self.resourceNode_, string.format("ViewBase:createResoueceNode() - load resouce node from file \"%s\" failed", resourceFilename))
+ self:addChild(self.resourceNode_)
+end
+
+function ViewBase:createResoueceBinding(binding)
+ assert(self.resourceNode_, "ViewBase:createResoueceBinding() - not load resource node")
+ for nodeName, nodeBinding in pairs(binding) do
+ local node = self.resourceNode_:getChildByName(nodeName)
+ if nodeBinding.varname then
+ self[nodeBinding.varname] = node
+ end
+ for _, event in ipairs(nodeBinding.events or {}) do
+ if event.event == "touch" then
+ node:onTouch(handler(self, self[event.method]))
+ end
+ end
+ end
+end
+
+function ViewBase:showWithScene(transition, time, more)
+ self:setVisible(true)
+ local scene = display.newScene(self.name_)
+ scene:addChild(self)
+ display.runScene(scene, transition, time, more)
+ return self
+end
+
+return ViewBase
diff --git a/src/packages/mvc/init.lua b/src/packages/mvc/init.lua
new file mode 100644
index 0000000..3eb980c
--- /dev/null
+++ b/src/packages/mvc/init.lua
@@ -0,0 +1,7 @@
+
+local _M = {}
+
+_M.AppBase = import(".AppBase")
+_M.ViewBase = import(".ViewBase")
+
+return _M
diff --git a/vsc.png b/vsc.png
new file mode 100644
index 0000000..ecfccab
Binary files /dev/null and b/vsc.png differ