function PanelSwipe(){function v(){m()}function m(){e=0,t=!1,n=0,r=0,i=0,s=0,o=!0,u=1,a=[0,0,0],h=!1,l=0,c=0,f=["",""]}function g(){setTimeout(function(){y(),b()},0)}function y(){w(),E(a[u],!1,!1,!0)}function b(){$("#wizard_right").on(vdown,function(e){document.activeElement.blur(),$("input").blur()}),$("#content_handle").on(vdown,function(e){(touchDevice||e.which==1)&&!funcObj.UIMain.getDownStatus()&&!funcObj.panelSwipe.getAnimatingState()&&(p=!0,funcObj.UIMain.setCurBut(this),s=0,r=i=funcObj.UIMain.getMouseX(e),n=$("#wizard_right").position().left-r,C(!0),t=!0)}),$("body").on(vmove,function(e){overrideMovePrevDef=!0;if(t){e.preventDefault();var o=i;i=funcObj.UIMain.getMouseX(e);var f=i+n;f<a[c]?f=a[c]:f>a[l]&&(f=a[l]),i>r&&f>a[c]&&f<a[l]?o>i?s+=o-i:s=0:i<r&&f>a[c]&&f<a[l]&&(o<i?s+=i-o:s=0),s>0&&(movedDirVal=0),(f!==a[u]||movedDirVal!==0)&&funcObj.Help.animatePanel(f,!1)}}).on(vup,function(e){if(t){t=!1;var r=i+n;r===a[u]&&movedDirVal!==0&&(movedDirVal>0?r-=1:r+=1),r!==a[u]&&(p&&s>=d||!p)&&(r>a[c]&&r<a[l]&&s>=d||orient=="portrait"&&touchDevice&&u==2&&r>a[l]||orient=="landscape"&&u==1&&r>a[l]||!funcObj.devCon.getDeviceSocketObj(funcObj.UIMain.getUID()).getSocketState()&&u==1&&r>a[l]||u==0&&r<a[c])?setTimeout(function(){E(a[u],!0,!1)},0):(s<=d&&r!==a[u]||r===a[u]&&movedDirVal===0)&&(!p||p&&(movedDirVal===0||r>=a[0]&&r<=a[1]||r<a[0]&&(movedDirVal<0||u==1)||r>a[1]&&(movedDirVal>0||u==0)))&&setTimeout(function(){E(r,!0,!0)},0),o=!0}})}function w(){deviceSize==1&&orient=="landscape"?a=[0,0]:a=[0,Math.floor($(window).width()-$("#content_handle").width())],u=1}function E(t,n,r,i){r&&(u=u?0:1,t=a[u]),n?k(!0):k(!1),funcObj.Help.animatePanel(t,n),e=!e,touchDevice&&orient=="portrait"&&u!=0?(funcObj.Help.animatePanel(t,n),e=!e):touchDevice&&i!=undefined&&i!=null&i&&(funcObj.Help.animatePanel(a[1],n),e=!e),x()}function S(e){if(e==null||e==undefined)e=!0;u!=1&&(u=1,setTimeout(function(){E(a[u],e,!1)},0))}function x(){$("#handle_name > p").text(f[u])}function T(){return u}function N(e,u,a){t||(s=0,r=i=funcObj.UIMain.getMouseX(e),n=u,p=!1,a!=undefined&&a&&(o=!1),C(),t=!0)}function C(e){l=1,c=0}function k(e){h=e}function L(){return h}function A(){return a}function O(){return t}function M(){return isBrowser?1:e}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d=10;this.setup=g,this.updateUI=y,this.swipePanel=E,this.getHandleLoc=T,this.showNowPlaying=S,this.extSwipe=N,this.setAnimatingState=k,this.getAnimatingState=L,this.getLimits=A,this.getPMove=O,this.getPanelState=M,v()};