UNPKG

@atlassian/aui

Version:

Atlassian User Interface Framework

21 lines 24.8 kB
/*!! * @atlassian/aui - Atlassian User Interface Framework * @version v8.0.0-alpha.1 * @link https://aui.atlassian.com * @license SEE LICENSE IN LICENSE.md * @author Atlassian Pty Ltd. */ exports.ids=[24],exports.modules={297: /*!**************************************************************************************!*\ !*** /Users/cdarroch/work/atlassian/aui-stuff/auinext/node_modules/tether/tether.js ***! \**************************************************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,o){var i;/*! tether 0.6.5 */ /*! tether 0.6.5 */ !function(o){(function(){var t,e,o,i,n,r,s,l,h,a,f,p,u,d,g,c,m,b={}.hasOwnProperty,v=[].indexOf||function(t){for(var e=0,o=this.length;e<o;e++)if(e in this&&this[e]===t)return e;return-1},y=[].slice;null==this.Tether&&(this.Tether={modules:[]}),f=function(t){var e,o,i,n;if("fixed"===(o=getComputedStyle(t).position))return t;for(void 0,e=t;e=e.parentNode;){try{i=getComputedStyle(e)}catch(t){}if(null==i)return e;if(/(auto|scroll)/.test(i.overflow+i["overflow-y"]+i["overflow-x"])&&("absolute"!==o||"relative"===(n=i.position)||"absolute"===n||"fixed"===n))return e}return document.body},m=0,d=function(){return m++},c={},h=function(t){var e,i,r,s,l;if(null==(r=t._tetherZeroElement)&&((r=t.createElement("div")).setAttribute("data-tether-id",d()),n(r.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(r),t._tetherZeroElement=r),e=r.getAttribute("data-tether-id"),null==c[e]){for(i in c[e]={},l=r.getBoundingClientRect())s=l[i],c[e][i]=s;o(function(){return c[e]=void 0})}return c[e]},s=function(t){var e,o,i,n,r,s,l;for(n in t===document?(o=document,t=document.documentElement):o=t.ownerDocument,i=o.documentElement,e={},l=t.getBoundingClientRect())s=l[n],e[n]=s;return r=h(o),e.top-=r.top,e.left-=r.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-i.clientTop,e.left=e.left-i.clientLeft,e.right=o.body.clientWidth-e.width-e.left,e.bottom=o.body.clientHeight-e.height-e.top,e},l=function(t){return t.offsetParent||document.documentElement},a=function(){var t,e,o,i,r;return(t=document.createElement("div")).style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),i=t.offsetWidth,e.style.overflow="scroll",i===(r=t.offsetWidth)&&(r=e.clientWidth),document.body.removeChild(e),{width:o=i-r,height:o}},n=function(t){var e,o,i,n,r,s,l;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),r=0,s=(l=e.slice(1)).length;r<s;r++)if(i=l[r])for(o in i)b.call(i,o)&&(n=i[o],t[o]=n);return t},u=function(t,e){var o,i,n,r,s;if(null!=t.classList){for(s=[],i=0,n=(r=e.split(" ")).length;i<n;i++)(o=r[i]).trim()&&s.push(t.classList.remove(o));return s}return t.className=t.className.replace(new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi")," ")},e=function(t,e){var o,i,n,r,s;if(null!=t.classList){for(s=[],i=0,n=(r=e.split(" ")).length;i<n;i++)(o=r[i]).trim()&&s.push(t.classList.add(o));return s}return u(t,e),t.className+=" "+e},p=function(t,e){return null!=t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},g=function(t,o,i){var n,r,s,l,h,a;for(r=0,l=i.length;r<l;r++)n=i[r],v.call(o,n)<0&&p(t,n)&&u(t,n);for(a=[],s=0,h=o.length;s<h;s++)n=o[s],p(t,n)?a.push(void 0):a.push(e(t,n));return a},i=[],o=function(t){return i.push(t)},r=function(){var t,e;for(e=[];t=i.pop();)e.push(t());return e},t=function(){function t(){}return t.prototype.on=function(t,e,o,i){var n;return null==i&&(i=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})},t.prototype.once=function(t,e,o){return this.on(t,e,o,!0)},t.prototype.off=function(t,e){var o,i,n;if(null!=(null!=(i=this.bindings)?i[t]:void 0)){if(null==e)return delete this.bindings[t];for(o=0,n=[];o<this.bindings[t].length;)this.bindings[t][o].handler===e?n.push(this.bindings[t].splice(o,1)):n.push(o++);return n}},t.prototype.trigger=function(){var t,e,o,i,n,r,s,l,h;if(o=arguments[0],t=2<=arguments.length?y.call(arguments,1):[],null!=(s=this.bindings)?s[o]:void 0){for(n=0,h=[];n<this.bindings[o].length;)i=(l=this.bindings[o][n]).handler,e=l.ctx,r=l.once,i.apply(null!=e?e:this,t),r?h.push(this.bindings[o].splice(n,1)):h.push(n++);return h}},t}(),this.Tether.Utils={getScrollParent:f,getBounds:s,getOffsetParent:l,extend:n,addClass:e,removeClass:u,hasClass:p,updateClasses:g,defer:o,flush:r,uniqueId:d,Evented:t,getScrollBarSize:a}}).call(this),function(){var t,e,o,i,n,r,s,l,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,E,A,_=[].slice,S=function(t,e){return function(){return t.apply(e,arguments)}};if(null==this.Tether)throw new Error("You must include the utils.js file before tether.js");A=(i=this.Tether).Utils,g=A.getScrollParent,A.getSize,A.getOuterSize,p=A.getBounds,u=A.getOffsetParent,a=A.extend,n=A.addClass,w=A.removeClass,T=A.updateClasses,h=A.defer,f=A.flush,d=A.getScrollBarSize,x=function(t,e,o){return null==o&&(o=1),t+o>=e&&e>=t-o},O=function(){var t,e,o,i,n;for(t=document.createElement("div"),o=0,i=(n=["transform","webkitTransform","OTransform","MozTransform","msTransform"]).length;o<i;o++)if(e=n[o],void 0!==t.style[e])return e}(),C=[],y=function(){var t,e;for(t=0,e=C.length;t<e;t++)C[t].position(!1);return f()},c=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},function(){var t,e,o,i,n,r,s,l,h;for(e=null,o=null,i=null,n=function(){return null!=o&&o>16?(o=Math.min(o-16,250),void(i=setTimeout(n,250))):null!=e&&c()-e<10?void 0:(null!=i&&(clearTimeout(i),i=null),e=c(),y(),o=c()-e)},h=[],r=0,s=(l=["resize","scroll","touchmove"]).length;r<s;r++)t=l[r],h.push(window.addEventListener(t,n))}(),t={center:"center",left:"right",right:"left"},e={middle:"middle",top:"bottom",bottom:"top"},o={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},l=function(o,i){var n,r;return n=o.left,r=o.top,"auto"===n&&(n=t[i.left]),"auto"===r&&(r=e[i.top]),{left:n,top:r}},s=function(t){var e,i;return{left:null!=(e=o[t.left])?e:t.left,top:null!=(i=o[t.top])?i:t.top}},r=function(){var t,e,o,i,n,r,s;for(o={top:0,left:0},n=0,r=(e=1<=arguments.length?_.call(arguments,0):[]).length;n<r;n++)i=(s=e[n]).top,t=s.left,"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof t&&(t=parseFloat(t,10)),o.top+=i,o.left+=t;return o},m=function(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t},b=v=function(t){var e;return{top:(e=t.split(" "))[0],left:e[1]}},E=function(){function t(t){var e,o,n,r;for(this.position=S(this.position,this),C.push(this),this.history=[],this.setOptions(t,!1),e=0,o=(n=i.modules).length;e<o;e++)null!=(r=n[e].initialize)&&r.call(this);this.position()}return t.modules=[],t.prototype.getClass=function(t){var e,o;return(null!=(e=this.options.classes)?e[t]:void 0)?this.options.classes[t]:!1!==(null!=(o=this.options.classes)?o[t]:void 0)?this.options.classPrefix?this.options.classPrefix+"-"+t:t:""},t.prototype.setOptions=function(t,e){var o,i,r,s,l,h;for(this.options=t,null==e&&(e=!0),o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=a(o,this.options),l=this.options,this.element=l.element,this.target=l.target,this.targetModifier=l.targetModifier,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),r=0,s=(h=["element","target"]).length;r<s;r++){if(null==this[i=h[r]])throw new Error("Tether Error: Both element and target must be defined");null!=this[i].jquery?this[i]=this[i][0]:"string"==typeof this[i]&&(this[i]=document.querySelector(this[i]))}if(n(this.element,this.getClass("element")),n(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");if(this.targetAttachment=b(this.options.targetAttachment),this.attachment=b(this.options.attachment),this.offset=v(this.options.offset),this.targetOffset=v(this.options.targetOffset),null!=this.scrollParent&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParent=this.target:this.scrollParent=g(this.target),!1!==this.options.enabled)return this.enable(e)},t.prototype.getTargetBounds=function(){var t,e,o,i,n,r,s,l;if(null==this.targetModifier)return p(this.target);switch(this.targetModifier){case"visible":return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((i={height:(t=p(this.target)).height,width:t.width,top:t.top,left:t.left}).height=Math.min(i.height,t.height-(pageYOffset-t.top)),i.height=Math.min(i.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),i.height=Math.min(innerHeight,i.height),i.height-=2,i.width=Math.min(i.width,t.width-(pageXOffset-t.left)),i.width=Math.min(i.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),i.width=Math.min(innerWidth,i.width),i.width-=2,i.top<pageYOffset&&(i.top=pageYOffset),i.left<pageXOffset&&(i.left=pageXOffset),i);case"scroll-handle":return(l=this.target)===document.body?(l=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=p(l),s=getComputedStyle(l),n=0,(l.scrollWidth>l.clientWidth||"scroll"===[s.overflow,s.overflowX]||this.target!==document.body)&&(n=15),i={width:15,height:.975*(o=t.height-parseFloat(s.borderTopWidth)-parseFloat(s.borderBottomWidth)-n)*(o/l.scrollHeight),left:t.left+t.width-parseFloat(s.borderLeftWidth)-15},e=0,o<408&&this.target===document.body&&(e=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(i.height=Math.max(i.height,24)),r=this.target.scrollTop/(l.scrollHeight-o),i.top=r*(o-i.height-e)+t.top+parseFloat(s.borderTopWidth),this.target===document.body&&(i.height=Math.max(i.height,24)),i}},t.prototype.clearCache=function(){return this._cache={}},t.prototype.cache=function(t,e){return null==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){if(null==t&&(t=!0),n(this.target,this.getClass("enabled")),n(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t)return this.position()},t.prototype.disable=function(){if(w(this.target,this.getClass("enabled")),w(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent)return this.scrollParent.removeEventListener("scroll",this.position)},t.prototype.destroy=function(){var t,e,o,i;for(this.disable(),i=[],t=e=0,o=C.length;e<o;t=++e){if(C[t]===this){C.splice(t,1);break}i.push(void 0)}return i},t.prototype.updateAttachClasses=function(t,e){var o,i,n,r,s,l,a,f,p,u=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),r=["left","top","bottom","right","middle","center"],(null!=(p=this._addAttachClasses)?p.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),o=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&o.push(this.getClass("element-attached")+"-"+t.top),t.left&&o.push(this.getClass("element-attached")+"-"+t.left),e.top&&o.push(this.getClass("target-attached")+"-"+e.top),e.left&&o.push(this.getClass("target-attached")+"-"+e.left),i=[],s=0,a=r.length;s<a;s++)n=r[s],i.push(this.getClass("element-attached")+"-"+n);for(l=0,f=r.length;l<f;l++)n=r[l],i.push(this.getClass("target-attached")+"-"+n);return h(function(){if(null!=u._addAttachClasses)return T(u.element,u._addAttachClasses,i),T(u.target,u._addAttachClasses,i),u._addAttachClasses=void 0})},t.prototype.position=function(t){var e,o,n,h,a,g,c,b,v,y,w,C,O,T,x,E,A,_,S,M,W,P,B,z,L,N,F,H,Y,X,j,R,U,q=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),_=l(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,_),B=(e=this.cache("element-bounds",function(){return p(q.element)})).width,o=e.height,0===B&&0===o&&null!=this.lastSize?(B=(H=this.lastSize).width,o=H.height):this.lastSize={width:B,height:o},W=M=this.cache("target-bounds",function(){return q.getTargetBounds()}),c=m(s(this.attachment),{width:B,height:o}),S=m(s(_),W),h=m(this.offset,{width:B,height:o}),a=m(this.targetOffset,W),c=r(c,h),S=r(S,a),n=M.left+S.left-c.left,P=M.top+S.top-c.top,z=0,N=(Y=i.modules).length;z<N;z++)if(null!=(O=Y[z].position.call(this,{left:n,top:P,targetAttachment:_,targetPos:M,attachment:this.attachment,elementPos:e,offset:c,targetOffset:S,manualOffset:h,manualTargetOffset:a,scrollbarSize:E}))&&"object"==typeof O){if(!1===O)return!1;P=O.top,n=O.left}if(g={page:{top:P,left:n},viewport:{top:P-pageYOffset,bottom:pageYOffset-P-o+innerHeight,left:n-pageXOffset,right:pageXOffset-n-B+innerWidth}},document.body.scrollWidth>window.innerWidth&&(E=this.cache("scrollbar-size",d),g.viewport.bottom-=E.height),document.body.scrollHeight>window.innerHeight&&(E=this.cache("scrollbar-size",d),g.viewport.right-=E.width),(""!==(X=document.body.style.position)&&"static"!==X||""!==(j=document.body.parentElement.style.position)&&"static"!==j)&&(g.page.bottom=document.body.scrollHeight-P-o,g.page.right=document.body.scrollWidth-n-B),!1!==(null!=(R=this.options.optimizations)?R.moveElement:void 0)&&null==this.targetModifier){for(v=this.cache("target-offsetparent",function(){return u(q.target)}),C=this.cache("target-offsetparent-bounds",function(){return p(v)}),w=getComputedStyle(v),getComputedStyle(this.element),y=C,b={},L=0,F=(U=["Top","Left","Bottom","Right"]).length;L<F;L++)b[(A=U[L]).toLowerCase()]=parseFloat(w["border"+A+"Width"]);C.right=document.body.scrollWidth-C.left-y.width+b.right,C.bottom=document.body.scrollHeight-C.top-y.height+b.bottom,g.page.top>=C.top+b.top&&g.page.bottom>=C.bottom&&g.page.left>=C.left+b.left&&g.page.right>=C.right&&(x=v.scrollTop,T=v.scrollLeft,g.offset={top:g.page.top-C.top+x-b.top,left:g.page.left-C.left+T-b.left})}return this.move(g),this.history.unshift(g),this.history.length>3&&this.history.pop(),t&&f(),!0}},t.prototype.move=function(t){var e,o,i,n,r,s,l,f,p,d,g,c,m,b,v,y,w,C=this;if(null!=this.element.parentNode){for(d in f={},t)for(n in f[d]={},t[d]){for(i=!1,b=0,v=(y=this.history).length;b<v;b++)if(l=y[b],!x(null!=(w=l[d])?w[n]:void 0,t[d][n])){i=!0;break}i||(f[d][n]=!0)}for(n in e={top:"",left:"",right:"",bottom:""},p=function(t,o){var i,n,r;return!1===(null!=(r=C.options.optimizations)?r.gpu:void 0)?(t.top?e.top=o.top+"px":e.bottom=o.bottom+"px",t.left?e.left=o.left+"px":e.right=o.right+"px"):(t.top?(e.top=0,n=o.top):(e.bottom=0,n=-o.bottom),t.left?(e.left=0,i=o.left):(e.right=0,i=-o.right),e[O]="translateX("+Math.round(i)+"px) translateY("+Math.round(n)+"px)","msTransform"!==O?e[O]+=" translateZ(0)":void 0)},r=!1,(f.page.top||f.page.bottom)&&(f.page.left||f.page.right)?(e.position="absolute",p(f.page,t.page)):(f.viewport.top||f.viewport.bottom)&&(f.viewport.left||f.viewport.right)?(e.position="fixed",p(f.viewport,t.viewport)):null!=f.offset&&f.offset.top&&f.offset.left?(e.position="absolute",s=this.cache("target-offsetparent",function(){return u(C.target)}),u(this.element)!==s&&h(function(){return C.element.parentNode.removeChild(C.element),s.appendChild(C.element)}),p(f.offset,t.offset),r=!0):(e.position="absolute",p({top:!0,left:!0},t.page)),r||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},c=!1,e)g=e[n],""===(o=this.element.style[n])||""===g||"top"!==n&&"left"!==n&&"bottom"!==n&&"right"!==n||(o=parseFloat(o),g=parseFloat(g)),o!==g&&(c=!0,m[n]=e[n]);return c?h(function(){return a(C.element.style,m)}):void 0}},t}(),i.position=y,this.Tether=a(E,i)}.call(this),function(){var t,e,o,i,n,r,s,l=[].indexOf||function(t){for(var e=0,o=this.length;e<o;e++)if(e in this&&this[e]===t)return e;return-1};(s=this.Tether.Utils).getOuterSize,n=s.getBounds,s.getSize,o=s.extend,r=s.updateClasses,e=s.defer,t=["left","top","right","bottom"],i=function(e,o){var i,r,s,l,h,a,f;if("scrollParent"===o?o=e.scrollParent:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),null!=o.nodeType)for(r=l=n(o),h=getComputedStyle(o),o=[r.left,r.top,l.width+r.left,l.height+r.top],i=a=0,f=t.length;a<f;i=++a)"Top"===(s=(s=t[i])[0].toUpperCase()+s.substr(1))||"Left"===s?o[i]+=parseFloat(h["border"+s+"Width"]):o[i]-=parseFloat(h["border"+s+"Width"]);return o},this.Tether.modules.push({position:function(s){var h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,E,A,_,S,M,W,P,B,z,L,N,F,H,Y,X,j,R,U,q,D,k,Z,I,$,G,J,K,Q,V,tt=this;if(B=s.top,v=s.left,_=s.targetAttachment,!this.options.constraints)return!0;for(function(e){var o,i,n,r;for(tt.removeClass(e),r=[],i=0,n=t.length;i<n;i++)o=t[i],r.push(tt.removeClass(e+"-"+o));return r},b=(Z=this.cache("element-bounds",function(){return n(tt.element)})).height,0===(z=Z.width)&&0===b&&null!=this.lastSize&&(z=(I=this.lastSize).width,b=I.height),S=(M=this.cache("target-bounds",function(){return tt.getTargetBounds()})).height,W=M.width,A={},m={},a=[this.getClass("pinned"),this.getClass("out-of-bounds")],L=0,Y=($=this.options.constraints).length;L<Y;L++)(c=$[L]).outOfBoundsClass&&a.push(c.outOfBoundsClass),c.pinnedClass&&a.push(c.pinnedClass);for(N=0,X=a.length;N<X;N++)for(g=a[N],F=0,j=(G=["left","top","right","bottom"]).length;F<j;F++)E=G[F],a.push(g+"-"+E);for(h=[],A=o({},_),m=o({},this.attachment),H=0,R=(J=this.options.constraints).length;H<R;H++){if(P=(c=J[H]).to,f=c.attachment,O=c.pin,null==f&&(f=""),l.call(f," ")>=0?(d=(K=f.split(" "))[0],u=K[1]):u=d=f,p=i(this,P),"target"!==d&&"both"!==d||(B<p[1]&&"top"===A.top&&(B+=S,A.top="bottom"),B+b>p[3]&&"bottom"===A.top&&(B-=S,A.top="top")),"together"===d&&(B<p[1]&&"top"===A.top&&("bottom"===m.top?(B+=S,A.top="bottom",B+=b,m.top="top"):"top"===m.top&&(B+=S,A.top="bottom",B-=b,m.top="bottom")),B+b>p[3]&&"bottom"===A.top&&("top"===m.top?(B-=S,A.top="top",B-=b,m.top="bottom"):"bottom"===m.top&&(B-=S,A.top="top",B+=b,m.top="top")),"middle"===A.top&&(B+b>p[3]&&"top"===m.top?(B-=b,m.top="bottom"):B<p[1]&&"bottom"===m.top&&(B+=b,m.top="top"))),"target"!==u&&"both"!==u||(v<p[0]&&"left"===A.left&&(v+=W,A.left="right"),v+z>p[2]&&"right"===A.left&&(v-=W,A.left="left")),"together"===u&&(v<p[0]&&"left"===A.left?"right"===m.left?(v+=W,A.left="right",v+=z,m.left="left"):"left"===m.left&&(v+=W,A.left="right",v-=z,m.left="right"):v+z>p[2]&&"right"===A.left?"left"===m.left?(v-=W,A.left="left",v-=z,m.left="right"):"right"===m.left&&(v-=W,A.left="left",v+=z,m.left="left"):"center"===A.left&&(v+z>p[2]&&"left"===m.left?(v-=z,m.left="right"):v<p[0]&&"right"===m.left&&(v+=z,m.left="left"))),"element"!==d&&"both"!==d||(B<p[1]&&"bottom"===m.top&&(B+=b,m.top="top"),B+b>p[3]&&"top"===m.top&&(B-=b,m.top="bottom")),"element"!==u&&"both"!==u||(v<p[0]&&"right"===m.left&&(v+=z,m.left="left"),v+z>p[2]&&"left"===m.left&&(v-=z,m.left="right")),"string"==typeof O?O=function(){var t,e,o,i;for(i=[],e=0,t=(o=O.split(",")).length;e<t;e++)C=o[e],i.push(C.trim());return i}():!0===O&&(O=["top","left","right","bottom"]),O||(O=[]),T=[],y=[],B<p[1]&&(l.call(O,"top")>=0?(B=p[1],T.push("top")):y.push("top")),B+b>p[3]&&(l.call(O,"bottom")>=0?(B=p[3]-b,T.push("bottom")):y.push("bottom")),v<p[0]&&(l.call(O,"left")>=0?(v=p[0],T.push("left")):y.push("left")),v+z>p[2]&&(l.call(O,"right")>=0?(v=p[2]-z,T.push("right")):y.push("right")),T.length)for(x=null!=(Q=this.options.pinnedClass)?Q:this.getClass("pinned"),h.push(x),D=0,U=T.length;D<U;D++)E=T[D],h.push(x+"-"+E);if(y.length)for(w=null!=(V=this.options.outOfBoundsClass)?V:this.getClass("out-of-bounds"),h.push(w),k=0,q=y.length;k<q;k++)E=y[k],h.push(w+"-"+E);(l.call(T,"left")>=0||l.call(T,"right")>=0)&&(m.left=A.left=!1),(l.call(T,"top")>=0||l.call(T,"bottom")>=0)&&(m.top=A.top=!1),A.top===_.top&&A.left===_.left&&m.top===this.attachment.top&&m.left===this.attachment.left||this.updateAttachClasses(m,A)}return e(function(){return r(tt.target,h,a),r(tt.element,h,a)}),{top:B,left:v}}})}.call(this),function(){var t,e,o,i;i=this.Tether.Utils,e=i.getBounds,o=i.updateClasses,t=i.defer,this.Tether.modules.push({position:function(i){var n,r,s,l,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,E,A,_=this;if(d=i.top,h=i.left,l=d+(O=this.cache("element-bounds",function(){return e(_.element)})).height,a=h+O.width,n=[],d<=(u=this.getTargetBounds()).bottom&&l>=u.top)for(g=0,v=(T=["left","right"]).length;g<v;g++)(x=u[f=T[g]])!==h&&x!==a||n.push(f);if(h<=u.right&&a>=u.left)for(c=0,y=(E=["top","bottom"]).length;c<y;c++)(A=u[f=E[c]])!==d&&A!==l||n.push(f);for(r=[],p=["left","top","right","bottom"],(s=[]).push(this.getClass("abutted")),m=0,w=p.length;m<w;m++)f=p[m],s.push(this.getClass("abutted")+"-"+f);for(n.length&&r.push(this.getClass("abutted")),b=0,C=n.length;b<C;b++)f=n[b],r.push(this.getClass("abutted")+"-"+f);return t(function(){return o(_.target,r,s),o(_.element,r,s)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){var e,o,i,n,r,s;if(r=t.top,e=t.left,this.options.shift)return"string"==typeof(o=function(t){return"function"==typeof t?t.call(this,{top:r,left:e}):t}(this.options.shift))?((o=o.split(" "))[1]||(o[1]=o[0]),n=o[0],i=o[1],n=parseFloat(n,10),i=parseFloat(i,10)):(n=(s=[o.top,o.left])[0],i=s[1]),{top:r+=n,left:e+=i}}})}.call(this),o.Tether=this.Tether,void 0===(i=function(){return o.Tether}.apply(e,[]))||(t.exports=i)}(this)},32: /*!*******************************************!*\ !*** ../src/js/aui/internal/alignment.js ***! \*******************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(t){n=!0,r=t}finally{try{!i&&l.return&&l.return()}finally{if(n)throw r}}return o}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=o(/*! tether */297),s=(i=r)&&i.__esModule?i:{default:i};var l="alignment",h="alignment-static",a="alignment-container",f="aui-alignment",p="aui-alignment-side-",u="aui-alignment-snap-",d="right middle",g={"top left":{el:"bottom left",target:"top left"},"top center":{el:"bottom center",target:"top center"},"top right":{el:"bottom right",target:"top right"},"right top":{el:"top left",target:"top right"},"right middle":{el:"middle left",target:"middle right"},"right bottom":{el:"bottom left",target:"bottom right"},"bottom left":{el:"top left",target:"bottom left"},"bottom center":{el:"top center",target:"bottom center"},"bottom right":{el:"top right",target:"bottom right"},"left top":{el:"top right",target:"top left"},"left middle":{el:"middle right",target:"middle left"},"left bottom":{el:"bottom right",target:"bottom left"},"submenu left":{el:"top left",target:"top right"},"submenu right":{el:"top right",target:"top left"}};function c(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function m(t,e){return t.getAttribute(e)||t.getAttribute("data-aui-"+e)}function b(t,e){var o=function(t){var e=m(t,a)||window;return"string"==typeof e&&(e=document.querySelector(e)),e}(t),i=function(t){var e=(m(t,l)||d).split(" "),o=n(e,2);return{side:o[0],snap:o[1]}}(t);i.snap&&"auto"!==i.snap||(i.snap=function(t,e){var o="left";if(e&&e!==window&&e!==document||(e=document.documentElement),e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE){var i=e.getBoundingClientRect();t.getBoundingClientRect().left>i.right/2&&(o="right")}return o}(e,o));var r,b,v=(r=i.side,b=i.snap,g[r+" "+b]||g[d]),y=function(t,e){return t.hasAttribute(e)||t.hasAttribute("data-aui-"+e)}(t,h),w=new s.default({enabled:!1,element:t,target:e,attachment:v.el,targetAttachment:v.target,classPrefix:f,constraints:[{to:o===window?"window":o,attachment:!0===y?"none":"together"}]});!function(t,e,o){var i=p+e,n=u+o;c(t,i)||(t.className+=" "+i),c(t,n)||(t.className+=" "+n)}(t,i.side,i.snap),this._auiTether=w}b.prototype={destroy:function(){return this._auiTether.destroy(),this},disable:function(){return this._auiTether.disable(),this},enable:function(){return this._auiTether.enable(),this}},e.default=b,t.exports=e.default}};