/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/dom-construct","exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(e,g,m,p,h,v){function n(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}function q(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(c){}for(var b;b=a.lastChild;)a.removeChild(b)}var k={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table",
"colgroup"],li:["ul"]},w=/<\s*([\w:]+)/,r={},x=0,t="__"+g._scopeName+"ToDomId",l;for(l in k)k.hasOwnProperty(l)&&(g=k[l],g.pre="option"==l?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+g.join("\x3e\x3c")+"\x3e",g.post="\x3c/"+g.reverse().join("\x3e\x3c/")+"\x3e");var u;8>=m("ie")&&(u=function(a){a.__dojo_html5_tested="yes";var b=y("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!==b.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,
function(c){a.createElement(c)});z(b)});e.toDom=function(a,b){b=b||p.doc;var c=b[t];c||(b[t]=c=++x+"",r[c]=b.createElement("div"));8>=m("ie")&&!b.__dojo_html5_tested&&b.body&&u(b);a+="";var d=a.match(w),f=d?d[1].toLowerCase():"";c=r[c];if(d&&k[f])for(d=k[f],c.innerHTML=d.pre+a+d.post,d=d.length;d;--d)c=c.firstChild;else c.innerHTML=a;if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(f=b.createDocumentFragment();d=c.firstChild;)f.appendChild(d);return f};e.place=function(a,b,c){b=h.byId(b);
"string"==typeof a&&(a=/^\s*</.test(a)?e.toDom(a,b.ownerDocument):h.byId(a));if("number"==typeof c){var d=b.childNodes;!d.length||d.length<=c?b.appendChild(a):n(a,d[0>c?0:c])}else switch(c){case "before":n(a,b);break;case "after":c=a;(d=b.parentNode)&&(d.lastChild==b?d.appendChild(c):d.insertBefore(c,b.nextSibling));break;case "replace":b.parentNode.replaceChild(a,b);break;case "only":e.empty(b);b.appendChild(a);break;case "first":if(b.firstChild){n(a,b.firstChild);break}default:b.appendChild(a)}return a};
var y=e.create=function(a,b,c,d){var f=p.doc;c&&(c=h.byId(c),f=c.ownerDocument);"string"==typeof a&&(a=f.createElement(a));b&&v.set(a,b);c&&e.place(a,c,d);return a};e.empty=function(a){q(h.byId(a))};var z=e.destroy=function(a){if(a=h.byId(a)){var b=a;a=a.parentNode;b.firstChild&&q(b);a&&(m("ie")&&a.canHaveChildren&&"removeNode"in b?b.removeNode(!1):a.removeChild(b))}}});