//>>built
define("dojo/parser","require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(E,y,t,x,N,O,P,Q,K,R,S,F,G,L,T,U){function H(b){return eval("("+b+")")}function V(b){var a=b._nameCaseMap,e=b.prototype;if(!a||a._extendCnt<A){var a=b._nameCaseMap={},g;for(g in e)"_"!==g.charAt(0)&&(a[g.toLowerCase()]=g);a._extendCnt=A}return a}function I(b,a){a||(a=E);var e=a._dojoParserCtorMap||
(a._dojoParserCtorMap={}),g=b.join();if(!e[g]){for(var f=[],c=0,w=b.length;c<w;c++){var m=b[c];f[f.length]=e[m]=e[m]||t.getObject(m)||~m.indexOf("/")&&a(m)}c=f.shift();e[g]=f.length?c.createSubclass?c.createSubclass(f):c.extend.apply(c,f):c}return e[g]}new Date("X");var A=0;K.after(t,"extend",function(){A++},!0);var J={_clearCache:function(){A++;_ctorMap={}},_functionFromScript:function(b,a){var e="",g="",f=b.getAttribute(a+"args")||b.getAttribute("args"),c=b.getAttribute("with"),f=(f||"").split(/\s*,\s*/);
c&&c.length&&x.forEach(c.split(/\s*,\s*/),function(a){e+="with("+a+"){";g+="}"});return new Function(f,e+b.innerHTML+g)},instantiate:function(b,a,e){a=a||{};e=e||{};var g=(e.scope||y._scopeName)+"Type",f="data-"+(e.scope||y._scopeName)+"-",c=f+"type",w=f+"mixins",m=[];x.forEach(b,function(b){var e=g in a?a[g]:b.getAttribute(c)||b.getAttribute(g);if(e){var f=b.getAttribute(w),e=f?[e].concat(f.split(/\s*,\s*/)):[e];m.push({node:b,types:e})}});return this._instantiate(m,a,e)},_instantiate:function(b,
a,e,g){function f(b){a._started||e.noStart||x.forEach(b,function(a){"function"!==typeof a.startup||a._started||a.startup()});return b}b=x.map(b,function(b){var c=b.ctor||I(b.types,e.contextRequire);if(!c)throw Error("Unable to resolve constructor for: '"+b.types.join()+"'");return this.construct(c,b.node,a,e,b.scripts,b.inherited)},this);return g?R(b).then(f):f(b)},construct:function(b,a,e,g,f,c){function w(a){v&&t.setObject(v,a);for(l=0;l<z.length;l++)K[z[l].advice||"after"](a,z[l].method,t.hitch(a,
z[l].func),!0);for(l=0;l<B.length;l++)B[l].call(a);for(l=0;l<C.length;l++)a.watch(C[l].prop,C[l].func);for(l=0;l<D.length;l++)T(a,D[l].event,D[l].func);return a}var m=b&&b.prototype;g=g||{};var p={};g.defaults&&t.mixin(p,g.defaults);c&&t.mixin(p,c);var r;G("dom-attributes-explicit")?r=a.attributes:G("dom-attributes-specified-flag")?r=x.filter(a.attributes,function(a){return a.specified}):(c=(/^input$|^img$/i.test(a.nodeName)?a:a.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,
"").replace(/\s*>.*$/,""),r=x.map(c.split(/\s+/),function(b){var c=b.toLowerCase();return{name:b,value:"LI"==a.nodeName&&"value"==b||"enctype"==c?a.getAttribute(c):a.getAttributeNode(c).value}}));var k=g.scope||y._scopeName;c="data-"+k+"-";var d={};"dojo"!==k&&(d[c+"props"]="data-dojo-props",d[c+"type"]="data-dojo-type",d[c+"mixins"]="data-dojo-mixins",d[k+"type"]="dojotype",d[c+"id"]="data-dojo-id");for(var l=0,h,k=[],v,q;h=r[l++];){var n=h.name,u=n.toLowerCase();h=h.value;switch(d[u]||u){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;
case "data-dojo-props":q=h;break;case "data-dojo-id":case "jsid":v=h;break;case "data-dojo-attach-point":case "dojoattachpoint":p.dojoAttachPoint=h;break;case "data-dojo-attach-event":case "dojoattachevent":p.dojoAttachEvent=h;break;case "class":p["class"]=a.className;break;case "style":p.style=a.style&&a.style.cssText;break;default:if(n in m||(n=V(b)[u]||n),n in m)switch(typeof m[n]){case "string":p[n]=h;break;case "number":p[n]=h.length?Number(h):NaN;break;case "boolean":p[n]="false"!=h.toLowerCase();
break;case "function":""===h||-1!=h.search(/[^\w\.]+/i)?p[n]=new Function(h):p[n]=t.getObject(h,!1)||new Function(h);k.push(n);break;default:u=m[n],p[n]=u&&"length"in u?h?h.split(/\s*,\s*/):[]:u instanceof Date?""==h?new Date(""):"now"==h?new Date:S.fromISOString(h):u instanceof Q?y.baseUrl+h:H(h)}else p[n]=h}}for(r=0;r<k.length;r++)d=k[r].toLowerCase(),a.removeAttribute(d),a[d]=null;if(q)try{q=H.call(g.propsThis,"{"+q+"}"),t.mixin(p,q)}catch(M){throw Error(M.toString()+" in data-dojo-props\x3d'"+
q+"'");}t.mixin(p,e);f||(f=b&&(b._noScript||m._noScript)?[]:L("\x3e script[type^\x3d'dojo/']",a));var z=[],B=[],C=[],D=[];if(f)for(l=0;l<f.length;l++)d=f[l],a.removeChild(d),e=d.getAttribute(c+"event")||d.getAttribute("event"),g=d.getAttribute(c+"prop"),q=d.getAttribute(c+"method"),k=d.getAttribute(c+"advice"),r=d.getAttribute("type"),d=this._functionFromScript(d,c),e?"dojo/connect"==r?z.push({method:e,func:d}):"dojo/on"==r?D.push({event:e,func:d}):p[e]=d:"dojo/aspect"==r?z.push({method:q,advice:k,
func:d}):"dojo/watch"==r?C.push({prop:g,func:d}):B.push(d);b=(f=b.markupFactory||m.markupFactory)?f(p,a,b):new b(p,a);return b.then?b.then(w):w(b)},scan:function(b,a){function e(a){if(!a.inherited){a.inherited={};var b=a.node,c=e(a.parent),b={dir:b.getAttribute("dir")||c.dir,lang:b.getAttribute("lang")||c.lang,textDir:b.getAttribute(r)||c.textDir},d;for(d in b)b[d]&&(a.inherited[d]=b[d])}return a.inherited}var g=[],f=[],c={},w=(a.scope||y._scopeName)+"Type",m="data-"+(a.scope||y._scopeName)+"-",p=
m+"type",r=m+"textdir",m=m+"mixins",k=b.firstChild,d=a.inherited;if(!d){var l=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&l(a.parentNode,b)},d={dir:l(b,"dir"),lang:l(b,"lang"),textDir:l(b,r)},h;for(h in d)d[h]||delete d[h]}for(var d={inherited:d},v,q;;)if(k)if(1!=k.nodeType)k=k.nextSibling;else if(v&&"script"==k.nodeName.toLowerCase())(n=k.getAttribute("type"))&&/^dojo\/\w/i.test(n)&&v.push(k),k=k.nextSibling;else if(q)k=k.nextSibling;else{var n=k.getAttribute(p)||k.getAttribute(w);
h=k.firstChild;if(n||h&&(3!=h.nodeType||h.nextSibling)){q=null;if(n){var u=k.getAttribute(m);v=u?[n].concat(u.split(/\s*,\s*/)):[n];try{q=I(v,a.contextRequire)}catch(B){}q||x.forEach(v,function(a){~a.indexOf("/")&&!c[a]&&(c[a]=!0,f[f.length]=a)});u=q&&!q.prototype._noScript?[]:null;d={types:v,ctor:q,parent:d,node:k,scripts:u};d.inherited=e(d);g.push(d)}else d={node:k,scripts:v,parent:d};v=u;q=k.stopParser||q&&q.prototype.stopParser&&!a.template;k=h}else k=k.nextSibling}else{if(!d||!d.node)break;k=
d.node.nextSibling;q=!1;d=d.parent;v=d.scripts}var t=new F;f.length?(G("dojo-debug-messages"),(a.contextRequire||E)(f,function(){t.resolve(x.filter(g,function(b){if(!b.ctor)try{b.ctor=I(b.types,a.contextRequire)}catch(M){}for(var c=b.parent;c&&!c.types;)c=c.parent;var d=b.ctor&&b.ctor.prototype;b.instantiateChildren=!(d&&d.stopParser&&!a.template);b.instantiate=!c||c.instantiate&&c.instantiateChildren;return b.instantiate}))})):t.resolve(g);return t.promise},_require:function(b,a){var e=H("{"+b.innerHTML+
"}"),g=[],f=[],c=new F,w=a&&a.contextRequire||E,m;for(m in e)g.push(m),f.push(e[m]);w(f,function(){for(var a=0;a<g.length;a++)t.setObject(g[a],arguments[a]);c.resolve(arguments)});return c.promise},_scanAmd:function(b,a){var e=new F,g=e.promise;e.resolve(!0);var f=this;L("script[type\x3d'dojo/require']",b).forEach(function(b){g=g.then(function(){return f._require(b,a)});b.parentNode.removeChild(b)});return g},parse:function(b,a){!b||"string"==typeof b||"nodeType"in b||(a=b,b=a.rootNode);var e=b?O.byId(b):
P.body();a=a||{};var g=a.template?{template:!0}:{},f=[],c=this,w=this._scanAmd(e,a).then(function(){return c.scan(e,a)}).then(function(b){return c._instantiate(b,g,a,!0)}).then(function(a){return f=f.concat(a)}).otherwise(function(a){throw a;});t.mixin(f,w);return f}};y.parser=J;N.parseOnLoad&&U(100,J,"parse");return J});
//# sourceMappingURL=parser.js.map