forked from chordlove/chordlove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inject.min.js
10 lines (10 loc) · 60.7 KB
/
inject.min.js
1
2
3
4
5
6
7
8
9
10
/**
* @license
* Inject (c) 2011 LinkedIn [https://github.com/linkedin/inject] Apache Software License 2.0
* lscache (c) 2011 Pamela Fox [https://github.com/pamelafox/lscache] Apache Software License 2.0
* Link.js (c) 2012 Calyptus Life AB, Sweden [https://github.com/calyptus/link.js] Simplified BSD & MIT License
* GoWithTheFlow.js (c) 2011 Jerome Etienne, [https://github.com/jeromeetienne/gowiththeflow.js] MIT License
* easyXDM (c) 2011 2009-2011 Øyvind Sean Kinsey, [email protected] [https://github.com/oyvindkinsey/easyXDM] MIT License
*/
!function(context,undefined){function proxy(e,t){if(!t)throw Error("proxying requires a scope");if(!e)throw Error("proxying requires a function");return function(){return e.apply(t,arguments)}}function each(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n])}var IS_IE=eval("/*@cc_on!@*/false"),IS_GK=!1;(function(){var e=navigator.userAgent.toLowerCase();-1!==e.indexOf("gecko")&&(IS_GK=!0)})();var FILE_STORAGE_TOKEN="INJECT",LSCACHE_SCHEMA_VERSION=1,LSCACHE_SCHEMA_VERSION_STRING="!version",LSCACHE_APP_KEY_STRING="!appCacheKey",AMD_DEFERRED="###DEFERRED###",NAMESPACE="Inject",FILE_SUFFIX_REGEX=/.*?\.(js|txt)(\?.*)?$/,BASIC_FILE_SUFFIX=".js",HOST_PREFIX_REGEX=/^https?:\/\//,HOST_SUFFIX_REGEX=/^(.*?)(\/.*|$)/,RESPONSE_SLICER_REGEX=/^(.+?)[\s]+([\w\W]+?)[\s]+([\w\W]+)$/m,FUNCTION_REGEX=/^[\s\(]*function[^\(]*\(([^)]*)\)/,FUNCTION_NEWLINES_REGEX=/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,FUNCTION_BODY_REGEX=/[\w\W]*?\{([\w\W]*)\}/m,WHITESPACE_REGEX=/\s+/g,REQUIRE_REGEX=/(?:^|[^\w\$_.\(])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,DEFINE_EXTRACTION_REGEX=/(?:^|[\s]+)define[\s]*\([\s]*((?:"|')\S+?(?:"|'))?,?[\s]*(?:\[([\w\W]+?)\])?/g,BUILTINS={require:!0,exports:!0,module:!0},BUILTINS_REPLACE_REGEX=/[\s]|"|'|(require)|(exports)|(module)/g,GREEDY_REQUIRE_REXEX=/require.*/,JS_COMMENTS_REGEX=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,RELATIVE_PATH_REGEX=/^(\.{1,2}\/).+/,ABSOLUTE_PATH_REGEX=/^([A-Za-z]+:)?\/\//,PROTOCOL_REGEX=/:\/\//,PROTOCOL_STRING="://",PROTOCOL_EXPANDED_REGEX=/__INJECT_PROTOCOL_COLON_SLASH_SLASH__/,PROTOCOL_EXPANDED_STRING="__INJECT_PROTOCOL_COLON_SLASH_SLASH__",HAS_OWN_PROPERTY=Object.prototype.hasOwnProperty,HAS_LOCAL_STORAGE=function(){try{return localStorage.setItem("injectLStest","ok"),localStorage.removeItem("injectLStest"),!0}catch(e){return!1}}(),userConfig={moduleRoot:null,fileExpires:300,useSuffix:!0,xd:{relayFile:null,relaySwf:null},debug:{sourceMap:!1,logging:!1}},context=this,userModules={},easyXdm=!1,isHostMethod=function(e,t){var n=typeof e[t];return"function"===n||!("object"!==n||!e[t])||"unknown"===n},getXhr=function(){if(isHostMethod(window,"XMLHttpRequest"))return function(){return new XMLHttpRequest};var e=function(){for(var t=["Microsoft","Msxml2","Msxml3"],n=t.length;n--;)try{return e=t[n]+".XMLHTTP",new ActiveXObject(e),e}catch(r){}}();return function(){return new ActiveXObject(e)}}(),debugLog=function(){};(function(){var e="undefined"!=typeof console&&console.log&&"function"==typeof console.log,t=function(e,t){userConfig.debug&&userConfig.debug.logging&&console.log("## "+e+" ##"+"\n"+t)};e&&(debugLog=t)})();var commonJSHeader=["","__INJECT_NS__.INTERNAL.execute.__FUNCTION_ID__ = function() {"," with (window) {",' __INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__ = __INJECT_NS__.INTERNAL.createModule("__MODULE_ID__", "__MODULE_URI__");'," __INJECT_NS__.INTERNAL.execs.__FUNCTION_ID__ = function() {"," var module = __INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__,"," require = __INJECT_NS__.INTERNAL.createRequire(module.id, module.uri),"," define = __INJECT_NS__.INTERNAL.createDefine(module.id, module.uri),"," exports = module.exports;",""].join("\n"),commonJSFooter=[""," __INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__ = module;"," };",' __INJECT_NS__.INTERNAL.defineExecutingModuleAs("__MODULE_ID__", "__MODULE_URI__");'," __error = window.onerror;"," try {"," __INJECT_NS__.INTERNAL.execs.__FUNCTION_ID__.call(__INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__);"," }"," catch (__EXCEPTION__) {"," __INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__.error = __EXCEPTION__;"," }"," __INJECT_NS__.INTERNAL.undefineExecutingModule();"," return __INJECT_NS__.INTERNAL.modules.__FUNCTION_ID__;"," }","};",""].join("\n");(function(){(function(e,t){"object"==typeof exports?module.exports=t(this):"function"==typeof define&&define.amd?define(function(){return t(e)}):e.Fiber=t(e)})(this,function(e){function t(e,t){var n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function n(){}var r=!1,o=Array.prototype,i=e.Fiber;return n.extend=function(e){function o(){r||(this.init.apply(this,arguments),this.init=void 0)}var i,a=this.prototype,u=e(a);return r=!0,i=o.prototype=new this,r=!1,i.init=function(){"function"==typeof a.init&&a.init.apply(this,arguments)},t(u,i),i.constructor=o,o.__base__=a,o.extend=o.prototype.extend||n.extend,o},n.proxy=function(e,t){var n,r,o={};1===arguments.length&&(t=e,e=t.constructor.__base__),r=function(n){return function(){return e[n].apply(t,arguments)}};for(n in e)e.hasOwnProperty(n)&&"function"==typeof e[n]&&(o[n]=r(n));return o},n.decorate=function(e){var n,r=e.constructor.__base__,i=o.slice.call(arguments,1),a=i.length;for(n=0;a>n;n++)t(i[n].call(e,r),e)},n.mixin=function(e){var n,r=e.__base__,i=o.slice.call(arguments,1),a=i.length;for(n=0;a>n;n++)t(i[n](r),e.prototype)},n.noConflict=function(){return e.Fiber=i,n},n})})();var LinkJS={};(function(){"use strict";function e(e){this.id=null,this.source=e,this.requires=[],this.imports=[],this.exportedVariables=[],this.exportedFunctions=[],this.declaredVariables=[],this.declaredFunctions=[],this.expectedVariables=[],this.lexicalExports=!0,this.exportedProperties=[],this.strict=0,this.lexicalScope=!0,this.amd=!1,this.tokens=[],this.lexicalEnvironment={}}function t(e){return dt[e[0]].replace(/\$(\d)/g,function(t,n){return e[n]})}function n(){console.warn(t(arguments))}function r(){throw Error(t(arguments))}function o(e,t,n){return{type:e,value:t,lineNumber:nt,start:n,end:tt}}function i(e){return"0123456789".indexOf(e)>=0}function a(){var e=ot;return e===undefined||e.type===vt&&-1=="})]".indexOf(e.value)||e.type===gt&&l(e.value)}function u(e){return" "===e||" "===e||""===e||"\f"===e||" "===e||""===e}function s(e){return"=<>{}();:,.!?+-*%&|^/[]~".indexOf(e)>=0}function c(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function l(e){switch(e){case"break":case"case":case"catch":case"continue":case"debugger":case"default":case"delete":case"do":case"else":case"finally":case"for":case"function":case"if":case"in":case"instanceof":case"new":case"return":case"switch":case"this":case"throw":case"try":case"typeof":case"var":case"void":case"while":case"with":return!0;case"const":return!0;case"implements":case"interface":case"let":case"package":case"private":case"protected":case"public":case"static":case"yield":return!0}return!1}function f(){var e="\0",t=tt;return rt>t&&(e=et[t],tt+=1),e}function d(){var e,t,n;for(t=!1,n=!1;rt>tt;)if(e=et[tt],n)f(),c(e)&&(n=!1,"\r"===e&&"\n"===et[tt]&&f(),nt+=1);else if(t)f(),"*"===e?(e=et[tt],"/"===e&&(f(),t=!1)):c(e)&&("\r"===e&&"\n"===et[tt]&&f(),nt+=1);else if("/"===e)if(e=et[tt+1],"/"===e)f(),f(),n=!0;else{if("*"!==e)break;f(),f(),t=!0}else if(u(e))f();else{if(!c(e))break;f(),"\r"===e&&"\n"===et[tt]&&f(),nt+=1}}function p(){var e,t,n;for(e=et[tt],t=tt,n=f();rt>tt&&(e=et[tt],!(u(e)||c(e)||s(e)||"'"==e||'"'==e));)n+=f();return 1===n.length?o(ht,n,t):l(n)?o(gt,n,t):"null"===n||"true"===n||"false"===n?o(mt,n,t):o(ht,n,t)}function h(){var e=tt,t=et[tt],n=et[tt+1];return t===n&&"+-<>&|".indexOf(t)>=0?o(vt,f()+f(),e):o(vt,f(),e)}function g(){for(var e;rt>tt;){if(e=et[tt],0>"0123456789abcdefABCDEF.xXeE".indexOf(e)){if("+"!=e&&"-"!=e)break;if(e=et[tt-1],"e"!=e&&"E"!=e)break}f()}return o(mt)}function m(){var e,t,n,r="";for(e=et[tt],t=tt,f();rt>tt&&(n=f(),n!==e);)"\\"===n?(n=f(),c(n)||(r+="\\",r+=n)):r+=n;return o(_t,r,t)}function v(){for(f();rt>tt;){var e=f();if("\\"===e&&f(),"/"===e)break;if("["===e)for(;rt>tt&&"]"!==f(););}for(;rt>tt&&/[a-z]/i.test(et[tt]);)f();return o(mt)}function _(){var e;return d(),tt>=rt?o(pt):(e=et[tt],"/"===e&&a()?v():!s(e)||"."==e&&i(et[tt+1])?"'"===e||'"'===e?m():"."===e||i(e)?g():p():h())}function E(){var e;return ft?(e=ft,ft=null,e):(ft=null,ot=_())}function x(){return null!==ft?ft:ft=ot=_()}function y(e){var t=E();if(t.type!==vt||t.value!==e)throw Error("Unexpected token: "+t.value+" at line "+nt)}function b(e){var t=E();if(t.type!==gt||t.value!==e)throw Error("Unexpected token: "+t.value)}function R(e){var t=x();return t.type===vt&&t.value===e}function C(e){var t=x();return t.type===gt&&t.value===e}function I(){var e=x();return e.type==gt?"case"==e.value?(E(),E(),!0):"default"==e.value?(E(),!0):"do"==e.value||"else"==e.value||"finally"==e.value||"try"==e.value:!1}function N(){var e=x();return e.type==gt?"if"==e.value||"for"==e.value||"catch"==e.value||"with"==e.value||"switch"==e.value||"while"==e.value:!1}function w(){var e=x();return e.type!==vt&&(e.type!==gt||"in"!=e.value&&"instanceof"!=e.value)}function O(){for(y("{");!R("}");){var e=E();if(e.type!=ht||"get"!=e.value&&"set"!=e.value||R(":")||E(),y(":"),k(),R("}"))break;y(",")}y("}")}function S(){for(y("[");!R("]")&&(k(),!R("]"));)y(",");y("]")}function T(){for(y("("),C("var")?D(Rt,Ct):k();R(",")||R(";");)E(),k();y(")")}function A(){if(y("("),x().type==_t){var e=E().value;if(R(")"))return lt[e]|=Tt,E(),undefined}for(k();R(",")&&(E(),!R(")"));)k();y(")")}function M(e){return"define"==e?U():"require"==e?A():("eval"==e&&(it.lexicalScope=!1),k(),undefined)}function L(e){var t=e.value;if(t in at||(at[t]=Rt),ct.push(e),t in st){if(t=st[t],ut[t])return}else if(at[t])return;if(R("("))return M(t);if("exports"==t)if(R("."))E(),ut[E().value]|=St;else if(R("[")){if(E(),x().type===_t){var n=E().value;R("]")&&(ut[n]|=St)}k(),y("]")}}function k(){for(var e=x();!(e.type==pt||R("}")||R(")")||R("]")||R(",")||R(";"));){if(e.type==ht){if(E(),L(e),w())break}else if(e.type==_t||e.type==mt){if(E(),w())break}else if(C("function")){if(H(),w())break}else if(R("{")){if(O(),w())break}else if(R("[")){if(S(),w())break}else if(R("(")){if(T(),R("{"))return X(),undefined;if(w())break}else if(R("++")||R("--")){E();var t=nt;if(w()&&t!==nt)break}else if(R(".")){if(E(),e=x(),e.type==ht&&(E(),w()))break}else E();e=x()}}function D(e,t){if(t){var n={type:Et,start:E().start,expressionStart:x().start,end:0};at===ut&&ct.push(n)}for(var r=E();r.type!==pt;){var o=r.value;if(at[o]|=t,at[o]|=e,ct.push(r),(R("=")||C("in"))&&k(),!R(","))break;E(),r=E()}t&&(n.end=x().start)}function j(){b("catch"),F()}function P(e){var t,n=0;if(y("("),!R(")"))for(;(t=E()).type!=pt&&(null!=e&&e.length>n&&(st[t.value]=e[n++]),at[t.value]|=Ct,!R(")"));)y(",");y(")")}function F(e,t){var n=function(){};if(n.prototype=at,at=new n,at.arguments=Ct,t&&(at[t]=It),e){var r=function(){};r.prototype=st,st=new r}var o=ct;ct=[],P(e),X();for(var i=0,a=ct.length;a>i;i++){var t=ct[i].value;Y.call(at,t)&&at[t]!==Rt||(o.push(ct[i]),n.prototype[t]|=Rt)}at=n.prototype,ct=o,e&&(st=r.prototype)}function q(e){var t=x().start;b("function");var n=E().value;at[n]|=It,at[n]|=e;var r=o(xt,null,t);at===ut&&ct.push(r),F(null,n),r.end=x().start}function H(e){b("function"),x().type===ht?F(e,E().value):F(e)}function X(){y("{"),$(),y("}")}function U(){var e=null,t=[];if(y("("),it.amd=!0,x().type===_t){if(e=E().value,R(",")&&E(),C("function")&&(H(["require","exports","module"]),R(")")))return E(),it.id=e,undefined;if(R(")"))return E(),undefined}if(R("[")){for(E();x().type===_t;)t.push(E().value),R(",")&&E();if(R("]")&&(E(),R(",")))if(E(),C("function")){if(H(t),R(")")){it.id=e;for(var n=0,r=t.length;r>n;n++)"require"!==t[n]&&"exports"!==t[n]&&"module"!==t[n]&&(lt[t[n]]|=Tt)}}else k()}for(C("function")?H(["require","exports","module"]):R(")")||k();R(",")&&(E(),!R(")"));)k();y(")")}function V(){if(at!==ut)return n("nestedRequire",x().lineNumber),undefined;var e=E();if(e.type===_t)for(;e.type!==pt&&(lt[e.value]|=At,R(",")&&E(),x().type===_t);)e=E()}function G(){return at!==ut?(n("nestedExport",x().lineNumber),undefined):(C("var")?D(Nt,Ct):C("function")?q(Nt):x().type===ht?D(Nt,Rt):n("unknownExport",x().lineNumber),undefined)}function J(){var e=x();if(e.type===ht){E();var t=e.value;if(R(":")){E();var n={type:0,start:e.start,expressionStart:x().start,end:0};"require"===t&&(at===ut&&ct.push(n),n.type=bt,V()),"exports"===t&&(at===ut&&ct.push(n),n.type=yt,G()),n.end=x().start,R("{")&&X()}else L(e)}else C("var")?D(Rt,Ct):C("function")?q():C("catch")?j():I()?(E(),R("{")&&X()):N()?(C("with")&&(it.lexicalScope=!1),E(),T(),R("{")&&X()):R(",")||R(";")?E():k()}function $(){for(var e=x();e.type!==pt&&!R("}");)J(),e=x()}function B(){var e=x();e.type===_t&&"use strict"===e.value&&(E(),R(";")&&(e=E()),it.strict=e.end),$()}function z(e){var t=lt[e];t===Tt?it.requires.push(e):t===At&&(it.requires.push(e),it.imports.push(e))}function W(e){var t=ut[e];t===Nt&&(n("undeclaredExport",e),it.expectedVariables.push(e)),(t&Ot)===Ot?it.exportedFunctions.push(e):(t&wt)===wt?it.exportedVariables.push(e):t===St?it.exportedProperties.push(e):t===It?it.declaredFunctions.push(e):t===Ct?it.declaredVariables.push(e):t===Rt&&it.expectedVariables.push(e)}function K(t){et=t+"";var n=it=new e(t);if(tt=0,nt=et.length>0?1:0,rt=et.length,at=ut=n.lexicalEnvironment,st={},ct=n.tokens,lt={},ot=ft=null,rt>0&&et[0]===undefined){et=[];for(var r=0;rt>r;r++)et[r]=t.charAt(r)}B();for(var o in ut)W(o);for(var i in lt)z(i);for(var r=0,a=Mt.length;a>r;r++)W(Mt[r]),z(Mt[r]);return it=ut=at=st=lt=ft=et=null,n}LinkJS.parse=K;var Y={}.hasOwnProperty,Q={cjs:!0,amd:!1,global:!1,resolve:null,strict:!1},Z={"":"$",cjs:"$",global:"(function(exports){\nfunction require(id){ return this; };\n$\n}.call(this, this));","cjs,global":'(function(require, exports){\n$\n}.call(this, typeof require === "undefined" ? function(){return this} : require, this));',amd:"define(function(require, exports, module){\n$\n});","cjs,amd":'(typeof define === "function" && define.amd ? define : function(factory){factory.call(exports, require, exports, module)})(function(require, exports, module){\n$\n});',"amd,global":'(typeof define === "function" && define.amd ? define : function(factory){factory.call(this, function(){return this}, this)})(function(require, exports, module){\n$\n});',"cjs,amd,global":'(typeof define === "function" && define.amd ? define : function(factory){var e = typeof exports == "undefined" ? this : exports;factory.call(e, typeof require == "undefined" ? function(){return this} : require, e, typeof module == "undefined" ? null : module)})(function(require, exports, module){\n$\n});'},define="var define = function(id, deps, factory){ if (typeof id !== 'string'){ factory = deps; deps = id; } if (factory == null){ factory = deps; deps = ['require', 'exports', 'module']; } function resolveList(deps){ var required = []; for (var i = 0, l = deps.length; i < l; i++) required.push( (deps[i] === 'require') ? amdRequire : (deps[i] === 'exports') ? exports : (deps[i] === 'module') ? module : require(deps[i]) ); return required; } function amdRequire(ids, success, failure){ if (typeof ids === 'string') return require(ids); var resolved = resolveList(ids); /*try { var resolved = resolveList(ids); } catch (error) { if (failure) failure(error); return; }*/ if (success) success.apply(null, resolved); } amdRequire.toUrl = require.resolve; if (typeof factory === 'function') factory = factory.apply(exports, resolveList(deps)); if (factory) module.exports = factory;};define.amd={};";e.prototype={resolve:function(e){var t=this.source,o=/\r\n/.test(t)?"\r\n":"\n",i=[],a=this.imports,u=this.lexicalEnvironment,s={};if(i.push(t.substr(0,this.strict)),this.strict&&i.push(o),"function"==typeof e)for(var c=0,l=a.length;l>c;c++){var f=a[c],d="__MODULE"+c+"__",p=e(f);if(p&&p.length)for(var h=0,g=p.length;g>h;h++){var m=p[h];Y.call(s,m)&&s[m].id!==f?r("importConflict",s[m].id,f,m,this.id||""):u[m]&&Y.call(u,m)?(u[m]&Nt)===Nt?r("exportConflict",f,m,this.id||""):n("shadowedImport",f,m,this.id||""):s[m]={id:f,name:d}}i.push(0==c?"var ":", ",d,' = require("',f,'")')}a.length&&i.push(";",o);for(var c=0,l=this.declaredVariables.length;l>c;c++)i.push(0==c?"var ":", "),i.push(this.declaredVariables[c]);l&&i.push(";",o);for(var c=0,l=this.exportedFunctions.length;l>c;c++)i.push("exports.",this.exportedFunctions[c]," = ",this.exportedFunctions[c],"; ");l&&i.push(o);for(var v=this.strict,_=this.tokens,c=0,l=_.length;l>c;c++){var E=_[c],x=E.type;if(i.push(t.substring(v,E.start)),v=E.start,x===ht){var m=E.value;(u[m]&Nt)===Nt?i.push("exports."):Y.call(s,m)&&i.push(s[m].name+".")}else x===bt?v=E.end:x===yt?v=E.expressionStart:x===Et&&(v=E.expressionStart)}return i.push(t.substring(v,t.length)),i.join("")},wrapStrict:function(){for(var e=[],t=this.exportedProperties,n=this.imports,r=0,o=t.length;o>r;r++)e.push("exports.",t[r],"=");o>0&&e.push("{}.undefined;");for(var r=0,o=n.length;o>r;r++)e.push('with(require("',n[r],'"))\n');if(n.length&&e.push("(function(){"),t=this.exportedVariables.concat(this.exportedFunctions),t.length){for(var r=0,o=t.length;o>r;r++){var i=t[r],a="v"==i?"b":"v";e.push(0==r?"({}.constructor.defineProperties(this, {":",",i,":{get:function(){return ",i,"},set:function(",a,"){",i,"=",a,"},enumerable:true}")}o&&e.push("}));")}return e.push(this.source),n.length&&e.push("}.call(this))"),e.join("")},wrap:function(){var e,t=[],n=this.imports;e=this.exportedVariables.concat(this.exportedProperties);for(var r=0,o=e.length;o>r;r++)t.push("exports.",e[r],"=");o>0&&t.push("{}.undefined;");for(var r=0,o=n.length;o>r;r++)t.push('with(require("',n[r],'"))\n');t.push("with(exports)(function(){"),e=this.exportedFunctions;for(var r=0,o=e.length;o>r;r++)t.push("this.",e[r],"=",e[r],";");return t.push("with(this){\n",this.source,"\n}"),t.push("}.call(exports));"),t.join("")},convert:function(e){e||(e=Q);var t;t=this.imports.length||this.exportedFunctions.length||this.exportedVariables.length?this.lexicalScope&&e.resolve?this.resolve(e.resolve):this.strict&&e.strict?this.wrapStrict():this.wrap():this.source;var n=[];return e.cjs&&n.push("cjs"),e.amd&&n.push("amd"),e.global&&n.push("global"),!this.amd&&this.lexicalEnvironment.define!==Rt||e.amd&&!(n.length>1)||(t=define+t),Z[n].replace("$",t)}};for(var et,tt,nt,rt,ot,it,at,ut,st,ct,lt,ft,dt={importConflict:'Import conflict: "$1" and "$2" both export "$3"\nResolve it by explicitly naming one of them: var $32 = require("$2").$3\n[$4]',exportConflict:'Export conflict: "$1" also contains the exported "$2"\nResolve it by explicitly naming one of them: var $22 = require("$1").$2\n[$3]',shadowedImport:'Import shadowed: The variable $2 is declared by this module but it\'s also\nimported through "$1". Only the locally declared variable will be used.\n[$3]',invalidArgs:"Invalid arguments.",nestedRequire:"The require statement can only be applied in the top scope. (Line $1)",nestedExport:"The exports statement can only be applied in the top scope. (Line $1)",unknownExport:"Unknown export statement. (Line $1)",undeclaredExport:"Cannot export undeclared variable: $1"},pt=2,ht=3,gt=4,mt=5,vt=7,_t=8,Et=10,xt=11,yt=12,bt=13,Rt=0,Ct=1,It=2|Ct,Nt=4,wt=Ct|Nt,Ot=It|Nt,St=8|Nt,Tt=1,At=3,Mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lt=0;Mt.length>Lt;Lt++){var kt={};kt[Mt[Lt]]=1;for(var Dt in kt)Mt.splice(Lt--,1)}})();var Flow=function(){var e,t=[],n=setTimeout(function(){n=null,e._next()},0);return e={destroy:function(){n&&clearTimeout(n)},par:function(n,r){return!r&&t[t.length-1]instanceof Array||t.push([]),t[t.length-1].push(n),e},seq:function(t){return e.par(t,!0)},_next:function(n,r){for(var o=[],i=[],a=t.shift()||[],u=a.length,s=1==u,c=0;a.length>c;c++)(function(t,a){t(function(t,n){o[a]=t,i[a]=n,0==--u&&e._next(s?o[0]:o,s?i[0]:i)},n,r)})(a[c],c)}}},LOCAL_EASY_XDM=!0;(function(e,t,n,r,o,i){function a(e,t){var n=typeof e[t];return"function"==n||!("object"!=n||!e[t])||"unknown"==n}function u(e,t){return!("object"!=typeof e[t]||!e[t])}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function c(){var e="Shockwave Flash",t="application/x-shockwave-flash";if(!E(navigator.plugins)&&"object"==typeof navigator.plugins[e]){var n=navigator.plugins[e].description;n&&!E(navigator.mimeTypes)&&navigator.mimeTypes[t]&&navigator.mimeTypes[t].enabledPlugin&&(O=n.match(/\d+/g))}if(!O){var r;try{r=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),O=Array.prototype.slice.call(r.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),r=null}catch(o){}}if(!O)return!1;var i=parseInt(O[0],10),a=parseInt(O[1],10);return S=i>9&&a>0,!0}function l(){if(!G){G=!0;for(var e=0;J.length>e;e++)J[e]();J.length=0}}function f(e,t){return G?(e.call(t),undefined):(J.push(function(){e.call(t)}),undefined)}function d(){var e=parent;if(""!==F)for(var t=0,n=F.split(".");n.length>t;t++)e=e[n[t]];return e.easyXDM}function p(t){return e.easyXDM=H,F=t,F&&(X="easyXDM_"+F.replace(".","_")+"_"),q}function h(e){return e.match(D)[3]}function g(e){return e.match(D)[4]||""}function m(e){var t=e.toLowerCase().match(D),n=t[2],r=t[3],o=t[4]||"";return("http:"==n&&":80"==o||"https:"==n&&":443"==o)&&(o=""),n+"//"+r+o}function v(e){if(e=e.replace(P,"$1/"),!e.match(/^(http||https):\/\//)){var t="/"===e.substring(0,1)?"":n.pathname;"/"!==t.substring(t.length-1)&&(t=t.substring(0,t.lastIndexOf("/")+1)),e=n.protocol+"//"+n.host+t+e}for(;j.test(e);)e=e.replace(j,"");return e}function _(e,t){var n="",r=e.indexOf("#");-1!==r&&(n=e.substring(r),e=e.substring(0,r));var o=[];for(var a in t)t.hasOwnProperty(a)&&o.push(a+"="+i(t[a]));return e+(U?"#":-1==e.indexOf("?")?"?":"&")+o.join("&")+n}function E(e){return e===undefined}function x(e,t,n){var r;for(var o in t)t.hasOwnProperty(o)&&(o in e?(r=t[o],"object"==typeof r?x(e[o],r,n):n||(e[o]=t[o])):e[o]=t[o]);return e}function y(){var e=t.body.appendChild(t.createElement("form")),n=e.appendChild(t.createElement("input"));n.name=X+"TEST"+L,w=n!==e.elements[n.name],t.body.removeChild(e)}function b(e){E(w)&&y();var n;w?n=t.createElement('<iframe name="'+e.props.name+'"/>'):(n=t.createElement("IFRAME"),n.name=e.props.name),n.id=n.name=e.props.name,delete e.props.name,"string"==typeof e.container&&(e.container=t.getElementById(e.container)),e.container||(x(n.style,{position:"absolute",top:"-2000px",left:"0px"}),e.container=t.body);var r=e.props.src;if(e.props.src="javascript:false",x(n,e.props),n.border=n.frameBorder=0,n.allowTransparency=!0,e.container.appendChild(n),e.onLoad&&T(n,"load",e.onLoad),e.usePost){var o,i=e.container.appendChild(t.createElement("form"));if(i.target=n.name,i.action=r,i.method="POST","object"==typeof e.usePost)for(var a in e.usePost)e.usePost.hasOwnProperty(a)&&(w?o=t.createElement('<input name="'+a+'"/>'):(o=t.createElement("INPUT"),o.name=a),o.value=e.usePost[a],i.appendChild(o));i.submit(),i.parentNode.removeChild(i)}else n.src=r;return e.props.src=r,n}function R(e,t){"string"==typeof e&&(e=[e]);for(var n,r=e.length;r--;)if(n=e[r],n=RegExp("^"==n.substr(0,1)?n:"^"+n.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),n.test(t))return!0;return!1}function C(r){var o,i=r.protocol;if(r.isHost=r.isHost||E(B.xdm_p),U=r.hash||!1,r.props||(r.props={}),r.isHost)r.remote=v(r.remote),r.channel=r.channel||"default"+L++,r.secret=Math.random().toString(16).substring(2),E(i)&&(i=m(n.href)==m(r.remote)?"4":a(e,"postMessage")||a(t,"postMessage")?"1":r.swf&&a(e,"ActiveXObject")&&c()?"6":"Gecko"===navigator.product&&"frameElement"in e&&-1==navigator.userAgent.indexOf("WebKit")?"5":r.remoteHelper?"2":"0");else if(r.channel=B.xdm_c.replace(/["'<>\\]/g,""),r.secret=B.xdm_s,r.remote=B.xdm_e.replace(/["'<>\\]/g,""),i=B.xdm_p,r.acl&&!R(r.acl,r.remote))throw Error("Access denied for "+r.remote);switch(r.protocol=i,i){case"0":if(x(r,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),r.isHost){if(!r.local){for(var u,s=n.protocol+"//"+n.host,l=t.body.getElementsByTagName("img"),f=l.length;f--;)if(u=l[f],u.src.substring(0,s.length)===s){r.local=u.src;break}r.local||(r.local=e)}var d={xdm_c:r.channel,xdm_p:0};r.local===e?(r.usePolling=!0,r.useParent=!0,r.local=n.protocol+"//"+n.host+n.pathname+n.search,d.xdm_e=r.local,d.xdm_pa=1):d.xdm_e=v(r.local),r.container&&(r.useResize=!1,d.xdm_po=1),r.remote=_(r.remote,d)}else x(r,{channel:B.xdm_c,remote:B.xdm_e,useParent:!E(B.xdm_pa),usePolling:!E(B.xdm_po),useResize:r.useParent?!1:r.useResize});o=[new q.stack.HashTransport(r),new q.stack.ReliableBehavior({}),new q.stack.QueueBehavior({encode:!0,maxLength:4e3-r.remote.length}),new q.stack.VerifyBehavior({initiate:r.isHost})];break;case"1":o=[new q.stack.PostMessageTransport(r)];break;case"2":r.remoteHelper=v(r.remoteHelper),o=[new q.stack.NameTransport(r),new q.stack.QueueBehavior,new q.stack.VerifyBehavior({initiate:r.isHost})];break;case"3":o=[new q.stack.NixTransport(r)];break;case"4":o=[new q.stack.SameOriginTransport(r)];break;case"5":o=[new q.stack.FrameElementTransport(r)];break;case"6":O||c(),o=[new q.stack.FlashTransport(r)]}return o.push(new q.stack.QueueBehavior({lazy:r.lazy,remove:!0})),o}function I(e){for(var t,n={incoming:function(e,t){this.up.incoming(e,t)},outgoing:function(e,t){this.down.outgoing(e,t)},callback:function(e){this.up.callback(e)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},r=0,o=e.length;o>r;r++)t=e[r],x(t,n,!0),0!==r&&(t.down=e[r-1]),r!==o-1&&(t.up=e[r+1]);return t}function N(e){e.up.down=e.down,e.down.up=e.up,e.up=e.down=null}var w,O,S,T,A,M=this,L=Math.floor(1e4*Math.random()),k=Function.prototype,D=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,j=/[\-\w]+\/\.\.\//,P=/([^:])\/\//g,F="",q={},H=e.easyXDM,X="easyXDM_",U=!1;if(a(e,"addEventListener"))T=function(e,t,n){e.addEventListener(t,n,!1)},A=function(e,t,n){e.removeEventListener(t,n,!1)};else{if(!a(e,"attachEvent"))throw Error("Browser not supported");T=function(e,t,n){e.attachEvent("on"+t,n)},A=function(e,t,n){e.detachEvent("on"+t,n)}}var V,G=!1,J=[];if("readyState"in t?(V=t.readyState,G="complete"==V||~navigator.userAgent.indexOf("AppleWebKit/")&&("loaded"==V||"interactive"==V)):G=!!t.body,!G){if(a(e,"addEventListener"))T(t,"DOMContentLoaded",l);else if(T(t,"readystatechange",function(){"complete"==t.readyState&&l()}),t.documentElement.doScroll&&e===top){var $=function(){if(!G){try{t.documentElement.doScroll("left")}catch(e){return r($,1),undefined}l()}};$()}T(e,"load",l)}var B=function(e){e=e.substring(1).split("&");for(var t,n={},r=e.length;r--;)t=e[r].split("="),n[t[0]]=o(t[1]);return n}(/xdm_e=/.test(n.search)?n.search:n.hash),z=function(){var e={},t={a:[1,2,3]},n='{"a":[1,2,3]}';return"undefined"!=typeof JSON&&"function"==typeof JSON.stringify&&JSON.stringify(t).replace(/\s/g,"")===n?JSON:(Object.toJSON&&Object.toJSON(t).replace(/\s/g,"")===n&&(e.stringify=Object.toJSON),"function"==typeof String.prototype.evalJSON&&(t=n.evalJSON(),t.a&&3===t.a.length&&3===t.a[2]&&(e.parse=function(e){return e.evalJSON()})),e.stringify&&e.parse?(z=function(){return e},e):null)};x(q,{version:"2.4.17.1",query:B,stack:{},apply:x,getJSONObject:z,whenReady:f,noConflict:p}),q.DomHelper={on:T,un:A,requiresJSON:function(n){u(e,"JSON")||t.write('<script type="text/javascript" src="'+n+'"></script>')}},function(){var e={};q.Fn={set:function(t,n){e[t]=n},get:function(t,n){var r=e[t];return n&&delete e[t],r}}}(),q.Socket=function(e){var t=I(C(e).concat([{incoming:function(t,n){e.onMessage(t,n)},callback:function(t){e.onReady&&e.onReady(t)}}])),n=m(e.remote);this.origin=m(e.remote),this.destroy=function(){t.destroy()},this.postMessage=function(e){t.outgoing(e,n)},t.init()},q.Rpc=function(e,t){if(t.local)for(var n in t.local)if(t.local.hasOwnProperty(n)){var r=t.local[n];"function"==typeof r&&(t.local[n]={method:r})}var o=I(C(e).concat([new q.stack.RpcBehavior(this,t),{callback:function(t){e.onReady&&e.onReady(t)}}]));this.origin=m(e.remote),this.destroy=function(){o.destroy()},o.init()},q.stack.SameOriginTransport=function(e){var t,o,i,a;return t={outgoing:function(e,t,n){i(e),n&&n()},destroy:function(){o&&(o.parentNode.removeChild(o),o=null)},onDOMReady:function(){a=m(e.remote),e.isHost?(x(e.props,{src:_(e.remote,{xdm_e:n.protocol+"//"+n.host+n.pathname,xdm_c:e.channel,xdm_p:4}),name:X+e.channel+"_provider"}),o=b(e),q.Fn.set(e.channel,function(e){return i=e,r(function(){t.up.callback(!0)},0),function(e){t.up.incoming(e,a)}})):(i=d().Fn.get(e.channel,!0)(function(e){t.up.incoming(e,a)}),r(function(){t.up.callback(!0)},0))},init:function(){f(t.onDOMReady,t)}}},q.stack.FlashTransport=function(e){function o(e){r(function(){a.up.incoming(e,s)},0)}function i(n){var r=e.swf+"?host="+e.isHost,o="easyXDM_swf_"+Math.floor(1e4*Math.random());q.Fn.set("flash_loaded"+n.replace(/[\-.]/g,"_"),function(){q.stack.FlashTransport[n].swf=c=l.firstChild;for(var e=q.stack.FlashTransport[n].queue,t=0;e.length>t;t++)e[t]();e.length=0}),e.swfContainer?l="string"==typeof e.swfContainer?t.getElementById(e.swfContainer):e.swfContainer:(l=t.createElement("div"),x(l.style,S&&e.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),t.body.appendChild(l));var i="callback=flash_loaded"+n.replace(/[\-.]/g,"_")+"&proto="+M.location.protocol+"&domain="+h(M.location.href)+"&port="+g(M.location.href)+"&ns="+F;l.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+o+"' data='"+r+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+r+"'></param><param name='flashvars' value='"+i+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+i+"' allowScriptAccess='always' wmode='transparent' src='"+r+"' height='1' width='1'></embed></object>"}var a,u,s,c,l;return a={outgoing:function(t,n,r){c.postMessage(e.channel,""+t),r&&r()},destroy:function(){try{c.destroyChannel(e.channel)}catch(t){}c=null,u&&(u.parentNode.removeChild(u),u=null)},onDOMReady:function(){s=e.remote,q.Fn.set("flash_"+e.channel+"_init",function(){r(function(){a.up.callback(!0)})}),q.Fn.set("flash_"+e.channel+"_onMessage",o),e.swf=v(e.swf);var t=h(e.swf),l=function(){q.stack.FlashTransport[t].init=!0,c=q.stack.FlashTransport[t].swf,c.createChannel(e.channel,e.secret,m(e.remote),e.isHost),e.isHost&&(S&&e.swfNoThrottle&&x(e.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),x(e.props,{src:_(e.remote,{xdm_e:m(n.href),xdm_c:e.channel,xdm_p:6,xdm_s:e.secret}),name:X+e.channel+"_provider"}),u=b(e))};q.stack.FlashTransport[t]&&q.stack.FlashTransport[t].init?l():q.stack.FlashTransport[t]?q.stack.FlashTransport[t].queue.push(l):(q.stack.FlashTransport[t]={queue:[l]},i(t))},init:function(){f(a.onDOMReady,a)}}},q.stack.PostMessageTransport=function(t){function o(e){if(e.origin)return m(e.origin);if(e.uri)return m(e.uri);if(e.domain)return n.protocol+"//"+e.domain;throw"Unable to retrieve the origin of the event"}function i(e){var n=o(e);n==c&&e.data.substring(0,t.channel.length+1)==t.channel+" "&&a.up.incoming(e.data.substring(t.channel.length+1),n)}var a,u,s,c;return a={outgoing:function(e,n,r){s.postMessage(t.channel+" "+e,n||c),r&&r()},destroy:function(){A(e,"message",i),u&&(s=null,u.parentNode.removeChild(u),u=null)},onDOMReady:function(){if(c=m(t.remote),t.isHost){var o=function(n){n.data==t.channel+"-ready"&&(s="postMessage"in u.contentWindow?u.contentWindow:u.contentWindow.document,A(e,"message",o),T(e,"message",i),r(function(){a.up.callback(!0)},0))};T(e,"message",o),x(t.props,{src:_(t.remote,{xdm_e:m(n.href),xdm_c:t.channel,xdm_p:1}),name:X+t.channel+"_provider"}),u=b(t)}else T(e,"message",i),s="postMessage"in e.parent?e.parent:e.parent.document,s.postMessage(t.channel+"-ready",c),r(function(){a.up.callback(!0)},0)},init:function(){f(a.onDOMReady,a)}}},q.stack.FrameElementTransport=function(o){var i,a,u,s;return i={outgoing:function(e,t,n){u.call(this,e),n&&n()},destroy:function(){a&&(a.parentNode.removeChild(a),a=null)},onDOMReady:function(){s=m(o.remote),o.isHost?(x(o.props,{src:_(o.remote,{xdm_e:m(n.href),xdm_c:o.channel,xdm_p:5}),name:X+o.channel+"_provider"}),a=b(o),a.fn=function(e){return delete a.fn,u=e,r(function(){i.up.callback(!0)},0),function(e){i.up.incoming(e,s)}}):(t.referrer&&m(t.referrer)!=B.xdm_e&&(e.top.location=B.xdm_e),u=e.frameElement.fn(function(e){i.up.incoming(e,s)}),i.up.callback(!0))},init:function(){f(i.onDOMReady,i)}}},q.stack.NameTransport=function(e){function t(t){var n=e.remoteHelper+(u?"#_3":"#_2")+e.channel;
s.contentWindow.sendMessage(t,n)}function n(){u?2!==++l&&u||a.up.callback(!0):(t("ready"),a.up.callback(!0))}function o(e){a.up.incoming(e,p)}function i(){d&&r(function(){d(!0)},0)}var a,u,s,c,l,d,p,h;return a={outgoing:function(e,n,r){d=r,t(e)},destroy:function(){s.parentNode.removeChild(s),s=null,u&&(c.parentNode.removeChild(c),c=null)},onDOMReady:function(){u=e.isHost,l=0,p=m(e.remote),e.local=v(e.local),u?(q.Fn.set(e.channel,function(t){u&&"ready"===t&&(q.Fn.set(e.channel,o),n())}),h=_(e.remote,{xdm_e:e.local,xdm_c:e.channel,xdm_p:2}),x(e.props,{src:h+"#"+e.channel,name:X+e.channel+"_provider"}),c=b(e)):(e.remoteHelper=e.remote,q.Fn.set(e.channel,o));var t=function(){var o=s||this;A(o,"load",t),q.Fn.set(e.channel+"_load",i),function a(){"function"==typeof o.contentWindow.sendMessage?n():r(a,50)}()};s=b({props:{src:e.local+"#_4"+e.channel},onLoad:t})},init:function(){f(a.onDOMReady,a)}}},q.stack.HashTransport=function(t){function n(e){if(g){var n=t.remote+"#"+p++ +"_"+e;(s||!v?g.contentWindow:g).location=n}}function o(e){d=e,u.up.incoming(d.substring(d.indexOf("_")+1),_)}function i(){if(h){var e=h.location.href,t="",n=e.indexOf("#");-1!=n&&(t=e.substring(n)),t&&t!=d&&o(t)}}function a(){c=setInterval(i,l)}var u,s,c,l,d,p,h,g,v,_;return u={outgoing:function(e){n(e)},destroy:function(){e.clearInterval(c),(s||!v)&&g.parentNode.removeChild(g),g=null},onDOMReady:function(){if(s=t.isHost,l=t.interval,d="#"+t.channel,p=0,v=t.useParent,_=m(t.remote),s){if(x(t.props,{src:t.remote,name:X+t.channel+"_provider"}),v)t.onLoad=function(){h=e,a(),u.up.callback(!0)};else{var n=0,o=t.delay/50;(function i(){if(++n>o)throw Error("Unable to reference listenerwindow");try{h=g.contentWindow.frames[X+t.channel+"_consumer"]}catch(e){}h?(a(),u.up.callback(!0)):r(i,50)})()}g=b(t)}else h=e,a(),v?(g=parent,u.up.callback(!0)):(x(t,{props:{src:t.remote+"#"+t.channel+new Date,name:X+t.channel+"_consumer"},onLoad:function(){u.up.callback(!0)}}),g=b(t))},init:function(){f(u.onDOMReady,u)}}},q.stack.ReliableBehavior=function(){var e,t,n=0,r=0,o="";return e={incoming:function(i,a){var u=i.indexOf("_"),s=i.substring(0,u).split(",");i=i.substring(u+1),s[0]==n&&(o="",t&&(t(!0),t=null)),i.length>0&&(e.down.outgoing(s[1]+","+n+"_"+o,a),r!=s[1]&&(r=s[1],e.up.incoming(i,a)))},outgoing:function(i,a,u){o=i,t=u,e.down.outgoing(r+","+ ++n+"_"+i,a)}}},q.stack.QueueBehavior=function(e){function t(){if(e.remove&&0===u.length)return N(n),undefined;if(!s&&0!==u.length&&!a){s=!0;var o=u.shift();n.down.outgoing(o.data,o.origin,function(e){s=!1,o.callback&&r(function(){o.callback(e)},0),t()})}}var n,a,u=[],s=!0,c="",l=0,f=!1,d=!1;return n={init:function(){E(e)&&(e={}),e.maxLength&&(l=e.maxLength,d=!0),e.lazy?f=!0:n.down.init()},callback:function(e){s=!1;var r=n.up;t(),r.callback(e)},incoming:function(t,r){if(d){var i=t.indexOf("_"),a=parseInt(t.substring(0,i),10);c+=t.substring(i+1),0===a&&(e.encode&&(c=o(c)),n.up.incoming(c,r),c="")}else n.up.incoming(t,r)},outgoing:function(r,o,a){e.encode&&(r=i(r));var s,c=[];if(d){for(;0!==r.length;)s=r.substring(0,l),r=r.substring(s.length),c.push(s);for(;s=c.shift();)u.push({data:c.length+"_"+s,origin:o,callback:0===c.length?a:null})}else u.push({data:r,origin:o,callback:a});f?n.down.init():t()},destroy:function(){a=!0,n.down.destroy()}}},q.stack.VerifyBehavior=function(e){function t(){r=Math.random().toString(16).substring(2),n.down.outgoing(r)}var n,r,o;return n={incoming:function(i,a){var u=i.indexOf("_");-1===u?i===r?n.up.callback(!0):o||(o=i,e.initiate||t(),n.down.outgoing(i)):i.substring(0,u)===o&&n.up.incoming(i.substring(u+1),a)},outgoing:function(e,t,o){n.down.outgoing(r+"_"+e,t,o)},callback:function(){e.initiate&&t()}}},q.stack.RpcBehavior=function(e,t){function n(e){e.jsonrpc="2.0",i.down.outgoing(a.stringify(e))}function r(e,t){var r=Array.prototype.slice;return function(){var o,i=arguments.length,a={method:t};i>0&&"function"==typeof arguments[i-1]?(i>1&&"function"==typeof arguments[i-2]?(o={success:arguments[i-2],error:arguments[i-1]},a.params=r.call(arguments,0,i-2)):(o={success:arguments[i-1]},a.params=r.call(arguments,0,i-1)),c[""+ ++u]=o,a.id=u):a.params=r.call(arguments,0),e.namedParams&&1===a.params.length&&(a.params=a.params[0]),n(a)}}function o(e,t,r,o){if(!r)return t&&n({id:t,error:{code:-32601,message:"Procedure not found."}}),undefined;var i,a;t?(i=function(e){i=k,n({id:t,result:e})},a=function(e,r){a=k;var o={id:t,error:{code:-32099,message:e}};r&&(o.error.data=r),n(o)}):i=a=k,s(o)||(o=[o]);try{var u=r.method.apply(r.scope,o.concat([i,a]));E(u)||i(u)}catch(c){a(c.message)}}var i,a=t.serializer||z(),u=0,c={};return i={incoming:function(e){var r=a.parse(e);if(r.method)t.handle?t.handle(r,n):o(r.method,r.id,t.local[r.method],r.params);else{var i=c[r.id];r.error?i.error&&i.error(r.error):i.success&&i.success(r.result),delete c[r.id]}},init:function(){if(t.remote)for(var n in t.remote)t.remote.hasOwnProperty(n)&&(e[n]=r(t.remote[n],n));i.down.init()},destroy:function(){for(var n in t.remote)t.remote.hasOwnProperty(n)&&e.hasOwnProperty(n)&&delete e[n];i.down.destroy()}}},M.easyXDM=q})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);var lscache=function(){function e(){if(void 0!==o)return o;try{n("__lscachetest__","__lscachetest__"),r("__lscachetest__"),o=!0}catch(e){o=!1}return o}function t(){return void 0===i&&(i=null!=window.JSON),i}function n(e,t){localStorage.removeItem(a+s+e),localStorage.setItem(a+s+e,t)}function r(e){localStorage.removeItem(a+s+e)}var o,i,a="lscache-",u=Math.floor(144e9),s="";return{set:function(o,i,c){if(e()){if("string"!=typeof i){if(!t())return;try{i=JSON.stringify(i)}catch(l){return}}try{n(o,i)}catch(f){if("QUOTA_EXCEEDED_ERR"!==f.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==f.name)return;for(var d,p=[],h=0;localStorage.length>h;h++)if(d=localStorage.key(h),0===d.indexOf(a+s)&&0>d.indexOf("-cacheexpiration")){d=d.substr((a+s).length);var g=localStorage.getItem(a+s+(d+"-cacheexpiration")),g=g?parseInt(g,10):u;p.push({key:d,size:(localStorage.getItem(a+s+d)||"").length,expiration:g})}for(p.sort(function(e,t){return t.expiration-e.expiration}),h=(i||"").length;p.length&&h>0;)d=p.pop(),r(d.key),r(d.key+"-cacheexpiration"),h-=d.size;try{n(o,i)}catch(m){return}}c?n(o+"-cacheexpiration",(Math.floor((new Date).getTime()/6e4)+c).toString(10)):r(o+"-cacheexpiration")}},get:function(n){if(!e())return null;var o=n+"-cacheexpiration",i=localStorage.getItem(a+s+o);if(i&&(i=parseInt(i,10),Math.floor((new Date).getTime()/6e4)>=i))return r(n),r(o),null;if(n=localStorage.getItem(a+s+n),!n||!t())return n;try{return JSON.parse(n)}catch(u){return n}},remove:function(t){return e()?(r(t),r(t+"-cacheexpiration"),undefined):null},supported:function(){return e()},flush:function(){if(e())for(var t=localStorage.length-1;t>=0;--t){var n=localStorage.key(t);0===n.indexOf(a+s)&&localStorage.removeItem(n)}},setBucket:function(e){s=e},resetBucket:function(){s=""}}}();(function(){var e;HAS_LOCAL_STORAGE&&lscache&&(lscache.setBucket(FILE_STORAGE_TOKEN),e=lscache.get(LSCACHE_SCHEMA_VERSION_STRING),e&&e>0&&LSCACHE_SCHEMA_VERSION>e&&(lscache.flush(),lscache.set(LSCACHE_SCHEMA_VERSION_STRING,LSCACHE_SCHEMA_VERSION))),easyXDM=LOCAL_EASY_XDM&&context.easyXDM?context.easyXDM.noConflict("Inject"):!1})();var Fiber=this.Fiber.noConflict(),Analyzer;(function(){var e=Fiber.extend(function(){return{init:function(){},stripBuiltins:function(e){for(var t,n=[],r=0,o=e.length;o>r;r++)t=e[r],"require"!==t&&"exports"!==t&&"module"!==t&&n.push(t);return n},extractRequires:function(e){var t=LinkJS.parse(e);return t.requires}}});Analyzer=new e})();var Communicator;(function(){var e=Fiber.extend(function(){function e(){s=[],c={}}function t(e,t){return lscache.set(e,t,userConfig.fileExpires)}function n(e){return lscache.get(e)}function r(e){return e=e.replace(HOST_PREFIX_REGEX,"").replace(HOST_SUFFIX_REGEX,"$1")}function o(e,n,r,o){r=1*r,debugLog("Communicator ("+n+")","status "+r+". Length: "+(o?o.length:"NaN")),200===r&&t(n,o),each(c[n],function(t){200!==r?(Executor&&Executor.flagModuleAsBroken(e),t(!1)):t(o)}),c[n]=[]}function i(){var e=userConfig.xd.relayFile,t=userConfig.xd.relaySwf||"";e+=e.indexOf("?")>=0?"&":"?",e+="swf="+t,l=new easyXDM.Socket({remote:e,swf:t,onMessage:function(e,t){if("string"!=typeof userConfig.moduleRoot||r(userConfig.moduleRoot)===r(t)){var n=e.split("__INJECT_SPLIT__");o(n[0],n[1],n[2],n[3])}},onReady:function(){f=!1,each(s,function(e){e()}),s=[]}})}function a(e,t){l.postMessage(e+"__INJECT_SPLIT__"+t)}function u(e,t){var n=getXhr();n.open("GET",t),n.onreadystatechange=function(){4===n.readyState&&o(e,t,n.status,n.responseText)},n.send(null)}var s,c,l,f=!1;return{init:function(){this.clearCaches()},clearCaches:function(){e()},noop:function(e,t,n){n("")},get:function(e,t,r){c[t]||(c[t]=[]),debugLog("Communicator ("+t+")","requesting");var o=n(t);if(o)return debugLog("Communicator ("+t+")","retireved from cache. length: "+o.length),r(o),undefined;if(debugLog("Communicator ("+t+")","queued"),c[t].length)return c[t].push(r),debugLog("Communicator ("+t+")","request already in progress"),undefined;c[t].push(r),!userConfig.xd.relayFile||l||f||(f=!0,context.setTimeout(i));var d=function(){a(e,t)};f?s.push(d):userConfig.xd.relayFile?a(e,t):u(e,t)}}});Communicator=new e})();var Executor;(function(){function createEvalScript(e){var t=document.createElement("script");t.type="text/javascript";try{t.text=e}catch(n){try{t.innerHTML=e}catch(r){return!1}}return t}function cleanupEvalScriptNode(e){context.setTimeout(function(){return docHead?docHead.removeChild(e):undefined})}function getLineNumberFromException(e){var t,n,r=parseInt(onErrorOffset,10);return e.lineNumber!==undefined&&null!==e.lineNumber?parseInt(e.lineNumber,10)+r:e.line!==undefined&&null!==e.line?parseInt(e.line,10)+r:e.stack?(t=e.stack.split("\n"),n=t[1].split(":"),parseInt(n[n.length-2],10)+r):undefined}function executeJavaScriptModule(code,options){var errorObject=null,sourceString=IS_IE?"":"//@ sourceURL="+options.url,result;options={moduleId:options.moduleId||null,functionId:options.functionId||null,preamble:options.preamble||"",preambleLength:options.preamble.split("\n").length+1,epilogue:options.epilogue||"",epilogueLength:options.epilogue.split("\n").length+1,originalCode:options.originalCode||code,url:options.url||null},code=[code,sourceString].join("\n");var tempErrorHandler=function(e,t,n,r){var o=n-options.preambleLength,i=options.originalCode.split("\n").length,a="";return"runtime"===r?a="Runtime error in "+options.moduleId+" ("+options.url+") on line "+o+":\n "+e:(o=o>i?i:o,a="Parsing error in "+options.moduleId+" ("+options.url+") on line "+o+":\n "+e),errorObject=Error(a),errorObject.line=o,errorObject.stack=null,!0};context.onerror=tempErrorHandler;var scr=createEvalScript(code);if(scr&&docHead&&(docHead.appendChild(scr),cleanupEvalScriptNode(scr)),!errorObject)if(!context.Inject.INTERNAL.execute[options.functionId]||userConfig.debug.sourceMap){var toExec=code.replace(/([\w\W]+?)=([\w\W]*\})[\w\W]*?$/,"$1 = ($2)();"),relativeE;if(toExec=[toExec,sourceString].join("\n"),context.Inject.INTERNAL.execute[options.functionId]){try{eval("+\n//@ sourceURL=Inject-Executor-line.js")}catch(ee){relativeE=ee}eval(toExec)}else try{try{eval("+\n//@ sourceURL=Inject-Executor-line.js")}catch(ee){relativeE=ee}eval(toExec)}catch(e){e.lineNumber=e.lineNumber&&relativeE.lineNumber?e.lineNumber-relativeE.lineNumber+1:getLineNumberFromException(e),tempErrorHandler(e.message,null,e.lineNumber,"parse")}context.Inject.INTERNAL.execute[options.functionId]&&(result=context.Inject.INTERNAL.execute[options.functionId],result.error&&(result.error.lineNumber=result.error.lineNumber&&relativeE.lineNumber?result.error.lineNumber-relativeE.lineNumber:getLineNumberFromException(result.error),tempErrorHandler(result.error.message,null,result.error.lineNumber,"runtime")))}else result=context.Inject.INTERNAL.execute[options.functionId](),result.error&&tempErrorHandler(result.error.message,null,getLineNumberFromException(result.error),"runtime");return errorObject&&(result||(result={}),result.error=errorObject),context.onerror=initOldError,context.Inject.INTERNAL.execute[options.functionId]&&delete context.Inject.INTERNAL.execute[options.functionId],result}var docHead=!1,onErrorOffset=IS_GK?-3:0,initOldError=context.onerror;try{docHead=document.getElementsByTagName("head")[0]}catch(e){docHead=!1}var AsStatic=Fiber.extend(function(){var e=0;return{init:function(){this.clearCaches()},clearCaches:function(){this.cache={},this.executed={},this.broken={},this.circular={},this.defined={},this.anonymousAMDStack=[]},defineExecutingModuleAs:function(e,t){return this.anonymousAMDStack.push({id:e,path:t})},undefineExecutingModule:function(){return this.anonymousAMDStack.pop()},getCurrentExecutingAMD:function(){return this.anonymousAMDStack[this.anonymousAMDStack.length-1]},assignModule:function(e,t,n,r){var o=Executor.createModule(e+"^^^"+t,n);o.exports=r},getAssignedModule:function(e,t){return this.getModule(e+"^^^"+t)},runTree:function(e,t,n){var r=[];e.postOrder(function(e){if(e.getValue().name){var n,o=e.getValue().name,i=e.getValue().path,a=t[o],u=e.getValue().resolvedId;Executor.createModule(u,i),e.isCircular()||(n=Executor.runModule(u,a,i),r.push(n))}}),n(r)},createModule:function(e,t){var n;return this.cache[e]||(n={},n.id=e||null,n.uri=t||null,n.exports={},n.error=null,n.setExports=function(e){var t;for(t in n.exports)return debugLog("cannot setExports when exports have already been set. setExports skipped"),undefined;switch(typeof e){case"object":for(t in e)n.exports[t]=e[t];break;case"function":n.exports=e;break;default:n.exports=e}},e&&(this.cache[e]=n)),e?this.cache[e]:n},isModuleDefined:function(e){return this.defined[e]},flagModuleAsDefined:function(e){this.defined[e]=!0},flagModuleAsBroken:function(e){this.broken[e]=!0},flagModuleAsCircular:function(e){this.circular[e]=!0},isModuleCircular:function(e){return this.circular[e]},getModule:function(e){if(this.broken[e]&&this.broken.hasOwnProperty(e))throw Error("module "+e+" failed to load successfully");return this.cache[e]||null},runModule:function(t,n,r){function o(e){return e.replace(/__MODULE_ID__/g,t).replace(/__MODULE_URI__/g,r).replace(/__FUNCTION_ID__/g,a).replace(/__INJECT_NS__/g,NAMESPACE)}if(debugLog("Executor","executing "+r),this.cache[t]&&this.executed[t])return this.cache[t];if(this.cache[t]&&this.defined[t])return this.cache[t];var i,a="exec"+e++,u=o(commonJSHeader),s=o(commonJSFooter),c=[u,";",n,s].join("\n");if(i=executeJavaScriptModule(c,{moduleId:t,functionId:a,preamble:u,epilogue:s,originalCode:n,url:r}),i&&i.error)throw context[NAMESPACE].clearCache(),i.error;return DEFINE_EXTRACTION_REGEX.test(n)||(this.cache[t]=i),this.executed[t]=!0,debugLog("Executor","executed",t,r,i),i}}});Executor=new AsStatic})();var InjectCore;(function(){var e=Fiber.extend(function(){return{init:function(){},createRequire:function(e,t){var n=new RequireContext(e,t),require=proxy(n.require,n);return require.ensure=proxy(n.ensure,n),require.run=proxy(n.run,n),require.toUrl=function(n){var r=RulesEngine.resolveIdentifier(n,e),o=RulesEngine.resolveUrl(r,t,!0);return o},require},createDefine:function(e,t){var n=new RequireContext(e,t),define=proxy(n.define,n);return define.amd={},define},plugin:function(e,t,n,r){RulesEngine.addRule(RegExp("^"+e+"!"),t),r.plugins=r.plugins||{},r.plugins[e]=n},setModuleRoot:function(e){userConfig.moduleRoot=e},setCrossDomain:function(e){userConfig.xd.relayFile=e.relayFile||null,userConfig.xd.relaySwf=e.relaySwf||null},setUseSuffix:function(e){userConfig.useSuffix=e},clearCache:function(){HAS_LOCAL_STORAGE&&lscache&&lscache.flush()},setExpires:function(e){userConfig.fileExpires=e||0},setCacheKey:function(e){var t;return HAS_LOCAL_STORAGE&&lscache?(t=lscache.get(LSCACHE_APP_KEY_STRING),(!e&&t||null!==t&&t!==e||null===t&&e)&&(lscache.flush(),lscache.set(LSCACHE_APP_KEY_STRING,e)),undefined):!1},reset:function(){this.clearCache(),Executor.clearCaches(),Communicator.clearCaches()},enableDebug:function(e,t){userConfig.debug[e]=t||!0}}});InjectCore=new e})();var RequireContext=Fiber.extend(function(){return{init:function(e,t){this.id=e||null,this.path=t||null},log:function(e){debugLog("RequireContext for "+this.path,e)},getPath:function(){if(!userConfig.moduleRoot)throw Error("moduleRoot must be defined. Please use Inject.setModuleRoot()");return this.path||userConfig.moduleRoot},getId:function(){return this.id||""},getModule:function(e){return Executor.getModule(e).exports},getAllModules:function(e,require,t){for(var n=[],r=null,o=0,i=e.length;i>o;o++)switch(r=e[o]){case"require":n.push(require);break;case"module":n.push(t);break;case"exports":n.push(t.exports);break;default:n.push(this.getModule(r))}return n},require:function(e,t){var n,r,o;if("string"==typeof e){if(this.log("CommonJS require(string) of "+e),/^[\d]+$/.test(e))throw Error("require() must be a string containing a-z, slash(/), dash(-), and dots(.)");if(r=RulesEngine.resolveIdentifier(e,this.getId()),n=Executor.getModule(r),o=Executor.getAssignedModule(this.getId(),r))return o.exports;if(n)return n.exports;throw Error("module "+e+" not found")}this.log("AMD require(Array) of "+e.join(", "));var i=Analyzer.stripBuiltins(e);this.ensure(i,proxy(function(n){var r=Executor.createModule(),o=this.getAllModules(e,n,r);t.apply(context,o)},this))},ensure:function(e,t){if("[object Array]"!==Object.prototype.toString.call(e))throw Error("require.ensure() must take an Array as the first argument");this.log("CommonJS require.ensure(array) of "+e.join(", ")),e=Analyzer.stripBuiltins(e);var n,r,o=e.length,i=this.getPath()?this.getPath():userConfig.moduleRoot,a=proxy(function(e,n){Executor.runTree(e,n,proxy(function(){0===--o&&t&&t(InjectCore.createRequire(this.getId(),this.getPath()))},this))},this);if(!o)return t&&t(InjectCore.createRequire(this.getId(),this.getPath())),undefined;for(var u=0,s=e.length;s>u;u++)n=TreeDownloader.createNode(e[u],i),r=new TreeDownloader(n),r.get(a)},run:function(e){this.log("AMD require.run(string) of "+e),this.ensure([e])},define:function(){var e,t,n=Array.prototype.slice.call(arguments,0),r=null,o=["require","exports","module"],i=!1,a={},u=[],s=[],c=null,l={"string array object":["id","dependencies","executionFunctionOrLiteral"],"string object":["id","executionFunctionOrLiteral"],"array object":["dependencies","executionFunctionOrLiteral"],object:["executionFunctionOrLiteral"]},f=[];for(t=0,len=n.length;len>t;t++)"[object Array]"===Object.prototype.toString.apply(n[t])?f.push("array"):"object"==typeof n[t]||"function"==typeof n[t]?f.push("object"):f.push(typeof n[t]);if(f=f.join(" "),!l[f])throw Error("You did not use an AMD compliant interface. Please check your define() calls");for(f=l[f],t=0,len=f.length;len>t;t++)switch(e=n[t],f[t]){case"id":r=e;break;case"dependencies":o=e,i=!0;break;case"executionFunctionOrLiteral":a=e}for(this.log("AMD define(...) of "+(r?r:"anonymous")),t=0,len=o.length;len>t;t++)BUILTINS[o[t]]?s.push(o[t]):(c=RulesEngine.resolveIdentifier(o[t],this.getId()),s.push(c),Executor.isModuleCircular(c)||Executor.isModuleDefined(c)||u.push(o[t]));if(!r){if(currentExecutingAMD=Executor.getCurrentExecutingAMD(),!currentExecutingAMD)throw Error("Anonymous AMD module used, but it was not included as a dependency. This is most often caused by an anonymous define() from a script tag.");r=currentExecutingAMD.id,this.log("AMD identified anonymous module as "+r)}if(Executor.isModuleDefined(r))return this.log("AMD module "+r+" has already ran once"),undefined;if(Executor.flagModuleAsDefined(r),!i&&"function"==typeof a){var d=["(",""+a,")"].join(""),p=Analyzer.extractRequires(d);o.concat(p)}this.log("AMD define(...) of "+r+" depends on: "+o.join(", ")),this.log("AMD define(...) of "+r+" will retrieve: "+u.join(", ")),u.unshift("require"),this.require(u,proxy(function(require){this.log("AMD define(...) of "+r+" all downloads required");var e=Executor.getModule(r);e||(e=Executor.createModule(r));var t,n=this.getAllModules(s,require,e);if("function"==typeof a)t=a.apply(null,n),t&&e.setExports(t);else for(var o in a)e.exports[o]=a[o]},this))}}});RequireContext=RequireContext;var RulesEngine;(function(){function e(){n.sort(function(e,t){return t.weight-e.weight}),r=!1}function t(e){return(""+e).replace(FUNCTION_BODY_REGEX,"$1")}var n=[],r=!1,o=Fiber.extend(function(){return{init:function(){this.pointcuts={}},resolveIdentifier:function(e,t){return t||(t=""),0!==e.indexOf(".")&&(t=""),t&&(t=t.split("/"),t.pop(),t=t.join("/")),0===e.indexOf("/")?e:(e=this.computeRelativePath(e,t),0===e.indexOf("/")&&(e=e.split("/"),e.shift(),e=e.join("/")),e)},resolveUrl:function(e,t,n){var r;if(!userConfig.moduleRoot)throw Error("module root needs to be defined for resolving URLs");if(t&&!userConfig.baseDir?(t=t.replace(PROTOCOL_REGEX,PROTOCOL_EXPANDED_STRING).split("/"),t[t.length-1]&&1!==t.length&&t.pop(),t=t.join("/").replace(PROTOCOL_EXPANDED_REGEX,PROTOCOL_STRING)):t=t?userConfig.baseDir(t):userConfig.moduleRoot,ABSOLUTE_PATH_REGEX.test(e))return e;var o=this.applyRules(e);return e=o.resolved,ABSOLUTE_PATH_REGEX.test(e)?(this.pointcuts[e]=o.pointcuts,e):e.length?(t=t.replace(PROTOCOL_REGEX,PROTOCOL_EXPANDED_STRING),e=e.replace(PROTOCOL_REGEX,PROTOCOL_EXPANDED_STRING),r=/\?/.test(t)?t+e:this.computeRelativePath(e,t),r=r.replace(PROTOCOL_EXPANDED_REGEX,PROTOCOL_STRING),!n&&o.useSuffix&&userConfig.useSuffix&&!FILE_SUFFIX_REGEX.test(r)&&(r+=BASIC_FILE_SUFFIX),this.pointcuts[r]=o.pointcuts,r):(this.pointcuts.__INJECT_no_path=o.pointcuts,"")},computeRelativePath:function(e,t){var n,r,o=[];if(ABSOLUTE_PATH_REGEX.test(e))return e;n=[].concat(t.split("/"),e.split("/"));for(var i=0,a=n.length;a>i;i++)if(r=n[i],!("."===r||""===r&&i>0))if(".."===r){if(0===o.length)throw Error("could not traverse higher than highest path: "+e+", "+t);o.pop()}else o.push(r);return o=o.join("/")},getPointcuts:function(e,n){e=e||"__INJECT_no_path";var r,o,i=this.pointcuts[e]||{before:[],after:[]},a={};if(n===undefined)return i;for(o in i)if(i.hasOwnProperty(o))for(var u=0,s=i[o].length;s>u;u++)r=i[o][u],a[o]||(a[o]=[]),a[o].push(t(r));for(o in a)a.hasOwnProperty(o)&&(a[o]=a[o].join("\n"));return a},clearRules:function(){n=[],r=!1},addRule:function(e,t,o){o===undefined&&(t===undefined&&(o=e,t=null,e=null),o=t,t=null),t||(t=n.length),"string"==typeof o&&(o={path:o}),o.pointcuts||(o.pointcuts={}),(o.pointcuts.before||o.pointcuts.after)&&debugLog("RulesEngine","deprecated pointcuts in rule for "+(""+e)),r=!0,n.push({matches:o.matches||e,weight:o.weight||t,useSuffix:o.useSuffix===!1?!1:!0,last:o.last||!1,path:o.path,pointcuts:o.pointcuts||{}})},manifest:function(e){var t,n;for(t in e)n=e[t],n.matches&&(t=n.matches),this.addRule(t,n)},applyRules:function(t){r&&e();var o,i=t,a={},u=!0,s=!1;return each(n,function(e){if(!s){var t=!1;if("string"==typeof e.matches&&e.matches===i?t=!0:e.matches instanceof RegExp&&e.matches.test(i)&&(t=!0),t){"string"==typeof e.path?i=e.path:"function"==typeof e.path&&(i=e.path(i)),e.useSuffix===!1&&(u=!1);for(var n in e.pointcuts)e.pointcuts.hasOwnProperty(n)&&(a[n]||(a[n]=[]),a[n].push(e.pointcuts[n]));e.last&&(s=!0)}}}),o={resolved:i||"",useSuffix:u,pointcuts:a}}}});RulesEngine=new o})();var TreeDownloader=Fiber.extend(function(){return{init:function(e){this.callsRemaining=0,this.root=e,this.files={}},log:function(){var e=[].slice.call(arguments,0),t=this.root.getValue()?this.root.getValue().name:null;debugLog("TreeDownloader ("+t+")",e.join(" "))},reduceCallsRemaining:function(e,t){this.callsRemaining--,this.log("reduce. outstanding",this.callsRemaining),0>=this.callsRemaining&&e.call(null,t)},increaseCallsRemaining:function(e){this.callsRemaining+=e||1,this.log("increase. outstanding",this.callsRemaining)},getFiles:function(){return this.files},get:function(e){this.log("started download"),this.downloadTree(this.root,proxy(function(){e(this.root,this.getFiles())},this))},downloadTree:function(e,t){var n=e.getParent()&&e.getParent().getValue()?e.getParent().getValue().resolvedId:"",r=null,o=RulesEngine.resolveIdentifier(e.getValue().name,n);return e.getValue().path=RulesEngine.resolveUrl(o),e.getValue().resolvedId=o,e.getParent()||this.increaseCallsRemaining(),Executor.isModuleDefined(e.getValue().name)?(this.log("AMD defined module, no download required",e.getValue().name),this.reduceCallsRemaining(t,e),undefined):(this.log("requesting file",e.getValue().path),r=e.getValue().path?Communicator.get:Communicator.noop,r(e.getValue().name,e.getValue().path,proxy(function(n){this.log("download complete",e.getValue().path);var r=RulesEngine.getPointcuts(e.getValue().path),i=RulesEngine.getPointcuts(e.getValue().path,!0),a=r.afterFetch||[],u=e.getParent()?e.getParent().getValue().name:"",s=e.getParent()?e.getParent().getValue().path:"",c=new Flow;c.seq(function(e){e(null,n)});for(var l=function(t){c.seq(function(n,r,o){a[t](n,o,e.getValue().name,u,s)})},f=0,d=a.length;d>f;f++)l(f);c.seq(proxy(function(n,r,a){if("string"!=typeof a&&"object"==typeof a)return Executor.assignModule(u,o,e.getValue().path,a),this.reduceCallsRemaining(t,e);if(a===undefined)return this.reduceCallsRemaining(t,e);var s=i.before?[i.before,"\n"].join(""):"",c=i.after?[i.after,"\n"].join(""):"";a=[s,a,c].join("");var l,f=e,p={};for(p[e.getValue().name]=!0,f=f.getParent();f&&f.getValue();)l=f.getValue().name,p[l]&&(this.log("circular reference found",e.getValue().name),e.flagCircular(),Executor.flagModuleAsCircular(e.getValue().name)),p[l]=!0,f=f.getParent();if(!e.isCircular()&&a){this.files[e.getValue().name]=a;var h,g,m,v,_=Analyzer.extractRequires(a),E=_,x=[],y=proxy(function(){this.reduceCallsRemaining(t,e)},this);for(v=0,d=E.length;d>v;v++)g=RulesEngine.resolveIdentifier(E[v],e.getValue().resolvedId),Executor.isModuleDefined(g)||Executor.isModuleDefined(E[v])||x.push(E[v]);for(this.log("dependencies ("+x.length+"):"+x.join(", ")),x.length&&this.increaseCallsRemaining(x.length),v=0,d=x.length;d>v;v++)g=_.amd?RulesEngine.resolveIdentifier(x[v],e.getValue().resolvedId):x[v],m="",h=TreeDownloader.createNode(g,m),e.addChild(h),this.downloadTree(h,y)}a===!1&&(e.getValue().failed=!0),this.reduceCallsRemaining(t,e)},this))},this)),undefined)}}});TreeDownloader.createNode=function(e,t){var n=new TreeNode({name:e,path:t,failed:!1});return n};var TreeNode=Fiber.extend(function(){return{init:function(e){this.value=e,this.children=[],this.left=null,this.right=null,this.parent=null,this.isCircularNode=!1},getValue:function(){return this.value},flagCircular:function(){this.isCircularNode=!0},isCircular:function(){return this.isCircularNode},addChild:function(e){var t;return this.children.length>0&&(t=this.children[this.children.length-1],e.setLeft(t),t.setRight(e)),this.children.push(e),e.setParent(this)},getChildren:function(){return this.children},setLeft:function(e){return this.left=e,this.left},getLeft:function(){return this.left},setRight:function(e){return this.right=e,this.right},getRight:function(){return this.right},setParent:function(e){return this.parent=e,this.parent},getParent:function(){return this.parent},postOrder:function(e){for(var t=this,n=null,r=[];t;)if(t.getChildren().length>0&&"up"!==n)n="down",t=t.getChildren()[0];else if(r.push(t.getValue()),e&&e(t),t.getRight())n="right",t=t.getRight();else{if(!t.getParent())return r;n="up",t=t.getParent()}}}});TreeNode=TreeNode;var globalRequire=new RequireContext;context.Inject={INTERNAL:{defineExecutingModuleAs:proxy(Executor.defineExecutingModuleAs,Executor),undefineExecutingModule:proxy(Executor.undefineExecutingModule,Executor),createModule:proxy(Executor.createModule,Executor),setModuleExports:function(){},execute:{},modules:{},execs:{},globalRequire:globalRequire,createRequire:proxy(InjectCore.createRequire,InjectCore),createDefine:proxy(InjectCore.createDefine,InjectCore)},easyXDM:easyXDM,reset:proxy(InjectCore.reset,InjectCore),enableDebug:function(){InjectCore.enableDebug.apply(this,arguments)},enableAMDPlugins:function(){RulesEngine.addRule(/^.+?\!.+$/,{last:!0,useSuffix:!1,path:function(){return""},pointcuts:{afterFetch:function(e,t,n,r,o){var i=n.split("!"),a=RulesEngine.resolveIdentifier(i[0],r),u=RulesEngine.resolveUrl(a,o),s=i[1],c=InjectCore.createRequire(n,o);c.ensure([a],function(t){var n=t(a),o=InjectCore.createRequire(a,u),i=function(e){return RulesEngine.resolveIdentifier(e,r)},c=n.normalize?n.normalize(s,i):i(s),l=function(t){"string"==typeof t&&(t=['module.exports = decodeURIComponent("',encodeURIComponent(t),'");'].join("")),e(null,t)};l.fromText=function(t,n){n||(n=t,t=null),Executor.runModule(t,n,u),e(null,n)},n.load(c,o,l,{})})}}})},setModuleRoot:function(){InjectCore.setModuleRoot.apply(this,arguments)},setExpires:function(){InjectCore.setExpires.apply(this,arguments)},setCacheKey:function(){InjectCore.setCacheKey.apply(this,arguments)},setCrossDomain:function(){InjectCore.setCrossDomain.apply(this,arguments)},setUseSuffix:function(e){InjectCore.setUseSuffix(e)},clearCache:proxy(InjectCore.clearCache,InjectCore),manifest:function(){RulesEngine.manifest.apply(RulesEngine,arguments)},addRule:function(){RulesEngine.addRule.apply(RulesEngine,arguments)},plugin:function(){var e=[].slice.call(arguments,0);e.push(context.Inject),InjectCore.plugin.apply(InjectCore,e)},require:InjectCore.createRequire(),define:InjectCore.createDefine(),version:"undefined"},context.require=context.Inject.INTERNAL.createRequire(),context.define=context.Inject.INTERNAL.createDefine(),context.Inject.version="v0.4.2"}(this);