!function(a,b){"user strict";function c(a,b,c){return a&&a>b?b=a:c&&b>c&&(b=c),b}function d(c,d){d===b&&(d="se");var e=new a.Event("mousedown",{pageX:0,pageY:0});this._mouseStart(e),this.axis=d;var f=new a.Event("mouseup",{pageX:c.width-this.originalSize.width,pageY:c.height-this.originalSize.height});this._mouseDrag(f),this._mouseStop(f)}var e={handles:"w"};a.widget("giosh94mhz.twopane",{options:{left:"> *:nth-child(1)",right:"> *:nth-child(2)",resizable:{helper:"ui-resizable-helper ui-corner-all"}},_create:function(){this.element.addClass("giosh94mhz-twopane"),this.oldContent=a("
"),this.element.contents().appendTo(this.oldContent),this.left=this._createPane("left",this.options),this.right=this._createPane("right",this.options),this.right.resizable(a.extend({},this.options.resizable,e)),this._extendResizableWidget(this.right),this.shim=this._createShim(),this._on(this.element,{resizestart:function(){this.shim.show().outerWidth(this.element.outerWidth()).outerHeight(this.element.outerHeight()).offset(this.element.offset())},resizestop:function(){this.right.css("height","inherit"),this.shim.hide()}}),this._ensureResizableSize()},_createPane:function(b,c){var d=null;null!==c[b]&&(d=this.oldContent.find(c[b])),d?a("
").addClass("placeholder-"+b).insertBefore(d):d=a("
");var e=a("
").appendTo(this.element).addClass("giosh94mhz-"+b[0]+"-pane");return e.append(d).appendTo(this.element),delete c[b],e},_createShim:function(){return a("
").css({position:"absolute","z-index":90}).addClass("giosh94mhz-twopane-shim ui-helper-hidden").appendTo(this.element.parent())},_extendResizableWidget:function(a){var b=null;try{b=a.resizable("instance")}catch(c){b=a.data("ui-resizable")}b.resizeTo=d;var e=b._mouseStop;b._mouseStop=function(){return b.position=b.originalPosition,e.apply(b,arguments)}},_destroy:function(){this.right.resizable("destroy"),this.oldContent.find(".placeholder-left").replaceWith(this.left.contents()),this.oldContent.find(".placeholder-right").replaceWith(this.right.contents()),this.element.contents().remove(),this.element.append(this.oldContent.contents())},_setOption:function(b,c){switch(this._super(b,c),b){case"iframeFix":this.options.iframeFix=c;break;case"resizable":c=a.extend(this.options.resizable,c,{handles:"w"}),this.right.resizable("option",c),this.options.resizable=c,this._ensureResizableSize()}},_ensureResizableSize:function(){var a={width:this.right.outerWidth(),height:this.right.outerHeight()},b=this.options.resizable,d={width:c(b.minWidth,a.width,b.maxWidth),height:c(b.minHeight,a.height,b.maxHeight)};(a.width!==d.width||a.height!==d.height)&&this.right.resizable("resizeTo",d,"w")}})}(jQuery);