!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,s){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,!(!e.href||!o||"map"!==n.nodeName.toLowerCase())&&(a=t("img[usemap='#"+o+"']")[0],!!a&&i(a))):(/^(input|select|textarea|button|object)$/.test(r)?!e.disabled:"a"===r?e.href||s:s)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var s=t.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&e(i,!n)}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,s,n=t(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;o=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var n,o,a=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,p=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,u=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width0?"right":"center",vertical:o<0?"top":s>0?"bottom":"middle"};ga(r(s),r(o))?l.important="horizontal":l.important="vertical",n.using.call(this,t,l)}),c.offset(t.extend(I,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-o-n;e.collisionWidth>o?l>0&&h<=0?(i=t.left+l+e.collisionWidth-o-n,t.left+=l-i):h>0&&l<=0?t.left=n:l>h?t.left=n+o-e.collisionWidth:t.left=n:l>0?t.left+=l:h>0?t.left-=h:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-o-n;e.collisionHeight>o?l>0&&h<=0?(i=t.top+l+e.collisionHeight-o-n,t.top+=l-i):h>0&&l<=0?t.top=n:l>h?t.top=n+o-e.collisionHeight:t.top=n:l>0?t.top+=l:h>0?t.top-=h:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,p=h+e.collisionWidth-a-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,u="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+u+f+e.collisionWidth-a-o,(i<0||i0&&(s=t.left-e.collisionPosition.marginLeft+d+u+f-l,(s>0||r(s)0&&(i=t.top-e.collisionPosition.marginTop+u+f+g-l,(i>0||r(i)10&&n<11,e.innerHTML="",i.removeChild(e)}()}();t.ui.position;t.widget("ui.draggable",t.ui.mouse,{version:"1.11.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("
").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(s){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],void(s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){ return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,p=c+s.snapElements[d].height,vh+g||bp+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(c-b)<=g,o=Math.abs(p-w)<=g,a=Math.abs(l-v)<=g,r=Math.abs(h-m)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),u=n||o||a||r,"outer"!==f.snapMode&&(n=Math.abs(c-w)<=g,o=Math.abs(p-b)<=g,a=Math.abs(l-m)<=g,r=Math.abs(h-v)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||u)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||u)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}});t.ui.draggable;t.widget("ui.resizable",t.ui.mouse,{version:"1.11.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0||(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i
"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),a.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),it.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),n&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseInt(s[e],10)||0,i[e]+=parseInt(n[e],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,p=h.containment,d=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;d&&(l.containerElement=t(d),/document/.test(p)||p===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,p={top:0,left:0},d=a.containerElement,u=!0;d[0]!==document&&/static/.test(d.css("position"))&&(p=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-p.left),c&&(a.size.height=a.size.width/a.aspectRatio,u=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,u=!1),a.position.top=a._helper?l.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-p.left:a.offset.left-l.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-p.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,u=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,u=!1)),u||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},l=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?l(n.alsoResize):t.each(n.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,c=l[1]||1,p=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/c)*c,u=o.width+p,f=o.height+d,g=s.maxWidth&&s.maxWidthu,w=s.minHeight&&s.minHeight>f;s.grid=l,v&&(u+=h),w&&(f+=c),g&&(u-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=u,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=u,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=u,i.size.height=f,i.position.left=a.left-p):((f-c<=0||u-h<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),u-h>0?(i.size.width=u,i.position.left=a.left-p):(u=h-e.width,i.size.width=u,i.position.left=a.left+o.width-u))}});t.ui.resizable}),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,i,s,n){return jQuery.easing[jQuery.easing.def](t,e,i,s,n)},easeInQuad:function(t,e,i,s,n){return s*(e/=n)*e+i},easeOutQuad:function(t,e,i,s,n){return-s*(e/=n)*(e-2)+i},easeInOutQuad:function(t,e,i,s,n){return(e/=n/2)<1?s/2*e*e+i:-s/2*(--e*(e-2)-1)+i},easeInCubic:function(t,e,i,s,n){return s*(e/=n)*e*e+i},easeOutCubic:function(t,e,i,s,n){return s*((e=e/n-1)*e*e+1)+i},easeInOutCubic:function(t,e,i,s,n){return(e/=n/2)<1?s/2*e*e*e+i:s/2*((e-=2)*e*e+2)+i},easeInQuart:function(t,e,i,s,n){return s*(e/=n)*e*e*e+i},easeOutQuart:function(t,e,i,s,n){return-s*((e=e/n-1)*e*e*e-1)+i},easeInOutQuart:function(t,e,i,s,n){return(e/=n/2)<1?s/2*e*e*e*e+i:-s/2*((e-=2)*e*e*e-2)+i},easeInQuint:function(t,e,i,s,n){return s*(e/=n)*e*e*e*e+i},easeOutQuint:function(t,e,i,s,n){return s*((e=e/n-1)*e*e*e*e+1)+i},easeInOutQuint:function(t,e,i,s,n){return(e/=n/2)<1?s/2*e*e*e*e*e+i:s/2*((e-=2)*e*e*e*e+2)+i},easeInSine:function(t,e,i,s,n){return-s*Math.cos(e/n*(Math.PI/2))+s+i},easeOutSine:function(t,e,i,s,n){return s*Math.sin(e/n*(Math.PI/2))+i},easeInOutSine:function(t,e,i,s,n){return-s/2*(Math.cos(Math.PI*e/n)-1)+i},easeInExpo:function(t,e,i,s,n){return 0==e?i:s*Math.pow(2,10*(e/n-1))+i},easeOutExpo:function(t,e,i,s,n){return e==n?i+s:s*(-Math.pow(2,-10*e/n)+1)+i},easeInOutExpo:function(t,e,i,s,n){return 0==e?i:e==n?i+s:(e/=n/2)<1?s/2*Math.pow(2,10*(e-1))+i:s/2*(-Math.pow(2,-10*--e)+2)+i},easeInCirc:function(t,e,i,s,n){return-s*(Math.sqrt(1-(e/=n)*e)-1)+i},easeOutCirc:function(t,e,i,s,n){return s*Math.sqrt(1-(e=e/n-1)*e)+i},easeInOutCirc:function(t,e,i,s,n){return(e/=n/2)<1?-s/2*(Math.sqrt(1-e*e)-1)+i:s/2*(Math.sqrt(1-(e-=2)*e)+1)+i},easeInElastic:function(t,e,i,s,n){var o=1.70158,a=0,r=s;if(0==e)return i;if(1==(e/=n))return i+s;if(a||(a=.3*n),r1)){t.preventDefault();var i=t.originalEvent.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(s)}}if(t.support.touch="ontouchend"in document,t.support.touch){var i,s=t.ui.mouse.prototype,n=s._mouseInit,o=s._mouseDestroy;s._touchStart=function(t){var s=this;!i&&s._mouseCapture(t.originalEvent.changedTouches[0])&&(i=!0,s._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},s._touchMove=function(t){i&&(this._touchMoved=!0,e(t,"mousemove"))},s._touchEnd=function(t){i&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),i=!1)},s._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)},s._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),o.call(e)}}}(jQuery),function(t,e,i){function s(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i)}function n(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return m[t.which]?m[t.which]:v[t.which]?v[t.which]:String.fromCharCode(t.which).toLowerCase()}function o(t){t=t||{};var e,i=!1;for(e in z)t[e]?i=!0:z[e]=0;i||(S=!1)}function a(t,e,i,s,n,o){var a,r,l=[],h=i.type;if(!_[t])return[];for("keyup"==h&&c(t)&&(e=[t]),a=0;a<_[t].length;++a)if(r=_[t][a],!(!s&&r.seq&&z[r.seq]!=r.level||h!=r.action||("keypress"!=h||i.metaKey||i.ctrlKey)&&e.sort().join(",")!==r.modifiers.sort().join(","))){var p=s&&r.seq==s&&r.level==o;(!s&&r.combo==n||p)&&_[t].splice(a,1),l.push(r)}return l}function r(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}function l(t,e,i,s){C.stopCallback(e,e.target||e.srcElement,i,s)||!1!==t(e,i)||(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}function h(t){"number"!=typeof t.which&&(t.which=t.keyCode);var e=n(t);e&&("keyup"==t.type&&P===e?P=!1:C.handleKey(e,r(t),t))}function c(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function p(t,e,i,s){function a(e){return function(){S=e,++z[t],clearTimeout(g),g=setTimeout(o,1e3)}}function r(e){l(i,e,t),"keyup"!==s&&(P=n(e)),setTimeout(o,10)}for(var h=z[t]=0;ha||m.hasOwnProperty(a)&&(f[m[a]]=a)}n=f[i]?"keydown":"keypress"}return"keypress"==n&&o.length&&(n="keydown"),{key:s,modifiers:o,action:n}}function u(t,e,i,s,n){y[t+":"+i]=e,t=t.replace(/\s+/g," ");var o=t.split(" ");1":".","?":"/","|":"\\"},b={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},_={},y={},z={},P=!1,x=!1,S=!1;for(i=1;20>i;++i)m[111+i]="f"+i;for(i=0;9>=i;++i)m[i+96]=i;s(e,"keypress",h),s(e,"keydown",h),s(e,"keyup",h);var C={bind:function(t,e,i){t=t instanceof Array?t:[t];for(var s=0;s1||t.targetTouches&&t.targetTouches.length>1)return!1;var e=s(t);h=e[0],l=e[1]}function o(t){if(!c){var e=s(t);e&&(Math.abs(l-e[1])>d||Math.abs(h-e[0])>d)&&(c=!0)}}function a(e){if(clearTimeout(r),r=setTimeout(function(){t.tapHandling=!1,c=!1},1e3),!(e.which&&e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey)){if(e.preventDefault(),c||t.tapHandling&&t.tapHandling!==e.type)return void(c=!1);t.tapHandling=e.type,i(e)}}var r,l,h,c,p=e(this),d=10;p.bind("touchstart.tappy MSPointerDown.tappy",n).bind("touchmove.tappy MSPointerMove.tappy",o).bind("touchend.tappy MSPointerUp.tappy",a).bind("click.tappy",a)})},n=function(t){return t.unbind(".tappy")};if(e.event&&e.event.special)e.event.special.tap={add:function(t){s(e(this))},remove:function(t){n(e(this))}};else{var o=e.fn.bind,a=e.fn.unbind;e.fn.bind=function(t){return/(^| )tap( |$)/.test(t)&&s(this),o.apply(this,arguments)},e.fn.unbind=function(t){return/(^| )tap( |$)/.test(t)&&n(this),a.apply(this,arguments)}}}(this,jQuery);var AmenitiesMap={settings:{legendNav:$(".map-legend li a"),amensMap:$(".amenities-map")},init:function(){var t=this.settings;AmenitiesMap.UIActions(t)},UIActions:function(t){$(".amenities-map li").hover(function(){$(this).addClass("on")},function(){$(this).removeClass("on")}),t.legendNav.click(function(e){if(e.preventDefault(),$(this).hasClass("active"))return!1;t.legendNav.removeClass("active"),$(this).addClass("active");var i=$(this).attr("href").split("#")[1];"all"===i?t.amensMap.find("ul").fadeIn(500):(t.amensMap.find("ul").fadeOut(500),t.amensMap.find("ul."+i).fadeIn(500))})}},AvailableSpace={settings:{tabBtn:$(".tab-nav a"),space:$(".avail-space h3"),floorplans:$(".floorplans img")},init:function(){var t=this.settings;AvailableSpace.tabTap(t),AvailableSpace.spaceTap(t),AvailableSpace.onWindowResize(t),AvailableSpace.hoverSpace(t)},tabTap:function(t){t.tabBtn.click(function(e){$(".avail-space li.on").removeClass("on").addClass("off").attr("style"," "),t.floorplans.removeClass("on")})},spaceTap:function(t){t.space.click(function(e){AvailableSpace.toggleSpace(t,$(this))})},onWindowResize:function(t){$(window).resize(function(){var t=$(".avail-space li.on").find("h3").outerHeight()+$(".avail-space li.on").find(".details").outerHeight();$(".avail-space li.on").css("height",t)})},toggleSpace:function(t,e){var i=e.parent();if(t.floorplans.removeClass("on"),i.hasClass("on")){var s=e.outerHeight()+5;i.toggleClass("off on"),i.animate({height:s},300,"easeInOutQuad")}else{var n=$(".avail-space li.on"),s=n.find("h3").outerHeight()+5;n.animate({height:s},300,"easeInOutQuad"),n.toggleClass("off on");var o=e.outerHeight()+e.siblings().outerHeight();i.css("height",s).animate({height:o},300,"easeInOutQuad"),i.toggleClass("off on"),$(".tab.active .floorplans img."+e.parent().attr("class").split(" ")[0]).addClass("on")}},hoverSpace:function(t){t.space.hover(function(){$(".tab.active .floorplans img."+$(this).parent().attr("class").split(" ")[0]).addClass("hovered")},function(){$(".tab.active .floorplans img."+$(this).parent().attr("class").split(" ")[0]).removeClass("hovered")})}},Gallery={settings:{launcher:$(".gallery-launcher"),gallery:$(".gallery"),nav:$(".gallery__btn-nav"),close:$(".gallery__btn-close"),caption:$(".gallery__caption")},init:function(){var t=this.settings;Gallery.bindUIActions(t)},bindUIActions:function(t){t.launcher.click(function(e){e.preventDefault(),Gallery.setup(t,$(this).attr("href"))}),t.close.click(function(e){e.preventDefault(),t.gallery.fadeOut(500),t.nav.unbind(),t.slider.hide(),t.dotNav.parents(".gallery__dot-nav").remove(),$("body").css("overflow","visible")})},setup:function(t,e){t.current=0,t.id=e,t.slider=$(".gallery__slider").filter(t.id),t.slides=t.slider.find(".gallery__slide"),t.numSlides=t.slides.length,t.slider.show(),t.slider.css("width",100*t.numSlides+"%"),t.slides.css("width",100/t.numSlides+"%"),Gallery.dotNav(t),$(t.id+" li").length<2?t.nav.add(t.dotNav).css("display","none"):t.nav.add(t.dotNav).attr("style",""),Gallery.runGallery(t),t.dotNav.eq(0).click()},dotNav:function(t){$(".gallery__dot-nav").remove();var e='
",t.gallery.find(".gallery__wrapper").append(e),t.dotNav=$(".gallery__dot-nav li a")},runGallery:function(t){t.gallery.fadeIn(500),t.slideInterval=100/t.numSlides,$("body").css("overflow","hidden"),t.nav.click(function(e){e.preventDefault(),$(this).hasClass("-next")?t.current25&&t.current>0?t.dotNav[t.current-1].click():t.slider.addClass("-done").css({left:"0"})}})},moveSlider:function(t){var e=t.slides.eq(t.current).find("img").attr("alt");t.dotNav.add(t.slides).removeClass("-active"),t.slider.addClass("-done").css({left:"0",transform:"translateX("+t.slidePosition+"%)"}).css({left:"0",transform:"translate3d("+t.slidePosition+"%, 0, 0)"}),t.dotNav.eq(t.current).add(t.slides.eq(t.current)).addClass("-active"),"undefined"!=typeof e&&e.length>0?t.caption.html(e).fadeIn(500):t.caption.fadeOut(500)}},LocationMap={settings:{subjectProp:"Property Name",subjectLoc:[34.0515967,-118.2591709],subjectMapsURL:"https://www.google.com/maps/place/515+S+Flower+St,+Los+Angeles,+CA+90071/@34.0515967,-118.2591709,17z/data=!3m1!4b1!4m5!3m4!1s0x80c2c7b3b745579b:0x843a8d9db4d0686c!8m2!3d34.0515967!4d-118.2569769",mapZoom:13},init:function(){var t=this.settings;LocationMap.loadMap(t)},loadMap:function(t){var e=new google.maps.LatLng(t.subjectLoc[0],t.subjectLoc[1]),i=e,s=t.mapZoom,n={center:i,zoom:s,panControl:!1,draggable:!0,scrollwheel:!1,streetViewControl:!1,mapTypeId:google.maps.MapTypeId.TERRAIN,mapTypeControlOptions:{mapTypeIds:[]},zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL,position:google.maps.ControlPosition.TOP_RIGHT}};t.map=new google.maps.Map(document.getElementById("map"),n),google.maps.event.addDomListener(window,"resize",function(){t.map.setCenter(i)});var o={url:"../assets/img/subject-marker.svg",scaledSize:new google.maps.Size(60,80),anchor:new google.maps.Point(30,80)},a=new google.maps.Marker({position:e,map:t.map,icon:o,optimized:!1,title:t.subjectProp,url:t.subjectMapsURL,animation:google.maps.Animation.DROP});google.maps.event.addListener(a,"click",function(){window.open(a.url)})}},PageIntro={settings:{sail:$(".modern .sail"),main:$(".modern .main-content"),hero:$(".modern .hero img").eq(0)},init:function(){var t=this.settings;t.hero.animate({"margin-left":"0",opacity:"1"},500),t.sail.animate({left:"0",opacity:"1"},500),t.main.delay(300).animate({left:"0",opacity:"1"},500),$(window).scroll(function(){x=.075*$(window).scrollTop(),t.sail.css("left",-x)})}},PageSetUp={settings:{pageName:$("body").attr("class")},init:function(){var t=this.settings;SiteNav.init(),Gallery.init(),PageIntro.init(),"page-home"==t.pageName||("page-property"==t.pageName?$(".buildings li").hover(function(){$(this).addClass("on")},function(){$(this).removeClass("on")}):"page-availability"==t.pageName?(TabNav.init(),AvailableSpace.init()):"page-sustainability"==t.pageName?TabNav.init():"page-location"==t.pageName?(TabNav.init(),AmenitiesMap.init(),LocationMap.init()):"page-amenities"==t.pageName?(TabNav.init(),Slideshow.init(5e3),Gallery.init()):"page-contact"==t.pageName&&TabNav.init())}},SiteNav={settings:{navTrigger:$("a.nav-trigger"),siteHeader:$(".site-header"),siteNav:$(".site-nav")},init:function(){var t=this.settings;SiteNav.triggerMenu(t),SiteNav.shrinkHeader(t)},triggerMenu:function(t){t.navTrigger.bind("tap",function(e){e.preventDefault(),t.navTrigger.add(t.siteNav).toggleClass("off on")})},shrinkHeader:function(t){var e=t.siteHeader.height();$(window).resize(function(){t.siteHeader.height()}),$(window).scroll(function(){if($(window).scrollTop()>e){if(t.siteHeader.hasClass("shrinked"))return!1;t.siteHeader.addClass("shrinked"),t.siteHeader.animate({top:"0"},500)}else{if(!t.siteHeader.hasClass("shrinked"))return!1;t.siteHeader.removeClass("shrinked").attr("style"," ")}})}},SlideShow={settings:{slides:$(".slideshow img"),timer:5e3},init:function(){var t=this.settings;SlideShow.runGallery(t)},runGallery:function(t){var e=t.slides.length,i=0;setInterval(function(){if(i•'}),e+="",t.slideshow.append(e),t.slideNav=$(".slideshow__nav a"),t.slideNav.eq(0).addClass("-active");var i='';i+='',t.slideshow.append(i),t.arrowNav=$(".slideshow__btn")},bindUIActions:function(t){if(t.slideNav.click(function(e){return e.preventDefault(),!$(this).hasClass("-active")&&(t.slideNav.removeClass("-active"),clearTimeout(t.timer),Slideshow.goToSlide(t,$(this).attr("href").split("#")[1]),$(this).addClass("-active"),Slideshow.counter(t),void 0)}),t.arrowNav.click(function(e){e.preventDefault(),$(this).hasClass("-next")?t.currentSlide==t.numSlides-1?t.slideNav.eq(0).click():t.slideNav.eq(parseInt(t.currentSlide)+1).click():0==t.currentSlide?t.slideNav.eq(t.numSlides-1).click():t.slideNav.eq(parseInt(t.currentSlide)-1).click()}),$("body").hasClass("page-home"));else;var e=0,i=0;t.sliderID.addEventListener("touchstart",function(i){var s=i.changedTouches[0];e=parseInt(s.clientX),t.slider.removeClass("-done")},!1),t.sliderID.addEventListener("touchmove",function(s){var n=s.changedTouches[0];i=parseInt(n.clientX)-e,(i>10||i<-10)&&(s.preventDefault(),(i<800&&i>15||i>-800&&i<-15)&&t.slider.css("left",i))},!1),t.sliderID.addEventListener("touchend",function(e){e.changedTouches[0];e.preventDefault(),i<-50&&t.currentSlide50&&t.currentSlide>0?t.slideNav.eq(parseInt(t.currentSlide)-1).click():t.slider.addClass("-done").css({left:"0"})},!1)},counter:function(t){t.timer=setTimeout(function(){t.currentSlide==t.numSlides-1?t.slideNav.eq(0).click():t.slideNav.eq(parseInt(t.currentSlide)+1).click()},t.timeInterval)},goToSlide:function(t,e){var i=t.slideWidth*e;t.slides.removeClass("-active").eq(e).addClass("-active"),t.slider.addClass("-done"),t.slider.css({left:"0",transform:"translateX(-"+i+"%)"}),t.slider.css({left:"0",transform:"translate3d(-"+i+"%, 0, 0)"}),t.currentSlide=e}},TabNav={settings:{tabBtn:$(".tab-nav a"),tabs:$(".tab")},init:function(){var t=this.settings;TabNav.UIActions(t),"undefined"!=typeof window.location.hash.split("#")[1]?t.currentTab=window.location.hash.split("#")[1]:t.currentTab=t.tabBtn.eq(0).attr("href").split("#")[1],$(".tab-nav a."+t.currentTab).click()},UIActions:function(t){t.tabBtn.click(function(e){if(e.preventDefault(),$(this).hasClass("active"))return!1;var i=$(this).attr("href");return t.tabBtn.removeClass("active"),$(this).addClass("active"),$(".tab.active").removeClass("active"),$(i).addClass("active"),!!history.pushState&&void history.pushState(null,null,i)})}};!function(){PageSetUp.init(),$("footer p.copyright span").prepend("©"+(new Date).getFullYear()+" ")}();