function xnl_eventSendAppRunning(a,b){var c=new CSInterface,d=new CSEvent;d.type=a,d.data=b,d.scope="APPLICATION",d.extensionId=c.getExtensionID(),c.dispatchEvent(d)}function Xnl_loadJSX(a){var b=new CSInterface;b.evalScript('$.evalFile("'+a+'");',function(a){console.info("Xnl_loadJSX",a)})}function Xnl_getXMLText(a){var b,c=new XMLHttpRequest;return c.open("GET",a,!1),c.send(null),b=c.responseText}var cs,script;try{cs=new CSInterface}catch(e){console.log("loadCS",e),script=document.createElement("script"),script.id="closeAppScriptCS",script.type="text/javascript",script.src="../art.bangong.appbox/lib/CSInterface.js",document.getElementsByTagName("head")[0].appendChild(script),document.getElementById("closeAppScriptCS").remove()}try{cs=new CSInterface,cs.addEventListener(cs.getExtensionID()+":close",function(){setTimeout(function(){cs.closeExtension(),setTimeout(function(){cs.closeExtension()},1500)},200)}),console.log("closeApp_ok",1),xnl_eventSendAppRunning("RECORDAPPRUNNING",cs.getExtensionID()),"art.bangong.appbox.window"==cs.getExtensionID()&&(Xnl_loadJSX(Xnl_appJsxPath),cs.addEventListener("OPENAPPBOXWINDOW",function(a){var c,d,b=a.data;console.log(b),c=JSON.parse(unescape(b)),console.log(c),window.__adobe_cep__.invokeSync("setWindowTitle",c.name+" v"+c.version),window.__adobe_cep__.resizeContent(Number(c.width),Number(c.height)+40),d=c.mainPath,"appcep-lixian"==c.ac&&(d=d),""==d&&(d=c.basePath+"index.html"),document.location.href=d}))}catch(e){console.log("closeApp_error",e)}document.getElementById("Xnl_closeAppScript").remove();