//>>built
define("dijit/place","dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(z,w,y,C,A,D,E){function B(f,b,p,r){var d=D.getEffectiveBox(f.ownerDocument);f.parentNode&&"body"==String(f.parentNode.tagName).toLowerCase()||A.body(f.ownerDocument).appendChild(f);var c=null;z.some(b,function(l){var n=l.corner,g=l.pos,t=0,v={w:{L:d.l+d.w-g.x,R:g.x-d.l,M:d.w}[n.charAt(1)],h:{T:d.t+d.h-g.y,B:g.y-d.t,M:d.h}[n.charAt(0)]},h=f.style;h.left=
h.right="auto";p&&(t=p(f,l.aroundCorner,n,v,r),t="undefined"==typeof t?0:t);var k=f.style,q=k.display,u=k.visibility;"none"==k.display&&(k.visibility="hidden",k.display="");h=w.position(f);k.display=q;k.visibility=u;q={L:g.x,R:g.x-h.w,M:Math.max(d.l,Math.min(d.l+d.w,g.x+(h.w>>1))-h.w)}[n.charAt(1)];u={T:g.y,B:g.y-h.h,M:Math.max(d.t,Math.min(d.t+d.h,g.y+(h.h>>1))-h.h)}[n.charAt(0)];g=Math.max(d.l,q);k=Math.max(d.t,u);q=Math.min(d.l+d.w,q+h.w)-g;u=Math.min(d.t+d.h,u+h.h)-k;t+=h.w-q+(h.h-u);if(null==
c||t<c.overflow)c={corner:n,aroundCorner:l.aroundCorner,x:g,y:k,w:q,h:u,overflow:t,spaceAvailable:v};return!t});c.overflow&&p&&p(f,c.aroundCorner,c.corner,c.spaceAvailable,r);b=c.y;var a=c.x,m=A.body(f.ownerDocument);/relative|absolute/.test(y.get(m,"position"))&&(b-=y.get(m,"marginTop"),a-=y.get(m,"marginLeft"));m=f.style;m.top=b+"px";m.left=a+"px";m.right="auto";return c}var F={TL:"BR",TR:"BL",BL:"TR",BR:"TL"};return E.place={at:function(f,b,p,r,d){p=z.map(p,function(c){var a={corner:c,aroundCorner:F[c],
pos:{x:b.x,y:b.y}};r&&(a.pos.x+="L"==c.charAt(1)?r.x:-r.x,a.pos.y+="T"==c.charAt(0)?r.y:-r.y);return a});return B(f,p,d)},around:function(f,b,p,r,d){function c(x,e){u.push({aroundCorner:x,corner:e,pos:{x:{L:v,R:v+k,M:v+(k>>1)}[x.charAt(1)],y:{T:h,B:h+q,M:h+(q>>1)}[x.charAt(0)]}})}if("string"==typeof b||"offsetWidth"in b||"ownerSVGElement"in b){var a=w.position(b,!0);if(/^(above|below)/.test(p[0])){var m=w.getBorderExtents(b),l=b.firstChild?w.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},n=w.getBorderExtents(f),
g=f.firstChild?w.getBorderExtents(f.firstChild):{t:0,l:0,b:0,r:0};a.y+=Math.min(m.t+l.t,n.t+g.t);a.h-=Math.min(m.t+l.t,n.t+g.t)+Math.min(m.b+l.b,n.b+g.b)}}else a=b;if(b.parentNode)for(m="absolute"==y.getComputedStyle(b).position,b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){l=w.position(b,!0);n=y.getComputedStyle(b);/relative|absolute/.test(n.position)&&(m=!1);if(!m&&/hidden|auto|scroll/.test(n.overflow)){g=Math.min(a.y+a.h,l.y+l.h);var t=Math.min(a.x+a.w,l.x+l.w);a.x=Math.max(a.x,l.x);a.y=
Math.max(a.y,l.y);a.h=g-a.y;a.w=t-a.x}"absolute"==n.position&&(m=!0);b=b.parentNode}var v=a.x,h=a.y,k="w"in a?a.w:a.w=a.width,q="h"in a?a.h:(C.deprecated("place.around: dijit/place.__Rectangle: { x:"+v+", y:"+h+", height:"+a.height+", width:"+k+" } has been deprecated.  Please use { x:"+v+", y:"+h+", h:"+a.height+", w:"+k+" }","","2.0"),a.h=a.height),u=[];z.forEach(p,function(x){var e=r;switch(x){case "above-centered":c("TM","BM");break;case "below-centered":c("BM","TM");break;case "after-centered":e=
!e;case "before-centered":c(e?"ML":"MR",e?"MR":"ML");break;case "after":e=!e;case "before":c(e?"TL":"TR",e?"TR":"TL");c(e?"BL":"BR",e?"BR":"BL");break;case "below-alt":e=!e;case "below":c(e?"BL":"BR",e?"TL":"TR");c(e?"BR":"BL",e?"TR":"TL");break;case "above-alt":e=!e;case "above":c(e?"TL":"TR",e?"BL":"BR");c(e?"TR":"TL",e?"BR":"BL");break;default:c(x.aroundCorner,x.corner)}});f=B(f,u,d,{w:k,h:q});f.aroundNodePos=a;return f}}});