1function ChangeWeeksValue(){var search_startdate=jQuery("#search_start_date").val(),val_enddate=jQuery("#search_end_date option:selected").text();jQuery("#search_end_date").val("").change(),0<search_startdate.length&&(jQuery("#search_end_date").val(""),val_enddate.length)&&jQuery("#search_end_date option").each(function(){var search_enddate=new Date(search_startdate),length,days,days,search_enddate;""!=jQuery(this).val()&&(days=7,days="day"==(length=jQuery(this).text().split(" "))[1]||"days"==length[1]?length[0]:7*length[0],(search_enddate=new Date(search_enddate.getTime()+864e5*days)).toLocaleDateString(),search_enddate=search_enddate.format("m/d/yy"),jQuery(this).val(search_enddate))})}function calculateTurnOverDate(turnDay,restrictedDate,currentDate,nextWeek){var targetTurnOver=turnDay,weekend=[4,5,6],restrictedDay=restrictedDate.getDay(),setWeek=7,targetTurnOverDate=(7-restrictedDay+(targetTurnOver=8==turnDay?7:targetTurnOver))%7||7;return 8==turnDay&&(weekend.includes(restrictedDay)&&weekend.includes(currentDate.getDay())&&!1===nextWeek?targetTurnOverDate-=14:targetTurnOverDate-=7),8==turnDay&&1==nextWeek&&(setWeek=0),targetTurnOver=restrictedDate.getDate()+targetTurnOverDate-setWeek,calendarMonthsLimit=restrictedDate.setDate(targetTurnOver),calendarMonthsLimit=new Date(moment(calendarMonthsLimit).format("MM/DD/YYYY"))}function add_pricetooltip(){jQuery.fn.tooltipster&&jQuery(".available").tooltipster({interactive:!0,multiple:!0})}function add_seasonRestrictionTooltip(){jQuery.fn.tooltipster&&jQuery(".ui-state-disabled.available").tooltipster({interactive:!0,multiple:!0,content:jQuery(".dayOff").html()})}function hide_tooltip(){jQuery(document).ready(function(){setTimeout(function(){jQuery(document).find(".available").mouseover(function(e){jQuery(this).attr("data-title",jQuery(this).attr("title")),jQuery(this).removeAttr("title")}),jQuery(document).find(".available").mouseout(function(e){jQuery(this).attr("title",jQuery(this).attr("data-title"))})},500)})}function run_waitMe(container,effect,message){message=void 0!==message?message:"Please wait ...",effect=void 0!==effect?effect:"bounce",jQuery(container).waitMe({effect:"ios",text:message,bg:"rgba(255,255,255,0.7)",color:"#000",sizeW:"",sizeH:"",source:assetsUrl+"images/bigrotation.svg"})}function hide_waitMe(container){jQuery(container).waitMe("hide")}($=>{jQuery(document).ready(function($){jQuery("#streamlinecore_fw_ra_id option[value=0],#resortpro_sw_ra_id option[value=0]").attr("disabled",!0),jQuery("html, body").animate({scrollTop:0}),jQuery(".enable_turn_day_searching").on("submit",function(e){"0"!=jQuery("#search_end_date").val()?jQuery(".restriction_turn_day_search").hide():""!=jQuery("#search_start_date").val()&&"0"==jQuery("#search_end_date").val()&&(jQuery(".restriction_turn_day_search").show(),e.preventDefault())}),jQuery("#resortpro-widget-form").on("submit",function(){var $hiddenFlex=jQuery("#resortpro_calendar_flex"),$hiddenFlex;$hiddenFlex.length&&$hiddenFlex.hasClass("enabled")&&($hiddenFlex=$hiddenFlex.val())&&jQuery('select[name="resortpro_calendar_flex"]').val($hiddenFlex)}),function initFlexWidgetsFromUrl(){for(var search=window.location.search.substring(1).split("&"),flexVal="",i=0;i<search.length;i++){var pair=search[i].split("=");if("flex"===pair[0]&&pair[1]){flexVal=decodeURIComponent(pair[1]);break}}flexVal&&(jQuery("#resortpro_calendar_flex").val(flexVal),jQuery('select[name="resortpro_calendar_flex"]').val(flexVal),jQuery("#streamlinecore_fw_flex_dates").val(flexVal),jQuery('select[name="flex"]').val(flexVal))}();var startDate=jQuery(location).attr("href").split("sd="),startDate,endDate=(startDate[1]&&1<(startDate=(startDate=startDate[1].split("&"))[0].split("%2F")).length&&jQuery("#search_start_date").val(startDate[0]+"/"+startDate[1]+"/"+startDate[2]),jQuery(location).attr("href").split("ed=")),endDate,days_count_same,startDate,enddate,days_count_same,startDate=(endDate[1]&&(endDate=(endDate=endDate[1].split("&"))[0].split("%2F"),startDate[0]==endDate[0]?(7==(days_count_same=endDate[1]-startDate[1])&&jQuery("#search_end_date option[value=1]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2]),14==days_count_same&&jQuery("#search_end_date option[value=2]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2]),21==days_count_same&&jQuery("#search_end_date option[value=3]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2])):((days_count_same=30-(startDate=+startDate[1])+ +endDate[1])<=9&&jQuery("#search_end_date option[value=1]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2]),9<days_count_same&&days_count_same<=16&&jQuery("#search_end_date option[value=2]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2]),16<days_count_same&&jQuery("#search_end_date option[value=3]").prop("selected","selected").val(endDate[0]+"/"+endDate[1]+"/"+endDate[2]))),jQuery("#search_start_date").change(function(){jQuery("#search_end_date option[value=0]").prop("selected","selected")}),jQuery(".form-checkout-wrapper .panel-collapse").on("show.bs.collapse",function(){jQuery(this).parent().find(".panel-heading").addClass("open")}),jQuery(".form-checkout-wrapper .panel-collapse").on("shown.bs.collapse",function(){var collapse=jQuery(document).find(".panel-collapse.collapse.in").parent().parent(),collapseId=collapse.attr("id");jQuery(window).width()<"767"&&(jQuery("html, body").animate({scrollTop:collapse.offset().top},50),"step2"==collapseId&&(jQuery("#step2 .resortpro-reservation-detail
1s-mobile").sticky({topSpacing:0}),jQuery("#step2").sticky({topSpacing:0})),"step3"==collapseId)&&jQuery("#step3 .resortpro-reservation-details-mobile").sticky({topSpacing:0})}),jQuery(".form-checkout-wrapper .panel-collapse").on("hide.bs.collapse",function(){jQuery(this).parent().find(".panel-heading").removeClass("open")}),jQuery(".form-checkout-wrapper .panel-collapse").on("hide.bs.collapse",function(){var collapse,collapseId=jQuery(document).find(".panel-collapse.collapse.in").attr("id");jQuery(window).width()<"767"&&(jQuery(this).parent().find(".panel-heading").removeClass("open"),"step2"==collapseId&&jQuery("#step2 .resortpro-reservation-details-mobile").unstick(),"step3"==collapseId)&&jQuery("#step3 .resortpro-reservation-details-mobile").unstick()}),(offset=(offset=0)<jQuery("body.admin-bar").length?32:offset)+parseInt(jQuery(".map_sticky").attr("data-top-spacing"))),days_count_same=parseInt(jQuery(".map_sticky").attr("data-bottom-spacing")),multiselect=(jQuery(".map_sticky").sticky({topSpacing:startDate,bottomSpacing:days_count_same}),jQuery().tooltip&&jQuery("body").tooltip({selector:".btn-fav, .petFriendly, .js-btnFav, .js-petFriendly, .btn-cmp"}),"768"<=jQuery(window).width()&&jQuery(".g_tooltip").tooltip({html:!0,placement:"right"}),jQuery(window).width()<"767"&&jQuery(".g_tooltip").tooltip({html:!0,placement:"top"}),jQuery(".container_input input, .container_input select").click(function(e){jQuery(this).siblings(".g_tooltip").tooltip("show")}),jQuery(".container_input input, .container_input select").focusout(function(e){jQuery(this).siblings(".g_tooltip").tooltip("hide")}),jQuery(".btn-sort").click(function(){jQuery(".btn-sort").removeClass("active"),jQuery(this).addClass("active")}),jQuery(document).find("select.js-multiselect")),multiselectSelOpt=[],checkin_days=(multiselect.length&&"function"==typeof jQuery.fn.multiselect&&setTimeout(function(){multiselect.multiselect({buttonText:function(options,select){var labels;return 0===options.length?select[0].getAttribute("data-title"):(labels=[],options.each(function(){void 0!==jQuery(this).attr("label")?labels.push(jQuery(this).attr("label")):labels.push(jQuery(this).html())}),labels.join(", ")+"")},onInitialized:function(select,container){Array.prototype.forEach.call(select[0],function(el,index,array){el.getAttribute("selected")&&multiselectSelOpt.push(el.getAttribute("value"))})}}),multiselectSelOpt.length&&(multiselect.multiselect("select",multiselectSelOpt),multiselect.multiselect("updateButtonText",!0))},50),0),arr_turndates=[],str_turndates=[],calendarBtn;function loadDatePicker(target){isNaN(target.attr("data-checkin-days"))||(checkin_days=target.attr("data-checkin-days"));var str_turndates=target.attr("data-turndates"),drp=(str_turndates&&(arr_turndates=str_turndates.split(",").map(function(item){return item.trim()})),jQuery("#search_date_range")),minCheckinDate=moment().add(checkin_days,"days"),str_turndates=0,calendarIterations=0,drpPlaceholder=jQuery(".js-drpPlaceholder"),oneMonth,flexDate,oneMonth,str_turndates,currentDate,restrictedDate,currentDate,restrictedDate,oneMonth,str_turndates;isNaN(drp.attr("data-min-stay"))||(str_turndates=drp.attr("data-min-stay")),"one-popup-calendar"===drp.data("calendar-type")?(oneMonth=!0,jQuery(window).innerWidth()<=768&&(oneMonth=!1,setTimeout(function(){jQuery(".daterangepicker .drp-calendar.right").hide()},1e3)),drp.daterangepicker({locale:{format:"MM/DD/YYYY",monthNames:moment.months()},linkedCalendars:oneMonth,alwaysShowCalendars:!0,buttonClasses:!0,minDate:minCheckinDate.format("MM/DD/YYYY"),minSpan:{days:str_turndates},autoApply:!0,autoUpdateInput:!1,isInvalidDate:function(date){if(arr_turndates.length&&-1===$.inArray(date.day().toString(),arr_turndates))return!0},isCustomDate:function(date){var leftCalendarMonth=drp.data("daterangepicker").leftCalendar.month.month(),currentMonth;if(calendarIterations++,parseInt((calendarIterations-1)/42)%2==0&&(currentMonth=leftCalendarMonth),parseInt((calendarIterations-1)/42)%2==1&&(currentMonth=11!==leftCalendarMonth?leftCalendarMonth+1:0),date.month()!==currentMonth)return"other-month"}},function(start,end,label){var start=start.format("MM/DD/YYYY"),end=end.format("MM/DD/YYYY");drp.val(start+" - "+end)}),flexDate="",drp.on("show.daterangepicker",function(ev,picker){var drpButtons=jQuery("div.daterangepicker .drp-buttons"),isFlex;jQuery("#resortpro_calendar_flex").hasClass("enabled")&&(isFlex=jQuery("#resortpro_calendar_flex").val(),drpButtons.css("display","block").append('<div class="flex-calendar" ><div class="dp-flex noflex" data-flex="0">Exact dates</div><div class="dp-flex flex1" data-flex="1"> ±1 day</div><div class="dp-flex flex2" data-flex="2"> ±2 days</div><div class="dp-flex flex3" data-flex="3"> ±3 days</div></div>'),""!==isFlex?jQuery(".dp-flex").each(function(){jQuery(this).attr("data-flex")==isFlex&&jQuery(this).addClass("dp-flex-active")}):jQuery(".noflex").addClass("dp-flex-active"),jQuery("div.daterangepicker .drp-buttons .flex-calendar .dp-flex").on("click",function(event){jQuery(this).addClass("dp-flex-active"),jQuery(".dp-flex").removeClass("dp-flex-active"),jQuery(this).addClass("dp-flex-active"),flexDate=jQuery(this).attr("data-flex")}),drpButtons.css("display","block").append('<button class="cancelBtn flex-closebtn" type="button" style="display: block;">Done</button>')),drpButtons.css("display","block").append('<a class="clearBtn btn btn-link" href="#">'+jsLangVars.drpBtnText+"</a>"),jQuery("div.daterangepicker .clearBtn").on("click",function(event){event.preventDefault(),drp.val(""),picker.setStartDate(moment()),picker.setEndDate(moment()),picker.endDate=moment(),calendarIterations=0,picker.updateCalendars(),drpPlaceholder.css("display","block"),drp.one("hide.daterangepicker",function(ev,picker){picker.startDate.isSameOrBefore(minCheckinDate,"day")&&picker.endDate.isSameOrBefore(minCheckinDate,"day")&&(drp.val(""),picker.endDate=moment())})})}),drp.on("hide.daterangepicker",function(ev,picker){jQuery("div.daterangepicker .clearBtn").remove(),jQuery("#resortpro_calendar_flex").hasClass("enabled")&&(jQuery("div.daterangepicker .flex-calendar").remove(),jQuery("div.daterangepicker .cancelBtn.flex-closebtn").remove(),jQuery("#resortpro_calendar_flex").val(flexDate)),calendarIterations=0}),drp.on("showCalendar.daterangepicker",function(ev,picker){calendarIterations=0}),drp.on("apply.daterangepicker",function(ev,picker){drp.change(),drpPlaceholder.css("display","none")}),drp.val()||drpPlaceholder.css("display","block")):(oneMonth=parseInt(j
1Query("#monthsLimit").text()),str_turndates=parseInt(jQuery("#search_start_date").attr("data-turnDay")),oneMonth=""!=oneMonth||0!=oneMonth?(restrictedDate=0==jQuery("#monthsLimit").length||!jQuery("#monthsLimit").attr("data-timezone")||jQuery("#monthsLimit").attr("data-timezone").includes("+")||jQuery("#monthsLimit").attr("data-timezone").includes("-")?(currentDate=new Date,new Date):(currentDate=new Date((new Date).toLocaleString("en-US",{timeZone:jQuery("#monthsLimit").attr("data-timezone")})),new Date((new Date).toLocaleString("en-US",{timeZone:jQuery("#monthsLimit").attr("data-timezone")}))),restrictedDate=new Date(moment(restrictedDate.setDate(restrictedDate.getDate()+oneMonth)).format("MM/DD/YYYY")),str_turndates?calculateTurnOverDate(str_turndates,restrictedDate,currentDate):restrictedDate):"",str_turndates=0,target.val()&&(str_turndates=new Date(target.val())),jQuery(document).find(".datepicker-input").datepicker({minDate:"+"+checkin_days+"d",defaultDate:str_turndates,dateFormat:"m/d/y",maxDate:oneMonth,shortYearCutoff:99,beforeShowDay:function(date){var is_available=!0,class_day="available",start_date;return"search_start_date"!=jQuery(this).attr("id")||(is_available=!(0<arr_turndates.length&&-1==$.inArray(date.getUTCDay().toString(),arr_turndates))&&is_available)||(class_day="booked"),"search_end_date"==jQuery(this).attr("id")&&((start_date=jQuery("#search_start_date").datepicker("getDate"))?0<arr_turndates.length&&start_date.getUTCDay().toString()!=date.getUTCDay().toString()&&(is_available=!1,class_day="booked"):(is_available=0<arr_turndates.length&&-1==$.inArray(date.getUTCDay().toString(),arr_turndates)?!1:is_available)||(class_day="booked")),[is_available,class_day]},onClose:function(){jQuery(this).blur()},autoclose:!0,todayHighlight:!0}),jQuery(".datepicker-end").datepicker({minDate:"+2d",dateFormat:"m/d/y",shortYearCutoff:99}),jQuery(".datepicker-input").change(function(){jQuery(this).datepicker("option","dateFormat","m/d/y");var frm=new Date(jQuery(this).val()),the_year=frm.getFullYear(),nts=(the_year<2e3&&(the_year=2e3+the_year%100),1),endpicker=(jQuery("#resortpro_min_days").attr("value")&&($nts=parseInt(jQuery("#resortpro_min_days").attr("value"))),jQuery(this).attr("data-bindpicker")),checkin_days,nts,to,checkin_days,to,currentDate,restrictedDate,currentDate,restrictedDate,to,checkin_days;endpicker&&0!==endpicker.length&&(jQuery(endpicker).datepicker("option","minDate",to),jQuery(this).attr("data-min-stay")&&(nts=parseInt(jQuery(this).attr("data-min-stay"))),checkin_days=0,isNaN(jQuery(this).attr("data-checkin-days"))||(checkin_days=parseInt(jQuery(this).attr("data-checkin-days"))),nts=new Date(the_year,frm.getMonth(),frm.getDate()+nts),to=new Date(the_year,frm.getMonth(),frm.getDate()+checkin_days),jQuery(endpicker).val(to.format("m/d/y")),checkin_days=""!=(checkin_days=parseInt(jQuery("#monthsLimit").text()))||0!=checkin_days?(to=parseInt(jQuery("#search_start_date").attr("data-turnDay")),restrictedDate=0==jQuery("#monthsLimit").length||!jQuery("#monthsLimit").attr("data-timezone")||jQuery("#monthsLimit").attr("data-timezone").includes("+")||jQuery("#monthsLimit").attr("data-timezone").includes("-")?(currentDate=new Date,new Date):(currentDate=new Date((new Date).toLocaleString("en-US",{timeZone:jQuery("#monthsLimit").attr("data-timezone")})),new Date((new Date).toLocaleString("en-US",{timeZone:jQuery("#monthsLimit").attr("data-timezone")}))),restrictedDate=new Date(moment(restrictedDate.setDate(restrictedDate.getDate()+checkin_days)).format("MM/DD/YYYY")),to?calculateTurnOverDate(to,restrictedDate,currentDate,!0):restrictedDate):"",jQuery(this).attr("data-max-stay")&&(maxNights=parseInt(jQuery(this).attr("data-max-stay")),to=new Date(the_year,frm.getMonth(),frm.getDate()+maxNights),jQuery(endpicker).datepicker("option","maxDate",to),checkin_days<to)&&""!=checkin_days&&0!=checkin_days&&jQuery(endpicker).datepicker("option","maxDate",checkin_days),jQuery(endpicker).datepicker("option","minDate",nts),setTimeout(function(){jQuery(endpicker).datepicker("show")},0))}))}loadDatePicker(jQuery(".datepicker-input")),jQuery(".datepicker-input").click(function(){("search_start_date"==jQuery(this).attr("id")?jQuery("#search_start_date"):jQuery("#search_end_date")).datepicker("show")}),setTimeout(function(){var count;"slick"in $.fn&&"function"==typeof $.fn.slick&&(3<=(count=jQuery(".slider").children().length)?(count=3,jQuery(".slider").addClass("triple_slide")):(count=2,jQuery(".slider").addClass("double_slide")),jQuery(".slider").slick({centerMode:!1,centerPadding:"60px",slidesToShow:count,slidesToScroll:1,infinite:!1,responsive:[{breakpoint:991,settings:{centerMode:!0,centerPadding:"40px",slidesToShow:2}},{breakpoint:700,settings:{centerMode:!0,centerPadding:"40px",slidesToShow:1}}]})),jQuery(document).find(".controls .scrollLeft").click(function(){jQuery(document).find(".slick-prev.slick-arrow").click(),jQuery(document).find(".slick-prev.slick-arrow").hasClass("slick-disabled")?jQuery(this).addClass("slick-disabled"):(jQuery(this).removeClass("slick-disabled"),jQuery(".controls .scrollRight").removeClass("slick-disabled"),jQuery(".slick-next.slick-arrow.slick-disabled").removeClass("slick-disabled"))}),jQuery(document).find(".controls .scrollRight").click(function(){jQuery(document).find(".slick-next.slick-arrow").click(),jQuery(document).find(".slick-next.slick-arrow").hasClass("slick-disabled")?jQuery(this).addClass("slick-disabled"):(jQuery(this).removeClass("slick-disabled"),jQuery(".controls .scrollLeft").removeClass("slick-disabled"),jQuery(".slick-prev.slick-arrow.slick-disabled").removeClass("slick-disabled"))})},3e3),jQuery(".js-calendarBtn").on("click",function(event){event.preventDefault(),jQuery(this).parents(".form-group").find(".hasDatepicker").focus()}),jQuery("#slider-range").slider({range:!0,min:0,max:500,values:[75,300],slide:function(event,ui){jQuery("#amount").val("$"+ui.values[0]+" - $"+ui.values[1])}}),jQuery("#amount").val("$"+jQuery("#slider-range").slider("values",0)+" - $"+jQuery("#slider-range").slider("values",1)),jQuery("#collapseFilters").on("shown.bs.collapse",function(){jQuery("#btn-collapse span").html("Hide filters")}),jQuery("#collapseFilters").on("hidden.bs.collapse",function(){jQuery("#btn-collapse span").html("Show more filters")}),jQuery(".btn-mobile-details").click(function(){var target=jQuery(this).attr("href"),is_mobile_visible;
1return"false"==String(jQuery(target).data("visible"))?(jQuery(target).css("display","block"),jQuery(target).data("visible","true"),jQuery(this).html("Hide details")):(jQuery(target).css("display","none"),jQuery(target).data("visible","false"),jQuery(this).html("See more details")),!1}),jQuery(document).on("click",".btn-price-breakdown",function(){return jQuery(".breakdown-days-hidden").each(function(){0==jQuery(this).data("visible")?(jQuery(this).css("display","table-row"),jQuery(this).data("visible",!0),jQuery(".btn-price-breakdown span").html("Hide Breakdown"),jQuery(".btn-price-breakdown i").removeClass("glyphicon-menu-down").addClass("glyphicon-menu-up")):(jQuery(this).css("display","none"),jQuery(this).data("visible",!1),jQuery(".btn-price-breakdown span").html("View Breakdown"),jQuery(".btn-price-breakdown i").removeClass("glyphicon-menu-up").addClass("glyphicon-menu-down"))}),!1}),jQuery(document).on("click",".btn-taxes-breakdown",function(){return jQuery(".breakdown-taxes-hidden").each(function(){0==jQuery(this).data("visible")?(jQuery(this).css("display","table-row"),jQuery(this).data("visible",!0),jQuery(".btn-taxes-breakdown span").html("Hide Breakdown"),jQuery(".btn-taxes-breakdown i").removeClass("glyphicon-menu-down").addClass("glyphicon-menu-up")):(jQuery(this).css("display","none"),jQuery(this).data("visible",!1),jQuery(".btn-taxes-breakdown span").html("View Breakdown"),jQuery(".btn-taxes-breakdown i").removeClass("glyphicon-menu-up").addClass("glyphicon-menu-down"))}),!1}),jQuery(document).on("click",".btn-fees-breakdown",function(){return jQuery(".breakdown-fees-hidden").each(function(){0==jQuery(this).data("visible")?(jQuery(this).css("display","table-row"),jQuery(this).data("visible",!0),jQuery(".btn-fees-breakdown span").html("Hide Breakdown"),jQuery(".btn-fees-breakdown i").removeClass("glyphicon-menu-down").addClass("glyphicon-menu-up")):(jQuery(this).css("display","none"),jQuery(this).data("visible",!1),jQuery(".btn-fees-breakdown span").html("View Breakdown"),jQuery(".btn-fees-breakdown i").removeClass("glyphicon-menu-up").addClass("glyphicon-menu-down"))}),!1})});var compareElem=jQuery(".js-compareElem");compareElem.length&&jQuery(window).scroll(function(){var compareElemPosition=compareElem.offset(),compareElemHeight=compareElem.height(),compareBar=jQuery("#compareBar"),compareBarSlideOffset=10;compareElem=jQuery(".js-compareElem"),767<jQuery(window).width()&&(jQuery(window).scrollTop()>compareElemPosition.top+compareElemHeight+10?compareBar.addClass("is-sticky"):compareBar.removeClass("is-sticky"))})})(jQuery),"320"<jQuery(window).width()&&(jQuery(document).ready(function(){jQuery("#resortpro_sw_destination,#resortpro_sw_lodging_unit.autocomplete,#resortpro_sw_lodging_code.autocomplete").addClass("chosen-select-deselect");var config={".chosen-select":{},".chosen-select-deselect":{allow_single_deselect:!0,search_contains:!0},".chosen-select-no-single":{disable_search_threshold:10},".chosen-select-no-results":{no_results_text:"Oops, nothing found!"},".chosen-select-width":{width:"100%"}},selector;for(selector in config)jQuery(selector).chosen(config[selector])}),jQuery(document).ready(function(){jQuery(".chosen-search").on("touchstart",function(e){e.stopPropagation()}),jQuery(".chosen-search").on("click",function(e){e.stopPropagation(),jQuery(".chosen-results").toggleClass("selected_chosen_results"),jQuery(".chosen-single").hide()}),jQuery(window).click(function(){jQuery(".chosen-results").removeClass("selected_chosen_results"),jQuery(".chosen-single").show()}),jQuery(document).on("touchstart",".chosen-results.selected_chosen_results",function(e){e.stopPropagation(),jQuery(".chosen-results").removeClass("selected_chosen_results"),jQuery(".chosen-single").show()}),jQuery(".chosen-container").on("click",function(e){e.stopPropagation(),jQuery(".chosen-results").removeClass("selected_chosen_results"),jQuery(".chosen-single").show()})})),function(){var $,AbstractChosen,Chosen,SelectParser,_ref,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent)__hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},SelectParser=(()=>{function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(child){return"OPTGROUP"===child.nodeName.toUpperCase()?this.add_group(child):this.add_option(child)},SelectParser.prototype.add_group=function(group){var group_position,option,_i,_len,_ref,_results,group_position=this.parsed.length;for(this.parsed.push({array_index:group_position,group:!0,label:this.escapeExpression(group.label),title:group.title||void 0,children:0,disabled:group.disabled,classes:group.className}),_results=[],_i=0,_len=(_ref=group.childNodes).length;_i<_len;_i++)option=_ref[_i],_results.push(this.add_option(option,group_position,group.disabled));return _results},SelectParser.prototype.add_option=function(option,group_position,group_disabled){if("OPTION"===option.nodeName.toUpperCase())return""!==option.text?(null!=group_position&&(this.parsed[group_position].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,title:option.title||void 0,selected:option.selected,disabled:!0===group_disabled?group_disabled:option.disabled,group_array_index:group_position,group_label:null!=group_position?this.parsed[group_position].label:null,classes:option.className,style:option.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},SelectParser.prototype.escapeExpression=function(text){var map,unsafe_chars;return null==text||!1===text?"":/[\&\<\>\"\'\`]/.test(text)?(map={"<":"<",">":">",'"':""","'":"'","`":"`"},text.replace(unsafe_chars=/&(?!\w+;)|[\<\>\"\'\`]/g,function(chr){return map[chr]||"&"})):text},SelectParser})();SelectParser.select_to_array=function(select){for(var child,parser,_i,_len,_ref,parser=new SelectParser,_ref=select.childNodes,_i=0,_len=_ref.length;_i<_len;_i++)child=_ref[_i],parser.add_node(child);return parser.parsed},AbstractChosen=(()=>{function AbstractChosen(form_field,options){this.form_field=form_field,this.options=null!=options?options:{},this.label_click_handler=__bind(this.label_click_handler,this),AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var _this=this;return this.click_test_action=function(evt){return _this.test_active_click(evt)},this.activate_action=function(evt){return _this.activate_field(evt)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_highlighted_by_user=!1,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(item){return this.include_group_label_in_selected&&null!=item.group_label?"<b class='group-name'>"+item.group_label+"</b>"+item.html:item.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(evt){var _this=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return _this.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(evt){var _this=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return _this.blur_test()},100)},AbstractChosen.prototype.label_click_handler=function(evt){return this.is_multiple?this.container_mousedown(evt):this.activate_field()},AbstractChosen.prototype.results_option_build=function(options){for(var content,data,data_content,shown_results,_i,_len,_ref,content="",shown_results=0,_ref=this.results_data,_i=0,_len=_ref.length;_i<_len&&((data_content="")!==(data_content=(data=_ref[_i]).group?this.result_add_group(data):this.result_add_option(data))&&(shown_results++,content+=data_content),null!=options&&options.first&&(data.selected&&this.is_multiple?this.choice_build(data):data.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(data))),!(shown_results>=this.max_shown_results));_i++);return content},AbstractChosen.prototype.result_add_option=function(option){var classes,option_el;return option.search_match&&this.include_option_in_results(option)?(classes=[],option.disabled||option.selected&&this.is_multiple||classes.push("active-result"),!option.disabled||option.selected&&this.is_multiple||classes.push("disabled-result"),option.selected&&classes.push("result-selected"),null!=option.group_array_index&&classes.push("group-option"),""!==option.classes&&classes.push(option.classes),(option_el=document.createElement("li")).className=classes.join(" "),option_el.style.cssText=option.style,option_el.setAttribute("data-option-array-index",option.array_index),option_el.innerHTML=option.search_text,option.title&&(option_el.title=option.title),this.outerHTML(option_el)):""},AbstractChosen.prototype.result_add_group=function(group){var classes,group_el;return(group.search_match||group.group_match)&&0<group.active_options?((classes=[]).push("group-result"),group.classes&&classes.push(group.classes),(group_el=document.createElement("li")).className=classes.join(" "),group_el.innerHTML=group.search_text,group.title&&(group_el.title=group.title),this.outerHTML(group_el)):""},AbstractChosen.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},AbstractChosen.prototype.reset_single_select_options=function(){for(var result,_i,_len,_ref,_results,_ref=this.results_data,_results=[],_i=0,_len=_ref.length;_i<_len;_i++)(result=_ref[_i]).selected?_results.push(result.selected=!1):_results.push(void 0);return _results},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(evt){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var escapedSearchText,highlightRegex,option,regex,results,results_group,searchText,startpos,text,_i,_len,_ref;for(this.no_results_clear(),results=0,escapedSearchText=(searchText=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),regex=this.get_search_regex(escapedSearchText),highlightRegex=this.get_highlight_regex(escapedSearchText),_i=0,_len=(_ref=this.results_data).length;_i<_len;_i++)(option=_ref[_i]).search_match=!1,results_group=null,this.include_option_in_results(option)&&(option.group&&(option.group_match=!1,option.active_options=0),null!=option.group_array_index&&this.results_data[option.group_array_index]&&(0===(results_group=this.results_data[option.group_array_index]).active_options&&results_group.search_match&&(results+=1),results_group.active_options+=1),option.search_text=option.group?option.label:option.html,option.group&&!this.group_search||(option.search_match=this.search_string_match(option.search_text,regex),option.search_match&&!option.group&&(results+=1),option.search_match?(searchText.length&&(startpos=option.search_text.search(highlightRegex),text=option.search_text.substr(0,startpos+searchText.length)+"</em>"+option.search_text.substr(startpos+searchText.length),option.search_text=text.substr(0,startpos)+"<em>"+text.substr(startpos)),null!=results_group&&(results_group.group_match=!0)):null!=option.group_array_index&&this.results_data[option.group_array_index].search_match&&(option.search_match=!0)));return this.result_highlighted_by_user=!1,this.result_clear_highlight(),results<1&&searchText.length?(this.update_results_content(""),this.no_results(searchText)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(escaped_search_string){var regex_anchor,regex_flag,regex_anchor=this.search_contains?"":"^",regex_flag=this.case_sensitive_search?"":"i";return new RegExp(regex_anchor+escaped_search_string,regex_flag)},AbstractChosen.prototype.get_highlight_regex=function(escaped_search_string){var regex_anchor,regex_flag,regex_anchor=this.search_contains?"":"\\b",regex_flag=this.case_sensitive_search?"":"i";return new RegExp(regex_anchor+escaped_search_string,regex_flag)},AbstractChosen.prototype.search_string_match=function(search_string,regex){var part,parts,_i,_len;if(regex.test(search_string))return!0;
1if(this.enable_split_word_search&&(0<=search_string.indexOf(" ")||0===search_string.indexOf("["))&&(parts=search_string.replace(/\[|\]/g,"").split(" ")).length)for(_i=0,_len=parts.length;_i<_len;_i++)if(part=parts[_i],regex.test(part))return!0},AbstractChosen.prototype.choices_count=function(){var option,_i,_len,_ref;if(null==this.selected_option_count)for(_i=this.selected_option_count=0,_len=(_ref=this.form_field.options).length;_i<_len;_i++)(option=_ref[_i]).selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(evt){if(evt.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},AbstractChosen.prototype.keydown_checker=function(evt){var _ref,_ref,_ref=null!=(_ref=evt.which)?_ref:evt.keyCode;switch(this.search_field_scale(),8!==_ref&&this.pending_backstroke&&this.clear_backstroke(),_ref){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(evt),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&evt.preventDefault();break;case 32:this.disable_search&&evt.preventDefault();break;case 38:evt.preventDefault(),this.keyup_arrow();break;case 40:evt.preventDefault(),this.keydown_arrow()}},AbstractChosen.prototype.keyup_checker=function(evt){var _ref,_ref,_ref=null!=(_ref=evt.which)?_ref:evt.keyCode;switch(this.search_field_scale(),_ref){case 8:this.is_multiple&&this.backstroke_length<1&&0<this.choices_count()?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:evt.preventDefault(),this.result_highlight&&this.result_highlighted_by_user&&this.result_select(evt),this.trigger_search(evt);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(evt){var _this=this;if(!this.is_disabled)return setTimeout(function(){return _this.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(option){return!(this.is_multiple&&!this.display_selected_options&&option.selected||!this.display_disabled_options&&option.disabled||option.empty)},AbstractChosen.prototype.search_results_touchstart=function(evt){return this.touch_started=!0,this.search_results_mouseover(evt)},AbstractChosen.prototype.search_results_touchmove=function(evt){return this.touch_started=!1,this.search_results_mouseout(evt)},AbstractChosen.prototype.search_results_touchend=function(evt){if(this.touch_started)return this.search_results_mouseup(evt)},AbstractChosen.prototype.outerHTML=function(element){var tmp;return element.outerHTML||((tmp=document.createElement("div")).appendChild(element),tmp.innerHTML)},AbstractChosen.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default" autocomplete="false">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input name="chosen-search-input" class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="false" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_no_results_html=function(terms){return'<li class="no-results">\n '+this.results_none_found+" <span>"+terms+"</span>\n</li>"},AbstractChosen.browser_is_supported=function(){return!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen})(),($=jQuery).fn.extend({chosen:function(options){return AbstractChosen.browser_is_supported()?this.each(function(input_field){var $this,chosen,$this=jQuery(this),chosen=$this.data("chosen");"destroy"===options?chosen instanceof Chosen&&chosen.destroy():chosen instanceof Chosen||$this.data("chosen",new Chosen(this,options))}):this}}),Chosen=(_super=>{function Chosen(){return _ref=Chosen.__super__.constructor.apply(this,arguments)}return __extends(Chosen,_super),Chosen.prototype.setup=function(){return this.form_field_jq=jQuery(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex}
vendor: 5,120 bytes, line 1
1,Chosen.prototype.set_up_html=function(){var container_classes,container_classes,container_classes=["chosen-container"];return container_classes.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&container_classes.push(this.form_field.className),this.is_rtl&&container_classes.push("chosen-rtl"),container_classes={class:container_classes.join(" "),title:this.form_field.title},this.form_field.id.length&&(container_classes.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=jQuery("<div />",container_classes),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var _this=this;return this.container.bind("touchstart.chosen",function(evt){_this.container_mousedown(evt)}),this.container.bind("touchend.chosen",function(evt){_this.container_mouseup(evt)}),this.container.bind("mousedown.chosen",function(evt){_this.container_mousedown(evt)}),this.container.bind("mouseup.chosen",function(evt){_this.container_mouseup(evt)}),this.container.bind("mouseenter.chosen",function(evt){_this.mouse_enter(evt)}),this.container.bind("mouseleave.chosen",function(evt){_this.mouse_leave(evt)}),this.search_results.bind("mouseup.chosen",function(evt){_this.search_results_mouseup(evt)}),this.search_results.bind("mouseover.chosen",function(evt){_this.search_results_mouseover(evt)}),this.search_results.bind("mouseout.chosen",function(evt){_this.search_results_mouseout(evt)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(evt){_this.search_results_mousewheel(evt)}),this.search_results.bind("touchstart.chosen",function(evt){_this.search_results_touchstart(evt)}),this.search_results.bind("touchmove.chosen",function(evt){_this.search_results_touchmove(evt)}),this.search_results.bind("touchend.chosen",function(evt){_this.search_results_touchend(evt)}),this.form_field_jq.bind("chosen:updated.chosen",function(evt){_this.results_update_field(evt)}),this.form_field_jq.bind("chosen:activate.chosen",function(evt){_this.activate_field(evt)}),this.form_field_jq.bind("chosen:open.chosen",function(evt){_this.container_mousedown(evt)}),this.form_field_jq.bind("chosen:close.chosen",function(evt){_this.close_field(evt)}),this.search_field.bind("blur.chosen",function(evt){_this.input_blur(evt)}),this.search_field.bind("keyup.chosen",function(evt){_this.keyup_checker(evt)}),this.search_field.bind("keydown.chosen",function(evt){_this.keydown_checker(evt)}),this.search_field.bind("focus.chosen",function(evt){_this.input_focus(evt)}),this.search_field.bind("cut.chosen",function(evt){_this.clipboard_event_checker(evt)}),this.search_field.bind("paste.chosen",function(evt){_this.clipboard_event_checker(evt)}),this.is_multiple?this.search_choices.bind("click.chosen",function(evt){_this.choices_click(evt)}):this.container.bind("click.chosen",function(evt){evt.preventDefault()})},Chosen.prototype.destroy=function(){return jQuery(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),0<this.form_field_label.length&&this.form_field_label.unbind("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_field)},Chosen.prototype.container_mousedown=function(evt){var _ref1;if(!this.is_disabled)return!evt||"mousedown"!==(_ref1=evt.type)&&"touchstart"!==_ref1||this.results_showing||evt.preventDefault(),null!=evt&&jQuery(evt.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!evt||jQuery(evt.target)[0]!==this.selected_item[0]&&!jQuery(evt.target).parents("a.chosen-single").length||(evt.preventDefault(),this.results_toggle(
1)):(this.is_multiple&&this.search_field.val(""),jQuery(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(evt){if("ABBR"===evt.target.nodeName&&!this.is_disabled)return this.results_reset(evt)},Chosen.prototype.search_results_mousewheel=function(evt){var delta;if(null!=(delta=evt.originalEvent?evt.originalEvent.deltaY||-evt.originalEvent.wheelDelta||evt.originalEvent.detail:delta))return evt.preventDefault(),"DOMMouseScroll"===evt.type&&(delta*=40),this.search_results.scrollTop(delta+this.search_results.scrollTop())},Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},Chosen.prototype.close_field=function(){return jQuery(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.search_field_scale(),this.search_field.blur()},Chosen.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(evt){var evt,evt=jQuery(evt.target).closest(".chosen-container");return evt.length&&this.container[0]===evt[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.is_multiple,this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,el,visible_bottom,visible_top;if(el.length)return this.result_clear_highlight(),this.result_highlight=el,this.result_highlight.addClass("highlighted"),(visible_bottom=(el=parseInt(this.search_results.css("maxHeight"),10))+(visible_top=this.search_results.scrollTop()))<=(high_bottom=(high_top=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())?this.search_results.scrollTop(0<high_bottom-el?high_bottom-el:0):high_top<visible_top?this.search_results.scrollTop(high_top):void 0},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(content){return this.search_results.html(content)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(el){var ti;if(this.form_field.tabIndex)return ti=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=ti},Chosen.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=jQuery("label[for='"+this.form_field.id+"']")),0<this.form_field_label.length)return this.form_field_label.bind("click.chosen",this.label_click_handler)},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(evt){var target,target=jQuery(evt.target).hasClass("active-result")?jQuery(evt.target):jQuery(evt.target).parents(".active-result").first();if(target.length)return this.result_do_highlight(target),this.result_highlighted_by_user=!0,this.result_select(evt),this.trigger_search(evt)},Chosen.prototype.search_results_mouseover=function(evt){},Chosen.prototype.search_results_mouseout=function(evt){if(jQuery(evt.target).hasClass("active-result"))return this.result_clear_highlight()},Chosen.prototype.choice_build=function(item){var choice,item,_this=this,choice=jQuery("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(item)+"</span>");return item.disabled?choice.addClass("search-choice-disabled"):((item=jQuery("<a />",{class:"search-choice-close","data-option-array-index":item.array_index})).on("click.chosen",function(evt){return _this.choice_destroy_link_click(evt)}),choice.append(item)),this.search_container.before(choice)},Chosen.prototype.choice_destroy_link_click=function(evt){if(evt.preventDefault(),evt.stopPropagation(),!this.is_disabled)return this.choice_destroy(jQuery(evt.target))},Chosen.prototype.choice_destroy=function(link){if(this.result_deselect(link[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&0<this.choices_count()&&this.get_search_field_value().length<1&&this.results_hide(),link.parents("li").first().remove(),this.search_field_scale()},Chosen.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(evt){var high,high;if(this.result_highlight)return high=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?high.removeClass("active-result"):this.reset_single_select_options(),high.addClass("result-selected"),(high=this.results_data[high[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[high.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(high):this.single_set_selected_text(this.choice_label(high)),this.is_multiple&&(!this.hide_results_on_select||evt.metaKey||evt.ctrlKey)||(this.results_hide(),this.show_search_field_default()),!this.is_multiple&&this.form_field.selectedIndex===this.current_selectedIndex||this.trigger_form_field_change({selected:this.form_field.options[high.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,evt.preventDefault(),this.search_field_scale())},Chosen.prototype.single_set_selected_text=function(text){return(text=null==text?this.default_text:text)===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(text)},Chosen.prototype.result_deselect=function(pos){var pos,pos=this.results_data[pos];return!this.form_field.options[pos.options_index].disabled&&(pos.selected=!1,this.form_field.options[pos.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[pos.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},Chosen.prototype.get_search_field_value=function(){return this.search_field.val()},Chosen.prototype.get_search_text=function(){return this.escape_html($.trim(this.get_search_field_value()))},Chosen.prototype.escape_html=function(text){return jQuery("<div/>").text(text).html()},Chosen.prototype.winnow_results_set_highlight=function(){var selected_results,selected_results,selected_results=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),selected_results=(selected_results.length?selected_results:this.search_results.find(".active-result")).first();if(null!=selected_results)return this.result_do_highlight(selected_results)},Chosen.prototype.no_results=function(terms){var terms,terms=this.get_no_results_html(terms);return this.search_results.append(terms),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var next_sib;return this.results_showing&&this.result_highlight?(next_sib=this.result_highlight.nextAll("li.active-result").first())?(this.result_highlighted_by_user=!0,this.result_do_highlight(next_sib)):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var prev_sibs;return this.results_showing||this.is_multiple?this.result_highlight?(prev_sibs=this.result_highlight.prevAll("li.active-result")).length?(this.result_highlighted_by_user=!0,this.result_do_highlight(prev_sibs.first())):(0<this.choices_count()&&this.results_hide(),this.result_highlighted_by_user=!1,this.result_clear_highlight()):void 0:this.results_show()},Chosen.prototype.trigger_search=function(evt){var searchText,searchText,searchText=$.trim(this.get_search_field_value());return this.result_highlighted_by_user||!searchText.length||this.is_multiple||(this.reset_single_select_options(),0<this.form_field.options.length&&(this.form_field.options[0].selected=!0),this.single_set_selected_text(),this.current_selectedIndex=this.form_field.selectedIndex),this.results_hide(),(searchText=this.form_field_jq.closest("form")).length&&searchText.trigger("submit"),evt.preventDefault()},Chosen.prototype.keydown_backstroke=function(){var next_available_destroy;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(next_available_destroy=this.search_container.siblings("li.search-choice").last()).length&&!next_available_destroy.hasClass("search-choice-disabled")?(this.pending_backstroke=next_available_destroy,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.search_field_scale=function(){var div,div,style,style_block,styles,width,_i,_len;if(this.is_multiple){for(style_block={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},_i=0,_len=(styles=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;_i<_len;_i++)style_block[style=styles[_i]]=this.search_field.css(style);return(div=jQuery("<div />").css(style_block)).text(this.get_search_field_value()),jQuery("body").append(div),width=div.width()+25,div.remove(),div=this.container.outerWidth(),width=Math.min(div-10,width),this.search_field.width(width)}},Chosen.prototype.trigger_form_field_change=function(extra){return this.form_field_jq.trigger("input",extra),this.form_field_jq.trigger("change",extra)},Chosen})(AbstractChosen)}.call(this),jQuery(document).ready(function(){0<jQuery(".top_city_items_container .destination_itm:nth-child(11)").length?jQuery(".r_more_top_cities").on("click",function(){"block"==jQuery(".top_city_items_container .destination_itm:nth-child(11)").css("display")?(jQuery(".top_city_items_container .destination_itm").css("display","none"),jQuery(".top_city_items_container .destination_itm:nth-child(-n+10)").css("display","block"),jQuery(this).html('View More Cities <i class="fa fa-angle-down"></i>')):(jQuery(".top_city_items_container .destination_itm").css("display","block"),jQuery(this).html('View Less Cities <i class="fa fa-angle-up"></i>'))}):jQuery(".r_more_top_cities").remove(),0<jQuery(".top_destinations_items_container .destination_itm:nth-child(11)").length?jQuery(".r_more_top_destination").on("click",function(){"block"==jQuery(".top_destinations_items_container .destination_itm:nth-child(11)").css("display")?(jQuery(".top_destinations_items_container .destination_itm").css("display","none"),jQuery(".top_destinations_items_container .destination_itm:nth-child(-n+10)").css("display","block"),jQuery(this).html('View More Destinations <i class="fa fa-angle-down"></i>')):(jQuery(".top_destinations_items_container .destination_itm").css("display","block"),jQuery(this).html('View Less Destinations <i class="fa fa-angle-up"></i>'))}):jQuery(".r_more_top_destination").remove(),jQuery(".streamshare_global_template")[0]&&(jQuery(".page-template-default").addClass("page-template-streamshare-global"),jQuery("#contentarea").addClass("ss_template"))}),jQuery(document).ready(function(){let results=[];jQuery(".chosen-results").each(function(){results.push(jQuery(this).text())}),jQuery(window).width()<"767"&&"function"==typeof jQuery.fn.select2&&jQuery(".modal_search #resortpro_sw_lodging_unit.autocomplete").length&&(jQuery(".modal_search #resortpro_sw_lodging_unit.autocomplete").select2({width:"100%",dropdownAutoWidth:!0,closeOnSelect:!0,placeholder:"Type Unit Name...",minimumInputLength:1,data:results.map(function(text){return{id:text,text:text}}),dropdownParent:jQuery(".modal_search"),touchSelection:!0,dropdownCssClass:"mobile-dropdown",selectionCssClass:"mobile-selection"}),jQuery(document).on("touchstart",".select2-container",function(e){e.stopPropagation()}),jQuery(document).on("scroll",function(){jQuery(".select2-dropdown").is(":visible")&&jQuery(".select2-dropdown").position({my:"left bottom",at:"left bottom",of:jQuery(".select2-container"),collision:"none"})}))});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.