window.hzmr = window.hzmr || [];
/************* Start jmoduleLoader.js for locale en-US **************/
try {HZ.utils.loadJukwaaModule=function(t,e){HZ.utils.StylesheetLoader.load(t.css),t.ctx&&(HZ.ctx=$.extend(!0,{},HZ.ctx,t.ctx),HZ.ctx.rid=HZ.utils.Logger&&HZ.utils.Logger.pageRequestId?HZ.utils.Logger.pageRequestId:null),HZ.utils.ScriptLoader.load(t.js,e,!0)};

window.hzmr.push("jmoduleLoader:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jmoduleLoader.js  **************/
/************* Start consents.js for locale en-US **************/
try {HZ.ns("HZ.modules.Consents"),HZ.modules.Consents=new function(){var s=this;this.init=function(n){this.setSensitiveActionFlags((n=n||{}).saf||0),this.setConsentCountryCode(n.consentCountryCode||""),this.setConsentLanguageCode(n.consentLanguageCode||""),n.showVisitorBanner&&this.fetchWebModule()},this.setConsentLanguageCode=function(n){this.consentLanguageCode=n},this.getConsentLanguageCode=function(){return this.consentLanguageCode},this.setConsentCountryCode=function(n){this.consentCountryCode=n},this.getConsentCountryCode=function(){return this.consentCountryCode},this.setSensitiveActionFlags=function(n){this.sensitiveActionFlags=n},this.getSensitiveActionFlags=function(){return this.sensitiveActionFlags},this.assertSensitiveActions=function(n){var e=[];if(n&&n.length)for(var t=0;t<n.length;t++)s.assertSensitiveAction(n[t])||e.push(n[t]);return e},this.assertSensitiveAction=function(n){return!!(parseInt(n,10)&this.getSensitiveActionFlags())},this.registerConsents=function(n){return this.handleConsentAjax("submitConsents",n).then(function(n){n&&n.sensitiveActionFlags&&s.setSensitiveActionFlags(n.sensitiveActionFlags)},function(){})},this.getConsentsForUserTypes=function(n){return this.handleConsentAjax("getConsentsForUserTypes",n)},this.getConsentsForSensitiveActions=function(n){return this.handleConsentAjax("getConsentsForSensitiveActions",n)},this.handleConsentAjax=function(e,n,t){n={action:e,c2:1,consentsData:n};return"j"===HZ.utils.Logger.env?n._csrf=HZ.data.CSRFToken:n.__ct=HZ.data.CSRFToken,t&&t.webModuleRequest&&(n.wm=1),$.ajax({url:n.wm?"/j/ajax/consentsWebModule":"/j/ajax/consents",method:"POST",data:n}).done(function(n){return n}).fail(function(n){console.error(n),HZ.utils&&HZ.utils.Logger&&HZ.utils.Logger.logCountInTSDB&&HZ.utils.Logger.logCountInTSDB("tracking","consent_ajax_error_"+e)})},this.fetchWebModule=function(){return this.handleConsentAjax(null,null,{webModuleRequest:!0}).then(function(n){HZ.utils.loadJukwaaModule(n,s.loadModule)})},this.loadModule=function(){var n,e;HZ&&HZ.WebModule&&(e="consentsWebModule",n=document.getElementById("hz-consents"),HZ.WebModule.render(e,n,{isPageReloadRequired:!0}),e=HZ.WebModule.getModule(e),s.webModule=new e)}};

window.hzmr.push("consents:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End consents.js  **************/
/************* Start saleGalleriesModule.js for locale en-US **************/
try {HZ.ns("HZ.modules.SaleGalleriesModule"),HZ.modules.SaleGalleriesModule=new function(){var l,a=this;this.moduleName="saleGalleriesModule",this.init=function(e){l=e,$.ajax({url:"/j/saleGalleriesModule",method:"POST",data:{__ct:HZ.data.CSRFToken}}).done(function(e){HZ.utils.loadJukwaaModule(e,a.loadModule)})},this.loadModule=function(){HZ&&HZ.WebModule&&a.renderToContainer()},this.renderToContainer=function(){var e="hz-sale-galleries-from-prismic";!l||0<l.find("."+e).length||(e=$("<div>").addClass(e),l.append(e),HZ.WebModule.render(a.moduleName,e[0],{}))}};

window.hzmr.push("saleGalleriesModule:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End saleGalleriesModule.js  **************/
/************* Start filterRenderer.js for locale en-US **************/
try {HZ.navigation.Utils=new function(){function e(e){e.stopPropagation();var t=$(e.target).closest(".sidebar"),i=$(t).find(".sidebar-header .toggle"),o=$(t).find(".sidebar-body"),e=Math.floor(o.height()/200*300),e=Math.min(e,800);i.hasClass("more-icon")?(i.addClass("down-icon").removeClass("more-icon"),o.slideDown(e,function(){t.removeClass("state-collapsed")})):i.hasClass("down-icon")&&(i.addClass("more-icon").removeClass("down-icon"),o.slideUp(e,function(){t.addClass("state-collapsed")}))}this.expandBox=function(e){$("#"+e+" .hidden").removeClass("hidden"),$("#"+e+"More").hide()},this.handleMetroAreaChanged=function(e){var t=document.getElementById("metroAreaSelector"),e=e,t=""!==(t=t.options[t.selectedIndex].value)?"/"+t:"";0<e.indexOf("/_3_")?e=e.replace("/_3_",t):0<e.indexOf("/_19_")?e=e.replace("/_19_",t):e+=t,document.location=e},this.handlePriceFilterChanged=function(e,t){var i=e?$(e.target):$(this).parents(".price-filter-form"),e=i.find(".fromPrice").val(),i=i.find(".toPrice").val();""!=e&&!$.isNumeric(e)||""!=i&&!$.isNumeric(i)||""!=e&&""!=i&&(e=parseInt(e,10),(i=parseInt(i,10))<e)?window.location.reload():(e=Math.max(0,e),""!=i&&(i=Math.max(0,i)),document.location=t.replace(/XXXXX/,e).replace(/YYYYY/,i))},this.attachTickBudgetBox=function(){$(document).ready(function(){$(".filter-budget").on("click","li",function(e){e=$(e.currentTarget);e.hasClass("selected")?e.removeClass("selected"):(e.addClass("selected"),e.siblings().removeClass("selected"))})})},this.attachMultiSelectionToList=function(){$(document).ready(function(){$(".multiselect").on("click","a",function(e){e=$(e.currentTarget).parent(".sidebar-item");e.hasClass("selected")?e.removeClass("selected"):e.addClass("selected")})})},this.initSidebarToggle=function(){$(document).ready(function(){$(".sidebar-header").click(e),$(".sidebar-header .toggle").click(e),$(".sidebar-icon.info-icon").hover(function(){var e=$(this);e.tipBubble({content:e.attr("tooltip-data"),id:"sidebar-tooltip",width:100,offsetX:5,offsetY:16,borderColor:"#ccc",showCloseBtn:!1,position:"absolute",attachTo:"body",fadeDuration:0})},function(){$(this).tipBubble("hide")})})},this.init=function(){this.initSidebarToggle(),this.attachMultiSelectionToList()}};

window.hzmr.push("filterRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End filterRenderer.js  **************/
/************* Start hzGtm.js for locale en-US **************/
try {HZ.ns("HZ.utils"),HZ.utils.Gtm=new function(){var e={enabled:!1,visitMonth:null,refId:null},i=null;this.init=function(t){i=$.extend({},e,t)},this.pushData=function(t,e,n){var a;i.enabled&&(e=e||t,(a={}).event=t,a.ecomm_pagetype=e,a.visit_month=i.visitMonth,i.refId?a.m_refid=i.refId:a.m_refid="",n&&$.extend(a,n),"undefined"==typeof dataLayer&&(dataLayer=[]),dataLayer.push(a),HZ.utils.Logger.logCountInTSDB("gtm_data",t+"."+e,1,"data"))}};

window.hzmr.push("hzGtm:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End hzGtm.js  **************/
/************* Start standardFooter.js for locale en-US **************/
try {$(document).ready(function(){var t=$("#siteSelector");t.length&&t.on("change",function(){var t=$(this).find(":selected"),e=t.attr("objid"),t=t.text(),t={scopeId:"site-redirection-footer",compId:"standard-footer",objId:e,currentSiteId:HZ.utils.Config.currentSiteId,anchorText:t};HZ.utils.Logger.sendEventLogLightweight(HZ.utils.Logger.EVENT_TYPE_USER_CLICK,t)}),$(".footer-global-site").on("click",function(t){t.preventDefault(),t.stopPropagation();t=$(this).data("params");t&&HZ.utils.Html.postToUrl(t.actionUrl,t.params)})});

window.hzmr.push("standardFooter:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End standardFooter.js  **************/
/************* Start scrollToTop.js for locale en-US **************/
try {HZ.ns("HZ.StickyFooterActions"),HZ.StickyFooterActions=function(){},HZ.StickyFooterActions.prototype={init:function(o){this.el=document.getElementById("stickyFooterActions"),this.$el=$(this.el),this.attachEvents(),this.currentScrollPosition=$(window).scrollTop(),350<this.currentScrollPosition&&this.$el.removeClass("hide-actions")},attachEvents:function(){$(window).on("scroll.stickyFooterActions",$.throttle(250,this.handleScroll.bind(this)))},detachEvents:function(){$(window).off(".stickyFooterActions")},handleScroll:function(o){var t=$(window).scrollTop();t>this.currentScrollPosition&&350<t?this.$el.removeClass("hide-actions"):t<=350&&this.$el.addClass("hide-actions"),this.currentScrollPosition=t}},HZ.ns("HZ.modules.ScrollToTop"),HZ.modules.ScrollToTop=function(){function o(o){$("body,html").animate({scrollTop:0},500,"swing")}function t(){var o=!0;if(n||0!==n.length){var t=document.body.clientHeight,i=document.body.scrollHeight;return i&&i/t<1.5?(n.hide(),o=!1):n.show(),o}}var n;return $(document).ready(function(){(n=$("#ScrollToTopContainer")).on("click",o),n.hasClass("show-action")||t()||window.setTimeout(t,2500)}),this}();

window.hzmr.push("scrollToTop:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End scrollToTop.js  **************/
/************* Start cartActions.js for locale en-US **************/
try {HZ.ns("HZ.cart"),HZ.cart.Actions=new function(){var i=this,o=_hgt("Add item to cart"),n=_hgt("This item is not available. Please try again later.");function s(e){let a=e.orderSummary;if(e&&"true"===e.success){var t,s={hasaccount:HZ.data.CurrentSessionUser?"y":"n"};if(e.hid&&e.qty&&HZ.data.Spaces.get(e.hid)&&(t=HZ.data.Spaces.get(e.hid),s.ecomm_prodid="HZ_"+e.hid,t.amtRaw&&(s.ecomm_pvalue=Math.round(t.amtRaw*e.qty*100)/100,s.ecomm_currency=HZ.data.Currencies.get(t.cuid)),s.ecomm_cartvalue=e.cartvalue,s.ecomm_category=t.cat,s.q=e.qty,s.test_bucket=e.tb||""),HZ.utils.Gtm.pushData("cart_add","cart",s),e.cartHeaderHTML){HZ.ui.yamdi.Common.hideAllDialogs(),!HZ.data.CurrentSessionUser&&HZ.modules.signupDialog.isInlineSignup?HZ.modules.signupDialog.showDialog():(s=(t=e.message&&e.message.message)?e.message.message:_hgt("This item has been added to your cart."),t=t?e.message.title:"",HZ.ui.yamdi.Common.confirm(t,s,_hgt("Check Out Now"),function(){HZ.OmniLogAPI.checkoutFlowStarted(!1,a&&a.isAfterpayEligible,null,"Checkout Button","",a&&a.cartItemCount,a&&a.coupon,a&&a.total,a&&a.warranty,null,a&&a.numShipments),window.location.href=HZ.utils.Config.checkoutLaunchUrl},_hgt("Keep Shopping"))),i.broadcastCartUpdate(e);try{window.ga("send","event","MPFlow","cart_add")}catch(e){console.warn(e)}}else r(o,e.errorMessage||n)}else r(o,e.errorMessage||n)}function r(e,a){HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(e,a)}this.addItem=function(e,a,t){HZ.ui.yamdi.Common.loading(_hgt("Adding item to cart")),HZ.ajaz.Services.Cart.addItem(e,a,t,s)},this.subscribeCartUpdate=function(e,a){HZ.message.Bus.subscribe(HZ.message.Messages.CART_UPDATED,e,a)},this.broadcastCartUpdate=function(e){HZ.message.Bus.broadcast(HZ.message.Messages.CART_UPDATED,e)}};

window.hzmr.push("cartActions:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End cartActions.js  **************/
/************* Start signupDialog.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.signupDialog={signupDialog:null,dialogBody:null,dialogTitle:"",newUserUrl:null,existingUserUrl:HZ.utils.Config.checkoutLaunchUrl,isInlineSignup:!1,isCartPage:!1,controls:[],init:function(i){this.dialogTitle=i.dialogTitle,this.newUserUrl=i.newUserUrl,this.isInlineSignup=i.isInlineSignup,this.signupDialog=new HZ.ui.yamdi.Dialog},prepareDialog:function(){var i,s;this.dialogBody||(i=this.isCartPage?"<div id='header'><div id='vertical-logo'></div></div>":"",s=this.isCartPage?"<span id='dismissPreSignup' class='hzi-font hzi-CloseX pull-right'></span>":"",this.dialogBody=$(s+i+"<div id='body'><div id='newUserBtnContainer' class='button'><a id='newUserSignupBtn' class='btn btn-primary btn-lg btn-block' href='"+this.newUserUrl+"' compId='new-user-signup'><span class='btnText'>"+_hgt("New User Checkout")+"</span></a></div><div class='or-container'><span class='text'>OR</span></div><div id='existingUserBtnContainer' class='button'><a id='existingUserSignin' class='btn btn-lg btn-block btn-primary-outline' href='"+this.existingUserUrl+"' compId='existing-user-signin'><span class='btnText'>"+_hgt("Sign In")+"</span></a></div></div>"),this.isCartPage?this.dialogTitle="":(n=$("<a class='colorLink' href='javascript:;'>"+_hgt("Keep Shopping")+"<span class='more-icon'></span></a>").on("click",HZ.modules.signupDialog.cancelDialog),this.controls.push(n)));var n={title:this.dialogTitle,body:this.dialogBody,dialogClassName:"checkout-signup-dialog",controls:this.controls,onViewLoaded:function(){var i=$("#dismissPreSignup");i&&i.on("click",HZ.modules.signupDialog.cancelDialog)}};this.signupDialog.init(n)},cancelDialog:function(){HZ.ui.Yamdi.hide(this.signupDialog)},showDialog:function(){this.prepareDialog(),HZ.ui.Yamdi.show(this.signupDialog)}};

window.hzmr.push("signupDialog:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End signupDialog.js  **************/
/************* Start headerFreeShippingCallout.js for locale en-US **************/
try {HZ.ns("HZ.modules.HeaderFreeShippingCallout"),HZ.modules.HeaderFreeShippingCallout=new function(){var i,l,a,d=this;this.moduleName="freeShippingCalloutModule",this.init=function(e,n,o){a=e,i=n,l=o,$.ajax({url:"/j/freeShippingCalloutModule",method:"POST",data:{__ct:HZ.data.CSRFToken}}).done(function(e){HZ.utils.loadJukwaaModule(e,d.loadModule)})},this.loadModule=function(){HZ&&HZ.WebModule&&d.renderToContainer()},this.updateFreeShippingCalloutProps=function(e,n){i=e,l=n,HZ&&HZ.WebModule&&d.renderToContainer()},this.renderToContainer=function(){var e,n="hz-free-shipping-callout-module";!(a=$("#headerFreeShippingCallout"))||0<a.find("#headerFreeShippingCallout").length||(0<a.find("."+n).length?e=a.find("."+n):(e=$("<div>").addClass(n),a.append(e)),HZ.WebModule.render(d.moduleName,e[0],{cartValue:parseInt(i,10),isQualifiedForFreeShipping:l,shouldShowUnlockedMessage:!1}))}};

window.hzmr.push("headerFreeShippingCallout:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End headerFreeShippingCallout.js  **************/
/************* Start addToIdeabookDialog.js for locale en-US **************/
try {HZ.ns("HZ.spaceActions"),HZ.spaceActions.AddToIdeabookDialog=new function(){var r,n,v=1,m=4,d=7,b=8,f=10,y=11,i=[],c=!1,k=[],l=!1,s=!1,u=!1,S=null,I=null,h=null,g=null,w=null,p=null,C=null,H=null,T=null,Z=null,t=null,P=null,_=!0,x=!1,A=!1,L=!1,e=!1,D=[],G=[],E=null,z=null,O=!1,o=null,a=!1,j=_hgt("Photo Added"),M=!0,U=1,B=3,R="aticfp",N="aticlpw",F="atici",W="atictp",Y="atitm",V="atitb",K="aticcp";this.init=function(e){S=e},this.setColorPalette=function(e,a,t){I=e,h=a,g=t,j=_hgt("Palette Added")},this.setDelegate=function(e){t=e},this.setTrustPilotReview=function(e){A=e},this.setGalleries=function(e){var a;if(H={},(C=e).recent&&0<C.recent.length)for(var t in C.recent)a=C.recent[t],H[a.id]=a;if(C.own&&0<C.own.length)for(var t in C.own)a=C.own[t],H[a.id]=a;if(C.shared&&0<C.shared.length)for(var t in C.shared)a=C.shared[t],H[a.id]=a},this.setImageId=function(e){w=e},this.getGalleries=function(){return C},this.setUserName=function(e){0},this.setShowIdeabookConfirm=function(e){_=e},this.setWelcomeScreen=function(e){c=e},this.setLastGalleryId=function(e){T=e,H&&H[T]&&(E=H[T])},this.setWishListIdeabookId=function(e){0},this.getLastGalleryId=function(){return T},this.setDefaultGalleryTitle=function(e){0},this.setUserId=function(e){o=e},this.setOnSuccess=function(e){P=e},this.setMultipleSelection=function(e){M=e};function q(e){if(ke(""),O)return!1;var a=$("#newGalleryInput").val();return te(a),!1}function J(e){var a=$(this).val(),t=$(".create-gallery-btn");if(""==a?t.hide():t.show(),13===e.keyCode)return e.preventDefault(),e.stopPropagation(),!1}function Q(e){var a=$(this).val();if(13===e.keyCode)return e.preventDefault(),e.stopPropagation(),O||te(a),!1}function X(){$(this).toggleClass("selected"),n.checked=!n.checked}var ee=function(e){HZ.ui.AjaxThrobber.setInCall(!1),O=!1;var a,t=$(".create-gallery-btn"),o=$("#newGalleryInput");"true"==e.success?(a={title:e.galleryName,id:e.galleryId,isPrivate:e.isPrivate,isFeatured:e.isFeatured},se({title:a.title,id:a.id},$("#gallerySelectComboBox .own-galleries-list"),!0,!0,!0,!0),D.push(a),C.own.push(a),H[a.id]=a):ke(e.error),$("#newAddToMyGalleryForm").click(),t.hide(),o.val("")},ae=function(t){var o=null;return $.each(H,function(e,a){a.title&&a.title.toLowerCase()===t.toLowerCase()&&(o=e)}),o},te=function(e){var a;""!=e&&(null==(a=ae(e))?(O=!0,HZ.ui.AjaxThrobber.setInCall(!0),HZ.ajaz.Services.newGallery(e,"",!1,null,ee)):(z.comboSelect("hasOption",{value:a})&&(z.comboSelect("setHasTakenAction",{hasTakenAction:!0}),z.comboSelect("addAdditionalSelectedOptions",{value:a})),z.comboSelect("toggleDropdown")))};this.handleNewGalleryNameKeyupMobile=function(e){var a=$(".new-gallery"),t=a.find(".create-gallery");""==a.find("#newGalleryInput").val()?t.hide():t.show()},this.handleNewGalleryNameKeydownMobile=function(e){var a=$(".new-gallery"),t=a.find("#newGalleryInput"),o=t.val(),a=a.find(".create-gallery");e&&13==e.keyCode&&(e.preventDefault()&&e.stopPropagation(),O||(te(o),t.val(""),a.hide()))};this.getDialogTemplate=function(){var e=$("<div id='newAddToIdeabookDialog_0' style='display:none;'><div class='modal-header'>"+_hgt("Save to Ideabook")+"</div><div class='modal-body'><form id='newAddToMyGalleryForm' name='addToMyGalleryForm' action='javascript:;'><div class='chooseGallery form-horizontal row'><div class='addImageWrapper'><img class='dialogImage' src=''></div><div class='addRightContent'><div class='hzp-comboselect' id='gallerySelectComboBox'><div class='hzp-comboselect-trigger'><button class='btn btn-default btn-block dropdown-toggle hzp-comboselect-trigger-button'>"+_hgt("Select an ideabook")+"</button>"+(HZ.utils.Config.isResponsive?"<span class='hzi-font hzi-MH-Close close-comboselect-menu'></span>":"")+"</div><div class='hzp-comboselect-combo dropdown-menu'><div class='hzp-comboselect-search'><span class='hzp-comboselect-search-icon hzi-font hzi-Search'></span><input class='hzp-comboselect-search-input' type='text' autocomplete='off' /><div class='hzp-comboselect-no-result'>"+_hgt("Could not find any ideabooks matching search phrase")+"</div></div><div class='hzp-comboselect-select'><div class='own-galleries'><div class='gallery-group-name text-s text-dt-m text-bold mbs mtm'>"+_hgt("Your Ideabooks")+"</div><ul class='own-galleries-list list-unstyled'></ul></div><div class='shared-galleries'><div class='gallery-group-name text-s text-dt-m text-bold mbs mtm'>"+_hgt("Shared With You")+"</div><ul class='shared-galleries-list list-unstyled'></ul></div></div>"+(HZ.utils.Config.isResponsive?"<li class='new-gallery'><div class='new-gallery-action'><span class='hzi-font hzi-Add-Selection'></span><input id='newGalleryInput' type='text' onkeydown ='HZ.spaceActions.AddToIdeabookDialog.handleNewGalleryNameKeydownMobile.call(this, event);' onkeyup='HZ.spaceActions.AddToIdeabookDialog.handleNewGalleryNameKeyupMobile.call(this, event);' placeholder='"+_hgt("Create New")+"'/><button class='create-gallery create-gallery-action-btn btn btn-primary text-bold' style='display: none;'>"+_hgt("Create")+"</button></div></li>":"<li class='new-gallery'><span class='hzi-font hzi-Add-Selection'></span><input id='newGalleryInput' type='text' /><button class='create-gallery-btn btn btn-primary text-bold' type='button' style='display:none;'>"+_hgt("Create")+"</button></li>")+"</div></div><div class='add-comment'><textarea class='form-control' id='gallerySpaceComments' name='gallerySpaceComments'></textarea><div class='comment-privacy hidden'><a class='comment-privacy-control' href='javascript:void(0);'><span class='add-white-box hzi-font hzi-Check-Sidenav'></span><span class='comment-privacy-text text-xs text-dt-xs'>"+_hgt("Make comment private")+"</span></a></div><label class='checkbox-inline hidden' for='gallerySpaceCommentsPrivacy'><input id='gallerySpaceCommentsPrivacy' name='gallerySpaceCommentsPrivacy' type='checkbox' />"+_hgt("Make Comment Private")+"</label></div>"+(HZ.utils.Config.isResponsive?"<div class='add-comment-placeholder'></div>":"")+"</div><div class='col-xs-12'><div class='addToGalleryFormError alert-warning'></div></div></div></form></div><div class='modal-footer'></div></div>");return e.find(".hzp-comboselect-search-input").attr("placeholder",_hgt("Search For Ideabook")),e.find("#newGalleryInput").attr("placeholder",_hgt("Create New")),e.find("#gallerySpaceComments").attr("placeholder",_hgt("Add notes, What do you like about this photo?")),e},this.getView=function(){var e,a,t,o;Z||(Z=$("<div id='addToIdeabookDialog'></div>").append("<div id='newAddToIdeabookDialog_5' style='display:none;'><div class='modal-header'>"+_hgt("Save to Ideabook")+"</div><div class='modal-body'><div class='hzLoadingDlgThrobber'></div><div class='hzLoadingDlgMessage'>"+_hgt("Loading your ideabooks...")+"</div></div></div></div>").append(this.getDialogTemplate()).append("<div id='newAddToIdeabookDialog_"+d+"' style='display:none;' scopeid='share_ideabook'><div class='modal-header'>"+j+"</div><div class='modal-body'><div class='form-horizontal row' id='collaborateSection'><div class='addImageWrapper'><img class='dialogImage' src=''></div><div class='addRightContent'><div class='header-5 text-bold top mbxl collaborate-form-header'></div><div id='collaborateBody'></div></div><div class='col-xs-12'><div class='addToGalleryFormError alert-warning'></div></div></div></div><div class='modal-footer'><a class='text-muted collaborate-cancel pull-left' href='javascript:void(0);'>"+_hgt("No, thanks")+"</a></div></div>").append("<div id='newAddToIdeabookDialog_"+v+"' style='display:none;' scopeid='new_confirm'><div class='modal-header'>"+j+"</div><div class='modal-body'><div class='row'><div class='addImageWrapper'><img class='dialogImage'></div><div class='addRightContent'><div id='ideabookCompletedMsg' class='addToIdeabookCompletedMsg text-bold text-l mbm top'></div><div class='confirm-cta header-5'><a id='addToIdeabookCTAMsg' class='colorLink trackMe' compid='pro_banner' href='"+HZ.utils.Links.getPageUrl("professionals#")+"'><span class='hzi-font hzi-Pro-Fill'></span>"+_hgt("Ready to Renovate? Find a local Pro")+"<span class='more-icon'></span></a></div></div><div class='col-xs-12'><div class='addToGalleryFormError alert-warning'></div></div></div></div><div class='modal-footer'></div></div>").append("<div id='newAddToIdeabookDialog_"+m+"' style='display:none;'><div class='modal-header'>"+j+"</div><div class='modal-body'><div class='row'><div id='trustPilotConfirmImage' class='addImageWrapper'><img class='dialogImage'></div><div class='addRightContent'><div id='trustPilotIdeabookCompletedMsg' class='addToIdeabookCompletedMsg text-bold text-l mbm top'></div><div class='confirm-cta header-5'><a id='trustPilotCTAMsg' class='colorLink' href='javascript:;' target='_blank'><span class='hzi-font hzi-Heart'></span>"+_hgt("Love Houzz? Write a review about us")+"<span class='more-icon'></span></a></div></div><div class='col-xs-12'><div class='addToGalleryFormError alert-warning'></div></div></div></div><div class='modal-footer'></div></div>"),$("body").append(Z),e=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(ye,this)),a=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Save to Ideabook"),"",$.proxy(pe,this),!1,!1,"trackMe","compid=add_ideabook"),$("#newAddToIdeabookDialog_0 .modal-footer",Z).append(HZ.ui.AjaxThrobber.getThrobber()).append(e).append(a),e=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Share"),"",$.proxy(ue,this),!1,!1,"trackMe collaborate-send","compid=send_share_ideabook"),$(".collaborate-cancel").click($.proxy(ye,this)),$("#newAddToIdeabookDialog_"+d+" .modal-footer",Z).append(HZ.ui.AjaxThrobber.getThrobber()).append(e),a=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Email{contextEmailVerb}",{contextEmailVerb:""}),"hzEmailSpace",fe,!1,!1,"trackMe","compid=send_email"),e=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Done"),"",$.proxy(ye,this),!1,!1,"trackMe","compid=cancel_old_confirm"),$("#newAddToIdeabookDialog_"+v+" .modal-footer",Z).append(e).append(a),e=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("No Thanks"),"",$.proxy(ye,this)),a=$("<a id='trustPilotReview' class='hzBtn primary' href='javascript:;' target='_blank'>"+_hgt("Review Houzz")+"</a>"),$("#newAddToIdeabookDialog_"+m+" .modal-footer",Z).append(e).append(a),r=$("#gallerySpaceComments")[0],n=$("#gallerySpaceCommentsPrivacy")[0],HZ.utils.Config.isResponsive?(a=$(".new-gallery"),t=a.find("#newGalleryInput"),(o=a.find(".create-gallery")).on("click",function(){var e=$("#newGalleryInput").val();O||(te(e),t.val(""),o.hide())})):($("#newGalleryInput").keydown(Q).keyup(J),$(".create-gallery-btn").click(q)),$(".comment-privacy-control").click(X),M||Z.addClass("single-selection-enabled"),ie()),c&&($("label[for='existingGalleryRadio']").innerHTML=_hgt("Create New Ideabook")+":",$("#newGalleryControl").addClass("extra-bottom-margin"));var l,i=HZ.utils.Config.isResponsive?S?HZ.utils.Links.getSpaceImageUrl(S,120,120):HZ.utils.Links.getImageUrl(w,120,120):S?HZ.utils.Links.getSpaceImageUrl(S,250,250):HZ.utils.Links.getImageUrl(w,250,250),s=Z.find(".dialogImage");return s&&(Z.find(".mftDisclaimer").remove(),I?(l=$("<div class='mftDisclaimer col-xs-12 mbs'><i>"+_hgt("The colors displayed on-screen may not match {mft} color standards",{mft:this.getPaletteManufacturer()})+"</i></div>"),Z.find(".chooseGallery").prepend(l),s.attr("src",this.getPaletteImgUrl())):(s.removeAttr("src"),(l=new Image).src=i,l.onload=function(){s.attr("src",i)})),Z},this.getPaletteImgUrl=function(){return $.isNumeric(g)?HZ.utils.Links.getGenerateColorPaletteImageLink(I,g):HZ.utils.Links.getGenerateColorPaletteImageLink(I,h)},this.getPaletteManufacturer=function(){var e,a=HZ.utils.ColorPicker.getPaintManufacturerDisplayName(h);return HZ.lb.Utils&&(e=HZ.lb.Utils.ColorPicker.getColorPickerAd(S),(e=HZ.lb.Utils.ColorPicker.getConfig(e))&&e.hasOwnProperty("advDisplayName")&&(a=e.advDisplayName)),a},this.viewLoaded=function(){var a;ke(""),r.value="",n.checked=!1,D=[],$(".comment-privacy-control").removeClass("selected"),HZ.ui.AjaxThrobber.setInCall(!1),C?(e?E&&z.comboSelect("setSelectedOptions",{value:E.id}):this.updateGalleriesComboBox(),ge(0),r.focus()):(ge(5),a=this,HZ.ajaz.Services.getMyGalleries(!1,function(e){e.galleries&&(a.setGalleries(e.galleries),a.updateGalleriesComboBox(),ge(0),window.setTimeout(function(){r.focus()},0))})),e=!0,$(".modal-dialog").addClass("add-collaborate-diag")},this.viewUnloaded=function(){$(".modal-dialog").removeClass("add-collaborate-diag"),$("html").off("click.dropdown.data-api")};var oe=function(){return z.comboSelect("getSelectedOptionValues")},le=function(){0===oe().length&&E&&(z.comboSelect("hasOption",{value:E.id})?z.comboSelect("setSelectedOptions",{value:E.id}):E=null)},ie=function(){var e={clearSelectionsOnOpen:!0,multipleSelection:M},a={clearSelectionsOnOpen:!0,hasSearch:!1,multipleSelection:M};HZ.utils.Config.isResponsive?(z=$("#gallerySelectComboBox").comboSelect(a)).on("combo-select-dropdown-open",function(){var e=$(this);e.find(".hzp-comboselect-trigger").addClass("opened"),""!=e.find("#newGalleryInput").val()?e.find(".create-gallery").show():e.find(".create-gallery").hide()}).on("combo-select-dropdown-close",function(){le(),$(this).find(".hzp-comboselect-trigger").removeClass("opened")}).on("click",".close-comboselect-menu",function(){z.comboSelect("toggleDropdown")}):(z=$("#gallerySelectComboBox").comboSelect(e)).on("combo-select-dropdown-open",function(){z.find("#newGalleryInput").val("").trigger("keyup")}).on("combo-select-dropdown-close",function(){le(),Z&&Z.find("#gallerySpaceComments").length&&Z.find("#gallerySpaceComments").focus()});var t=z.find(".own-galleries"),o=z.find(".shared-galleries"),l=".hzp-comboselect-search-no-match";z.on("combo-select-search",function(){0===t.find(".own-galleries-list").children().not(l).length?t.hide():t.show(),0===o.find(".shared-galleries-list").children().not(l).length?o.hide():o.show()}),z.on("combo-select-search-no-result",function(){t.hide(),o.hide()})},se=function(e,a,t,o,l,i){var s=e.featured?" ("+_hgt("Featured")+")":"",r=E&&E.id===e.id,n=e.isPrivate?" gallery-private":"",s=$("<li class='hzp-comboselect-option "+n+"' data-value='"+e.id+"' tabindex='0'><span class='hzp-comboselect-option-check hzi-font hzi-Check-Sidenav'></span>"+e.title+s+"</li>");s.data("gallery",e),t||r?a.prepend(s):a.append(s),(r||o)&&(i&&z.comboSelect("setHasTakenAction",{hasTakenAction:!0}),z.comboSelect("addAdditionalSelectedOptions",{value:e.id})),l&&$("#gallerySelectComboBox .select").animate({scrollTop:0},500)};this.updateGalleriesComboBox=function(){var e=$("#gallerySelectComboBox"),a=e.find(".hzp-comboselect-trigger-button"),t=e.find(".hzp-comboselect-select"),o=t.find(".own-galleries"),l=o.find(".own-galleries-list"),e=t.find(".shared-galleries"),i=e.find(".shared-galleries-list"),s=C.recent||[],r=C.own||[],n=C.shared||[],t=s.concat(r).concat(n),d={};l.empty(),i.empty(),T&&H[T]?(E=H[T],a.text(E.title)):t.length?(E=t[0],a.text(E.title)):a.text(_hgt("Select an ideabook"));var c={},u={};if($.each(r,function(e,a){c[a.id]=1}),$.each(n,function(e,a){u[a.id]=1}),0<s.length){o.show(),e.show();for(var h=0;h<s.length;h++){var g=s[h],p=!0;E&&(g.id==E.id||d[g.id])||(c[g.id]?(se(g,l,p),d[g.id]=!0):u[g.id]&&(se(g,i,p),d[g.id]=!0))}}else o.hide(),e.hide();if(0<r.length){o.show();for(h=0;h<r.length;h++){g=r[h],p=E&&g.id===E.id;d[g.id]||(d[g.id]=!0,se(g,l,p))}}else o.hide();if(0<n.length){e.show();for(h=0;h<n.length;h++){g=n[h],p=E&&g.id===E.id;d[g.id]||(d[g.id]=!0,se(g,i,p))}}else e.hide()};var re=function(e){var a=$("#newAddToIdeabookDialog_"+d+" .addImageWrapper"),t=o?HZ.utils.Links.getUserImageUrl(o,0):null;a.find(".addImageWrapper-inner").remove(),a.append("<div class='addImageWrapper-inner'><div class='collaborate-meta text-left'><div class='one-line text-bold'>"+e+"</div><div class='one-line text-m text-dt-s'>"+_hgt("1 photo")+"</div></div>"+(t?"<div class='user-image'><img src='"+t+"' class='hz-user-image user-small-thumb' /></div>":"")+"</div>")},ne=function(e,a,t){var o={hasOwnerRow:!1,hasSaveWarning:!1,hasPrivacySettings:!1,galleryId:a,isFromCreateFlow:!0},l=$(".collaborate-send"),a=$("#collaborateBody"),o=HZ.galleries.ShareGalleryComponent.getShareGalleryComponent(t,o);$(".collaborate-form-header").empty().append(_hgt("Get feedback from family, friends, and pros")),re(e),a.empty().append(o),ge(d),HZ.utils.Logger.sendEventLog(HZ.shareGallery.events.POST_IDEABOOK_COLLABORATE),l.addClass("disabled"),$.each(G,function(e,a){HZ.events.unsubscribeById(a)}),(G=[]).push(HZ.events.subscribe(this,HZ.galleries.ShareGalleryComponent.publicShareGalleryEvents.ADD_NEW_COLLABORATOR_SUCCESS,function(){l.removeClass("disabled")}),HZ.events.subscribe(this,HZ.galleries.ShareGalleryComponent.publicShareGalleryEvents.SHARE_GALLERY_COMPONENT_IS_FETCHING_DATA,function(){HZ.ui.AjaxThrobber.setInCall(!0)}),HZ.events.subscribe(this,HZ.galleries.ShareGalleryComponent.publicShareGalleryEvents.SHARE_GALLERY_COMPONENT_DATA_FETCH_COMPLETE,function(){HZ.ui.AjaxThrobber.setInCall(!1)}))},de=function(a,t){$("#collaborateBody");HZ.ui.AjaxThrobber.setInCall(!1),HZ.ajaz.Services.initShareGallery(t,function(e){"true"==e.success&&ne(a,t,e)})},ce=function(e,a){var t=e.title,o=e.id;L||HZ&&HZ.galleries&&HZ.galleries.ShareGalleryComponent?(de.call(this,t,o),a&&ke(ve(a))):(HZ.ui.AjaxThrobber.setInCall(!0),HZ.utils.ResourceLoader.requireCollaborateResources(function(){L=!0,de.call(this,t,o),a&&ke(ve(a))}.bind(this)))},ue=function(){if(a)return!1;HZ.ui.AjaxThrobber.setInCall(!0),HZ.galleries.ShareGalleryComponent.hasCollaboratorsToAdd()?(a=!0,HZ.galleries.ShareGalleryComponent.savePermissions(he)):(HZ.ui.AjaxThrobber.setInCall(!1),ke(_hgt("You have not selected any users to add as collaborators to this ideabook")))},he=function(e){HZ.ui.AjaxThrobber.setInCall(!1),a=!1,"true"==e.success?(ye(),HZ.ui.yamdi.Common.alert(_hgt("Invites Sent"),_hgt("Ideabook has been successfully shared."))):ke(e.error)};function ge(e){var a="newAddToIdeabookDialog_"+e;Z.children().each(function(e){this.style.display=this.id==a?"block":"none"}),t.center()}function pe(){var e;if(!HZ.ui.AjaxThrobber.isInCall()){if(e=z.comboSelect("getSelectedOptionValues"),ke(""),0==e.length&&!E)return ke(_hgt("Please select an ideabook"));HZ.ui.AjaxThrobber.setInCall(!0),i.length<=0&&be();var a=n.checked?U:B,t=r.value;if(null!==I){var o=h;return $.isNumeric(g)&&(o=g),void(1<e.length?HZ.ajaz.Services.saveColorPaletteMulti(S,I,o,JSON.stringify(e),a,t,$.proxy(me,this)):1==e.length?HZ.ajaz.Services.saveColorPalette(S,I,o,e[0],t,a,null,$.proxy(me,this)):E&&HZ.ajaz.Services.saveColorPalette(S,I,o,E.id,t,a,null,$.proxy(me,this)))}1<e.length?HZ.ajaz.Services.addToGalleries(S,JSON.stringify(e),a,t,$.proxy(me,this)):1==e.length?HZ.ajaz.Services.addToGallery(S,null,e[0],a,t,$.proxy(me,this)):E&&HZ.ajaz.Services.addToGallery(S,null,E.id,a,t,$.proxy(me,this))}}this.switchDialogToProWizard=function(){var e=HZ.professionals.ProSearchWidget.getSearchDialog("save_to_ideabook",!1);HZ.ui.Yamdi.switchDialog(e)};var ve=function(e){var t=$("<div>");return $.each(e,function(e,a){t.append($("<div class='gallery-error'>"+a+"</div>"))}),t.html()};function me(e){var t,o,a;HZ.ui.AjaxThrobber.setInCall(!1),"true"==e.success?(!1===HZ.lb.Config.ideaBookTipAlreadyShown&&("function"==typeof showIdeaBookTip&&showIdeaBookTip(),HZ.ajaz.Services.setVisitorProperty(HZ.ajaz.Services.VISITOR_PROPERTY_IDEABOOK_TIP_PHOTO_SAVED,"true")),void 0!==(p=e).galleryIds&&(t=e.galleryIds),(o=void 0!==e.galleryId?e.galleryId:o)&&0!=o?this.setLastGalleryId(e.galleryId):t&&t.length&&this.setLastGalleryId(t[0]),(a=$(D).filter(function(e,a){return t?-1!=$.inArray(parseInt(a.id),t):o?a.id==o:void 0}))&&1==a.length?ce.call(this,a[0],e.galleryErrors):(l=!(!e.hasOwnProperty("localProData")||$.isEmptyObject(e.localProData))&&(k=e.localProData,!0),s=!(!e.hasOwnProperty("organicContactLocalProsData")||$.isEmptyObject(e.organicContactLocalProsData))&&(e.organicContactLocalProsData,!0),e.proServiceSuggestionData&&(u=!0),e.showProWizardLaunchCTA&&(x=e.showProWizardLaunchCTA),c&&P?(P(),HZ.ajaz.Services.setVisitorProperty(HZ.ajaz.Services.VISITOR_PROPERTY_IDEABOOK_TIP_PHOTO_SAVED,"true")):_?(function(a,e){var t,o=a.galleryTitle,l=a.galleryIds,i=a.galleryId,s=HZ.utils.Links.getGalleryLink(i),r=[],n=$("#addToIdeabookCTAMsg"),d=$("#trustPilotCTAMsg");l&&(r=$.map(l,function(e){return H[e]}));e!=v&&e!=m&&e!=f||(r=$.map(r,function(e){return"<a class='colorLink trackMe' class='add-to-gallery-link' href='"+HZ.utils.Links.getGalleryLink(e.id)+"'>"+e.title+"</a>"}).join(", "),t=o&&I?"<b>"+_hgt("This palette has been added to:")+'</b><br/><a class="colorLink trackMe text-bold" compid="confirm_color_palette" id="addToIdeabookGalleryLink" href="'+HZ.utils.Links.getGalleryLink(i)+'">'+o+"</a><br/></br/>":o?"<b>"+_hgt("This photo has been added to:")+'</b><br/><a class="colorLink trackMe text-bold" compid="confirm_gallery_name" id="addToIdeabookGalleryLink" href="'+HZ.utils.Links.getGalleryLink(i)+'">'+o+"</a><br/></br/>":l&&I?"<b>"+_hgt("This palette has been added to:")+"</b><br/>"+r:l?"<b>"+_hgt("This photo has been added to:")+"</b><br/>"+r:I?_hgt("This palette has been added to <t1>your ideabook</t1>.",{t1:{tag:"a",attr:{href:s,class:"colorLink",id:"addToIdeabookGalleryLink"}}})+"<br/><br/>":_hgt("This photo has been added to <t1>your ideabook</t1>.",{t1:{tag:"a",attr:{href:s,class:"colorLink",id:"addToIdeabookGalleryLink"}}})+"<br/><br/>");switch(e){case f:var c=new HZ.postSaveDialogs.LocalProsContact;c.init();var u=S?HZ.utils.Links.getSpaceImageUrl(S,80,80):HZ.utils.Links.getImageUrl(w,80,80),u=c.getLocalProsContactDialog(u,t);HZ.ui.Yamdi.switchDialog(u);break;case b:var h=new HZ.email.PostIdeabookConfirmContactProDialog;k.galleryUrl=s,k.galleryName=o,h.prepare(k),HZ.ui.Yamdi.switchDialog(h),HZ.utils.Logger.sendEventLog(K);break;case v:$("#ideabookCompletedMsg").empty().append(t),HZ.utils.Logger.sendEventLog(F),!0===a.isProduct?(n.hide(),$("#hzEmailSpace").val(_hgt("Email this Product"))):(g="javascript:HZ.spaceActions.AddToIdeabookDialog.switchDialogToProWizard();","new"==x?(h=_hgt("Ready to start a project? Click here"),n.addClass("new").html("<span class='hzi-font hzi-Project-Match-Toolset'></span>"+h+"<span class='more-icon'></span>").attr("href","javascript:;").attr("onclick",g).unbind("mousedown").bind("mousedown",function(){HZ.utils.Logger.sendEventLog(N)}).show()):("current"==x?n.addClass("current").attr("href","javascript:;").attr("onclick",g).unbind("mousedown").bind("mousedown",function(){HZ.utils.Logger.sendEventLog(N)}):n.attr("target","_blank").unbind("mousedown").bind("mousedown",function(){HZ.utils.Logger.sendEventLog(R)})).show(),$("#hzEmailSpace").val(_hgt("Email this Photo"))),ge(e),I=null;break;case y:var g=new HZ.ProServiceDialogs.QuestionnaireDialog;if(g.init(),a.proServiceSuggestionData&&a.proServiceSuggestionData.questions)try{var p=JSON.parse(a.proServiceSuggestionData.questions);p&&0<p.length&&HZ.ui.Yamdi.switchDialog(g.getDialog({questions:p,galleryLink:s,galleryName:a.galleryTitle,professionalTypeId:a.proServiceSuggestionData.professionalTypeId,serviceName:a.proServiceSuggestionData.serviceName,questionnaireId:a.proServiceSuggestionData.questionnaireId}))}catch(e){}break;case m:HZ.ui.AjaxThrobber.setInCall(!0),$("#trustPilotIdeabookCompletedMsg").empty().append(t),HZ.utils.Logger.sendEventLog(W),HZ.ajaz.Services.getTrustPilotUrl(HZ.TrustPilot.Settings.getTrustPilotUrl,function(e){e.hasOwnProperty("trustPilotUrl")&&(HZ.data.CurrentSessionUser.trustPilotImps=1,be(),d.attr("href",e.trustPilotUrl),$("#trustPilotReview").click(function(){$(this).attr("href",e.trustPilotUrl),HZ.ajaz.Services.setTrustPilotUserPreference(HZ.TrustPilot.Settings.setTrustPilotUserPreference,function(e){}),HZ.utils.Logger.sendEventLog(V),ye()})),d.unbind("mousedown").bind("mousedown",function(){HZ.utils.Logger.sendEventLog(Y),HZ.ajaz.Services.setTrustPilotUserPreference(HZ.TrustPilot.Settings.setTrustPilotUserPreference,function(e){})}).show(),$("#addToIdeabookGalleryLink").attr("href",s),HZ.ui.AjaxThrobber.setInCall(!1),ge(m),a.galleryErrors&&ke(ve(a.galleryErrors))},{type:"GET"}),I=null}}(e,function(){var e=Math.floor(100*Math.random()),a=i[e],e=!1;a===m&&(A||HZ.data.CurrentSessionUser.hasOwnProperty("trustPilotImps"))&&(e=!0);u?a=y:l?a=b:s?a=f:e&&(a=v);return a}()),e.galleryErrors&&ke(ve(e.galleryErrors))):ye())):e.houseError?ke(e.houseError):e.galleryErrors?ke(ve(e.galleryErrors)):ke(e.error)}function be(){for(var e=[99,1],a=[v,m],t=i.length=0,o=e.length;t<o;t++)for(var l=0;l<e[t];l++)i.push(a[t])}function fe(){var e,a,t;p&&p.spaceId&&p.spaceTitle&&(e=p.spaceId,a=p.spaceTitle,t=!0===p.isProduct?HZ.sendEmail.texts.DEFAULT_MESSAGE_PRODUCT:HZ.sendEmail.texts.DEFAULT_MESSAGE_SPACE,HZ.dialogs.EmailDialog.prepare({type:HZ.sendEmail.types.SPACE,referenceId:e,subject:a,message:t,event:HZ.sendEmail.events.ADDTOIBK}),HZ.ui.Yamdi.switchDialog(HZ.dialogs.EmailDialog))}function ye(){I=null,t&&t.hide(null)}function ke(e){var a=$(".addToGalleryFormError");a.empty().append(e),e?a.show():a.hide()}this.showStatus=function(e){ke(e)},this.hideStatus=function(){ke("")}};

window.hzmr.push("addToIdeabookDialog:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End addToIdeabookDialog.js  **************/
/************* Start saveBasicProfileDialog.js for locale en-US **************/
try {HZ.ns("HZ.dialogs"),HZ.dialogs.saveBasicProfileDialog=function(){HZ.dialogs.saveBasicProfileDialog.superclass.constructor.call(this);var r=this,t=!1,n=null;this.prepare=function(i,a,o,e,l,s){l&&(t=l),s&&(n=s);o=$("<div id='saveBasicProfileDialog'><div class='row'><div class='col-xs-offset-2 col-xs-8 form-group basic-profile-dialog__form-group'><label for='basic-profile-dialog__first-name'>"+_hgt("First Name ")+"<small>"+_hgt("(publicly displayed)")+"</small></label><input type='text' class='form-control basic-profile-dialog__input' id='basic-profile-dialog__first-name' name='firstName' placeholder='"+_hgt("First Name")+"' value="+(a||"")+"></div></div><div class='row'><div class='col-xs-offset-2 col-xs-8 user-input form-group basic-profile-dialog__form-group'><label for='basic-profile-dialog__last-name'>"+_hgt("Last Name ")+" <small>"+_hgt("(publicly displayed)")+"</small></label><input type='text' class='form-control basic-profile-dialog__input' id='basic-profile-dialog__last-name' name='lastName' placeholder='"+_hgt("Last Name")+"' value="+(o||"")+"></div></div><div class='row'><div class='col-xs-offset-2 col-xs-8 form-group basic-profile-dialog__form-group'><label for='basic-profile-dialog__zip'>"+_hgt("Zip Code")+"</label><input type='text' class='form-control basic-profile-dialog__input' id='basic-profile-dialog__zip' name='zip' value='"+(e||"")+"'></div></div></div>"),e=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Continue"),"",this.saveBasicProfileInfo);r.init({title:i,body:o,controls:[e],onViewLoaded:p})},this.saveBasicProfileInfo=function(){var o=$("#basic-profile-dialog__first-name"),e=$("#basic-profile-dialog__last-name"),l=$("#basic-profile-dialog__zip"),i=o.val(),a=e.val(),s=l.val();i?s?(HZ.ui.AjaxThrobber.setInCall(!0),HZ.ajaz.Services.saveBasicProfile(i,a,s,function(i){if(HZ.ui.AjaxThrobber.setInCall(!1),"true"==i.success)t?HZ.ui.Yamdi.hideAll():window.location.href=n;else if($.isEmptyObject(i.errors))HZ.ui.yamdi.Common.alert("Error!",_hgt("An unexpected error has occurred. Please refresh this page and continue."));else for(var a in i.errors)"firstName"==a?c(o,i.errors.firstName):"lastName"==a?c(e,i.errors.lastName):"zipCode"==a&&c(l,i.errors.zipCode)})):c(l,_hgt("Please enter a value for your zip code.")):c(o,_hgt("Can you try another first name? We are sorry for the inconvenience."))};var p=function(){var i=$("#basic-profile-dialog__first-name");i.on("focus",function(){l(i)}),$zipCode=$("#basic-profile-dialog__zip"),$zipCode.on("focus",function(){l($zipCode)})},c=function(i,a){var o,e;a?(l(i),o=$("<div class='basic-profile-dialog__error-tip'><span class='outer-tip'></span><span class='inner-tip'></span><span class='tooltip-text'>"+a+"</span></div>"),e=i.position(),a=i.height(),o.css({left:e.left,top:a+e.top+5}),i.addClass("basic-profile-dialog__input--error"),i.parents(".basic-profile-dialog__form-group").append(o)):l(i)},l=function(i){i.parents(".basic-profile-dialog__form-group").find(".basic-profile-dialog__error-tip").remove(),i.removeClass("basic-profile-dialog__input--error")}},HZ.extend(HZ.dialogs.saveBasicProfileDialog,HZ.ui.yamdi.Dialog);

window.hzmr.push("saveBasicProfileDialog:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End saveBasicProfileDialog.js  **************/
/************* Start history.js for locale en-US **************/
try {!function(e){var t,n;"function"==typeof define&&define.amd&&(t="[history"+(new Date).getTime()+"]",n=requirejs.onError,e.toString=function(){return t},requirejs.onError=function(e){-1===e.message.indexOf(t)&&n.call(requirejs,e)},define([],e)),e()}(function(){var u=("object"==typeof window?window:this)||{};if(!u.history||"emulate"in u.history)return u.history;function a(e,t){var n=u.history!==r;n&&(u.history=r),e.apply(r,t),n&&(u.history=o)}var c=u.document,n=c.documentElement,p=u.Object,i=u.JSON,l=u.location,r=u.history,o=r,s=r.pushState,f=r.replaceState,h=!!s,v="state"in r,g=p.defineProperty,_=D({},"t")?{}:c.createElement("a"),d="",y=u.addEventListener?"addEventListener":(d="on","attachEvent"),e=u.removeEventListener?"removeEventListener":"detachEvent",t=u.dispatchEvent?"dispatchEvent":"fireEvent",m=u[y],E=u[e],b=u[t],x={basepath:"/",redirect:0,type:"/",init:0},S="__historyAPI__",w=c.createElement("a"),O=l.href,R="",T=1,$=!1,I=0,L={},N={},P=c.title,j={onhashchange:null,onpopstate:null},A={setup:function(e,t,n){x.basepath=(""+(null==e?x.basepath:e)).replace(/(?:^|\/)[^\/]*$/,"/"),x.type=null==t?x.type:t,x.redirect=null==n?x.redirect:!!n},redirect:function(e,t){var n;o.setup(t,e),t=x.basepath,u.top==u.self&&(n=q(null,!1,!0)._relative,e=l.pathname+l.search,h?(e=e.replace(/([^\/])$/,"$1/"),n!=t&&new RegExp("^"+t+"$","i").test(e)&&l.replace(n)):e!=t&&(e=e.replace(/([^\/])\?/,"$1/?"),new RegExp("^"+t,"i").test(e)&&l.replace(t+"#"+e.replace(new RegExp("^"+t,"i"),x.type)+l.hash)))},pushState:function(e,t,n){var r=c.title;null!=P&&(c.title=P),s&&a(s,arguments),V(e,n),c.title=r,P=t},replaceState:function(e,t,n){var r=c.title;null!=P&&(c.title=P),delete L[l.href],f&&a(f,arguments),V(e,n,!0),c.title=r,P=t},location:{set:function(e){0===I&&(I=1),u.location=e},get:function(){return 0===I&&(I=1),h?l:_}},state:{get:function(){return L[l.href]||null}}},B={assign:function(e){0===(""+e).indexOf("#")?V(null,e):l.assign(e)},reload:function(){l.reload()},replace:function(e){0===(""+e).indexOf("#")?V(null,e,!0):l.replace(e)},toString:function(){return this.href},href:{get:function(){return q()._href}},protocol:null,host:null,hostname:null,port:null,pathname:{get:function(){return q()._pathname}},search:{get:function(){return q()._search}},hash:{set:function(e){V(null,(""+e).replace(/^(#|)/,"#"),!1,O)},get:function(){return q()._hash}}};function k(){}function q(e,t,n){null==e||""===e||t?(e=t?e:l.href,h&&!n||(e=e.replace(/^[^#]*/,"")||"#",e=l.protocol.replace(/:.*$|$/,":")+"//"+l.host+x.basepath+e.replace(new RegExp("^#[/]?(?:"+x.type+")?"),""))):(i=q(),r=c.getElementsByTagName("base")[0],!n&&r&&r.getAttribute("href")&&(r.href=r.href,i=q(r.href,null,!0)),o=i._pathname,a=i._protocol,e=/^(?:\w+\:)?\/\//.test(e=""+e)?0===e.indexOf("/")?a+e:e:a+"//"+i._host+(0===e.indexOf("/")?e:0===e.indexOf("?")?o+e:0===e.indexOf("#")?o+i._search+e:o.replace(/[^\/]+$/g,"")+e)),w.href=e;var t=/(?:(\w+\:))?(?:\/\/(?:[^@]*@)?([^\/:\?#]+)(?::([0-9]+))?)?([^\?#]*)(?:(\?[^#]+)|\?)?(?:(#.*))?/.exec(w.href),n=t[2]+(t[3]?":"+t[3]:""),r=t[4]||"/",a=t[5]||"",i="#"!==t[6]&&t[6]||"",o=r+a+i,e=r.replace(new RegExp("^"+x.basepath,"i"),x.type)+a;return{_href:t[1]+"//"+n+o,_protocol:t[1],_host:n,_hostname:t[2],_port:t[3]||"",_pathname:r,_search:a,_hash:i,_relative:o,_nohash:e,_special:e+i}}function D(t,n,r,e){var a=0;r||(r={set:k},a=1);var i=!r.set,o=!r.get,c={configurable:!0,set:function(){i=1},get:function(){o=1}};try{g(t,n,c),t[n]=t[n],g(t,n,r)}catch(e){}if(!(i&&o||(t.__defineGetter__&&(t.__defineGetter__(n,c.get),t.__defineSetter__(n,c.set),t[n]=t[n],r.get&&t.__defineGetter__(n,r.get),r.set&&t.__defineSetter__(n,r.set)),i&&o))){if(a)return!1;if(t===u){try{var l=t[n];t[n]=null}catch(e){}if("execScript"in u)u.execScript("Public "+n,"VBScript"),u.execScript("var "+n+";","JavaScript");else try{g(t,n,{value:k})}catch(e){"onpopstate"===n&&(m("popstate",r=function(){E("popstate",r,!1);var e=t.onpopstate;t.onpopstate=null,setTimeout(function(){t.onpopstate=e},1)},!1),T=0)}t[n]=l}else try{try{var s,f=p.create(t);for(s in g(p.getPrototypeOf(f)===t?f:t,n,r),t)"function"==typeof t[s]&&(f[s]=t[s].bind(t));try{e.call(f,f,t)}catch(e){}t=f}catch(e){g(t.constructor.prototype,n,r)}}catch(e){return!1}}return t}function G(e,t){var n=(""+("string"==typeof e?e:e.type)).replace(/^on/,""),r=N[n];if(r){if(null==(t="string"==typeof e?t:e).target)for(var a=["target","currentTarget","srcElement","type"];e=a.pop();)t=D(t,e,{get:"type"===e?function(){return n}:function(){return u}});T&&(("popstate"===n?u.onpopstate:u.onhashchange)||k).call(u,t);for(var i=0,o=r.length;i<o;i++)r[i].call(u,t);return!0}return b(e,t)}function U(){var e=c.createEvent?c.createEvent("Event"):c.createEventObject();e.initEvent?e.initEvent("popstate",!1,!1):e.type="popstate",e.state=o.state,G(e)}function V(e,t,n,r){h?O=l.href:(t=q(t,2===(I=0===I?2:I)&&-1!==(""+t).indexOf("#")))._relative!==q()._relative&&(O=r,n?l.replace("#"+t._special):l.hash=t._special),!v&&e&&(L[l.href]=e),$=!1}function J(e){var t,n=O;O=l.href,n&&(R!==l.href&&U(),e=e||u.event,t=q(n,!0),n=q(),e.oldURL||(e.oldURL=t._href,e.newURL=n._href),t._hash!==n._hash&&G(e))}function C(e){setTimeout(function(){m("popstate",function(e){R=l.href,G(e=!v?D(e,"state",{get:function(){return o.state}}):e)},!1)},0),!h&&!0!==e&&"location"in o&&(F(_.hash),$&&($=!1,U()))}function z(e){var t=e||u.event,n=function(e){for(;e;){if("A"===e.nodeName)return e;e=e.parentNode}}(t.target||t.srcElement),e="defaultPrevented"in t?t.defaultPrevented:!1===t.returnValue;n&&"A"===n.nodeName&&!e&&(e=q(),n=q(n.getAttribute("href",2)),e._href.split("#").shift()===n._href.split("#").shift()&&n._hash&&(e._hash!==n._hash&&(_.hash=n._hash),F(n._hash),t.preventDefault?t.preventDefault():t.returnValue=!1))}function F(e){var t=c.getElementById(e=(e||"").replace(/^#/,""));t&&t.id===e&&"A"===t.nodeName&&(t=t.getBoundingClientRect(),u.scrollTo(n.scrollLeft||0,t.top+(n.scrollTop||0)-(n.clientTop||0)))}function H(){var e=c.getElementsByTagName("script"),e=(e[e.length-1]||{}).src||"";(-1!==e.indexOf("?")?e.split("?").pop():"").replace(/(\w+)(?:=([^&]*))?/g,function(e,t,n){x[t]=(n||"").replace(/^(0|false)$/,"")}),m(d+"hashchange",J,!1);var n=[B,_,j,u,A,o];v&&delete A.state;for(var r=0;r<n.length;r+=2)for(var t in n[r])if(n[r].hasOwnProperty(t))if("function"==typeof n[r][t])n[r+1][t]=n[r][t];else{var a=function(t,n,e){return t=t===B?l:t,(e=e||{}).set=e.set||function(e){t[n]=e},e.get=e.get||function(){return t[n]},e}(n[r],t,n[r][t]);if(!D(n[r+1],t,a,function(e,t){t===o&&(u.history=o=n[r+1]=e)}))return void E(d+"hashchange",J,!1);n[r+1]===u&&(N[t]=N[t.substr(2)]=[])}return o.setup(),x.redirect&&o.redirect(),x.init&&(I=1),!v&&i&&function(){var t;try{(t=u.sessionStorage).setItem(S+"t","1"),t.removeItem(S+"t")}catch(e){t={getItem:function(e){e=c.cookie.split(e+"=");return 1<e.length&&e.pop().split(";").shift()||"null"},setItem:function(e,t){var n={};(n[l.href]=o.state)&&(c.cookie=e+"="+i.stringify(n))}}}try{L=i.parse(t.getItem(S))||{}}catch(e){L={}}m(d+"unload",function(){t.setItem(S,i.stringify(L))},!1)}(),h||c[y](d+"click",z,!1),"complete"===c.readyState?C(!0):(h||q()._relative===x.basepath||($=!0),m(d+"load",C,!1)),1}return H()?(o.emulate=!h,u[y]=function(e,t,n){e in N?N[e].push(t):3<arguments.length?m(e,t,n,arguments[3]):m(e,t,n)},u[e]=function(e,t,n){var r=N[e];if(r){for(var a=r.length;a--;)if(r[a]===t){r.splice(a,1);break}}else E(e,t,n)},u[t]=G,o):void 0});

window.hzmr.push("history:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End history.js  **************/
/************* Start jquery.easing.1.3.js for locale en-US **************/
try {jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(n,t,e,u,a){return jQuery.easing[jQuery.easing.def](n,t,e,u,a)},easeInQuad:function(n,t,e,u,a){return u*(t/=a)*t+e},easeOutQuad:function(n,t,e,u,a){return-u*(t/=a)*(t-2)+e},easeInOutQuad:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t+e:-u/2*(--t*(t-2)-1)+e},easeInCubic:function(n,t,e,u,a){return u*(t/=a)*t*t+e},easeOutCubic:function(n,t,e,u,a){return u*((t=t/a-1)*t*t+1)+e},easeInOutCubic:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t+e:u/2*((t-=2)*t*t+2)+e},easeInQuart:function(n,t,e,u,a){return u*(t/=a)*t*t*t+e},easeOutQuart:function(n,t,e,u,a){return-u*((t=t/a-1)*t*t*t-1)+e},easeInOutQuart:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t*t+e:-u/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(n,t,e,u,a){return u*(t/=a)*t*t*t*t+e},easeOutQuint:function(n,t,e,u,a){return u*((t=t/a-1)*t*t*t*t+1)+e},easeInOutQuint:function(n,t,e,u,a){return(t/=a/2)<1?u/2*t*t*t*t*t+e:u/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(n,t,e,u,a){return-u*Math.cos(t/a*(Math.PI/2))+u+e},easeOutSine:function(n,t,e,u,a){return u*Math.sin(t/a*(Math.PI/2))+e},easeInOutSine:function(n,t,e,u,a){return-u/2*(Math.cos(Math.PI*t/a)-1)+e},easeInExpo:function(n,t,e,u,a){return 0==t?e:u*Math.pow(2,10*(t/a-1))+e},easeOutExpo:function(n,t,e,u,a){return t==a?e+u:u*(1-Math.pow(2,-10*t/a))+e},easeInOutExpo:function(n,t,e,u,a){return 0==t?e:t==a?e+u:(t/=a/2)<1?u/2*Math.pow(2,10*(t-1))+e:u/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(n,t,e,u,a){return-u*(Math.sqrt(1-(t/=a)*t)-1)+e},easeOutCirc:function(n,t,e,u,a){return u*Math.sqrt(1-(t=t/a-1)*t)+e},easeInOutCirc:function(n,t,e,u,a){return(t/=a/2)<1?-u/2*(Math.sqrt(1-t*t)-1)+e:u/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;return 0==t?e:1==(t/=a)?e+u:(i=i||.3*a,r=s<Math.abs(u)?(s=u,i/4):i/(2*Math.PI)*Math.asin(u/s),-(s*Math.pow(2,10*--t)*Math.sin((t*a-r)*(2*Math.PI)/i))+e)},easeOutElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;return 0==t?e:1==(t/=a)?e+u:(i=i||.3*a,r=s<Math.abs(u)?(s=u,i/4):i/(2*Math.PI)*Math.asin(u/s),s*Math.pow(2,-10*t)*Math.sin((t*a-r)*(2*Math.PI)/i)+u+e)},easeInOutElastic:function(n,t,e,u,a){var r=1.70158,i=0,s=u;return 0==t?e:2==(t/=a/2)?e+u:(i=i||a*(.3*1.5),r=s<Math.abs(u)?(s=u,i/4):i/(2*Math.PI)*Math.asin(u/s),t<1?s*Math.pow(2,10*--t)*Math.sin((t*a-r)*(2*Math.PI)/i)*-.5+e:s*Math.pow(2,-10*--t)*Math.sin((t*a-r)*(2*Math.PI)/i)*.5+u+e)},easeInBack:function(n,t,e,u,a,r){return u*(t/=a)*t*(((r=null==r?1.70158:r)+1)*t-r)+e},easeOutBack:function(n,t,e,u,a,r){return u*((t=t/a-1)*t*(((r=null==r?1.70158:r)+1)*t+r)+1)+e},easeInOutBack:function(n,t,e,u,a,r){return null==r&&(r=1.70158),(t/=a/2)<1?u/2*(t*t*((1+(r*=1.525))*t-r))+e:u/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:function(n,t,e,u,a){return u-jQuery.easing.easeOutBounce(n,a-t,0,u,a)+e},easeOutBounce:function(n,t,e,u,a){return(t/=a)<1/2.75?u*(7.5625*t*t)+e:t<2/2.75?u*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?u*(7.5625*(t-=2.25/2.75)*t+.9375)+e:u*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOutBounce:function(n,t,e,u,a){return t<a/2?.5*jQuery.easing.easeInBounce(n,2*t,0,u,a)+e:.5*jQuery.easing.easeOutBounce(n,2*t-a,0,u,a)+.5*u+e}});

window.hzmr.push("jquery.easing.1.3:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.easing.1.3.js  **************/
/************* Start jquery.visible.js for locale en-US **************/
try {!function(t){var u=t(window);t.fn.visible=function(t,i,o){if(!(this.length<1)){var e=1<this.length?this.eq(0):this,h=e.get(0),n=u.width(),f=u.height(),o=o||"both",i=!0!==i||h.offsetWidth*h.offsetHeight;if("function"==typeof h.getBoundingClientRect){var l=h.getBoundingClientRect(),r=0<=l.top&&l.top<f,g=0<l.bottom&&l.bottom<=f,s=0<=l.left&&l.left<n,c=0<l.right&&l.right<=n,d=t?r||g:r&&g,l=t?s||c:s&&c;return"both"===o?i&&d&&l:"vertical"===o?i&&d:"horizontal"===o?i&&l:void 0}r=u.scrollTop(),g=r+f,s=u.scrollLeft(),c=s+n,d=e.offset(),l=d.top,f=l+e.height(),n=d.left,d=n+e.width(),e=!0===t?f:l,l=!0===t?l:f,f=!0===t?d:n,d=!0===t?n:d;return"both"===o?!!i&&l<=g&&r<=e&&d<=c&&s<=f:"vertical"===o?!!i&&l<=g&&r<=e:"horizontal"===o?!!i&&d<=c&&s<=f:void 0}}}(jQuery);

window.hzmr.push("jquery.visible:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.visible.js  **************/
/************* Start md5.js for locale en-US **************/
try {function md5cycle(f,h){var i=ff(i=f[0],g=f[1],r=f[2],n=f[3],h[0],7,-680876936),n=ff(n,i,g,r,h[1],12,-389564586),r=ff(r,n,i,g,h[2],17,606105819),g=ff(g,r,n,i,h[3],22,-1044525330);i=ff(i,g,r,n,h[4],7,-176418897),n=ff(n,i,g,r,h[5],12,1200080426),r=ff(r,n,i,g,h[6],17,-1473231341),g=ff(g,r,n,i,h[7],22,-45705983),i=ff(i,g,r,n,h[8],7,1770035416),n=ff(n,i,g,r,h[9],12,-1958414417),r=ff(r,n,i,g,h[10],17,-42063),g=ff(g,r,n,i,h[11],22,-1990404162),i=ff(i,g,r,n,h[12],7,1804603682),n=ff(n,i,g,r,h[13],12,-40341101),r=ff(r,n,i,g,h[14],17,-1502002290),i=gg(i,g=ff(g,r,n,i,h[15],22,1236535329),r,n,h[1],5,-165796510),n=gg(n,i,g,r,h[6],9,-1069501632),r=gg(r,n,i,g,h[11],14,643717713),g=gg(g,r,n,i,h[0],20,-373897302),i=gg(i,g,r,n,h[5],5,-701558691),n=gg(n,i,g,r,h[10],9,38016083),r=gg(r,n,i,g,h[15],14,-660478335),g=gg(g,r,n,i,h[4],20,-405537848),i=gg(i,g,r,n,h[9],5,568446438),n=gg(n,i,g,r,h[14],9,-1019803690),r=gg(r,n,i,g,h[3],14,-187363961),g=gg(g,r,n,i,h[8],20,1163531501),i=gg(i,g,r,n,h[13],5,-1444681467),n=gg(n,i,g,r,h[2],9,-51403784),r=gg(r,n,i,g,h[7],14,1735328473),i=hh(i,g=gg(g,r,n,i,h[12],20,-1926607734),r,n,h[5],4,-378558),n=hh(n,i,g,r,h[8],11,-2022574463),r=hh(r,n,i,g,h[11],16,1839030562),g=hh(g,r,n,i,h[14],23,-35309556),i=hh(i,g,r,n,h[1],4,-1530992060),n=hh(n,i,g,r,h[4],11,1272893353),r=hh(r,n,i,g,h[7],16,-155497632),g=hh(g,r,n,i,h[10],23,-1094730640),i=hh(i,g,r,n,h[13],4,681279174),n=hh(n,i,g,r,h[0],11,-358537222),r=hh(r,n,i,g,h[3],16,-722521979),g=hh(g,r,n,i,h[6],23,76029189),i=hh(i,g,r,n,h[9],4,-640364487),n=hh(n,i,g,r,h[12],11,-421815835),r=hh(r,n,i,g,h[15],16,530742520),i=ii(i,g=hh(g,r,n,i,h[2],23,-995338651),r,n,h[0],6,-198630844),n=ii(n,i,g,r,h[7],10,1126891415),r=ii(r,n,i,g,h[14],15,-1416354905),g=ii(g,r,n,i,h[5],21,-57434055),i=ii(i,g,r,n,h[12],6,1700485571),n=ii(n,i,g,r,h[3],10,-1894986606),r=ii(r,n,i,g,h[10],15,-1051523),g=ii(g,r,n,i,h[1],21,-2054922799),i=ii(i,g,r,n,h[8],6,1873313359),n=ii(n,i,g,r,h[15],10,-30611744),r=ii(r,n,i,g,h[6],15,-1560198380),g=ii(g,r,n,i,h[13],21,1309151649),i=ii(i,g,r,n,h[4],6,-145523070),n=ii(n,i,g,r,h[11],10,-1120210379),r=ii(r,n,i,g,h[2],15,718787259),g=ii(g,r,n,i,h[9],21,-343485551),f[0]=add32(i,f[0]),f[1]=add32(g,f[1]),f[2]=add32(r,f[2]),f[3]=add32(n,f[3])}function cmn(f,h,i,n,r,g){return h=add32(add32(h,f),add32(n,g)),add32(h<<r|h>>>32-r,i)}function ff(f,h,i,n,r,g,t){return cmn(h&i|~h&n,f,h,r,g,t)}function gg(f,h,i,n,r,g,t){return cmn(h&n|i&~n,f,h,r,g,t)}function hh(f,h,i,n,r,g,t){return cmn(h^i^n,f,h,r,g,t)}function ii(f,h,i,n,r,g,t){return cmn(i^(h|~n),f,h,r,g,t)}function md51(f){txt="";for(var h=f.length,i=[1732584193,-271733879,-1732584194,271733878],n=64;n<=f.length;n+=64)md5cycle(i,md5blk(f.substring(n-64,n)));f=f.substring(n-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<f.length;n++)r[n>>2]|=f.charCodeAt(n)<<(n%4<<3);if(r[n>>2]|=128<<(n%4<<3),55<n)for(md5cycle(i,r),n=0;n<16;n++)r[n]=0;return r[14]=8*h,md5cycle(i,r),i}function md5blk(f){for(var h=[],i=0;i<64;i+=4)h[i>>2]=f.charCodeAt(i)+(f.charCodeAt(i+1)<<8)+(f.charCodeAt(i+2)<<16)+(f.charCodeAt(i+3)<<24);return h}var hex_chr="0123456789abcdef".split("");function rhex(f){for(var h="",i=0;i<4;i++)h+=hex_chr[f>>8*i+4&15]+hex_chr[f>>8*i&15];return h}function hex(f){for(var h=0;h<f.length;h++)f[h]=rhex(f[h]);return f.join("")}function md5(f){return hex(md51(f))}function add32(f,h){return f+h&4294967295}{function add32(f,h){var i=(65535&f)+(65535&h);return(f>>16)+(h>>16)+(i>>16)<<16|65535&i}md5("hello")}

window.hzmr.push("md5:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End md5.js  **************/
/************* Start lightboxStaticConfig.js for locale en-US **************/
try {HZ.ns("HZ.lb.Config"),HZ.lb.Config.contentGroupIds={OVERVIEW:"overview",PRODUCTS:"products",INFO:"info",DISCUSSION:"discussion",COLOR_PICKER:"color-picker",IDEABOOKS:"ideabooks"},HZ.lb.Config.contentGroups=[{id:HZ.lb.Config.contentGroupIds.OVERVIEW,title:_hgt("Overview"),iconClass:"hzi-Houzz-Photo"},{id:HZ.lb.Config.contentGroupIds.PRODUCTS,title:_hgt("Products"),iconClass:"hzi-Tag"},{id:HZ.lb.Config.contentGroupIds.INFO,title:_hgt("More Info"),iconClass:"hzi-info-icon-solid"},{id:HZ.lb.Config.contentGroupIds.DISCUSSION,title:_hgt("Questions, Comments and Reviews"),iconClass:"hzi-Comments-Advice"},{id:HZ.lb.Config.contentGroupIds.COLOR_PICKER,title:_hgt("ColorPicker"),iconClass:"hzi-paint-dropper"}],HZ.lb.Config.spaceContentGroupIds=[HZ.lb.Config.contentGroupIds.OVERVIEW,HZ.lb.Config.contentGroupIds.PRODUCTS,HZ.lb.Config.contentGroupIds.DISCUSSION,HZ.lb.Config.contentGroupIds.COLOR_PICKER],HZ.lb.Config.productContentGroupIds=[HZ.lb.Config.contentGroupIds.PRODUCTS,HZ.lb.Config.contentGroupIds.INFO,HZ.lb.Config.contentGroupIds.DISCUSSION];

window.hzmr.push("lightboxStaticConfig:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxStaticConfig.js  **************/
/************* Start lightboxContext.js for locale en-US **************/
try {HZ.lb.Context=function(t,e,s,n,r,i,a,o){var u,h,c=t,d=e,l=s,p=i,f=n,g=a,I=o,v=r,x={},S={};for(h in f)x[f[h]]=!0;var A=!1;this.getName=function(){return c},this.getType=function(){return d},this.getDescriptor=function(){return l},this.getTotalSpacesCount=function(){return v},this.containsSpaceId=function(t){return x[t]},this.getCurrentSpaceId=function(){return f[p]},this.setCurrentSpaceToLast=function(){f.length&&this.setCurrentSpaceId(f[f.length-1])},this.setCurrentSpaceId=function(t){for(var e=0;e<f.length;e++)if(f[e]==t)return p=e,!0;return!1},this.getNextSpaceIds=function(t){for(var e,s,n=[],r=(s=p+(e=0<(t=t||1)?1:-1))+t,i=s;i!=r;i+=e)i<f.length&&0<=i&&n.push(f[i]);return n},this.getCursorPosition=function(){return{cursor:p,spacesCount:f.length}},this.hasNext=function(){return!A&&p>=f.length-5&&-1!=this.getNextPosition()&&this.getNextPhotoIds(),p<f.length-1},this.hasPrevious=function(){return 0<p},this.next=function(){return this.hasNext()?f[++p]:null},this.previous=function(){return this.hasPrevious()?f[--p]:null},this.getNextPosition=function(){return g},this.getBasePosition=function(){return I},this.getNextPhotoIds=function(){A=!0,HZ.ajaz.Services.getNextSpaces(this.getType(),l,this.getNextPosition(),$.proxy(this.handleData,this))},this.registerOwner=function(t){u=t},this.unregisterOwner=function(){u=null},this.removeCurrentSpace=function(){var t,e=f.splice(p,1);e&&e.length&&(delete x[e[0]],-1<g&&g--,v--),this.hasNext()?t=f[p+1]:this.hasPrevious()&&(t=f[p-1]),t&&this.setCurrentSpaceId(t)},this.removeSpaceBySpaceId=function(t){this.setCurrentSpaceId(t)&&this.removeCurrentSpace()},this.stashAndReplaceCurrentSpaceId=function(t){var e=this.getCurrentSpaceId();this.containsSpaceId(e)&&(S[p]=e),f[p]=t},this.unstashSpaces=function(){for(var t in S)f[t]=S[t];S={}},this.handleData=function(t){if(HZ.lb.Utils.validateData(t),t.results.context){f=f.concat(t.results.context.spaceIds);for(var e=0;e<t.results.context.spaceIds.length;e++)x[t.results.context.spaceIds[e]]=!0;if(g=t.results.context.nextpos,HZ.data.Spaces.addAll(t.results.spaces),HZ.data.Images.addAll(t.results.images),HZ.data.Users.addAll(t.results.users),HZ.data.ProductsInfo.addAll(t.results.productInfo),t.results.photoAds)for(var s in t.results.photoAds)HZ.data.PhotoAds.put(s,t.results.photoAds[s]);if(t.results.paidProAds)for(var s in t.results.paidProAds)HZ.data.PaidProAds.put(s,t.results.paidProAds[s]);if(t.results.proListAd)for(var s in t.results.proListAd)HZ.data.ProListAds.put(s,t.results.proListAd[s]);HZ.data.HouzzClkTracking.addAll(t.results.houzzClkTracking),HZ.data.HouzzImpTracking.addAll(t.results.houzzImpTracking),A=!1,u&&u.handleContextChanged()}}};

window.hzmr.push("lightboxContext:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxContext.js  **************/
/************* Start lightboxUtils.js for locale en-US **************/
try {HZ.lb.Utils={connect:function(){this.firstSpaceId=-1;var e,r=function(e,o){return $.grep(e,function(e){return-1!==$.inArray(e,o)})},d=function(e){var o=[];o.push(e);e=$(e).parents().toArray();return o=o.concat(e)},u=0,o=$("#lb-parent");0!=o.length||(e=$("body").find("[lb-context]").toArray()).length&&(o=$(function(e){if(!e||!e.length)return null;if(1===e.length)return e[0];for(var o,t=e[0],s=d(t),i=1;i<e.length;i++)o=d(e[i]),s=r(s,o);return s[0]}(e))),o.length&&(o.data("lb-connected")||(o.on("click","[lb-edit], [lb-edit-tag], [lb-view], [lb-sid]",function(e){var o,t,s;if((!e.target||"function"!=typeof e.target.getAttribute||!e.target.getAttribute("lb-bypass"))&&!lightbox.isShowing()){var i,r=$(e.target),d=r.closest("[lb-sid]").attr("lb-sid"),a=r.closest("[lb-context]"),c=a.attr("lb-context"),n=null,l=HZ.data.Contexts.get(c);if(""==c&&(i=a.find("[lb-sid]").map(function(){return $(this).attr("lb-sid")}),c="dyn_"+u++,o=i,t=c,s=HZ.lb.Config.CONTEXT_NAME_ARBITRARY_SPACES,i=o.length,s=new HZ.lb.Context(t,s,{},o,i,1,-1),0<i&&s.setCurrentSpaceId(o[0]),HZ.data.Contexts.put(t,s),l=s,a.attr("lb-context",c)),r.closest("[lb-edit-tag]").length?n="edit-tag":r.closest("[lb-edit]").length?n="edit":r.closest("[lb-view]").length&&(n="view"),(HZ.lb.Utils.firstSpaceId=d)&&HZ.data.Spaces.get(d)&&l.containsSpaceId(d)&&n)return!(!e.ctrlKey&&!e.metaKey)||(e.preventDefault(),"edit"===n?lightbox.showSpaceEditor(d,c):"edit-tag"===n?(void 0===(n=r.data("id"))&&(n=(r=r.parent()).data("id")),lightbox.showSpaceTagEditor(d,c,n)):lightbox.show(d,c),!1)}}),o.data("lb-connected",!0)))},validateData:function(e){e&&"false"==e.success&&e.error==HZ.ajaz.Services.ERROR_VERSION_MISMATCH&&alert(_hgt("Browse session expired. Please refresh the page."))},trackedUrls:{},currentSpaceId:null,registerTrackingUrl:function(e,o){var t=!0,s=md5(e);o!=this.currentSpaceId&&(this.trackedUrls[this.currentSpaceId]={},this.currentSpaceId=o),this.trackedUrls[o]||(this.trackedUrls[o]={}),this.trackedUrls[o][s]?t=!1:this.trackedUrls[o][s]=e,t&&((new Image).src=e)},lightboxEditorLoaded:!1,notifyLightboxOnLoad:!1,enableEditTag:!1,loadLightboxEditor:function(e,o){this.lightboxEditorLoaded||this.notifyLightboxOnLoad||(e&&(this.notifyLightboxOnLoad=!0),o&&(this.enableEditTag=!0),HZ.utils.ResourceLoader.requireLightbox2EditResources($.proxy(this.setLightboxEditorLoaded,this)))},setLightboxEditorLoaded:function(){this.lightboxEditorLoaded=!0,this.notifyLightboxOnLoad&&(lightbox.setEditMode(!0),this.enableEditTag&&lightbox.setEditTagMode(this.enableEditTag),lightbox.refresh(),lightbox.handleResize())},videoResourcesLoading:!1,videoResourcesLoaded:!1,videoResourcesLoadedCallbacks:[],loadVideoResources:function(e){var o=-1!==this.videoResourcesLoadedCallbacks.indexOf(e);"function"!=typeof e||o||this.videoResourcesLoadedCallbacks.push(e),this.videoResourcesLoaded||this.videoResourcesLoading||(this.videoResourcesLoading=!0,HZ.utils.ResourceLoader.requireLightbox2VideoResources(this.handleVideoResourcesLoaded.bind(this)))},handleVideoResourcesLoaded:function(){this.videoResourcesLoading=!1,this.videoResourcesLoaded=!0,0<this.videoResourcesLoadedCallbacks.length&&this.videoResourcesLoadedCallbacks.forEach(function(e){e()})},isLoadingVideoResources:function(){return this.videoResourcesLoading},colorPickerResourcesLoading:!1,colorPickerResourcesLoaded:!1,colorPickerResourcesLoadedCallback:$.noop,loadColorPickerResources:function(e){e&&(this.colorPickerResourcesLoadedCallback=e),this.colorPickerResourcesLoaded||this.colorPickerResourcesLoading||(this.colorPickerResourcesLoading=!0,HZ.utils.ResourceLoader.requireLightboxColorPickerResources(this.handleColorPickerResourcesLoaded.bind(this)))},handleColorPickerResourcesLoaded:function(){this.colorPickerResourcesLoading=!1,this.colorPickerResourcesLoaded=!0,this.colorPickerResourcesLoadedCallback&&this.colorPickerResourcesLoadedCallback()},feedCommentsResourcesLoading:!1,feedCommentsResourcesLoaded:!1,feedCommentsResourcesLoadedCallback:$.noop,loadFeedCommentsResources:function(e){e&&(this.feedCommentsResourcesLoadedCallback=e),this.feedCommentsResourcesLoaded||this.feedCommentsResourcesLoading||(this.feedCommentsResourcesLoading=!0,HZ.utils.ResourceLoader.requireLightboxFeedCommentsResources(this.handleFeedCommentsResourcesLoaded.bind(this)))},handleFeedCommentsResourcesLoaded:function(){this.feedCommentsResourcesLoading=!1,this.feedCommentsResourcesLoaded=!0,this.feedCommentsResourcesLoadedCallback&&this.feedCommentsResourcesLoadedCallback()},returnPolicyResourcesLoading:!1,returnPolicyResourcesLoaded:!1,loadReturnPolicyResources:function(){this.returnPolicyResourcesLoaded||this.returnPolicyResourcesLoading||(this.returnPolicyResourcesLoading=!0,HZ.utils.ResourceLoader.requireReturnPolicyResources(this.handleReturnPolicyResourcesLoaded.bind(this)))},handleReturnPolicyResourcesLoaded:function(){this.returnPolicyResourcesLoaded=!0,this.returnPolicyResourcesLoading=!1},warrantyResourcesLoading:!1,warrantyResourcesLoaded:!1,loadWarrantyResources:function(){this.warrantyResourcesLoaded||this.warrantyResourcesLoading||(this.warrantyResourcesLoading=!0,HZ.utils.ResourceLoader.requireWarrantyResources(this.handleWarrantyResourcesLoaded.bind(this)))},handleWarrantyResourcesLoaded:function(){this.warrantyResourcesLoaded=!0,this.warrantyResourcesLoading=!1},loadImage:function(e,o){$("<img>").one("load",o).attr("src",e).each(function(){this.complete&&$(this).trigger("load")})},calculateThumbWidth:function(e,o,t){return Math.max(30,Math.ceil(e/o-t+t/o))}};

window.hzmr.push("lightboxUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxUtils.js  **************/
/************* Start lightbox2.2.js for locale en-US **************/
try {HZ.ns("HZ.lb.Config"),HZ.ns("HZ.lb.plugins"),HZ.lb.Notifier=function(){var n=[];this.addListener=function(t){n.push(t)},this.removeListener=function(t){for(var e=0,i=n.length;e<i;e++)if(n[e]==t)return n.splice(e,1)},this.notifyListeners=function(t){for(var e=0,i=n.length;e<i;e++)t.apply(n[e])}},HZ.lb.ActionBar={ACTION_BAR_LEFT:"Left",ACTION_BAR_CENTER:"Center",ACTION_BAR_RIGHT:"Right"},HZ.lb.Lightbox=function(){this.SPACE_TYPE="space",this.PRODUCT_TYPE="product",this.VIDEO_TYPE="video";var s,e,n,i,o,a,r,d,l,c,h,u,g,p,f,b,t,m,C,v,I,P,S,H,w,E,Z,x,y,T,A,M,k,L,D,R,_,B,z,O,V,N,G,U,j,F,Y={x:0,y:0,w:0,h:0,src:""},K={x:0,y:0,w:640,h:640},X=0,q="pluginAfterShown",W="contextChanged",J="imageChanged",Q="lightboxModeChanged",tt="saveData",et=null,it=null,nt=null,st=!0,ot=!1,at=[];this.showVisualMatchTag=!0,this.showProPerception=!0,this.init=function(){b||(e=new HZ.lb.Notifier,u=$(window),g=$(document),p=$(document.body),(b=$('<div id="lbRoot" scopeId="lightbox" style="display:none;">').prependTo(p).addClass("hidden").append('<div id="lbBg"></div><div id="lbMain" class="space"><div id="lbImageContainer"><div id="lbImage"><div id="lbActions" class="trackMe row click-through"><div id="lbActionsLeft" class="col-xs-3 click-through"></div><div id="lbActionsCenter" class="col-xs-6 text-center text-nowrap click-through"></div><div id="lbActionsRight" class="col-xs-3 text-right text-nowrap click-through"></div></div></div><div id="lbImageControls"></div><div id="lbImageLayer"></div><div id="lbNavDiv" class="click-through"><div id="lbBreadcrumbs" class="trackMe"></div><div id="lbLeft" class="lbNavigation nav-arrow trackMe" compid="navLeft"><div class="hzi-font hzi-Left-Arrow"></div></div><div id="lbRight" class="lbNavigation nav-arrow trackMe bounce" compid="navRight"><div class="hzi-font hzi-Right-Arrow"></div></div></div></div><div id="lbInfo"><div class="content-mask"><div class="content-scroll"><div class="content-body"><div class="content-footer"></div></div></div><div class="content-scroll-bar"><div class="scroll-bar"></div></div></div><div id="lbInfoTabs"></div><div class="content-fixed"></div></div><div id="lbMainControls" class="trackMe"><div id="lbClose"><a class="lbCloseButton" href="javascript:;" compid="lbCloseButton"><i class="icon icon-font icon-close"></i></a></div></div><div id="lbOverlay"></div></div>')).toggleClass("view-space",this.isViewSpace()),t=$("#lbBg")[0],S=$("#lbImageContainer"),H=$("#lbImage"),w=H.get(0),E=$("#lbImageLayer")[0],x=$("#lbBreadcrumbs")[0],Z=$("#lbImageControls")[0],m=$("#lbMain"),C=m[0],v=$("#lbInfo"),v[0],y=v.find(".content-mask"),T=v.find(".content-scroll"),A=v.find(".content-body"),M=v.find(".content-footer"),v.find(".content-scroll-bar"),L=v.find(".scroll-bar"),k=v.find(".content-fixed"),I=$("#lbInfoTabs"),$("#lbMainControls"),P=$("#lbClose"),D=$("#lbOverlay"),B=T.get(0),$(t).click($.proxy(function(){this.isEditMode()||this.hide()},this)),s=new HZ.lb.PluginsController,this.addPlugin(s),H.hover(this.handleImageMouseOver.bind(this),this.handleImageMouseOut.bind(this)),P.click(this.handleCloseClick.bind(this)),A.on("mouseenter",this.showScrollbar.bind(this)),g.on("wheel","#lbImageContainer, #lbInfo .content-scroll-bar, #lbInfo .content-fixed",this.handleMouseWheel.bind(this)),g.on("mousedown","#lbInfo .content-scroll-bar",this.onScrollbarDragStart.bind(this)),b.on("contextmenu",".lbImageView",function(t){t.preventDefault(),HZ.lb.plugins.SpaceActions.handleEmbed()}),this.measureScrollbar(),this.hideNativeScrollbar(),this.measureContentBox(),o={},this.setContentGroups(HZ.lb.Config.contentGroups),O=new MutationObserver(this.handleContentMutation.bind(this)),void 0===HZ.feedComments&&HZ.lb.Utils.loadFeedCommentsResources(),HZ.ns("HZ.module"),void 0===HZ.module.ReturnPolicy&&HZ.lb.Utils.loadReturnPolicyResources(),void 0===HZ.module.Warranty&&HZ.lb.Utils.loadWarrantyResources(),HZ.lb.Config.preloadEditorResources&&HZ.lb.Utils.loadLightboxEditor(!1),HZ.lb.Config.enableColorPicker&&HZ.lb.Utils.loadColorPickerResources(),HZ.lb.Config.enableTagsRedesign&&S.addClass("lbImageContainer-with-new-tags"))},this.setExpandedMode=function(t){l=!!t,m.toggleClass("expanded",l),this.isShowing()&&(this.setTransitionMode(),this.registerTimeout("expand",function(){this.unsetTransitionMode(),this.handleResize()}.bind(this),251))},this.getExpandedMode=function(){return l},this.setContractedMode=function(e,i){var t;return $.isNumeric(i)||(i=251),c==e&&et?et:(t=$.Deferred(function(t){c=!!e,m.toggleClass("contracted",c),this.setTransitionMode(),this.registerTimeout("contract",function(){this.unsetTransitionMode(),this.handleResize(),this.notifyPlugins(Q),t.resolve()}.bind(this),i)}.bind(this)),et=t.promise())},this.setTransitionMode=function(){var t="image-container--transition";S.hasClass(t)||S.addClass(t)},this.unsetTransitionMode=function(){S.removeClass("image-container--transition")},this.getContractedMode=function(){return c},this.resetContractedMode=function(){c=!1,m.removeClass("contracted"),et=null},this.handleContentMutation=function(t){this.registerTimeout("contentGroupsDebounce",this.calculateContentGroupPositions.bind(this),50),this.registerTimeout("scrollbarDebounce",this.resizeScrollbar.bind(this),50),this.registerTimeout("scrollPositionDebounce",this.correctScrollPositionAfterMutation.bind(this),50)},this.calculateContentGroupPositions=function(){r={},(this.isProduct()?HZ.lb.Config.productContentGroupIds:HZ.lb.Config.spaceContentGroupIds).forEach(function(t){var e,i=this.getNodeByContentGroupId(t);i&&i.length&&(i=(e=i.position().top)+i.height(),r[t]={top:e,bottom:i})}.bind(this))},this.getContentGroupPositions=function(){return r},this.correctScrollPositionAfterMutation=function(){V&&(this.jumpToSelector(V),V=null)},this.resizeScrollbar=function(){var t=f.h;this.measureContentHeight();var e=z<t;_=t/z*t-4,L.css({height:_+"px"}).toggleClass("hidden",e)},this.repositionScrollbar=function(){var t=f.h;this.measureContentHeight();t=this.getContentScrollTop()/z*t+2;L.css({top:t+"px"})},this.measureScrollbar=function(){return R=!$.isNumeric(R)?HZ.ui.Utils.measureScrollbar():R},this.measureContentHeight=function(){z=A.outerHeight()+M.outerHeight()},this.hideNativeScrollbar=function(){0===R?T.css({width:"calc(100% + 16px)",paddingRight:"16px"}):T.css({width:"calc(100% + "+R+"px)"})},this.onScrollbarDragStart=function(t){return G=t.pageY,U=B.scrollTop,g.on("mouseup.scrollbar",this.onScrollbarDragEnd.bind(this)),g.on("mousemove.scrollbar",this.onScrollbarDragMove.bind(this)),v.disableSelection(),m.addClass("scroll-drag"),t.preventDefault(),!1},this.onScrollbarDragMove=function(t){var e=t.pageY-G,i=f.h,t=z-i,i=i-_;0<t&&(B.scrollTop=U+e/(i/t)),clearSelection()},this.onScrollbarDragEnd=function(t){g.off(".scrollbar"),m.removeClass("scroll-drag"),v.enableSelection(),clearSelection()},this.measureContentBox=function(){f={w:T.width(),h:T.height()}},this.setContentGroups=function(t){(i=t).forEach(function(t,e){this.addContentGroup(t,e)}.bind(this)),a=0,this.notifyPlugins("contentGroupsChanged")},this.addContentGroup=function(t,e){var i=t.id;i&&(o[i]=t,t=A.find(".content-group"),i=$('<div class="content-group"></div>').attr("data-group-id",i).addClass(i),e<=t.length?A.append(i):A.eq(e).before(i))},this.getContentGroups=function(){return i},this.getContentGroupById=function(t){var e;return e=i?o[t]:e},this.getNodeByContentGroupId=function(t){return v.find(".content-group[data-group-id='"+t+"']")},this.setCurrentContentGroupIndex=function(t){var e=t!=a;a=t,e&&this.notifyPlugins("currentContentGroupChanged")},this.getCurrentContentGroupIndex=function(){return a},this.focusCurrentContentGroup=function(){v.find(".lbInfoBox").removeClass("scrolling scrolled");var t,e=this.getCurrentContentGroupId(),i=this.getContentGroupPositions()[e];i&&(t=this.getNodeByContentGroupId(e).find(".lbInfoBox").addClass("scrolling"),this.animateScrollTo(i.top,function(){t.removeClass("scrolling").addClass("scrolled")}.bind(this)))},this.getCurrentContentGroupId=function(){return(this.isProduct()?HZ.lb.Config.productContentGroupIds:HZ.lb.Config.spaceContentGroupIds)[a]},this.getContentFooter=function(){return M},this.handleImageMouseOver=function(t){N=!0,this.showScrollbar(),this.showSpaceActions()},this.handleImageMouseOut=function(t){N=!1,this.hideSpaceActions()},this.handleMouseWheel=function(t){var e=t.originalEvent.deltaY;t.originalEvent.deltaMode&&1==t.originalEvent.deltaMode&&(e*=20),B.scrollTop+=e},this.showSpaceActions=function(){ot||(this.unRegisterTimeout("hideSpaceActions"),$("#lbActions").removeClass("fade-out hide"),this.dimScrollbar(),this.notifyPlugins("actionsBarShown")),$("#lbActions").addClass(" lbActions-white")},this.fadeOutSpaceActions=function(){$("#lbActions").addClass("fade-out")},this.disableSpaceActions=function(){$("#lbActions").addClass("hide")},this.hideSpaceActions=function(t){st&&this.registerTimeout("hideSpaceActions",function(){N||(this.fadeOutSpaceActions(),this.showScrollbar.bind(this),this.notifyPlugins("actionsBarHidden"))}.bind(this),750)},this.setAutoHideSpaceActionsEnabled=function(t){st=t},this.setSpaceActionsDisabled=function(t){ot=t},this.enterColorPickerMode=function(){j||($("#lbMain").addClass("color-picker"),j=!0,this.notifyPlugins(Q))},this.enterColorPickerModeWithData=function(t,e,i){F={spaceId:t,palette:e,locations:i},this.enterColorPickerMode()},this.exitColorPickerMode=function(){j&&($("#lbMain").removeClass("color-picker"),j=!1,this.notifyPlugins(Q))},this.isColorPicking=function(){return j},this.getColorPickerData=function(){return F&&F.spaceId==this.getCurrentSpace().id?F:null},this.handleImageDivClick=function(t){var e=this.getImageBounds();HZ.lb.Config.zoomOnImageClick?t.pageX>.9*e.w+e.x?this.next():t.pageX<.1*e.w+e.x&&this.previous():t.pageX>.2*e.w+e.x?this.next():this.previous()},this.lightboxEditorEnabled=!1,this.isSignupMode=function(){if(!HZ.data.CurrentSessionUser)return!0},this.show=function(t,e){this.resetContext(),HZ.events&&(HZ.events.subscribe(this,"search:start",this.detachKeyboardHandler.bind(this)),HZ.events.subscribe(this,"search:stop",this.attachKeyboardHandler.bind(this)),HZ.events.subscribe(this,"quantity:start",this.detachKeyboardHandler.bind(this)),HZ.events.subscribe(this,"quantity:stop",this.attachKeyboardHandler.bind(this)));e=HZ.data.Contexts.get(e);e.setCurrentSpaceId(t),this.pushContext(e),b.removeAttr("style"),this.notifyPlugins("lightboxLoaded"),p.parent("html").addClass("lbHtml lbLockScroll"),u.on("resize.lightbox orientationchange.lightbox",$.throttle(50,this.handleResize.bind(this))),u.on("beforeunload.lightbox",$.proxy(this.handleBeforeUnload,this)),this.attachKeyboardHandler(),T.on("scroll.lightbox",$.throttle(5,this.handleScroll.bind(this))),b.removeClass("hidden"),d=!0,this.handleResize(!0),this.showScrollbar(),this.measureContentBox(),this.calculateContentGroupPositions(),O.observe(A.get(0),{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),$("#stickyFooterActions").addClass("lbView disabled"),HZ.utils.Logger.logCountInTSDB("exp","lb_view",1,"ux")},this.hide=function(){var t;if(HZ.events&&HZ.events.unsubscribe(this),"undefined"!=typeof imageTagsObj&&this.isEditMode()&&(t=this.getCurrentSpace(),updateImageTags(t.id)),this.isEditMode())return this.exitEditMode($.proxy(this.hide,this));this.exitColorPickerMode(),n[n.length-1].unstashSpaces(),this.setSelectedListingId(null),this.resetScroll(),d=!1,b.addClass("hidden"),this.notifyPlugins("lightboxUnloaded"),u.off(".lightbox"),this.detachKeyboardHandler(),O.disconnect(),p.parent("html").removeClass("lbHtml"),HZ.message.Bus.broadcast(HZ.message.Messages.LIGHTBOX_UNLOAD),$("#stickyFooterActions").removeClass("lbView")},this.showScrollbar=function(){L.removeClass("fade-out")},this.dimScrollbar=function(){L.addClass("fade-out")},this.resetScroll=function(){a=0,B.scrollTop=0},this.handleScroll=function(t){this.repositionScrollbar(),this.showScrollbar(),this.registerTimeout("dimScrollbar",this.dimScrollbar.bind(this),750),this.notifyPlugins("lightboxScroll")},this.getContentMask=function(){return y},this.getContentScrollTop=function(){return B.scrollTop},this.getContentBox=function(){return f},this.scrollToTop=function(t){T.stop().animate({scrollTop:0},250,"easeOutSine",callback)},this.scrollToSelector=function(t,e){t=$(t);if(t&&t.length){for(var i=t.position().top,n=t.offsetParent().get(0);n!==B;){var s=$(n);if("html"===s.prop("tagName").toLowerCase())break;s&&s.position()&&(i+=s.position().top),n=s.offsetParent().get(0)}$.isNumeric(i)&&this.animateScrollTo(i,e)}},this.animateScrollTo=function(t,e){T.stop().animate({scrollTop:t},250,"easeOutSine",e)},this.jumpToSelector=function(t){var e=$(t);e&&(V=t,e=e.position().top+B.scrollTop,T.stop().scrollTop(e))},this.switchType=function(t){if(t!=h){switch(m.removeClass("product space video"),HZ.lb.Config.wideProductColumnEnabled&&m.addClass("lb-main--wide-info-column"),t){case this.PRODUCT_TYPE:m.addClass("product");break;case this.VIDEO_TYPE:m.addClass("space video");break;default:this.SPACE_TYPE;m.addClass("space")}h=t}},this.getLbType=function(){return h},this.setImageData=function(t){Y=t},this.getImageData=function(){return $.extend(Y,K)},this.showSpaceTagEditor=function(t,e,i){this.setEditTagId(i),X=4,HZ.lb.Utils.loadLightboxEditor(!0),this.setEditTagMode(!0),this.show(t,e)},this.showSpaceEditor=function(t,e){X=2,HZ.lb.Utils.loadLightboxEditor(!0),this.setEditMode(!0),this.show(t,e)},this.isShowing=function(){return d},this.showDialog=function(t){this.detachKeyboardHandler(),HZ.ui.Yamdi.show(t,this.attachKeyboardHandler.bind(this))},this.showLoginDialog=function(t,e,i){this.detachKeyboardHandler(),t=t||HZ.lb.Config.SIGNUP_TRACKING_OTHER,HZ.auth.Manager.signup(t,e,null,this.attachKeyboardHandler.bind(this),i)},this.invokeSignupAndThenActionDialog=function(t,e,i,n){var s=t.id,o=null;t&&t.iids&&t.iids[0]&&(o=t.iids[0]);var a=this,n=JSON.stringify({houseId:s,redirectUrl:window.location.href,imageId:o,buttonType:n});HZ.ajaz.Services.setVisitorProperty("postSignupHouseId",n,function(t){a.showLoginDialog(e,i,null)})},this.isSketch=function(){var t=this.getCurrentSpace();return t&&t.cat==HZ.lb.Config.SKETCHES_CATEGORY_ID},this.isEditMode=function(){return this.lightboxEditorEnabled&&0<X},this.isEditTagMode=function(){return this.lightboxEditorEnabled&&3<=X},this.getEditTagId=function(){return it},this.setEditTagId=function(t){it=t},this.setEditTagMode=function(t){this.lightboxEditorEnabled&&(X=t?4==X?4:3:0,t=$(document.body.parentNode),b.add(t).toggleClass("lbEditMode",!!this.isEditMode()))},this.setEditMode=function(t){var e;this.lightboxEditorEnabled&&(X=t?X||1:0,e=$(document.body.parentNode),b.add(e).toggleClass("lbEditMode",!!this.isEditMode()),t&&this.notifyPlugins("editModeShown"))},this.finalizeBeforeSaveOrDiscard=function(){this.notifyPlugins("beforeSaveOrDiscard")},this.exitEditMode=function(t){if(t||2!=X&&4!=X||(t=$.proxy(this.hide,this)),this.finalizeBeforeSaveOrDiscard(),this.hasChanges())return HZ.ui.Yamdi.hide(),HZ.lb.ConfirmSaveDialog.onDiscardClicked=$.proxy(function(){this.notifyPlugins("discardData"),this.setEditMode(!1),HZ.ui.Yamdi.hide(),this.handleResize(),this.refresh(),t&&t()},this),HZ.lb.ConfirmSaveDialog.onSaveClicked=$.proxy(function(){this.notifyPlugins(tt),this.setEditMode(!1),HZ.ui.Yamdi.hide(),this.handleResize(),this.refresh(),t&&t()},this),this.showDialog(HZ.lb.ConfirmSaveDialog);this.setEditMode(!1),this.handleResize(),this.refresh(),t&&t()},this.hasChanges=function(){return HZ.lb.plugins.EditSpaceDataManager&&HZ.lb.plugins.EditSpaceDataManager.isDirty()},this.handleBeforeUnload=function(){if(this.isEditMode()&&this.hasChanges())return _hgt("You have unsaved changes. Are you sure?")},this.attachKeyboardHandler=function(){var t="keydown.lightbox";$(document).off(t).on(t,$.proxy(this.handleKeyDown,this))},this.detachKeyboardHandler=function(){$(document).off("keydown.lightbox")},this.handleKeyDown=function(t){var e=$(t.target),i=this.isEditMode(),n=t.ctrlKey;if("keydown"==t.type)switch(t.keyCode){case 27:this.isViewSpace()||(e.trigger("blur"),this.hide());break;case 221:if(n)return e.trigger("blur"),this.next(),!1;break;case 219:if(n)return e.trigger("blur"),this.previous(),!1;break;case 83:if(n)return setTimeout($.proxy(function(){this.notifyPlugins(tt)},this),100),e.trigger("blur"),t.preventDefault(),!1;break;case 32:case 39:if(!i)return this.next(),!1;break;case 37:if(!i)return this.previous(),!1;break;case 69:if(!i&&n)return HZ.lb.plugins.SpaceActions.handleEdit(),!1}},this.handleCloseClick=function(t){return t.stopPropagation(),this.hide(),!1},this.registerTimeout=function(t,e,i){this.timeouts||(this.timeouts={}),null!=this.timeouts[t]&&(clearTimeout(this.timeouts[t]),this.timeouts[t]=null),this.timeouts[t]=setTimeout(function(){this.timeouts[t]=null,e()}.bind(this),i)},this.unRegisterTimeout=function(t){this.registerTimeout(t,$.noop,0)},this.refresh=function(t){t||this.setSelectedListingId(null),this.notifyPlugins(J)},this.reload=function(t,e){var i=this.getContext();null!=e&&1<=e.length&&e[0]!=i.getName()&&this.recreateContextStack(e),i.setCurrentSpaceId(t),this.refresh()},this.addPlugin=function(t){e.addListener(t),t.setOwner(this)},this.removePlugin=function(t){e.removeListener(t),t.setOwner(null)},this.addImageLayer=function(t){$(w).prepend(t)},this.addLbImageLayer=function(t){return $(E).append(t)},this.addBreadcrumbs=function(t){$(x).append(t)},this.addImageControl=function(t){$(Z).append(t)},this.addInfoBoxToContentGroup=function(t,e,i){var n;e&&i&&((n=!(n=this.getNodeByContentGroupId(i)).length?$("<div class='content-group'></div>").attr("data-group-id",i).addClass(i).appendTo(A):n).append(t),s.registerContent(e,t))},this.addSpaceEditorBox=function(t,e){e&&($("#lbEditContent").append(t),s.registerContent(e,t))},this.addActionItem=function(t,e,i){e=$("#lbActions"+e);$.isNumeric(i)&&i<e.children().length?e.children().eq(i).before(t):(i=e.children().last()).hasClass("keep-last")?i.before(t):e.append(t)},this.addMoreMenuItem=function(t){var e=$("<i>").addClass(t.iconClass).addClass("lb-more-menu-item-icon"),e=$('<li class="lb-more-menu-item">').append(e).append(t.label);return void 0!==t.index&&e.attr("index",t.index),t.handler&&e.click(t.handler),t.compId&&e.attr("compId",t.compId),at.push(e),e},this.toggleMoreMenu=function(t){var e;0<$("#lbMoreMenu:visible").length?this.hideMoreMenu:(t&&t.stopPropagation(),e=$('<ul class="lb-more-menu-content list-unstyled trackMe">'),0===$(".lb-more-menu-content").length&&at.sort(function(t,e){return(void 0!==t.attr("index")?t.attr("index"):at.length)-(void 0!==e.attr("index")?e.attr("index"):at.length)}),at.forEach(function(t){e.append(t)}),$("#lbMoreMenuBtn").tipBubble({content:e,id:"lbMoreMenu",width:160,offsetX:-120,offsetY:0,showCloseBtn:!1,position:"absolute",bubblePadding:0,fadeDuration:0,point:"south",attachTo:$("#lbImageContainer")}),$(document).on("click",this.hideMoreMenu.bind(this)),this.setAutoHideSpaceActionsEnabled(!1))},this.hideMoreMenu=function(){$("#lbMoreMenuBtn").tipBubble("hide"),this.setAutoHideSpaceActionsEnabled(!0)},this.addFixedContent=function(t,e){e&&(k.append(t),s.registerContent(e,t))},this.addOverlaidContent=function(t){D.append(t)},this.notifyPlugins=function(t){e.notifyListeners(function(){this[t]&&this[t]()}),this.onBeforeContentUpdate(t),s.updateContents(),e.notifyListeners(function(){this[q]&&this[q](t)})},this.onBeforeContentUpdate=function(t){t},this.resetContext=function(){n=[]},this.recreateContextStack=function(t){this.resetContext();for(var e=0;e<t.length;e++){var i=HZ.data.Contexts.get(t[e]);i&&n.push(i)}this.notifyPlugins(W)},this.pushContext=function(t){n[0]&&n[0].unregisterOwner(),n.unshift(t),t.registerOwner(this),HZ.data.Contexts.get(t.getName())||HZ.data.Contexts.put(t.getName(),t),this.notifyPlugins(W)},this.popContext=function(){var t;1!=n.length&&((t=n.shift())&&t.unregisterOwner(),n[0]&&n[0].registerOwner(this),this.notifyPlugins(W))},this.getSpaceImage=function(t,e){var i=this.getContext(),n=null;return e=e||0,i&&t&&i.getCurrentSpaceId()&&(e=t.iids[e],n=HZ.data.Images.get(e)),n},this.setSelectedListingId=function(t){nt=t},this.getSelectedListingId=function(){var t=this.getCurrentSpace().id,e=HZ.data.ProductsInfo.get(t);if(!(nt=HZ.lb.Config.spaceIdToVendorListingIdOverride&&HZ.lb.Config.spaceIdToVendorListingIdOverride[t]?HZ.lb.Config.spaceIdToVendorListingIdOverride[t]:nt)&&e){for(var i=HZ.data.SpaceListingIds.get(t),n=i?i.length:0,s=0;s<n;s++){var o=i[s];if(o==e.plid){this.setSelectedListingId(o);break}}!nt&&i&&i[0]&&this.setSelectedListingId(i[0])}return nt},this.isColorPickerSavedPalette=function(){var t=this.getCurrentSpace();return t.hasOwnProperty("srcs")&&0!==parseInt(t.srcs)},this.isFullPageAd=function(){return this.isPaidProAd()||this.isPhotoAd()||this.isProListAd()},this.isBrandAdvertiser=function(){var t=this.getCurrentSpace();return!!HZ.data.Users.get(t.ow)&&!!HZ.data.Users.get(t.ow).ba},this.getContext=function(){return n?n[0]:null},this.getContextType=function(){return this.getContext().getType()},this.getContextStack=function(){return n},this.getCurrentSpace=function(){var t,e=this.getContext();return e&&(t=e.getCurrentSpaceId())?HZ.data.Spaces.get(t):null},this.isViewSpace=function(){return HZ.lb.Config.isViewSpace||!1},this.isPaidProAd=function(){var t=this.getCurrentSpace();return!!HZ.data.PaidProAds.get(t.id)},this.isPhotoAd=function(){var t=this.getCurrentSpace(),t=HZ.data.PhotoAds.get(t.id);return t&&t.products&&t.products.length},this.isProductAd=function(){var t=this.getCurrentSpace(),t=HZ.data.ProductAds.get(t.id);return!this.isPhotoAd()&&t&&t.products&&t.products.length},this.isMarketPlaceAd=function(){var t=this.getCurrentSpace(),t=HZ.data.PhotoAds.get(t.id);return this.isPhotoAd()&&t.mpAd},this.isProListAd=function(){var t=this.getCurrentSpace();return!!HZ.data.ProListAds.get(t.id)},this.isAdvertiseSpace=function(){return this.isPaidProAd()||this.isPhotoAd()||this.isProductAd()||this.isProListAd()},this.isMarketplaceProduct=function(){var t,e=this.getCurrentSpace();return e&&(t=HZ.data.ProductsInfo.get(e.id)),e&&t&&t.mp},this.isPPCProduct=function(){var t=this.getCurrentSpace(),t=t?HZ.data.PPCAds.get(t.id):{};return t&&t.isPPCProduct},this.isProduct=function(){var t=this.getCurrentSpace();return t&&t.prod},this.isFile=function(){var t=this.getCurrentSpace();return t&&t.ift},this.isGalleryContext=function(){return!!this.getCurrentSpaceGallery()&&this.getContextType()==HZ.lb.Config.CONTEXT_TYPE_IDEABOOK},this.isProjectContext=function(){return!!this.getCurrentSpaceProject()&&this.getContextType()==HZ.lb.Config.CONTEXT_TYPE_PROJECT},this.isProProjectContext=function(){var t=this.getCurrentSpace(),t=HZ.data.Users.get(t.ow);return t&&"1"==t.p&&this.isProjectContext()},this.isRecommendationsContext=function(){return this.getContextType()==HZ.lb.Config.CONTEXT_TYPE_SPACE_RECOMMENDATIONS},this.isSpotlightContext=function(){var t=this.getContext().getDescriptor(),e=this.isGalleryContext(),i=this.getContextType()==HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS,e=(e||i)&&t[HZ.lb.Config.DESCRIPTOR_FIELD_IS_SPOTLIGHT_GALLERY],t=1<this.getContextStack().length?this.getContextStack()[1]:null,t=!!t&&t.getDescriptor()[HZ.lb.Config.DESCRIPTOR_FIELD_IS_SPOTLIGHT_GALLERY];return e||i&&t},this.getCurrentSpaceProject=function(){var t=this.getCurrentSpace();return HZ.data.Projects.get(t.pid)},this.getCurrentSpaceGallery=function(){var t=this.getContext().getDescriptor();return HZ.data.Galleries.get(t[HZ.lb.Config.DESCRIPTOR_FIELD_GALLERY_ID])},this.isFeaturedGalleryContext=function(){var t=this.getContext();return this.isGalleryContext&&t.getDescriptor()[HZ.lb.Config.DESCRIPTOR_FIELD_IS_GALLERY_FEATURED]},this.getSpaceDescription=function(){var t,e,i=this.getCurrentSpace(),n=i.c;return n||(t=HZ.data.ProductsInfo.get(i.id),n=(e=HZ.data.ListingsInfo.get(this.getSelectedListingId()))?e?e.desc:"":t?t.desc:""),n=n||i.desc},this.next=function(){this.setSelectedListingId(null),this.getContext().next()&&this.handleImageChanged()},this.previous=function(){this.setSelectedListingId(null),this.getContext().previous()&&this.handleImageChanged()},this.handleImageChanged=function(){this.setTransitionMode(),this.setSpaceActionsDisabled(!1),this.resetContractedMode(),this.resetScroll(),this.showScrollbar(),this.exitColorPickerMode(),this.notifyPlugins(J),HZ.utils.Logger.logCountInTSDB("exp","lb_view",1,"ux")},this.handleContextChanged=function(){this.notifyPlugins(W)},this.handleImageDataChanged=function(){this.notifyPlugins("imageDataUpdated")},this.handleImageIndexChanged=function(){this.notifyPlugins("imageIndexChanged")},this.handleEditDataChanged=function(){this.notifyPlugins("editDataUpdated")},this.handleResize=function(t){UIHelper.getScreenBounds(),this.handleContentResize(),this.notifyPlugins("imageResized"),!0===t&&this.notifyPlugins(J)},this.handleContentResize=function(){this.measureContentBox(),this.resizeScrollbar(),this.repositionScrollbar()},this.setImageBounds=function(t){K=t},this.getImageBounds=function(){return K},this.getImageMinVals=function(){return{w:720,h:480}},this.getImageDiv=function(){return w},this.getCurrentImageNode=function(){return H.find(".currentImage")},this.getContentTabsNode=function(){return I},this.getThumbSize=function(t){HZ.data.Spaces.get(t).prod,this.getImageBounds().w;return 9},this.areActionsEnabled=function(){return!0},this.getLightboxElement=function(){return C},this.getInfoElement=function(){return v}},HZ.lb.PluginsController=function(){var r,o,d=["spaceInfo","spaceTitle","projectInfo","imageTagsInfo","colorPickerCTA","colorPickerCTA2","colorPicker","paletteSourcePhoto","questionsInfo","productInfo","productIdeabookComment","mpProductVariation","sponsoredSpaceDescriptionInfo","spaceAuthorInfo","comments","productSpecs","sellerShippingInfo","spaceRelatedProducts","productRelatedProducts","coBuyProducts","relatedPhotos","productsInRoom","productReviews","recommendationsSpaces","recommendationsProducts","marketplaceAds","adRelatedProducts","localProsAd","scrollToTop"];this.setOwner=function(t){r=t,o=[]},this.registerContent=function(t,e){o[t]||(o[t]={enabled:!0,divs:[]});t=o[t];e&&($(e).addClass("lbPlugin"),t.divs.push(e))},this.imageResized=function(){},this.imageChanged=function(){var t=r.getCurrentSpace();if(t.fullyLoaded){for(var e=t.ift,i=r.isMarketplaceProduct(),n=r.isProduct(),s=d.length,o=0;o<s;o++){var a=!r.isEditMode();this.setPluginEnabled(d[o],a)}e&&(this.setPluginEnabled("comments",!1),this.setPluginEnabled("spaceAuthorInfo",!1),this.setPluginEnabled("questionsInfo",!1),this.setPluginEnabled("projectInfo",!1)),this.setPluginEnabled("spaceEditor",r.isEditMode()&&!r.isEditTagMode()),this.setPluginEnabled("spaceTagEditor",r.isEditTagMode()),i?(this.setPluginEnabled("spaceInfo",!1),this.setPluginEnabled("spaceRelatedProducts",!1),this.setPluginEnabled("spaceAuthorInfo",!1),this.setPluginEnabled("recommendationsSpaces",!1),this.setPluginEnabled("colorPickerCTA",!1),this.setPluginEnabled("colorPicker",!1),this.setPluginEnabled("paletteSourcePhoto",!1),this.setPluginEnabled("imageTagsInfo",!1)):n?(this.setPluginEnabled("mpProductVariation",!1),this.setPluginEnabled("spaceInfo",!1),this.setPluginEnabled("spaceRelatedProducts",!1),this.setPluginEnabled("coBuyProducts",!1),this.setPluginEnabled("spaceAuthorInfo",!1),this.setPluginEnabled("recommendationsSpaces",!1),this.setPluginEnabled("colorPickerCTA",!1),this.setPluginEnabled("colorPicker",!1),this.setPluginEnabled("paletteSourcePhoto",!1),this.setPluginEnabled("imageTagsInfo",!1)):(this.setPluginEnabled("productInfo",!1),this.setPluginEnabled("productIdeabookComment",!1),this.setPluginEnabled("mpProductVariation",!1),this.setPluginEnabled("productRelatedProducts",!1),this.setPluginEnabled("coBuyProducts",!1),this.setPluginEnabled("productSpecs",!1),this.setPluginEnabled("sellerShippingInfo",!1),this.setPluginEnabled("productsInRoom",!1),this.setPluginEnabled("productReviews",!1),this.setPluginEnabled("recommendationsProducts",!1)),!t.prod&&r.isPaidProAd()&&(this.setPluginEnabled("spaceAuthorInfo",!1),this.setPluginEnabled("projectInfo",!1),this.setPluginEnabled("spaceRelatedProducts",!1),this.setPluginEnabled("comments",!1)),r.isColorPickerSavedPalette()&&(this.setPluginEnabled("projectInfo",!1),this.setPluginEnabled("recommendationsSpaces",!1),this.setPluginEnabled("comments",!1),this.setPluginEnabled("spaceRelatedProducts",!1)),r.isPhotoAd()&&(r.isMarketPlaceAd()||(this.setPluginEnabled("spaceTitleInfo",!1),this.setPluginEnabled("comments",!1),this.setPluginEnabled("spaceAuthorInfo",!1),this.setPluginEnabled("spaceInfo",!1),this.setPluginEnabled("projectInfo",!1)),this.setPluginEnabled("recommendationsSpaces",!1)),r.isProListAd()&&(this.setPluginEnabled("questionsInfo",!1),this.setPluginEnabled("spaceInfo",!1),this.setPluginEnabled("recommendationsSpaces",!1),this.setPluginEnabled("comments",!1))}},this.imageDataUpdated=function(){this.imageChanged()},this.setPluginEnabled=function(t,e){t=o[t];t&&(t.enabled=e)},this.updateContents=function(){for(var t in o)if(o.hasOwnProperty(t))for(var e=o[t],i=0;i<e.divs.length;i++){var n=$(e.divs[i]),s=e.enabled&&!n.is(":empty")||n.is(".product .product-info-content");n.toggleClass("hidden",!s)}}},HZ.lb.plugins.ImagePreloader=new function(){var o,a=[],r=0,i=0;this.setOwner=function(t){o=t},this.prefetchSpacePhoto=function(t){var e,i,n,s;this.isImageAvailable(t)||(e=HZ.data.Spaces.get(t),i=o.getThumbSize(t),n=HZ.data.Categories.getCategoryById(e.cat),s=HZ.utils.Styles.getStyleUrl(e.s),e.bmu&&(i=HZ.lb.Config.BOOKMARKLET_UPLOAD_THUMBSIZE),s=HZ.utils.Links.getSpaceImageSeoThumbUrl(e.id,i,s,n),(n=a[r]?a[r].image:new Image).src=s,a[r]={spaceId:t,image:n},r=(r+1)%10)},this.imageChanged=function(){var t,e;if(!(i++<1))for(e=o.getContext().getNextSpaceIds(3),t=0;t<e.length;t++)this.prefetchSpacePhoto(e[t])},this.isImageAvailable=function(t){for(var e=0;e<a.length;e++)if(a[e].spaceId==t)return!0;return!1}},HZ.lb.plugins.ImageViewer=new function(){var u,g,p,f,b,m,s,C,v,e,I,o,a,P,S,i,r,d,n,H,w,l,E,Z,x,y,c,h,T=0,t="lbt",A={x:0,y:0,w:200,h:200,thumb:2},M={x:0,y:0,w:640,h:640,thumb:4},k=990,L=990,D=702,R=702;this.setOwner=function(t){u=t,(g=$(u.getImageDiv())).on("click",".currentImage",null,this.handleImageDivClick.bind(this)).disableSelection(),f=$('<div id="lbImageViewLayer"></div>'),l=[];for(var e=0;e<3;e++){var i=$("<img>").attr("src",HZ.utils.Config.emptyGifData).addClass("lbImageView");f.append(i),l[e]=i.get(0)}f.on("load",".lbImageView",this.imageLoaded.bind(this)).on("dragstart",".lbImageView",function(){return!1}).on("mousedown",".lbImageView",function(t){preventImageDrag(t)}),$("#lbImageView, #lbImageViewLayer").disableSelection(),s=$(HZ.utils.Html.template('<div class="before-tag-large hidden"><i class="hzi-font hzi-Before-Photo"></i>%BEFORE_LABEL%</div>',{BEFORE_LABEL:_hgt("Before Photo")})).appendTo(f),Z=l[E=0],u.addImageLayer(f.get(0)),b=f.find("img"),P=$('<a href="javascript:;" class="zoom-toggle btn med tint btn-toggle" compid="lb_prod_zoom"><i class="icon icon-font icon-magnifying_plus not-toggled"></i><i class="icon icon-font icon-magnifying_minus toggled"></i></a>'),(o=$('<video controls preload="auto" id="lbVideoPlayer" class="video-js" autoplay />')).hide(),g.append(o);var n=_hgt("Video is loading…");a=$('<div class="video-loading-overlay"><div class="video-loading-overlay__center"><div class="video-loading-overlay__icon"><i class="hzi-font  hzi-pro_mgr_renew"></i></div><div class="video-loading-overlay__text text-xl mts">'+n+"</div></div>"),g.append(a),P.click(this.handleZoomClick.bind(this)),P.hover(this.handleZoomButtonEnter.bind(this),this.handleZoomButtonLeave.bind(this)),u.addActionItem(P,HZ.lb.ActionBar.ACTION_BAR_RIGHT,0),(m=$('<a href="javascript:;" class="expand-toggle btn med tint btn-toggle" compid="lb_space_expand"><i class="icon icon-font icon-arrows_outward not-toggled"></i><i class="icon icon-font icon-arrows_inward toggled"></i></a>')).attr("tooltip-data",_hgt("Click here to expand")),m.mouseover(function(){_()&&($(this).tipBubble("hide"),0)}),c=new MutationObserver(function(){_()&&m.tipBubble("show")}),m.click(this.handleExpandClick.bind(this)),u.addActionItem(m,HZ.lb.ActionBar.ACTION_BAR_RIGHT);t={iconClass:"icon icon-font icon-arrows_outward not-toggled",label:_hgt("Fullscreen"),compId:"lb_space_expand",handler:this.handleExpandClick.bind(this),index:2},n={iconClass:"icon icon-font icon-arrows_inward not-toggled",label:_hgt("Exit Fullscreen"),compId:"lb_space_unexpand",handler:this.handleExpandClick.bind(this),index:2};C=u.addMoreMenuItem(t),v=u.addMoreMenuItem(n),C.addClass("expand-btn"),v.addClass("unexpand-btn")},this.hideExpandBtn=function(){m.addClass("hidden")},this.handleExpandClick=function(t){u.setExpandedMode(!u.getExpandedMode())},this.handleZoomClick=function(t){P.prop("disabled")||this.setZoomMode(!i)},this.handleZoomButtonEnter=function(){i||this.resetTransformOrigin(),this.setFollowMouse(!1)},this.handleZoomButtonLeave=function(){this.setFollowMouse(i)},this.setZoomMode=function(t){(i=t)?(f.addClass("zoom"),g.on("mousemove.lightbox",this.handleZoomMouseMove.bind(this)),this.setFollowMouse(!0),P.addClass("active"),this.loadHiResImage()):(f.removeClass("zoom"),g.off("mousemove.lightbox"),this.setFollowMouse(!1),P.removeClass("active"))},this.loadHiResImage=function(){var t=u.getCurrentSpace(),e=u.getSpaceImage(t,T);e&&!!e.hr&&!w&&!H&&(H=!(w=!1),e=-1!=e.hr.indexOf(14)?14:16,e=this.getImageUrl(t,e,T),t=t.id,HZ.lb.Utils.loadImage(e,this.handleHiResImageLoadComplete.bind(this,e,t)))},this.handleHiResImageLoadComplete=function(t,e){(!$.isNumeric(e)||$.isNumeric(e)&&e==u.getCurrentSpace().id)&&(H=!(w=!0),f.find(".lbImageView-hires").remove(),t=$("<img>").attr("src",HZ.utils.Config.emptyGifData).addClass("lbImageView lbImageView-hires currentImage").css("background-image","url("+t+")"),f.append(t),y=Z,Z=t.get(0),E=(E+1)%3,this.refresh())},this.setFollowMouse=function(t){t?(clearInterval(n),n=setInterval(this.moveZoomedImage.bind(this),20)):clearInterval(n)},this.moveZoomedImage=function(){var t=$(Z),e=t.css("transform-origin").split(" "),i=parseInt(e[0]),n=parseInt(e[1]),s=u.getImageBounds(),e=s.x-100+r/p.w*(s.w+50),s=s.y-100+d/p.h*(s.h+50);t.css({"transform-origin":i+(e-i)/10+"px "+(n+(s-n)/10)+"px"})},this.resetTransformOrigin=function(){$(Z).css({"transform-origin":"50% 50%"});var t=u.getImageBounds();r=t.x+t.w/2,d=t.y+t.h/2},this.handleZoomMouseMove=function(t){r=t.clientX,d=t.clientY},this.handleImageDivClick=function(t){HZ.lb.Config.zoomOnImageClick?S&&this.setZoomMode(!i):i?this.setZoomMode(!1):u.getContractedMode()?u.setContractedMode(!1):u.handleImageDivClick(t)},this.updateImages=function(){l&&2<l.length&&(Z=l[E],x=l[(E+2)%3],y=l[(E+1)%3],$(y).css("background-image","none").data("cachedStyle",null))},this.replaceActiveImage=function(t,e){(!$.isNumeric(e)||$.isNumeric(e)&&e==u.getCurrentSpace().id)&&(t="url("+t+")",$(Z).css("background-image",t).data("cachedStyle",t))},this.getDimsLimit=function(t,e){var i,n,s={thumb:u.getThumbSize(t.id)};return t.bmu&&(i=(n=HZ.data.CurrentSessionUser)?n.getUserId():-1,n=n&&n.isIdeabookCollaborator,s=i==t.au||n?M:A),s},this.getImageUrl=function(t,e,i){var n=HZ.data.Categories.getCategoryById(t.cat),s=HZ.utils.Styles.getStyleName(t.s);return e=w?14:9,HZ.utils.Links.getSpaceImageSeoThumbUrl(t.id,e,s,n,i)},this.refresh=function(t){var e=u.getCurrentSpace(),i=u.getSpaceImage(e,T),n=!!u.isProduct();if(P.removeClass("unavailable"),P.toggleClass("hidden",!n),HZ.lb.Config.showSimpleVersionLightbox?(C.toggleClass("hidden",n),v.toggleClass("hidden",n)):(m.toggleClass("hidden",n),m.toggleClass("active",!!u.getExpandedMode())),this.isSpaceVideo()?u.switchType(u.VIDEO_TYPE):u.switchType(n?u.PRODUCT_TYPE:u.SPACE_TYPE),p={w:g.width(),h:g.height()},e&&e.ift&&!i&&(i={w:186,h:245,bg:1},e.prod=!0),e&&i){var s={w:parseInt(i.w,10),h:parseInt(i.h,10)},o=this.getDimsLimit(e,i),a=e.id;0<(i.rotation||0)%180&&(s={w:s.h,h:s.w}),o.w&&(s=HZ.ui.Utils.getMaxBoundRect(s,o,u.getImageMinVals(),!0)),S=s.w>p.w||s.h>p.h,P.prop("disabled",!S),S||P.addClass("unavailable"),t||null==Z?(u.unRegisterTimeout("hiresLoaded"),f.find(".lbImageView-hires").remove(),w=H=!1,this.setZoomMode(!1),E=(E+1)%3,this.updateImages(),$("#lbMain").attr("objId",a),a=I&&I.isImageAvailable(a),l=$(Z),d=$(x),r=$(y),b.removeClass("currentImage discardedImage previousImage unscaled landscape image-solo"),d.addClass(a?"discardedImage":"previousImage"),r.addClass("discardedImage"),d.removeClass("lbImageViewZoom"),l.addClass("currentImage").toggleClass("image-solo",1==u.getContext().getTotalSpacesCount())):l=$(Z),S&&HZ.lb.Config.zoomOnImageClick&&l.addClass("lbImageViewZoom");var r=o.thumb,d=this.getImageUrl(e,r,T);this.replaceActiveImage(d);o=u.getImageMinVals(),e=l.width(),r=l.height();l.removeClass("unscaled"),s.w>s.h?(l.addClass("landscape"),s.w<o.w&&s.h<o.h&&s.w<e&&s.h<r&&l.addClass("unscaled")):s.w<o.h&&s.h<o.w&&s.w<r&&s.h<e&&l.addClass("unscaled"),u.isColorPickerSavedPalette()&&p.w>D&&p.h>R&&l.addClass("unscaled");var l,o=s.w/s.h,c=p.w/p.h<o?{w:p.w,h:s.h*(p.w/s.w)}:{w:s.w*(p.h/s.h),h:p.h},r=l.css("background-size"),h=l.css("background-position");switch(r){case"contain":switch(c.x=Math.floor((p.w-c.w)/2),h){case"50% 50%":case"center":c.y=Math.floor((p.h-c.h)/2);break;default:c.y=0}break;case"auto":case"auto auto":c.w=s.w,c.h=s.h,c.x=Math.floor((p.w-c.w)/2),c.y=Math.floor((p.h-c.h)/2)}n&&(e=parseInt(l.css("top"),10),o=parseInt(l.css("bottom"),10),r=parseInt(l.css("left"),10),l=parseInt(l.css("right"),10),c.x+=r,c.y+=e,c.w-=r+l,c.h-=e+o),u.setImageData({src:d}),u.setImageBounds(c),!n&&t&&(p.w>k||p.h>L)&&this.loadHiResImage()}},this.pauseVideo=function(){var t=o[0];t&&t.pause()},this.initializeVideoPlayer=function(){h=h||videojs("lbVideoPlayer",{fluid:!0,controlBar:{children:["playToggle","currentTimeDisplay","timeDivider","durationDisplay","progressControl","volumePanel","fullscreenToggle"]}})},this.showHideMedia=function(){var t=u.getCurrentSpace(),e=$("#lbVideoPlayer");t.vlk?this.showVideo():(a.hide(),e.hide(),f.show())}.bind(this),this.showVideo=function(){var t,e,i,n=u.isEditMode(),s=o[0];HZ.lb.Utils.loadVideoResources(this.showHideMedia),a.hide(),f.hide(),window.videojs&&!HZ.lb.Utils.isLoadingVideoResources()?(this.initializeVideoPlayer(),t=u.getCurrentSpace(),e=$("#lbVideoPlayer"),i=videojs.MediaSource.supportsNativeMediaSources(),e.show(),e.find("video").show(),i?(s.autoplay=!n,h.src({src:t.vlk,type:"application/x-mpegURL"}),t.vth&&h.poster(t.vth)):(e.hide(),f.show())):a.show()},this.isSpaceVideo=function(){var t=u.getCurrentSpace();return t&&t.isv||!1},this.imageChanged=function(){var t=u.getCurrentSpace().id;T=0,e!=t&&u.isShowing()&&(w=H=!1,this.refresh(!0),u.showSpaceActions(),this.resetTransformOrigin(),this.invalidateBeforePhotoLabel(),this.pauseVideo(),this.showHideMedia()),e=t,B()},this.imageDataUpdated=function(){u.getCurrentSpace().fullyLoaded&&this.invalidateBeforePhotoLabel()},this.invalidateBeforePhotoLabel=function(){s.toggleClass("hidden",!u.getCurrentSpace().bt),s.css("left","calc(50% - "+s.outerWidth()/2+"px)")},this.getActiveImage=function(){return Z},this.setActiveSpaceImageIndex=function(t){T=t,this.refresh(!0),u.handleImageIndexChanged()},this.getActiveSpaceImageIndex=function(){return T},this.imageResized=function(){p={w:g.width(),h:g.height()},this.refresh(!1),_()&&m.tipBubble("show")},this.imageLoaded=function(){x&&$(x).removeClass("currentImage previousImage").addClass("discardedImage")},this.lightboxLoaded=function(){e=null,_()&&c.observe($("#lbAdminMenu").get(0),{attributes:!0,attributeFilter:["class"]})},this.lightboxUnloaded=function(){this.pauseVideo(),$(Z,x).css("background-image","none"),e=null,_()&&(c.disconnect(),1==getCookie(t)&&0)},this.setImageCache=function(t){I=t},this.editModeShown=function(){this.pauseVideo()};var _=function(){return!1},B=function(){_()&&!u.isProduct()?(m.tipBubble({content:m.attr("tooltip-data"),id:"expand-button--tooltip",width:"auto",point:"south right",position:"absolute",attachTo:"#lbActionsRight",showCloseBtn:!1,fadeDuration:0}),1!=getCookie(t)&&setCookie(t,1)):m.tipBubble("hide")}},HZ.lb.plugins.NavigationLayer=function(){var e,i,n;this.setOwner=function(t){e=t,i=$("#lbLeft").click(this.handlePrevious.bind(this)).disableSelection(),n=$("#lbRight").click(this.handleNext.bind(this)).disableSelection()},this.handleNext=function(){e.next(),n.hasClass("bounce")&&n.removeClass("bounce")},this.handlePrevious=function(){e.previous()},this.contextChanged=function(){this.imageChanged()},this.imageChanged=function(){var t=e.getContext();t&&(n.toggleClass("hidden",!t.hasNext()),i.toggleClass("hidden",!t.hasPrevious()))}},HZ.lb.plugins.SpaceDataLoader={owner:null,setOwner:function(t){this.owner=t},imageChanged:function(){var t=[this.owner.getCurrentSpace()],e=this.owner.getContext().getNextSpaceIds(1);e[0]&&t.push(HZ.data.Spaces.get(e[0]));for(var i=0;i<t.length;i++){var n,s,o,a=t[i];a.fullyLoaded||(n=HZ.ajaz.Services.DETAIL_LEVEL_ALL_WITH_AD_SPACE_INFO,null!=HZ.data.PaidProAds.get(a.id)&&(n=HZ.ajaz.Services.DETAIL_LEVEL_BASE_SPACE_INFO),s=-1,!a.prod||(o=HZ.data.ProductsInfo.get(a.id))&&o.pover&&(s=o.plid),HZ.ajaz.Services.getSpaceData(a.id,s,n,$.proxy(this.handleData,this),'{"firstSpace":'+HZ.lb.Utils.firstSpaceId+', "showVisualMatchTag":'+this.owner.showVisualMatchTag+', "showProPerception":'+this.owner.showProPerception+"}"))}},handleData:function(t){if(HZ.lb.Utils.validateData(t),t&&t.results){var e,i={questions:HZ.data.Questions,imageTags:HZ.data.ImageTags,productTagRecognition:HZ.data.ProductTagRecognition,recommendations:HZ.data.Recommendations,productAds:HZ.data.ProductAds,ppcAds:HZ.data.PPCAds,featuredSales:HZ.data.FeaturedSales,bannerAds:HZ.data.BannerAds,colorPickerAd:HZ.data.ColorPickerAd,localProsAd:HZ.data.LocalProsAd,proListAd:HZ.data.ProListAds,houzzImpTracking:HZ.data.HouzzImpTracking,houzzClkTracking:HZ.data.HouzzClkTracking,productInfo:HZ.data.ProductsInfo,listingsInfo:HZ.data.ListingsInfo,spaceToListingIds:HZ.data.SpaceListingIds,colorPaletteSource:HZ.data.ColorPaletteSource,photoRelatedProducts:HZ.data.PhotoRelatedProducts,productsInRoom:HZ.data.ProductsInRoom,reloadData:HZ.data.ReloadData,productReviews:HZ.data.ProductReviews,similarSpaces:HZ.data.SimilarSpaces,coBuySpaces:HZ.data.CoBuySpaces,productCollections:HZ.data.ProductCollections,visuallySimilarSpaces:HZ.data.VisuallySimilarSpaces,recentlyViewedSpaces:HZ.data.RecentlyViewedSpaces};for(e in i){var n=t.results[e];if(n)for(var s in n)i[e].put(s,n[s])}if(t.results.project)for(var s in t.results.project)HZ.data.Projects.get(t.results.project[s].pid)||HZ.data.Projects.put(t.results.project[s].pid,t.results.project[s]);var o=t.results.spaces;if(o)for(var a in o)HZ.data.Spaces.get(a)?HZ.data.Spaces.put(a,$.extend(!0,HZ.data.Spaces.get(a),o[a])):HZ.data.Spaces.put(a,o[a]);if(o=t.results.spaceInfo)for(var a in o){var r=HZ.data.Spaces.get(a)||{},d=o[a];r.b&&(d.b=r.b,void 0!==r.bp&&(d.bp=r.bp),void 0!==r.braw&&(d.braw=r.braw)),HZ.data.Spaces.put(a,d)}this.populateStandardCollections(t),(r=HZ.data.Spaces.get(t.results.sid)).fullyLoaded=!0,this.owner.handleImageDataChanged()}},loadSpaceBuzz:function(){var t=this.owner.getCurrentSpace();return $.Deferred(function(n){HZ.ajaz.Services.getSpaceBuzz(t.id).then(function(t){if(HZ.lb.Utils.validateData(t),t&&t.results){var e={};if(HZ.data.Spaces.get(t.results.sid).commentsLoaded=!0,t.results.fbuzzes)for(var i in t.results.fbuzzes)e[i]=e[i]||{},e[i].fg=t.results.fbuzzes[i];if(t.results.ubuzzes)for(var i in t.results.ubuzzes)e[i]=e[i]||{},e[i].ug=t.results.ubuzzes[i];if(e)for(var i in e)HZ.data.Comments.put(i,e[i]);this.populateStandardCollections(t)}n.resolve()}.bind(this))}.bind(this)).promise()},handleBuzzData:function(t){if(HZ.lb.Utils.validateData(t),t&&t.results){var e={};if(HZ.data.Spaces.get(t.results.sid).commentsLoaded=!0,t.results.fbuzzes)for(var i in t.results.fbuzzes)e[i]=e[i]||{},e[i].fg=t.results.fbuzzes[i];if(t.results.ubuzzes)for(var i in t.results.ubuzzes)e[i]=e[i]||{},e[i].ug=t.results.ubuzzes[i];if(e)for(var i in e)HZ.data.Comments.put(i,e[i]);this.populateStandardCollections(t)}},populateStandardCollections:function(t){var e,i={images:HZ.data.Images,users:HZ.data.Users,productVariationInfo:HZ.data.Variations};for(e in i)t.results[e]&&i[e].addAll(t.results[e])}};var lightbox=new HZ.lb.Lightbox;lightbox.init(),lightbox.addPlugin(HZ.lb.plugins.SpaceDataLoader),lightbox.addPlugin(HZ.lb.plugins.ImagePreloader),lightbox.addPlugin(HZ.lb.plugins.ImageViewer),HZ.lb.plugins.ImageViewer.setImageCache(HZ.lb.plugins.ImagePreloader),lightbox.addPlugin(new HZ.lb.plugins.NavigationLayer);

window.hzmr.push("lightbox2.2:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightbox2.2.js  **************/
/************* Start productVariation.js for locale en-US **************/
try {HZ.ns("HZ.productVariation"),HZ.productVariation.Manager=new function(){var o,s,a,l,n,t=!1,r=!1;function c(t){var e,i=!1;t&&t.results&&t.results.spaceInfo&&(o=(e=t).results.sid,HZ.data.Spaces.addAll(e.results.spaceInfo),HZ.data.Spaces.addAll(e.results.spaces),HZ.data.Images.addAll(e.results.images),HZ.data.Users.addAll(e.results.users),t&&t.results.productInfo&&t.results.productInfo[o]&&(e=t,HZ.data.ProductsInfo.addAll(e.results.productInfo),HZ.data.ListingsInfo.addAll(e.results.listingsInfo),HZ.data.SpaceListingIds.addAll(e.results.spaceToListingIds),t.results.productVariationInfo&&t.results.productVariationInfo[o]&&(HZ.data.Variations.addAll(t.results.productVariationInfo),l.updateView(o),a.updateView(o,r),n&&n.updateHistory(o,t),i=!0))),i||(t=_hgt("Error!"),i=_hgt("The variation selected is invalid, please refresh page and try again"),HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(t,i))}this.setSelector=function(t){t&&!l&&(l=t)},this.drawSelectors=function(t){return l.drawView(t)},this.setCollapseLayout=function(t){r=t},this.setRenderer=function(t){a=t},this.getRenderer=function(){return a},this.setHistoryManager=function(t){(n=t).updateHistory(o,null,!0)},this.setSpaceId=function(t){o=t},this.setVendorListingId=function(t){s=t},this.getVendorListingId=function(){return s},this.initUI=function(){t||(l.initUI(),t=!0)},this.applyHistoryState=function(t,e){HZ.data.Spaces.get(t)?(l.updateView(t),a.updateView(t,r)):c(e)},this.fetchAvailability=function(t){var e,i=[],a=l.getSelectedVariations();for(e in i.push({id:t,value:a[t]}),a)e!==t&&i.push({id:e,value:a[e]});var n;s||(n=HZ.data.ProductsInfo.get(o),s=n&&n.pover?n.plid:-1),HZ.ajaz.Services.getSpaceByVariations(o,s,i,5,c)}},HZ.productVariation.ListSelector=new function(){var e,i,l,a,n,o,c={},s=[],r=!1,u={},h=null,d="c",p="s",m="dn",v="cf",g=10;function f(t){var e,i=HZ.utils.Config.emptyGifData,a=!1;return t&&t.hasOwnProperty("imageId")&&(a=!0,e=t.imageId,t=HZ.data.Images.get(e),i=HZ.utils.Links.getImageUrl(e,92,92,!0,t.ts,4)),HZ.utils.Html.template('<img src="%thumbUrl%" width="46" height="46" class="%className%"/>%thumbIcon%',{thumbUrl:i,className:"theme-option-thumb-image",thumbIcon:a?"":'<span class="theme-option-no-image text-center"><i class="hzi-font hzi-camera-chat theme-option-no-image-icon"></i></span>'})}function b(t){return HZ.utils.Html.template('<div class="theme-option%className%"><span class="theme-option-thumb">%thumb%</span><span class="theme-option-text"><p class="theme-option-label text-bold mb0">%label%</p><p class="theme-option-note text-s mb0">%note%</p></span><span class="theme-option-price text-right">%price%</span><i class="hzi-font hzi-Down-Tri theme-toggle-icon"></i></div>',t)}function H(){s.forEach(function(t){var s=t.id;o.find(".variation-theme--"+s).each(function(t,e){var i,a,n,o;$(e).visible()&&((a=(i=$(e).find(".theme-options")).get(0).getBoundingClientRect())&&(n=!1,o=l.height()-100,(e=a.height)<o&&a.bottom>o&&a.top>e&&(n=!0),i.toggleClass("theme-options--pull-up",n)),u[s]=a)})})}this.initUI=function(){l=$(window),a=$("body"),n=$("#lbInfo .content-scroll"),o=$(".variationSelectors"),this.attachMouseEvents()},this.attachMouseEvents=function(){l.off(".variations"),a.off(".variations"),n.off(".variations"),o.off("click","**");var t=$.debounce(300,H);l.on("scroll.variations resize.variations",t),n.on("scroll.variations",t),a.on("click.variations",":not(.theme-option--cover)",this.handleBodyClick.bind(this)),o.on("click",".theme-list:not(.theme-list--loading) .variation-theme:not(.variation-theme--active)",this.handleThemeClick.bind(this)),o.on("click",".theme-list:not(.theme-list--loading) .variation-theme--active",this.hideThemeOptions.bind(this)),o.on("click",".theme-list:not(.theme-list--loading) .theme-option:not(.theme-option--cover)",this.handleOptionClick.bind(this))},this.getSelectedVariations=function(){return c},this.drawView=function(t){return e!==t&&(h=null),e=t,i=HZ.data.Variations.get(t),u={},function(t){var e=null;t&&t.hasOwnProperty("curVar")&&Object.keys(t.curVar).length&&t.hasOwnProperty("availVar")&&t.availVar.length&&(c=t.curVar,s=t.availVar,t=s.map(function(t){var e=c,i=t.options.sort(function(t,e){var i=0;return t.avail!==e.avail?i=1===t.avail&&0===e.avail?-1:1:t.stock!==e.stock&&(i=1===t.stock&&0===e.stock?-1:1),i}),a=t.id,n=h===a,o=i.length,s=function(t,e){var i="";switch(t){case d:i=_hgtp("","Color","{count} Colors",e,{count:e});break;case p:i=_hgtp("","Size","{count} Sizes",e,{count:e});break;case v:i=_hgtp("","Configuration","{count} Configurations",e,{count:e});break;case m:i=_hgtp("","Design","{count} Designs",e,{count:e})}return i}(a,o),l=i.filter(function(t){return t.name===e[a]})[0],r=["variation-theme","variation-theme--"+a];n&&r.push("variation-theme--active");8<o&&r.push("variation-theme--long");return HZ.utils.Html.template('<li class="%className%">%coverOption%<div class="theme-options theme-options--enter"><div class="theme-options-header">%optionsHeader%</div><ul class="theme-options-list list-unstyled">%themeOptions%</ul></div></li>',{coverOption:b({className:" theme-option--cover",thumb:f(l),label:_hgt("{themeNameWithCount}: <t1>{selectedOptionName}</t1>",{themeNameWithCount:s,selectedOptionName:l.name,t1:{tag:"span",attr:{class:"text-unbold"}}}),note:null,price:null}),optionsHeader:function(t){return HZ.utils.Html.template('<div class="text-bold text-center">%content%</div><span class="theme-options-cancel">%cancel%</span>',{content:_hgt("Select {themeLabel}",{themeLabel:t}),cancel:_hgt("Cancel")})}(t.label),themeOptions:function(t,n){return t.map(function(t){var e,i=t===n,a=null;return 0===t.avail?a=_hgt("Available in other options"):0===t.stock?a=_hgt("Out of stock"):(e=t.quantity)&&0<e&&e<g&&(a=_hgt("Only {quantity} left!",{quantity:e})),'<li class="theme-options-option">'+b({thumb:f(t),label:t.name,note:a,price:t.price,className:i?" theme-option--current":""})+"</li>"}).join("")}(i,l),className:r.join(" ")})}).join(""),e=HZ.utils.Html.template('<ul class="list-unstyled theme-list%className%">%themeSelectors%</ul>',{themeSelectors:t,className:r?" theme-list--loading":""}));return e}(i)},this.updateView=function(t){r=!1,e=t,this.refresh()},this.refresh=function(){o.empty().append(this.drawView(e)),setTimeout(function(){o.find(".theme-options--enter").removeClass("theme-options--enter")},100)},this.handleOptionClick=function(t){this.hideThemeOptions();var e=$(t.currentTarget),i=e.closest(".theme-options-option").index(),t=e.closest(".variation-theme").index(),e=s[t];e&&(t=e.id,i=e.options[i].name,c[t]!==i&&(c[t]=i,r=!0,this.refresh(),HZ.productVariation.Manager.fetchAvailability(t)))},this.handleThemeClick=function(t){t=$(t.currentTarget),t=s[t.index()];h=t.id,this.updateView(e),setTimeout(H,1)},this.handleBodyClick=function(t){h&&(this.hideThemeOptions(t),t.stopImmediatePropagation())},this.hideThemeOptions=function(t){h=null,$(".variation-theme--active .theme-options").fadeOut(250,function(){this.attachMouseEvents(),this.refresh()}.bind(this))}},HZ.productVariation.BoxLinkSelector2=new function(){var o,b,H={},s='<div class="variation">\t\t\t\t<div class="variationDisplay">\t\t\t\t\t<p class="variation-label text-bold mb0">%ATTRIBUTE_TITLE%</p>\t\t\t\t</div>\t\t\t\t<ul class="list-unstyled list-inline variationOptions"></ul>\t\t\t</div>',y='<li class="variation-option"><button class="btn btn-variation">%CONTENT%</button></li>',I='<img src="%THUMB_URL%" width="66" height="66"/>',l={id:"VariationTip",borderColor:"#ccc",point:"south",position:"absolute",fadeDuration:100,attachTo:"body",offsetY:7};function i(t){var e,i;$("#VariationTip").hide();var a,n=null;return o=HZ.data.Variations.get(t),b={},o&&(e=o.availVar,i=o.curVar,H=$.extend({},i)),$.isArray(e)&&0<e.length&&Object.keys(i).length&&(n=$('<div class="mp-var-box"></div>'),a=e.length<2,e.forEach(function(t){b[t.id]=t.label}),e.forEach(function(t){t=function(u,t,e,i,h){var d,p,m=i[u],v=null,a=$(HZ.utils.Html.template(s,{ATTRIBUTE_TITLE:t+" :"})).data("variation-id",u),g=a.find(".variationOptions"),f=e.every(function(t){return t.hasOwnProperty("imageId")&&t.imageId.length});{var n;e.forEach(function(t){var e=!!t.avail,i=!!t.stock,a={isAvailable:e,isInStock:i},n=t.name,o=t.imageId||null,s=n;d=t.name===m,o&&f&&(c=HZ.data.Images.get(o),c=HZ.utils.Links.getImageUrl(o,66,66,!0,c.ts,4),s=HZ.utils.Html.template(I,{THUMB_URL:c}));var l,r,c="";a.isAvailable?a.isInStock||(c=_hgt("Out of Stock")):(r=[],Object.keys(b).forEach(function(t){t!==u&&(l=H[t],r.push(l))}),c=_hgt("Not Available in {unavailableConfigurations}",{unavailableConfigurations:r.join(" - ")})),p=$(HZ.utils.Html.template(y,{CONTENT:s})).data("option-value",n).data("option-flags",a).data("option-note",c).data("option-image-id",f?o:null),d&&(v=p);c=p.find(".btn-variation");c.toggleClass("btn-variation-selected",d),c.toggleClass("btn-variation-oos",e&&!i||!e&&f),c.toggleClass("btn-variation-thumb",f),e||h||o||c.append("<sup>*</sup>"),g.append(p)}),a.toggleClass("variation-thumbs",f),f&&(n=a.find(".variation-label"),i=v.data("option-value"),e=v.data("option-note"),e=_hgt("{variationLabel} : {optionLabel}<t1>{optionNote}</t1>",{variationLabel:t,optionLabel:i,optionNote:e?[" (",e,")"].join(""):"",t1:{tag:"span",attr:{class:"text-unbold"}}}),n.html(e).data("variation-label",e))}return a}(t.id,t.label,t.options,i,a);n.append(t)})),n}function e(t){var e=$(t.currentTarget),t=e.closest(".variation-option");t.tipBubble("hide"),t.siblings().find(".btn-variation").removeClass("btn-variation-selected"),e.addClass("btn-variation-selected");e=t.parents(".variation").data("variation-id");H[e]=t.data("option-value"),HZ.productVariation.Manager.fetchAvailability(e)}function a(t){var e=$(t.currentTarget),i=(e.parents(".variation"),""),a=!!e.data("option-image-id");switch(t.type){case"mouseenter":var n=e.data("option-flags");(i=e.data("option-note")?e.data("option-note"):i)&&(o=HZ.utils.Html.template('<p class="mb0">%MESSAGE%</p>',{MESSAGE:i}));var o=$.extend({content:o,offsetX:e.outerWidth()/2-105},l);n.isAvailable&&n.isInStock||a||(e.tipBubble(o),e.tipBubble("show"));break;case"mouseleave":case"wheel":e.tipBubble("hide")}}this.initUI=function(){var t=$(".variationSelectors");t.on("click",".btn-variation",e),t.on("mouseenter mouseleave wheel",".variation-option",a)},this.getSelectedVariations=function(){return H},this.drawView=i,this.updateView=function(t){var e=HZ.data.Variations.get(t);!1===e.exactMatch&&(e.exactMatch=!0),$(".variationSelectors").empty().append(i(t))}},HZ.productVariation.BrowserHistoryManager=function(h){var d=location&&location.search?location.search:"";window.onpopstate=function(t){t=t.state;t&&t.spaceId&&HZ.productVariation.Manager.applyHistoryState(t.spaceId,t.data)},this.updateHistory=function(t,e,i){var a=HZ.data.Spaces.get(t),n=history.state;if(a&&(n&&n.spaceId!==a.id||!n)){var o=HZ.utils.Styles.getStyleUrl(a.s),s=HZ.data.Categories.getCategoryById(a.cat),l=HZ.data.Users.get(a.ow),n=null;null!==l&&(n=l.d);var r=HZ.utils.PageTitles.getViewSpacePageTitle(a.t,o,s?s.name:null,a.ma,n),c=(c=HZ.utils.Links.getSpaceLink(a.id)).replace(/https?:/,"");i&&(c+=d);var u={spaceId:t,data:e};switch(h){case"push":i?history.replaceState(u,r,c):history.pushState(u,r,c);break;case"replace":history.replaceState(u,r,c)}}}};

window.hzmr.push("productVariation:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productVariation.js  **************/
/************* Start productListingInfoRenderer.js for locale en-US **************/
try {HZ.ns("HZ.listingInfo"),HZ.listingInfo.Renderer=new function(){var _,f,E,S,I,m,b=101===HZ.utils.Config.currentSiteId||102===HZ.utils.Config.currentSiteId,T=null,t=_hgt("Buy from this Seller"),C=(_hgt("View Return Policy"),_hgt("Visit Store")),R=_hgt("Top Seller"),O=_hgt("Show Additional Sellers"),L=null,N=["SE","DK","DE","AU","RU","US","SG","IE","IT","FR","ES","GB","JP","IN","NZ","CA"],v='<li class="listing %SELECTED_CLASS%" objid="%OBJ_ID%" posid="%POS_ID%"><p class="product-price"><span class="text-xl text-bold">%PRICE%</span></p><p class="text-bold">%VENDOR_NAME% <span class="vendor-rate mrs">%VENDOR_RATE%</span><span class="shipping text-gray-lighter text-unbold text-m">%SHIPPING_COST%</span></p>'+(b?"":'<p><a class="return-policy text-primary"vendorId="%VENDOR_ID%" hid="%SPACE_ID%" href="javascript:;">%VENDOR_POLICIES%<span class="more-icon"></span></a></p>')+'<p class="lead-time">%LEAD_TIME%</p>%SHIPPING_RESTRICTION%%IMPORT_MESSAGE%%NON_RETURNABLE%<a class="btn btn-primary buy-button" data-listing-id="%LISTING_ID%" data-space-id="%SPACE_ID%" href="javascript:;">'+t+"</a></li>",H=0,P=0,A=[],D=[];this.setMountNode=function(t){T=t},this.updateView=function(t,e,i,s,n){var l=HZ.data.ProductsInfo.get(t);L=l?l.plid:-1,H=t,P=e,A=[],D=[];var a=HZ.data.ListingsInfo.get(e),o=a&&a.mpListing;(HZ.data.SpaceListingIds.get(t)||[]).forEach(function(t){var i=HZ.data.ListingsInfo.get(t);i&&t!=e&&(i.mpListing?A.push(i):i.ppcUrl&&D.push(i))}),S=A.length,I=D.length,m=S+I;var p="header-4",r=n?'<i class="hzi-font hz-panel__toggle"></i>':"";i&&(p="sectionTitle text-m text-bold");var c,d,h,u=_hgt("Shipping and Returns"),g=S||o?u:_hgt("Seller Information");T&&(l=$(T).empty(),t=$('<div class="curMpListing"></div>'),o&&(i=HZ.utils.Links.getPageUrl("return-policy"),u=_hgt("Return Policy"),d=$('<h2 class="'+p+'"><span class="header-content">'+g+"</span>"+r+"</h2>").appendTo(t),b&&t.append('<a target="_blank" class="text-primary return-policy-link" href="'+i+'">'+u+'<span class="more-icon"></span></a>'),$('<ul class="list-unstyled listings" compid="ven_lst_cur"></ul>').appendTo(t).append(this.renderListing(a,o,0)),l.append(t),n&&d.click(function(){$(".seller-shipping-info-collapse").toggleClass("seller-shipping-info-collapse--expanded")})),0<m&&(d=$('<div class="otherListings"></div>'),0<S&&(c=_hgtp("","Also available from this seller on Houzz","Also available from these sellers on Houzz",S),$('<h2 class="'+p+' mpp collapsed">'+c+"</h2>").appendTo(d),_=$(this.renderListingGroup(A,!0)).appendTo(d),h=3,(h=$.isNumeric(s)?s:h)<S&&(s=$('<button class="btn btn-secondary btn-block">'+O+"</button>"),(s=3!=h?$('<a href="javascript:;" class="colorLink text-bold moreListings">'+O+'<span class="more-icon"></span></a>'):s).appendTo(d),s.click(function(){_.removeClass("collapsed"),$(this).remove()}))),0<I&&(c=_hgtp("","Available from this External Website","Available from {numberOfWebsites} External Websites",I,{numberOfWebsites:I}),f=$('<h2 class="'+p+' ppc collapsed">'+c+'<i class="more-icon"></i></h2>'),(f=3!=h?$('<a href="javascript:;" class="colorLink text-bold ppc collapsed">'+c+'<i class="more-icon"></i></a>'):f).appendTo(d),E=$(this.renderListingGroup(D,!1)).appendTo(d),f.click(function(){f.add(E).toggleClass("collapsed")})),l.append(d)))},this.renderListingGroup=function(t,e){var s;return t&&(s=$('<ul class="list-unstyled listings trackMe" compid="ven_lst_grp"></ul>').addClass(e?"mpp":"ppc").addClass("collapsed"),t.forEach(function(t,i){s.append(this.renderListing(t,e,i))}.bind(this))),s},this.renderListing=function(t,i,e){var s,n,l,a,o,p,r,c,d,h,u,g,_,f,E,S,I,m=L==t.lid;return t&&(t.avail||m)&&(s=t.lid,I=H,n=HZ.data.Spaces.get(I),l=HZ.data.ProductsInfo.get(I),a=s==P,o=HZ.data.Users.get(t.vid),p=t.useShippingCalculator,i?(r=t.vfs||!1,E=t.fs,c=t.efs,d=t.ret,h=t.fsm,f=i=u="",p||(m?b&&(u=r&&HZ.lb.Config.isTradePro?_hgt("- Pay one shipping fee of {shippingCost} for all items from {manufacturer}.",{shippingCost:t.shpc,manufacturer:l.manuName}):E?_hgt(" - Free Shipping!"):c?_hgt("Free Shipping over {freeShippingMinimum} for <t1>eligible</t1> products",{freeShippingMinimum:h,t1:{tag:"span",attr:{class:"highlighted"}}}):_hgt("+{shippingCost} Shipping",{shippingCost:t.shpc}),(E||c)&&(i=HZ.utils.Html.template("<p>%NOTE%</p>",{NOTE:_hgt("Note: Free shipping is not available to AK, HI, PR or Canada. Some exclusions apply.")})),d||(f=HZ.utils.Html.template('<p class="text-muted">%NOTE%</p>',{NOTE:_hgt("Non-Returnable. <t1></t1>",{t1:{tag:"span",attr:{class:"listing__non-returnable hzi-font hzi-Info text-l"}}})}))):u=E?_hgt(" - Free Shipping!"):_hgt("+{shippingCost} Shipping",{shippingCost:t.shpc})),E="",t.hasOwnProperty("ifcc")&&t.ifcc.length&&(g=t.ifcc.toUpperCase(),-1===N.indexOf(g)&&(g="other"),_=t.ifc,E=HZ.utils.Html.template('<span class="country-flag country-flag--%COUNTRY_CODE%"></span> %IMPORT_MESSAGE%',{COUNTRY_CODE:g,IMPORT_MESSAGE:_hgt("Shipped from {importCountry}",{importCountry:_})})),g=!t.dv&&o&&o.topsell?R:"",_=HZ.utils.Links.getSoldByLink(t.vid),m=HZ.utils.Html.template('<a target="_blank" href="%LINK_URL%" title="%TITLE_ATTR%">%LINK_TEXT%</a>',{LINK_URL:_,TITLE_ATTR:"",LINK_TEXT:o?m?_hgt("Sold by {vendorName}",{vendorName:o.d}):o.d:""}),m=t.dv?"Sold by Houzz":m,f={SELECTED_CLASS:a?"current":"",PRICE:t.p,SHIPPING_COST:u,VENDOR_NAME:m,VENDOR_RATE:g,LEAD_TIME:t.ltime,VENDOR_ID:t.vid,SPACE_ID:H,VENDOR_POLICIES:_hgt("View Return Policy"),SHIPPING_RESTRICTION:i,NON_RETURNABLE:f,IMPORT_MESSAGE:E,POS_ID:e,OBJ_ID:t.vid},(E=$(HZ.utils.Html.template(v,f))).on("click",".buy-button",{listingId:s,spaceId:I},this.handleBuyClick.bind(this)).on("click",".return-policy",HZ.module.ReturnPolicy.handleReturnPolicyClick),(I=E.find("span.highlighted")).length&&(S=_hgt('Most products on Houzz ship for free. To confirm whether an item has free shipping, simply look for the "Free Shipping!"'),I.on("click",function(){var t=$(this);t.tipBubble({id:"eligible-free-tooltip",content:HZ.utils.Html.template('<div class="product-seller-tooltip__body"><p class="product-seller-tooltip__message mb0">%TOOLTIP_MESSAGE%</p></div>',{TOOLTIP_MESSAGE:S}),point:"north",offsetX:-Math.round(t.position().left)+(HZ.utils.Config.isResponsive?10:-44),offsetY:0,width:"278px",position:"absolute",showCloseBtn:!0,borderColor:"#ccc",fadeDuration:0})})),(I=E.find(".listing__non-returnable")).length&&I.hover(function(){$(this).tipBubble({content:_hgt("This product cannot be returned."),point:"south",id:"sidebar-return-tooltip",width:200,offsetX:-18,offsetY:2,borderColor:"#ccc",showCloseBtn:!1,position:"absolute",fadeDuration:0,bubblePadding:"4px"})},function(){$(this).tipBubble("hide")})):(f={SELECTED_CLASS:a?"current":"",PRICE:t.p,VENDOR_NAME:o.d,VISIT_STORE_URL:t.ppcUrl||n.tl,VISIT_MESSAGE:a?"":C,POS_ID:e,OBJ_ID:t.vid},E=$(HZ.utils.Html.template('<li class="listing %SELECTED_CLASS%" objid="%OBJ_ID%" posid="%POS_ID%"><p class="text-bold">%VENDOR_NAME%</p><p class="price"><span class="product-price text-xl text-bold">%PRICE%</span></p><a class="btn btn-primary visit-store-button" href="%VISIT_STORE_URL%" target="_blank">%VISIT_MESSAGE%</a></li>',f)))),E},this.handleBuyClick=function(t){t=t.data;HZ.cart.Actions.addItem(t.spaceId,t.listingId,1)}};

window.hzmr.push("productListingInfoRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productListingInfoRenderer.js  **************/
/************* Start availabilityNotification.js for locale en-US **************/
try {HZ.ns("HZ.module"),HZ.module.AvailabilityNotification=new function(){var a=_hgt("Check Availability"),i=_hgt("We're sorry, but an unexpected error has occurred. Please try again later."),s="<div class='row'><div class='col-xs-12 header-6 text-center'>%TITLE%</div></div><div class='row'><div class='col-xs-12 text-center'><img src='%IMG_SRC%'></div></div><div class='row'><div class='col-xs-12 text-center'><p>%MESSAGE%</p></div></div>";this.handleAddToWishListResponse=function(e){!function(e){{var t;e&&"true"===e.success?(t={tag:"a",attr:{href:HZ.utils.Links.getGalleryLink(e.wishListGalleryId),target:"_blank",class:"colorLink"}},t=HZ.utils.Html.template(s,{TITLE:e.added?_hgt("This product has already been added to your <t1>Wish List</t1> and you'll be emailed when it's back in stock.",{t1:t}):_hgt("We'll email you when this product is back in stock!"),IMG_SRC:HZ.utils.Links.getSpaceImageUrl(e.spaceId,200,200),MESSAGE:e.added?HZ.data.Spaces.get(e.spaceId).t:_hgt("To help you keep track of {productName}, we've added it to your <t1>Wish List</t1>",{productName:HZ.data.Spaces.get(e.spaceId).t,t1:t})}),HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(_hgt("We'll let you know"),t)):(HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(a,e.error||i))}}(e)}};

window.hzmr.push("availabilityNotification:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End availabilityNotification.js  **************/
/************* Start qtySelector.js for locale en-US **************/
try {HZ.ns("HZ.QtySelector"),HZ.QtySelector=function(){var c=10,a=/^0+/,e=/[^0-9]/g,h="fake-dd",n="defVal",u=null;function t(){this.$container=null,this.$selectContainer=null,this._showMobileDialog=!0,this._changeCallbacks=[]}return t.prototype.init=function(t,e){t=$(t);t.is("select")?(this.$select=t,this.$select.data(n,this.$select.val()),this.$select.on("change.qty",this.handleSelectChange.bind(this))):t.is("input[type=text]")&&(this.$input=t,this.addInputDataAndEvents())},t.prototype.destroy=function(){this._changeCallbacks=[],this.$select&&this.$select.off(".qty"),this.$input&&this.$input.off(".qty")},t.prototype.addChangeListener=function(t){this._changeCallbacks.push(t)},t.prototype.handleSelectChange=function(t,e){var i;this.$selectContainer||(this.$selectContainer=this.$select.parent(),this.$container=this.$selectContainer.parent()),"10+"===this.$select.val()?(i=this.buildInput(),document.activeElement.blur(),this.$selectContainer.detach(),this.$container.append(i).css("marginRight",0),this.$input[0].focus()):(this.$select.data(n,this.$select.val()),e=e||{type:"select"},this.callChangeCallbacks(this.$select.val(),e))},t.prototype.updateQuantity=function(t){var e;this.$selectContainer||(this.$selectContainer=this.$select.parent(),this.$container=this.$selectContainer.parent()),!this.$input&&t<c?(this.$select.val(t),this.$select.trigger("change",{type:"external"})):(this.$input||(e=this.buildInput(),this.$selectContainer.detach(),this.$container.append(e).css("marginRight",0)),this.$input.val(t),this.callChangeCallbacks(this.$input.val(),{type:"external"}))},t.prototype.callChangeCallbacks=function(t,e){for(var i=0,a=this._changeCallbacks.length;i<a;i++)this._changeCallbacks[i](t,e)},t.prototype.handleBlur=function(t){var e=this.$input.val(),i=this.$input[0].defaultValue;HZ.events&&HZ.events.publish("quantity:stop"),""===e&&(this.$input.val(i||c),this.$input.trigger("change"),e=this.$input.val()),"0"!==e&&this.$input.val(e.replace(a,"")),this.$input[0].defaultValue=this.$input.val(),this.callChangeCallbacks(this.$input.val(),{type:"input"})},t.prototype.handleFocus=function(t){var e=this.$input;if(HZ.utils.Config.isResponsive&&this._showMobileDialog&&parseInt(e.val())<c)return this.prepareDialog(e),t.preventDefault(),!1;HZ.QtySelector.utils.highlightInput(e),HZ.events&&HZ.events.publish("quantity:start")},t.prototype.handleKeydown=function(t){var e=t.which;return t.isShift||!HZ.QtySelector.utils.isAllowedKey(e)&&!HZ.QtySelector.utils.isNumber(e)?(t.preventDefault(),!1):("0"===this.$input.val()&&9!==e&&this.$input.val(""),!0)},t.prototype.handlePaste=function(t){window.setTimeout(function(){var t=this.$input.val();this.$input.val(t.replace(e,""))}.bind(this))},t.prototype.buildInput=function(){var t=this.$selectContainer.outerWidth(),e=this.$select.attr("id"),i=this.$select.attr("class"),a=this.$select.data(n),t=$("<input>").attr({type:"text",id:e}).val(a).addClass(i).css({width:t});return t[0].defaultValue=a,this.$input=t,this.addInputDataAndEvents(),t},t.prototype.disable=function(){var t=this.$input||this.$select;t&&(t.prop("disabled",!0),t===this.$select&&this.$select.parent().addClass("disabled"))},t.prototype.enable=function(){var t=this.$input||this.$select;t&&(t.prop("disabled",!1),t===this.$select&&this.$select.parent().removeClass("disabled"))},t.prototype.addInputDataAndEvents=function(){this.$input.on("keydown.qty",this.handleKeydown.bind(this)).on("paste.qty",this.handlePaste.bind(this)).on("focus.qty",this.handleFocus.bind(this)).on("blur.qty",this.handleBlur.bind(this)).attr({maxlength:4,pattern:"\\d*"}),this.$input.val()||this.$input.val(c),HZ.utils.Config.isResponsive&&this.$input.val()<c&&this.$input.addClass(h)},t.prototype.prepareDialog=function(o){var t='<label class="option"><input %CHECKED% type="radio" value="%VAL%" name="%NAME%"><span class="radio-text text-l">%DISPLAY%</span></label>',e=parseInt(o.val());u||(n=[HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"hzConfirmDlgCancelBtn",function(){HZ.ui.Yamdi.hide()})],(u=new HZ.ui.yamdi.Dialog).init({dialogClassName:"mobileQuantityDlg",controls:n,sidebarMode:"sidebar-skinny"}));for(var i="",a=o.attr("id")+"-rad",n=parseInt(o.data("max-quantity"),10)||c,s=Math.min(n+1,c),l=1;l<s;l++)i+=HZ.utils.Html.template(t,{CHECKED:e===l?"checked":"",VAL:l,DISPLAY:l,NAME:a});c<=n&&(i+=HZ.utils.Html.template(t,{CHECKED:"",VAL:"10+",DISPLAY:"10+",NAME:a}));var r=function(t){var e=$(t.currentTarget).val(),i=o.data("cart-id"),a=o.data("item-id"),n=o.data("gift-card-id"),s=o.data("warranty-cart-id"),l=o.data("warranty-item-id");"10+"===e?(t=o[0].defaultValue,this._showMobileDialog=!1,o.val(t).removeClass(h).focus(),$("html,body").animate({scrollTop:o.offset().top-40}),o.trigger("change")):(o.val(e),HZ.events&&i&&a?HZ.events.publish("cart:update",i,a,n,s,l):o.trigger("change")),HZ.ui.Yamdi.hide()};u.setTitle(_hgt("Quantity:")),u.setViewLoaded(function(){var t=u.getBody().find("input[type=radio]");t.filter(":checked").focus(),t.on("change.qtySelector",r.bind(this))}.bind(this)),u.setViewUnloaded(function(){u.getBody().find("input[type=radio]").off(".qtySelector")}),u.setBody(i),HZ.ui.Yamdi.show(u)},t}(),HZ.QtySelector.BoxSelector=function(){function t(t){this.cache={},this.sid=t.spaceId,this.lid=t.listingId,this.unit=t.unit,this.area=t.area,this.qtySelector=t.qtySelector,this.coverageInput=t.coverageInput,this.calculationsEl=t.calculationsEl,this.percentToggle=t.percentToggle,this.addEvents()}return t.prototype.destroy=function(){this.$input&&this.$input.off(".boxSelector")},t.prototype.addEvents=function(){var t=$(this.coverageInput);t.on("input.boxSelector",$.debounce(1e3,this.handleCoverageChange.bind(this))).on("focus.boxSelector",this.handleFocus.bind(this)).on("blur.boxSelector",this.handleBlur.bind(this)).attr({maxlength:4,pattern:"\\d*.\\d{0,2}"}),this.$input=t},t.prototype.handleCoverageChange=function(t){var e=parseFloat(this.coverageInput.value,10);!!this.percentToggle&&this.percentToggle.checked&&(e+=.1*e);e=Math.ceil(e/this.area);this.qtySelector.updateQuantity(e)},t.prototype.handleFocus=function(){HZ.events&&HZ.events.publish("quantity:start")},t.prototype.handleBlur=function(){HZ.events&&HZ.events.publish("quantity:stop")},t.prototype.disable=function(){this.coverageInput.disabled=!0,$(this.coverageInput.parentNode).addClass("disabled"),this.qtySelector.disable()},t.prototype.enable=function(){this.coverageInput.disabled=!1,$(this.coverageInput.parentNode).removeClass("disabled"),this.qtySelector.enable()},t.prototype.calculate=function(a){if(this.cache[a])return this.render(this.cache[a]),$.Deferred().resolve(this.cache[a]);var n=this;return this.disable(),HZ.ajaz.Tile.calculate(a,this.sid,this.lid,function(t){var e=t.coverage,i=t.totalPrice,t=t.unitString,t={quantity:parseInt(a,10),coverage:e,totalPrice:i,unitString:t};return n.enable(),n.render(t),n.cache[a]=t})},t.prototype.render=function(t){var e="",i={quantity:t.quantity,totalArea:t.coverage,unit:this.unit,t1:{tag:"span",attr:{class:"text-bold"}}};switch(t.unitString){case"box":e=_hgtp("--","1 box, covers <t1>{totalArea} {unit}</t1>","{quantity} boxes, covers <t1>{totalArea} {unit}</t1>",t.quantity,i);break;case"sheet":e=_hgtp("--","1 sheet, covers <t1>{totalArea} {unit}</t1>","{quantity} sheets, covers <t1>{totalArea} {unit}</t1>",t.quantity,i);break;case"piece":e=_hgtp("--","1 piece, covers <t1>{totalArea} {unit}</t1>","{quantity} pieces, covers <t1>{totalArea} {unit}</t1>",t.quantity,i);break;case"roll":e=_hgtp("--","1 roll, covers <t1>{totalArea} {unit}</t1>","{quantity} roll, covers <t1>{totalArea} {unit}</t1>",t.quantity,i)}var a=_hgt("Total: {totalPrice}",{totalPrice:t.totalPrice}),n=$(this.calculationsEl).find(".coverage-string"),s=$(this.calculationsEl).find(".coverage-price");n.html(e),s.text(a)},t.prototype.updateCoverageInput=function(t){this.coverageInput.value=t},t}(),HZ.QtySelector.utils={isNumber:function(t){return 48<=t&&t<=57||96<=t&&t<=105},isAllowedKey:function(t){return-1<[8,9,37,39].indexOf(t)},highlightInput:function(t,e){window.setTimeout(function(){t.select(),t[0].setSelectionRange(0,9999),e&&e()},0)}};

window.hzmr.push("qtySelector:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End qtySelector.js  **************/
/************* Start productQuantityRenderer.js for locale en-US **************/
try {HZ.ns("HZ.productQuantity"),HZ.productQuantity.Renderer=new function(){var n,s=null,o=null,l=null,i=null,r='<div class="%CONTAINER_CLASSES%"><label for="qtySelector" class="%LABEL_CLASSES%">%QUANTITY_LABEL%</label><select id="qtySelector" class="form-control">%QTY_OPTIONS%</select></div>',c='<div class="qty-comment %CLASS%">%QTY_COMMENT%</div>',u='<option value="%QTY%">%QTY_LABEL%</option>',p='<div class="soldByBox__form"><div class="one-line"><label for="coverageInput" class="text-bold">%COVERAGE_LABEL%</label><span class="input-container"><input id="coverageInput" class="coverage-input" type="number" min="0.01" step="0.01" max="2500" value="%COVERAGE_AREA%"/><span class="coverage-unit text-muted text-xs">%UNIT%</span></span></div><div class="one-line mtm">%QUANTITY%</div></div>',d='<div class="soldByBox__calculations" id="coverageCalculations"><p class="text-m mbs coverage-string">%COVERAGE%</p><p class="text-bold text-xl mb0 coverage-price">%PRICE%</p></div>',g='<p class="text-s text-muted mtm coverage-ten-percent custom-cb"><input type="checkbox" id="coverageToggle" checked/><label for="coverageToggle" class="custom-cb-label mb0">%LABEL% </label> <span class="sold-by-box--tt-trigger text-primary">%WHY_LABEL%</span></p>';this.setMountNode=function(t){n=t},this.refresh=function(){n&&this.updateView(l,i)},this.updateView=function(t,e){var a=HZ.data.ListingsInfo.get(e);l=t,i=e,n.empty(),n.append(this.getQuantityHtml(a)),s&&s.destroy(),o&&o.destroy(),HZ.QtySelector&&((e=document.getElementById("qtySelector"))&&"SELECT"===e.nodeName.toUpperCase()&&$(e).customDropdown(),(s=new HZ.QtySelector).init(e),a&&a.sbb&&(a={spaceId:t,listingId:a.lid,unit:a.sbbUnit,area:a.sbbCoverage,qtySelector:s,coverageInput:document.getElementById("coverageInput"),calculationsEl:document.getElementById("coverageCalculations"),percentToggle:document.getElementById("coverageToggle")},o=new HZ.QtySelector.BoxSelector(a),s.addChangeListener(function(t,e){o.calculate(t).done(function(t){"external"!==e.type&&o.updateCoverageInput(t.coverage)})})))},this.getQuantityHtml=function(t){var e=$("<div>"),a="",n="",s=!!t&&t.avail;return!!t&&t.buyable&&(s?(s=parseInt(t.q,10),t.sbb?(e.append(this.getBoxQuantityNode(t)),e.append($(HZ.utils.Html.template(g,{LABEL:_hgt("Add 10% for waste."),WHY_LABEL:_hgt("Why?")})))):(s<10?a=_hgt("Only {quantity} Left!",{quantity:s}):HZ.lb.Config.alwaysShowQtyStr&&(a=_hgt("10 or more in stock")),this.getQuantityDropdownNode(s,null).appendTo(e))):(a=_hgt("Sold Out"),n="sold-out")),a&&e.append($(HZ.utils.Html.template(c,{QTY_COMMENT:a,CLASS:n}))),e.html()},this.getBoxQuantityNode=function(t){var e,a=$('<div id="soldByBox"/>').addClass("soldByBox__container"),n=parseInt(t.q,10),s=t.sbbUnitStr,n=this.getQuantityDropdownNode(n,s),n=$("<div/>").append(n),n=$(HZ.utils.Html.template(p,{QUANTITY:n.html(),COVERAGE_LABEL:_hgt("Covers:"),UNIT:t.sbbUnit,COVERAGE_AREA:t.sbbCoverage})),o={coverage:t.sbbCoverage,unit:t.sbbUnit,t1:{tag:"span",attr:{class:"text-bold"}}};switch(s){case"box":e=_hgt("1 box, covers <t1>{coverage} {unit}</t1>",o);break;case"sheet":e=_hgt("1 sheet, covers <t1>{coverage} {unit}</t1>",o);break;case"piece":e=_hgt("1 piece, covers <t1>{coverage} {unit}</t1>",o);break;case"roll":e=_hgt("1 roll, covers <t1>{coverage} {unit}</t1>",o)}t=$(HZ.utils.Html.template(d,{COVERAGE:e,PRICE:_hgt("Total: {price}",{price:t.sbbBoxPrice})}));return a.append(n,t),a},this.getQuantityDropdownNode=function(t,e){var a,n=Math.min(t,9),s=[],o=_hgt("Quantity:"),l="",i="";null===e&&HZ.lb.Config.isMainProdBtnQuantityInline&&(e="qty");for(var c=1;c<=n;c++){switch(e){case"box":a=_hgtp("0 boxes","1 box","{quantity} boxes",c,{quantity:c});break;case"sheet":a=_hgtp("0 sheets","1 sheet","{quantity} sheets",c,{quantity:c});break;case"piece":a=_hgtp("0 pieces","1 piece","{quantity} pieces",c,{quantity:c});break;case"roll":a=_hgtp("0 rolls","1 roll","{quantity} rolls",c,{quantity:c});break;case"qty":a=_hgt("Quantity: {quantity}",{quantity:c}),o="";break;default:a=c,l="form-inline"}s.push(HZ.utils.Html.template(u,{QTY:c,QTY_LABEL:a}))}if(e&&(i="text-bold"),9<t){switch(e){case"box":a=_hgt("{maxQuantity}+ boxes",{maxQuantity:10});break;case"sheet":a=_hgt("{maxQuantity}+ sheets",{maxQuantity:10});break;case"piece":a=_hgt("{maxQuantity}+ pieces",{maxQuantity:10});break;case"roll":a=_hgt("{maxQuantity}+ rolls",{maxQuantity:10});break;default:a="10+"}s.push(HZ.utils.Html.template(u,{QTY:"10+",QTY_LABEL:a}))}return $(HZ.utils.Html.template(r,{CONTAINER_CLASSES:l,LABEL_CLASSES:i,QUANTITY_LABEL:o,QTY_OPTIONS:s.join("")}))}};

window.hzmr.push("productQuantityRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productQuantityRenderer.js  **************/
/************* Start reportProduct.js for locale en-US **************/
try {HZ.ns("HZ.module"),HZ.module.ReportProduct=new function(){var r='<div class="report-product-item text-m"><input class="%FLAG_REASON_CLASS%" id="%FLAG_REASON_ID%" value="%FLAG_REASON_ID%" type="checkbox">&nbsp;&nbsp;<label for="%FLAG_REASON_ID%">%FLAG_REASON_TEXT%</label></div>',a=new HZ.ui.yamdi.Dialog,n=null;function t(e,t){var o;e&&"true"==e.success?(HZ.ui.yamdi.Common.hideAllDialogs(),o='<div id="reportProductAlert" class="report-product-alert text-m hidden"></div>',o+='<div class="report-product-title-check text-m">'+_hgt("Check all that apply:")+"</div>",o+=i(e.flagReasons.image,"flagReasonCheckBox"),o+=i(e.flagReasons.data,"flagReasonCheckBox"),o+=i(e.flagReasons.others,"flagReasonCheckBox"),o+=i(e.flagReasons.users,"flagReasonCheckBox"),o+=i(e.newFlagReasons,"newFlagReasonCheckBox"),o+='<div class="report-product-title-comment text-m">'+_hgt("Comment (optional):")+"</div>",a.setBody(o+='<textarea class="report-product-comment-box" cols=50 rows=10 id="flagReasonComments" maxlength="2000"></textarea>'),e=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(l,this)),o=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Submit"),"",$.proxy(s,this)),o=$("<div id='reportProductDlgFooter'></div>").append(e).append(o),a.setFooter(o),$(document).trigger("keyboardHandlerRequired",{source:this,event:t}),HZ.ui.Yamdi.show(a,function(){$(document).trigger("keyboardHandlerReleased",{source:this,event:t})})):HZ.ui.yamdi.Common.alert(_hgt("Error"),_hgt("We're sorry, but an unexpected error has occurred. Please try again later."))}function i(e,t){var o="";if(e)for(var a in e)o+=HZ.utils.Html.template(r,{FLAG_REASON_CLASS:t,FLAG_REASON_ID:a,FLAG_REASON_TEXT:_hgt(e[a])});return o}function l(){HZ.ui.yamdi.Common.hideAllDialogs()}function s(){var e,t=$(".flagReasonCheckBox"),o=$(".newFlagReasonCheckBox"),a=null,r=[];$.each(t,function(e,t){t.checked&&(a=a||0,a|=t.value)}),$.each(o,function(e,t){t.checked&&r.push(t.value)}),null!==a||0<r.length?(e=$("#flagReasonComments").val(),HZ.ajaz.Services.ReportProduct.flagProduct(n,a,r.join(","),e,c)):((e=$("#reportProductAlert")).html(_hgt("Please select at least one reason")),e.removeClass("hidden"))}function c(e){HZ.ui.yamdi.Common.hideAllDialogs(),e&&"true"==e.success?HZ.ui.yamdi.Common.alert(_hgt("Report Submitted"),_hgt("Thank you for submitting this report. We'll review this item shortly and make changes as necessary.")):HZ.ui.yamdi.Common.alert(_hgt("Error"),_hgt(e.error))}a.init({title:_hgt("Report Incorrect Info or Image"),dialogClassName:"reportProductDlg"}),this.handleReportProductClick=function(e){n=e,HZ.ui.yamdi.Common.loading(_hgt("Loading...")),HZ.ajaz.Services.ReportProduct.getFlagReasons(n,t)}};

window.hzmr.push("reportProduct:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End reportProduct.js  **************/
/************* Start changeShipToLocation.js for locale en-US **************/
try {HZ.ns("HZ.module"),HZ.module.ChangeShipToLocation=new function(){var i,e,a,n,t,h,c='<div class="change-shipto-location-dialog__content"><div class="header-2 change-shipto-location-dialog__title">'+_hgt("Change Shipping Location")+'</div><div class="change-shipto-location-dialog__autocomplete-wrapper"><input type="text" class="change-shipto-location-dialog__input form-control input-lg" id="changeShipToLocationInput" value="%CURRENT_LOCATION_STRING%" placeholder="'+_hgt("Enter US zip or city")+'" spellcheck="false" autocomplete="off" autofocus/><div class="change-shipto-location-dialog__autocomplete-container" id="changeShipToLocationAutoSuggestContainer"></div><div id="changeShipToLocationAlert" class="change-shipto-location-dialog__alert text-m hidden"></div></div></div>';this.handleChangeShipToLocationResponse=function(t){var o;t&&"true"==t.success?((o=t.result)&&o.leadTimeText&&n&&this.mountLeadTimeTextAndLink(o.leadTimeText,o.shipToZip,n),HZ.ui.yamdi.Common.hideAllDialogs()):t&&t.error?((o=$("#changeShipToLocationAlert")).html(_hgt(t.error)),o.removeClass("hidden")):(this.mountLeadTimeTextAndLink(e,a,n),HZ.ui.yamdi.Common.hideAllDialogs())},this.changeShipToLocation=function(){var t=$.trim($("#changeShipToLocationInput").val());HZ.ajaz.Services.ChangeShipToLocation.getShipTransitTime(i,t,$.proxy(this.handleChangeShipToLocationResponse,this))},this.locationAutoComplete=function(o,i){HZ.ajaz.Services.autoCompleteLocation(o,function(t){i(t.autocompleteList,o)},"US")},this.registerAutoComplete=function(){void 0===t&&(t=new HZ.search.AutoSuggest).init({autoComplete:!0,searchInputBoxId:"changeShipToLocationInput",autoSuggestContainerId:"changeShipToLocationAutoSuggestContainer",source:$.proxy(this.locationAutoComplete,this),onEnter:$.proxy(this.changeShipToLocation,this)})},this.prepareDialog=function(){var t,o,i;$(".change-shipto-location-dialog").length<=0&&(t=$(HZ.utils.Html.template(c,{CURRENT_LOCATION_STRING:a})),o=$('<button type="button" class="btn btn-secondary">'+_hgt("Cancel")+"</button>").click($.proxy(this.closeDialog,this)),i=$('<button type="submit" class="btn btn-primary">'+_hgt("Update")+"</button>").click($.proxy(this.changeShipToLocation,this)),(h=new HZ.ui.yamdi.Dialog).init({dialogClassName:"change-shipto-location-dialog shareGalleryUrlInput",title:"",controls:[o,i],onViewLoaded:$.proxy(this.registerAutoComplete,this)}),h.setBody(t))},this.closeDialog=function(){HZ.ui.yamdi.Common.hideAllDialogs()},this.showDialog=function(t){$(document).trigger("keyboardHandlerRequired",{source:this,event:t}),HZ.ui.Yamdi.show(h,function(){$(document).trigger("keyboardHandlerReleased",{source:this,event:t})});var o=$("#changeShipToLocationInput");o.focus(),o.val(""),o.attr("placeholder",HZ.data.cacheShipToZip)},this.mountLeadTimeTextAndLink=function(t,o,i){var e;o?($(i).html(""),$(i).append(_hgt(t+";&nbsp;ships to&nbsp;")),e=$('<a id="changeShipToLocationLink" class="colorLink change-shipto-location__link text-m">'+_hgt(o)+"&nbsp;"+_hgt("(change)")+"</a>").click($.proxy(this.showDialog,this)),$(i).append(e),HZ.data.cacheShipToZip=o):$(i).html(_hgt(t))},this.init=function(t){var o;t.leadTimeStr&&t.attachPointSelector&&(e=t.leadTimeStr,n=t.attachPointSelector,i=t.listingId,(o=HZ.data.ListingsInfo.get(i))&&o.mpListing&&(a=t.shipToZip,0<$(".change-shipto-location-dialog").length&&HZ.data.cacheShipToZip&&HZ.data.cacheShipToZip!=a?this.changeShipToLocation():(this.mountLeadTimeTextAndLink(e,a,n),this.prepareDialog()))),$(document).mouseup(function(t){var o=$("#changeShipToLocationAlert");o.is(t.target)||0!==o.has(t.target).length||o.addClass("hidden")})}};

window.hzmr.push("changeShipToLocation:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End changeShipToLocation.js  **************/
/************* Start contactMultiplePros.js for locale en-US **************/
try {HZ.ns("HZ.proPlus"),HZ.proPlus.contactMultiplePros=function(){var a,_=["name","email","phone","zip","message"],n=_hgt("Contact Professionals"),c=_hgt("Contact"),l=_hgt("Call"),d=_hgt("View more professionals"),p="screen_select_pros",m="screen_contact_pros",h="screen_confirm_contact_pros",u=null,E=null,v={screen:p,proUserIds:[],selectedProUserIds:[],title:"local professionals",subtitle:"local professionals",clickUrls:[],reviewUrls:[]},t={},R='<li class="%EXTRACLASS%" posid="%POSITION_ID%"><div class="local-pro-option"><div class="pro-avatar hzHouzzer" data-type="profile" data-id="%USERNAME%" compid="contact_local_pros_pro_avatar" >%AVATAR%</div><div class="pro-details"><div class="text-m pro-name one-line" compid="contact_local_pros_pro_name">%AUTHOR%</div><a class="text-primary" target="_blank" href="%REVIEW_URL%" compid="contact_local_pros_review">%PRO_REVIEWS%</a></div></div></li>',P='<form class=\'sponsored-pro-list-screen screen-contact-selected-pros trackMe %STATUS%\'><div class=\'text-m\'>%CONTACT_PROS_TITLE%:</div><ul id=\'selectedPros\' class=\'list-unstyled\'>%PRO_OPTIONS%</ul><div id="contactForm"><div class="row form-group"><div class="col-xs-12"><input type="text" name="name" class="form-control" placeholder="%NAME_INPUT_PLACEHOLDER%" required></div></div><div class="row form-group"><div class="col-xs-12"><input type="email" name="email" class="form-control" placeholder="%EMAIL_INPUT_PLACEHOLDER%" required></div></div><div class="row form-group"><div class="col-xs-7"><input type="tel" name="phone" class="form-control" placeholder="%PHONE_INPUT_PLACEHOLDER%" required></div><div class="col-xs-5"><input type="text" name="zip" class="form-control" placeholder="%ZIP_INPUT_PLACEHOLDER%" required></div></div><div class="row form-group"><div class="col-xs-12"><textarea class="form-control" name="message" placeholder="%DESC_INPUT_PLACEHOLDER%" required></textarea></div></div></div><div id="%RECAPTCHA_ID%" class="recaptchaDiv"></div><div class="screen-actions"><div class="text-right"><button type="button" class="btn btn-secondary btn-lg mrm" compid="cancelContactPros" id="cancelContactPros">'+_hgt("Cancel")+'</button><button type="submit" class="btn btn-primary btn-lg" compid="submitContactPros" id="submitContactPros">'+_hgt("Send")+"</button></div></div></form>";function O(e){var t,s,a,o=e.proUserId,r=HZ.data.Users.get(o),i="";return r&&(t=HZ.ui.render.User.getUserImageHtml(o,!0,v.clickUrls[o],1),s=HZ.ui.render.User.getUserHtml(o,!0,""),a="",$.isNumeric(r.nr)&&0<parseInt(r.nr)&&(a=HZ.ui.render.User.getProfessionalReview(r)),i=HZ.utils.Html.template(e.template,{OBJ_ID:o,PRO_USERNAME:o,PRO_ENTRY_LABEL:"",AVATAR:t,USERNAME:r.n,AUTHOR:s,POSITION_ID:"pro_"+e.position,PRO_REVIEWS:a,PRO_REVIEW_USERNAME:v.reviewUsernames[o],PRO_REVIEW_TEXT:v.reviewTexts[o],SHOW_SEPARATOR:a?"":"hide",SHOW_REVIEW:v.reviewUsernames[o]||v.reviewTexts[o]?"":"hide",EXTRACLASS:e.extraClass,PROFILE_URL:v.clickUrls[o],REVIEW_URL:v.reviewUrls[o]})),i}onRecaptcphaLoadedCallback=function(){if("undefined"!=typeof grecaptcha){try{"undefined"!=typeof recaptchaWidgetId&&grecaptcha.reset(recaptchaWidgetId)}catch(e){}var e="recaptchaWidget"+recaptchaId;$("#"+e).is(":empty")&&(recaptchaWidgetId=grecaptcha.render(e,{sitekey:HZ.utils.Config.recaptchaPublicKey}))}},this.render=function(){var e=null;switch(v.screen){case p:var s,t,a="";v.proUserIds.forEach(function(e,t){t={proUserId:s=e,position:t,template:v.isSingleVariant?'<li class="local-pro-option" posid="%POSITION_ID%"><div class="pro-checkbox" objid="%OBJ_ID%"><input type="checkbox" value="%PRO_USERNAME%" compid="contact_local_pros_checkbox" checked></div><div class="pro-avatar" compid="contact_local_pros_pro_avatar">%AVATAR%</div><div class="pro-details"><a class="header-3 pro-name" compid="contact_local_pros_pro_name" target="_blank" href="%PROFILE_URL%">%AUTHOR%</a><div class="separator %SHOW_SEPARATOR%"></div><a class="text-primary" target="_blank" href="%REVIEW_URL%" compid="contact_local_pros_review">%PRO_REVIEWS%</a><div class="pro-review %SHOW_REVIEW%"><span class="pro-review-user text-bold">%PRO_REVIEW_USERNAME%</span> - <a class="pro-review-text" target="_blank" href="%REVIEW_URL%" compid="contact_local_pros_review_text">"%PRO_REVIEW_TEXT%"</a></div></div></li>':'<li class="local-pro-option" posid="%POSITION_ID%"><div class="pro-checkbox" objid="%OBJ_ID%"><input type="checkbox" value="%PRO_USERNAME%" compid="contact_local_pros_checkbox" checked></div><div class="pro-avatar" compid="contact_local_pros_pro_avatar">%AVATAR%</div><div class="pro-details"><a class="text-m pro-name one-line" compid="contact_local_pros_pro_name" target="_blank" href="%PROFILE_URL%">%AUTHOR%</a><a class="text-primary" target="_blank" href="%REVIEW_URL%" compid="contact_local_pros_review">%PRO_REVIEWS%</a></div></li>',extraClass:""};a+=O(t)}),(t=v.isSingleVariant?v.isResponsive?$(HZ.utils.Html.template("<form class=\"sponsored-single-pro-screen screen-select-pros trackMe\"><div class='location'>%LOCATION%</div><ul id='localProsSelector' class='list-unstyled mtl mbl'>%PRO_OPTIONS%</ul><div class=\"screen-actions\"><a id='phoneNumber' class='btn btn-secondary btn-lg' compid='contact_local_pros_call_button' href='tel:%PHONE_NUMBER%'><i class='hzi-font hzi-Phone-fill'></i>%CALL%</a><button id='contactProButton' compid='contact_local_pros_contact_button' type='submit' class='btn btn-primary btn-lg'><i class='hzi-font hzi-Email'></i>%CONTACT_A_PROFESSIONAL%</button><a href='%VIEW_MORE_PROS_URL%' id='viewMorePros' compid='contact_local_pros_view_more_pros_link' class='colorLink'>%VIEW_MORE_PROS%<span class='more-icon'></span></a></div></form>",{CONTACT_A_PROFESSIONAL:c,LOCATION:v.locationName,PRO_OPTIONS:a,VIEW_MORE_PROS:d,PHONE_NUMBER:v.phoneNumbers[s],CALL:l,VIEW_MORE_PROS_URL:v.categoryUrl})):$(HZ.utils.Html.template("<form class=\"sponsored-single-pro-screen screen-select-pros trackMe\"><div class='location'>%LOCATION%</div><ul id='localProsSelector' class='list-unstyled mtl mbl'>%PRO_OPTIONS%</ul><div class=\"screen-actions\"><button id='contactProButton' compid='contact_local_pros_contact_button' type='submit' class='btn btn-primary btn-lg'>%CONTACT_A_PROFESSIONAL%</button><div id='phoneNumber' class='text-m'><i class='hzi-font hzi-Phone-fill'></i>%PHONE_NUMBER%</div></div></form><a href='%VIEW_MORE_PROS_URL%' id='viewMorePros' compid='contact_local_pros_view_more_pros_link' class='colorLink'>%VIEW_MORE_PROS%<span class='more-icon'></span></a>",{CONTACT_A_PROFESSIONAL:c,LOCATION:v.locationName,PRO_OPTIONS:a,VIEW_MORE_PROS:d,PHONE_NUMBER:v.phoneNumbers[s],VIEW_MORE_PROS_URL:v.categoryUrl})):$(HZ.utils.Html.template("<form class=\"sponsored-pro-list-screen screen-select-pros trackMe\"><div class='text-l'>%SELECT_PROS_TITLE%:</div><ul id='localProsSelector' class='list-unstyled mtl mbl'>%PRO_OPTIONS%</ul><div class=\"screen-actions\"><button id='contactProButton' compid='contact_local_pros_contact_button' type='submit' class='btn btn-primary btn-block btn-lg'>%CONTACT_A_PROFESSIONAL%</button></div></form>",{SELECT_PROS_TITLE:_hgt("Select the {metroArea} professionals you would like to contact",{metroArea:v.locationName}),CONTACT_A_PROFESSIONAL:n,PRO_OPTIONS:a}))).off("click").on("click","#contactProButton",this.handleContactProfessionalFormSubmit.bind(this)).on("click",".pro-avatar",this.handleProAvatarClick.bind(this)),e=t;break;case m:recaptchaId++;var a="",o=1<v.selectedProUserIds.length?"pro-display-compact":"pro-display-full";v.selectedProUserIds.forEach(function(e,t){a+=O({proUserId:e,position:t,template:R,extraClass:o})});var r=$(HZ.utils.Html.template(P,{CONTACT_PROS_TITLE:_hgtp("","Contact this professional","Contact these professionals",v.selectedProUserIds.length),PRO_OPTIONS:a,NAME_INPUT_PLACEHOLDER:"Name",EMAIL_INPUT_PLACEHOLDER:"Email",PHONE_INPUT_PLACEHOLDER:"Phone Number",ZIP_INPUT_PLACEHOLDER:"Zip Code",DESC_INPUT_PLACEHOLDER:"Brief description of your project",RECAPTCHA_ID:"recaptchaWidget"+recaptchaId,STATUS:HZ.data.CurrentSessionUser?"withoutCaptcha":"withCaptcha"}));r.off("submit change keydown focus blur click").on("click","#cancelContactPros",function(){v.screen=p,this.render()}.bind(this)).on("click","#submitContactPros",this.handleContactPros.bind(this)).on("submit",this.handleContactPros.bind(this)).on("change keydown","input, textarea",this.clearErrorState.bind(this)).on("focus","input, textarea",this.onContactFormFocus.bind(this)).on("blur","input, textarea",this.onContactFormBlur.bind(this)),e=r;break;case h:a="";v.selectedProUserIds.forEach(function(e,t){a+=O({proUserId:e,position:t,template:R,extraClass:"mbxl"})});r=$(HZ.utils.Html.template('<div class="sponsored-pro-list-screen screen-confirm-contact-selected-pros"><div class="screen-confirm-contact-selected-pros__text header-3 text-unbold">%CONFIRM_CONTACT_PROS_TITLE%</div><div class="screen-confirm-contact-selected-pros__check-mark-circle check-mark-circle"><span class="hzi-font hzi-Checked-Selection"></span></div></div>',{CONFIRM_CONTACT_PROS_TITLE:_hgt("Your message was sent successfully"),PRO_OPTIONS:a}));r.off("click").on("click","#confirmContactPros",function(){v.screen=p,this.render()}.bind(this)),e=r}var i=$('<div class="text-gray-lightest text-xxs sponsored-pro-list-sponsored">'+_hgt("Sponsored")+"</div>");E.empty().append(this.getBannerHtml(v.title,v.subtitle,v.isSingleVariant)),v.isSingleVariant&&!v.isResponsive&&(E.siblings(".photoMeta").css({top:E.height()}),$(window).resize(function(){E.siblings(".photoMeta").css({top:E.height()})})),u.empty().append(i).append(e),e.find('input[type="text"]:first').focus(),HZ.data.CurrentSessionUser||v.screen==m&&("undefined"==typeof grecaptcha?$.getScript("https://www.google.com/recaptcha/api.js?onload=onRecaptcphaLoadedCallback&render=explicit&hl="+HZ.utils.Config.language):onRecaptcphaLoadedCallback())}.bind(this),this.onContactFormFocus=function(e){this.clearErrorState(),t.onContactFormFocus&&t.onContactFormFocus()},this.onContactFormBlur=function(e){this.clearErrorState(),t.onContactFormBlur&&t.onContactFormBlur()},this.handleProAvatarClick=function(e){v.isSingleVariant||(e=$(e.currentTarget).closest("li").find('input[type="checkbox"]')).prop("checked",!e.prop("checked"))},this.handleContactProfessionalFormSubmit=function(e){e.preventDefault();e=$(e.target).closest("form").find(":checked").map(function(e,t){return $(t).val()}).get();e.length?(v.selectedProUserIds=e,v.screen=m,this.render()):HZ.ui.yamdi.Common.alert(_hgt("Error"),_hgt("Please select at least 1 professional."))},this.handleContactPros=function(e){e.preventDefault();var t=$(e.target).closest("form"),s=t.get(0);if(s.checkValidity()){var a=HZ.sendEmail.types.PRO,o=$(s.name).val(),r=$(s.email).val(),i=$(s.phone).val(),e=$(s.zip).val(),s=$(s.message).val(),n=_hgt("Contact Name: {name}",{name:o})+"\n"+_hgt("Phone Number: {phoneNumber}",{phoneNumber:i})+"\n"+_hgt("Zip Code: {zipCode}",{zipCode:e})+"\n"+_hgt("Sender email: {emailAddress}",{emailAddress:r})+"\n\n"+s;if(!HZ.data.CurrentSessionUser){var c="undefined"!=typeof grecaptcha?grecaptcha.getResponse(recaptchaWidgetId):"";if(""===c)return void HZ.ui.yamdi.Common.alert("Error",_hgt("Please solve the captcha."))}t.find("[type=submit]").attr("disabled",!0),v.selectedProUserIds.forEach(function(e){var t=HZ.data.Users.get(e).n,s={};s[HZ.sendEmail.params.to]=t,s[HZ.sendEmail.params.subject]=_hgt("Houzz project inquiry"),s[HZ.sendEmail.params.message]=n,s[HZ.sendEmail.params.type]=a,HZ.data.CurrentSessionUser?HZ.ajaz.Services.sendEmail(s,!1,this.onContactFormSubmitResponse.bind(this,e)):(s[HZ.sendEmail.params.from]=r,s[HZ.sendEmail.params.captchaResponse]=c,HZ.ajaz.Services.sendGuestEmail(s,this.onContactFormSubmitResponse.bind(this,e)))}.bind(this))}else for(var l,d=_.length,p=0;p<d;p++)if(!(l=t.find("[name="+_[p]+"]")).get(0).checkValidity()){this.handleFieldValidationError(l);break}},this.handleFieldValidationError=function(e){var t,s=e.get(0).validity;if(s.valueMissing)switch(e.attr("name")){case"name":t=_hgt("Please enter your name");break;case"email":t=_hgt("Please enter your email address");break;case"phone":t=_hgt("Please enter your phone number");break;case"zip":t=_hgt("Please enter your zip code");break;case"message":t=_hgt("Please add a short description of your project")}else s.typeMismatch&&(t=HZ.sendEmail.texts.ERROR_INVALID_FROM_EMAIL_ADDRESS);a=$(HZ.utils.Html.template('<div class="form-field-error"><span class="outer-tip"></span><span class="inner-tip"></span><span class="message">%MESSAGE%</span></div>',{MESSAGE:t})),this.clearErrorState(),this.showFieldError(e,a)},this.showFieldError=function(e,t){e.parent().addClass("has-error"),e.after(t)},this.clearErrorState=function(e){u.find(".has-error").removeClass("has-error").find(".form-field-error").remove()},this.onContactFormSubmitResponse=function(e,t){var s;"true"===t.success?(s=parseInt(e),s={proUserId:e,positionId:v.proUserIds.indexOf(s),emailLogId:t.emailLogId},HZ.utils.Logger.sendEventLogLightweight("contact_multiple_pros_email_sent",s),v.screen=h,this.render()):(HZ.ui.yamdi.Common.alert(_hgt("Send message error!"),t.error),$("#contactForm").closest("form").find("[type=submit]").attr("disabled",!1))},this.getBannerHtml=function(e,t,s){var a;return s?(a=HZ.utils.Html.template('<div class="sponsored-single-pro-banner"><div class="media-body header-2"><span class="sponsored-single-pro-pro-icon hzi-font hzi-Pro-Fill"></span><span class="sponsored-single-pro-banner-title no-margin">%BANNER_TITLE%</span></div></div>',{BANNER_TITLE:e,BANNER_SUBTITLE:t}),v.locationName):a=HZ.utils.Html.template('<div class="sponsored-pro-list-banner"><div class="media-left"><span class="sponsored-pro-list-pro-icon hzi-font hzi-Pro-Fill"></span></div><div class="media-body"><div class="sponsored-pro-list-banner-title text-bold no-margin">%BANNER_TITLE%</div><div class="sponsored-pro-list-banner-subtitle text-l">%BANNER_SUBTITLE%</div></div></div>',{BANNER_TITLE:e,BANNER_SUBTITLE:t}),a},this.init=function(e){"undefined"==typeof recaptchaId&&(recaptchaId=0),v.isResponsive=e.isResponsive,v.proUserIds=e.proUserIds,v.phoneNumbers=e.phoneNumbers,v.categoryUrl=e.categoryUrl,v.title=e.title,v.subtitle=e.subtitle,v.clickUrls=e.clickUrls,v.reviewUrls=e.reviewUrls,v.reviewUsernames=e.reviewUsernames,v.reviewTexts=e.reviewTexts,v.locationName=e.locationName,v.isSingleVariant=e.isSingleVariant,u=e.container instanceof jQuery?e.container:$(e.container),E=e.bannerContainer instanceof jQuery?e.bannerContainer:$(e.bannerContainer),t=e.props,this.render()}};

window.hzmr.push("contactMultiplePros:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End contactMultiplePros.js  **************/
/************* Start soldByBox.js for locale en-US **************/
try {$(function(){var i=null;$("body").on("click",".sold-by-box--tt-trigger",function(){var t,o,l;i||(l=[HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Got it!"),"hzSoldByBoxDlgOKBtn",HZ.ui.yamdi.Common.hideAllDialogs,!1,!1,"large")],(i=new HZ.ui.yamdi.Dialog).init({dialogClassName:"soldByBoxDlg",controls:l,hideDialogOnBgClick:!0}),i.setTitle(_hgt("Buy 10% More for Waste")),i.setBody((t=$("<div/>"),o=$('<div class="sbb-dlg__image"/>'),l=$('<p class="text-l pll prl"/>').text(_hgt("Due to cuts, breaks and other waste when installing your tile, you should multiply the square footage of your area by 10% and purchase enough tile to cover this amount.")),t.append(o,l),t))),HZ.ui.Yamdi.show(i)})});

window.hzmr.push("soldByBox:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End soldByBox.js  **************/
/************* Start lightboxColorPickerUtils.js for locale en-US **************/
try {HZ.ns("HZ.lb.Utils.ColorPicker"),HZ.lb.Utils.ColorPicker={hasColorPickerAd:function(r){var n=HZ.data.ColorPickerAd.get(r),r=!1;return r=n&&n.hasOwnProperty("config")?n.config.hasOwnProperty("campaignId"):r},getColorPickerAd:function(r){var n=null;return n=this.hasColorPickerAd(r)?HZ.data.ColorPickerAd.get(r):n},getConfig:function(r){var n=null;return n=r&&r.hasOwnProperty("config")?r.config:n},getAssets:function(r){var n=null;return n=r.hasOwnProperty("assets")?r.assets:n},getTrackLinks:function(r){var n=null;return n=r.hasOwnProperty("track")?r.track:n},getCampaignId:function(r){var n=this.getConfig(r),r=null;return r=n&&n.hasOwnProperty("campaignId")?n.campaignId:r},serializeColorParams:function(r){return r.map(function(r,n){var o=r.red||r.r,t=r.green||r.g,r=r.blue||r.b;return["c"+n,HZ.utils.Color.rgbToHex(o,t,r).substring(1)].join("=")}).join("/")},serializeCoordParams:function(r){return r.map(function(r,n){var o,r=r.hasOwnProperty("left")&&r.hasOwnProperty("top")?(o=r.left,r.top):(o=r.x,r.y);return[["x"+n,o].join("="),["y"+n,r].join("=")].join("/")}).join("/")}};

window.hzmr.push("lightboxColorPickerUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxColorPickerUtils.js  **************/
/************* Start lightboxColorPicker2.js for locale en-US **************/
try {HZ.lb.plugins.ColorPickerCTA=function(){var s,t,r,n,c,i=HZ.lb.Config.contentGroupIds.OVERVIEW,d=_hgt("Show Paint Options"),o=_hgt("Hide Paint Options"),h=_hgt("Sponsored by:");this.setOwner=function(e){s=e,t=$('<section class="lbInfoBox color-picker-cta separator"></section>'),r=$('<section class="lbInfoBox color-picker-cta"></section>'),(n=t.add(r)).on("click",".js-cta",this.handleCtaClick.bind(this)),n.on("click",".js-close",this.handleCloseClick.bind(this)),s.addInfoBoxToContentGroup(t.get(0),"colorPickerCTA",i),s.addInfoBoxToContentGroup(r.get(0),"colorPickerCTA2",HZ.lb.Config.contentGroupIds.COLOR_PICKER)},this.imageChanged=function(){var e,t,r,i,o=s.getCurrentSpace(),a=HZ.lb.Utils.ColorPicker.getColorPickerAd(o.id),l=HZ.lb.Utils.ColorPicker.getConfig(a);n.empty().addClass("hidden"),!a||s.isFullPageAd()||s.isSpotlightContext()||(n.removeClass("hidden"),e="",(t=HZ.lb.Utils.ColorPicker.getAssets(a)).hasOwnProperty("logoUrl")&&(e=t.logoUrl),r="javascript:;",i="_top",(t=HZ.lb.Utils.ColorPicker.getTrackLinks(a)).hasOwnProperty("clkTrkLink")&&(r=t.clkTrkLink,i="_blank"),n.append(HZ.utils.Html.template('<div class="row trackMe %ADV_LABEL%" objid="%SPACE_ID%"><div class="col-xs-6 btn"><button class="btn btn-default btn-block js-cta btn-color-picker-cta" compid="lb_color_picker_cta"><i class="color-picker-icon"></i><span class="color-picker-btn-label">%BUTTON_LABEL%</span></button></div><div class="col-xs-6 logo"><span class="sponsor-right-float"><p class="text-xs sponsored">%SPONSORED_LABEL%</p><a href="%LOGO_LINK%" target="%LOGO_TARGET%"><p class="color-picker-sponsor-logo" style="background-image: url(%BG_IMAGE_URL%)"></p></a></span></div></div>',{ADV_LABEL:a.config.advPaletteLabel,SPACE_ID:o.id,BUTTON_LABEL:l.advShowPaintColorMessage||d,SPONSORED_LABEL:h,BG_IMAGE_URL:e,LOGO_LINK:r,LOGO_TARGET:i})),t.hasOwnProperty("impTrkLink")&&HZ.lb.Utils.registerTrackingUrl(t.impTrkLink,o.id),o=o.id,(a=HZ.lb.Utils.ColorPicker.getColorPickerAd(o))&&(a=HZ.lb.Utils.ColorPicker.getCampaignId(a),n.find(".js-cta").attr("posid",a))),c=n.find(".js-cta")},this.lightboxModeChanged=function(){var e=s.getCurrentSpace(),t=HZ.lb.Utils.ColorPicker.getColorPickerAd(e.id),e=HZ.lb.Utils.ColorPicker.getConfig(t),t=c.find(".color-picker-btn-label");s.isColorPicking()?(c.removeClass("js-cta").addClass("js-close"),t.text(e&&e.advHidePaintColorMessage?e.advHidePaintColorMessage:o)):(c.removeClass("js-close").addClass("js-cta"),t.text(e&&e.advShowPaintColorMessage?e.advShowPaintColorMessage:d))},this.imageDataUpdated=function(){this.imageChanged()},this.handleCtaClick=function(e){s.enterColorPickerMode(),s.setCurrentContentGroupIndex(HZ.lb.Config.spaceContentGroupIds.indexOf(HZ.lb.Config.contentGroupIds.COLOR_PICKER)),s.focusCurrentContentGroup()},this.handleCloseClick=function(e){s.exitColorPickerMode(),s.animateScrollTo(0)}},HZ.lb.plugins.ColorPicker=function(){var l,o,s,n,t,r,i,a,c,d,h,g,p,u,C,k,b,m,S,f,P,v,H=HZ.lb.Config.contentGroupIds.COLOR_PICKER,A="[COLOR_CODE]",L="[COLOR_HEX_RGB]",_="[COLOR_FAMILY]",I="[COLOR_CODES]",x='<li class="color-picker-swatch"><div class="%SWATCH_CLASS%"><div class="color-swatch" style="background-color:%HEX%;"></div></div><div class="%INFO_CLASS%"><p class="color-name">%TITLE%</p><p class="color-cta"><a class="text-primary text-nowrap color-picker-get-paint" href="javascript:;">%CTA% <i class="more-icon"></i></a></p></div>%BUY_SAMPLE_BUTTON%</li>',y=_hgt("Inspired by this Room"),w=_hgt("Sponsored by:"),O=_hgt("Buy Samples"),M=_hgt("More Samples"),T=_hgt("Buy Sample"),B=_hgt("Save Palette"),Z=_hgt("Share Palette"),E=_hgt("Get this paint");this.setOwner=function(e){l=e,o=$(document),s=$('<section class="lbInfoBox color-picker-info"></section>'),l.addInfoBoxToContentGroup(s.get(0),"colorPickerInfo",H),t=l.getNodeByContentGroupId(H),n=$('<div class="color-picker-markers"></div>'),l.addLbImageLayer(n.get(0)),s.on("mouseenter mouseleave",".color-picker-swatch",this.handleSwatchHover.bind(this)).on("click",".color-picker-swatch:not(.current)",this.handleSwatchClick.bind(this)).on("click",".color-picker-swatch .color-picker-get-paint",this.handleGetPaintClick.bind(this)).on("click",".color-picker-swatch .color-picker-buy-sample",this.handleBuySampleClick.bind(this)).on("click",".color-picker-buy",this.handleBuySamplesClick.bind(this)).on("click",".color-picker-save",this.handleSaveClick.bind(this)).on("click",".color-picker-share",this.handleShareClick.bind(this)),n.on("mouseenter mouseleave",".color-picker-marker:not(.current)",this.handleSwatchHover.bind(this)).on("click",".color-picker-marker .color-picker-get-paint",this.handleGetPaintClick.bind(this)).on("click",".color-picker-swatch .color-picker-buy-sample",this.handleBuySampleClick.bind(this)),o.on("mousedown",".color-picker-marker .marker-crosshair",this.handleColorMarkerDragStart.bind(this))},this.imageChanged=function(){var e;"undefined"!=typeof ColorAnalyzer?(i=0,u=[],C=[],b=[],t.addClass("no-content"),s.addClass("hidden"),(h=h||new ColorAnalyzer(HZ.lb.Config.STATIC_URL)).reset(),s.empty(),n.empty(),HZ.lb.Utils.ColorPicker.hasColorPickerAd(l.getCurrentSpace().id)&&(t.removeClass("no-content"),s.removeClass("hidden"),s.append('<div id="#placeholders"></div>')),e=l.getImageBounds(),v={xMin:0,xMax:e.w,yMin:0,yMax:e.h}):HZ.lb.Utils.loadColorPickerResources(this.imageChanged.bind(this))},this.lightboxModeChanged=function(){l.isColorPicking()&&(C.length||this.analyzeCurrentImage())},this.analyzeCurrentImage=function(){var e=l.getCurrentSpace(),t=l.isFullPageAd();!e||t||l.isSpotlightContext()||g||HZ.lb.Utils.ColorPicker.hasColorPickerAd(e.id)&&(e=HZ.lb.Utils.ColorPicker.getColorPickerAd(e.id),(e=HZ.lb.Utils.ColorPicker.getConfig(e)).hasOwnProperty("adHtml")&&(r=e.adHtml),e.hasOwnProperty("advPaletteLabel")&&(k=e.advPaletteLabel),p=$("<img>").attr("src",l.getImageData().src),this.calculateImageScale(),e=p.get(0),g=!0,h.getColors(e,this.colorAnalyzerGetColorsCallback.bind(this)))},this.currentContentGroupChanged=function(){C.length?l.getCurrentContentGroupId()==H?l.enterColorPickerMode():l.exitColorPickerMode():l.getCurrentContentGroupId()==H&&this.analyzeCurrentImage()},this.colorAnalyzerGetColorsCallback=function(e,t,r,i){var o,a;g=!1,e&&t&&(o=l.getColorPickerData(),a=l.getCurrentSpace(),C=o?(u=o.palette,o.locations):(u=e,t),HZ.ajaz.Services.cacheColorPickerColors(a.id,u,C,r,i),HZ.ajaz.Services.getManufacturerColors(u,k).then(this.handleManufacturerColorsResponse.bind(this)))},this.handleManufacturerColorsResponse=function(e){e.success&&"true"==e.success&&(b=[],e.palette.forEach(function(e){b.push(e[0])}),this.calculateImageScale(),this.renderAdInfo(),this.renderImageMarkers(),this.setSelectedSwatchIndex(i))},this.renderAdInfo=function(){var e=l.getCurrentSpace(),t=HZ.lb.Utils.ColorPicker.getColorPickerAd(e.id),e=HZ.lb.Utils.ColorPicker.getConfig(t),t=HZ.lb.Utils.ColorPicker.getTrackLinks(t),e={SPACE_ID:l.getCurrentSpace().id,HEADER:this.renderHeader(),SPONSORSHIP:this.renderSponsorship(),SWATCHES:this.renderSwatchList(),BUY_LABEL:t.swatchBuyLink?M:e.advBuySamplesMessage||O,SAVE_LABEL:B,SHARE_LABEL:Z,AD_HTML:r,BUY_SAMPLES_CLASS:t.swatchBuyLink?"btn-secondary":"btn-primary"};s.find(".js-color-picker-info").remove(),s.append(HZ.utils.Html.template('<div class="trackMe js-color-picker-info" scopeid="lb_color_picker" objid="%SPACE_ID%">%AD_HTML%%HEADER%<ul class="list-unstyled row mtm">%SWATCHES%</ul><div class="row"><p class="col-xs-12 mbl"><button class="btn %BUY_SAMPLES_CLASS% text-s btn-block color-picker-buy color-picker-btn-height" compid="lb_buy_palette_samples">%BUY_LABEL%</button></p><p class="col-xs-6 mbl"><button class="btn btn-secondary text-s btn-block color-picker-save color-picker-btn-height" compid="lb_save_palette_to_ibk"><i class="icon-font icon-heart color-picker-btn-icon"></i><span> %SAVE_LABEL%</span></button></p><p class="col-xs-6 mbl"><button class="btn btn-secondary text-s btn-block color-picker-share color-picker-btn-height" compid="lb_share_palette"><i class="icon-font icon-box_up_arrow color-picker-btn-icon"></i><span> %SHARE_LABEL%</span></button></p></div></div>',e));HZ.lb.Utils.ColorPicker.getColorPickerAd(l.getCurrentSpace().id);s.find(".color-picker-buy").toggleClass("hidden",!t.hasOwnProperty("samplesLink"))},this.renderHeader=function(){var e=HZ.lb.Utils.ColorPicker.getColorPickerAd(l.getCurrentSpace().id),e=HZ.lb.Utils.ColorPicker.getConfig(e),e={TITLE:y,SPONSOR:e.advDisplayName};return HZ.utils.Html.template('<div class="row mbm"><div class="col-xs-12"><p class="text-bold">%TITLE%</p></div></div>',e)},this.renderSponsorship=function(){var e="",t=HZ.data.ColorPickerAd.get(l.getCurrentSpace().id),t=HZ.lb.Utils.ColorPicker.getAssets(t);return t.hasOwnProperty("logoUrl")&&(e=t.logoUrl),HZ.utils.Html.template('<div class="row ptm"><div class="color-picker-sponsorship"><div class="col-xs-3"><p class="text-xs">%SPONSORED_LABEL%</p></div><div class="col-xs-9"><p class="color-picker-sponsor-logo" style="background-image: url(%BG_IMAGE_URL%)"></p></div></div></div>',{SPONSORED_LABEL:w,BG_IMAGE_URL:e})},this.renderSwatchList=function(){var t=[],r=this.renderSwatch.bind(this);return b.forEach(function(e){e&&t.push(r(e))}),t.join("")},this.renderSwatch=function(e){var t=l.getCurrentSpace(),r=HZ.lb.Utils.ColorPicker.getColorPickerAd(t.id),i=HZ.lb.Utils.ColorPicker.getConfig(r),o=HZ.lb.Utils.ColorPicker.getTrackLinks(r),t=e.name,r=e.code,o={HEX:HZ.utils.Color.rgbToHex(e.red,e.green,e.blue),TITLE:t+" "+r,CTA:i.advPaintCTAMessage||E,BUY_SAMPLE_BUTTON:o.swatchBuyLink?this.renderBuySampleButton():null,SWATCH_CLASS:"col-xs-2",INFO_CLASS:o.swatchBuyLink?"col-xs-6":"col-xs-10"};return HZ.utils.Html.template(x,o)},this.renderBuySampleButton=function(){var e={BUY_SAMPLE_LABEL:config.advBuySampleMessage||T,BUY_SAMPLE_CLASS:"col-xs-4 full-height"};return HZ.utils.Html.template('<div class="%BUY_SAMPLE_CLASS%"><div class="buy-button-center "><button class="btn btn-primary btn-block text-s color-picker-buy-sample color-picker-btn-height" compid="lb_buy_palette_sample">%BUY_SAMPLE_LABEL%</button></div></div>',e)},this.renderImageMarkers=function(){n.empty();for(var e=Math.min(C.length,b.length,5),t=0;t<e;t++){var r=b[t];n.append(this.renderImageMarker(r,t))}this.positionImageMarkers()},this.renderImageMarker=function(e,t){var r=l.getCurrentSpace(),i=HZ.lb.Utils.ColorPicker.getColorPickerAd(r.id),o=HZ.lb.Utils.ColorPicker.getConfig(i),a="rgb("+[e.red,e.green,e.blue].join(",")+")",r=e.name,i=e.code,o={HEX:HZ.utils.Color.rgbToHex(e.red,e.green,e.blue),TITLE:r+" "+i,CTA:o.advPaintCTAMessage||E,SWATCH_CLASS:"col-xs-3",INFO_CLASS:"col-xs-9"},o=HZ.utils.Html.template(x,o);return HZ.utils.Html.template('<div class="color-picker-marker" dragable="false">%ARROWS%<i class="marker-crosshair" style="background-color:%BG_COLOR%;"></i><div class="marker-info-bubble"><ul class="list-unstyled text-right row">%SWATCH%</ul><div class="info-bubble-tip"></div></div></div>',{BG_COLOR:a,SWATCH:o,ARROWS:0==t?'<div class="anim-arrows"><i class="marker-crosshair-anim"></i><i class="marker-crosshair-anim"></i><i class="marker-crosshair-anim"></i></div>':""})},this.positionImageMarkers=function(){var e=l.getImageBounds(),r=this.positionMarkerInfo.bind(this);n.css({top:e.y,left:e.x,width:e.w,height:e.h}),n.find(".color-picker-marker").each(function(e,t){t=$(t),e=C[e];t.css({top:e.y*m,left:e.x*m}),r(t)})},this.positionMarkerInfo=function(e){var t=parseInt(e.css("top")),r=parseInt(e.css("left")),i=l.getImageBounds();e.removeClass("bubble-left bubble-right bubble-bottom"),r<160?e.addClass("bubble-right"):r>i.w-160&&e.addClass("bubble-left"),t<90&&e.addClass("bubble-bottom")},this.handleSwatchClick=function(e){this.setSelectedSwatchIndex($(e.currentTarget).index())},this.handleSwatchHover=function(e){var t=$(e.currentTarget).index();switch(e.type){case"mouseenter":this.setHighlightedSwatchIndex(t);break;case"mouseleave":this.setHighlightedSwatchIndex(null)}},this.handleColorMarkerDragStart=function(e){var t=$(e.target).closest(".color-picker-marker").addClass("dragging");n.addClass("dragging"),c=t.index(),this.setSelectedSwatchIndex(c);var r=parseInt(t.css("top")),i=parseInt(t.css("left")),t=p.get(0);return S={w:t.naturalWidth,h:t.naturalHeight},d=this.getPointRGB(i,r),P={top:r,left:i},f={x:e.pageX,y:e.pageY},o.on("mouseup.colorPicker",this.onColorMarkerDragEnd.bind(this)),o.on("mousemove.colorPicker",this.onColorMarkerDragMove.bind(this)),e.preventDefault(),!1},this.onColorMarkerDragMove=function(e){var t=e.pageX-f.x,r=e.pageY-f.y,i=Math.max(v.yMin,Math.min(v.yMax,P.top+r)),o=Math.max(v.xMin,Math.min(v.xMax,P.left+t)),r=$(n.children().get(c));r.css({top:i,left:o});t=this.getPointRGB(o,i);return d=t,r.find(".marker-crosshair").css({backgroundColor:"rgb("+[t.r,t.g,t.b].join(",")+")"}),C[c]={x:Math.ceil(o/m),y:Math.ceil(i/m)},this.positionMarkerInfo(r),e.preventDefault(),!1},this.onColorMarkerDragEnd=function(e){o.off(".colorPicker"),n.removeClass("dragging"),$(n.children().get(c)).removeClass("dragging"),this.getManufacturerPaintForRGB(c,d),d=c=null},this.getPointRGB=function(e,t){var r=Math.ceil(t/m),t=Math.ceil(e/m),e=h.imageData.data,t=4*(S.w*r+t);return{r:e[t],g:e[1+t],b:e[2+t]}},this.getManufacturerPaintForRGB=function(r,e){var e=[[e.r,e.g,e.b]],i=$(n.children().get(r)),o=$(s.find(".color-picker-swatch").get(r)),a=this.renderImageMarker.bind(this),l=this.renderSwatch.bind(this);HZ.ajaz.Services.getManufacturerColors(e,k).then(function(e){var t;e.success&&"true"==e.success&&e.palette&&e.palette.length&&(t=e.palette[0][0],b[r]=t,e=$(a(t)).attr("class",i.attr("class")).attr("style",i.attr("style")),i.replaceWith(e),t=$(l(t)).attr("class",o.attr("class")),o.replaceWith(t))})},this.handleGetPaintClick=function(e){e=this.getClickedElementIndex(e),e=this.generateGetPaintUrl(b[e]);this.navigateToAdvertiserSite(e)},this.handleBuySampleClick=function(e){e=this.getClickedElementIndex(e),e=this.generateBuySampleUrl(b[e]);this.navigateToAdvertiserSite(e)},this.handleBuySamplesClick=function(e){var t=this.generateSamplesUrl();this.navigateToAdvertiserSite(t)},this.getClickedElementIndex=function(e){var t;switch(e.delegateTarget){case n.get(0):t=".color-picker-marker";break;case s.get(0):t=".color-picker-swatch"}return $(e.target).closest(t).index()},this.generateGetPaintUrl=function(e){var t=HZ.lb.Utils.ColorPicker.getColorPickerAd(l.getCurrentSpace().id),r=HZ.lb.Utils.ColorPicker.getTrackLinks(t),i="",t="";return r.hasOwnProperty("swatchLink")&&(i=r.swatchLink),r.hasOwnProperty("advParamTemplate")&&(t=r.advParamTemplate),i&&t&&-1!=(t=-1!=(t=-1!=t.indexOf(A)?t.replace(A,e.code):t).indexOf(_)&&e.hasOwnProperty("color_family")?t.replace(_,e.color_family):t).indexOf(L)&&(e=[HZ.utils.Color.toHex(e.red),HZ.utils.Color.toHex(e.green),HZ.utils.Color.toHex(e.blue)].join(""),t=t.replace(L,e)),i+t},this.generateBuySampleUrl=function(e){var t=HZ.lb.Utils.ColorPicker.getColorPickerAd(l.getCurrentSpace().id),r=HZ.lb.Utils.ColorPicker.getTrackLinks(t),i="",t="";return r.hasOwnProperty("swatchBuyLink")&&(i=r.swatchBuyLink),r.hasOwnProperty("advParamTemplate")&&(t=r.advParamTemplate),i&&t&&-1!=(t=-1!=(t=-1!=t.indexOf(A)?t.replace(A,e.code):t).indexOf(_)&&e.hasOwnProperty("color_family")?t.replace(_,e.color_family):t).indexOf(L)&&(e=[HZ.utils.Color.toHex(e.red),HZ.utils.Color.toHex(e.green),HZ.utils.Color.toHex(e.blue)].join(""),t=t.replace(L,e)),i+t},this.generateSamplesUrl=function(){var t,e=HZ.lb.Utils.ColorPicker.getColorPickerAd(l.getCurrentSpace().id),r=HZ.lb.Utils.ColorPicker.getTrackLinks(e),i="",e="";return r.hasOwnProperty("samplesLink")&&(i=r.samplesLink),r.hasOwnProperty("advParamTemplate")&&(e=r.advParamTemplate),i&&e&&-1!=e.indexOf(I)&&(t=[],b.forEach(function(e){t.push(e.code)}),e=e.replace(I,t.join(","))),i+e},this.handleSaveClick=function(e){var t,r,i=l.getCurrentSpace();HZ.data.CurrentSessionUser?(t=i.id,r=HZ.lb.Utils.ColorPicker.getColorPickerAd(t),r=HZ.lb.Utils.ColorPicker.getCampaignId(r),HZ.spaceActions.AddToIdeabookDialog.init(t),HZ.spaceActions.AddToIdeabookDialog.setColorPalette(b,k,r),l.showDialog(HZ.spaceActions.AddToIdeabookDialog)):l.invokeSignupAndThenActionDialog(i,null,HZ.lb.Config.SIGNUP_MSG_ADD_TO_IDEABOOK,"ideabook")},this.handleShareClick=function(e){var t,r,i,o;HZ.data.CurrentSessionUser?(t=l.getCurrentSpace().id,i=HZ.lb.Utils.ColorPicker.getColorPickerAd(t),r=HZ.lb.Utils.ColorPicker.getConfig(i),o=HZ.lb.Utils.ColorPicker.getCampaignId(i),i=p.get(0),i=HZ.utils.Links.getPaletteShareLink(t,b,C,o,i.naturalWidth,i.naturalHeight),o=HZ.utils.Links.getGenerateColorPaletteImageLink(b,o),o={type:43,referenceId:t,subject:_hgt("My color palette"),message:_hgt("Take a look at this {paintManufacturer} color palette I created on Houzz.",{paintManufacturer:r.advDisplayName}),event:"scp",scopeId:"lightBoxColorPicker",allowShare:!0,mfr:k,colorPaletteShareLink:i,generateColorPaletteImageLink:o},HZ.dialogs.ShareColorPaletteDialog.prepare(o),l.showDialog(HZ.dialogs.ShareColorPaletteDialog)):l.showLoginDialog()},this.setSelectedSwatchIndex=function(e){i=e,this.onSelectedSwatchIndexChanged()},this.onSelectedSwatchIndexChanged=function(){var e=s.find(".color-picker-swatch"),t=n.find(".color-picker-marker");e.add(t).removeClass("current"),$(e.get(i)).add(t.get(i)).addClass("current")},this.setHighlightedSwatchIndex=function(e){a=e,this.onHighlightedSwatchIndexChanged()},this.onHighlightedSwatchIndexChanged=function(){var e=s.find(".color-picker-swatch"),t=n.find(".color-picker-marker");e.add(t).removeClass("focused"),null!=a&&$(e.get(a)).add(t.get(a)).addClass("focused")},this.imageDataUpdated=function(){this.imageChanged()},this.calculateImageScale=function(){var e;m=p?(e=p.get(0).naturalWidth,l.getImageBounds().w/e):1},this.imageResized=function(){this.calculateImageScale(),this.positionImageMarkers()},this.navigateToAdvertiserSite=function(e){window.open(e,k)}};

window.hzmr.push("lightboxColorPicker2:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxColorPicker2.js  **************/
/************* Start lightboxImageTags3.js for locale en-US **************/
try {HZ.lb.plugins.ImageTags3=function(){var I,a,i,s,m,T,b,f,H,e,n,S,d,o,g,l,c,r,h,u,p,_,v,C,x={},E=100,O=87,R=100,M=(_hgt("View Product"),_hgt("Delete Tag")),k=_hgt("Are you sure you want to delete this tag?"),Z=_hgt("Cancel"),y=_hgt("OK"),P=(_hgt("Visual Match"),{id:"VMTipBubble",content:'<h6 class="text-s text-bold mbs mts">'+_hgt("How it Works")+'</h6><p class="text-s mb0">'+_hgt("The Visual Match tool scans photos for visually similar products that are available on Houzz.")+"</p>",point:"east",width:260,position:"absolute",showCloseBtn:!1,offsetX:36,offsetY:16,borderColor:"#ccc",attachTo:"body",fadeDuration:50}),B='<span class="image-tags-tag image-tags-tag-new animate-fading"><i class="hzi-font hzi-Tag"></i></span>',w='<div class="image-tag-info-product clearfix" objid="%OBJ_ID%"><div class="product-match-image"><div class="img-responsive-wrapper img-responsive-square img-main js-thumb trackMe"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div><div class="text-bold text-center">%FINAL_PRICE%</div></div><div class="thumb-product-detail"><div class="product-tag-type">%TITLE%</div><div class="thumb-product-image"><div class="img-responsive-wrapper img-responsive-square img-main js-thumb trackMe"><img class="img-responsive" src="%HOVER_IMG_SRC%" width="%HOVER_WIDTH%" height="%HOVER_HEIGHT%"/></div></div><div class="product-title one-line">%PRODUCT_TITLE%</div>%PRICE_LABEL%<button class="btn btn-primary btn-block med js-buy trackMe"><span class="text-m">'+_hgt("View Product")+"</span></button></div></div>",D='<div class="product-price"><span>%PRICE%</span><i class="hzi-font hzi-Tag text-m"></i></div>',A='<div class="product-tag-info product-tag-info-new product-tag-info--ltr" compid="%COMPID%"><div class="product-tag-info-close trackMe"><span class="product-tag-info-close__text text-xxs">'+_hgt("Close")+'<i class="hzi-font hzi-CloseX product-tag-info-close-x"></i></span></div> <div class="image-tag-match thumb-card hidden"></div><div class="image-tag-related-products thumb-cards"></div><div class="image-tag-related-cta text-l text-bold"><a compid="%COMPID_SHOP_MORE%" class="image-tag-related-cta-link" href="javascript:;" target="_blank">'+_hgt("Shop More Similar Products")+'<i class="hzi-font hzi-Right-Arrow text-s"></i></a></div></div>',L=!1,N=HZ.houseUtils.Permissions;this.setOwner=function(t){var e;I=t,d=!0,a=$('<div class="image-overlay product-tags-image-overlay"></div>'),I.addLbImageLayer(a.get(0)),f=$('<div class="product-tags-notes"></div>').appendTo(a),m=$('<div class="product-tags-tags"></div>').appendTo(a),T=$('<div class="product-tags-boxes" compid="lb_vm_tag_bounds"></div>').appendTo(a),b=$('<section class="product-tags-info"></section>'),I.addLbImageLayer(b.get(0)),f.on("click",".js-cta",this.handleMPAdCtaClick.bind(this)),T.on("mouseenter mouseleave",".image-tags-tag-bounds, .vm-tip-trigger",this.handleBoundingBoxHover.bind(this)),b.on("mouseenter mouseleave",".image-tag-match",this.handleTagInfoBoxHover.bind(this)),T.on("click",".image-tags-tag-bounds",this.handleBoundingBoxClick.bind(this)),T.on("click",".image-tags-edit",this.handleEditTagClick.bind(this)),T.on("contextmenu",".image-tags-tag-bounds",function(t){t.preventDefault(),HZ.lb.plugins.SpaceActions.handleEmbed()}),b.on("click",".image-tag-match .js-buy, .image-tag-match .js-title, .image-tag-match .js-thumb, .image-tag-match.thumb-card",this.handleTagInfoNavClick.bind(this)),b.on("click",".image-tag-related-products .thumb",this.handleTagInfoRelatedClick.bind(this)),b.on("click",".product-tag-info-close",this.hideInfoBox.bind(this)),b.on("click",".image-tags-edit",this.handleEditTagClick.bind(this)),b.on("wheel",".tag-note-scroll",function(t){t.stopImmediatePropagation()}),HZ.lb.Config.showSimpleVersionLightbox?(e={iconClass:"icon-font icon-shopping_tag icon",label:_hgt("Show Tags"),compId:"showImageTags",index:3,handler:this.handleToggleTagsClick.bind(this)},t={iconClass:"icon-font icon-shopping_tag icon",label:_hgt("Hide Tags"),compId:"hideImageTags",index:3,handler:this.handleToggleTagsClick.bind(this)},$showtagsBtn=I.addMoreMenuItem(e),s=I.addMoreMenuItem(t)):(i=$('<a class="btn med tint tags-toggler" href="javascript:;" compid="toggleImageTags"><i class="icon-font icon-shopping_tag icon" title="'+_hgt("Toggle Image Tags")+'"></i></a>'),I.addActionItem(i,HZ.lb.ActionBar.ACTION_BAR_CENTER,3),i.click(this.handleToggleTagsClick.bind(this)),i.on("mouseenter mouseleave",this.handleToggleTagsHover.bind(this))),n={}},this.imageChanged=function(){var n,d,t,o;this.setHighlightedTagIndex(null),this.setSelectedTagIndex(null),f.empty(),m.empty(),T.empty(),c={exact:{},similar:{},organic:{},notes:{}},_={},r=[],h=[],u=[],p=[],e=null,I.getCurrentSpace().fullyLoaded&&(I.isSketch()&&T.attr("compid","lb_sketch_tag_bounds"),this.calculateImageScale(),L=N.hasPermission(I.getCurrentSpace(),N.CAN_EDIT_IMAGE_TAGS),n=I.isAdvertiseSpace(),d=I.isSpotlightContext(),(n||d)&&I.isPhotoAd()&&(v={},t=I.getCurrentSpace().id,HZ.data.PhotoAds.get(t).products.forEach(function(t){t.hasOwnProperty("sid")&&(v[t.sid]=t)})),o=I.isProProjectContext(),this.iterateTags(function(t,e){t.delete=!0===t.delete||"true"==t.delete,t.edit=!0===t.edit||"true"==t.edit;var a=t.tid,i=parseInt(t.t),s=this.isSpaceOwnerTag(t);x[a]={edit:t.edit,delete:t.delete,approve:t.edit&&4==i&&0<t.sid},c[a]=e;e=HZ.data.ProductsInfo.get(t.sid);if(e&&!!e.mp)switch(i){case 2:c.exact[a]=r.length,r.push(t);break;case 3:case 4:case 5:n||o&&!s||d||(c.similar[a]=h.length,h.push(t))}else if(n||d)2===i&&(c.exact[a]=r.length,r.push(t));else switch(i){case 4:o&&!s||(c.similar[a]=h.length,h.push(t));break;case 0:c.notes[a]=p.length,p.push(t);break;default:6!=i&&this.hasSpaceDataForTag(t)&&(c.organic[a]=u.length,u.push(t))}}.bind(this)),this.renderImageOverlay(),this.hideInfoBox(),e=I.getCurrentSpace().id),this.updateToggleTagsButton()},this.isSpaceOwnerTag=function(t){var e=I.getCurrentSpace();return e&&e.ow===t.uid},this.hasSpaceDataForTag=function(t){return 0<parseInt(t.sid)&&HZ.data.Spaces.get(t.sid)},this.renderImageOverlay=function(){var d=I.isProProjectContext(),o=I.isSpotlightContext(),g=I.isAdvertiseSpace();this.iterateTags(function(t){var e=t.tid,a=this.getTagTypeMap(e),i=parseInt(t.t),s=this.isSpaceOwnerTag(t),n=L&&!0===t.edit&&2!=i,i=x[e],i=i.edit||i.approve||i.delete,n=$(HZ.utils.Html.template('<div class="image-tags-tag-bounds image-tags-tag-bounds-new trackMe" objid="%OBJ_ID%"></div>',{OBJ_ID:e})).toggleClass("image-tags-tag-bounds--similar",a.isSimilar).toggleClass("image-tags-tag-bounds--note",a.isNote&&!n).toggleClass("image-tags-tag-bounds--editable",i).data("tag-info",t).appendTo(T);g||o?a.isExact?(m.append($(B).addClass("brand-tag")),I.isPhotoAd()&&(v.hasOwnProperty(t.sid)?(i=v[t.sid],f.append($(this.renderAdProduct(i)).data("ad-info",i))):f.append($("<span></span>").addClass("invisible")))):(m.append($(B).addClass("invisible")),n.addClass("invisible"),f.append($("<span></span>").addClass("invisible"))):d&&(a.isExact||a.isOrganic||a.isNote)?m.append($(B).addClass("brand-tag")):!d||s?m.append($(B)):(m.append($(B).addClass("invisible")),n.addClass("invisible")),this.addEditButtons(n,t)}.bind(this)),this.positionImageOverlay(),this.showBoundingBoxes()},this.renderAdProduct=function(t){var e,a,i,s=HZ.data.PhotoAds.get(I.getCurrentSpace().id),n=t.sid,d=HZ.data.Spaces.get(n),o=I.isSpotlightContext(),g="<span>";return d&&(e=HZ.data.ProductsInfo.get(n),a=d.t,i=HZ.utils.Links.getSpaceImageUrl(n,O,O,!0,0,0,4),n="",(d=HZ.data.Users.get(d.ow))&&(n=_hgt("by {productOwner}",{productOwner:d.d})),d="",d=e&&e.mp&&s.mpAd?'<a href="javascript:;" class="text-primary js-cta">'+_hgt("More Info")+' <span class="more-icon"></span></a>':(o=s.hasOwnProperty("buttonText")?_hgt(s.buttonText):o?_hgt("Learn More"):_hgt("Visit Store"),'<a target="_blank" href="'+t.tlink+'" class="text-primary">'+o+' <span class="more-icon"></span></a>'),g=HZ.utils.Html.template('<div class="product-tags-note-pos product-tags-note-pos--photo-ad hidden"><span class="product-tags-note product-tags-note--photo-ad"><div class="row"><div class="col-xs-5 pr0"><div class="img-responsive-wrapper img-responsive-square js-thumb trackMe"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div></div><div class="col-xs-7 pl0"><p class="text-bold mbs">%TITLE%</p><p>%ATTRIBUTION%</p><p class="text-bold mb0">%CTA%</p></div></div> </span></div>',{IMG_SRC:i,WIDTH:O,HEIGHT:O,TITLE:a,ATTRIBUTION:n,CTA:d})),g},this.positionImageOverlay=function(){var r=I.getImageBounds(),t=Math.max(r.w,r.h),h=.15*t,u=Math.max(.05*t,40),p=I.isSpotlightContext();a.css({width:r.w,height:r.h,top:r.y,left:r.x}),this.iterateTags(function(t,e){var a,i=parseInt(t.t),s=0==i,n=2==i,d=m.children().eq(e),o=(Math.round(t.x*C),Math.round(t.y*C),T.children().eq(e)),g=t.bounds||{x:parseInt(t.x),y:parseInt(t.y),w:0,h:0},l=g.w*C,c=g.h*C,i=g.x*C-l/2,t=g.y*C-c/2;0!=g.w&&0!=g.h||(i-=((l=c=a=s||n&&(I.isAdvertiseSpace()||p)?u:h)+18)/2,t-=(a-5)/2),I.isSketch()&&(l=c=u,a=r.w/g.w,i=g.x*a-l/2,t=g.y*a-l/2);var c={left:Math.round(i),top:Math.round(t),width:Math.round(l),height:Math.round(c)};o.css(c).data("pos-info",c),d.css(c),d.hasClass("image-tags-tag--visual")?d.toggleClass("image-tags-tag--visual--tag-only",!(95<c.width)):(s||n&&(I.isAdvertiseSpace()||p))&&((s=f.children().eq(e)).removeClass("text-right"),n=c.left+c.width/2,e=I.isAdvertiseSpace()||p?300:298,r.w-n<e&&(n-=e),e=s.outerHeight(),r.h-(c=c.top+c.height/2)>e&&(c-=e),s.css({left:n,top:c}))})},this.showBoundingBoxes=function(){this.disengageProximityDetection(),T.children().each(function(t,e){$(e).stop().animate({opacity:1},150,"easeOutSine").animate({opacity:0},1e3,"easeInSine",function(){this.engageProximityDetection()}.bind(this))}.bind(this))},this.engageProximityDetection=function(){$(I.getImageDiv()).off("mousemove.vm").on("mousemove.vm",$.throttle(10,this.handleBoundingBoxesMouseMove.bind(this)))},this.disengageProximityDetection=function(){$(I.getImageDiv()).off("mousemove.vm")},this.iterateTags=function(t){var e=HZ.data.ImageTags.get(I.getCurrentSpace().id);e&&e.forEach(t)},this.handleBoundingBoxHover=function(t){var e=$(t.currentTarget);if(e.hasClass("vm-tip-trigger"))this.handleTipTriggerHover(t),t.stopImmediatePropagation();else{var e=e.data("tag-info"),a=m.children(),e=e.tid,i=-1!=Object.keys(c.notes).indexOf(e),s=c[e];switch(I.unRegisterTimeout("hideTagComment"),t.type){case"mouseenter":this.setHighlightedTagIndex(s),a.eq(l).removeClass("invisible").addClass("highlighted-tag").css({zIndex:1});break;case"mouseleave":i?I.registerTimeout("hideTagComment",this.hideNotes.bind(this),500):I.isAdvertiseSpace()||I.isSpotlightContext()||this.setHighlightedTagIndex(g),a.removeClass("highlighted-tag").css({zIndex:""})}}},this.handleBoundingBoxClick=function(t){var e=$(t.currentTarget).data("tag-info").tid,e=c[e],e=e==g?null:e;this.setSelectedTagIndex(e),t.stopImmediatePropagation()},this.handleTagInfoBoxHover=function(t){var e=$(t.currentTarget).closest(".product-tag-info").data("tag-info").tid,e=c[e];"mouseenter"===t.type&&this.setHighlightedTagIndex(e)},this.setHighlightedTagIndex=function(t){t!=l&&(l=t,this.onHighlightedTagIndexChanged())},this.onHighlightedTagIndexChanged=function(){var t=m.children(),e=T.children();this.hideNotes(),t.css({zIndex:""}),e.removeClass("focused"),null!=l&&e.eq(l).addClass("focused")},this.setSelectedTagIndex=function(t){t==g&&0!=this.getSelectedTagType()||(g=t,this.onSelectedTagIndexChanged())},this.onSelectedTagIndexChanged=function(){this.hideNotes();var t=m.children(),e=f.children(),a=this.getSelectedTagInfo(),i=this.getSelectedTagType();if(a)switch(i){case 0:e.eq(l).removeClass("hidden");break;case 2:(I.isAdvertiseSpace()||I.isSpotlightContext())&&e.eq(g).removeClass("hidden");break;default:this.animateSelectedTag()}I.isAdvertiseSpace()||I.isSpotlightContext()||this.showSelectedTagInfoBox(),t.removeClass("focused"),$.isNumeric(g)&&t.eq(g).addClass("focused")},this.animateSelectedTag=function(){var t=m.children().eq(g);t.removeClass("animate"),t.hasClass("image-tags-tag--green")&&setTimeout(function(){t.addClass("animate")},50)},this.hideNotes=function(){f.children().addClass("hidden")},this.showSelectedTagInfoBox=function(){var a=this.getSelectedTagInfo();a?this.getSpaceTagsRecognitionData().then(function(){var i,t,e;b.empty(),HZ.lb.Config.enableVisualMatchRightRail?0===this.getSelectedTagType()?HZ.lb.plugins.VisualMatchRightRail.showNote({tag:a,onClose:this.hideInfoBox.bind(this)}):(i=a.tid,e=HZ.utils.Marketplace.getPreferredVendorListing(a.sid),t=HZ.utils.Marketplace.isOutOfStock(e),e=null,!(e=S&&S[i]?S[i]:e)||(e=e.sids)&&e.length&&(_[i]=e.map(function(t,e){return t}),t&&_[i].unshift(a.sid)),HZ.lb.plugins.VisualMatchRightRail.show({tag:a,isOutOfStock:t,recognitionData:S[i],onBestMatchClick:this.handleTagInfoNavClick.bind(this),onRelatedClick:function(t,e){var a=e.targetSpaceId,e=HZ.data.Spaces.get(t),t=_[i]||[],t=a?[a].concat(t):t;this.navigateToRecommendationsContext(e,t)}.bind(this),onClose:this.hideInfoBox.bind(this)})):I.setContractedMode(!0).then(function(){this.renderTagInfo(a),this.imageResized()}.bind(this))}.bind(this)):this.hideInfoBox()},this.renderTagInfo=function(t){var e=t.tid,a=t.sid,i=HZ.data.Spaces.get(a),s=0<a&&!!i,n=!1,d=this.getTagTypeMap(e),o={COMPID:I.isSketch()?"lb_sketch_tag_info_"+e:"lb_vm_tag_info_"+e,COMPID_SHOP_MORE:"lb_vm_shop_more_"+e};(H=$(HZ.utils.Html.template(A,o))).data("tag-info",t);var g,l,c,r,h=H.find(".image-tag-related-products"),u=H.find(".image-tag-match").toggleClass("image-tag-match--exact",d.isExact).toggleClass("image-tag-match--similar",d.isSimilar).toggleClass("image-tag-info--organic",d.isOrganic).toggleClass("image-tag-info--note",d.isNote);s?(o=i?i.t:"",d.isExact||d.isSimilar?(g=HZ.utils.Links.getSpaceImageUrl(a,O,O,!0,0,0,8),l=HZ.utils.Links.getSpaceImageUrl(a,R,R,!0,0,0,8),r=(c=i?i.price:"")?HZ.utils.Html.template(D,{PRICE:c}):null,s=HZ.utils.Marketplace.getPreferredVendorListing(a),(n=HZ.utils.Marketplace.isOutOfStock(s))||(v=$(HZ.utils.Html.template(w,{TITLE:d.isSimilar?_hgt("Visually Similar"):"",IMG_SRC:g,HOVER_IMG_SRC:l,WIDTH:O,HEIGHT:O,HOVER_WIDTH:R,HOVER_HEIGHT:R,PRODUCT_TITLE:o,FINAL_PRICE:c,PRICE_LABEL:r,OBJ_ID:a})))):d.isOrganic&&(g=HZ.utils.Links.getSpaceImageUrl(a,87,87),l=HZ.utils.Links.getSpaceImageUrl(a,E,E),r=(c=i?i.price:"")?HZ.utils.Html.template(D,{PRICE:c}):null,v=$(HZ.utils.Html.template('<div class="image-tag-info-product clearfix" objid="%OBJ_ID%"><div class="product-match-image--organic"><div class="img-responsive-wrapper img-responsive-square img-main js-thumb trackMe"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div></div><div class="text-bold text-center one-line">%PRODUCT_TITLE%</div></div>',{IMG_SRC:g,HOVER_IMG_SRC:l,WIDTH:87,HEIGHT:87,HOVER_WIDTH:E,HOVER_HEIGHT:E,PRODUCT_TITLE:o,FINAL_PRICE:c,PRICE_LABEL:r,OBJ_ID:a}))),v&&v.length&&(v.data("tag-info",t),u.removeClass("hidden").append(v),u.addClass("focused"),this.addEditButtons(u,t),h.addClass("image-tag-related-products--has-match"))):d.isNote?((p=$(HZ.utils.Html.template('<div class="image-tag-info-note"><div class="tag-note-scroll"><div class="tag-note"><header class="tag-note-header"><h5 class="text-m text-bold"><span class="hzi-font hzi-Tag text-l"></span> %NOTE_TITLE%</h5></header><p class="tag-note-body mb0">%NOTE_BODY%</p></div> </div></div>',{NOTE_TITLE:t.v,NOTE_BODY:t.c}))).data("tag-info",t),u.append(p),this.addEditButtons(u,t),setTimeout(function(){u.removeClass("hidden"),u.addClass("focused");var t=u.find(".tag-note").outerHeight()<90;u.toggleClass("image-tag-info--note--short",t)},1)):this.addEditButtons(H,t);var p,m,T,f,v=null;!(v=S&&S[e]?S[e]:v)||(p=v.sids)&&p.length&&(m=_[t.tid]=[],n&&p.unshift(a),T=[],p.forEach(function(t,e){var a=HZ.data.Spaces.get(t),i=a.t||"",s=HZ.utils.Links.getSpaceLink(t),n=HZ.utils.Links.getSpaceImageUrl(t,87,87,!0,0,0,4),d=HZ.utils.Links.getSpaceImageUrl(t,100,100,!0,0,0,4),o=a?a.price:"",a=HZ.utils.Html.template(HZ.lb.Templates.THUMB_META_TEMPLATE,{PRICE:o}),o=o?HZ.utils.Html.template(HZ.lb.Templates.PRODUCT_PRICE_LABEL,{PRICE:o}):null,o=HZ.utils.Html.template(HZ.lb.Templates.THUMB_HOVER_META_TEMPLATE_NEW,{HOVER_IMG_SRC:d,HOVER_WIDTH:100,HOVER_HEIGHT:100,PRICE_LABEL:o,PRODUCT_TITLE:i});T.push({SPACE_ID:t,TITLE_ATTR:i,INDEX:e,IMG_SRC:n,WIDTH:87,HEIGHT:87,CLICK_URL:s,THUMB_META:a,THUMB_HOVER_META:o,OVERLAY_TEXT:_hgt("Shop Houzz")}),m.push(t)}),C=HZ.lb.RenderUtils.renderThumbGrid("16",T,"related-product",HZ.lb.Templates.PRODUCT_THUMB_CARD,"lb_vm_recs_"+e),f=$(C).addClass("text-nowrap thumb-grid--fixed mb0").attr("objid",e)),H.on("mouseenter",".image-tag-match, .image-tag-related-products .thumb",this.productThumbHover.bind(this));var C=H.find(".image-tag-related-cta"),e="";v&&v.hasOwnProperty("labels")?(v=v.labels)&&v.length&&(e=v[0].url):i&&(!i.hasOwnProperty("brlnk")||(i=i.brlnk.crumbs)&&i.length&&(e=i[i.length-1].url));d=!(!e.length||d.isNote);C.find(".image-tag-related-cta-link").attr("href",e),C.toggleClass("hidden",!d),h.toggleClass("image-tag-related-products--has-cta",d),h.append(f),b.append(H),this.adjustTagInfoLayout()},this.productThumbHover=function(t){var e=$(t.currentTarget),a=H.find(".image-tag-related-products"),i=H.find(".image-tag-match");e.hasClass("focused")||(a.find(".thumb.focused").removeClass("focused"),i.removeClass("focused"),"mouseenter"===t.type&&e.addClass("focused"))},this.adjustTagInfoLayout=function(){var t,e,a,i,s,n,d;$.isNumeric(g)&&(t=b.find(".thumb-grid"),i=(s=HZ.data.ImageTags.get(I.getCurrentSpace().id)[g]).tid,e=this.getTagTypeMap(i),d=s.sid,HZ.utils.Marketplace.getPreferredVendorListing(d),a=0<d&&!!HZ.data.Spaces.get(d),n=!(!H||!H.length)&&!H.find(".image-tag-related-cta").hasClass("hidden"),i=0==parseInt(s.t)?298:0,s=d=0,a?s=(e.isOrganic,186):0==i&&(d=75),n=n?200:0,d=b.outerWidth()-s-n-i-d,d=Math.floor(d/111)||1,d=Math.min(d,16),t.removeClass("grid-0-0 grid-1-1 grid-2-2 grid-3-3 grid-4-4 grid-5-5 grid-6-6 grid-7-7 grid-8-8").removeClass("grid-1 grid-2 grid-3 grid-4 grid-5 grid-6 grid-7 grid-8 grid-9 grid-10 grid-11 grid-12 grid-13 grid-14 grid-15 grid-16").addClass("grid-"+d))},this.hideInfoBox=function(){HZ.lb.Config.enableVisualMatchRightRail&&HZ.lb.plugins.VisualMatchRightRail.hide(),I.setContractedMode(!1).then(function(){this.setHighlightedTagIndex(null),this.setSelectedTagIndex(null),b.empty(),this.imageResized()}.bind(this))},this.getSpaceTagsRecognitionData=function(){var t,s=I.getCurrentSpace().id;return n[s]||(S=HZ.data.ProductTagRecognition.get(s),t=$.Deferred(function(t){var e;S?(n[s]=null,t.resolve()):(e=[],this.iterateTags(function(t){e.push(t.tid)}),HZ.ajaz.Services.getRecognitionData(s,JSON.stringify(e)).then(function(e){var a,i;n[s]=null,e&&"true"===e.success&&e.results?((a=e.results.spaces)&&Object.keys(a).forEach(function(t){HZ.data.Spaces.get(t)?HZ.data.Spaces.put(t,$.extend(!0,HZ.data.Spaces.get(t),a[t])):HZ.data.Spaces.put(t,a[t])}),i={images:HZ.data.Images,listingsInfo:HZ.data.ListingsInfo,spaceToListingIds:HZ.data.SpaceListingIds,productTagRecognition:HZ.data.ProductTagRecognition},Object.keys(i).forEach(function(t){e.results.hasOwnProperty(t)&&i[t].addAll(e.results[t])}),S=HZ.data.ProductTagRecognition.get(s),t.resolve()):t.fail()}))}.bind(this)),n[s]=t.promise())},this.handleBoundingBoxesMouseMove=function(t){var e=T.offset(),n=t.pageX-e.left,d=t.pageY-e.top,e=T.children();o||e.each(function(){var t,e,a,i,s=$(this);s.hasClass("focused")||(t=(i=s.data("pos-info")).width/2,a=i.height/2,e=Math.abs(n-(i.left+t)),i=Math.abs(d-(i.top+a)),a=(t+a)/2,i=Math.sqrt(Math.pow(e,2)+Math.pow(i,2)),s.css("opacity",i<2*a?1:a/i*.8+.2))})},this.handleTagInfoNavClick=function(){var t=HZ.data.ImageTags.get(I.getCurrentSpace().id)[g],e=t.sid,a=HZ.data.Spaces.get(e);a&&(this.possiblySetListingOverride(a),(t=_[t.tid])&&t.length?this.navigateToRecommendationsContext(a,[e].concat(t)):this.navigateToTagSpace(a))},this.handleTagInfoRelatedClick=function(t){var e,a;t.ctrlKey||t.metaKey||(t.preventDefault(),a=(e=$(t.currentTarget)).attr("s"),e=(t=e.closest(".product-tag-info").data("tag-info")).sid,a=HZ.data.Spaces.get(a),t=_[t.tid],t=e?[e].concat(t):t,this.navigateToRecommendationsContext(a,t))},this.handleTipTriggerHover=function(t){var e=$(t.currentTarget);P.point=t.clientX<270?"west":"east",P.offsetX=t.clientX<270?0:32,"mouseenter"===t.type?(e.tipBubble(P),e.tipBubble("show")):e.tipBubble("hide")},this.handleEditTagClick=function(t){t.stopImmediatePropagation();var e=$(t.currentTarget).data("tag-info"),t=$(t.target);t.hasClass("image-tags-edit-button--check")?(t.attr("disabled",!0),HZ.ajaz.Services.ImageTags.updateCheckedImageTag(e).then(this.handleUpdateCheckedTagResponse.bind(this))):t.hasClass("image-tags-edit-button--edit")?(I.setEditTagId(e.tid),HZ.lb.Utils.lightboxEditorLoaded?(I.setEditTagMode(!0),I.refresh(!1),I.handleResize()):HZ.lb.Utils.loadLightboxEditor(!0,!0)):t.hasClass("image-tags-edit-button--delete")&&(t.attr("disabled",!0),HZ.ui.yamdi.Common.areYouSure(M,k,y,this.deleteTagDialogOKCallback.bind(this,e),Z,this.deleteTagDialogCancelCallback.bind(this,t)))},this.deleteTagDialogOKCallback=function(t){HZ.ajaz.Services.ImageTags.deleteImageTag(t).then(this.handleDeleteTagResponse.bind(this))},this.deleteTagDialogCancelCallback=function(t){t.attr("disabled",!1),HZ.ui.yamdi.Common.hideAllDialogs()},this.handleDeleteTagResponse=function(t){var a,i;t&&t.success&&"true"==t.success&&(a=t.imageTagId,i=HZ.data.ImageTags.get(I.getCurrentSpace().id),this.iterateTags(function(t,e){t.tid==a&&i.splice(e,1)}),HZ.ui.yamdi.Common.hideAllDialogs(),I.notifyPlugins("imageDataUpdated"),this.imageChanged())},this.handleUpdateCheckedTagResponse=function(a){var i;a&&a.success&&"true"==a.success&&(i=a.imageTagId,HZ.data.ImageTags.get(I.getCurrentSpace().id),this.iterateTags(function(t,e){t.tid==i&&(t.t=a.type)}),I.notifyPlugins("imageDataUpdated"),this.imageChanged())},this.navigateToTagSpace=function(e){e&&(HZ.lb.Config.enableVisualMatchRightRail&&HZ.lb.plugins.VisualMatchRightRail.hide(),I.setContractedMode(!1).then(function(){var t={};t[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=I.getCurrentSpace().id;t=new HZ.lb.Context("imageTag_"+e.id,HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS,t,[e.id],1,0,-1);t.setCurrentSpaceId(e.id),I.pushContext(t),I.refresh()}.bind(this)))},this.navigateToRecommendationsContext=function(a,i){a&&i&&(HZ.lb.Config.enableVisualMatchRightRail&&HZ.lb.plugins.VisualMatchRightRail.hide(),I.setContractedMode(!1).then(function(){var t=i.indexOf(a.id),e={};e[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=I.getCurrentSpace().id;t=new HZ.lb.Context("imageTagRecs_"+a.id,HZ.lb.Config.CONTEXT_TYPE_PRODUCT_TAG_RECOGNITION,e,i,i.length,t+1,-1);t.setCurrentSpaceId(a.id),I.pushContext(t),I.refresh()}.bind(this)))},this.possiblySetListingOverride=function(t){var e=t.id,a=parseInt(I.getCurrentSpace().ow,10),t=HZ.data.SpaceListingIds.get(e);t&&Array.isArray(t)&&t.forEach(function(t){t=HZ.data.ListingsInfo.get(t);t&&parseInt(t.vid,10)===a&&(HZ.lb.Config.spaceIdToVendorListingIdOverride[e]=t.lid)})},this.imageDataUpdated=function(){e!=I.getCurrentSpace().id&&this.imageChanged()},this.imageResized=function(){this.handleImageResized()},this.actionsBarHidden=function(){$.isNumeric(l)||T.children(":not(.focused)").css({opacity:""})},this.handleImageResized=function(){this.calculateImageScale(),this.positionImageOverlay(),this.adjustTagInfoLayout()},this.handleToggleTagsClick=function(){this.toggleTags()},this.toggleTags=function(){d?this.hideTags():this.unHideTags()},this.unHideTags=function(){d=!0,this.toggleImageOverlay(),this.updateToggleTagsButton()},this.hideTags=function(){d=!1,this.toggleImageOverlay(),this.updateToggleTagsButton()},this.handleToggleTagsHover=function(t){switch(t.type){case"mouseenter":d&&this.highlightAllBoundingBoxes(t,!0);break;case"mouseleave":d&&this.highlightAllBoundingBoxes(t,!1)}},this.highlightAllBoundingBoxes=function(t,e){(o=e)?T.children().css({opacity:1}):this.handleBoundingBoxesMouseMove(t)},this.toggleImageOverlay=function(){a.toggleClass("hidden",!d)},this.updateToggleTagsButton=function(){var t=HZ.data.ImageTags.get(I.getCurrentSpace().id),e=t&&t.length,t=!(I.isFile()||I.isProduct()||I.isEditMode()||I.isSketch());i?(i.removeClass("active unavailable hidden"),t?e?d&&i.addClass("active"):i.addClass("unavailable"):i.addClass("hidden")):$showtagsBtn&&s&&($showtagsBtn.toggleClass("hidden",!t||!(!e||!d)),$showtagsBtn.toggleClass("unavailable",!e),s.toggleClass("hidden",!t||!e||!d),s.toggleClass("active",!(!e||!d)))},this.lightboxModeChanged=function(){I.isColorPicking()?this.hideTags():I.getContractedMode()||this.setSelectedTagIndex(null)},this.lightboxUnloaded=function(){this.setSelectedTagIndex(null)},this.calculateImageScale=function(){var t=I.getCurrentSpace(),e=I.getSpaceImage(t);C=1,e&&(t=e.w,e=I.getImageBounds(),C=e.w/t)},this.getSelectedTagInfo=function(){var t=null;return t=$.isNumeric(g)?HZ.data.ImageTags.get(I.getCurrentSpace().id)[g]:t},this.getSelectedTagType=function(){var t=null,e=this.getSelectedTagInfo();return t=e?parseInt(e.t):t},this.getTagTypeMap=function(t){return t=t.toString(),{isExact:-1!=Object.keys(c.exact).indexOf(t),isSimilar:-1!=Object.keys(c.similar).indexOf(t),isOrganic:-1!=Object.keys(c.organic).indexOf(t),isNote:-1!=Object.keys(c.notes).indexOf(t)}},this.handleMPAdCtaClick=function(t){var e=$(t.currentTarget).closest(".product-tags-note-pos--photo-ad").data("ad-info").sid,a=Object.keys(v),t={};t[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=e;a=new HZ.lb.Context("marketPlaceAds_"+e,HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS,t,a,a.length,a.indexOf(e),-1);a.setCurrentSpaceId(e),I.pushContext(a),I.refresh()},this.beforeSaveOrDiscard=function(){e=null,this.imageChanged()},this.addEditButtons=function(t,e){var a;I.isSketch()||(a=x[e.tid],(t=$('<div class="image-tags-edit text-nowrap"></div>').appendTo(t)).data("tag-info",e),a.approve&&t.append('<i class="image-tags-edit-button image-tags-edit-button--check hzi-font hzi-completed-check"></i>'),a.edit&&t.append('<i class="image-tags-edit-button image-tags-edit-button--edit hzi-font hzi-Edit"></i>'),a.delete&&t.append('<i class="image-tags-edit-button image-tags-edit-button--delete hzi-font hzi-Delete"></i>'))}};

window.hzmr.push("lightboxImageTags3:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightboxImageTags3.js  **************/
/************* Start contactDialog.js for locale en-US **************/
try {HZ.ns("HZ.email"),HZ.email.ContactDialog=function(){var g,f,i,v,b,s,y,E,H,C,o=HZ.utils.Html.template,l=null,r="pro_contact_request_sent",c="pro_contact_unthenticated_phone_number";this.attachUploadInitialized=!1,this.IvyIntegration=null,this.applySettings=function(e){E=e},this.getSettings=function(){return E},this.getToFld=function(){return g},this.getNameFld=function(){return b},this.getSubjectFld=function(){return f},this.getMessageFld=function(){return i},this.getEmailFld=function(){return v},this.getSendBtn=function(){return y},this.getCancelBtn=function(){return s};function n(){HZ.ui.AjaxThrobber.setInCall(!1),HZ.ui.Yamdi.hide(this)}this.getConsentsForUserTypes=function(){return l=null,HZ.modules.Consents.getConsentsForUserTypes({userTypes:["CONTACT_PRO"]}).done(function(e){e&&e[0]&&(l=e[0])})},this.registerConsentsWhenNeeded=function(){return HZ.utils.Config.isConsentCheckingEnabled&&l&&l.consentTakingItems?this.registerAcceptedConsents():(new $.Deferred).resolve().promise()},this.registerAcceptedConsents=function(){var e=[],t=this.getBody().find("input.contact-dialog-consent-checkbox"),s=l.consentTakingItems;t.each(function(e,t){var a=$(t),i=parseInt(a.data("consent-id"),10),t=$.grep(s,function(e){return e.consentId===i})[0];t&&(t.isChecked=a.is(":checked"))});for(var a=0;a<s.length;a++){var i=s[a];e.push({consentId:i.consentId,consented:i.isChecked?"APPROVE":"DENY",userConsentCauseFlags:1})}return e.length?HZ.modules.Consents.registerConsents({userConsents:e}):(new $.Deferred).resolve().promise()},this.createAndUpdateContactOptionList=function(e,t){for(var a=0;a<e.length;a++){var i=e[a],s=this.getBody().find(".confirmProMessage[data-consent-id="+i.consentId+"]");s.length?i.isHidden?s.closest(".controls").remove():s.prop("checked",i.isChecked):i.isHidden||this.getBody().find(".proMessageDisclaimer").prepend($(o(t||'<div class="controls"><label class="checkbox"><input type="checkbox" class="confirmProMessage contact-dialog-consent-checkbox" %checked% data-consent-id="%consentId%"/> %optionName%</label></div>',{optionName:i.contents,consentId:i.consentId,checked:i.isChecked?"checked":""})))}};function d(){var t=this;HZ.utils.Logger.logCountInTSDB("tracking","contact_dialog_submit"),HZ.ui.AjaxThrobber.setInCall(!0),HZ.ui.InputButtonUtils.disableButton(y),form.trigger("beforeSubmit.email");var a=E.maxAttachmentFiles?this.getForm():null,e=E.event||"",i=E.isDealerLocationEmail,s="undefined"!=typeof grecaptcha?grecaptcha.getResponse(recaptchaWidgetId):"",o=E.type,l=g.val(),n=C.val(),r=f.val(),c=this.getMessageBody(),d=E.staticMessageData&&E.staticMessageData.s&&this.getForm().find(".hz-appendStaticMessage").prop("checked"),p=E.generateColorPaletteImageLink,h=E.colorPaletteShareLink,u={};if(u[HZ.sendEmail.params.to]=l,u[HZ.sendEmail.params.subject]=r,u[HZ.sendEmail.params.message]=c,u[HZ.sendEmail.params.isVisitor]=!HZ.data.CurrentSessionUser,u[HZ.sendEmail.params.phone]=n,u[HZ.sendEmail.params.event]=e,u[HZ.sendEmail.params.type]=o,u[HZ.sendEmail.params.captchaResponse]=s,u[HZ.sendEmail.params.referenceId]=E.referenceId,u[HZ.sendEmail.params.replyToId]=E.replyToId,u[HZ.sendEmail.params.shareLink]=h,u[HZ.sendEmail.params.shareImageUrl]=p,u[HZ.sendEmail.params.isDealerLocation]=i,u[HZ.sendEmail.params.signupSourceLink]=E.sourceLink,u[HZ.sendEmail.params.entryType]=E.contactProEntryType,E.allowShare){if(Z.call(this))return t.registerConsentsWhenNeeded().always(function(){HZ.ajaz.Services.sendShareEmail(u,$.proxy(_,t))}),!1}else if(v.length){if(Z.call(this)){var m=v.val(),i=b.val();return u[HZ.sendEmail.params.from]=m,i=i||"",E.signupOnSend?HZ.ajaz.Services.inlineSignup(m,!0,i,E.sourceLink,null,function(e){"true"==e.success?(e.redirectUrl&&(H=e.redirectUrl),HZ.ui.AjaxThrobber.setInCall(!0),t.registerConsentsWhenNeeded().always(function(){HZ.ajaz.Services.sendEmail(u,a,$.proxy(_,t))})):E.sourceLink==HZ.utils.Config.contactProAutoRegisterSourceLink?e.error==HZ.utils.Config.userEmailExists&&t.registerConsentsWhenNeeded().always(function(){HZ.ajaz.Services.sendGuestEmail(u,$.proxy(_,t)),HZ.utils.Logger.sendEventLogLightweight(HZ.utils.Config.eventContactproAutoRegisterEmailExists,{})}):HZ.auth.Manager.login({source:E.sourceLink,screen:"signin",email:m})}):t.registerConsentsWhenNeeded().always(function(){HZ.ajaz.Services.sendGuestEmail(u,$.proxy(_,t))}),!1}}else if(Z.call(this))return d&&E.staticMessageData.et,t.registerConsentsWhenNeeded().always(function(){HZ.ajaz.Services.sendEmail(u,a,$.proxy(_,t))}),!1}function _(e){var t,a,i,s,o,l="",n=C.val();HZ.ui.AjaxThrobber.setInCall(!1),"true"===e.success?(t=E.type==HZ.sendEmail.types.PRO_REPLY,this.onSubmitSuccess&&"function"==typeof this.onSubmitSuccess&&this.onSubmitSuccess.call(this,{isSponsoredPro:!!e.isSponsoredPro}),l=E.type==HZ.sendEmail.types.PRO||t||E.type==HZ.sendEmail.types.MP||E.type==HZ.sendEmail.types.MP_SELLER||E.type==HZ.sendEmail.types.MP_BUYER||E.type==HZ.sendEmail.types.USER||E.type==HZ.sendEmail.types.USER_REPLY?HZ.sendEmail.texts.CONFIRM_MESSAGE_SENT:HZ.sendEmail.texts.CONFIRM_EMAIL_SENT,HZ.ui.yamdi.Common.hideAllDialogs(),H?(a=new HZ.ui.yamdi.Dialog,i=_hgt("Please set a password:"),s=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Not Now"),"pwd-dialog__btn--later",function(){HZ.ui.yamdi.Common.hideAllDialogs(),window.location.reload()},null,null,"trackMe mtm","compId='pwdDialogLater'"),o=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Submit"),"pwd-dialog__btn--submit",function(){var e,t=$("#pwd-dialog__pwd").val();!t||t.length<HZ.utils.Config.minPasswordLength?(e=$('<div class="error-tooltip"><span class="outer-tip"></span><span class="inner-tip"></span><span class="tooltip-text">'+_hgt("Passwords need to contain at least 8 characters.")+"</span></div>"),$(".pwd-dialog__prompt").append(e)):HZ.ajaz.Services.updateAutoRegisterPassword(t,function(e){"true"==e.success?window.location.href=H:e.error==HZ.utils.Config.errorPasswordResetExpired?window.location.href=HZ.utils.Config.forgotPasswordUrl:(HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(_hgt("Set password error!"),e.errorMessage))})},!0,null,"trackMe","compId='pwdDialogSubmit'"),i=$("<div class='pwd-dialog'><p class='pwd-dialog__prompt'>"+i+"</p><label for='pwd-dialog__pwd'>"+_hgt("Password")+"</label><input type='password' class='pwd-dialog__input' id='pwd-dialog__pwd' name='pwd' placeholder='"+_hgt("Minimum 8 characters")+"'></div>"),o={title:_hgt("Email sent successfully!"),body:i,controls:[s,o],dialogClassName:"pwdDialog",onViewLoaded:function(){$("#pwd-dialog__pwd").focus()},onViewUnloaded:function(){}},a.init(o),HZ.ui.Yamdi.show(a)):!HZ.data.CurrentSessionUser&&HZ.utils.Config.contactProAutoRegisterEnabled&&E.sourceLink==HZ.utils.Config.contactProAutoRegisterSourceLink?HZ.ui.yamdi.Common.compel("",l,_hgt("Ok"),function(){location.reload()}):E.showEstimationUpsell&&""!==E.professionalInquiryId&&t?(this.IvyIntegration||(this.IvyIntegration=new HZ.dialogs.IvyIntegration),this.IvyIntegration.showMessageReplyEntryPoint(E.professionalInquiryId)):HZ.ui.yamdi.Common.alert("",l),E.onSuccess&&E.onSuccess(),HZ.utils.Logger.sendEventLogLightweight(r,{phone:n}),HZ.utils.Logger.logCountInTSDB("tracking",r)):e.error==HZ.ajaz.Services.sendEmail.ERROR_RECOVERABLE?("function"==typeof onRecaptchaLoadCallback&&onRecaptchaLoadCallback(),this.showError(e.errorMessage)):n&&e.error==HZ.ajaz.Services.sendEmail.PHONE_VALIDATION_FAILURE?(HZ.utils.Logger.sendEventLogLightweight(c,{phone:n}),HZ.utils.Logger.logCountInTSDB("tracking",c),this.showError(HZ.sendEmail.texts.ERROR_INVALID_PHONE)):(HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(_hgt("Send message error!"),e.errorMessage))}function Z(){var e=g.val(),t=f.val(),a=this.getMessageBody();return""==$.trim(e)?(this.showError(HZ.sendEmail.texts.ERROR_EMAIL_ADDRESSES_EMPTY),!1):""==$.trim(t)?(this.showError(HZ.sendEmail.texts.ERROR_SUBJECT_EMPTY),!1):""==$.trim(a)?(this.showError(HZ.sendEmail.texts.ERROR_MESSAGE_EMPTY),!1):form.find(".zipFldGrp").is(":visible")&&!$.trim(form.find(".zipFldGrp .controls input").val())?(this.showError(HZ.sendEmail.texts.ERROR_NO_ZIP),!1):form.find(".locationFldGrp").is(":visible")&&!$.trim(form.find(".locationFldGrp .controls input").val())?(this.showError(HZ.sendEmail.texts.ERROR_TEXT_LOCATION_EMPTY),!1):form.find(".nameFldGrp").is(":visible")&&!form.find(".nameFldGrp .controls input").val()?(this.showError(HZ.sendEmail.texts.ERROR_NO_CONTACT_NAME),!1):form.find(".phoneFldGrp").is(":visible")&&!$.trim(C.val())?(this.showError(HZ.sendEmail.texts.ERROR_NO_PHONE),!1):!(this.validateMore&&"function"==typeof this.validateMore&&!this.validateMore.call(this))}function p(e){var i=null;e.bind("input",function(){var e=$(this);e.css("height","auto");var t,a=this.scrollHeight+2;null===i&&(t=this,i=(t=$(t).parents(".modal-dialog")).length?window.innerHeight-t.height():window.innerHeight),a>this.clientHeight&&(a=Math.max(Math.min(a,i),this.clientHeight),e.css("height",a+"px"))}),$(window).bind("resize",function(){i=null})}this.resetFooter=function(){HZ.ui.AjaxThrobber.setInCall(!1),HZ.ui.InputButtonUtils.enableButton(y)},this.showError=function(e){this.showStatus(e),this.resetFooter()},function(){var e="contactDialog";this.DIALOG_CLASSNAME&&(e=this.DIALOG_CLASSNAME);var t=_hgt("Send a Message");this.DIALOG_TITLE&&(t=this.DIALOG_TITLE);var a=$(this.FORM_TEMPLATE);s=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"hzContactDlgCancelBtn",$.proxy(n,this),null,null,"trackMe","compId='contactDlgCancel'"),y=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Send"),"hzContactDlgSendBtn",null,!0,null,"trackMe","compId='contactDlgSend'");e={title:t,body:a,controls:[HZ.ui.AjaxThrobber.getThrobber(),s,y],dialogClassName:e,onViewLoaded:$.proxy(this.onViewLoaded,this),onViewUnloaded:$.proxy(this.onViewUnloaded,this)};HZ.email.ContactDialog.superclass.constructor.call(this),this.init(e),form=this.getForm(),g=form.find(".hz-toFld"),f=form.find(".hz-subjectFld"),i=form.find(".hz-messageFld"),v=form.find(".hz-emailFld"),b=form.find(".hz-nameFld"),C=form.find(".phoneFldGrp .controls input"),form.find("[placeholder]").initPlaceHolders({saveEvent:"beforeSubmit.email"}),form.bind("submit",$.proxy(d,this)),p(i)}.call(this)},HZ.extend(HZ.email.ContactDialog,HZ.ui.yamdi.Dialog),$.extend(!0,HZ.email.ContactDialog.prototype,{DEFAULT_OPTIONS:{type:null,referenceId:null,toUserName:"",subject:"",message:"",replyToId:null,event:null,maxAttachmentFiles:0},ATTACH_BUTTON_TEMPLATE:'<a class="hzBtn noFrameButton addImageButton" href="javascript:;" title="%buttonTitle%"><span class="button-icon buttonIconAttach"></span><span class="text-m text-dt-s label colorLink">%buttonTitle%</span></a>',ATTACH_TEMPLATE:'<div class="hz-attach"><input type="file" name="attach1" accept="image/*" class="span-sm-6"/><input type="file" name="attach2" accept="image/*" class="span-sm-6"/><input type="file" name="attach3" accept="image/*" class="span-sm-6"/><input type="file" name="attach4" accept="image/*" class="span-sm-6"/></div>',FORM_TEMPLATE:'<fieldset class="row-fluid"><label>'+_hgt("To (enter recipient emails, separated by commas)")+'</label><textarea type="text" class="hz-toFld span-xs-12 form-control" rows="2"/><label>'+_hgt("Subject")+'</label><input type="text" class="hz-subjectFld span-xs-12 form-control" value="" placeholder="'+_hgt("Enter subject")+'"/><label>'+_hgt("Message")+'</label><textarea rows="5" class="hz-messageFld span-xs-12 form-control" placeholder="'+_hgt("Enter your message here")+'"/></fieldset>',validateMore:function(){return!0},getMessageBody:function(){return this.getMessageFld().val()},onSubmitSuccess:null,prepare:function(e){var t=this;this.applySettings($.extend(!0,{},this.DEFAULT_OPTIONS,e)),e=this.getSettings(),this.getToFld().val(e.toUserName),this.getSubjectFld().val(e.subject),this.getMessageFld().val(e.message),e.maxAttachmentFiles?this.attachUploadInitialized?this.getForm().find(".addImageButton").length||($(HZ.utils.Html.template(this.ATTACH_BUTTON_TEMPLATE,{buttonTitle:_hgt("Attach Images")})).insertAfter(this.getMessageFld()),t.enableAttachment()):($(HZ.utils.Html.template(this.ATTACH_BUTTON_TEMPLATE,{buttonTitle:_hgt("Attach Images")})).insertAfter(this.getMessageFld()),HZ.utils.ResourceLoader.requireResources([{type:HZ.utils.ResourceLoader.JS,file:"jquery.form.min"}],function(){t.enableAttachment()})):t.disableAttachment()},enableAttachment:function(){var e,t=this.getForm().find(".hz-attach"),a=this;0===t.length&&(e=this.getForm().find(".addImageButton"),t=$(this.ATTACH_TEMPLATE).insertAfter(e),e.on("click",function(){t.is(":visible")||(t.show(),UIHelper.isMSIE||t.find("input:first").click(),a.recenter())})),this.attachUploadInitialized=!0},disableAttachment:function(){var e=this.getForm().find(".addImageButton, .hz-attach");e.length&&e.remove()},onViewLoaded:function(){HZ.ui.InputButtonUtils.enableButton(this.getSendBtn()),this.getForm().find("[placeholder]").initPlaceHolders("refresh")},onViewUnloaded:function(){this.resetForm(),this.getForm().find(".hz-attach").hide(),this.hideStatus()}}),HZ.email.ContactProDialog=function(){var e,t,p={type:HZ.sendEmail.types.PRO};this.DEFAULT_OPTIONS={toUserName:"",toUserDisplayName:"",subject:"",message:"",useZipCode:!1,isShortForm:!1},e=_hgt("Enter your zip code (required)"),t=_hgt("Enter your contact phone number (required)"),this.FORM_TEMPLATE='<fieldset class="row-fluid"><div class="control-group fromDisplayEmailGrp"><label class="control-label">'+_hgt("From")+'</label><div class="controls"></div></div><div class="control-group" id="toUserNameField"><label class="control-label">'+_hgt("To")+'</label><div class="controls toDisplayName"></div><input type="hidden" class="hz-toFld" value=""/></div><div class="control-group" id="subjectField"><label class="control-label">'+_hgt("Subject")+'</label><div class="controls"><input type="text" class="hz-subjectFld span-xs-12 form-control" value="" placeholder="'+_hgt("Enter subject")+'"/></div></div><div class="control-group nameFldGrp"><label class="control-label name-label">'+_hgt("Name")+'</label><div class="controls"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+_hgt("Enter your name (required)")+'"/></div></div><div class="control-group phoneFldGrp"><label class="control-label phone-label">'+_hgt("Phone Number")+'</label><div class="controls"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+t+'"/></div></div><div class="control-group locationFldGrp"><label class="control-label location-label">'+_hgt("Location")+'</label><div class="controls"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+_hgt("Enter your city, state")+'"/></div></div><div class="control-group zipFldGrp"><label class="control-label zip-label">'+_hgt("Zip Code")+'</label><div class="controls"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+e+'"/></div></div><div class="control-group dealerFldGrp mbs"><label class="control-label dealer-label">'+_hgt("To:")+'</label><div class="controls"><select class="form-control dealer-select"></select></div></div><div class="control-group"><label class="control-label">'+_hgt("Message")+'</label><div class="controls"><textarea class="hz-messageFld span-xs-12 form-control" rows="4" value="" placeholder="'+_hgt("Enter your message here")+'"/></div></div><div id="contact-dialog-contact-options"></div><div class="proMessageDisclaimer control-group"><div class="controls"><label class="checkbox"><input type="checkbox" class="confirmProMessage confirmNonSolicitation"/>'+_hgt("I confirm this is a personal project inquiry and not a promotional message or solicitation.")+'</label></div><div class="auto-signup-consent"></div></div></fieldset>',this.prepare=function(e){var t=$.extend(!0,{},p,this.DEFAULT_OPTIONS,e),a=this.getForm();t.askForName=HZ.utils.Config.nameTestEnabled,t.useZipCode=HZ.utils.Config.zipCodeTestEnabled,t.contactProEntryType=HZ.utils.Config.contactProEntryType,HZ.email.ContactProDialog.superclass.prepare.call(this,t),$(a).attr("scopeId","ContactProDialog"),a.find(".toDisplayName").html(t.toUserDisplayName);var i,s;HZ.data.CurrentSessionUser&&t.type!=HZ.sendEmail.types.MP&&t.type!=HZ.sendEmail.types.USER&&t.type!=HZ.sendEmail.types.USER_REPLY?(a.find(".fromDisplayEmailGrp").show(),(e=HZ.data.CurrentSessionUser.getEmailAddress())?a.find(".fromDisplayEmailGrp").find(".controls").html(e):HZ.ajaz.Services.User.getCurrentSessionUserExtraData(function(e){var t;"true"==e.success&&(HZ.data.CurrentSessionUser.setExtra(e.userEmail,e.phoneNumber,e.zipCode),a.find(".fromDisplayEmailGrp").find(".controls").html(e.userEmail),t=e.phoneNumber,e=e.zipCode,a.find(".phoneFldGrp").length&&t&&a.find(".phoneFldGrp").find(".controls input").val(t),a.find(".zipFldGrp").length&&e&&a.find(".zipFldGrp").find(".controls input").val(e))})):a.find(".fromDisplayEmailGrp").hide(),t.askForName&&HZ.data.CurrentSessionUser&&(s=HZ.data.CurrentSessionUser.getUserName(),i=HZ.data.CurrentSessionUser.getLoginName(),s&&s!=i&&a.find(".nameFldGrp").find(".controls input").val(s)),HZ.data.CurrentSessionUser&&(i=HZ.data.CurrentSessionUser.getPhoneNumber(),s=HZ.data.CurrentSessionUser.getZipCode(),a.find(".phoneFldGrp").length&&i&&a.find(".phoneFldGrp").find(".controls input").val(i),a.find(".zipFldGrp").length&&s&&a.find(".zipFldGrp").find(".controls input").val(s)),t.type==HZ.sendEmail.types.PRO_REPLY||t.type==HZ.sendEmail.types.MP||t.type==HZ.sendEmail.types.USER||t.type==HZ.sendEmail.types.USER_REPLY?(a.find(".proMessageDisclaimer").hide(),a.find(".phoneFldGrp").hide(),a.find(".locationFldGrp").hide(),a.find(".zipFldGrp").hide(),a.find(".nameFldGrp").hide()):(a.find(".proMessageDisclaimer").show(),a.find(".phoneFldGrp").show(),t.askForName||a.find(".nameFldGrp").hide(),(t.useZipCode?a.find(".locationFldGrp"):a.find(".zipFldGrp")).hide(),t.isShortForm&&(a.find("#toUserNameField").hide(),a.find("#subjectField").hide(),a.find(".name-label").hide(),a.find(".phone-label").hide(),a.find(".location-label").hide(),a.find(".zip-label").hide(),a.find(".modal-header").html(_hgt("Contact {pro}",{pro:t.toUserDisplayName}))));var o=this;if(t.locationData&&t.locationData.length&&t.type==HZ.sendEmail.types.PRO)if($.map(t.locationData,function(e){if(e.email)return e}).length){var l=a.find(".dealer-select");l.empty(),l.append($("<option value='"+t.toUserName+"'>"+t.toUserDisplayName+" ("+_hgt("Main Location")+")</option>"));for(var n=0;n<t.locationData.length;n++){var r=t.locationData[n],c=$("<option>");r.email&&(c.attr("value",r.email),r.dealerName?c.text(r.dealerName):c.text(r.email),l.append(c),0==n&&l.val(c.val()),r.email==t.defaultEmailToPopulate&&l.val(c.val()))}function d(){o.getToFld().val(l.val()),l.val()==t.toUserName?delete o.getSettings().isDealerLocationEmail:o.getSettings().isDealerLocationEmail=!0}l.on("change",d),d()}else a.find(".dealerFldGrp").hide();else a.find(".dealerFldGrp").hide()},this.validateMore=function(){var e=this.getForm().find(".confirmProMessage.confirmNonSolicitation");return""==$.trim(this.getMessageFld().val())?(this.showError(HZ.sendEmail.texts.ERROR_MESSAGE_EMPTY),!1):!e.is(":visible")||!e.is(":not(:checked)")||(this.showError(HZ.sendEmail.texts.ERROR_PRO_CONFIRM_INQUIRY_NOT_AGREE),!1)},this.getMessageBody=function(){var e,t,a,i=this.getSettings(),s=this.getForm(),o="";return s.find(".phoneFldGrp").is(":visible")&&(e="[name]"+s.find(".nameFldGrp .controls input").val()+"[/name]",t=s.find(".phoneFldGrp .controls input").val(),a=s.find(".locationFldGrp .controls input").val(),s="[zip]"+s.find(".zipFldGrp .controls input").val()+"[/zip]",""!=$.trim(t)&&(o=_hgt("Contact Phone Number: {phoneNumber}",{phoneNumber:t})+"\n"),i.useZipCode?""!=$.trim(s)&&(o=o+_hgt("Project Location: {zipCode}",{zipCode:s})+"\n"):""!=$.trim(a)&&(o=o+_hgt("Project Location: {location}",{location:a})+"\n"),""!=$.trim(e)&&(o=o+_hgt("Contact Name: {name}",{name:e})+"\n"),""!=$.trim(o)&&(o+="\n")),o+=this.getMessageFld().val()},this.onSubmitSuccess=function(e){try{window.ga("send","event","ContactProDialog","contactSuccess")}catch(e){console.warn(e)}var t=this.getSettings(),a="",a=e.isSponsoredPro?"pro_contact_plus":"pro_contact_organic",t={hasaccount:HZ.data.CurrentSessionUser?"y":"n",pro_username:t.toUserName};HZ.utils.Gtm.pushData(a,a,t)},this.onViewLoaded=function(){var t=this;HZ.utils.Config.isConsentCheckingEnabled&&t.getConsentsForUserTypes().done(function(e){e&&e[0]&&(e=e[0],t.createAndUpdateContactOptionList(e.consentTakingItems),HZ.utils.Config.isConsentCheckingEnabled&&"US"===HZ.modules.Consents.getConsentCountryCode()&&t.getBody().find(".proMessageDisclaimer").find(".auto-signup-consent").text(_hgt("I understand that Houzz will help me coordinate with pros via phone.")))}),HZ.email.ContactProDialog.superclass.onViewLoaded.call(this)},function(){HZ.email.ContactProDialog.superclass.constructor.call(this)}.call(this)},HZ.extend(HZ.email.ContactProDialog,HZ.email.ContactDialog),HZ.email.GuestContactProDialog=function(){var r={type:HZ.sendEmail.types.PRO};this.DEFAULT_OPTIONS={toUserName:"",toUserDisplayName:"",subject:"",message:"",useZipCode:!1,isShortForm:!1};var e={tag:"a",attr:{href:HZ.utils.Config.termsOfUseUrl,target:"_new",class:"colorLink"}},t={tag:"a",attr:{href:HZ.utils.Config.privacyPolicyUrl,target:"_new",class:"colorLink"}};this.FORM_TEMPLATE='<fieldset class="row-fluid condensed-layout"><input type="hidden" class="hz-toFld" value=""/><input type="hidden" class="hz-subjectFld" value="" placeholder="'+_hgt("Enter subject")+'"/><div class="control-group"><label class="control-label">'+_hgt("From")+'</label><div class="controls"><input type="text" class="hz-emailFld span-xs-12" value="" placeholder="'+_hgt("Enter your email")+'"/></div><div style="clear:both;"></div></div><div class="control-group nameFldGrp"><label class="control-label name-label">'+_hgt("Name")+'</label><div class="controls"><input type="text" class="span-xs-12" value="" placeholder="'+_hgt("Enter your name")+'"/></div><div style="clear:both;"></div></div><div class="control-group phoneFldGrp"><label class="control-label phone-label">'+_hgt("Phone #")+'</label><div class="controls"><input type="text" class="span-xs-12" value="" placeholder="'+_hgt("Enter your contact phone number")+'"/></div><div style="clear:both;"></div></div><div class="control-group locationFldGrp"><label class="control-label location-label">'+_hgt("Location")+'</label><div class="controls"><input class="span-xs-12" type="text" value="" placeholder="'+_hgt("Enter your city, state")+'"/></div><div style="clear:both;"></div></div><div class="control-group zipFldGrp"><label class="control-label zip-label">'+_hgt("Zip Code")+'</label><div class="controls"><input class="span-xs-12" type="text" value="" placeholder="'+_hgt("Enter your zip code")+'"/></div><div style="clear:both;"></div></div><div class="control-group dealerFldGrp mbs"><label class="control-label dealer-label">'+_hgt("To:")+'</label><div class="controls"><select class="form-control dealer-select"></select></div></div><div class="control-group"><label class="control-label">'+_hgt("Message")+'</label><div class="controls"><textarea rows="4" value="" class="form-control hz-messageFld span-xs-12" placeholder="'+_hgt("Enter your message here")+'"/></div><div style="clear:both;"></div></div><div id="recaptchaDiv"></div><div class="proMessageDisclaimer control-group"><div class="controls"><label class="checkbox"><input type="checkbox" class="confirmProMessage confirmNonSolicitation"/>'+_hgt("I confirm this is a personal project inquiry and not a promotional message or solicitation.")+'<span class="disclaimer">'+(HZ.utils.Config.isConsentCheckingEnabled?"":_hgt('By clicking "Send" I acknowledge and agree to the creation of an account and to the <t1>Terms of Use</t1> and <t2>Privacy Policy</t2>',{t1:e,t2:t}))+'</span></label></div><div class="auto-signup-consent"></div></div></fieldset>',this.prepare=function(e){var t=$.extend(!0,{},r,this.DEFAULT_OPTIONS,e),e=this.getForm();t.askForName=HZ.utils.Config.nameTestEnabled,t.useZipCode=HZ.utils.Config.zipCodeTestEnabled,t.signupOnSend=HZ.utils.Config.contactProAutoRegisterEnabled,t.sourceLink=HZ.utils.Config.contactProAutoRegisterSourceLink,t.contactProEntryType=HZ.utils.Config.contactProEntryType,this.applySettings(t),t.isShortForm&&(this.DIALOG_TITLE=_hgt("Contact {pro}",{pro:t.toUserDisplayName})),HZ.email.GuestContactProDialog.superclass.prepare.call(this,t),$(e).attr("scopeId","GuestContactProDialog"),e.find(".toDisplayName").html(t.toUserDisplayName),t.type==HZ.sendEmail.types.PRO_REPLY||t.type==HZ.sendEmail.types.MP?e.find(".proMessageDisclaimer").hide():e.find(".proMessageDisclaimer").show(),t.askForName||e.find(".nameFldGrp").hide(),(t.useZipCode?e.find(".locationFldGrp"):e.find(".zipFldGrp")).hide(),t.isShortForm&&(e.find(".row-fluid.condensed-layout").removeClass("condensed-layout"),e.find(".name-label").hide(),e.find(".phone-label").hide(),e.find(".location-label").hide(),e.find(".zip-label").hide(),e.find(".modal-header").html(_hgt("Contact {pro}",{pro:t.toUserDisplayName}))),t.signupOnSend||e.find(".disclaimer").hide();var a=this;if(t.type==HZ.sendEmail.types.PRO)if(t.locationData&&t.locationData.length)if($.map(t.locationData,function(e){if(e.email)return e}).length){var i=e.find(".dealer-select");i.empty(),i.append($("<option value='"+t.toUserName+"'>"+t.toUserDisplayName+" ("+_hgt("Main Location")+")</option>"));for(var s=0;s<t.locationData.length;s++){var o=t.locationData[s],l=$("<option>");o.email&&(l.attr("value",o.email),o.dealerName?l.text(o.dealerName):l.text(o.email),i.append(l),0==s&&i.val(l.val()),o.email==t.defaultEmailToPopulate&&i.val(l.val()))}function n(){a.getToFld().val(i.val()),i.val()==t.toUserName?delete a.getSettings().isDealerLocationEmail:a.getSettings().isDealerLocationEmail=!0}i.on("change",n),n()}else e.find(".dealerFldGrp").hide();else e.find(".dealerFldGrp").hide()},onRecaptchaLoadCallback=function(){var e="recaptchaDiv";if("undefined"!=typeof grecaptcha){try{"undefined"!=typeof recaptchaWidgetId&&grecaptcha.reset(recaptchaWidgetId)}catch(e){}$("#"+e).is(":empty")&&(recaptchaWidgetId=grecaptcha.render(e,{sitekey:HZ.utils.Config.recaptchaPublicKey}))}},this.onViewLoaded=function(){var i=this;HZ.utils.Config.isConsentCheckingEnabled&&i.getConsentsForUserTypes().done(function(e){var t,a;e&&e[0]&&(t=e[0],a=i.getBody().find(".proMessageDisclaimer"),e=t.contents,a.find(".auto-signup-consent").html(e),i.createAndUpdateContactOptionList(t.consentTakingItems))}),HZ.utils.Config.contactProAutoRegisterEnabled||HZ.data.CurrentSessionUser||("undefined"==typeof grecaptcha?$.getScript("https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoadCallback&render=explicit&hl="+HZ.utils.Config.language):onRecaptchaLoadCallback())},this.onViewUnloaded=function(){this.resetForm(),this.resetFooter(),this.hideStatus(),"undefined"!=typeof grecaptcha&&grecaptcha.reset(recaptchaWidgetId)},this.validateMore=function(){var e=this.getForm(),t=e.find(".confirmProMessage.confirmNonSolicitation"),e=e.find(".hz-emailFld").val();if(""==$.trim(this.getMessageFld().val()))return this.showError(HZ.sendEmail.texts.ERROR_MESSAGE_EMPTY),!1;if(t.is(":visible")&&t.is(":not(:checked)"))return this.showError(HZ.sendEmail.texts.ERROR_PRO_CONFIRM_INQUIRY_NOT_AGREE),!1;if(!UIHelper.validateEmail(e,!0))return this.showError(HZ.sendEmail.texts.ERROR_INVALID_FROM_EMAIL_ADDRESS),!1;t=this.getSettings();return this.getSubjectFld().val(t.subject+" from "+e),this.getSubjectFld().val(_hgt("{emailSubject} from {senderEmailAddress}",{emailSubject:t.subject,senderEmailAddress:e})),!0},this.getMessageBody=function(){var e=this.getSettings(),t=this.getForm(),a="[name]"+t.find(".nameFldGrp .controls input").val()+"[/name]",i=t.find(".phoneFldGrp .controls input").val(),s=t.find(".locationFldGrp .controls input").val(),o="[zip]"+t.find(".zipFldGrp .controls input").val()+"[/zip]",t="";return""!=$.trim(i)&&(t=_hgt("Contact Phone Number: {phoneNumber}",{phoneNumber:i})+"\n"),e.useZipCode?""!=$.trim(o)&&(t=t+_hgt("Project Location: {zipCode}",{zipCode:o})+"\n"):""!=$.trim(s)&&(t=t+_hgt("Project Location: {location}",{location:s})+"\n"),""!=$.trim(a)&&(t=t+_hgt("Contact Name: {name}",{name:a})+"\n"),""!=$.trim(t)&&(t+="\n"),t+=this.getMessageFld().val()},this.onSubmitSuccess=function(e){try{window.ga("send","event","GuestContactProDialog","contactSuccess")}catch(e){console.warn(e)}var t=this.getSettings(),a={hasaccount:HZ.data.CurrentSessionUser?"y":"n",pro_username:t.toUserName},t="",t=e.isSponsoredPro?"pro_contact_plus":"pro_contact_organic";HZ.utils.Gtm.pushData(t,t,a)},function(){HZ.email.GuestContactProDialog.superclass.constructor.call(this)}.call(this)},HZ.extend(HZ.email.GuestContactProDialog,HZ.email.ContactDialog),HZ.email.PostIdeabookConfirmContactProDialog=function(){var s={type:HZ.sendEmail.types.PRO};this.DEFAULT_OPTIONS={toUserName:"",toUserDisplayName:"",subject:"",message:"",useZipCode:!1},this.DIALOG_TITLE=_hgt("Saved!"),this.FORM_TEMPLATE="<div class='related-pros-info clearfix'><div id='proUpsellMsg' class='pro-screen-text'></div><div id='proInfo' class=''></div><div id='proContactForm' class=''><fieldset class=\"row-fluid\"><div class=\"control-group fromDisplayEmailGrp\"><label class=\"control-label\">"+_hgt("From")+'</label><div id="fromEmailField" class="controls"></div></div><div class="control-group" id="toUserNameField"><label class="control-label">'+_hgt("To")+'</label><div class="controls toDisplayName"></div><input type="hidden" class="hz-toFld" value=""/></div><div class="control-group" id="subjectField"><label class="control-label">'+_hgt("Subject")+'</label><div class="controls"><input type="text" class="hz-subjectFld span-xs-12 form-control" value="" placeholder="'+_hgt("Enter subject")+'"/></div></div><div class="control-group phoneFldGrp"><div class="controls" comp_id="phone"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+_hgt("Enter your contact phone number")+'"/></div></div><div class="control-group zipFldGrp"><div class="controls" comp_id="zip"><input type="text" class="span-xs-12 form-control" value="" placeholder="'+_hgt("Enter your zip code")+'"/></div></div><div class="control-group"><label class="control-label">'+_hgt("Message")+'</label><div class="controls" comp_id="message"><textarea class="hz-messageFld span-xs-12 form-control" rows="4" value="" placeholder="'+_hgt("Enter your message here")+'"/></div></div><div class="proMessageDisclaimer"><label class="checkbox"><input type="checkbox" class="confirmProMessage confirmNonSolicitation"/>'+_hgt("I confirm this is a personal project inquiry and not a promotional message or solicitation.")+"</label></div></fieldset></div></div>",this.prepare=function(e){var t=$.extend(!0,{},s,this.DEFAULT_OPTIONS,e),a=this.getForm(),i="",e=_hgt("Go to <t1>{galleryName}</t1>.",{galleryName:t.galleryName,t1:{tag:"a",attr:{href:t.galleryUrl,class:"colorLink trackMe",compId:"ideabook"}}});a.find(".modal-footer").prepend("<span id='goToIdeabook'>"+e+"</span>"),i+="<div class='pro-content-container' compId='pro_container'><div class='top-pro-cover'><a href='' class='trackMe'><img data-no-pin-hover='true' src='"+t.coverImageUrl+"' width='250' height='230'></a></div><div class='bottom-pro-details'><div id='proThumb' itemprop='image'><img data-no-pin-hover='true' class='photo hz-user-image' src='"+t.userThumbUrl+"' width='40' height='40'/></div><div id='textDetails'><div class='pro-name'><a class='trackMe' href='"+t.userLink+"'><b>"+t.toUserDisplayName+"</b></a></div>"+t.ratingHtml+"<b>"+t.shortDescription+"</b></div></div></div>",a.find("#proInfo").append(i),a.find("#proUpsellMsg").html(t.proUpsellMsg),t.useZipCode=HZ.utils.Config.zipCodeTestEnabled,HZ.email.ContactProDialog.superclass.prepare.call(this,t),$(a).attr("scopeId","IdeabookContactProDialog"),a.find(".toDisplayName").html(t.toUserDisplayName);HZ.data.CurrentSessionUser&&t.type!=HZ.sendEmail.types.MP&&t.type!=HZ.sendEmail.types.USER&&t.type!=HZ.sendEmail.types.USER_REPLY?(a.find(".fromDisplayEmailGrp").show(),(t=HZ.data.CurrentSessionUser.getEmailAddress())?a.find(".fromDisplayEmailGrp").find(".controls").html(t):HZ.ajaz.Services.User.getCurrentSessionUserExtraData(function(e){"true"==e.success&&(HZ.data.CurrentSessionUser.setExtra(e.userEmail,e.phoneNumber,e.zipCode),a.find(".fromDisplayEmailGrp").find(".controls").html(e.userEmail))})):a.find(".fromDisplayEmailGrp").hide(),a.find("#toUserNameField").hide(),a.find("#subjectField").hide(),$(".modal-dialog").addClass("post-ideabook-save-pro-contact")},this.validateMore=function(){var e=this.getForm().find(".confirmProMessage.confirmNonSolicitation");return""==$.trim(this.getMessageFld().val())?(this.showError(HZ.sendEmail.texts.ERROR_MESSAGE_EMPTY),!1):!e.is(":visible")||!e.is(":not(:checked)")||(this.showError(HZ.sendEmail.texts.ERROR_PRO_CONFIRM_INQUIRY_NOT_AGREE),!1)},this.getMessageBody=function(){var e,t,a=this.getSettings(),i=this.getForm(),s="";return i.find(".phoneFldGrp").is(":visible")&&(e=i.find(".phoneFldGrp .controls input").val(),t=i.find(".locationFldGrp .controls input").val(),i="[zip]"+i.find(".zipFldGrp .controls input").val()+"[/zip]",""!=$.trim(e)&&(s=_hgt("Contact Phone Number: {phoneNumber}",{phoneNumber:e})+"\n"),a.useZipCode?""!=$.trim(i)&&(s=s+_hgt("Project Location: {zipCode}",{zipCode:i})+"\n"):""!=$.trim(t)&&(s=s+_hgt("Project Location: {location}",{location:t})+"\n"),""!=$.trim(s)&&(s+="\n")),s+=this.getMessageFld().val()},this.onSubmitSuccess=function(){try{window.ga("send","event","ContactProDialog","contactSuccess")}catch(e){console.warn(e)}},function(){HZ.email.PostIdeabookConfirmContactProDialog.superclass.constructor.call(this)}.call(this)},HZ.extend(HZ.email.PostIdeabookConfirmContactProDialog,HZ.email.ContactDialog),HZ.email.EmailDialog=function(){var a=null,o=!1,n=!1,r=!1,l=!1,c="";this.DEFAULT_OPTIONS={title:null,type:null,referenceId:null,subject:"",message:"",event:HZ.sendEmail.events.BTN,useAddressBook:!0,disableTitle:!1};var e={tag:"a",attr:{href:HZ.utils.Config.termsOfUseUrl,target:"_new",class:"colorLink"}},t={tag:"a",attr:{href:HZ.utils.Config.privacyPolicyUrl,target:"_new",class:"colorLink"}};function d(e){var t;a||((a=new HZ.ui.yamdi.Dialog).init({dialogClassName:"contactsLoadingDlg",controls:[]}),t='<div class="hzLoadingDlgThrobber"></div><div class="hzLoadingDlgMessage">'+_hgt("Loading...")+"</div>",a.setTitle(""),a.setBody(t)),HZ.ui.Yamdi.switchDialog(a),HZ.utils.ResourceLoader.requireAddressBookResources(function(){HZ.addressBook.Contacts.load(e,function(){o=!0,c=HZ.addressBook.Contacts.getEmailProvider();var e=HZ.dialogs.EmailDialog;HZ.addressBook.Contacts.isUpsellRequired()&&(e=HZ.addressBook.Dialogs.getUpsellDialog(function(e){e?h():HZ.ui.Yamdi.switchDialog(HZ.dialogs.EmailDialog)})),HZ.ui.Yamdi.switchDialog(e)})})}function p(e,t){var a,i,s,o,l;n||(t.useAddressBook?($("#upsellTip").hover(function(){var e=function(){var e="";switch(c){case HZ.utils.Config.appTypeYahoo:e=r?_hgt("Update your Yahoo contact list to lookup your recently emailed friends by name.  Houzz will not use your contact list to send any messages other than those directed by you."):_hgt("By importing your Yahoo contact list, you can look up your friends by name and auto-complete their email addresses when you send them messages. Houzz will not use your contact list to send any messages other than those directed by you.");break;case HZ.utils.Config.appTypeOutlook:e=r?_hgt("Update your Outlook contact list to lookup your recently emailed friends by name.  Houzz will not use your contact list to send any messages other than those directed by you."):_hgt("By importing your Outlook contact list, you can look up your friends by name and auto-complete their email addresses when you send them messages. Houzz will not use your contact list to send any messages other than those directed by you.");break;default:case HZ.utils.Config.appTypeGoogle:e=r?_hgt("Update your Gmail contact list to lookup your recently emailed friends by name.  Houzz will not use your contact list to send any messages other than those directed by you."):_hgt("By importing your Gmail contact list, you can look up your friends by name and auto-complete their email addresses when you send them messages. Houzz will not use your contact list to send any messages other than those directed by you.")}return e}();$("#upsellTip").tipBubble({content:e,point:"north",width:200,position:"absolute",showCloseBtn:!1})},function(){$("#upsellTip").tipBubble("hide")}),$("#upsellLine a:first").click(function(){h()})):$("#upsellLine").css("display","none"),t.title&&e.find(".modal-header").html(t.title),t.disableTitle&&e.find(".hz-subjectFld").prop("disabled",!0),t.staticMessageData&&t.staticMessageData.s&&(e.find("#appendStaticMessage").removeClass("hidden"),e.find("#appendStaticMessage .hz-appendStaticMessage").prop("checked","checked"),e.find("#appendStaticMessage label").append(t.staticMessageData.ml),e.find("#appendStaticMessage .hz-staticMessage").html(t.staticMessageData.mc)),t.signupOnSend?(e.find(".hz-subjectFld").hide(),e.find("#subjectLabel").hide(),e.find(".hz-messageFld").hide(),e.find("#messageLabel").hide(),e.find(".modal-header").html(_hgt("Email Photo"))):(i=(a=e).find(".hz-emailFld"),s=a.find("#fromLabel"),o=a.find("#emailDialogEmailFromName"),l=a.find("#fromNameLabel"),a=a.find(".disclaimer"),i&&(i.hide(),s.hide()),o&&(o.hide(),l.hide()),a&&a.hide()),t.type==HZ.sendEmail.types.TRADE_EMAIL&&(e=(e=e).find("#tradeDisclaimer"),tradeDisclaimer&&e.show()),n=!0)}function h(){switch(c){case HZ.utils.Config.appTypeYahoo:HZ.externalContacts.api.requestAuth(c,HZ.ajaz.Contacts.YAHOO_CONTACTS_SCOPE,function(e){d(!0)});break;case HZ.utils.Config.appTypeOutlook:HZ.externalContacts.api.requestAuth(c,HZ.ajaz.Contacts.OUTLOOK_CONTACTS_SCOPE,function(e){d(!0)});break;default:case HZ.utils.Config.appTypeGoogle:HZ.externalContacts.api.requestAuth(c,HZ.ajaz.Contacts.GOOGLE_CONTACTS_SCOPE,function(e){d(!0)})}}this.FORM_TEMPLATE='<fieldset class="row-fluid"><label id="toLabel">'+_hgt("To")+'</label><div id="emailDialogAddressBook"></div><textarea class="hz-toFld span-xs-12 form-control" autofocus="autofocus" rows="2" id="emailDialogEmailInput" placeholder="'+_hgt("Separate multiple emails with commas")+'" /><div id="upsellLine">'+_hgt("<t1>Import my Gmail contact list</t1>&nbsp;(<t2>why?</t2>)",{t1:{tag:"a",attr:{href:"javascript:;",class:"colorLink"}},t2:{tag:"a",attr:{id:"upsellTip",href:"javascript:;",class:"colorLink"}}})+'</div><label id="fromLabel">'+_hgt("From")+'</label><input id="emailDialogEmailFromInput" type="text" class="hz-emailFld span-xs-12" value="" placeholder="'+_hgt("Your email address")+'"/><label id="fromNameLabel">'+_hgt("Name")+'</label><input id="emailDialogEmailFromName" type="text" class="hz-nameFld span-xs-12" value="" placeholder="'+_hgt("Your name")+'"/><label id="subjectLabel">'+_hgt("Subject")+'</label><input type="text" class="hz-subjectFld span-xs-12" value="" placeholder="'+_hgt("Enter subject")+'"/><label id="messageLabel">'+_hgt("Message")+'</label><textarea rows="5" class="form-control hz-messageFld span-xs-12" placeholder="'+_hgt("Enter your message here")+'"/><div id="appendStaticMessage" class="hidden"><label><input class="hz-appendStaticMessage" type="checkbox" /></label><div class="hz-staticMessage"></div></div><div class="disclaimer">'+_hgt('By clicking "Send" I acknowledge and agree to the creation of an account and to the <t1>Terms of Use</t1> and <t2>Privacy Policy</t2>',{t1:e,t2:t})+'</div><div id="tradeDisclaimer" class="disclaimer-text" style="display: none;">'+_hgt("By sending this message, you confirm that you have the consent of each recipient to send the message and each recipient is a US resident.")+'</div><div id="shareRecaptchaDiv"></div></fieldset>',this.validateMore=function(){var e=this.getSettings(),t=this.getForm().find(".hz-toFld").val();if(!UIHelper.validateEmail(t,!0))return this.showError(HZ.sendEmail.texts.ERROR_INVALID_TO_EMAIL_ADDRESSES),!1;t=this.getForm().find(".hz-emailFld").val();return!(e.signupOnSend&&!UIHelper.validateEmail(t,!1))||(this.showError(HZ.sendEmail.texts.ERROR_INVALID_FROM_EMAIL_ADDRESS),!1)},this.prepare=function(e){HZ.email.EmailDialog.superclass.prepare.call(this,e);e=$.extend(!0,{},this.DEFAULT_OPTIONS,e);e.sourceLink=HZ.utils.Config.emailPhotoAutoRegisterSourceLink,e.useAddressBook=e.useAddressBook&&HZ.utils.Config.emailShareAbImportEnabled,this.applySettings(e)},onRecaptchaLoadCallback=function(){var e="shareRecaptchaDiv";if("undefined"!=typeof grecaptcha){try{"undefined"!=typeof recaptchaWidgetId&&grecaptcha.reset(recaptchaWidgetId)}catch(e){}$("#"+e).is(":empty")&&(recaptchaWidgetId=grecaptcha.render(e,{sitekey:HZ.utils.Config.recaptchaPublicKey}))}},this.onViewUnloaded=function(){"undefined"!=typeof grecaptcha&&grecaptcha.reset(recaptchaWidgetId),this.getSettings().useAddressBook&&o&&l&&$("#emailDialogAddressBook").clearAddressBookInput(),$("#emailDialogEmailInput").val("")},this.onViewLoaded=function(){var e=this.getSettings(),t=$("#emailDialogEmailInput"),a=$("#emailDialogEmailFromInput"),i=$("#emailDialogEmailFromName");e.signupOnSend||HZ.data.CurrentSessionUser||("undefined"==typeof grecaptcha?$.getScript("https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoadCallback&render=explicit&hl="+HZ.utils.Config.language):onRecaptchaLoadCallback());var s;!e.useAddressBook||o?(p(this.getForm(),e),HZ.email.EmailDialog.superclass.onViewLoaded.call(this),e.useAddressBook?(s=HZ.addressBook.Contacts.getContacts(),r=s&&0<s.length,this.getSubjectFld().val(e.subject),this.getMessageFld().val(e.message),!l&&r?(t.height("64px"),$("#emailDialogAddressBook").addressBook({input:t,showAddressBook:!1}),l=!0,$("#emailDialogEmailInput_tag").focus()):this.getToFld().focus(),$("#upsellLine a:first").text(function(){var e="";switch(c){case HZ.utils.Config.appTypeYahoo:e=r?_hgt("Update my Yahoo contact list"):_hgt("Import my Yahoo contact list");break;case HZ.utils.Config.appTypeOutlook:e=r?_hgt("Update my Outlook contact list"):_hgt("Import my Outlook contact list");break;default:case HZ.utils.Config.appTypeGoogle:e=r?_hgt("Update my Gmail contact list"):_hgt("Import my Gmail contact list")}return e}())):this.getToFld().focus(),t.on("blur",function(){HZ.utils.Logger.sendEventLogLightweight(HZ.utils.Config.eventToAddressEntered,{to:!!t.val()})}),a.on("blur",function(){HZ.utils.Logger.sendEventLogLightweight(HZ.utils.Config.eventFromAddressEntered,{from:!!a.val()})}),i.on("blur",function(){HZ.utils.Logger.sendEventLogLightweight(HZ.utils.Config.eventFromNameEntered,{name:!!i.val()})})):d(!1)},function(){HZ.email.EmailDialog.superclass.constructor.call(this)}.call(this)},HZ.extend(HZ.email.EmailDialog,HZ.email.ContactDialog),HZ.ns("HZ.dialogs"),HZ.dialogs.EmailDialog=new HZ.email.EmailDialog,HZ.email.ShareColorPaletteDialog=function(){this.DEFAULT_OPTIONS={type:null,referenceId:null,subject:"",message:"",event:HZ.sendEmail.events.SHARECP,scopeId:"",allowShare:!0,mft:"",colorPaletteShareLink:"",generateColorPaletteImageLink:""},this.DIALOG_CLASSNAME="shareColorPaletteDialog",this.DIALOG_TITLE=_hgt("Share color palette"),this.FORM_TEMPLATE="<div id='shareColorPaletteDialog' class='trackMe'><div class='mftDisclaimer'><i>"+_hgt("The colors displayed on-screen may not match %brandName% color standards")+"</i></div><div class='socialShareBtnsContainer'><a href='javascript:;' compid='fbShare' class='fb-share' onclick='HZ.dialogs.ShareColorPaletteDialog.generateFbShareEvent();'><div class='socialShareBtn facebook'></div></a><a href='javascript:;' compid='twShare' class='tw-share' onclick='HZ.dialogs.ShareColorPaletteDialog.generateTwShareEvent();'><div class='socialShareBtn twitter'></div></a><a href='javascript:;' compid='gShare' class='g-share' onclick='HZ.dialogs.ShareColorPaletteDialog.generateGShareEvent();'><div class='socialShareBtn plusone'></div></a></div><div class='sectionDivider text-bold'><span><i>"+_hgt("or email this to a friend")+"</i></span></div><form id='emailColorPaletteForm' name='emailColorPaletteForm' action='javascript:;'><textarea type='text' rows='1' class='form-control hz-toFld' id='emailDialogEmailInput' placeholder='"+_hgt("To (enter recipient emails, separated by commas)")+"'></textarea><label>"+_hgt("Subject")+"</label><input type='text' class='hz-subjectFld' id='emailDialogSubjectInput'><label>"+_hgt("Message")+"</label><textarea class='form-control hz-messageFld' id='emailDialogMessageInput' rows='5'></textarea></form></div>",this.validateMore=function(){var e=this.getForm().find("#emailDialogEmailInput").val();return!!UIHelper.validateEmail(e,!0)||(this.showError(HZ.sendEmail.texts.ERROR_INVALID_TO_EMAIL_ADDRESSES),!1)},this.prepare=function(e){HZ.email.ShareColorPaletteDialog.superclass.prepare.call(this,e);e=this.getSettings();this.applySettings(e)},this.onViewUnloaded=function(){this.getSettings()},this.onViewLoaded=function(){var e=this.getSettings();$("#shareColorPaletteDialog").attr("objid",e.referenceId).attr("scopeid",e.scopeId);e=$(".mftDisclaimer i").html().replace("%brandName%",this.getPaletteManufacturer());$(".mftDisclaimer i").html(e),HZ.email.ShareColorPaletteDialog.superclass.onViewLoaded.call(this),this.getToFld().focus()},this.getPaletteManufacturer=function(){var e=this.getSettings(),t=HZ.utils.ColorPicker.getPaintManufacturerDisplayName(e.mft);return HZ.lb.Utils&&(e=HZ.lb.Utils.ColorPicker.getColorPickerAd(e.referenceId),(e=HZ.lb.Utils.ColorPicker.getConfig(e))&&e.hasOwnProperty("advDisplayName")&&(t=e.advDisplayName)),t},this.generateFbShareEvent=function(){var e=this.getSettings(),t="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.colorPaletteShareLink),e=HZ.ui.Utils.getCenteredPopupPosition(611,368);window.open(t,"fbwindow","width=611, height=368, left="+e.left+", top="+e.top+", toolbar=0, location=0, menubar=0, scrollbars=0")},this.generateTwShareEvent=function(){var e=this.getSettings(),t=_hgt("I love this @{mft} Paint color palette! Create your own @Houzz",{mft:this.getPaletteManufacturer()}),t=encodeURIComponent(t),e="https://twitter.com/share?url="+encodeURIComponent(e.colorPaletteShareLink)+"&text="+t,t=HZ.ui.Utils.getCenteredPopupPosition(550,380);window.open(e,"fbwindow","width=550, height=380, left="+t.left+", top="+t.top+", toolbar=0, location=0, menubar=0, scrollbars=0")},this.generateGShareEvent=function(){var e=this.getSettings(),t="https://plus.google.com/share?url="+encodeURIComponent(e.colorPaletteShareLink),e=HZ.ui.Utils.getCenteredPopupPosition(600,600);window.open(t,"fbwindow","width=600, height=600, left="+e.left+", top="+e.top+", toolbar=0, location=0, menubar=0, scrollbars=1, resizeable=1")},function(){HZ.email.ShareColorPaletteDialog.superclass.constructor.call(this)}.call(this)},HZ.extend(HZ.email.ShareColorPaletteDialog,HZ.email.ContactDialog),HZ.ns("HZ.dialogs"),HZ.dialogs.ShareColorPaletteDialog=new HZ.email.ShareColorPaletteDialog;

window.hzmr.push("contactDialog:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End contactDialog.js  **************/
/************* Start marketplaceListingUtils.js for locale en-US **************/
try {HZ.ns("HZ.utils.Marketplace"),HZ.utils.Marketplace.ListingUtils={PROMOTION_MODULE_DISCOUNT_THRESHOLD:.03,getSpaceVendorListing:function(e,t){var i,n=null;return e&&(i=e.id,t?(e=HZ.data.SpaceListingIds.get(i))&&-1!==e.indexOf(t)&&(n=HZ.data.ListingsInfo.get(t)):n=HZ.utils.Marketplace.getPreferredVendorListing(i)),n},getSpacePreferredVendorListing:function(e){var t=null;return t=e?HZ.utils.Marketplace.getPreferredVendorListing(e.id):t},isBuyableAndAvailable:function(e){return e&&e.buyable&&e.avail},isDiscountThresholdMet:function(e,t){var i=!1;return i=e<t?t-t*this.PROMOTION_MODULE_DISCOUNT_THRESHOLD>e:i},isTile:function(e){return e&&e.sbb}};

window.hzmr.push("marketplaceListingUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End marketplaceListingUtils.js  **************/
/************* Start productRenderer.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.ProductRenderer=new function(){this.renderTradePriceBadge=function(e){return'<span class="text-xs text-bold trade-badge">'+e+"</span>"},this.renderProductBadge=function(e,r){var s=null,t=e&&e.hasOwnProperty("ifcc")&&e.ifcc.length,a=e&&e.hasOwnProperty("itx")&&!0===e.itx,d=e&&e.hasOwnProperty("tradeExclusiveBadge")?e.tradeExclusiveBadge:null,n=r&&r.hasOwnProperty("bstslr")&&!0===r.bstslr,l=r&&r.hasOwnProperty("excl")&&!0===r.excl;return t?(t=e.ifcc.toUpperCase(),s=HZ.modules.ProductBadge.renderFromCountryBadge(t,e.ifc)):a?s=HZ.modules.ProductBadge.renderTradeExclusiveBadge(d):r&&(n?s=HZ.modules.ProductBadge.renderBestSellerBadge():l&&(s=HZ.modules.ProductBadge.renderExclusiveBadge())),s},this.renderSavings=function(e){e=e&&e.hasOwnProperty("itp")&&!0===e.itp?e.tas||"":e&&e.pasf?e.pasf:"";return HZ.utils.Html.template('<div class="col-xs-12"><span class="text-primary">%savings%</span></div>',{savings:e})}};

window.hzmr.push("productRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productRenderer.js  **************/
/************* Start productPriceRenderer.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.ProductPriceRenderer=new function(){var r=null,d=null;this.init=function(t){t&&(d=t.hasOwnProperty("isPhone")?!0===t.isPhone:HZ.utils.Config.isResponsive,t.hasOwnProperty("isDesktop")?t.isDesktop:HZ.utils.Config.isResponsive,t.hasOwnProperty("spaceId")&&t.spaceId,t.hasOwnProperty("vendorListingId")&&t.vendorListingId)},this.setMountNode=function(t){r=t},this.updateView=function(t,e){t=HZ.data.Spaces.get(t),e=HZ.utils.Marketplace.ListingUtils.getSpaceVendorListing(t,e);t&&e&&r&&r.empty().append(this.renderProductPriceHtml(t,e))},this.addTooltips=function(t,e){var r=$(".hzi-Info2"),i="";t?i=_hgt('"MSRP" is the manufacturer\'s suggested retail price provided to Houzz by the vendor or seller. \t\t\t\tThe "MSRP" may not be the prevailing market price or regular retail price.'):"houzz"===e?i=_hgt("This product was listed on Houzz at this price within the last 90 days."):"competitor"===e&&(i=_hgt("We found this product on another retailer's site at this price within the last 90 days.")),r.length&&r.click(function(){var t=$("#was-price-tooltip");t.length&&"none"!==t.css("display")?0<(t=t.find(".close")).length&&t[0].click():($(this).outerWidth(),$(this).tipBubble({content:i,point:"north right",id:"was-price-tooltip",width:240,offsetX:6,offsetY:8,borderColor:"white",showCloseBtn:!0,position:"absolute",fadeDuration:0,bubblePadding:"10px 15px",attachTo:"#lbRoot"}))})},this.renderProductPriceHtml=function(t,e,r){var i,s="",l=HZ.utils.Marketplace.ListingUtils.getSpacePreferredVendorListing(t);return s=(l=e?e:l)?l.hasOwnProperty("itp")&&!0===l.itp?(i=l.hasOwnProperty("tradeBadge")?l.tradeBadge:null,HZ.utils.Html.template(d?'<div class="col-xs-12"><div class="row"><div class="col-xs-12 mtm mbl"><span class="pull-left mrs">%priceBadge%</span>%finalPriceHtml%</div>%comparePriceHtml%</div></div>':'<div class="col-xs-12"><div class="pull-left mbxl">%priceBadge%<div class="mtm">%finalPriceHtml%</div></div>%comparePriceHtml%</div>',{priceBadge:HZ.modules.ProductRenderer.renderTradePriceBadge(i),finalPriceHtml:this.renderProductFinalPriceHtml(t,l),comparePriceHtml:this.renderProductTradeComparePriceHtml(t,l,r)})):(e=HZ.lb.Config.priceRedesign,i=!1,r&&(i=l.bpt),HZ.utils.Html.template('<div class="col-xs-12">%finalPriceHtml%%comparePriceHtml%</div>',{finalPriceHtml:this.renderProductFinalPriceHtml(t,l,"price_with_now"===e),comparePriceHtml:this.renderProductComparePriceHtml(t,l,r,i)})):s},this.renderProductFinalPriceHtml=function(t,e,r){if(e&&e.p){var i=HZ.utils.Html.template('<span class="header-1 no-margin" itemprop="price" content="$%finalPrice%"><span itemprop="priceCurrency" content="%currencyCode%"></span>%finalPriceString%</span>',{finalPrice:e.pn,finalPriceString:this.renderProductFinalPriceString(t,e),currencyCode:e.crncode});return r&&""!==this.renderProductComparePriceString(t,e)?HZ.utils.Html.template('<span class="header-1 no-margin">%nowText%: %priceTemplate%</span>',{nowText:_hgt("Now"),priceTemplate:i}):i}},this.renderProductComparePriceHtml=function(t,e,r,i){return this.renderComparePriceHtml(this.renderProductComparePriceString(t,e),"text-m",r,!1,i)},this.renderProductTradeComparePriceHtml=function(t,e,r){var i,s,l,a,n,c,p="",o=HZ.utils.Marketplace.ListingUtils.getSpacePreferredVendorListing(t);return(o=e?e:o)&&(!(a=!0)===o.pmd&&(a=!1),i=HZ.utils.Marketplace.ListingUtils.isTile(o),a&&(n=o.msrp,c=parseFloat(o.rpn),s=o.pn,l=i?o.sbbPMsrpStr:o.msrpstr,e=this.renderComparePriceHtml(this.renderProductComparePriceString(t,o),r?"":"text-l text-gray-lighter"),a=r?_hgt("MSRP:")+"%msrpPriceHtml%":_hgt("List Price:")+"%msrpPriceHtml%",t=r?this.getTooltipHtml():"",o=i?o.sbbPTradeMarkup:o.tm,o=_hgt("Potential markup: <t1>{tradeMarkup}</t1>",{tradeMarkup:o,t1:{tag:"span",attr:{class:"text-bold"}}}),n=c<n,c='<div class="%className%">'+((c=s<c)?"<p>"+_hgt("Regular Price:")+"%comparePriceHtml%</p>":"")+(n?'<p class="%compareClassName%">%msrpComparePriceHtml%%tooltipHtml%</p><p class="product-price__trade-markup mb0">%tradeMarkupHtml%</p>':c?'<p class="%compareClassName%">&nbsp;</p><p class="product-price__trade-markup mb0">&nbsp;</p>':"")+"</div>",p=HZ.utils.Html.template(c,{className:d?"col-xs-12":"pull-left mlm plm v-line-l",comparePriceHtml:e,msrpComparePriceHtml:HZ.utils.Html.template(a,{msrpPriceHtml:this.renderComparePriceHtml(l,r?"":"text-l text-gray-lighter",!1,r)}),tradeMarkupHtml:o,tooltipHtml:t,compareClassName:r?"product-price__msrp-price":""}))),p},this.renderProductFinalPriceString=function(t,e){var r="",t=HZ.utils.Marketplace.ListingUtils.getSpacePreferredVendorListing(t);return r=(t=e?e:t)?HZ.utils.Marketplace.ListingUtils.isTile(t)?t.sbbPFinalStr:t.p:r},this.renderProductComparePriceString=function(t,e){var r,i,s,l,a="",n=HZ.utils.Marketplace.ListingUtils.getSpacePreferredVendorListing(t);return(n=e?e:n)&&(r=!0===n.itp,i=HZ.utils.Marketplace.ListingUtils.isTile(n),s=n.pn,l=n.rpn,t=n.bpn,(e=!(e=!0)===n.pmd?!1:e)&&(r||HZ.utils.Marketplace.ListingUtils.isDiscountThresholdMet(s,r?l:t))&&(a=i?r?n.sbbPFinalNonTradeStr:n.sbbPBaseStr:r?n.rp:n.bp)),a},this.renderComparePriceHtml=function(t,e,r,i,s){var l="",a="";return r=r||!1,i=i||!1,s=s||!1,l=t?r?("houzz"===s?a=_hgt("Was: <del>{price}</del>",{price:t}):"competitor"===s&&(a=_hgt("At other retailer: <del>{price}</del>",{price:t})),s=this.getTooltipHtml(),HZ.utils.Html.template('<div class="product-price__was-price">%WAS_STRING%%TOOLTIP%</div>',{WAS_STRING:a,TOOLTIP:s})):i?HZ.utils.Html.template("&nbsp;<span%classAttr%>%comparePriceString%</span>",{comparePriceString:t,classAttr:e?HZ.utils.Html.template(' class="%className%"',{className:e}):""}):HZ.utils.Html.template("&nbsp;<del%classAttr%>%comparePriceString%</del>",{comparePriceString:t,classAttr:e?HZ.utils.Html.template(' class="%className%"',{className:e}):""}):l},this.getTooltipHtml=function(){return'<span class="hzi-font hzi-Info2" aria-hidden="true"></span>'}};

window.hzmr.push("productPriceRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productPriceRenderer.js  **************/
/************* Start productDocumentRenderer.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.ProductDocumentRenderer=new function(){var e=null;this.setMountNode=function(t){e=t},this.updateView=function(t){t&&e&&e.empty().append(this.renderProductDocumentHtml(t))},this.renderProductDocumentHtml=function(t){var e,n=$('<ul class="list-unstyled  product-doc-list"></ul>');if(t&&t.productDocuments){var o,c=JSON.parse(t.productDocuments);for(o in c){var u=c[o],u=$(HZ.utils.Html.template('<li><a class="text-primary product-document-link" href="%LINK%" target="_blank"><i class="product-document-icon hzi-font hzi-Document text-s"></i>&nbsp;%NAME%</a></li>',{NAME:o,LINK:u}));n.append(u)}}return n.children().length&&(e=$('<div class="productDocument"><header class="section-header"><h2 class="sectionTitle text-m text-bold">Product Documentation</h2></header></div>')).append(n),e}};

window.hzmr.push("productDocumentRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productDocumentRenderer.js  **************/
/************* Start lightbox2.2AdPlugins.js for locale en-US **************/
try {HZ.lb.plugins.ProductPPCAdInfo=function(){var e,a,o=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){e=t,a=$('<section id="lbPPCAds" class="lbInfoBox ppc-ad separator"></section>')[0],e.addInfoBoxToContentGroup(a,"ppc-ad",o)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t=e.getCurrentSpace();$(a).empty(),e.isProduct()&&HZ.lb.plugins.PPCAdInfoRenderer.writeContent(t,a,4,8)}},HZ.lb.plugins.SpacePPCAdInfo=function(){var e,a,o=HZ.lb.Config.contentGroupIds.PRODUCTS;this.setOwner=function(t){e=t,a=$('<section id="lbPPCAds" class="lbInfoBox ppc-ad separator"></section>')[0],e.addInfoBoxToContentGroup(a,"ppc-ad",o)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t=e.getCurrentSpace();$(a).empty(),e.isProduct()||HZ.lb.plugins.PPCAdInfoRenderer.writeContent(t,a,4,8)}},HZ.lb.plugins.Gtm=new function(){var i,s,t;this.setOwner=function(t){i=t},this.imageDataUpdated=function(){(s=i.getCurrentSpace()).id==t&&this.imageChanged()},this.imageChanged=function(){s=i.getCurrentSpace(),t=s.id,function(){var t=!1,e=[],a=s&&s.brlnk?s.brlnk:null;{var o;a&&((a=a.crumbs)&&a.forEach(function(t){e.push(t.label)}),i.isProduct()?HZ.data.ProductsInfo.get(s.id)&&(o={hasaccount:HZ.data.CurrentSessionUser?"y":"n",ecomm_prodid:"HZ_"+s.id,ecomm_category:e,ecomm_style:HZ.utils.Styles.getStyleName(s.s),hashed_user:HZ.lb.Config.gtmIdHash.hashed_user,hashed_visitor:HZ.lb.Config.gtmIdHash.hashed_visitor,test_bucket:HZ.lb.Config.gtmTestBucket},s.amtRaw&&s.cuid&&(o.ecomm_pvalue=Math.round(100*s.amtRaw)/100,o.ecomm_currency=HZ.data.Currencies.get(s.cuid)),HZ.utils.Gtm.pushData("houzz_pageview","lightbox_view_product",o),t=!0):i.isProduct()||(o={hasaccount:HZ.data.CurrentSessionUser?"y":"n",ecomm_prodid:"HZ_"+s.id,ecomm_category:e,ecomm_style:HZ.utils.Styles.getStyleName(s.s),hashed_user:HZ.lb.Config.gtmIdHash.hashed_user,hashed_visitor:HZ.lb.Config.gtmIdHash.hashed_visitor,test_bucket:HZ.lb.Config.gtmTestBucket},HZ.utils.Gtm.pushData("houzz_pageview","lightbox_view_photo",o),t=!0))}return t}()&&(t=null)}},HZ.lb.plugins.PaidProInfo=function(){var A,R,e,S,o,a,I,L,Z,D,U,k,x,i=HZ.lb.Config.contentGroupIds.OVERVIEW,y=_hgt("Sponsored"),N=_hgt("View My Portfolio"),F=_hgt("See My Projects"),M=_hgt("Email Us"),w=_hgt("Contact Professional"),s=_hgt("Your Email"),r=_hgt("Enter your contact phone number"),n=_hgt("Enter your zip code"),l=_hgt("Message"),d=_hgt("Tell us a little about your project"),c=_hgt("I confirm this is a personal project inquiry and not a promotional message or solicitation."),p=_hgt("Thanks for Submitting");this.setOwner=function(t){switch(A=t,R=$("<div></div>"),e=R.get(0),A.addInfoBoxToContentGroup(e,"sponsoredSpaceDescriptionInfo",i),R.on("click",".pro-contact-cta",this.handleContactProClicked.bind(this)),x='<section class="lbInfoBox sponsoredSpaceDescription">%HEADER%<div class="row"><p class="col-xs-12 pro-long-desc">%PRO_LONG_DESC%</p>%OFFER%%PRO_CONTACT%<span class="col-xs-12 mbl"><a href="%PRO_PORTFOLIO_URL%" target="_blank" class="btn btn-primary med btn-block"><i class="hzi-font hzi-Ideas-Fill icon"></i> %PROJECTS_CTA%</a></span></div>%THUMB_GRID%</section>',k=U=!(D=!0),HZ.lb.Config.proContactForm){case"dialog":U=!(D=!1),x='<section class="lbInfoBox sponsoredSpaceDescription">%HEADER%<div class="row"><p class="col-xs-12 pro-long-desc">%PRO_LONG_DESC%</p>%OFFER%<span class="col-xs-12 mbl"><button class="btn btn-primary med btn-block pro-contact-cta"><i class="hzi-font hzi-Pro-Fill icon"></i> %CONTACT_CTA%</button></span></div></section>';break;case"inline":k=!(D=!1),x='<section class="lbInfoBox sponsoredSpaceDescription">%HEADER%%OFFER%<div class="inline-form-placeholder"></div></section>'}D&&((S=$(HZ.utils.Html.template(HZ.lb.Templates.IMAGE_OVERLAY_TEMPLATE,{CTA:_hgt("SEE MY PROJECTS"),COMP_ID:"paid_pro_overlay",CSS_CLASS:"hidden"})).disableSelection()).on("click",this.handleVisitProfileClicked.bind(this)),A.addLbImageLayer(S))},this.lightboxLoaded=function(){HZ.data.CurrentSessionUser?(HZ.dialogs.ContactProDialog||(HZ.dialogs.ContactProDialog=new HZ.email.ContactProDialog),a=HZ.dialogs.ContactProDialog,HZ.ajaz.Services.User.getCurrentSessionUserExtraData().then(this.handleGetUserExtraDataResponse.bind(this))):(HZ.dialogs.GuestContactProDialog||(HZ.dialogs.GuestContactProDialog=new HZ.email.GuestContactProDialog),a=HZ.dialogs.GuestContactProDialog)},this.handleGetUserExtraDataResponse=function(t){t&&"true"===t.success&&HZ.data.CurrentSessionUser.setExtra(t.userEmail,t.phoneNumber,t.zipCode)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){R.empty(),I=A.getCurrentSpace(),L=I.id,Z=HZ.data.PaidProAds.get(L);var t=I.ow,e=Z;if(e&&e.proName&&e.proShortDesc&&e.proLongDesc){var a=e.proProfileLink,o=e.rating,i=e.numReviews,s=e.proShortDesc,r=e.proLongDesc,n=e.proCoverPhotos,l=e.proOffers,d=e.proOffersDisc,c=e.proPhone,p=e.showProEmail,h=e.coopInformation;e.proUserId&&(t=e.proUserId);var u=HZ.ui.render.User.getUserImageHtml(t,!0,a,1),m=HZ.ui.render.User.getUserHtml(t,!0,a),_=_hgtp("","1 Review","{reviewsCount} Reviews",i,{reviewsCount:i}),g="",i="";0<o&&(i=HZ.ui.render.Rate.getRateStars(o)),void 0!==h&&(g=this.renderCoopInfo());var E=[];if(n&&n.length)for(var b=HZ.lb.Utils.calculateThumbWidth(A.getContentBox().w-32,4,8),C=b,H=b,P=Math.min(n.length,4),f=0;f<P;f++){var O=n[f],O=HZ.utils.Links.getSpaceImageUrl(O,C,H),O=HZ.utils.Html.template('<li><a target="_blank" href="%PRO_PORTFOLIO_URL%"><img src="%IMAGE_URL%" width="%WIDTH%" height="%HEIGHT%"></a></li>',{PRO_PORTFOLIO_URL:a,IMAGE_URL:O,WIDTH:C,HEIGHT:H});E.push(O)}b=HZ.utils.Html.template('<ul class="thumb-grid grid-4">%THUMBS%</ul>',{THUMBS:E.join("")});g={SPONSORED:y,PRO_AVATAR:u,PRO_NAME:m,AVATAR_CLASS:"author-avatar",NAME_CLASS:"author-details",REVIEW_RATING:i,NUM_OF_REVIEWS:_,COOP_INFO:g,PRO_SHORT_DESC:s,PRO_PORTFOLIO_URL:a,PORTFOLIO_CTA:N};var T,v,s=HZ.utils.Html.template('<header class="sectionHeader row"><p class="sponsored col-xs-12">%SPONSORED%</p><div class="col-xs-12"><div class="%AVATAR_CLASS%">%PRO_AVATAR%</div><div class="%NAME_CLASS%">%PRO_NAME% <div class="pro-rating"><div class="review-rate">%REVIEW_RATING% <span class="review-count" itemprop="ratingCount">%NUM_OF_REVIEWS%</span></div></div></div></div></header><div class="row mbm"><h2 class="header-6 sectionTitle col-xs-12">%PRO_SHORT_DESC%</h2>%COOP_INFO%<a href="%PRO_PORTFOLIO_URL%" target="_blank" class="text-primary col-xs-12">%PORTFOLIO_CTA%<span class="more-icon"></span></a></div>',g);l&&(g={PHONE_CLASS:D&&c?"col-xs-6":"hidden",EMAIL_CLASS:D&&p?c?"col-xs-6":"col-xs-12":"hidden",PRO_PHONE:c||"",PRO_EMAIL_CTA:M},T=$("<div>"+HZ.utils.Html.template('<div class="col-xs-12"><div class="contact text-l text-bold row"><div class="phone-contact %PHONE_CLASS%"><span class="hzi-font hzi-Phone icon"></span>%PRO_PHONE%</div><div class="email-contact %EMAIL_CLASS%"><a href="javascript:;" class="pro-contact-cta"><span class="hzi-font hzi-Email-Small icon"></span>%PRO_EMAIL_CTA%</a></div></div></div>',g)+"</div>").html(),g={OFFER_DESC:l,OFFER_DISCLAIMER:d},v=HZ.utils.Html.template('<div class="row pro-offer pro-offer-pro-plus"><h2 class="header-5 text-bold col-xs-12 mlm">%OFFER_DESC% <span class="disclaimer text-nowrap">%OFFER_DISCLAIMER%</span></h2></div>',g)),g={HEADER:s,PRO_LONG_DESC:r,OFFER:v,PRO_CONTACT:T,PRO_PORTFOLIO_URL:a,PROJECTS_CTA:F,THUMB_GRID:b},U?g={HEADER:s,PRO_LONG_DESC:r,OFFER:v,CONTACT_CTA:w}:k&&(g={HEADER:s,OFFER:v}),R.append(HZ.utils.Html.template(x,g)),k&&R.find(".inline-form-placeholder").replaceWith(this.prepareInlineContactForm()),HZ.lb.Utils.registerTrackingUrl(e.impTrkLink,I.id),D&&S.removeClass("hidden").find(".cta").attr("objid",t)}else D&&S.addClass("hidden")},this.renderCoopInfo=function(){var t=Z.proProfileLink,e=Z.coopInformation,a=$("<div>");return a.append(HZ.utils.Html.template('<div class="col-xs-12 mbl"><div class="row pro-coop"><div class="col-xs-2"><a href="%PRO_PORTFOLIO_URL%" target="_blank"><img src="%EMPTY_GIF%" style="background-image: url(%COOP_IMG_SRC%);" width="55" height="55" class="pro-coop-logo" objid="%COOP_BRAND_USER_ID%"></a></div><div class="col-xs-10"><p class="text-gray-light text-s pro-coop-rel"><a href="%PRO_PORTFOLIO_URL%" target="_blank">%COOP_LABEL%</a></p></div></div></div>',{EMPTY_GIF:HZ.utils.Config.emptyGifData,PRO_PORTFOLIO_URL:t,COOP_IMG_SRC:e.logoFileUrl,COOP_BRAND_USER_ID:e.coopBrandUserId,COOP_LABEL:e.coopText})),a.html()},this.prepareInlineContactForm=function(){var t=_hgt("Contact {proName}",{proName:Z.proName}),e=HZ.data.CurrentSessionUser.getEmailAddress()||"",e={FORM_TITLE:t,EMAIL_FIELD_ID:"contactProEmail"+L,EMAIL_PLACEHOLDER:s,EMAIL_VALUE:e,PHONE_FIELD_ID:"contactProPhone"+L,PHONE_PLACEHOLDER:r,ZIP_FIELD_ID:"contactProZip"+L,ZIP_PLACEHOLDER:n,MESSAGE_FIELD_ID:"contactProMessage"+L,MESSAGE_LABEL:l,MESSAGE_PLACEHOLDER:d,CHECKBOX_LABEL:c,BUTTON_LABEL:w,DONE_MESSAGE:p},e=$(HZ.utils.Html.template('<div class="row pro-contact-form"><h2 class="header-6 text-unbold col-xs-12">%FORM_TITLE%</h2> <form action="javascript:;" class="col-xs-12" scopeid="lb_contact_pro_inline" novalidate><fieldset class="row"><div class="form-group col-xs-12"><input type="email" name="email" class="form-control" id="%EMAIL_FIELD_ID%" placeholder="%EMAIL_PLACEHOLDER%" value="%EMAIL_VALUE%" required></div><div class="form-group col-xs-6"><input type="tel" name="phone" class="form-control" id="%PHONE_FIELD_ID%" placeholder="%PHONE_PLACEHOLDER%" required></div><div class="form-group col-xs-6"><input type="text" name="zip" class="form-control" id="%ZIP_FIELD_ID%" placeholder="%ZIP_PLACEHOLDER%" required></div><div class="form-group col-xs-12"><label class="control-label" for="%MESSAGE_FIELD_ID%">%MESSAGE_LABEL%</label><textarea rows="3" name="message" class="form-control" id="%MESSAGE_FIELD_ID%" placeholder="%MESSAGE_PLACEHOLDER%" required></textarea></div><div class="checkbox col-xs-12"><label><input name="disclaimer" type="checkbox" value="" required>%CHECKBOX_LABEL%</label> </div><div class="col-xs-12"><button type="submit" name="submit" compid="lb_contact_pro_inline_submit" class="btn med btn-block btn-primary trackMe"><i class="hzi-font hzi-Pro-Fill icon"></i> %BUTTON_LABEL%</button></div></fieldset></form></div><div class="row done-message"><div class="text-bold text-center col-xs-12"><i class="icon hzi-font hzi-Vote-Circle"></i> %DONE_MESSAGE%</div></div>',e));return e.off("submit change keydown focus blur").on("submit",this.onContactFormSubmit.bind(this)).on("change keydown","input, textarea",this.onContactFormChange.bind(this)).on("focus","input, textarea, button",this.onContactFormFocus.bind(this)).on("blur","input, textarea",this.onContactFormBlur.bind(this)),e},this.onContactFormChange=function(t){t=$(t.delegateTarget);t.find(".form-field-error").remove(),t.find(".form-group").removeClass("has-error")},this.onContactFormFocus=function(t){o.remove(),A.detachKeyboardHandler()},this.onContactFormBlur=function(t){A.attachKeyboardHandler()},this.onContactFormSubmit=function(t){t.preventDefault();var e=$(t.target),a=e.get(0);if(a.checkValidity()){HZ.data.Users.get(A.getCurrentSpace().ow).id;var o=Z.proUserName,i=_hgt("Houzz project inquiry"),s=HZ.sendEmail.types.PRO,r=$(a.email).val(),n=$(a.phone).val(),t=$(a.zip).val(),a=$(a.message).val(),r=_hgt("Contact Phone Number: {phoneNumber}",{phoneNumber:n})+"\n"+_hgt("Project Location: {zipCode}",{zipCode:t})+"\n\n"+_hgt("Sender email: {emailAddress}",{emailAddress:r})+"\n\n"+a,a={};a[HZ.sendEmail.params.to]=o,a[HZ.sendEmail.params.subject]=i,a[HZ.sendEmail.params.message]=r,a[HZ.sendEmail.params.type]=s,HZ.ajaz.Services.sendEmail(a,!1,this.onContactFormSubmitResponse.bind(this)),e.find("[name=submit]").attr("disabled",!0)}else for(var l,d=["email","phone","zip","message","disclaimer"],c=d.length,p=0;p<c;p++)if(!(l=e.find("[name="+d[p]+"]")).get(0).checkValidity()){this.handleFieldValidationError(l);break}},this.onContactFormSubmitResponse=function(t){if("true"==t.success){HZ.ui.yamdi.Common.hideAllDialogs(),R.find(".pro-contact-form").addClass("done");try{window.ga("send","event","ContactProDialog","contactSuccess")}catch(t){console.warn(t)}}else HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(_hgt("Send message error!"),t.errorMessage),R.find(".pro-contact-form button[name=submit]").attr("disabled",!1)},this.handleFieldValidationError=function(t){var e,a=t.get(0).validity;if(a.valueMissing)switch(t.attr("name")){case"email":e=_hgt("Please enter your email address");break;case"phone":e=_hgt("Please enter your phone number");break;case"zip":e=_hgt("Please enter your zip code");break;case"message":e=_hgt("Please add a short description of your project");break;case"disclaimer":e=HZ.sendEmail.texts.ERROR_PRO_CONFIRM_INQUIRY_NOT_AGREE}else a.typeMismatch&&(e=HZ.sendEmail.texts.ERROR_INVALID_FROM_EMAIL_ADDRESS);o=$(HZ.utils.Html.template(HZ.lb.Templates.FORM_FIELD_ERROR_TEMPLATE,{MESSAGE:e})),this.showFieldError(t,o)},this.showFieldError=function(t,e){t.closest(".form-group").addClass("has-error"),t.after(e)},this.handleVisitProfileClicked=function(){var t=Z;t&&t.proName&&t.proShortDesc&&t.proLongDesc&&(t=t.proProfileLink,window.open(t))},this.handleContactProClicked=function(){var t=Z;a.prepare({toUserName:t.proUserName,toUserDisplayName:t.proName,subject:_hgt("Houzz project inquiry"),message:""}),a.getSendBtn().attr("compid","lbContactDlgSend"),A.showDialog(a)}},HZ.lb.plugins.LocalProsContact=function(){var h,i,s,u,e,a,o,r,p,m,n,l=HZ.lb.Config.contentGroupIds.OVERVIEW,d=_hgt("Ready to start your project?"),c=_hgt("Contact a Professional"),_=_hgt("Contact a Professional"),g=_hgt("Tell us about your project"),E=_hgt("Select Professionals"),b=_hgt("In this photo"),C=_hgt("Sponsored"),H=_hgt("Your Name"),P=_hgt("Your Email"),f=_hgt("Your Phone Number"),O=_hgt("Your Zip Code"),T=_hgt("Brief description of your project"),v=_hgt("Please select the professionals you wish to contact."),A=["name","email","phone","zip","message"],R='<span class="text-xs text-gray-lightest pull-right">%PRO_ENTRY_LABEL%</span><div class="checkbox" objid="%OBJ_ID%"><label><input type="checkbox" value="%PRO_USERNAME%" compid="lb_local_pros_dialog_checkbox"><div><div class="author-avatar" compid="lb_local_pros_dialog_pro_avatar">%AVATAR%</div><div class="author-details"><div class="text-m clearfix" compid="lb_local_pros_dialog_pro_name">%AUTHOR%</div><div class="pro-type text-gray-light">%PRO_TYPE%</div>%PRO_REVIEWS%<span class="pro-location-text text-nowrap"><i class="hzi-font hzi-location-pin-fill"></i>%PRO_LOCATION%</span></div></div></label></div>';this.setOwner=function(t){h=t,i=$('<section id="lbLocalProsAd" compid="lb_local_pros_ad" class="lbInfoBox separator trackMe"></section>'),h.addInfoBoxToContentGroup(i.get(0),"localProsAd",l),(s=$("<div>").appendTo(i)).append(HZ.lb.RenderUtils.renderSectionHeader(d)),s.append(HZ.utils.Html.template('<div class="row"><p class="col-xs-12"><button class="btn btn-primary med btn-block"><i class="hzi-font hzi-Pro-Fill icon"></i> %CONTACT_CTA%</button></p></div>',{CONTACT_CTA:c})),i.on("click",".btn-primary",this.handleCtaClick.bind(this)),i.addClass("hidden"),n=HZ.ui.AjaxThrobber.getThrobber(),a=$('<button type="button" class="btn btn-secondary text-s text-bold" compid="lb_local_pros_dialog_cancel">'+_hgt("Cancel")+"</button>"),o=$('<button type="submit" class="btn btn-primary text-s text-bold" compid="lb_local_pros_dialog_send">'+_hgt("Send Message")+"</button>"),(u=new HZ.ui.yamdi.Dialog).init({dialogClassName:"lb-local-pros-dialog trackMe",formName:"lbContactLocalPros",title:_,controls:[n,a,o]}),(e=$(u.getForm())).attr("novalidate",!0),e.attr("scopeid","lb_local_pros_dialog_form"),e.on("submit",this.handleDialogSubmit.bind(this)),e.on("change keydown focus","input, textarea",this.clearErrorState.bind(this)),e.on("click",".author-avatar",this.handleProAvatarClick.bind(this)),a.click(HZ.ui.Yamdi.hide.bind(HZ.ui.Yamdi,u))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t,e,a,o=h.getCurrentSpace();s.detach(),o.fullyLoaded&&HZ.data.CurrentSessionUser&&(t=o.id,a=(e=HZ.data.LocalProsAd.get(t))&&e.uids&&1<e.uids.length,o=0<(o=o.ow)&&HZ.data.Users.get(o)&&"1"==HZ.data.Users.get(o).p,a&&o&&(i.append(s),e.hasOwnProperty("proTrackingUrl")&&HZ.lb.Utils.registerTrackingUrl(e.proTrackingUrl,t),e.hasOwnProperty("impTeaserTrackingUrl")&&HZ.lb.Utils.registerTrackingUrl(e.impTeaserTrackingUrl,t),e.hasOwnProperty("proTeaserTrackingUrl")&&HZ.lb.Utils.registerTrackingUrl(e.proTeaserTrackingUrl,t)))},this.handleCtaClick=function(t){this.showLocalProsContactDialog()},this.showLocalProsContactDialog=function(){var o,i,s,r,t=h.getCurrentSpace(),n=HZ.data.LocalProsAd.get(t.id),e=HZ.data.HouzzClkTracking.get(t.id),a=h.getCurrentSpace().ow,l=HZ.data.Users.get(a);l&&(o=e&&e[a]?e[a]:null,i=HZ.ui.render.User.getUserImageHtml(a,!0,"javascript:;",1),s=HZ.ui.render.User.getUserHtml(a,!0,o),r=$(HZ.ui.render.User.getProfessionalLocationHtml(l)).html(),p="",$.isNumeric(l.nr)&&0<parseInt(l.nr)&&(p=HZ.lb.RenderUtils.renderProReview(l)),(p=$(HZ.utils.Html.template(R,{OBJ_ID:a,PRO_USERNAME:l.n,PRO_ENTRY_LABEL:b,AVATAR:i,AUTHOR:s,PRO_REVIEWS:p,PRO_TYPE:HZ.data.ProfessionalTypes.get(l.pt),PRO_LOCATION:r}))).find(".pro-location-text").toggleClass("hidden",!(0<r.length)),p=$("<div>").append(p).html());var d=_hgt("Near {location}",{location:n.loc}),c=$("<div>");n.uids.forEach(function(t,e){var a;(l=HZ.data.Users.get(t))&&(a=n[t],o=a.hasOwnProperty("clkTrackingUrl")?a.clkTrackingUrl:null,i=HZ.ui.render.User.getUserImageHtml(t,!0,"javascript:;",1),s=HZ.ui.render.User.getUserHtml(t,!0,o),a="",$.isNumeric(l.nr)&&0<parseInt(l.nr)&&(a=HZ.lb.RenderUtils.renderProReview(l)),r=d,a=HZ.utils.Html.template(R,{OBJ_ID:t,PRO_USERNAME:l.n,PRO_ENTRY_LABEL:C,AVATAR:i,AUTHOR:s,PRO_REVIEWS:a,PRO_TYPE:HZ.data.ProfessionalTypes.get(l.pt),PRO_LOCATION:r}),$("<li>").attr("posid",e+1).append(a).appendTo(c))});var p=HZ.utils.Html.template('<div class="row form-group"><div class="col-xs-6"><input type="text" name="name" class="form-control" placeholder="%NAME_INPUT_PLACEHOLDER%" required></div><div class="col-xs-6"><input type="email" name="email" class="form-control" placeholder="%EMAIL_INPUT_PLACEHOLDER%" required></div></div><div class="row form-group"><div class="col-xs-6"><input type="tel" name="phone" class="form-control" placeholder="%PHONE_INPUT_PLACEHOLDER%" required></div><div class="col-xs-6"><input type="text" name="zip" class="form-control" placeholder="%ZIP_INPUT_PLACEHOLDER%" required></div></div><div class="row form-group"><div class="col-xs-12"><textarea class="form-control" name="message" placeholder="%DESC_INPUT_PLACEHOLDER%" required></textarea></div></div><div class="row"><div class="col-xs-12"><h2 class="header-6 mb0">%PROS_TITLE%</h2></div><div class="col-xs-12 lb-contact-local-pros--local"><ul class="list-unstyled lb-contact-local-pros--list mb0"><li posid="0">%FEATURED_PRO_ENTRY%</li>%LOCAL_PRO_ENTRIES%</ul></div></div>',{FORM_TITLE:g,PROS_TITLE:E,FEATURED_PRO_ENTRY:p,LOCAL_PRO_ENTRIES:c.html(),NAME_INPUT_PLACEHOLDER:H,EMAIL_INPUT_PLACEHOLDER:P,PHONE_INPUT_PLACEHOLDER:f,ZIP_INPUT_PLACEHOLDER:O,DESC_INPUT_PLACEHOLDER:T});u.setBody(p),h.showDialog(u),n.hasOwnProperty("impTrackingUrl")&&HZ.lb.Utils.registerTrackingUrl(n.impTrackingUrl,t.id)},this.handleProAvatarClick=function(t){t=$(t.currentTarget).closest(".checkbox").find('input[type="checkbox"]');t.prop("checked",!t.prop("checked"))},this.handleDialogSubmit=function(t){t.preventDefault();var e,a,o,i,s,r=$(t.target),n=r.get(0);if(p=r.find(":checked"),n.checkValidity())0==p.length?u.showStatus(v):(m=[],p.each(function(t,e){m.push($(e).val())}),e=HZ.sendEmail.types.PRO,a=$(n.name).val(),o=$(n.email).val(),i=$(n.zip).val(),t=$(n.phone).val(),n=$(n.message).val(),s=_hgt("Contact Name: {name}",{name:a})+"\n"+_hgt("Phone Number: {phoneNumber}",{phoneNumber:i})+"\n"+_hgt("Sender email: {emailAddress}",{emailAddress:o})+"\n\n"+_hgt("Sender zip code: {zipCode}",{zipCode:t})+"\n\n"+n,r.find("[type=submit]").attr("disabled",!0),HZ.ui.AjaxThrobber.setInCall(!0),m.forEach(function(t){HZ.ajaz.Services.sendEmail(null,t,"",s,e,null,null,null,null,null,null,this.onContactFormSubmitResponse.bind(this,t))}.bind(this)));else for(var l,d=A.length,c=0;c<d;c++)if(!(l=r.find("[name="+A[c]+"]")).get(0).checkValidity()){this.handleFieldValidationError(l);break}},this.onContactFormSubmitResponse=function(t,e){if("true"==e.success){m.splice(m.indexOf(t),1),m.length||(HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.AjaxThrobber.setInCall(!1),o.attr("disabled",!1),HZ.ui.yamdi.Common.alert("",HZ.sendEmail.texts.CONFIRM_MESSAGE_SENT));try{window.ga("send","event","ContactLocalProsDialog","contactSuccess")}catch(t){console.warn(t)}}else HZ.ui.yamdi.Common.hideAllDialogs(),HZ.ui.yamdi.Common.alert(_hgt("Send message error!"),e.errorMessage),o.attr("disabled",!1),HZ.ui.AjaxThrobber.setInCall(!1)},this.handleFieldValidationError=function(t){var e,a=t.get(0).validity;if(a.valueMissing)switch(t.attr("name")){case"name":e=_hgt("Please enter your name");break;case"email":e=_hgt("Please enter your email address");break;case"phone":e=_hgt("Please enter your phone number");break;case"zip":e=_hgt("Please enter your zip code");break;case"message":e=_hgt("Please add a short description of your project")}else a.typeMismatch&&(e=HZ.sendEmail.texts.ERROR_INVALID_FROM_EMAIL_ADDRESS);r=$(HZ.utils.Html.template(HZ.lb.Templates.FORM_FIELD_ERROR_TEMPLATE,{MESSAGE:e})),this.showFieldError(t,r)},this.showFieldError=function(t,e){t.parent().addClass("has-error"),t.after(e)},this.clearErrorState=function(t){u.hideStatus(),e.find(".has-error").removeClass("has-error"),r&&r.length&&r.remove()}},HZ.lb.plugins.TrackClick=function(){var a;this.setOwner=function(t){a=t},this.lightboxLoaded=function(){var t,e=a.getCurrentSpace();e&&HZ.data.HouzzClkTracking.get(e.id)&&(!(t=HZ.data.HouzzClkTracking.get(e.id))||(t=t[e.id])&&0<t.length&&HZ.lb.Utils.registerTrackingUrl(t,e.id))}},HZ.lb.plugins.ProductAdInfo=function(){var d,c,e=HZ.lb.Config.contentGroupIds.OVERVIEW,p=_hgt("Save to ideabook"),h=_hgt("Sponsored"),u=_hgt("Products in this Photo:");this.setOwner=function(t){d=t,c=$('<section id="lbProductAds" scopeid="lightboxBrandAds" class="lbInfoBox separator productAds trackMe"></section>'),d.addInfoBoxToContentGroup(c.get(0),"productAdInfo",e)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){c.empty();var s,e,a,t,o=d.getCurrentSpace(),r=!1,i=d.isSpotlightContext(),n=[],l=HZ.data.PhotoAds.get(o.id);o&&o.fullyLoaded&&HZ.data.ProductAds.get(o.id)&&(l||(l=HZ.data.ProductAds.get(o.id),r=!0)),l&&l.products&&0<l.products.length&&!l.mpAd&&(l.adHtml&&(l.adHtml="<div>"+$(l.adHtml).html()+"</div>"),s=l.buttonText?_hgt(l.buttonText):i?_hgt("Learn More"):_hgt("Visit Store"),i=(t=l.products).length,e=Math.min(6,i),a=0,(t=t.filter(function(t){return a++<e&&!!HZ.data.Spaces.get(t.sid)})).forEach(function(t){var e=t.sid,a=HZ.data.Spaces.get(e).t,o=HZ.utils.Links.getSpaceImageUrl(e,131,131,!1),i=t.tlink,t=t.ptlink,i={SAVE_MESSAGE:p,IMG_SRC:HZ.utils.Config.emptyGifData,IMG_URL:o,IMG_STYLE:"background-image:url("+o+");",SPACE_TITLE_CLASS:r?"hidden":"",SPACE_LINK:t,SPACE_TITLE:a,VISIT_STORE_URL:i,VISIT_STORE_CTA:s,LINK_ID:"pLink_"+e},i=$(HZ.utils.Html.template('<li><div class="row"><div class="col-xs-3 thumb" title="%SAVE_MESSAGE%" compid="Save"><img src="%IMG_SRC%" class="image" style="%IMG_STYLE%"><a href="javascript:;" class="btn tint save"><i class="plus-icon hzi-font hzi-Add-Photo-Button"></i></a></div><div class="col-xs-9"><h3 class="%SPACE_TITLE_CLASS%"><a href="%SPACE_LINK%" target="_blank" rel="nofollow">%SPACE_TITLE%</a></h3><a id="%LINK_ID%" href="%VISIT_STORE_URL%" target="_blank" class="btn btn-primary med">%VISIT_STORE_CTA%<span class="more-icon"></span></a></div></div></li>',i));i.on("click",".thumb",e,this.handleProdAddToIdeabookClick.bind(this)),n.push(i)}.bind(this)),t={SPONSORED:r?"":h,BRAND_LOGO:!r&&l.adHtml?l.adHtml:"",AD_SECTION_TITLE:u,OFFER:l.brandAdOffers?HZ.utils.Html.template('<h2 class="header-5 text-bold col-xs-12 pro-offer">%OFFER_DESC%</h2>',{OFFER_DESC:l.brandAdOffers}):""},c.append(HZ.utils.Html.template('<header class="sectionHeader row"><p class="sponsored-badge col-xs-12">%SPONSORED%</p><div class="ad-brand-logo col-xs-12">%BRAND_LOGO%</div>%OFFER%<h2 class="sectionTitle text-l text-bold mbm col-xs-12">%AD_SECTION_TITLE%</h2></header><ul class="thumb-grid grid-1 clearfix"></ul>',t)),c.find(".thumb-grid").append(n),HZ.lb.Utils.registerTrackingUrl(l.impTrkLink,o.id))},this.handleProdAddToIdeabookClick=function(t){d.isSignupMode()?d.showLoginDialog():(t=t.data,HZ.spaceActions.AddToIdeabookDialog.init(t),d.showDialog(HZ.spaceActions.AddToIdeabookDialog))},this.lightboxLoaded=function(){var t,e=d.getCurrentSpace();e&&HZ.data.PhotoAds.get(e.id)&&(t=HZ.data.PhotoAds.get(e.id)).clkTrkLink&&HZ.lb.Utils.registerTrackingUrl(t.clkTrkLink,e.id)}},HZ.lb.plugins.MarketPlaceAds=function(){var i,s,r,n,e=HZ.lb.Config.contentGroupIds.OVERVIEW,l='<li posid="%POS_ID%" objid="%OBJ_ID%" class="%CSS_CLASS%"><div class="row"><div class="col-xs-4"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%IMG_SRC%" width="%THUMB_WIDTH%" height="%THUMB_HEIGHT%"/></div></div><div class="col-xs-8"><p><a href="%SPACE_LINK%" target="_blank" rel="nofollow">%SPACE_TITLE%</a></p><p>%BUTTON%</p></div></div></li>',d=_hgt("Buy"),c=_hgt("Sold Out"),p=_hgt("Products in this Photo"),h=_hgt("Related products in this Photo");this.setOwner=function(t){i=t,s=$('<section id="lbProductAds" scopeid="lb_mp_ad" class="lbInfoBox separator mp-ad"></section>'),i.addInfoBoxToContentGroup(s.get(0),"productAdInfo",e),s.on("click",".mp-ad-thumb",this.handleThumbClick.bind(this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t,e,o,a;s.empty(),r=[],n=[],i.isMarketPlaceAd()&&(s.append(HZ.lb.RenderUtils.renderSectionHeader(p)),t=i.getCurrentSpace(),a=(e=HZ.data.PhotoAds.get(t.id)).products,o=[],a.forEach(function(t,e){var a=HZ.data.Spaces.get(t.sid);r.push(a.id),o.push(this.getThumbReplacementMap(a,e,t))}.bind(this)),s.append(HZ.lb.RenderUtils.renderThumbGrid(1,o,"mp-ad-thumb",l,"lb_mp_ad_products")),e.hasOwnProperty("relatedProductList")&&(a=e.relatedProductList,Array.isArray(a)&&0<a.length&&(s.append(HZ.lb.RenderUtils.renderSectionHeader(h)),o=[],a.forEach(function(t,e){t=HZ.data.Spaces.get(t.id);n.push(t.id),o.push(this.getThumbReplacementMap(t,e))}.bind(this)),s.append(HZ.lb.RenderUtils.renderThumbGrid(1,o,"mp-ad-thumb mp-ad-thumb--related",l,"lb_mp_ad_rel_products")))),e.hasOwnProperty("impTrkLink")&&HZ.lb.Utils.registerTrackingUrl(e.impTrkLink,t.id))},this.getThumbReplacementMap=function(t,e,a){var o,i=t.id,s=HZ.data.ProductsInfo.get(i),r={};return s&&s.mp&&(o=a&&a.hasOwnProperty("ptlink")?a.ptlink:HZ.utils.Links.getSpaceLink(i),a=s.av,s=t.t,r={POS_ID:e,OBJ_ID:i,THUMB_WIDTH:120,THUMB_HEIGHT:120,IMG_SRC:HZ.utils.Links.getSpaceImageUrl(i,120,120,!1),SPACE_LINK:o,SPACE_TITLE:s,BUTTON:a?HZ.utils.Html.template('<a compid="lb_mp_ad_buy" class="btn btn-primary med"><i class="cart-icon icon icon-font icon-shopping_cart mrs"></i> <span class="btn-label">%BUTTON_LABEL%</span></span></a>',{BUTTON_LABEL:d}):HZ.utils.Html.template('<a class="btn btn-secondary" disabled><i class="cart-icon icon-font icon-shopping_cart mrs"></i> <span class="btn-label">%BUTTON_LABEL%</span></span></a>',{BUTTON_LABEL:c}),SPACE_DESC:t}),r},this.handleThumbClick=function(t){var e=$(t.currentTarget),a=e.is(".mp-ad-thumb--related"),t=e.data("space-desc").id,e=a?n:r,a={};a[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=t;e=new HZ.lb.Context("marketPlaceAds_"+t,HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS,a,e,e.length,e.indexOf(t),-1);e.setCurrentSpaceId(t),i.pushContext(e),i.refresh()}},HZ.lb.plugins.SponsoredProLists=function(){var o,i,s,r,e=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){o=t,i=$('<section id="lbSponsoredProListAd" scopeid="lb_sponsored_pro_list_ad" compid="lb_sponsored_pro_list_ad" class="lbInfoBox separator trackMe"></section>'),o.addInfoBoxToContentGroup(i.get(0),"sponsoredProListAd",e),r=$('<div id="lbSponsoredProListImageOverlay"></div>'),o.addLbImageLayer(r)},this.imageDataUpdated=function(){},this.imageChanged=function(){var t=o.getCurrentSpace().id;i.empty(),r.empty();var e,a=HZ.data.ProListAds.get(t);a&&(s=$('<div id="proListContent"></div>').appendTo(i),e=new HZ.proPlus.contactMultiplePros,t={container:s,bannerContainer:r,isSingleVariant:HZ.lb.Config.proListSingleAd,props:{onContactFormFocus:this.onContactFormFocus.bind(this),onContactFormBlur:this.onContactFormBlur.bind(this)}},$.extend(!0,t,a),e.init(t),i.append(t.aTrackingPixel),i.append(t.pTrackingPixel),o.setSpaceActionsDisabled(!0),o.disableSpaceActions())},this.onContactFormFocus=function(t){o.detachKeyboardHandler()},this.onContactFormBlur=function(t){o.attachKeyboardHandler()}};

window.hzmr.push("lightbox2.2AdPlugins:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightbox2.2AdPlugins.js  **************/
/************* Start lightbox2.2Plugins.js for locale en-US **************/
try {HZ.lb.Templates={SECTION_HEADER:'<header class="section-header"><h2 class="text-m text-bold">%TITLE%</h2></header>',THUMB_GRID:'<ul class="clearfix thumb-grid %GRID_CLASS%" %COMP_ID_ATTR%></ul>',SIMPLE_THUMB:'<li s="%SPACE_ID%" objId="%SPACE_ID%" i="%INDEX%" class="thumb %CSS_CLASS%"><a href="%CLICK_URL%" target="_blank"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div></a></li>',PRODUCT_THUMB:'<li s="%SPACE_ID%" objId="%SPACE_ID%" i="%INDEX%" class="thumb %CSS_CLASS%" title="%TITLE_ATTR%"><a href="%CLICK_URL%" target="_blank" class="lb-mpp-thumb"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div><div class="thumb-overlay"><div class="thumb-overlay-text">%OVERLAY_TEXT%<span class="more-icon"></span></div></div></a>%THUMB_META%</li>',PRODUCT_THUMB_CARD:'<li s="%SPACE_ID%" objId="%SPACE_ID%" i="%INDEX%" class="thumb thumb-card %CSS_CLASS%"><div class="product-related-image"><a href="%CLICK_URL%" target="_blank" class="lb-mpp-thumb"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div></a>%THUMB_META%</div>%THUMB_HOVER_META%</li>',PPC_THUMB:'<li s="%SPACE_ID%" class="thumb %CSS_CLASS%" ><a id="ppc%SPACE_ID%" objid="%SPACE_ID%" href="%CLICK_URL%" class="lb-ppc-thumb" target="_blank" rel="nofollw"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" i="%INDEX%" s="%SPACE_ID%" src="%IMG_SRC%" width="%WIDTH%" height="%HEIGHT%"/></div><div class="thumb-overlay"><div class="thumb-overlay-text">%OVERLAY_TEXT%<span class="more-icon"></span></div></div></a><div class="lb-ppc-info text-bold">%PPC_INFO%</div></li>',THUMB_META_TEMPLATE:'<div class="space-meta"><div class="space-price">%PRICE%</div></div>',THUMB_META_T_TEMPLATE:'<div class="space-meta"><div class="space-title">%STITLE%</div><div class="space-price">%PRICE%</div></div>',THUMB_HOVER_META_TEMPLATE:'<div class="thumb-product-detail"><div class="thumb-product-image"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%HOVER_IMG_SRC%" width="%HOVER_WIDTH%" height="%HOVER_HEIGHT%"/></div></div><div class="product-tag-type"><i class="hzi-font hzi-Search text-m"></i> '+_hgt("Visual Match")+'</div><div class="product-title one-line">%PRODUCT_TITLE%</div>%PRICE_LABEL%<button class="btn btn-primary btn-block med js-buy trackMe"><span class="text-m">'+_hgt("View Product")+"</span></button></div>",THUMB_HOVER_META_TEMPLATE_NEW:'<div class="thumb-product-detail"><div class="product-tag-type">'+_hgt("Visually Similar")+'</div><div class="thumb-product-image"><div class="img-responsive-wrapper img-responsive-square"><img class="img-responsive" src="%HOVER_IMG_SRC%" width="%HOVER_WIDTH%" height="%HOVER_HEIGHT%"/></div></div><div class="product-title one-line">%PRODUCT_TITLE%</div>%PRICE_LABEL%<button class="btn btn-primary btn-block med js-buy trackMe"><span class="text-m">'+_hgt("View Product")+"</span></button></div>",PRODUCT_PRICE_LABEL:'<div class="product-price"><span>%PRICE%</span><i class="hzi-font hzi-Tag text-s"></i></div>',PRODUCT_BADGE:'<span class="badge-text %CSS_CLASS% text-xs text-bold">%BADGE_TEXT%</span>',SPACE_FACET:'<li><a href="javascript:;" class="%CSS_CLASS%">%FACET_TEXT%</a></li>',PRODUCT_SALE_PROMO:'<p><span class="%SALE_BADGE_CLASS%">%SALE_BADGE_LABEL%</span><span class="header-5 sale-title">%SALE_LABEL%</span><span class="text-m">%SALE_SELLER%</span></p>',PRODUCT_PRICE:'<span class="product-price">%FINAL_PRICE%</span>&nbsp;<del class="text-m">%STRIKE_TROUGH_PRICE%</del>',SHIPPING_SELLER_INFO:'<span class="shipping-info">%FLAT_SHIPPING%%SHIPPING_COST%<a class="colorLink shipping-info-link" href="javascript:;">%SHIPPING_LINK_TEXT%<span class="more-icon"></span></a></span><div id="leadTimeText"></div>',BLANK_LINK:'<a target="_blank" href="%LINK_URL%" title="%TITLE_ATTR%">%LINK_TEXT%</a>',IMAGE_OVERLAY_TEMPLATE:'<div class="image-overlay trackMe %CSS_CLASS%" compid="%COMP_ID%"><div class="shape"></div><div class="cta header-2">%CTA%</div></div>',IDEABOOK_SPACE_COMMENT:'<div class="space-comment clearfix"><div class="col-xs-12"><div class="col-xs-1">%AUTHOR_AVATAR%</div><div class="col-xs-11"><p class="%QUOTE_CLASS% mb0">%COMMENT%</p></div></div></div>',FEATURED_SALES_THUMB:'<div class="similarGallery" objid="%SPACE_ID%"><div class="thumb"><a href="%CLICK_URL%" target="_blank" compid="img" style="display: block;"><img class="thumb" width="%WIDTH%" height="%HEIGHT%" src="%IMG_SRC%" />%SALE_PERCENT_OFF_HTML%</a></div><div class="context"><a href="%CLICK_URL%" target="_blank" compid="title" class="similarGalleryTitle header-6 top">%TITLE%</a><p class="space-description">%SUB_TITLE%</p><a href="%CLICK_URL%" target="_blank" compid="seeProducts" class="similarGalleryTitle colorLink header-6 top">See Products&nbsp;<span class="more-icon"></span></a></div></div>',PRO_REVIEW_TEMPLATE:'<div class="pro-rating"><div class="review-rate">%REVIEW_RATING% <span class="review-count" itemprop="ratingCount">%NUM_OF_REVIEWS%</span></div></div>',FORM_FIELD_ERROR_TEMPLATE:'<div class="form-field-error"><span class="outer-tip"></span><span class="inner-tip"></span><span class="message">%MESSAGE%</span></div>'},HZ.lb.RenderUtils={renderSectionHeader:function(t){return $(HZ.utils.Html.template(HZ.lb.Templates.SECTION_HEADER,{TITLE:t}))},renderThumbGrid:function(t,e,i,n,o){var a="",t=["grid-"+t];o&&(a='compid="'+o+'"',t.push("trackMe"));var s,l=$(HZ.utils.Html.template(HZ.lb.Templates.THUMB_GRID,{GRID_CLASS:t.join(" "),COMP_ID_ATTR:a}));return Array.isArray(e)&&(s=i||"",e.forEach(function(t,e){t.hasOwnProperty("CSS_CLASS")?t.CSS_CLASS+=s:t.CSS_CLASS=s;e=$(HZ.utils.Html.template(n,t)).attr("posid",e);t.hasOwnProperty("SPACE_DESC")&&e.data("space-desc",t.SPACE_DESC),l.append(e)})),l},renderIdeabookSpaceComment:function(t,e){if(t&&e){var i=$("<div>").append(t.b).html(),n=HZ.ui.render.User.getUserImageHtml(e.au),e=e.featured?"":"text-quoted";return t.b?$(HZ.utils.Html.template(HZ.lb.Templates.IDEABOOK_SPACE_COMMENT,{AUTHOR_AVATAR:n,COMMENT:UIHelper.convertLinksInString(i),QUOTE_CLASS:e})):$}},renderBrowseCategoryLink:function(t){var e=HZ.data.Categories.getCategoryById(t.cat),i=t.brlnk;if(e&&i&&i.cat){e=t.tname||e.name,e=HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:i.cat,TITLE_ATTR:_hgt("Browse this Category"),LINK_TEXT:e});return $(e).addClass("text-primary")}return""},renderBrowseStyleLink:function(t){var e=HZ.utils.Styles.getStyleName(t.s),t=t.brlnk;if(e&&t&&t.s){e=HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:t.s,TITLE_ATTR:_hgt("Browse this Style"),LINK_TEXT:e});return $(e).addClass("text-primary")}return""},renderBrowseLocationLink:function(t){var e=t.brlnk;if(e&&e.ma){var i=t.ma,i=HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:e.ma,TITLE_ATTR:_hgt("Browse this Location"),LINK_TEXT:i});return $(i).addClass("text-primary")}return t.loc},renderProReview:function(t){var e="";return e=$.isNumeric(t.r)&&$.isNumeric(t.nr)?HZ.utils.Html.template(HZ.lb.Templates.PRO_REVIEW_TEMPLATE,{REVIEW_RATING:HZ.ui.render.Rate.getRateStars(t.r),NUM_OF_REVIEWS:_hgtp("","1 Review","{reviewsCount} Reviews",t.nr,{reviewsCount:t.nr})}):e}},HZ.lb.plugins.ContentTabs=function(){var r,n,a,e,i,t,d,o,c;this.setOwner=function(t){a=(r=t).getContentTabsNode(),n=r.getInfoElement(),e=HZ.lb.Config.spaceContentGroupIds,i=HZ.lb.Config.productContentGroupIds},this.lightboxLoaded=function(){this.contentGroupsChanged()},this.contentGroupsChanged=function(){var n=a.empty();n.on("click.lightbox",".content-group-tab:not(.current):not(.disabled)",this.handleTabClick.bind(this)),[{type:"space",tabs:e,compId:"space_tabs"},{type:"product",tabs:i,compId:"product_tabs"}].forEach(function(t){var e=t.type,i=t.tabs,t=t.compId;o=$("<ul class='list-unstyled content-group-tabs trackMe'></ul>").attr("compid",t).addClass(e).appendTo(n).disableSelection(),i.forEach(function(t){var t=r.getContentGroupById(t),e=t.iconClass;switch(t.iconClass){case"hzi-Houzz-Photo":e="icon-photos";break;case"hzi-Tag":e="icon-shopping_tag";break;case"hzi-Comments-Advice":e="icon-sb_question";break;case"hzi-paint-dropper":e="icon-eye_drop";break;case"hzi-info-icon-solid":e="icon-circle_i"}t={GROUP_ID:t.id,ICON_CLASS:e,OBJ_ID:t.id+"_tab"},t=$(HZ.utils.Html.template('<li data-group-id="%GROUP_ID%" class="content-group-tab %GROUP_ID%" objid="%OBJ_ID%"><i class="icon icon-font %ICON_CLASS%"></i></li>',t));o.append(t)})}),this.activateCurrentTab()},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t=r.getCurrentSpace().id,e=HZ.data.ColorPickerAd.get(t),i=!!e,n=!!HZ.data.PhotoAds.get(t),o=!!HZ.data.ProductAds.get(t),t=a.find(".content-group-tab."+HZ.lb.Config.contentGroupIds.COLOR_PICKER);t.toggleClass("hidden",!i||n||o),i&&t.attr("posid",HZ.lb.Utils.ColorPicker.getCampaignId(e)),this.activateCurrentTab()},this.pluginAfterShown=function(){clearTimeout(t),t=setTimeout(this.disableEmptyTabs.bind(this),5)},this.lightboxScroll=function(){var n=r.getContentBox().h/4,t=this.getCurrentTabIds().slice(0).reverse(),o=r.getContentGroupPositions(),a=t.length-1,s=0,l=r.getContentScrollTop();0<l&&t.forEach(function(t,e){var i;o[t]&&(i=o[t].top-l,t=o[t].bottom-l,(0<i&&i<n||i<0&&n<t)&&(s=Math.max(a-e,s)))}),c||r.registerTimeout("currentGroupIndexDebounce",function(){s=$.isNumeric(d)?d:s,r.setCurrentContentGroupIndex(s),d=null}.bind(this),20)},this.currentContentGroupChanged=function(){this.activateCurrentTab()},this.activateCurrentTab=function(){var t=r.getCurrentContentGroupIndex();this.getCurrentTabsNode().find(".content-group-tab").removeClass("current").eq(t).addClass("current")},this.disableEmptyTabs=function(){var t=this.getCurrentTabIds(),i=this.getCurrentTabsNode().find(".content-group-tab").removeClass("disabled"),n=this.hasVisibleContent;t.forEach(function(t,e){t=r.getNodeByContentGroupId(t);t.removeClass("no-content"),n(t)||($(i.get(e)).addClass("disabled"),t.addClass("no-content"))})},this.handleTabClick=function(t){var e=$(t.currentTarget).data("group-id");e==HZ.lb.Config.contentGroupIds.COLOR_PICKER&&r.enterColorPickerMode();t=this.getCurrentTabIds();d=t.indexOf(e),r.setCurrentContentGroupIndex(d),this.focusCurrentContentGroup()},this.focusCurrentContentGroup=function(){n.find(".lbInfoBox").removeClass("scrolling scrolled");var t,e=r.getCurrentContentGroupIndex(),i=this.getContentGroupId(e),e=r.getContentGroupPositions()[i];e&&(t=r.getNodeByContentGroupId(i).find(".lbInfoBox").addClass("scrolling"),c=!0,r.animateScrollTo(e.top,function(){c=!1,t.removeClass("scrolling").addClass("scrolled")}.bind(this)))},this.getContentGroupId=function(t){return this.getCurrentTabIds()[t]},this.getCurrentTabIds=function(){return r.getLbType()==r.SPACE_TYPE?e:i},this.getCurrentTabsNode=function(){var t=r.getLbType();return a.find("."+t)},this.hasVisibleContent=function(t){var t=t.children(),i=!1;return t.each(function(){var t=$(this),e=t.hasClass("hidden");if(!t.is(":empty")&&!e)return!(i=!0);i=!1}),i}},HZ.lb.plugins.SpaceAuthorInfo=function(){var s,l,r,e=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){s=t,r=$('<section class="space-owner"></section>'),s.addInfoBoxToContentGroup(r.get(0),"spaceAuthorInfo",e)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t,e,i,n,o,a;r.empty(),s.isProListAd()||(a=(l=s.getCurrentSpace()).ow,(t=HZ.data.Users.get(a))&&(e=$('<div compid="photoOwner" class="row"></div>'),o=(n=HZ.data.HouzzClkTracking.get(l.id))&&n[a]?n[a]:null,i=HZ.ui.render.User.getUserImageHtml(a,!0,o,1),n=HZ.ui.render.User.getUserHtml(a,!0,o),o=a="",!!parseInt(t.nr,10)?a=HZ.lb.RenderUtils.renderProReview(t):o=HZ.ui.render.User.getProfessionalLocationHtml(t),a={AVATAR:$("<div>").append($(i).addClass("trackMe")).html(),AUTHOR:$("<div>").append($(n).addClass("trackMe")).html(),LOCATION:o,PRO_REVIEWS:a},e.append($(HZ.utils.Html.template('<div class="col-xs-11"><div class="author-avatar">%AVATAR%</div><div class="author-details">%AUTHOR% %PRO_REVIEWS%%LOCATION%</div></div>',a)))),e&&r.append(e))}},HZ.lb.plugins.SpaceInfo=function(){var c,u,e=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){c=t,u=$('<section class="lbInfoBox space-info trackMe" compid="lb_space_info"></section>'),c.addInfoBoxToContentGroup(u.get(0),"spaceInfo",e)},this.imageChanged=function(){var t,e,i,n,o,a,s,l,r,d;u.empty(),c.isProduct()||c.isFullPageAd()||c.isSpotlightContext()||(t=c.getCurrentSpace(),a=(r=c.getContext()).getType(),o=r.getDescriptor(),e=e?e.empty():$('<ul class="space-facets"></ul>'),i={tag:"a",attr:{href:HZ.utils.Links.getSpaceLink(t.id),target:"_blank",class:"hz-space"}},n=HZ.data.Galleries.get(o[HZ.lb.Config.DESCRIPTOR_FIELD_GALLERY_ID]),l=HZ.data.Projects.get(t.pid),o=n&&a==HZ.lb.Config.CONTEXT_TYPE_IDEABOOK,a=l&&a==HZ.lb.Config.CONTEXT_TYPE_PROJECT,u.toggleClass("space-info--project",a),l=t.t||(a?l.t:o?n.t:""),a&&(s=r.getCursorPosition(),l+=_hgt(" ({currentPhoto} of {totalPhotos})",{currentPhoto:s.cursor+1,totalPhotos:s.spacesCount})),r=null,r=!c.isProduct()&&HZ.lb.Config.isViewPhotoH1SubtitleEnabled&&t.hasOwnProperty("stt")?!!(s=HZ.houseUtils.Permissions).hasPermission(t,s.CAN_EDIT_HOUSE)?_hgt("<t1><t2>{spaceTitle}</t2><t3>{spaceSubtitle}</t3></t1>",{t1:o?{}:i,t2:{tag:"span",attr:{class:"space-title--line"}},t3:{tag:"span",attr:{class:"space-title--line space-title--subtitle"}},spaceTitle:l,spaceSubtitle:t.stt}):_hgt("<t1>{spaceTitle}</t1><t2>{spaceSubtitle}</t2>",{t1:{tag:"span",attr:{class:"space-title--line"}},t2:{tag:"span",attr:{class:"space-title--line space-title--subtitle"}},spaceTitle:l,spaceSubtitle:t.stt}):_hgt("<t1>{spaceTitle}</t1>",{t1:o?{}:i,spaceTitle:l}),l=HZ.utils.Html.template('<header>\t\t\t\t\t\t\t<h2 class="header-5 mbs">%TITLE%</h2>\t\t\t\t\t\t</header>',{TITLE:r}),u.append(l),r=[],(l=HZ.lb.RenderUtils.renderBrowseStyleLink(t))&&r.push(l),(l=HZ.lb.RenderUtils.renderBrowseLocationLink(t))&&r.push(l),t.l&&t.tl&&(l=_hgt("Website"),l=HZ.utils.Html.template('<a class="pro-ext-link text-primary" target="blank" href="%WEBSITE_URL%">%LINK_TEXT%<span class="more-icon"></span></a>',{WEBSITE_URL:t.tl,LINK_TEXT:l}),r.push(l)),r.length&&(d=e,$.each(r,function(t,e){e=$("<li>").append(e);d.append(e)}),u.append(d)),(r=c.getSpaceDescription())&&(r=$("<div>").append(UIHelper.convertLinksInString(r)).html(),r=$("<p class='space-description'></p>").append(r),u.append(r),r.peekable()),o&&u.append(HZ.lb.RenderUtils.renderIdeabookSpaceComment(t,n)))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.SpaceActions=new function(){var o,i,n;this.setOwner=function(t){o=t,(n=$(HZ.utils.Html.template('<button class="btn med tint download-file" title="%TITLE_ATTR%" compId="download_file"><i class="icon hzi-font hzi-Download-Lightbox"></i> %LABEL%</button>',{TITLE_ATTR:_hgt("Download this file"),LABEL:_hgt("Download")}))).click(this.handleDownload.bind(this));t=n.get(0);o.addActionItem(t,HZ.lb.ActionBar.ACTION_BAR_LEFT),function(){var t=_hgt("Email{contextEmailVerb}",{contextEmailVerb:""}),t=$(HZ.utils.Html.template('<button class="btn med tint email" title="%TITLE_ATTR%" compId="sendEmail"><i class="icon icon-font icon-paper_plane"></i> %LABEL%</button>',{TITLE_ATTR:t,LABEL:t}));t.click(this.handleEmail.bind(this));t=t.get(0);o.addActionItem(t,HZ.lb.ActionBar.ACTION_BAR_CENTER)}.call(this),function(){(i=$(HZ.utils.Html.template('<button class="btn btn-primary med save" title="%TITLE_ATTR%"  compId="Save"><i class="icon icon-font icon-heart"></i>%LABEL%</button>',{TITLE_ATTR:_hgt("Save To Ideabook"),LABEL:_hgt("Save")}))).click(this.handleAddToIdeabook.bind(this)),i.find(".buzz-count");var t=i.get(0);o.addActionItem(t,HZ.lb.ActionBar.ACTION_BAR_CENTER)}.call(this)},this.imageChanged=function(){setTimeout(o.hideSpaceActions.bind(o),2500);var t=o.getCurrentSpace(),e=t&&t.ift;n.toggleClass("hidden",!e);var e=o.isSketch();e||o.isProduct();i.toggleClass("hidden",e),HZ.lb.Config.sketchForWebEnabled&&e&&((e=HZ.data.CurrentSessionUser)&&e.getUserId(),e&&e.isIdeabookCollaborator,(e=HZ.houseUtils.Permissions).hasPermission(t,e.CAN_EDIT_HOUSE)||t.au)},this.handleAddToIdeabook=function(){var t=o.getCurrentSpace();o.isSignupMode()?o.invokeSignupAndThenActionDialog(t,HZ.lb.Config.SOURCE_TRACKING_LB_ADDTOIBK,t.prod?HZ.lb.Config.SIGNUP_MSG_ADD_TO_IDEABOOK:HZ.lb.Config.SIGNUP_MSG_ADD_TO_IDEABOOK_PHOTO,"ideabook"):(t=t.id,HZ.spaceActions.isUniversalGalleryEnabled||HZ.ctx&&HZ.ctx.config&&HZ.ctx.config.GALLERY_ITEMS_ENABLED?HZ.spaceActions.showAddToIdeabookDialog(t):(HZ.spaceActions.AddToIdeabookDialog.init(t),o.showDialog(HZ.spaceActions.AddToIdeabookDialog)))},this.handleEmail=function(){var t=o.getCurrentSpace();o.isSignupMode()&&HZ.lb.Config.emailShareAfterSignup?o.invokeSignupAndThenActionDialog(t,HZ.lb.Config.SOURCE_LINK_SPACEACTIONS_EMAIL,HZ.lb.Config.SIGNUP_MSG_SPACE_ACTIONS_EMAIL,"email"):(HZ.dialogs.EmailDialog.prepare({type:HZ.sendEmail.types.SPACE,referenceId:t.id,subject:t.t,message:t.prod?HZ.sendEmail.texts.DEFAULT_MESSAGE_PRODUCT:HZ.sendEmail.texts.DEFAULT_MESSAGE_SPACE,staticMessageData:!(!t.prod||!HZ.lb.Config.tradeUser)&&HZ.lb.Config.tradeUser,signupOnSend:!HZ.lb.Config.emailShareAfterSignup}),HZ.dialogs.EmailDialog.setVerticallyCentered(!0),o.showDialog(HZ.dialogs.EmailDialog))},this.handleNewSketch=function(){var t=o.getCurrentSpace(),e=HZ.utils.Config.sketchUrl+"?canvasId="+t.id,t=JSON.stringify({houseId:t.id,redirectUrl:e,buttonType:"newSketch"});o.isSignupMode()?HZ.ajaz.Services.setVisitorProperty("postSignupHouseId",t,function(t){o.showLoginDialog(HZ.lb.Config.SIGNUP_TRACKING_OTHER,HZ.lb.Config.MESSAGE_ID_DEFAULT,null)}):window.open(e)},this.handleEditSketch=function(){var t=o.getCurrentSpace();window.open(HZ.utils.Config.sketchUrl+"/"+t.id)},this.handleEmbed=function(){var t=o.getCurrentSpace();HZ.spaceActions.EmbedDialog.setSpaceId(t.id),o.showDialog(HZ.spaceActions.EmbedDialog)},this.handleEdit=function(){var t=o.getCurrentSpace();if(t)if(o.lightboxEditorEnabled){var e=HZ.houseUtils.Permissions;if(!e.hasPermission(t,e.CAN_EDIT_HOUSE))return!1;0==HZ.lb.Utils.lightboxEditorLoaded?HZ.lb.Utils.loadLightboxEditor(!0,!1):(o.setEditMode(!0),o.refresh(!1),o.handleResize())}else{t=HZ.utils.Links.getEditSpaceLink(t.id);window.open(t)}},this.handleImageTag=function(){var t=o.getCurrentSpace();if(t)if(o.lightboxEditorEnabled){var e=HZ.houseUtils.Permissions;if(!e.hasPermission(t,e.CAN_EDIT_HOUSE))return!1;0==HZ.lb.Utils.lightboxEditorLoaded?HZ.lb.Utils.loadLightboxEditor(!0,!0):(o.setEditTagMode(!0),o.refresh(!1),o.handleResize())}else{t=HZ.utils.Links.getEditSpaceLink(t.id);window.open(t)}},this.handlePrint=function(){var t,e;o.isSignupMode()?o.showLoginDialog():(t=o.getCurrentSpace(),e=UIHelper.isMSIE,HZ.utils.Print.printSpace(t.id,e))},this.handleDownload=function(){var t=o.getCurrentSpace();t&&t.ift&&HZ.ajaz.Services.getDownloadUrl(t.id,function(t){window.location.href=t.dl})},this.handleAddToCart=function(){var t=o.getCurrentSpace(),e=HZ.data.ListingsInfo.get(o.getSelectedListingId()).lid,i=$("#qtySelector").val()||1;HZ.cart.Actions.addItem(t.id,e,i)},this.handleAddSampleToCart=function(t){var e=$(t.currentTarget),t=o.getCurrentSpace(),e=e.data("vlid");e&&HZ.cart.Actions.addItem(t.id,e,1)},this.handleVisitStoreClicked=function(){var t=o.getCurrentSpace(),e=t.tl,i=HZ.utils.Links.getSpaceLink(t.id),n=HZ.data.PPCAds.get(t.id),t=HZ.lb.Config.SIGNUP_TRACKING_LB_VISIT_STORE;n&&n.isPPCProduct&&n.ppcProductUrl?(e=n.ppcProductUrl,window.open(e)):e&&(o.isSignupMode()?HZ.auth.Manager.signup(t,HZ.lb.Config.SIGNUP_MSG_PRODUCT_INFO,i,null,{rvent:HZ.lb.Config.SIGNUP_TRACKING_VISIT_STORE_CLICKS}):window.open(e))}},HZ.lb.plugins.ProjectInfo=function(){var g,m,C,b,f,e=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){g=t,m=$('<section compid="lbProjectPhotos" class="lbInfoBox photosInProject separator"></section>'),g.addInfoBoxToContentGroup(m.get(0),"projectInfo",e),m.on("click",".project-thumb",this.handleProjectThumbClick.bind(this)),m.on("click",".btn-expand",this.handleExpandClick.bind(this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){f!=g.getCurrentSpaceProject()&&(f=g.getCurrentSpaceProject(),b=!1);var a,s,l,t,e,i,n,r,o,d=g.getCurrentSpace(),c=f?f.count:0,u=c?c-1:0,p=!(g.isRecommendationsContext()||g.isFullPageAd()||g.isEditMode()||g.isSpotlightContext()),h=g.isProjectContext();m.empty(),p&&f&&f.sids&&f.sids.length&&(n=HZ.lb.Utils.calculateThumbWidth(g.getContentBox().w-32,5,8),s=a=n,t=f.sids,e=!(l=[]),i=0,h?(o=t.slice(0,b?t.length:25),i=f.count-25,e=!b&&0<i):(p={tag:"a",attr:{href:f.link,class:"text-primary",target:"_blank"}},n=f.t==d.t?_hgt("This Project{contextLightboxProject}",{contextLightboxProject:""}):f.t,c=_hgtp("<t1>{projectTitle}</t1>","Other Photo in <t1>{projectTitle}</t1>","Other Photos in <t1>{projectTitle}</t1>",u,{t1:p,projectTitle:n,photoCount:c-1}),o=(o=t.filter(function(t){return t!=d.id})).slice(0,5),c=$(HZ.lb.RenderUtils.renderSectionHeader(c)).removeClass("section-header").addClass("mbm"),m.append(c)),r=-1,o.forEach(function(t,e){var i,n,o=HZ.data.Spaces.get(t);o&&(i=HZ.utils.Links.getSpaceImageUrl(t,a,s,o.bg),n=HZ.utils.Links.getSpaceLink(t),h&&t==d.id&&(r=e),l.push({SPACE_ID:t,SPACE_DESC:o,INDEX:"",IMG_SRC:i,WIDTH:a,HEIGHT:s,CLICK_URL:n}))}),o=$(HZ.lb.RenderUtils.renderThumbGrid(5,l,"project-thumb",HZ.lb.Templates.SIMPLE_THUMB,"lb_project_spaces")),m.append(o),e&&(C=$(HZ.utils.Html.template('<button class="btn btn-block btn-expand mtl mbs text-m">%LABEL%<span class="more-icon"></span></button>',{LABEL:_hgtp("","Show 1 More Photo","Show {remainingPhotoCount} More Photos",i,{remainingPhotoCount:i})})),m.append(C)),0<=r&&o.children().eq(r).addClass("project-thumb--current"))},this.handleProjectThumbClick=function(t){var e,i,n,o;t.ctrlKey||t.metaKey||(t.preventDefault(),e=$(t.currentTarget).data("space-desc").id,i=f.pid,o=f.sids,n=Math.max(o.indexOf(e),0),g.isProjectContext()?g.getContext().setCurrentSpaceId(e):((t={})[HZ.lb.Config.DESCRIPTOR_FIELD_PROJECT_ID]=i,t[HZ.lb.Config.DESCRIPTOR_FIELD_CATEGORY]=g.getCurrentSpace().cat,(o=new HZ.lb.Context("project_"+i,HZ.lb.Config.CONTEXT_TYPE_PROJECT,t,o,f.count,n+1,o.length)).setCurrentSpaceId(e),g.pushContext(o)),g.refresh())},this.handleExpandClick=function(t){b=!0,C.addClass("hidden"),this.imageChanged()}},HZ.lb.plugins.ProductsInRoom=function(){var h,g,e,m,i=HZ.lb.Config.contentGroupIds.INFO,C=_hgt("Photos with this (or similar) product:");this.setOwner=function(t){h=t,g=$('<section compId="lbProductsInRoom" class="trackMe lbInfoBox productsInRoom separator"></section>'),e=g.get(0),h.addInfoBoxToContentGroup(e,"productsInRoom",i),$(e).click(this.handleProductsInRoomDivClicked)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){var t=h.getCurrentSpace(),e=h.isRecommendationsContext()||h.isFullPageAd()||h.isSpotlightContext();if(m=HZ.data.ProductsInRoom.get(t.id),g.empty(),h.isProduct()&&!e){var e=h.getContextStack(),i=null;2<=e.length&&(i=e[1].getCurrentSpaceId());var n=0;if(m&&1<m.count){for(var o,a,s,e=HZ.lb.Utils.calculateThumbWidth(h.getContentBox().w-32,5,8),l=e,r=e,d=[],c=m.sids,u=c.length,p=0;p<u;p++)n<5&&((o=c[p])!=i&&(a=HZ.utils.Links.getSpaceImageUrl(o,l,r),s=HZ.utils.Links.getSpaceLink(o),d.push({SPACE_ID:o,INDEX:n,IMG_SRC:a,WIDTH:l,HEIGHT:r,CLICK_URL:s}),n++));n&&(g.append(HZ.lb.RenderUtils.renderSectionHeader(C)),g.append(HZ.lb.RenderUtils.renderThumbGrid(5,d,"products-in-room",HZ.lb.Templates.SIMPLE_THUMB)))}}},this.handleProductsInRoomDivClicked=function(t){var e,i,n;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),e=h.getCurrentSpace(),(n=!(n=$(t.target)).attr("s")?n.closest("li"):n).attr("s")&&1<m.count&&(i=parseInt(n.attr("s")),t=parseInt(n.attr("i")),(n={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=e.id,(t=new HZ.lb.Context("productsInRoom_"+e.id,HZ.lb.Config.CONTEXT_TYPE_PRODUCTS_IN_ROOM,n,m.sids,m.count,t+1,-1)).setCurrentSpaceId(i),h.pushContext(t),h.refresh()))}},HZ.lb.plugins.ProductRelatedProducts=function(){var e,i,n,o=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox product-rel-prod separator trackMe" compId="lbProductRelatedProducts"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"productRelatedProducts",o),i.click(HZ.lb.plugins.PhotoRelatedProducts.handleClick)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty(),e.isMarketplaceProduct()&&!(e.isRecommendationsContext()||e.isFullPageAd()||e.isSpotlightContext())&&(HZ.lb.plugins.PhotoRelatedProducts.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRelatedProducts.canRender()&&i.append(HZ.lb.plugins.PhotoRelatedProducts.generateContent(4,16,!0))}},HZ.lb.plugins.PPCProductRelatedProducts=function(){var e,i,n,o=HZ.lb.Config.contentGroupIds.PRODUCTS;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox product-rel-prod separator trackMe" compId="lbProductRelatedProducts"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"productRelatedProducts",o),i.click(HZ.lb.plugins.PhotoRelatedProducts.handleClick)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty(),e.getCurrentSpace().fullyLoaded&&e.isProduct()&&!e.isMarketplaceProduct()&&!(e.isRecommendationsContext()||e.isFullPageAd()||e.isSpotlightContext())&&(HZ.lb.plugins.PhotoRelatedProducts.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRelatedProducts.canRender()&&i.append(HZ.lb.plugins.PhotoRelatedProducts.generateContent(4,16,!0))}},HZ.lb.plugins.SpaceRelatedProducts=function(){var e,i,n,o=HZ.lb.Config.isViewSpace?HZ.lb.Config.contentGroupIds.OVERVIEW:HZ.lb.Config.contentGroupIds.PRODUCTS;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox space-rel-prod separator trackMe" compId="lbSpaceRelatedProducts"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"spaceRelatedProducts",o),i.click(HZ.lb.plugins.PhotoRelatedProducts.handleClick)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=!(e.isRecommendationsContext()||e.isFullPageAd()||e.isColorPickerSavedPalette()||e.isProductAd()||e.isSpotlightContext());!e.isProduct()&&t&&(HZ.lb.plugins.PhotoRelatedProducts.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRelatedProducts.canRender()&&i.append(HZ.lb.plugins.PhotoRelatedProducts.generateContent(4,8,!0))}},HZ.lb.plugins.PhotoRelatedProducts=new function(){var f,n,H,T=!1;this.setOwner=function(t){f=t},this.setPhotoData=function(){n=f.getCurrentSpace(),H=HZ.data.PhotoRelatedProducts.get(n.id),T=!1},this.isDataLoaded=function(){return H&&1<H.count},this.canRender=function(){return this.isDataLoaded()&&!this.isRendered()},this.isRendered=function(){return T},this.generateContent=function(t,e,i,n){var o=$("<div></div>");if(n=n||{},this.isDataLoaded()){var a=HZ.lb.Utils.calculateThumbWidth(f.getContentBox().w-32,t,8),s=a,l=a,a=n.headerText||_hgt("Related Products");o.append(HZ.lb.RenderUtils.renderSectionHeader(a));for(var r=[],d=n.spaceIds||H.sids,c=Math.min(d.length,e),u=0;u<c;u++){var p=d[u],h=HZ.data.Spaces.get(p),g=h.stl,m=h.price,C=g?HZ.lb.Templates.THUMB_META_T_TEMPLATE:HZ.lb.Templates.THUMB_META_TEMPLATE,b=HZ.utils.Links.getSpaceImageUrl(p,s,l),h=HZ.utils.Links.getSpaceLink(p),g=i?HZ.utils.Html.template(C,{PRICE:m,STITLE:g}):"";r.push({SPACE_ID:p,INDEX:0,IMG_SRC:b,WIDTH:s,HEIGHT:l,CLICK_URL:h,THUMB_META:g,OVERLAY_TEXT:_hgt("Shop Houzz")})}o.append(HZ.lb.RenderUtils.renderThumbGrid(t,r,"related-product",HZ.lb.Templates.PRODUCT_THUMB)),T=!0}return o.html()},this.handleClick=function(t){var e,i;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),(i=!(i=$(t.target)).attr("s")?i.closest("li"):i).attr("s")&&1<H.count&&(e=parseInt(i.attr("s")),t=parseInt(i.attr("i")),(i={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=n.id,(t=new HZ.lb.Context("photoRelatedProducts_"+n.id,HZ.lb.Config.CONTEXT_TYPE_PHOTO_RELATED_PRODUCTS,i,H.sids,H.count,t+1,-1)).setCurrentSpaceId(e),f.pushContext(t),f.refresh()))}},HZ.lb.plugins.CoBuyProducts=function(){var o,i,e,u,n=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){o=t,i=$('<section class="lbInfoBox cobuy-prod separator trackMe" compId="lbCoBuyProducts"></section>'),e=$(HZ.lb.RenderUtils.renderSectionHeader(_hgt("Frequently Bought Together"))),o.addInfoBoxToContentGroup(i.get(0),"coBuyProducts",n),i.on("click",".thumb",this.handleThumbClick.bind(this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){u={},i.empty();var t=o.isMarketplaceProduct()&&!(o.isRecommendationsContext()||o.isFullPageAd()||o.isSpotlightContext()||o.isColorPickerSavedPalette()||o.isProductAd()),e=HZ.data.CoBuySpaces.get(o.getCurrentSpace().id);e&&e.length&&t&&this.renderContent()},this.renderContent=function(){i.empty().append(e);var t=HZ.lb.Utils.calculateThumbWidth(o.getContentBox().w-32,4,8),r=t,d=t,c=[];this.iterateCoBuySpaces(function(t,e){var i,n,o,a,s,l=HZ.data.Spaces.get(t);l&&(u[t]=e,o=(a=l.stl)?HZ.lb.Templates.THUMB_META_T_TEMPLATE:HZ.lb.Templates.THUMB_META_TEMPLATE,i=HZ.utils.Links.getSpaceImageUrl(t,r,d),n=HZ.utils.Links.getSpaceLink(t),s=$(HZ.utils.Html.template(o,{PRICE:l.price||"&nbsp;",STITLE:a})),o=$(HZ.lb.RenderUtils.renderBrowseCategoryLink(l)).addClass("space-cat-link"),(a=$('<div class="space-cat"></div>')).append(o),s.append(a),s=$("<div></div>").append(s).html(),c.push({SPACE_ID:t,INDEX:e,IMG_SRC:i,WIDTH:r,HEIGHT:d,CLICK_URL:n,THUMB_META:s,OVERLAY_TEXT:_hgt("Shop Houzz"),SPACE_DESC:l}))}),i.append(HZ.lb.RenderUtils.renderThumbGrid(4,c,"related-product related-product-cobuy",HZ.lb.Templates.PRODUCT_THUMB))},this.iterateCoBuySpaces=function(t){HZ.data.CoBuySpaces.get(o.getCurrentSpace().id).slice(0,4).forEach(t)},this.handleThumbClick=function(t){var e,i,n;t.ctrlKey||t.metaKey||$(t.target).is(".space-cat-link")||HZ.lb.Config.isViewSpace||(t.preventDefault(),e=HZ.data.CoBuySpaces.get(o.getCurrentSpace().id),i=$(t.currentTarget).data("space-desc").id,n=u[i],(t={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=i,(n=new HZ.lb.Context("photoRelatedProducts_"+i,HZ.lb.Config.CONTEXT_TYPE_PHOTO_RELATED_PRODUCTS,t,e,e.length,n+1,-1)).setCurrentSpaceId(i),o.pushContext(n),o.refresh())}},HZ.lb.plugins.VisuallySimilarProducts=function(){var o,e,a,i=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){o=t,e=$('<section class="lbInfoBox visually-similar-prod separator trackMe" compId="lbVisuallySimilarProducts"></section>'),o.addInfoBoxToContentGroup(e.get(0),"visuallySimilarProducts",i),e.click(this.handleClick)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){e.empty();var t=o.isMarketplaceProduct()&&!(o.isRecommendationsContext()||o.isFullPageAd()||o.isSpotlightContext()||o.isColorPickerSavedPalette()||o.isProductAd());(a=HZ.data.VisuallySimilarSpaces.get(o.getCurrentSpace().id))&&a.length&&t&&(HZ.lb.plugins.PhotoRelatedProducts.setPhotoData(),this.renderContent(a))},this.renderContent=function(t){HZ.lb.plugins.PhotoRelatedProducts.canRender()&&e.append(HZ.lb.plugins.PhotoRelatedProducts.generateContent(4,4,!0,{headerText:_hgt("Visually Similar Products"),spaceIds:t}))},this.handleClick=function(t){var e,i,n;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),n=$(t.target),e=o.getCurrentSpace(),(n=!n.attr("s")?n.closest("li"):n).attr("s")&&1<a.length&&(i=parseInt(n.attr("s")),t=parseInt(n.attr("i")),(n={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=e.id,(t=new HZ.lb.Context("photoRelatedProducts_"+e.id,HZ.lb.Config.CONTEXT_TYPE_PHOTO_RELATED_PRODUCTS,n,a,a.length,t+1,-1)).setCurrentSpaceId(i),o.pushContext(t),o.refresh()))}},HZ.lb.plugins.RecentlyViewedProducts=function(){var o,i,a,e=HZ.lb.Config.contentGroupIds.DISCUSSION;this.setOwner=function(t){o=t,i=$('<section class="lbInfoBox recently-viewed-prod separator trackMe" compId="lbRecentlyViewedProducts"></section>'),o.addInfoBoxToContentGroup(i.get(0),"recentlyViewedProducts",e),i.click(this.handleClick)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=o.isMarketplaceProduct()&&!(o.isRecommendationsContext()||o.isFullPageAd()||o.isSpotlightContext()||o.isColorPickerSavedPalette()||o.isProductAd());(a=HZ.data.RecentlyViewedSpaces.get(o.getCurrentSpace().id))&&a.length&&t&&(HZ.lb.plugins.PhotoRelatedProducts.setPhotoData(),this.renderContent(a))},this.renderContent=function(t){var e=HZ.lb.Config.recommendForRecentlyViewed?_hgt("Recently Viewed and Recommendations"):_hgt("Recently Viewed");HZ.lb.plugins.PhotoRelatedProducts.canRender()&&i.append(HZ.lb.plugins.PhotoRelatedProducts.generateContent(4,16,!0,{headerText:e,spaceIds:t}))},this.handleClick=function(t){var e,i,n;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),n=$(t.target),e=o.getCurrentSpace(),(n=!n.attr("s")?n.closest("li"):n).attr("s")&&1<a.length&&(i=parseInt(n.attr("s")),t=parseInt(n.attr("i")),(n={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=e.id,(t=new HZ.lb.Context("photoRelatedProducts_"+e.id,HZ.lb.Config.CONTEXT_TYPE_PHOTO_RELATED_PRODUCTS,n,a,a.length,t+1,-1)).setCurrentSpaceId(i),o.pushContext(t),o.refresh()))}},HZ.lb.plugins.ProductCollections=function(){var o,n,a,l,r,d,c="collectionSpaceIds",e=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){o=t,n=$('<section class="lbInfoBox product-collections separator trackMe" compId="lbProductCollections"></section>'),o.addInfoBoxToContentGroup(n.get(0),"productCollections",e),n.on("click",".thumb",this.handleThumbClick.bind(this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){n.empty(),l={},this.renderContent()},this.renderContent=function(){n.empty();var t,s,e=o.getCurrentSpace(),i=HZ.data.ProductCollections.get(e.id);i&&i[c]&&(t=i[c],e=HZ.lb.Utils.calculateThumbWidth(o.getContentBox().w-32,4,8),d=r=e,e={tag:"a",attr:{href:i.viewCollectionUrl,class:"colorLink"}},a=$(HZ.lb.RenderUtils.renderSectionHeader(_hgt("More from the <t1>{collection} Collection</t1> by {curator}",{t1:e,collection:i.collectionName,curator:i.collectionCurator}))),s=[],t.slice(0,8).forEach(function(t,e){var i,n,o,a=HZ.data.Spaces.get(t);a&&(l[t]=e,o=HZ.data.ProductsInfo.get(t),i=HZ.utils.Links.getSpaceImageUrl(t,r,d),n=HZ.utils.Links.getSpaceLink(t),o=a.price||o&&o.p||"&nbsp;",o=$(HZ.utils.Html.template(HZ.lb.Templates.THUMB_META_TEMPLATE,{PRICE:o})),o=$("<div></div>").append(o).html(),s.push({SPACE_ID:t,INDEX:e,IMG_SRC:i,WIDTH:r,HEIGHT:d,CLICK_URL:n,THUMB_META:o,OVERLAY_TEXT:_hgt("Shop Houzz"),SPACE_DESC:a}))}),s&&0<s.length&&(n.append(a),n.append(HZ.lb.RenderUtils.renderThumbGrid(4,s,"production-collections-product",HZ.lb.Templates.PRODUCT_THUMB))))},this.handleThumbClick=function(t){var e,i,n;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),i=o.getCurrentSpace(),(n=HZ.data.ProductCollections.get(i.id))&&(e=n[c],i=$(t.currentTarget).data("space-desc").id,n=l[i],(t={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=i,(n=new HZ.lb.Context("productCollections_"+i,HZ.lb.Config.CONTEXT_TYPE_PRODUCT_COLLECTIONS,t,e,e.length,n+1,-1)).setCurrentSpaceId(i),o.pushContext(n),o.refresh()))}},HZ.lb.plugins.SpaceRecommendations=function(){var e,i,n,o=HZ.lb.Config.contentGroupIds.OVERVIEW,t=HZ.lb.Config.enableCombinedRecommendPhotos?10:5;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox recommendations-spaces separator trackMe" compId="lbSpaceRecommendations"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"recommendationsSpaces",o),i.click(this.handleClick)},this.handleClick=function(t){HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.handleClick.call(HZ.lb.plugins.PhotoRecommendations,t)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=e.isRecommendationsContext()||e.isSpotlightContext()||e.isProjectContext()||e.getContextType()==HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS;e.isProduct()||t||(HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRecommendations.canRender()&&i.append(HZ.lb.plugins.PhotoRecommendations.generateContent(5,t,"photo"))}},HZ.lb.plugins.ProductRecommendations=function(){var e,i,n,o=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox recommendations-products separator trackMe" compId="lbProductRecommendations"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"recommendationsProducts",o),i.click(this.handleClick)},this.handleClick=function(t){HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.handleClick.call(HZ.lb.plugins.PhotoRecommendations,t)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=e.isRecommendationsContext()||e.getContextType()==HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS;e.isProduct()&&!t&&(HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRecommendations.canRender()&&i.append(HZ.lb.plugins.PhotoRecommendations.generateContent(5,5,"product"))}},HZ.lb.plugins.ProductRecommendedProducts=function(){var e,i,n,o=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox product-rel-prod separator trackMe" compId="lbProductRecommendationsProduct"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"productRelatedProducts",o),i.click(this.handleClick)},this.handleClick=function(t){HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.handleClick.call(HZ.lb.plugins.PhotoRecommendations,t)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=e.isRecommendationsContext()||e.isFullPageAd()||e.isSpotlightContext();e.isProduct()&&!t&&(HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.Recommendations),HZ.lb.plugins.PhotoRecommendations.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRecommendations.canRender()&&i.append(HZ.lb.plugins.PhotoRecommendations.generateContent(4,8,"product"))}},HZ.lb.plugins.RelatedPhotos=function(){var e,i,n,o=HZ.lb.Config.showRelSpacesBelowSponsProd?HZ.lb.Config.contentGroupIds.PRODUCTS:HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox similar-spaces separator trackMe" compId="lbSimilarSpaces"></section>'),n=i.get(0),e.addInfoBoxToContentGroup(n,"relatedPhotos",o),$(n).click(this.handleClick)},this.handleClick=function(t){HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.SimilarSpaces),HZ.lb.plugins.PhotoRecommendations.handleClick.call(HZ.lb.plugins.PhotoRecommendations,t)},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){i.empty();var t=e.isFullPageAd()||e.isRecommendationsContext()||e.isSpotlightContext()||e.isProjectContext()||e.getContextType()==HZ.lb.Config.CONTEXT_TYPE_IMAGE_TAGS;e.isProduct()||t||(HZ.lb.plugins.PhotoRecommendations.setDataCollection(HZ.data.SimilarSpaces),HZ.lb.plugins.PhotoRecommendations.setPhotoData(),this.renderContent())},this.renderContent=function(){HZ.lb.plugins.PhotoRecommendations.canRender()&&i.append(HZ.lb.plugins.PhotoRecommendations.generateContent(5,5,"photo"))}},HZ.lb.plugins.PhotoRecommendations=new function(){var P,o,S=!1;this.setOwner=function(t){P=t},this.setDataCollection=function(t){this.dataCollection=t},this.setPhotoData=function(){o=P.getCurrentSpace(),this.recommendations=this.dataCollection?this.dataCollection.get(o.id):{sids:[],count:0},S=!1},this.isDataLoaded=function(){return this.recommendations&&1<this.recommendations.sids.length},this.canRender=function(){return this.isDataLoaded()&&!this.isRendered()},this.isRendered=function(){return S},this.generateContent=function(t,e,i){var n=0,o=$("<div></div>");if(this.itemType=i,this.isDataLoaded()){var a,s="",l=this.recommendations.sids,r=l.length;switch(i){case"photo":switch(this.dataCollection){case HZ.data.Recommendations:a=HZ.lb.Config.enableCombinedRecommendPhotos?_hgtp("","Similar Idea","Similar Ideas",r):_hgtp("","People also liked this photo","People also liked these photos",r);break;case HZ.data.SimilarSpaces:a=_hgt("Related Photos")}s="recommended-space";break;case"product":a=_hgt("People who liked this also liked"),s="related-product"}o.append(HZ.lb.RenderUtils.renderSectionHeader(a));for(var d=HZ.lb.Utils.calculateThumbWidth(P.getContentBox().w-32,t,8),c=d,u=d,p=[],h=Math.min(e,r),g=0;g<h;g++){var m,C,b=l[g],f=HZ.data.Spaces.get(b),H=HZ.utils.Links.getSpaceLink(b),T=HZ.utils.Links.getSpaceImageUrl(b,c,u,f.bg);"photo"==i?p.push({SPACE_ID:b,INDEX:n,IMG_SRC:T,WIDTH:c,HEIGHT:u,CLICK_URL:H}):"product"==i&&(m=f.price,f=(C=f.stl)?HZ.lb.Templates.THUMB_META_T_TEMPLATE:HZ.lb.Templates.THUMB_META_TEMPLATE,C=HZ.utils.Html.template(f,{PRICE:m,STITLE:C}),p.push({SPACE_ID:b,INDEX:n,IMG_SRC:T,WIDTH:c,HEIGHT:u,CLICK_URL:H,THUMB_META:C,OVERLAY_TEXT:_hgt("Shop Houzz")})),n++}"photo"==i?o.append(HZ.lb.RenderUtils.renderThumbGrid(t,p,s,HZ.lb.Templates.SIMPLE_THUMB)):"product"==i&&o.append(HZ.lb.RenderUtils.renderThumbGrid(t,p,s,HZ.lb.Templates.PRODUCT_THUMB)),S=!0}return o.html()},this.handleClick=function(t){var e,i,n;t.ctrlKey||t.metaKey||HZ.lb.Config.isViewSpace||(t.preventDefault(),(i=$(t.target)).attr("s")||(i=i.closest("li")),this.recommendations=this.dataCollection?this.dataCollection.get(o.id):{sids:[],count:0},i.attr("s")&&1<this.recommendations.count&&(e=parseInt(i.attr("s")),t=parseInt(i.attr("i")),(i={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=o.id,"photo"==this.itemType?n=new HZ.lb.Context("recommendations_"+o.id,HZ.lb.Config.CONTEXT_TYPE_SPACE_RECOMMENDATIONS,i,this.recommendations.sids,this.recommendations.count,t+1,-1):"product"==this.itemType&&(n=new HZ.lb.Context("recommendations_"+o.id,HZ.lb.Config.CONTEXT_TYPE_PHOTO_RELATED_PRODUCTS,i,this.recommendations.sids,this.recommendations.count,t+1,-1)),n.setCurrentSpaceId(e),P.pushContext(n),P.refresh()))}},HZ.lb.plugins.ProductReviews=function(){var r,d,c,e,u,p,h,g,m,C,i=HZ.lb.Config.contentGroupIds.DISCUSSION;this.setOwner=function(t){r=t,c=$('<section class="lbInfoBox product-reviews separator"></section>'),e=c.get(0),r.addInfoBoxToContentGroup(e,"productReviews",i),g=$.proxy(this.onResourcesLoaded,this)},this.imageDataUpdated=function(){this.renderReviews()},this.imageChanged=function(){d=r.getCurrentSpace(),(u=HZ.data.ProductReviews.get(d.id))&&u.reviewHtml&&c.show(),c.empty();var t=r.isRecommendationsContext()||r.isFullPageAd()||r.isSpotlightContext();r.isProduct()&&!t&&this.renderReviews()},this.renderReviews=function(){var t,e,i,n,o,a,s,l;p||h?p&&(d=r.getCurrentSpace(),(u=HZ.data.ProductReviews.get(d.id))&&u.reviewsHtml&&(a=HZ.ui.AjaxThrobber.getThrobber(),l=m,(s=$(u.reviewsHtml)).find("header h2").removeClass("text-l mbm").addClass("text-m text-bold"),t=s.find("form#reviewForm").clone(),c.empty().append(s.html()),l.initExpandButton(),l.setLoadMoreElement($("#moreReviews")),e=0<(n=t.find("input.rating[type=number]")).val(),n.rating(),C.initRatingLables(t.find(".rating-input"),t.find(".rate-desc"),HZ.reviews.RateStarsLabels.RATING_LABELS),i=l.deleteButton=t.find("#deleteReviewButton"),o=l.cancelButton=t.find("#cancelReviewButton"),s=t.find("#editReviewButton"),n=$("#submitReviewButton"),i.click($.proxy(l.onDeleteClick,l)).detach(),o.click($.proxy(l.onCancelClick,l)).detach(),s.click($.proxy(l.onEditClick,l)),a=[i,a,o,n],t.find(".header-5, .controls.main").remove(),o=t.find(".form-ui").detach(),n.detach(),e&&i.removeClass("hidden"),o={title:e?_hgt("Edit Review"):_hgt("Write Review"),formName:"reviewForm",body:o,controls:a},(a=l.dialog=new HZ.ui.yamdi.Dialog).init(o),t.remove(),l.setFormNode(a.getForm()),l.initReviewVote(),l.initReviewImages(),l.addTooltips(),l=$.proxy(l.onExpandClick,l),$("#noReviewsCta, .review-actions > .edit").click(l))):this.loadResources(g)},this.onReviewsUpdate=function(t,e){var i;d=r.getCurrentSpace(),(u=HZ.data.ProductReviews.get(d.id))&&u.reviewsHtml&&(i=u.reviewsHtml,(i=$(i)).find(".reviews").replaceWith(e.newValue),i=$("<div></div>").append(i),u.reviewsHtml=i.html())},this.loadResources=function(t){p?t():(h=!0,HZ.utils.ResourceLoader.requireLightboxProductReviewResources(t))},this.onResourcesLoaded=function(){h=!(p=!0),(m=HZ.reviews.ProductReviewsUIManager.getInstance()).setDisplayMode(HZ.reviews.ProductReviewsUIManager.DISPLAY_MODE_NEWPAGE),$(".product-reviews").on("update.reviews",$.proxy(this.onReviewsUpdate,this)),C=HZ.reviews.RateStarsLabels.getInstance(),this.renderReviews()}},HZ.lb.plugins.ProductInfo=function(){var u,p,i,h,g,m,C,n,o,a,s,b,f,H,T,P,S,v,I,_,E,Z,e=HZ.lb.Config.contentGroupIds.PRODUCTS,l=".lbInfoBox.seller-shipping-info",r=_hgt("Visit Store"),d=_hgt("SALE"),c=_hgt("Your product is being sold by multiple sellers. The title, description, and other metadata you provided for your product listing may not appear here.");function R(){var t=l,e=$(t);e.addClass("scrolling"),u.scrollToSelector(t,function(){e.removeClass("scrolling").addClass("scrolled")})}function L(){var t=HZ.data.Users.get(parseInt(m.preferredVendorIdForRating));t&&t.n&&((t=t.n)&&(t=HZ.utils.Links.normalizeUserNameForUrl(t),window.open(HZ.utils.Links.getBrowseReviewsLink(t),"_blank")))}function A(){u.scrollToSelector(".lbInfoBox.product-reviews")}function w(){u.scrollToSelector(".lbInfoBox.questions")}function k(){$(".loadComments").click(),u.scrollToSelector("#lbComments")}this.setOwner=function(t){u=t,p=$('<section class="lbInfoBox product-info-content"></section>'),HZ.lb.Config.isMainProdBtnQuantityInline&&p.addClass("separator"),i=p.get(0),u.addInfoBoxToContentGroup(i,"productInfo",e),p.on("click",".shipping-info-link",R).on("click",".review-stars-stats",A).on("click",".review-vendor-ratings",L).on("click",".questions-stats",w).on("click",".save-stats",k).on("click",".btn-visit-store",HZ.lb.plugins.SpaceActions.handleVisitStoreClicked),$(document).on("keyboardHandlerRequired.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&u.detachKeyboardHandler()}).on("keyboardHandlerReleased.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&u.attachKeyboardHandler()}),(h=$(HZ.utils.Html.template(HZ.lb.Templates.IMAGE_OVERLAY_TEMPLATE,{CTA:r,COMP_ID:"visit_store_overlay"})).addClass("hidden").disableSelection()).on("click",HZ.lb.plugins.SpaceActions.handleVisitStoreClicked),u.addLbImageLayer(h),(g=$(HZ.utils.Html.template('<div class="banner-listing-owner text-center text-l text-bold hidden"><div class="banner-listing-owner-close-x"><i class="hzi-font hzi-CloseX"></i></div><div class="banner-listing-owner-content">%CONTENT%</div></div>',{CONTENT:c}))).on("click",".banner-listing-owner-close-x",this.handleListingOwnerBannerCloseClick.bind(this)),u.addLbImageLayer(g)},this.imageChanged=function(){var t,e,i,n,o,a,s,l,r,d,c;p.empty().removeClass("product-info-content--ppc"),g.addClass("hidden"),$("#was-price-tooltip").hide(),m=u.getCurrentSpace(),HZ.utils.User.isHiddenUser(m.ow),Z=_=v=S=P=f="",u.isProduct()&&(C=HZ.data.ProductsInfo.get(m.id),o=!!(d=HZ.data.ListingsInfo.get(u.getSelectedListingId()))&&d.avail,t=!!d&&d.buyable,e=!!d&&d.activeMPListing,h.toggleClass("hidden",!u.isPPCProduct()),b=this.getBreadcrumbsHtml(m),H=this.getProductTitleHtml(m),T=this.getProductStatsHtml(m),(C||d)&&(u.isMarketplaceProduct()&&d?(i=!d.itx||d.isut,l=null,n=!1,(l=HZ.data.CurrentSessionUser?HZ.data.CurrentSessionUser.getUserId():l)&&(n=!!HZ.data.Users.get(l).p),s=!1,(l=d.hasOwnProperty("itp")&&!0===d.itp)?HZ.lb.Config.tradePriceRedesign&&(s=!0):(HZ.lb.Config.priceRedesign,HZ.lb.Config.isStrikethroughTreatment&&(s=!0)),i&&e&&(f=this.getProductBadgeHtml(C),HZ.lb.Config.replaceSaleBadgeWithLabel&&!l||(P=this.getSalePromoHtml(d)),S=HZ.modules.ProductPriceRenderer.renderProductPriceHtml(m,d,s),v=HZ.modules.ProductRenderer.renderSavings(d),I=d.hasOwnProperty("ntdcm")?d.ntdcm:"",_=this.getShippingHtml(C,d)),d.itx&&(Z=this.getProductSubTitleHtml(C,d,n)),E=this.getTradePromoNoteHtml(d,n),p.append(HZ.utils.Html.template('<div class="row"><div class="col-xs-12">%BREADCRUMBS%</div></div><div class="row"><div class="col-xs-12 mbm">%BADGE%</div></div><div class="row"><h1 class="col-xs-12 header-5 mt0 mb0 product-title">%TITLE%</h1></div>%SUBTITLE%<div class="row product-reviews mts"><ul class="col-xs-12 list-inline list-unstyled product-stats">%STATS%</ul></div><div class="row"><div class="col-xs-12">%SALE_PROMO%</div></div><div class="row">%PRICE%</div><div class="row">%SALE_PROMO_SAVINGS%</div><div class="row"><div class="col-xs-12">%NON_TRADE_DISCOUNT%</div></div>%TRADE_PROMO_NOTE%<div class="row"><div class="col-xs-12">%UNAVAILABLE%</div></div><div class="row"><div class="col-xs-12 mtm mbl">%SHIPPING%</div></div>',{BREADCRUMBS:b,BADGE:f,TITLE:H,SUBTITLE:Z,STATS:T,SALE_PROMO:P,PRICE:S,SALE_PROMO_SAVINGS:v,NON_TRADE_DISCOUNT:I,TRADE_PROMO_NOTE:E,SHIPPING:_,UNAVAILABLE:e?"":_hgt("Currently not available")})),d&&t&&o&&d.dtime&&(a=u.getSelectedListingId(),HZ.module.ChangeShipToLocation.init({listingId:a,leadTimeStr:d.dtime,shipToZip:d.shipToZip,attachPointSelector:"#leadTimeText"})),d&&C&&this.addFlatShippingTooltip(C,d),s&&HZ.modules.ProductPriceRenderer.addTooltips(l,d.bpt)):m.fullyLoaded&&(o=(d?d.discon:!!C&&!C.av)?"":d?d.p:m.price,a=C&&C.puv&&!!o,s=_hgt("*Price not verified"),l=_hgt("This price has been supplied by a user of Houzz and, therefore, may not accurately reflect the current price of the product."),s=a?s:"",l=a?l:"",S=HZ.utils.Html.template('<span class="product-price">%FINAL_PRICE%</span>',{FINAL_PRICE:o}),p.append(HZ.utils.Html.template('<div class="row"><div class="col-xs-12">%BREADCRUMBS%</div></div><div class="row"><h1 class="col-xs-12 header-5 mt0 mb0 product-title">%TITLE%</h1></div><div class="row product-reviews mts"><ul class="col-xs-12 list-inline list-unstyled product-stats">%STATS%</ul></div><div class="row"><div class="col-xs-12 header-1 mt0 mbm">%PRICE% </div><span title="%PRICE_COMMENT_TITLE_ATTR%">&nbsp;%PRICE_COMMENT%</span></div>',{BREADCRUMBS:b,TITLE:H,STATS:T,PRICE:S,PRICE_COMMENT_TITLE_ATTR:l,PRICE_COMMENT:s}))),C&&d&&(d=HZ.data.CurrentSessionUser,r=d?d.getUserId():-1,d=HZ.data.SpaceListingIds.get(m.id),c=!1,d&&$.isArray(d)&&d.forEach(function(t){t=HZ.data.ListingsInfo.get(t);t&&t.vid===r&&t.lid!==C.plid&&(c=!0)}),c&&g.removeClass("hidden")))),p.css("display","block")},this.imageDataUpdated=function(){this.imageChanged()},this.getBreadcrumbsHtml=function(t){var e,i=t&&t.brlnk?t.brlnk:null,t=$("<div>");return!i||(i=i.crumbs)&&(e=$('<ul class="list-unstyled list-inline text-primary breadcrumbs"></ul>').appendTo(t),i.forEach(function(t){$('<li class="breadcrumbs-crumb"></li>').toggleClass("breadcrumbs-crumb--highlight text-xs",t.highlight).appendTo(e).append(HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:t.url,LINK_TEXT:t.label}))})),t.html()},this.getProductBadgeHtml=function(t){var e,i=$("<div>");return t&&t.plid&&(e=HZ.data.ListingsInfo.get(t.plid),i.append(HZ.modules.ProductRenderer.renderProductBadge(e,t))),i.html()},this.getProductTitleHtml=function(t){var e=$("<div>");return t&&t.sht?e.append(HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:HZ.utils.Links.getSpaceLink(t.id),TITLE_ATTR:t.sht,LINK_TEXT:t.sht})):t&&t.t&&e.append(HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:HZ.utils.Links.getSpaceLink(t.id),TITLE_ATTR:t.t,LINK_TEXT:t.t})),e.html()},this.getProductSubTitleHtml=function(t,e,i){var n,o=$("<div>");return t&&e&&(n=t.manuLink,(t=t.manuName)&&e.itx&&(t=_hgt("by <t1>{manufacture}</t1>",{t1:i&&n?{tag:"a",attr:{target:"_blank",href:n,class:"highlighted text-bold"}}:{tag:"span",attr:{class:"highlighted text-bold"}},manufacture:t}),o.append(HZ.utils.Html.template('<div class="row"><h1 class="sectionTitle text-m col-xs-12 mts product-subtitle">%SUBTITLE%</h1></div>',{SUBTITLE:t})))),o.html()},this.getProductStatsHtml=function(t){n=!!t.ratingHtml,s=!!t.preferredVendorIdForRating,o=!!t.nques,a=!!t.bc;var e,i=[];return n&&(s?i.push(HZ.utils.Html.template(HZ.lb.Templates.SPACE_FACET,{CSS_CLASS:"review-vendor-ratings",FACET_TEXT:t.ratingHtml})):i.push(HZ.utils.Html.template(HZ.lb.Templates.SPACE_FACET,{CSS_CLASS:"review-stars-stats",FACET_TEXT:t.ratingHtml}))),o&&(e=_hgtp("","{numQuestions} Question","{numQuestions} Questions",t.nques,{numQuestions:t.nques}),i.push(HZ.utils.Html.template(HZ.lb.Templates.SPACE_FACET,{CSS_CLASS:"questions-stats",FACET_TEXT:e}))),a&&(t=_hgtp("","{numSaves} Save","{numSaves} Saves",t.bc,{numSaves:t.bcf}),i.push(HZ.utils.Html.template(HZ.lb.Templates.SPACE_FACET,{CSS_CLASS:"save-stats",FACET_TEXT:t}))),i.join("")},this.getSalePromoHtml=function(t){var e,i,n=$("<div>");return t&&t.pl&&(e=HZ.utils.Links.getSoldByLink(t.vid),i=HZ.data.Users.get(t.vid).d,i=t&&t.dv?_hgt("by Houzz"):e?_hgt("by <t1>{sellerName}</t1>",{sellerName:i,t1:{tag:"a",attr:{target:"_blank",href:e}}}):i,t=HZ.utils.Html.template(HZ.lb.Templates.BLANK_LINK,{LINK_URL:t.plink,LINK_TEXT:t.pl}),n.append(HZ.utils.Html.template(HZ.lb.Templates.PRODUCT_SALE_PROMO,{SALE_BADGE_LABEL:d,SALE_BADGE_CLASS:"sale-badge",SALE_LABEL:t,SALE_SELLER:i}))),n.html()},this.getTradePromoNoteHtml=function(t,e){var i=$("<div>");if(!t)return i.html();var n,o='<div class="trade-promo-note"><span class="%className%">%TRADE_PROMO_NOTE%</span></div>',a=t.hasOwnProperty("hvtp")&&!0===t.hvtp;return!t.itx||t.isut?HZ.lb.Config.isTradePromoNoteEnabled&&a&&i.append(HZ.utils.Html.template(o,{TRADE_PROMO_NOTE:_hgt("Unlock Trade Pricing - <t1>Join the Houzz Trade Program<t2></t2></t1>",{t1:{tag:"a",attr:{target:"_blank",href:HZ.utils.Links.getPageUrl("trade-program"),class:"highlighted"}},t2:{tag:"span",attr:{class:"more-icon"}}}),className:"text-bold trade-promo-note__normal"})):(a=t=n=null,t=e?(a="This item is only available to members of the Houzz Trade Program. <t1>Apply Now</t1> for exclusive access to trade brands.",n=HZ.utils.Links.getPageUrl("trade-program"),"text-bold highlighted"):(a="This item is only available for purchase through an interior designer. <t1>Find a local interior designer</t1> to help with your project.",n=HZ.utils.Links.getPageUrl("professionals/interior-designer#"),"text-bold colorLink"),i.append(HZ.utils.Html.template(o,{TRADE_PROMO_NOTE:_hgt(a,{t1:{tag:"a",attr:{target:"_blank",href:n,class:t}}}),className:"trade-promo-note__exclusive--pro"}))),i.html()},this.getShippingHtml=function(t,e){var i,n=$("<div>"),o=_hgt("Shipping & Seller Information"),a="",s="";return e&&(i=e.fs,(e.vfs||!1)&&HZ.lb.Config.isTradePro?s='<div id="tradeFlatShipping" class="trade-flat-shipping">'+_hgt("<t1>{shippingCost} FLAT RATE SHIPPING</t1> from {manufacturer}",{shippingCost:e.shpc,manufacturer:t?t.manuName:"",t1:{tag:"span",attr:{class:"highlighted text-bold text-primary"}}})+"</div>":i&&(a='<span class="text-bold mrs">'+_hgt("Free Shipping!")+"</span>"),n.append(HZ.utils.Html.template(HZ.lb.Templates.SHIPPING_SELLER_INFO,{FLAT_SHIPPING:s,SHIPPING_COST:a,SHIPPING_LINK_TEXT:o}))),n.html()},this.addFlatShippingTooltip=function(t,e){var i,n=$("#tradeFlatShipping").find("span.highlighted"),o=null,o=t&&t.manuLink?{tag:"a",attr:{class:"highlighted text-bold text-primary"},href:t.manuLink,target:"_blank"}:{tag:"span",attr:{class:"highlighted text-bold text-primary"}};n.length&&(i=_hgt("Pay one flat shipping fee of {shippingCost} for all items you add from <t1>{manufacturer}</t1>.",{shippingCost:e.shpc,manufacturer:t.manuName,t1:o}),n.on("click",function(){$(this).tipBubble({id:"flat-shipping-tooltip",content:HZ.utils.Html.template('<div class="flat-shipping-tooltip__body"><p class="flat-shipping-tooltip__message mb0">%TOOLTIP_MESSAGE%</p></div>',{TOOLTIP_MESSAGE:i}),point:"south",offsetX:0,offsetY:0,width:"270px",position:"absolute",showCloseBtn:!0,borderColor:"#ccc",fadeDuration:0})}))},this.handleListingOwnerBannerCloseClick=function(t){g.addClass("hidden")}},HZ.lb.plugins.MainButton=function(){var l,r,i,d,c,u,p,h,g,e=HZ.lb.Config.contentGroupIds.PRODUCTS,n=_hgt("Visit Store"),m=HZ.lb.Config.isMainProdBtnQuantityInline;this.setOwner=function(t){l=t,r=$('<section class="lbInfoBox product-main-button separator"></section>'),i=r.get(0),l.addInfoBoxToContentGroup(i,"productInfo",e),$(document).on("keyboardHandlerRequired.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&l.detachKeyboardHandler()}).on("keyboardHandlerReleased.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&l.attachKeyboardHandler()}),(d=$(HZ.utils.Html.template(HZ.lb.Templates.IMAGE_OVERLAY_TEMPLATE,{CTA:n,COMP_ID:"visit_store_overlay"})).addClass("hidden").disableSelection()).on("click",HZ.lb.plugins.SpaceActions.handleVisitStoreClicked),l.addLbImageLayer(d),HZ.lb.Config.isCheckoutEnabled&&HZ.cart&&HZ.cart.Actions.subscribeCartUpdate("lightbox",function(t,e){"add"===e.operation&&e.message&&e.message.q&&r.find("#qtySelector").val(e.message.q)})},this.imageChanged=function(){var t,e,i,n,o,a,s;r.empty().removeClass("product-main-button--ppc").addClass("separator"),c=l.getCurrentSpace(),HZ.utils.User.isHiddenUser(c.ow),l.isProduct()&&(u=HZ.data.ProductsInfo.get(c.id),t=HZ.data.ListingsInfo.get(l.getSelectedListingId()),d.toggleClass("hidden",!l.isPPCProduct()),(u||t)&&(a=e=!1,t?(p=t.avail,h=t.buyable,a=t.sbb,g=t.activeMPListing):p=u.av,l.isMarketplaceProduct()?(s=t&&(!t.itx||t.isut),i=m&&p&&!a&&s?'<div class="row mtm mbm"><div class="col-xs-12 qty-comment--standalone">%QTY_COMMENT%</div><div class="col-xs-4 mpQtyBox--padded" id="lbQtySelector"></div><div class="col-xs-8 product-main-button-mount"></div></div>':'<div class="row mtm"><div class="col-xs-12" id="lbQtySelector"></div></div><div class="row mbm"><div class="col-xs-12 product-main-button-mount"></div></div>',n="",o=null,a=!1,(o=HZ.data.CurrentSessionUser?HZ.data.CurrentSessionUser.getUserId():o)&&(a=!!HZ.data.Users.get(o).p),e=t&&t.itx&&!a,s&&g&&t&&h&&p&&((s=parseInt(t.q,10))<10?n=_hgt("Only {quantity} Left!",{quantity:s}):HZ.lb.Config.alwaysShowQtyStr&&(n=_hgt("10 or more in stock"))),t&&!e&&g&&(r.append(HZ.utils.Html.template(i,{QTY_COMMENT:"<p>"+n+"</p>"})),HZ.productQuantity.Renderer.setMountNode($("#lbQtySelector")),HZ.productQuantity.Renderer.updateView(c.id,t.lid),HZ.modules.ProductMainButton.setMountNode(r.find(".product-main-button-mount")),HZ.modules.ProductMainButton.updateView(c.id))):c.fullyLoaded&&(t?t.discon:!u||u.av,r.append('<div class="row"><div class="col-xs-12 product-main-button-mount"></div></div>'),r.addClass("product-info-content--ppc").toggleClass("separator",!!l.isPPCProduct()),HZ.modules.ProductMainButton.setMountNode(r.find(".product-main-button-mount")),HZ.modules.ProductMainButton.updateView(c.id)))),r.css("display","block")},this.imageDataUpdated=function(){this.imageChanged()},this.pluginAfterShown=function(t){var e,i=document.getElementById("qtySelector"),n=$(i);"imageDataUpdated"===t&&i&&"SELECT"===i.nodeName.toUpperCase()&&(e=$(i).parent(".dropdown-wrapper-2")).length&&n.outerWidth()>e.outerWidth()&&e.css("width",n.outerWidth())}},HZ.lb.plugins.ProductIdeabookComment=function(){var e,i,n=HZ.lb.Config.contentGroupIds.PRODUCTS;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox variationSelectors separator"></section>'),e.addInfoBoxToContentGroup(i[0],"productIdeabookComment",n)},this.imageChanged=function(){var t;i.empty(),e.isGalleryContext()&&(t=HZ.lb.RenderUtils.renderIdeabookSpaceComment(e.getCurrentSpace(),e.getCurrentSpaceGallery()),i.append(t))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.MPProductVariation=function(){var i,n,o=-1,e=null,a=HZ.lb.Config.contentGroupIds.PRODUCTS;function t(t){}this.setOwner=function(t){i=t,e=HZ.productVariation.BoxLinkSelector2.updateView,n=$('<section class="lbInfoBox variationSelectors separator"></section>'),i.addInfoBoxToContentGroup(n[0],"mpProductVariation",a),HZ.productVariation.Manager.setSelector(HZ.lb.Config.useDropdownVariations?HZ.productVariation.ListSelector:HZ.productVariation.BoxLinkSelector2),HZ.productVariation.Manager.setRenderer(this),HZ.productVariation.Manager.initUI()},this.lightboxLoaded=function(){HZ.productVariation.BoxLinkSelector2.updateView=t,o=-1,0},this.lightboxUnloaded=function(){HZ.productVariation.BoxLinkSelector2.updateView=e},this.imageChanged=function(){var t=i.getCurrentSpace().id;n.empty();var e=i.getContext().getCursorPosition(),t=HZ.data.Variations.get(t);if(e&&(e.cursor!==o?o=e.cursor:t?!1===t.exactMatch?t.exactMatch=!0:0:0),t){if(null===(t=t.availVar)||0===t.length)return null;s()}},this.imageDataUpdated=function(){n.is(":empty")&&s()};var s=function(){var t=i.getCurrentSpace();HZ.productVariation.Manager.setSpaceId(t.id),n.empty();var e=HZ.data.ListingsInfo.get(i.getSelectedListingId());e&&(!e.itx||e.isut)&&(null!==(t=HZ.productVariation.Manager.drawSelectors(t.id))&&(n.append(t),n.removeClass("hidden")))};this.updateView=function(t){i.getContext().stashAndReplaceCurrentSpaceId(t),i.refresh()}},HZ.lb.plugins.PreSalesPhone=function(){var o,a,e=HZ.lb.Config.contentGroupIds.INFO,s=HZ.lb.Config.preSalesPhoneNumber,l='<header class="phone-header row">            <h2 class="sectionTitle text-m text-bold col-xs-12">%TITLE%</h2>        </header>        <div class="row">            <p class="col-xs-12">%MESSAGE%</p>        </div>        <div class="row phone-row">            <span class="icon phone-img icon-font icon-phone mrs"></span><span class="phone">%PHONE%</span>        </div>';this.setOwner=function(t){o=t,a=$('<section class="lbInfoBox pre-sales-phone separator"></section>'),o.addInfoBoxToContentGroup(a[0],"preSalesPhone",e)},this.imageChanged=function(){var t,e=$(a).empty(),i=o.getCurrentSpace(),n=HZ.data.ProductsInfo.get(i.id);!n||null!==(t=HZ.data.ListingsInfo.get(n.plid))&&t.showPhone&&(n=t.csHours,t=_hgt("Have questions about this product (ID#: {id})?",{id:i.id}),i=_hgt("Our Houzz specialists are ready to help!"),n=_hgt("Call during our regular hours: {csHours}",{csHours:n}),n=(null===HZ.lb.Config.tradeUser||!HZ.lb.Config.tradeUser)&&HZ.utils.RegularHour.isRegularHour()?$(HZ.utils.Html.template(l,{TITLE:t,MESSAGE:i,PHONE:s})):$(HZ.utils.Html.template(l,{TITLE:t,MESSAGE:n,PHONE:s})),e.append(n))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.ProductDescription=function(){var a,s,l,e=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){a=t,s=$('<section class="lbInfoBox product-description separator"></section>'),a.addInfoBoxToContentGroup(s.get(0),"productDescription",e)},this.imageChanged=function(){var t,e,i,n=a.getCurrentSpace(),o="";n.fullyLoaded&&l!=n.id&&(s.empty(),l=n.id,a.isFullPageAd()||a.isSpotlightContext()||(a.isMarketplaceProduct()?(t=HZ.data.ProductsInfo.get(n.id))&&t.desc&&(o=t.desc):!a.isProduct()||(t=a.getSpaceDescription())&&(t=t,n.f&&n.au&&n.au!=n.ow&&n.cau&&(t+=" &mdash; <span class='userName'>"+HZ.ui.render.User.getUsersHtml(n.au,!0)+"</span>"),o=t),""!=o&&($('<header class="section-header row"></header>').appendTo(s).append('<h2 class="sectionTitle text-m text-bold col-xs-12">'+_hgt("Product Description")+"</h2>"),e=$('<div class="row invisible"></div>').appendTo(s),i=$('<p class="description-text col-xs-12"></p>').appendTo(e),o=$("<div>").append(o),i.append(o),a.registerTimeout("prodDescPeek",function(){e.removeClass("invisible"),i.peekable()},0))))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.CommonSpecificationRenderer=new function(){var T;this.setOwner=function(t){T=t},this.imageChanged=function(){},this.renderEditorialDescription=function(t){var e,i=T.getCurrentSpace(),n=T.getSpaceDescription();n&&(e=n,i.f&&i.au&&i.au!=i.ow&&i.cau&&(e+=" &mdash; <span class='userName'>"+HZ.ui.render.User.getUsersHtml(i.au,!0)+"</span>")),t.empty();t=$("<div class='description-text'></div>").appendTo(t);e?t.peekable("show").peekable("setContent",e):t.peekable("hide")},this.renderSpecification=function(){var n,t=T.getCurrentSpace(),e=HZ.data.PPCAds.get(t.id),i=$("<div></div>"),o=!!HZ.data.CurrentSessionUser;T.isMarketplaceProduct()||e&&e.isPPCProduct||0;var a,s,l,r,d,c,u,p,h=HZ.data.ProductsInfo.get(t.id),g=HZ.data.ListingsInfo.get(T.getSelectedListingId()),m=$('<dl class="product-attributes horizontal-list horizontal-list--multi-line text-m"></dl>'),C='<dt class="key">%LABEL%</dt><dd class="value">%VALUE%&nbsp;</dd>',b=function(){var t=T.getCurrentSpace(),e="";{var i,n;!t.ow||7==t.ow||T.isFullPageAd()||T.isSpotlightContext()?e="<div class='space-owner'></div>":HZ.data.Users.get(t.ow)&&(i=null,(n=HZ.data.HouzzClkTracking.get(t.id))&&n[t.ow]&&(i=n[t.ow]),e=HZ.ui.render.User.getUserHtml(t.ow,!0,i))}return e}();if(t.prod&&b&&(c=!HZ.data.SpaceListingIds.get(t.id)||1===HZ.data.SpaceListingIds.get(t.id).length,a=_hgt("Sold By"),s="",l=HZ.data.Users.get(t.ow).mpv,r=!!t.tl,d=parseInt(t.srct,10),e=!g&&h&&h.av||g&&!g.discon,(s=o&&r&&e&&!(l&&(2===d||8===d))&&b?b+' | <a href="javascript:;" class="visitStore icon-wrap">'+_hgt("Visit Store")+'<span class="more-icon"></span></a>':s)&&c&&(u=$(HZ.utils.Html.template(C,{LABEL:a,VALUE:s})),m.append(u),0)),h&&g&&(a=h.swlabel,s=h.swvalue,a&&s&&(n=HZ.utils.Html.template(C,{LABEL:a,VALUE:s}),m.append(n),0),HZ.data.ProductAttributes.forEach(function(t){var e=t.unit,i=t.key;"dimensions"!==e&&"weight"!==e&&"s"!==i&&(a=t.label,(s=h[i])&&s.length&&(n=HZ.utils.Html.template(C,{LABEL:a,VALUE:s}),m.append(n),0))}),h.manuName&&(c=h.manuLink,u=h.manuName,a=g&&g.mll?g.mll:_hgt("Manufactured By"),s=c?'<a target="_blank" href="'+c+'" class="colorLink">'+u+"</a>":u,n=HZ.utils.Html.template(C,{LABEL:a,VALUE:s}),m.prepend(n)),void 0!==h.assembly&&(n=HZ.utils.Html.template(C,{LABEL:_hgt("Assembly Required"),VALUE:h.assembly?_hgt("Yes"):_hgt("No")}),m.append(n)),g.hasOwnProperty("cg")&&!0===g.cg&&(n=HZ.utils.Html.template(C,{LABEL:_hgt("Commercial-grade"),VALUE:_hgt("Yes")}),m.append(n))),t.prod||(g=HZ.lb.RenderUtils.renderBrowseLocationLink(t))&&m.append(HZ.utils.Html.template(C,{LABEL:_hgt("Location"),VALUE:$("<div>").append(g).html()})),h){if(h.external&&h.external.length&&h.showExternal)for(var f=0,H=h.external.length;f<H;f++)p=h.external[f],a=p.key,(s=p.value)&&s.length&&(n=HZ.utils.Html.template(C,{LABEL:a,VALUE:s}),m.append(n));!0===h.p65d&&(a=_hgt("California Residents"),s=_hgt("<t1>Click here for Proposition 65 warning</t1>",{t1:{tag:"a",attr:{href:"javascript:;",class:"colorLink p65d"}}}),n=HZ.utils.Html.template(C,{LABEL:a,VALUE:s}),m.append(n))}return m.children().length&&t.prod&&(t="",t+='<header class="section-header">',t+='<h2 class="sectionTitle text-m text-bold">'+_hgt("Product Specification")+"</h2>",i.append(t+="</header>"),i.append(m),T.isMarketplaceProduct()&&HZ.lb.Config.isReportProductLinkEnabled&&(t='<a class="report-product-link" href="javascript:;">'+_hgt("Report incorrect information or image")+"</a>",i.append(t))),i.html()},this.renderReturnPolicy=function(t){var e=_hgt("Returns Policy"),i=HZ.utils.Links.getPageUrl("returnPolicy"),n=_hgt(" Return Policy");t.append(HZ.utils.Html.template('<header class="section-header text-m text-bold">%RETURN_POLICY_TITLE%</header><div class="return-policy-content"><a class="text-primary" href="%URL%">%COMPANY%%RETURN_POLICY_TEXT%<span class="more-icon"></span></a></div>',{RETURN_POLICY_TITLE:e,URL:i,COMPANY:"Houzz 30-day",RETURN_POLICY_TEXT:n}))},this.imageDataUpdated=function(){}},HZ.lb.plugins.ProductSpecification=function(){var i,n,o,e=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){i=t,n=$('<section class="lbInfoBox product-spec separator trackMe"></section>')[0],i.addInfoBoxToContentGroup(n,"productSpecs",e),$(n).on("click",".p65d",$.proxy(this.onP65DClick,this)).on("click",".visitStore",HZ.lb.plugins.SpaceActions.handleVisitStoreClicked).on("click",".report-product-link",$.proxy(this.handleReportProductClick,this)).on("mouseenter mouseleave",".report-product-link",$.proxy(this.hoverReportProductFlag,this)),$(document).on("keyboardHandlerRequired.lightbox",function(t,e){e=e.event.target;$(e).closest(n)&&i.detachKeyboardHandler()}).on("keyboardHandlerReleased.lightbox",function(t,e){e=e.event.target;$(e).closest(n)&&i.attachKeyboardHandler()})},this.imageChanged=function(){$(n).empty(),(o=i.getCurrentSpace()).prod&&($(n).append(HZ.lb.plugins.CommonSpecificationRenderer.renderSpecification()),i.registerTimeout("prodSpecPeek",function(){var t=$(n).find(".product-attributes"),e=o&&o.id||"";t.peekable({moreHtml:'<a class="hzPeekLink text-bold" href="javascript:;" scopeid="attr-peek-lb" compid="attr-expand" objid="'+e+'">'+_hgt("See More")+'<span class="down-icon"></span></a>',lessHtml:'<a class="hzPeekLink text-bold" href="javascript:;" scopeid="attr-peek-lb" compid="attr-collapse" objid="'+e+'">'+_hgt("Less")+'<span class="up-icon"></span></a>'})},0))},this.imageDataUpdated=function(){this.imageChanged()},this.onP65DClick=function(t){HZ.ui.yamdi.Common.alert(_hgt("WARNING"),_hgt("This product contains a chemical known to the State of California to cause cancer, birth defects, or other reproductive harm."))},this.handleReportProductClick=function(){i.isSignupMode()?i.showLoginDialog():HZ.module.ReportProduct.handleReportProductClick(o.id)},this.hoverReportProductFlag=function(t){var e=$(".report-product-flag");switch(t.type){case"mouseenter":e.addClass("report-product-flag-hover");break;case"mouseleave":e.removeClass("report-product-flag-hover")}}},HZ.lb.plugins.ProductDocuments=function(){var i,n,o,a,e=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){i=t,n=$('<section class="lbInfoBox product-documents separator"></section>'),i.addInfoBoxToContentGroup(n.get(0),"productDocuments",e)},this.imageChanged=function(){var t,e;o=i.getCurrentSpace(),n.empty(),o.prod&&(a=HZ.data.ProductsInfo.get(o.id),HZ.modules.ProductDocumentRenderer.setMountNode(n),HZ.modules.ProductDocumentRenderer.updateView(a),t=n.find(".product-doc-list"),e=o&&o.id||"",t.peekable({moreHtml:'<a class="hzPeekLink text-bold" href="javascript:;" scopeid="document-peek-lb" compid="document-expand" objid="'+e+'">'+_hgt("See More")+'<span class="down-icon"></span></a>',lessHtml:'<a class="hzPeekLink text-bold" href="javascript:;" scopeid="document-peek-lb" compid="document-collapse" objid="'+e+'">'+_hgt("Less")+'<span class="up-icon"></span></a>'}))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.SpaceSpecification=function(){var e,i,n=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){e=t,i=$('<section class="lbInfoBox space-spec separator"></section>')[0],e.addInfoBoxToContentGroup(i,"space-spec",n)},this.imageChanged=function(){$(i).empty(),e.getCurrentSpace(),e.isFullPageAd()||e.isProduct()||e.isSpotlightContext()||$(i).append(HZ.lb.plugins.CommonSpecificationRenderer.renderSpecification())},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.ProductListingsInfo=function(){var n,o,e,a,i=HZ.lb.Config.contentGroupIds.INFO;this.setOwner=function(t){n=t,o=$('<section class="lbInfoBox seller-shipping-info separator"></section>'),e=o.get(0),n.addInfoBoxToContentGroup(e,"shipping-info",i),(a=HZ.listingInfo.Renderer).setMountNode(e)},this.imageChanged=function(){o.empty();var t,e,i=n.getCurrentSpace();i.fullyLoaded&&HZ.lb.Config.isCheckoutEnabled&&(t=i.id,e=n.getSelectedListingId(),!(i=HZ.data.ListingsInfo.get(e))||i.itx&&!i.isut||a.updateView(t,e,!0))},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.QuestionsInfo=new function(){var u,p,i,h,n,g,m,e,o=HZ.lb.Config.contentGroupIds.DISCUSSION,t=null;this.setOwner=function(t){u=t,p=$('<section id="lbQuestions" class="lbInfoBox separator questions"></section>'),i=p.get(0),u.addInfoBoxToContentGroup(i,"questionsInfo",o),p.click($.proxy(this.handleDivClicked,this)).on("mousedown",".lbQuestionFeedDiv a",function(){0==this.href.indexOf("http://")&&(this.target="_blank")}).on("click","#askQuestionButton, #lbQuestionsFeedCTALink",$.proxy(this.handleAskAQuestion,this)),this.initFeedComments(),$(document).on("keyboardHandlerRequired.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&u.detachKeyboardHandler()}).on("keyboardHandlerReleased.lightbox",function(t,e){e=e.event.target;$(e).closest(i)&&u.attachKeyboardHandler()})},this.initFeedComments=function(){void 0!==HZ.feedComments?HZ.feedComments.init({source:"lightbox",feedContainer:i}):HZ.lb.Utils.loadFeedCommentsResources(this.initFeedComments.bind(this))},this.lightboxScroll=function(){this.loadIfVisible()},this.loadIfVisible=function(){setTimeout(function(){$("#lbQuestions .section-header").visible()&&u.getCurrentSpace().fullyLoaded&&a.apply(this)}.bind(this),500)};var a=function(){var t=u.getCurrentSpace();n||HZ.data.Questions.get(t.id)||(n=!0,HZ.ajaz.Services.getQuestionsData(t.id,$.proxy(s,this)))},s=function(t){HZ.lb.Utils.validateData(t);var e,i=t.results.questions;if(t&&t.results)for(e in i)HZ.data.Questions.put(e,i[e]);n=!1,this.renderQuestions(),g.removeClass("hidden"),m.removeClass("hidden")};this.imageDataUpdated=function(){this.renderQuestions(),$(".askButton",i).removeClass("hidden"),g.removeClass("hidden"),m.removeClass("hidden")},this.imageChanged=function(){t=(t&&HZ.data.Questions.deleteObj(t),u.getCurrentSpace().id),m?m.empty():$.noop()},this.renderQuestions=function(){var t,e=u.getCurrentSpace(),i=[],n=[],o=0;if(e&&(t=HZ.data.Questions.get(e.id)),p.find(".edit-comment-rte").each(function(t,e){var i=$(e),e=i.find(".temp");i.removeClass("active").find(".rich-text-editor-wrapper").remove(),i.find("#cancel-edit-comment").remove(),i.children(".commentForm").hide().appendTo(e.find(".editCommentDiv")),i.find("input[name=isHtml]").remove(),e.children().appendTo(i),e.remove()}),p.find(".add-comment-rte").each(function(t,e){e=$(e);e.removeClass("active").find(".rich-text-editor-wrapper").remove(),e.find(".addCommentExtra").hide(),e.find(".commentBody").show(),e.find(".hzProIndicator").hide(),e.find("input[name=isHtml]").remove()}),this.storeQuestionData(),h=!0,t&&0<t.length){for(var a=0;a<t.length;a++){var s=t[a],l=(s.body,"");s.processedFeedHtml?l="<div class='lbQuestionFeedDiv' sid='"+e.id+"' qid='"+a+"'>"+s.processedFeedHtml+"</div>":s.feedHtml&&(l="<div class='lbQuestionFeedDiv' sid='"+e.id+"' qid='"+a+"'>"+s.feedHtml+"</div>"),o<2&&0<s.count?(n.push(l),o++):i.push(l)}for(;n.length<2&&0<i.length;)n.push(i.shift())}else{var r=u.isProduct()?_hgt("Have a question about this product? Ask our community."):_hgt("Have a question about this photo? Ask our community.");n.push("<div class='lbQuestionFeedCTA'>"+r+"</div>")}var d=u.isProduct(),c=d?e.nques:e.qc,r=_hgt("Ask a Question"),c=d?_hgtp("Product questions","This product has one question","This product has {questionCount} questions",c,{questionCount:c}):_hgtp("Questions About This Photo","Question About This Photo","Questions About This Photo ({questionCount})",c,{questionCount:e.qcf});p.empty().append('<header class="section-header row hidden"><h2 class="questionsHeader title text-m text-bold col-xs-12">'+c+'</h2><span class="col-xs-12"><button id="askQuestionButton" class="btn btn-secondary btn-block" compId="lbAsk">'+r+"</button></span></header>").append('<div id="questionsContainer" class="hidden">'+n.join("")+"</div>"),g=p.find("header.section-header"),m=$("#questionsContainer");r=i.length;0<r&&(r=_hgtp("","Show 1 more question","Show {questionCount} more questions",r,{questionCount:r})+"<span class='more-icon'></span>",p.append("<button class='lbQuestionsMore btn btn-block btn-expand'>"+r+"</button><div class='lbQuestionsListUnansweredDiv text-s'>"+i.join("")+"</div>")),$("#askQuestionButton").toggleClass("hidden",u.isEditMode()),p.find(".attachment-previews").empty(),p.find("textarea.commentBody").initPlaceHolders(),HZ.clipping.Clip.init({})},this.storeQuestionData=function(){$(i).find(".feedAttach .feed-question-body").peekable("destroy"),$(".lbQuestionFeedDiv",i).each(function(t,e){var i=$(e),e=i.attr("sid"),t=i.attr("qid"),e=HZ.data.Questions.get(e);e&&e[t]&&e[t].feedHtml&&(e[t].processedFeedHtml=i.html())})},this.handleDivClicked=function(t){var t=t.target;t&&0<=t.className.indexOf("lbQuestionsMore")&&(t.style.display="none",(t=$(".lbQuestionsListUnansweredDiv"))[0].style.display="block",t.find(".feed-question-body").peekable())},this.pluginAfterShown=function(t){clearTimeout(e),e=setTimeout(function(){var t;!h||0<(t=$(i).find(".feedAttach .feed-question-body")).length&&(t.peekable(),h=!1),this.loadIfVisible()}.bind(this),30)},this.imageResized=function(){this.loadIfVisible()},this.handleAskAQuestion=function(){var t,e,i;u.isSignupMode()?u.showLoginDialog():(t=u.getContext().getCurrentSpaceId(),e=u.getCurrentSpace(),i=(i=HZ.data.Users.get(e.ow))?i.p:0,HZ.spaceActions.QuestionDialog.init(t,i),HZ.spaceActions.QuestionDialog.setShowLinkOnNewWindow(!0),HZ.spaceActions.QuestionDialog.setQuestionTopic(e.prod?HZ.spaceActions.QuestionDialog.PRODUCT_TOPIC:HZ.spaceActions.QuestionDialog.SPACE_TOPIC),u.showDialog(HZ.spaceActions.QuestionDialog))}},HZ.lb.plugins.ContextBreadcrumbs=new function(){var i,n,e;this.setOwner=function(t){i=t,n=$('<div id="lbContextBreadcrumbs"></div>'),e=n.get(0),i.addBreadcrumbs(e),$("#lbContextBreadcrumbs").click($.proxy(this.handleBreadcrumbClick,this))},this.contextChanged=function(){var t=i.getContextStack(),e=1<t.length;n.empty(),e?((t=t[1].getCurrentSpaceId())&&n.append(HZ.utils.Html.template('<div class="crumb"><div class="crumbArrow"><span class="hzi-font hzi-Left-Arrow backArrow"></span><span class="backText">%CTA%</span></div><div class="crumbImage"><img src="%IMG_SRC%"></div></div>',{CTA:_hgt("Back"),IMG_SRC:HZ.utils.Links.getSpaceImageUrl(t,39,39)})),this.showBreadcrumbs()):this.hideBreadcrumbs()},this.handleBreadcrumbClick=function(){i.popContext(),i.refresh()},this.hideBreadcrumbs=function(){n.addClass("hidden")},this.showBreadcrumbs=function(){n.removeClass("hidden")}},HZ.lb.plugins.GalleryComment=function(){var i,n;this.setOwner=function(t){i=t,n=$('<section class="lbInfoBox separator"></section>'),i.addInfoBoxToContentGroup(n[0],"galleryComment","")},this.imageChanged=function(){var t=i.getCurrentSpace(),e="";i.getContext().getType()!=HZ.lb.Config.CONTEXT_TYPE_IDEABOOK||i.isFullPageAd()||i.isSpotlightContext()||(n.show(),t.b&&(e='<div class="gallery-comment text-s">'+t.b+"</div>")),n.html(e)}},HZ.lb.SocialShareButtons={map:{facebook:{className:"uiButtonFacebook",fontClass:"hzi-Facebook",name:"Facebook",platform:HZ.utils.Config.socialSharePlatforms.facebook,compId:"shareOnFacebook"},twitter:{className:"uiButtonTwitter",fontClass:"hzi-Twitter",name:"Twitter",platform:HZ.utils.Config.socialSharePlatforms.twitter,compId:"shareOnTwitter"},googlePlus:{className:"uiButtonGooglePlus",fontClass:"hzi-Google",name:"Google+",platform:HZ.utils.Config.socialSharePlatforms.googlePlus,compId:"shareOnGooglePlus"},vkontakte:{className:"uiButtonVkontakte",fontClass:"hzi-Vkontakte",name:"Vkontakte",platform:HZ.utils.Config.socialSharePlatforms.vkontakte,compId:"shareOnVkontakte"},odnoklassniki:{className:"uiButtonOdnoklassniki",fontClass:"hzi-Odnoklassniki",name:"Odnoklassniki",platform:HZ.utils.Config.socialSharePlatforms.odnoklassniki,compId:"shareOnOdnoklassniki"},line:{className:"uiButtonLine",fontClass:"hzi-Line",name:"line",platform:HZ.utils.Config.socialSharePlatforms.line,compId:"shareOnLine"}},shareLink:function(t,e){HZ.spaceActions.Share.openShareWindowForSpace(e,t)}},HZ.lb.plugins.SpaceShareButtons=function(){var n,i,s;this.setOwner=function(t){n=t,i=$("<span>"),n.addActionItem(i.get(0),HZ.lb.ActionBar.ACTION_BAR_CENTER)},this.showShareDialog=function(){n.showDialog(shareDialog)},this.imageChanged=function(){var t,e,o,a;s||(t=HZ.utils.Html.escapeHtmlEntities(_hgt("Embed this photo on blog")),e=HZ.utils.Html.escapeHtmlEntities(_hgt("Print Photo")),i.append(HZ.utils.Html.template('<span class="hzBtn med tint expand">\t\t\t\t\t\t\t\t\t\t<ul class="shelf unstyled" data-items="5">\t\t\t\t\t\t\t\t\t\t\t<li class="item">\t\t\t\t\t\t\t\t\t\t\t\t<a class="hzi-font hzi-Embed icon" compid="embed" title="%EMBED_TITLE%" href="javascript:;"></a>\t\t\t\t\t\t\t\t\t\t\t</li>\t\t\t\t\t\t\t\t\t\t\t<li class="item">\t\t\t\t\t\t\t\t\t\t\t\t<a class="hzi-font hzi-Print icon" compid="print" title="%PRINT_TITLE%" href="javascript:;"></a>\t\t\t\t\t\t\t\t\t\t\t</li>\t\t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t\t\t<i class="icon-font icon-box_up_arrow icon"></i>\t\t\t\t\t\t\t\t\t</span>',{EMBED_TITLE:t,PRINT_TITLE:e})),i.on("click",".hzi-Embed",HZ.lb.plugins.SpaceActions.handleEmbed),i.on("click",".hzi-Print",HZ.lb.plugins.SpaceActions.handlePrint),e=HZ.lb.Config.socialListConfig||[],o=HZ.lb.SocialShareButtons.map,a=i.find(".shelf"),e.forEach(function(t){var e,i,n=o[t];n&&(e=n.fontClass,i=n.compId,t=n.name,t=HZ.utils.Html.escapeHtmlEntities(_hgt("Share a link on {socialPlatform}",{socialPlatform:t})),$(HZ.utils.Html.template('<li class="item">\t\t\t\t\t\t\t\t\t<a class="hzi-font icon %CSS_CLASS%" compid="%COMP_ID" title="%TITLE_ATTR%" href="javascript:;"></a>\t\t\t\t\t\t\t\t</li>',{CSS_CLASS:e,COMP_ID:i,TITLE_ATTR:t})).appendTo(a).click(this.handleShareButtonClick.bind(this,n.platform)))}.bind(this)),s=!0)},this.handleShareButtonClick=function(t,e){var i=n.getCurrentSpace();HZ.spaceActions.Share.openShareWindowForSpace(t,i.id),e.stopPropagation()}},HZ.lb.plugins.SpaceShareDialog=function(){var o,e,s,a,l='<li class="lb-share-dialog__list-item">\t\t\t\t\t\t\t\t\t<a compid="%COMP_ID%" title="%TITLE_ATTR%" href="javascript:;">\t\t\t\t\t\t\t\t\t\t<i class="hzi-font %CSS_CLASS% icon lb-share-dialog__list-item-icon"></i>\t\t\t\t\t\t\t\t\t\t<span class"lb-share-dialog__list-item-label">%LABEL%</span>\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t</li>';this.setOwner=function(t){o=t;var e={iconClass:"icon-font icon-box_up_arrow icon",compId:"lb_share",label:_hgt("Share"),index:0,handler:this.showShareDialog.bind(this)};o.addMoreMenuItem(e);var t={SHARE_TITLE:HZ.utils.Html.escapeHtmlEntities(_hgt("Share your idea with others:")),EMBED_TITLE:HZ.utils.Html.escapeHtmlEntities(_hgt("Embed")),PRINT_TITLE:HZ.utils.Html.escapeHtmlEntities(_hgt("Print"))},e=$(HZ.utils.Html.template('<div class="lb-share-dialog trackMe">\t\t\t\t\t\t\t\t\t<div class="lb-share-dialog__title">%SHARE_TITLE%</div>\t\t\t\t\t\t\t\t\t<ul class="lb-share-dialog__list unstyled">\t\t\t\t\t\t\t\t\t\t<li class="lb-share-dialog__list-item">\t\t\t\t\t\t\t\t\t\t\t<a class="embed-btn" compid="embed" title="%EMBED_TITLE%" href="javascript:;">\t\t\t\t\t\t\t\t\t\t\t\t<i class="icon-font icon-left_slash_right icon lb-share-dialog__list-item-icon"></i>\t\t\t\t\t\t\t\t\t\t\t\t<span class"lb-share-dialog__list-item-label">%EMBED_TITLE%</span>\t\t\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t\t\t</li>\t\t\t\t\t\t\t\t\t\t<li class="lb-share-dialog__list-item">\t\t\t\t\t\t\t\t\t\t\t<a class="print-btn" compid="print" title="%PRINT_TITLE%" href="javascript:;">\t\t\t\t\t\t\t\t\t\t\t\t<i class="icon-font icon-printer icon lb-share-dialog__list-item-icon"></i>\t\t\t\t\t\t\t\t\t\t\t\t<span class"lb-share-dialog__list-item-label">%PRINT_TITLE%</span>\t\t\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t\t\t</li>\t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div>',t)),t=HZ.lb.Config.socialListConfig||[],i=HZ.lb.SocialShareButtons.map,n=e.find(".lb-share-dialog__list");t.reverse().forEach(function(t){var e=i[t];e&&(t={CSS_CLASS:e.fontClass,COMP_ID:e.compId,LABEL:e.name,TITLE_ATTR:HZ.utils.Html.escapeHtmlEntities(_hgt("Share a link on {socialPlatform}",{socialPlatform:e.name}))},t=$(HZ.utils.Html.template(l,t)),n.prepend(t),t.click(this.handleShareButtonClick.bind(this,e.platform)))}.bind(this)),a=new HZ.ui.yamdi.Dialog;t=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Done"),_hgt("cancel"),function(){HZ.ui.Yamdi.hide()});a.init({dialogClassName:"lb-share-dialog",title:_hgt("Share"),body:e.get(0),controls:[t],hideDialogOnBgClick:!0,hideDialogOnEsc:!0,preferredWidth:350}),a.setVerticallyCentered(!0),e.on("click",".embed-btn",function(){HZ.ui.yamdi.Common.hideAllDialogs(),HZ.lb.plugins.SpaceActions.handleEmbed()}),e.on("click",".print-btn",function(){HZ.ui.yamdi.Common.hideAllDialogs(),HZ.lb.plugins.SpaceActions.handlePrint()}),s=!0},this.showShareDialog=function(){o.showDialog(a)},this.imageChanged=function(){var t,o,a;s||(e.on("click",".hzi-Embed",HZ.lb.plugins.SpaceActions.handleEmbed),e.on("click",".hzi-Print",HZ.lb.plugins.SpaceActions.handlePrint),t=HZ.lb.Config.socialListConfig||[],o=HZ.lb.SocialShareButtons.map,a=e.find(".shelf"),t.forEach(function(t){var e,i,n=o[t];n&&(e=n.fontClass,i=n.compId,t=n.name,t=HZ.utils.Html.escapeHtmlEntities(_hgt("Share a link on {socialPlatform}",{socialPlatform:t})),$(HZ.utils.Html.template(l,{CSS_CLASS:e,COMP_ID:i,TITLE_ATTR:t})).appendTo(a).click(this.handleShareButtonClick.bind(this,n.platform)))}.bind(this)),s=!0)},this.handleShareButtonClick=function(t,e){var i=o.getCurrentSpace();HZ.spaceActions.Share.openShareWindowForSpace(t,i.id),e.stopPropagation()}},HZ.lb.plugins.AdminMenu=function(){var e,i,n,o,a,s=HZ.houseUtils.Permissions,l=HZ.lb.plugins.SpaceActions,r='<div id="lbAdminMenu">\t\t\t\t\t\t\t\t\t<a class="btn med tint tag" title="'+HZ.utils.Html.escapeHtmlEntities(_hgt("Edit Image Tags"))+'" href="javascript:;">\t\t\t\t\t\t\t\t\t\t<i class="hzi-font hzi-Add-Tag icon"></i>\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t\t<a id="lbEditButton" class="btn med tint edit" compid="lbEditButton" title="'+HZ.utils.Html.escapeHtmlEntities(_hgt("Toggle Edit Mode"))+'" href="javascript:;">\t\t\t\t\t\t\t\t\t\t<i class="hzi-font hzi-Edit icon"></i>\t\t\t\t\t\t\t\t\t</a>\t\t\t\t\t\t\t\t</div>';this.setOwner=function(t){e=t;t=$(r);(n=t).find("#lbEditButton").click($.proxy(l.handleEdit,l)),t.find(".hzi-Add-Tag").parent().click($.proxy(l.handleImageTag,l)),i=t.get(0),e.addActionItem(i,HZ.lb.ActionBar.ACTION_BAR_RIGHT)},this.imageChanged=function(){this.updateDisplay()},this.imageDataUpdated=function(){this.updateDisplay()},this.updateDisplay=function(){var t=e.getCurrentSpace();t&&(o=!!s.hasPermission(t,s.CAN_EDIT_HOUSE)&&!e.isSketch(),a=!!s.hasPermission(t,s.CAN_EDIT_IMAGE_TAGS)&&!e.isSketch()&&!t.isv),n.toggleClass("can-edit",o),n.toggleClass("can-tag",a)}},HZ.lb.plugins.BrowserHistoryManager=new function(){var r,d,e,i=!0,n=!1,c=!0;this.setOwner=function(t){r=t,d=window.history.location||window.location},this.setEnabled=function(t){i=t},this.updateHistory=function(){var t=r.getCurrentSpace(),e=history.state;if(c||e&&e.spaceId!==t.id){for(var i=r.getContextStack(),n=[],o=0;o<i.length;o++)n.push(i[o].getName());var a=HZ.utils.Styles.getStyleUrl(t.s),s=HZ.data.Categories.getCategoryById(t.cat),l=HZ.data.Users.get(t.ow),e=null;null!==l&&(e=l.d);s=HZ.utils.PageTitles.getViewSpacePageTitle(t.t,a,s?s.name:null,t.ma,e),e=HZ.utils.Links.getSpaceLink(t.id),e=d&&0===d.protocol.indexOf("https")?e.replace("http://","https://"):e.replace("https://","http://");r.isEditMode()&&(e+="#lb-edit"),t={spaceId:t.id,contextName:n},c?(r.isViewSpace()?history.replaceState(t,s,e):history.pushState(t,s,e),c=!1):history.replaceState(t,s,e)}},this.imageChanged=function(){i&&this.updateHistory()},this.lightboxLoaded=function(){i&&(e=d.href,n=!0,$(window).on("popstate",function(t){t=t.state;n&&(d.href===e?r.hide():t&&t.spaceId!==r.getCurrentSpace().id&&r.reload(t.spaceId,t.contextName))}))},this.lightboxUnloaded=function(){i&&(c=!(n=!1),d.href!==e&&history.back())}},HZ.lb.plugins.TrackingManager=function(){var s,l,r;this.setOwner=function(t){s=t,(l=document.createElement("div")).id="lbTrackingIframe",s.addImageLayer(l)},this.imageChanged=function(){var t=!0;switch(HZ.lb.Config.TRACK_IMPRESSIONS){case!1:t=!1;break;case"CONTEXT_ONLY":t=1<s.getContextStack().length}t&&!s.isEditMode()&&this.sendImpressionReport()},this.sendImpressionReport=function(){r&&(r.stop&&r.stop(),l.removeChild(r));var t,e=s.getCurrentSpace(),i=(HZ.utils.Styles.getStyleUrl(e.s),HZ.data.Categories.getCategoryById(e.cat),HZ.utils.Links.getSpaceLink(e.id)),n=window.location&&0==window.location.protocol.indexOf("https");if(n&&(i=i.replace("http://","https://")),i+="?lightbox=on",(r=document.createElement("iframe")).src=i,l.appendChild(r),e&&HZ.data.HouzzImpTracking.get(e.id)&&(t=HZ.data.HouzzImpTracking.get(e.id))&&0<t.length)for(var o=0;o<t.length;o++){var a=t[o];a&&0<a.length&&HZ.lb.Utils.registerTrackingUrl(a,e.id)}}},HZ.lb.plugins.AlternativeImages=new function(){var r,d,e;this.setOwner=function(t){r=t,d=$('<div class="alt-images">'),e=d.get(0),r.addImageControl(e),d.click(this.handleThumbClicked.bind(this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){if(!r.isEditMode()){var t=r.getCurrentSpace(),e=t.id,i="",n=t.iids.length,o=1==n;if(0<n)for(var i="",a=0;a<n;a++){var s=HZ.utils.Links.getSpaceImageUrl(e,60,60,null,null,a),l=0==a?"selected":"";o&&(l+=" hide"),i+=HZ.utils.Html.template('<img s="%SPACE_ID%" width="%WIDTH%" height="%HEIGHT%" class="%CSS_CLASS%" src="%SRC%" />',{SPACE_ID:e,INDEX:a,WIDTH:60,HEIGHT:60,CSS_CLASS:l,SRC:s})}d.html(i),d.css("top",-d.parent().height()/2+"px")}},this.handleThumbClicked=function(t){var e=$(t.target),t=e.index();$.isNumeric(t)&&(d.find("img").removeClass("selected"),e.addClass("selected"),HZ.lb.plugins.ImageViewer.setActiveSpaceImageIndex(t))}},HZ.lb.plugins.Comments=function(){var g,e,m,i=HZ.lb.Config.contentGroupIds.DISCUSSION;this.setOwner=function(t){g=t,e=$('<section id="lbComments" class="lbInfoBox separator trackMe"></section>'),m=e.get(0),g.addInfoBoxToContentGroup(m,"comments",i),e.click($.proxy(this.handleDivClicked,this))},this.imageDataUpdated=function(){this.imageChanged()},this.imageChanged=function(){this.updateContents()},this.updateContents=function(){var t,e="",i="",n=g.getCurrentSpace(),o=n.bc;if(n&&n.fullyLoaded&&0<o){var a=n.bcf,s=g.isColorPickerSavedPalette();if(n.commentsLoaded)if(t=HZ.data.Comments.get(n.id)){for(var l in t)for(var r=t[l],d=0;r&&d<r.length;d++){var c=r[d],u=c.c,p=HZ.utils.Links.getGalleryLink(c.gid),h=c.title,p={tag:"a",attr:{href:p,target:"_blank"}};i+="<div class='commentsItem'>",i+="<div class='commentsItemUser'>"+HZ.ui.render.User.getUserImageHtml(c.uid,!0)+"</div>",i+="<div class='commentsItemText text-s'><small class='text-xs' scopeid='idbk_view'>"+_hgt("Added to <t1>{galleryTitle}</t1>:",{t1:p,galleryTitle:h})+'</small><br>"'+u+'"</div>',i+="</div>"}i&&(e="<div class='title text-m text-bold'>",n.prod?e+=_hgtp("","This Product was added to {ideabookCount} ideabook:","This Product was added to {ideabookCount} ideabooks, including:",o,{ideabookCount:a}):e+=s?_hgtp("","This Palette was added to {ideabookCount} ideabook:","This Palette was added to {ideabookCount} ideabooks, including:",o,{ideabookCount:a}):_hgtp("","This Photo was added to {ideabookCount} ideabook:","This Photo was added to {ideabookCount} ideabooks, including:",o,{ideabookCount:a}),e+="</div>",e+="<div class='commentsList'>"+i+"</div>")}else e+="<div class='title text-m text-bold'>",n.prod?e+=_hgtp("","This Product was added to {ideabookCount} ideabook.","This Product was added to {ideabookCount} ideabooks.",o,{ideabookCount:a}):e+=s?_hgtp("","This Palette was added to {ideabookCount} ideabook.","This Palette was added to {ideabookCount} ideabooks.",o,{ideabookCount:a}):_hgtp("","This Photo was added to {ideabookCount} ideabook.","This Photo was added to {ideabookCount} ideabooks.:",o,{ideabookCount:a}),e+="</div>";else e+="<div class='title text-m text-bold'>",n.prod?e+=_hgtp("","This Product was added to {ideabookCount} ideabook.","This Product was added to {ideabookCount} ideabooks.",o,{ideabookCount:a}):e+=s?_hgtp("","This Palette was added to {ideabookCount} ideabook.","This Palette was added to {ideabookCount} ideabooks.",o,{ideabookCount:a}):_hgtp("","This Photo was added to {ideabookCount} ideabook.","This Photo was added to {ideabookCount} ideabooks.",o,{ideabookCount:a}),e+=" <a href='javascript:;' class='loadComments text-bold text-s icon-wrap'>"+_hgt("More")+"<span class='more-icon'></span></a>",e+="</div>"}m.innerHTML=e},this.handleDivClicked=function(t){g.getCurrentSpace().commentsLoaded?this.updateAndFocus():this.loadComments()},this.loadComments=function(){HZ.lb.plugins.SpaceDataLoader.loadSpaceBuzz().then(function(){this.updateAndFocus()}.bind(this))},this.updateAndFocus=function(){this.updateContents(),g.scrollToSelector("#lbComments")}},HZ.lb.plugins.PaletteSourcePhoto=function(){var o,i,a,e=HZ.lb.Config.contentGroupIds.OVERVIEW;this.setOwner=function(t){o=t,i=$('<section id="lbPaletteSourcePhoto" class="lbInfoBox separator"></section>')[0],o.addInfoBoxToContentGroup(i,"paletteSourcePhoto",e),$(i).click(this.handleDivClicked)},this.imageChanged=function(){var t,e=o.getCurrentSpace();o.isColorPickerSavedPalette()?($(i).closest(".column").addClass("o-visible"),a&&(t=a.id),(a=HZ.data.ColorPaletteSource.get(e.id))&&0<a.id&&a.id!=t&&(e="",t=HZ.utils.Links.getSpaceImageUrl(a.id,142,142),e+="<div class='sourcePhotoContainer'>",e+="<div class='title text-s text-bold mbm'>",e+="<a class='sourcePhoto' target='_blank' href='"+a.u+"'>",e+=_hgt("Colors from this space"),e+="<span class='more-icon'></span>",e+="</a>",e+="</div>",e+="<div id='spaceImage'>",e+="<img width='142' height='142' s='"+a.id+"' i='0' class='rowFirst' src='"+t+"'>",e+="<div class='title' s='"+a.id+"' i='0'>"+a.t+"</div>",e+="</div>",i.innerHTML=e+="</div>")):(a=null,i.innerHTML="")},this.imageDataUpdated=function(){this.imageChanged()},this.handleDivClicked=function(t){var e,i=$(t.target),n=o.getCurrentSpace();(i=!i.attr("s")?i.parent("div"):i).attr("s")&&(e=i.attr("s"),t=i.attr("i"),a&&((i={})[HZ.lb.Config.DESCRIPTOR_FIELD_SPACE_ID]=a.id,(t=new HZ.lb.Context("palette_source_photo_"+n.id,HZ.lb.Config.CONTEXT_TYPE_PALETTE_SOURCE_PHOTO,i,[a.id],1,t+1,-1)).setCurrentSpaceId(e),o.pushContext(t),o.refresh()))}},HZ.lb.plugins.ShoppingCart=function(){var e,i,n,o,a,s,l,r,d;this.setOwner=function(t){e=t},this.lightboxLoaded=function(){var t;(i=HZ.lb.Config.isCheckoutEnabled)&&(d=HZ.data.cachedCartCount,t=this.formatCartCount(d),t={TITLE_ATTR:_hgt("View Your Shopping Cart"),CART_URL:HZ.utils.Config.viewShoppingCartUrl,CART_COUNT:t},n=$("#lbCart").length?$("#lbCart"):$(HZ.utils.Html.template('<div id="lbCart" class="hidden"><a class="cart-info" title="%TITLE_ATTR%" href="%CART_URL%" target="_blank"><i class="cart-icon icon-font icon-shopping_cart"></i><span class="cart-count">%CART_COUNT%</span></a></div>',t)).appendTo($("#lbMainControls")),o=n.find(".cart-count"),a=$('<div class="cart-preview-pos hidden"><div class="cart-preview-scroll"><div class="cart-preview"><div class="cart-loading"></div></div></div></div>'),s=a.find(".cart-preview-scroll"),l=a.find(".cart-preview"),l.find(".cart-loading"),e.addOverlaidContent(a),HZ.cart.Actions.subscribeCartUpdate("lightbox",this.onCartUpdate.bind(this)),this.updateCartDisplay(d),n.hover(this.showCartPreview.bind(this)),a.on("mouseleave",this.showCartPreview.bind(this)))},this.showCartPreview=function(t){switch(l.is(".loading, .loaded")?this.updateCartStickyButton():(l.addClass("loading"),HZ.ajaz.Services.Cart.getCartDetails(this.handleCartDetailsResponse.bind(this))),t.type){case"mouseenter":a.removeClass("hidden"),n.addClass("lb-cart--active");break;case"mouseleave":t.relatedTarget!=a.get(0)&&(a.addClass("hidden"),n.removeClass("lb-cart--active"))}},this.handleCartDetailsResponse=function(t){t&&this.updateCartPreviewDisplay(t.cartHeaderHTML),l.removeClass("loading").addClass("loaded")},this.onCartUpdate=function(t,e){void 0!==e.cartCount&&(HZ.data.cachedCartCount=e.cartCount,this.updateCartDisplay(e.cartCount,e.cartHeaderHTML))},this.updateCartDisplay=function(t,e){$.isNumeric(t)&&i?(o.html(this.formatCartCount(t)),e&&this.updateCartPreviewDisplay(e),n.removeClass("hidden")):n.addClass("hidden")},this.updateCartPreviewDisplay=function(t){l.empty().append(t),r=l.find(".viewCart").clone().addClass("view-cart--sticky").appendTo(a),this.updateCartStickyButton()},this.formatCartCount=function(t){return 9<t?"9+":t},this.imageResized=function(){this.updateCartStickyButton()},this.updateCartStickyButton=function(){var t;i&&(t=(t=s.get(0)).offsetHeight<t.scrollHeight,r&&r.toggleClass("hidden",!t))}},HZ.lb.plugins.PPCAdInfoRenderer=new function(){var C;this.setOwner=function(t){C=t},this.imageChanged=function(){},this.imageDataUpdated=function(){},this.writeContent=function(t,e,i,n){var o,a=$(e);if(!C.isEditMode()&&(o=t?HZ.data.PPCAds.get(t.id):o)&&!(C.isFeaturedGalleryContext()||C.isFullPageAd()||C.isSpotlightContext()||C.isProductAd()||C.isColorPickerSavedPalette())){if(o.products&&0<o.products.length){for(var e=HZ.lb.Utils.calculateThumbWidth(C.getContentBox().w-32,i,8),s=e,l=e,r=[],d=Math.min(o.products.length,n),c=0;c<d;c++){var u=o.products[c],p=u.sid,h=HZ.utils.Links.getSpaceImageUrl(p,s,l,1),g=u.tlink,m=u.p;HZ.utils.Html.template(HZ.lb.Templates.THUMB_META_TEMPLATE,{PRICE:m});r.push({SPACE_ID:p,CLICK_URL:g,INDEX:c,IMG_SRC:h,WIDTH:s,HEIGHT:l,OVERLAY_TEXT:u.mp?_hgt("Shop Houzz"):_hgt("Visit Store"),PPC_INFO:m})}a.append(HZ.lb.RenderUtils.renderSectionHeader(_hgt("Sponsored Products"))),a.append(HZ.lb.RenderUtils.renderThumbGrid(i,r,"",HZ.lb.Templates.PPC_THUMB,"lb_ppc_products"))}o.impTrkLink&&HZ.lb.Utils.registerTrackingUrl(o.impTrkLink,t.id)}}},HZ.lb.plugins.FeaturedSalesRenderer=new function(){var g,e,i=HZ.lb.Config.contentGroupIds.PRODUCTS;this.setOwner=function(t){g=t,e=$('<section id="lbFeaturedSales" class="lbInfoBox featured-sales separator"></section>')[0],g.addInfoBoxToContentGroup(e,"featured-sales",i)},this.imageChanged=function(){var t=g.getCurrentSpace();$(e).empty(),HZ.lb.plugins.FeaturedSalesRenderer.writeContent(t,e,1,2)},this.imageDataUpdated=function(){this.imageChanged()},this.writeContent=function(t,e,i,n){var o,e=$(e);if(!g.isEditMode()&&(o=t?HZ.data.FeaturedSales.get(t.id):o)&&!(g.isFeaturedGalleryContext()||g.isFullPageAd()||g.isSpotlightContext()||g.isProductAd()||g.isColorPickerSavedPalette())&&o.galleries&&0<o.galleries.length){for(var a=[],s=Math.min(o.galleries.length,n),l=0;l<s;l++){var r=o.galleries[l],d=r.galleryId,c=r.imgSpaceId,u=HZ.utils.Links.getSpaceImageUrl(c,128,128),p=r.url,h=r.title,c=r.subTitle,r=r.salePercentOffHtml;a.push({TITLE:h,SUB_TITLE:c,SPACE_ID:d,CLICK_URL:p,INDEX:l,IMG_SRC:u,WIDTH:128,HEIGHT:128,SALE_PERCENT_OFF_HTML:r,OVERLAY_TEXT:_hgt("Shop Houzz")})}e.append(HZ.lb.RenderUtils.renderSectionHeader(_hgt("Shop Houzz"))),e.append(HZ.lb.RenderUtils.renderThumbGrid(i,a,"featured-sale",HZ.lb.Templates.FEATURED_SALES_THUMB,"lb_featured_sales"))}}},HZ.lb.plugins.FooterPromo=function(){var e,i,n=null,o={TYPE:"trade",template:'<div id="footerTradePromo" class="trade-promo trade-promo--footer" scopeId="trade_promo" compid="footer_card"><div class="trade-promo__body"><div class="trade-promo__img"><img src="%IMG_URL%"/></div><p class="trade-promo__message mtm mbm ms300">%BODY%</p><a target="_blank" class="trade-promo__link btn btn-primary btn-lg" href="%URL%">%CTA%</a><button class="trade-promo__dismiss btn btn-link text-s"><span class="text-s text-gray-lightest icon-font icon-close"></span></button></div>'};this.setOwner=function(t){i=t,e=$('<div id="lbFooterPromo"/>'),i.addLbImageLayer(e),$("#lbFooterPromo").on("click",".trade-promo__dismiss",this.onDismissTradePromo)},this.imageChanged=function(){var t=i.isProduct(),e=null;(e=HZ.lb.Config.isTradePromoEnabled&&t?o.TYPE:null)!==n?(n=e,this.updatePromo(this.getPromoHTML(e))):e||(n=null,this.hidePromo())},this.getPromoHTML=function(t){var e="";return t===o.TYPE&&(e=this.writeTradePromo(),HZ.utils.Logger.sendEventLogLightweight("tp_promo_footer",{page:"lb"})),e},this.writeTradePromo=function(){var t=_hgt("Unlock trade pricing on millions of products with the <t1>Houzz Trade Program</t1>",{t1:{tag:"span",attr:{class:"highlighted"}}});return $(HZ.utils.Html.template(o.template,{BODY:t,CTA:_hgt("Join Now"),IMG_URL:HZ.utils.Links.getPicUrl("trade_promo_furniture_bw.svg"),URL:HZ.utils.Links.getPageUrl("trade-program")}))},this.updatePromo=function(t){e.html(t)},this.hidePromo=function(){e.empty()},this.onDismissTradePromo=function(){HZ.TradePromo&&HZ.TradePromo.dismiss&&HZ.TradePromo.dismiss()}},HZ.lb.plugins.ContentFooter=function(){var o,l="compactLabel",r="relAttr",d="targetAttr",c="classAttr",u="titleAttr",p="htmlLiteral",a="copyrightNotice",s={},h=["termsOfUse","privacyPolicy",a];this.setOwner=function(t){o=t},this.getFooterItemHtml=function(t){var e,i,n,o,a,s;return t.hasOwnProperty(p)?t[p]:(e=t.hasOwnProperty("url")?t.url:"",i=t.hasOwnProperty(l)?t[l]:t.hasOwnProperty("label")?t.label:"",n="",(s=t.hasOwnProperty("compId")?t.compId:"").length&&(n=HZ.utils.Html.template('compid="lb_%COMP_ID%"',{COMP_ID:s})),o=t.hasOwnProperty(u)?t[u]:"",a=t.hasOwnProperty(d)?t[d]:"",s=t.hasOwnProperty(r)?t[r]:"",t=t.hasOwnProperty(c)?t[c]:"",HZ.utils.Html.template('<a href="%URL%" %COMP_ID_ATTR% %TITLE_ATTR% %TARGET_ATTR% %REL_ATTR% %CLASS_ATTR%>%LABEL%</a>',{URL:e,COMP_ID_ATTR:n,TITLE_ATTR:o,TARGET_ATTR:a,REL_ATTR:s,CLASS_ATTR:t,LABEL:i}))},this.lightboxLoaded=function(){var e,i,t=o.getContentFooter(),n=o.isViewSpace();t.is(":empty")&&n&&"false"!==n&&(e=[],i=$.extend(!0,{},HZ.lb.Config.footerData),h.forEach(function(t){s[t]=HZ.lb.Config.footerData[t],delete i[t]}),Object.keys(i).forEach(function(t){t=i[t],t=$("<li>").append(this.getFooterItemHtml(t)).addClass("text-xs");e.push($("<div>").append(t).html())}.bind(this)),(n=$("<li>")).append(s[a].label),e.push($("<div>").append(n).html()),t.append(HZ.utils.Html.template('<div class="row trackMe text-center"><div class="col-xs-10 col-xs-offset-1"><ul class="list-unstyled list-inline">%FOOTER_ITEMS%</ul></div></div>',{FOOTER_ITEMS:e.join("")})))}},HZ.lb.plugins.Analytics=function(){var i,n,o,a;this.setOwner=function(t){i=t,this.reset()},this.reset=function(){o={scroll:{}},n=null,a=0},this.imageChanged=function(){var t=i.getCurrentSpace().id,e=!0;if(n!=t){switch(HZ.lb.Config.TRACK_IMPRESSIONS){case!1:e=!1;break;case"CONTEXT_ONLY":e=1<i.getContextStack().length}e&&!i.isEditMode()&&this.sendImpressionReport()}n=t},this.sendImpressionReport=function(){var t=1<i.getContextStack().length,e=i.getContext(),t={isChild:t};$.extend(!0,t,e.getDescriptor()),t.bd&&!$.isPlainObject(t.bd)&&(t.bd=JSON.parse(t.bd));e=e.getCursorPosition(),e={spaceId:i.getCurrentSpace().id,lbType:i.isProduct()?"product":"photo",ctx:t,idx:e};n?e.previousSpaceId=n:e.isFirstLightbox=!0,HZ.utils.Logger.sendEventLogLightweight("lb_impression",e)},this.imageDataUpdated=function(){},this.lightboxScroll=function(){var t,e=i.getContentScrollTop();a<e&&30<e?(t=i.getCurrentSpace().id,o.scroll[t]||(o.scroll[t]=this.sendScrollReport())):a=e},this.sendScrollReport=function(){var t={spaceId:i.getCurrentSpace().id,type:i.isProduct()?"product":"space"};return HZ.utils.Logger.sendEventLogLightweight("lb_scroll",t)},this.lightboxLoaded=function(){this.reset()},this.lightboxUnloaded=function(){this.reset()}},HZ.lb.plugins.LightBoxTips={owner:null,targetSelector:"#lbActionsCenter .save",bubbleWidth:420,offsetX:null,setOwner:function(t){this.owner=t,HZ.lb.Config.showSavePhotoTip&&$(".btn.save").one("click.lightBoxTip",function(){$("#savePhotoTip .close").click()})},getContent:function(){return"<i class='homepageTipIcon hzi-font hzi-Photos-Heart'></i><div class='homepageTipContent'><div class='homepageTipTitle text-l'><p></p></div><div class='homepageTipMsg text-m'><p>"+_hgt("Save ideas for your dream home in one place and access on any device.")+"</p></div></div>"},calculateOffsetX:function(){var t=$(this.targetSelector);return t?(targetPaddingLeft=parseInt(t.css("padding-left")),targetMarginLeft=parseInt(t.css("margin-left")),targetBorder=parseInt(t.css("borderLeftWidth")),targetWidth=t.width(),targetWidth/2+targetBorder+targetMarginLeft+targetPaddingLeft-this.bubbleWidth/2):0},getOffsetX:function(){return null===this.offsetX&&(this.offsetX=this.calculateOffsetX()),this.offsetX},setTitle:function(){var t=$("#lbActionsCenter .homepageTipTitle > p");this.owner.isProduct()?t.html(_hgt("Save this product for yourself")):t.html(_hgt("Save this photo for yourself"))},lightboxLoaded:function(){var t=$(this.targetSelector);t&&(this.owner.setAutoHideSpaceActionsEnabled(!1),HZ.utils.Logger.sendEventLogLightweight("lightBoxTipShown",{}),t.tipBubble({content:this.getContent(),point:"south",width:this.bubbleWidth,position:"absolute",showCloseBtn:!0,id:"savePhotoTip",offsetX:this.calculateOffsetX(),borderColor:"#d6d6d6",fadeDuration:0,onHide:$.proxy(function(){HZ.lb.Config.showSavePhotoTip=!1,this.owner.setAutoHideSpaceActionsEnabled(!0),this.owner.removePlugin(HZ.lb.plugins.LightBoxTips),HZ.ajaz.Services.setVisitorProperty(HZ.ajaz.Services.VISITOR_PROPERTY_SHOW_SAVE_PHOTO_TIP,HZ.ajaz.Services.VISITOR_PROPERTY_SHOW_SAVE_PHOTO_TIP_OFF)},this)}),this.setTitle())},imageResized:function(){var t=$(this.targetSelector);t&&(t.tipBubble("show",{offsetX:this.calculateOffsetX()}),this.setTitle())},imageChanged:function(){var t=$(this.targetSelector);t&&(t.tipBubble("show",{offsetX:this.calculateOffsetX()}),this.setTitle())}},HZ.lb.plugins.SaveToUniversalGallery=function(){var e;this.setOwner=function(t){e=t,$(document).on("dialogOpened.saveToUniversalGallery",function(){e.isShowing()&&e.detachKeyboardHandler()}).on("dialogClosed.saveToUniversalGallery",function(){e.isShowing()&&e.attachKeyboardHandler()})}},HZ.lb.plugins.ProPerceptionBanner=function(){var n,o=!1;this.setOwner=function(t){n=t},this.imageChanged=function(){var t=$("#lbImageContainer"),e=n.getCurrentSpace(),i=HZ.modules.ProPerceptionBanner;i&&0!==t.length&&(e.spp?(o||(o=!0,i.init(t)),i.show(e)):i.hide())},this.imageDataUpdated=function(){this.imageChanged()}},HZ.lb.plugins.VisualMatchRightRail=new function(){var a,e=!1;this.setOwner=function(t){0},this.imageChanged=function(){var t=$("#lbMain");a=HZ.modules.VisualMatchRightRail,!e&&a?(e=!0,a.init(t)):e&&this.hide()},this.showNote=function(t){var e=t.tag,t={selectedTag:{tagId:e.tid,vendorName:e.v,comments:e.c,type:e.t},onClose:t.onClose||this.hide};a&&a.show(t)},this.show=function(t){var e=t.tag,i=t.recognitionData,n=e.sid,o=HZ.data.Spaces.get(e.sid),t={selectedTag:{targetSpaceId:n,tagId:e.tid,type:e.t},isOutOfStock:t.isOutOfStock,onBestMatchClick:t.onBestMatchClick,onRelatedClick:t.onRelatedClick,onClose:t.onClose||this.hide};o&&(t.targetSpace={title:o.t,imageId:this.getSpaceImageId(n),price:o.price}),i&&(i.sids&&(t.relatedProudcts=i.sids.map(function(t){var e=HZ.data.Spaces.get(t);return{spaceId:t,title:e.t,imageId:this.getSpaceImageId(t),price:e.price}},this)),t.relatedLinks=i.labels),a&&a.show(t)},this.hide=function(){a&&a.hide()},this.getSpaceImageId=function(t,e){var i=null,e=e||0,t=HZ.data.Spaces.get(t);return t&&(t.iids&&t.iids[e]?i=t.iids[e]:t.ift&&(i=HZ.utils.Image.getPlaceHolderImageId(t.ft))),i}},HZ.lb.plugins.JukwaaDialogController=function(){var e;this.setOwner=function(t){e=t,$(document).on("dialogOpened.JukwaaDialogController",function(){e&&e.isShowing()&&e.detachKeyboardHandler()}).on("dialogClosed.JukwaaDialogController",function(){e&&e.isShowing()&&e.attachKeyboardHandler()})}},HZ.lb.plugins.ActionBarMoreMenu=function(){var e;this.setOwner=function(t){e=t,HZ.lb.plugins.ImageViewer.hideExpandBtn();t=$('<a id="lbMoreMenuBtn" href="javascript:;" class="btn med tint" compid="lb_more_menu"><i class="icon icon-font icon-ellipsis"></i></a>');e.addActionItem(t,HZ.lb.ActionBar.ACTION_BAR_RIGHT),t.click(e.toggleMoreMenu.bind(e))},this.imageChanged=function(){e.hideMoreMenu()},this.actionsBarHidden=function(){e.hideMoreMenu()}},HZ.lb.Lightbox.initPlugins=function(){var t,e,i,n,o;HZ.lb.Lightbox.pluginsInitialized||(t=HZ.lb.Config.enableTagBoundingBox,e=HZ.lb.Config.enableTagsRedesign,i=HZ.lb.Config.isViewSpace,n=HZ.lb.Config.isCheckoutEnabled,o=HZ.lb.Config.enableCombinedRecommendPhotos,lightbox.addPlugin(new HZ.lb.plugins.Analytics),lightbox.addPlugin(HZ.lb.plugins.PhotoRelatedProducts),lightbox.addPlugin(HZ.lb.plugins.PhotoRecommendations),lightbox.addPlugin(HZ.lb.plugins.PPCAdInfoRenderer),lightbox.addPlugin(HZ.lb.plugins.CommonSpecificationRenderer),lightbox.addPlugin(HZ.lb.plugins.SpaceActions),lightbox.addPlugin(new HZ.lb.plugins.ProductInfo),lightbox.addPlugin(new HZ.lb.plugins.MainButton),lightbox.addPlugin(new HZ.lb.plugins.PPCProductRelatedProducts),lightbox.addPlugin(new HZ.lb.plugins.MPProductVariation),lightbox.addPlugin(new HZ.lb.plugins.ProductIdeabookComment),lightbox.addPlugin(new HZ.lb.plugins.PreSalesPhone),lightbox.addPlugin(new HZ.lb.plugins.ProductDescription),lightbox.addPlugin(new HZ.lb.plugins.ProductSpecification),HZ.lb.Config.isProductDocumentUIEnabled&&lightbox.addPlugin(new HZ.lb.plugins.ProductDocuments),n&&(HZ.lb.Config.enableProductCollections&&lightbox.addPlugin(new HZ.lb.plugins.ProductCollections),lightbox.addPlugin(new HZ.lb.plugins.ProductRelatedProducts),lightbox.addPlugin(new HZ.lb.plugins.ProductRecommendedProducts),lightbox.addPlugin(new HZ.lb.plugins.VisuallySimilarProducts),lightbox.addPlugin(new HZ.lb.plugins.CoBuyProducts),lightbox.addPlugin(new HZ.lb.plugins.RecentlyViewedProducts)),lightbox.addPlugin(new HZ.lb.plugins.ProductsInRoom),lightbox.addPlugin(new HZ.lb.plugins.ProductReviews),lightbox.addPlugin(new HZ.lb.plugins.ProductListingsInfo),HZ.lb.Config.showSimpleVersionLightbox?(lightbox.addPlugin(new HZ.lb.plugins.ActionBarMoreMenu),lightbox.addPlugin(new HZ.lb.plugins.SpaceShareDialog)):lightbox.addPlugin(new HZ.lb.plugins.SpaceShareButtons),lightbox.addPlugin(new HZ.lb.plugins.SpaceAuthorInfo),lightbox.addPlugin(new HZ.lb.plugins.SpaceInfo),lightbox.addPlugin(new HZ.lb.plugins.ProjectInfo),lightbox.addPlugin(new HZ.lb.plugins.FooterPromo),lightbox.addPlugin(new HZ.lb.plugins.LocalProsContact),lightbox.addPlugin(new HZ.lb.plugins.SponsoredProLists),lightbox.addPlugin(new HZ.lb.plugins.ProductAdInfo),n&&i&&lightbox.addPlugin(new HZ.lb.plugins.SpaceRelatedProducts),lightbox.addPlugin(new HZ.lb.plugins.ColorPickerCTA),n&&(i||lightbox.addPlugin(new HZ.lb.plugins.SpaceRelatedProducts),lightbox.addPlugin(new HZ.lb.plugins.SpacePPCAdInfo),lightbox.addPlugin(HZ.lb.plugins.FeaturedSalesRenderer)),lightbox.addPlugin(new HZ.lb.plugins.SpaceRecommendations),o||lightbox.addPlugin(new HZ.lb.plugins.RelatedPhotos),lightbox.addPlugin(new HZ.lb.plugins.PaidProInfo),lightbox.addPlugin(new HZ.lb.plugins.MarketPlaceAds),lightbox.addPlugin(HZ.lb.plugins.Gtm),lightbox.addPlugin(new HZ.lb.plugins.AdminMenu),t?e?lightbox.addPlugin(new HZ.lb.plugins.ImageTags3):lightbox.addPlugin(new HZ.lb.plugins.ImageTags2):lightbox.addPlugin(HZ.lb.plugins.ImageTags),lightbox.addPlugin(new HZ.lb.plugins.ProductRecommendations),lightbox.addPlugin(new HZ.lb.plugins.PaletteSourcePhoto),lightbox.addPlugin(new HZ.lb.plugins.SpaceSpecification),lightbox.addPlugin(HZ.lb.plugins.QuestionsInfo),lightbox.addPlugin(new HZ.lb.plugins.Comments),lightbox.addPlugin(HZ.lb.plugins.AlternativeImages),lightbox.addPlugin(HZ.lb.plugins.ContextBreadcrumbs),lightbox.addPlugin(HZ.lb.plugins.BrowserHistoryManager),lightbox.addPlugin(new HZ.lb.plugins.ColorPicker),lightbox.addPlugin(new HZ.lb.plugins.ShoppingCart),lightbox.addPlugin(new HZ.lb.plugins.ContentTabs),lightbox.addPlugin(new HZ.lb.plugins.ContentFooter),lightbox.addPlugin(new HZ.lb.plugins.TrackClick),lightbox.addPlugin(new HZ.lb.plugins.TrackingManager),lightbox.addPlugin(new HZ.lb.plugins.SaveToUniversalGallery),lightbox.addPlugin(new HZ.lb.plugins.JukwaaDialogController),lightbox.addPlugin(new HZ.lb.plugins.ProPerceptionBanner),lightbox.addPlugin(HZ.lb.plugins.VisualMatchRightRail),HZ.lb.Lightbox.pluginsInitialized=!0,HZ.lb.Config.showSavePhotoTip&&lightbox.addPlugin(HZ.lb.plugins.LightBoxTips),e&&$("#lbImageContainer").addClass("lbImageContainer-with-new-tags"))},HZ.lb.Config.loadPluginsNow&&HZ.lb.Lightbox.initPlugins();

window.hzmr.push("lightbox2.2Plugins:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End lightbox2.2Plugins.js  **************/
/************* Start jQ-AjaxFileUpload.js for locale en-US **************/
try {!function(l){l.fn.ajaxfileupload=function(t){var i={params:{},action:"",onStart:function(){console.log("starting upload"),console.log(this)},onComplete:function(t){console.log("got response: "),console.log(t),console.log(this)},onCancel:function(){console.log("cancelling: "),console.log(this)},valid_extensions:["gif","png","jpg","jpeg","tif","tiff"],submit_button:null},s=!1;return t&&l.extend(i,t),HZ&&HZ.data&&HZ.data.CSRFToken&&(i.params.__ct=HZ.data.CSRFToken,i.params._csrf=HZ.data.CSRFToken),this.each(function(){var t,a,n,e=l(this),o=52428800;e.toArray().find(function(t){return!!t.files&&Object.values(t.files).some(function(t){return t.size>o})})&&!0&&i.onComplete.apply(e,[{status:!1,message:"The size of file(s) exceeds "+o+" bytes."},i.params]),!0!==e.data("ajaxUploader-setup")&&(e.change(function(){s=!1,null==i.submit_button&&t()}),null==i.submit_button||i.submit_button.click(function(){s||t()}),t=function(){if(""==e.val())return i.onCancel.apply(e,[i.params]);var t=e.val().split(".").pop().toLowerCase();"1"!=i.params.supportAllFiles&&-1==l.inArray(t,i.valid_extensions)?i.onComplete.apply(e,[{status:!1,message:"The select file type is invalid. File must be "+i.valid_extensions.join(", ")+"."},i.params]):(s=!0,n(e),!1!==i.onStart.apply(e)&&e.parent("form").submit())},e.data("ajaxUploader-setup",!0),a=function(n,t){var a,n=l(n).contents().find("body").text();try{a=l.parseJSON(l.trim(n))}catch(t){a=n}t.siblings().remove(),t.unwrap(),s=!1,i.onComplete.apply(t,[a,i.params])},n=function(t){var n="ajaxUploader-iframe-"+Math.round((new Date).getTime()/1e3);l("body").append('<iframe width="0" height="0" style="display:none;" name="'+n+'" id="'+n+'"/>'),l("#"+n).load(function(){a(this,t)}),t.wrap(function(){return'<form action="'+i.action+'" method="POST" enctype="multipart/form-data" target="'+n+'" />'}).after(function(){var t,n="";for(t in i.params)n+='<input type="hidden" name="'+t+'" value="'+i.params[t]+'" />';return n})})})}}(jQuery);

window.hzmr.push("jQ-AjaxFileUpload:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jQ-AjaxFileUpload.js  **************/
/************* Start summernote.js for locale en-US **************/
try {!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery)}(function(S){"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){var n,o,i=this.length>>>0,r=!1;for(1<arguments.length&&(o=t,r=!0),n=0;n<i;++n)this.hasOwnProperty(n)&&(r?o=e(o,this[n],n,this):(o=this[n],r=!0));if(!r)throw new TypeError("Reduce of empty array with no initial value");return o}),"function"!=typeof Array.prototype.filter&&(Array.prototype.filter=function(e){if(null==this)throw new TypeError;var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var o,i=[],r=2<=arguments.length?arguments[1]:void 0,a=0;a<n;a++)a in t&&(o=t[a],e.call(r,o,a,t)&&i.push(o));return i});var n,e="function"==typeof define&&define.amd,N={isMac:-1<navigator.appVersion.indexOf("Mac"),isMSIE:-1<navigator.userAgent.indexOf("MSIE")||-1<navigator.userAgent.indexOf("Trident"),isFF:-1<navigator.userAgent.indexOf("Firefox"),jqueryVersion:parseFloat(S.fn.jquery),isSupportAmd:e,hasCodeMirror:e?require.specified("CodeMirror"):!!window.CodeMirror,isFontInstalled:function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n=S("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),o=n.css("fontFamily",t).width(),t=n.css("fontFamily",e+","+t).width();return n.remove(),o!==t},isW3CRangeSupport:!!document.createRange},u=(n=0,{eq:function(t){return function(e){return t===e}},eq2:function(e,t){return e===t},peq2:function(n){return function(e,t){return e[n]===t[n]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(t,n){return function(e){return t(e)&&n(e)}},uniqueId:function(e){var t=++n+"";return e?e+t:t},rect2bnd:function(e){var t=S(document);return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}}),L={head:t,last:i,initial:function(e){return e.slice(0,e.length-1)},tail:r,prev:function(e,t){t=e.indexOf(t);return-1===t?null:e[t-1]},next:function(e,t){t=e.indexOf(t);return-1===t?null:e[t+1]},find:function(e,t){for(var n=0,o=e.length;n<o;n++){var i=e[n];if(t(i))return i}},contains:a,all:function(e,t){for(var n=0,o=e.length;n<o;n++)if(!t(e[n]))return!1;return!0},sum:function(e,n){return n=n||u.self,e.reduce(function(e,t){return e+n(t)},0)},from:function(e){for(var t=[],n=-1,o=e.length;++n<o;)t[n]=e[n];return t},clusterBy:function(e,o){return e.length?r(e).reduce(function(e,t){var n=i(e);return o(i(n),t)?n[n.length]=t:e[e.length]=[t],e},[[e[0]]]):[]},compact:function(e){for(var t=[],n=0,o=e.length;n<o;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,o=e.length;n<o;n++)a(t,e[n])||t.push(e[n]);return t}};function t(e){return e[0]}function i(e){return e[e.length-1]}function r(e){return e.slice(1)}function a(e,t){return-1!==S.inArray(t,e)}var s,l,o,d,c,f,h,p,g,v,m,b,y,C,w,k,T=String.fromCharCode(160),E=(s=function(e){return e&&S(e).hasClass("note-editable")},l=function(e){return e&&3===e.nodeType},o=function(e){return e&&/^BR|^IMG|^HR/.test(e.nodeName.toUpperCase())},d=x("LI"),c=function(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())},f=x("BLOCKQUOTE"),h=x("A"),e=x("BODY"),p=N.isMSIE?"&nbsp;":"<br>",g=function(e){return(l(e)?e.nodeValue:e.childNodes).length},v=function(e){o(e)||g(e)||(e.innerHTML=p)},m=function(e,t){t=t||u.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n},b=function(e,t){var n=t.nextSibling,t=t.parentNode;return n?t.insertBefore(e,n):t.appendChild(e),e},y=function(n,e){return S.each(e,function(e,t){n.appendChild(t)}),n},C=function(e){return 0===e.offset},w=function(e){return e.offset===g(e.node)},k=x("TEXTAREA"),{NBSP_CHAR:T,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:p,emptyPara:"<p>"+p+"</p>",isEditable:s,isControlSizing:function(e){return e&&S(e).hasClass("note-control-sizing")},buildLayoutInfo:function(t){if(t.hasClass("note-air-editor")){var e,n=L.last(t.attr("id").split("-"));return{editor:function(){return t},editable:function(){return t},popover:(e=function(e){return function(){return S(e+n)}})("#note-popover-"),handle:e("#note-handle-"),dialog:e("#note-dialog-")}}return{editor:function(){return t},dropzone:(e=function(e){return function(){return t.find(e)}})(".note-dropzone"),toolbar:e(".note-toolbar"),editable:e(".note-editable"),codable:e(".note-codable"),statusbar:e(".note-statusbar"),popover:e(".note-popover"),handle:e(".note-handle"),dialog:e(".note-dialog")}},isText:l,isPara:I,isPurePara:function(e){return I(e)&&!d(e)},isInline:F,isBodyInline:function(e){return F(e)&&!D(e,I)},isBody:e,isParaInline:function(e){return F(e)&&!!D(e,I)},isList:M,isTable:x("TABLE"),isCell:c,isBlockquote:f,isBodyContainer:H,isAnchor:h,isDiv:x("DIV"),isLi:d,isSpan:x("SPAN"),isB:x("B"),isU:x("U"),isS:x("S"),isI:x("I"),isImg:x("IMG"),isTextarea:k,isEmpty:A,isEmptyAnchor:u.and(h,A),nodeLength:g,isLeftEdgePoint:C,isRightEdgePoint:w,isEdgePoint:function(e){return C(e)||w(e)},isLeftEdgeOf:function(e,t){for(;e&&e!==t;){if(0!==R(e))return!1;e=e.parentNode}return!0},isRightEdgeOf:function(e,t){for(;e&&e!==t;){if(R(e)!==g(e.parentNode)-1)return!1;e=e.parentNode}return!0},prevPoint:B,nextPoint:z,isSamePoint:O,isVisiblePoint:function(e){if(l(e.node)||!U(e.node)||A(e.node))return!0;var t=e.node.childNodes[e.offset-1],e=e.node.childNodes[e.offset];return!(t&&!o(t)||e&&!o(e))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=B(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=z(e)}return null},walkPoint:function(e,t,n,o){for(var i=e;i&&(n(i),!O(i,t));)var r=o&&e.node!==i.node&&t.node!==i.node,i=z(i,r)},ancestor:D,listAncestor:P,lastAncestor:function(e,t){e=P(e);return L.last(e.filter(t))},listNext:m,listPrev:function(e,t){t=t||u.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(i,r){var a=[];return r=r||u.ok,function e(t){i!==t&&r(t)&&a.push(t);for(var n=0,o=t.childNodes.length;n<o;n++)e(t.childNodes[n])}(i),a},commonAncestor:function(e,t){for(var n=P(e),o=t;o;o=o.parentNode)if(-1<S.inArray(o,n))return o;return null},wrap:function(e,t){var n=e.parentNode,t=S("<"+t+">")[0];return n.insertBefore(t,e),t.appendChild(e),t},insertAfter:b,appendChildNodes:y,position:R,hasChildren:U,makeOffsetPath:function(e,t){e=P(t,u.eq(e));return S.map(e,R).reverse()},fromOffsetPath:function(e,t){for(var n=e,o=0,i=t.length;o<i;o++)n=n.childNodes.length<=t[o]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[o]];return n},splitTree:function(e,o,i){e=P(o.node,u.eq(e));return e.length?1===e.length?j(o,i):e.reduce(function(e,t){var n=b(t.cloneNode(!1),t);return e===o.node&&(e=j(o,i)),y(n,m(e)),i||(v(t),v(n)),n}):null},create:V,createText:function(e){return document.createTextNode(e)},remove:q,removeWhile:function(e,t){for(;e&&!s(e)&&t(e);){var n=e.parentNode;q(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;t=V(t);return e.style.cssText&&(t.style.cssText=e.style.cssText),y(t,L.from(e.childNodes)),b(t,e),q(e),t},html:function(e,t){var e=k(e[0])?e.val():e.html();return t&&(e=e.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(e,t,n){n=n.toUpperCase();t=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,n=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(t||n?"\n":"")}),e=S.trim(e)),e},value:function(e){return e.val().replace(/[\n\r]/g,"")}});function x(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}}function I(e){return!s(e)&&(e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase()))}function F(e){return!H(e)&&!M(e)&&!I(e)}function M(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}function H(e){return c(e)||f(e)||s(e)}function A(e){var t=g(e);return 0===t||!E.isText(e)&&1===t&&e.innerHTML===p}function D(e,t){for(;e;){if(t(e))return e;if(s(e))break;e=e.parentNode}return null}function P(e,t){t=t||u.fail;var n=[];return D(e,function(e){return s(e)||n.push(e),t(e)}),n}function R(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function U(e){return!!(e&&e.childNodes&&e.childNodes.length)}function B(e,t){var n,o;if(0===e.offset){if(s(e.node))return null;n=e.node.parentNode,o=R(e.node)}else o=U(e.node)?(n=e.node.childNodes[e.offset-1],g(n)):(n=e.node,t?0:e.offset-1);return{node:n,offset:o}}function z(e,t){var n,o;if(g(e.node)===e.offset){if(s(e.node))return null;n=e.node.parentNode,o=R(e.node)+1}else o=U(e.node)?(n=e.node.childNodes[e.offset],0):(n=e.node,t?g(e.node):e.offset+1);return{node:n,offset:o}}function O(e,t){return e.node===t.node&&e.offset===t.offset}function j(e,t){if(l(e.node))return C(e)?e.node:w(e)?e.node.nextSibling:e.node.splitText(e.offset);var n=e.node.childNodes[e.offset],o=b(e.node.cloneNode(!1),e.node);return y(o,m(n)),t||(v(e.node),v(o)),o}function V(e){return document.createElement(e)}function q(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var o=[],i=0,r=e.childNodes.length;i<r;i++)o.push(e.childNodes[i]);for(i=0,r=o.length;i<r;i++)n.insertBefore(o[i],e)}n.removeChild(e)}}var K={readFileAsDataURL:function(e){return S.Deferred(function(t){S.extend(new FileReader,{onload:function(e){e=e.target.result;t.resolve(e)},onerror:function(){t.reject(this)}}).readAsDataURL(e)}).promise()},createImage:function(t,n){return S.Deferred(function(e){S("<img>").one("load",function(){e.resolve(S(this))}).one("error abort",function(){e.reject(S(this))}).css({display:"none"}).appendTo(document.body).attr("src",t).attr("data-filename",n)}).promise()}},W={isEdit:function(e){return L.contains([8,9,13,32],e)},nameFromCode:{8:"BACKSPACE",9:"TAB",13:"ENTER",32:"SPACE",48:"NUM0",49:"NUM1",50:"NUM2",51:"NUM3",52:"NUM4",53:"NUM5",54:"NUM6",55:"NUM7",56:"NUM8",66:"B",69:"E",73:"I",74:"J",75:"K",76:"L",82:"R",83:"S",85:"U",89:"Y",90:"Z",191:"SLASH",219:"LEFTBRACKET",220:"BACKSLASH",221:"RIGHTBRACKET"}},Z=function(){this.stylePara=function(e,n){S.each(e.nodes(E.isPara,{includeAncestor:!0}),function(e,t){S(t).css(n)})},this.current=function(e,t){var n=function(n,e){if(N.jqueryVersion<1.9){var o={};return S.each(e,function(e,t){o[t]=n.css(t)}),o}return n.css.call(n,e)}(S(E.isText(e.sc)?e.sc.parentNode:e.sc),["font-family","font-size","text-align","list-style-type","line-height"])||{};n["font-size"]=parseInt(n["font-size"],10),n["font-bold"]=document.queryCommandState("bold")?"bold":"normal",n["font-italic"]=document.queryCommandState("italic")?"italic":"normal",n["font-underline"]=document.queryCommandState("underline")?"underline":"normal",n["font-strikethrough"]=document.queryCommandState("strikeThrough")?"strikethrough":"normal",n["font-superscript"]=document.queryCommandState("superscript")?"superscript":"normal",n["font-subscript"]=document.queryCommandState("subscript")?"subscript":"normal",e.isOnList()?(o=-1<S.inArray(n["list-style-type"],["circle","disc","disc-leading-zero","square"]),n["list-style"]=o?"unordered":"ordered"):n["list-style"]="none";var o=E.ancestor(e.sc,E.isPara);return o&&o.style["line-height"]?n["line-height"]=o.style.lineHeight:(o=parseInt(n["line-height"],10)/parseInt(n["font-size"],10),n["line-height"]=o.toFixed(1)),n.image=E.isImg(t)&&t,n.anchor=e.isOnAnchor()&&E.ancestor(e.sc,E.isAnchor),n.ancestors=E.listAncestor(e.sc,E.isEditable),n.range=e,n}},Y={create:function(e,t,n,o){if(arguments.length)2===arguments.length&&(n=e,o=t);else if(N.isW3CRangeSupport){var i=document.getSelection();if(0===i.rangeCount)return null;if(E.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);e=r.startContainer,t=r.startOffset,n=r.endContainer,o=r.endOffset}else{i=document.selection.createRange(),r=i.duplicate();r.collapse(!1);i=i;i.collapse(!0);i=_(i,!0),r=_(r,!1);e=(i=E.isText(i.node)&&E.isLeftEdgePoint(i)&&E.isTextNode(r.node)&&E.isRightEdgePoint(r)&&r.node.nextSibling===i.node?r:i).cont,t=i.offset,n=r.cont,o=r.offset}return new Q(e,t,n,o)},createFromNode:function(e){return this.create(e,0,e,1)},createFromBookmark:function(e,t){var n=E.fromOffsetPath(e,t.s.path),o=t.s.offset,e=E.fromOffsetPath(e,t.e.path),t=t.e.offset;return new Q(n,o,e,t)}};function _(e,t){for(var n,o=e.parentElement(),i=document.body.createTextRange(),r=L.from(o.childNodes),a=0;a<r.length;a++)if(!E.isText(r[a])){if(i.moveToElementText(r[a]),0<=i.compareEndPoints("StartToStart",e))break;n=r[a]}if(0!==a&&E.isText(r[a-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(n||o),s.collapse(!n);var l=n?n.nextSibling:o.firstChild,d=e.duplicate();d.setEndPoint("StartToStart",s);for(var c=d.text.replace(/[\r\n]/g,"").length;c>l.nodeValue.length&&l.nextSibling;)c-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;t&&l.nextSibling&&E.isText(l.nextSibling)&&c===l.nodeValue.length&&(c-=l.nodeValue.length,l=l.nextSibling),o=l,a=c}return{cont:o,offset:a}}function J(e){function r(e,t){if(E.isText(e)){var n=E.listPrev(e,u.not(E.isText)),o=L.last(n).previousSibling,i=o||e.parentNode;t+=L.sum(L.tail(n),E.nodeLength),o=!o}else{if(i=e.childNodes[t]||e,E.isText(i))return r(i,0);t=0,o=!1}return{node:i,collapseToStart:o,offset:t}}var t=document.body.createTextRange(),e=r(e.node,e.offset);return t.moveToElementText(e.node),t.collapse(e.collapseToStart),t.moveStart("character",e.offset),t}function Q(o,i,r,a){function n(){if(N.isW3CRangeSupport){var e=document.createRange();return e.setStart(o,i),e.setEnd(r,a),e}return(e=J({node:o,offset:i})).setEndPoint("EndToEnd",J({node:r,offset:a})),e}function e(t){return function(){var e=E.ancestor(o,t);return!!e&&e===E.ancestor(r,t)}}this.sc=o,this.so=i,this.ec=r,this.eo=a,this.getPoints=function(){return{sc:o,so:i,ec:r,eo:a}},this.getStartPoint=function(){return{node:o,offset:i}},this.getEndPoint=function(){return{node:r,offset:a}},this.select=function(){var e,t=n();N.isW3CRangeSupport?(0<(e=document.getSelection()).rangeCount&&e.removeAllRanges(),e.addRange(t)):t.select()},this.normalize=function(){function e(e){return E.isVisiblePoint(e)||(E.isLeftEdgePoint(e)?e=E.nextPointUntil(e,E.isVisiblePoint):E.isRightEdgePoint(e)&&(e=E.prevPointUntil(e,E.isVisiblePoint))),e}var t=e(this.getStartPoint()),n=e(this.getStartPoint());return new Q(t.node,t.offset,n.node,n.offset)},this.nodes=function(n,e){n=n||u.ok;var o=e&&e.includeAncestor,i=e&&e.fullyContains,t=this.getStartPoint(),e=this.getEndPoint(),r=[],a=[];return E.walkPoint(t,e,function(e){var t;E.isEditable(e.node)||(i?(E.isLeftEdgePoint(e)&&a.push(e.node),E.isRightEdgePoint(e)&&L.contains(a,e.node)&&(t=e.node)):t=o?E.ancestor(e.node,n):e.node,t&&n(t)&&r.push(t))},!0),L.unique(r)},this.commonAncestor=function(){return E.commonAncestor(o,r)},this.expand=function(e){var t=E.ancestor(o,e),n=E.ancestor(r,e);if(!t&&!n)return new Q(o,i,r,a);e=this.getPoints();return t&&(e.sc=t,e.so=0),n&&(e.ec=n,e.eo=E.nodeLength(n)),new Q(e.sc,e.so,e.ec,e.eo)},this.collapse=function(e){return e?new Q(o,i,o,i):new Q(r,a,r,a)},this.splitText=function(){var e=o===r,t=this.getPoints();return E.isText(r)&&!E.isEdgePoint(this.getEndPoint())&&r.splitText(a),E.isText(o)&&!E.isEdgePoint(this.getStartPoint())&&(t.sc=o.splitText(i),t.so=0,e&&(t.ec=t.sc,t.eo=a-i)),new Q(t.sc,t.so,t.ec,t.eo)},this.deleteContents=function(){if(this.isCollapsed())return this;var e=this.splitText(),t=e.nodes(null,{fullyContains:!0}),o=E.prevPointUntil(e.getStartPoint(),function(e){return!L.contains(t,e.node)}),i=[];return S.each(t,function(e,t){var n=t.parentNode;o.node!==n&&1===E.nodeLength(n)&&i.push(n),E.remove(t,!1)}),S.each(i,function(e,t){E.remove(t,!1)}),new Q(o.node,o.offset,o.node,o.offset)},this.isOnEditable=e(E.isEditable),this.isOnList=e(E.isList),this.isOnAnchor=e(E.isAnchor),this.isOnCell=e(E.isCell),this.isLeftEdgeOf=function(e){if(!E.isLeftEdgePoint(this.getStartPoint()))return!1;e=E.ancestor(this.sc,e);return e&&E.isLeftEdgeOf(this.sc,e)},this.isCollapsed=function(){return o===r&&i===a},this.wrapBodyInlineWithPara=function(){if(E.isBodyContainer(o)&&E.isEmpty(o))return o.innerHTML=E.emptyPara,new Q(o.firstChild,0,o.firstChild,0);if(!E.isInline(o)||E.isParaInline(o))return this;var e=E.listAncestor(o,u.not(E.isInline)),t=L.last(e);E.isInline(t)||(t=e[e.length-2]||o.childNodes[i]);var e=E.listPrev(t,E.isParaInline).reverse();return(e=e.concat(E.listNext(t.nextSibling,E.isParaInline))).length&&(t=E.wrap(L.head(e),"p"),E.appendChildNodes(t,L.tail(e))),this},this.insertNode=function(e,t){var n,o,i,r=this.wrapBodyInlineWithPara().getStartPoint();return(r=t?(i=E.isPara(r.node)?r.node:r.node.parentNode,E.isPara(r.node)?r.node.childNodes[r.offset]:E.splitTree(r.node,r)):(o=E.listAncestor(r.node,E.isBodyContainer),t=L.last(o)||r.node,i=E.isBodyContainer(t)?(n=o[o.length-2],t):(n=t).parentNode,n&&E.splitTree(n,r)))?r.parentNode.insertBefore(e,r):i.appendChild(e),e},this.toString=function(){var e=n();return N.isW3CRangeSupport?e.toString():e.text},this.bookmark=function(e){return{s:{path:E.makeOffsetPath(e,o),offset:i},e:{path:E.makeOffsetPath(e,r),offset:a}}},this.getClientRects=function(){return n().getClientRects()}}function $(){var n=new Z,o=new re,i=new ie,t=new ae;this.saveRange=function(e,t){e.focus(),e.data("range",Y.create()),t&&Y.create().collapse().select()},this.restoreRange=function(e){var t=e.data("range");t&&(t.select(),e.focus())},this.currentStyle=function(e){var t=Y.create();return!!t&&(t.isOnEditable()&&n.current(t,e))};var r=this.triggerOnChange=function(e){var t=e.data("callbacks").onChange;t&&t(e.html(),e)};this.undo=function(e){e.data("NoteHistory").undo(),r(e)},this.redo=function(e){e.data("NoteHistory").redo(),r(e)};for(var l=this.afterCommand=function(e){e.data("NoteHistory").recordUndo(),r(e)},e=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor","foreColor","insertHorizontalRule","fontName"],a=0,s=e.length;a<s;a++)this[e[a]]=function(n){return function(e,t){document.execCommand(n,!1,t),l(e)}}(e[a]);for(this.tab=function(e,t){var n=Y.create();n.isCollapsed()&&n.isOnCell()?o.tab(n):(i.insertTab(e,n,t.tabsize),l(e))},this.untab=function(){var e=Y.create();e.isCollapsed()&&e.isOnCell()&&o.tab(e,!0)},this.insertParagraph=function(e){i.insertParagraph(e),l(e)},this.insertOrderedList=function(e){t.insertOrderedList(e),l(e)},this.insertUnorderedList=function(e){t.insertUnorderedList(e),l(e)},this.indent=function(e){t.indent(e),l(e)},this.outdent=function(e){t.outdent(e),l(e)},this.insertImage=function(t,e,n){K.createImage(e,n).then(function(e){e.css({display:""}),Y.create().insertNode(e[0]),l(t)}).fail(function(){var e=t.data("callbacks");e.onImageUploadError&&e.onImageUploadError()})},this.insertVideo=function(e,t){var n,o=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/),t=t.match(/\/\/(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);o&&11===o[2].length?n={src:"//www.youtube.com/embed/"+o[2],width:"100%",height:"360"}:t&&t[3].length&&(n={webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:"",src:"//player.vimeo.com/video/"+t[3],width:"100%",height:"360"}),n&&this.insertIframe(e,null,null,null,n)},this.insertIframedImage=function(e,t,n,o,i,r){function a(e,t,n){n=n||t;n=S('<img oncontextmenu="return false;" data-pin-no-hover="true" class="hide-context"  src="'+t+'">').attr("data-hzurl",n);(Y.create()||e.data("range")).insertNode(n[0]),l(e);e=n.next();e.length||(e=S("<p><br></p>").insertAfter(n)),HZ.textEditor.InsertPhoto.InsertPhotoDialog.$richTextEditor.selectNode(e,!0)}i?a(e,r):function(e,t,n,o,i){t=HZ.utils.Links.getSpaceLink(t),n=(n<e.width()?n:e.width())+"px";S('<img width="'+n+'" src="'+i+'">').attr("data-hzurl",t);a(e,i,t)}.apply(this,[e,t,n,o,r])},this.insertIframe=function(n,e,o,i,t){var r=S('<p class="iframe-throbber"></p>'),a=S('<p class="iframe-wrapper"></p>').addClass("loading"),s=S("<iframe/>");s.attr({scrolling:"no",frameborder:0}),s.hide().on("load",function(e){var t;i&&o?(t=i/(o<n.width()?n.width():o),t+=0):t=.56,r.hide(),a.css("border","").css("padding-bottom",100*t+"%").height(0).removeClass("loading"),S(this).show()}),Y.create().insertNode(a[0]),a.append(r).append(s),e&&s[0].contentWindow.document.body.appendChild(e),t&&s.attr(t),l(n);t=a.next();t.length||(t=S("<p><br></p>").insertAfter($image)),HZ.textEditor.InsertVideo.InsertVideoDialog.$richTextEditor.selectNode(t,!0)},this.formatBlock=function(e,t){t=N.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t),l(e)},this.formatPara=function(e){this.formatBlock(e,"P"),l(e)},a=1;a<=6;a++)this["formatH"+a]=function(t){return function(e){this.formatBlock(e,"H"+t)}}(a);this.fontSize=function(e,t){document.execCommand("fontSize",!1,3),(N.isFF?e.find("font[size=3]").removeAttr("size"):e.find("span").filter(function(){return"medium"===this.style.fontSize})).css("font-size",t+"px"),l(e)},this.lineHeight=function(e,t){n.stylePara(Y.create(),{lineHeight:t}),l(e)},this.unlink=function(e){var t,n=Y.create();n.isOnAnchor()&&(t=E.ancestor(n.sc,E.isAnchor),(n=Y.createFromNode(t)).select(),document.execCommand("unlink"),l(e))},this.createLink=function(e,t,n){var o=t.url,i=t.text,t=(t.newWindow,t.range);n.onCreateLink&&(o=n.onCreateLink(o));i=(t=t.deleteContents()).insertNode(S("<A>"+i+"</A>")[0],!0);S(i).attr({href:o,target:"_blank"}),Y.createFromNode(i).select(),l(e)},this.getLinkInfo=function(e){e.focus();var t=Y.create().expand(E.isAnchor),e=S(L.head(t.nodes(E.isAnchor)));return{range:t,text:t.toString(),isNewWindow:!e.length||"_blank"===e.attr("target"),url:e.length?e.attr("href"):""}},this.getVideoInfo=function(e){e.focus();var t=Y.create();return t.isOnAnchor()&&(e=E.ancestor(t.sc,E.isAnchor),t=Y.createFromNode(e)),{text:t.toString()}},this.color=function(e,t){var n=JSON.parse(t),t=n.foreColor,n=n.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n),l(e)},this.insertTable=function(e,t){t=t.split("x");Y.create().deleteContents().insertNode(o.createTable(t[0],t[1])),l(e)},this.floatMe=function(e,t,n){n.css("float",t),l(e)},this.imageShape=function(e,t,n){n.removeClass("img-rounded img-circle img-thumbnail"),t&&n.addClass(t),l(e)},this.resize=function(e,t,n){n.css({width:100*t+"%",height:""}),l(e)},this.resizeTo=function(e,t,n){var o;e=n?{width:(o=e.y/e.x)<(n=t.data("ratio"))?e.x:e.y/n,height:o<n?e.x*n:e.y}:{width:e.x,height:e.y},t.css(e)},this.removeMedia=function(e,t,n){n.detach(),l(e)}}function G(t){function e(e){null!==e.contents&&t.html(e.contents),null!==e.bookmark&&Y.createFromBookmark(i,e.bookmark).select()}var n=[],o=-1,i=t[0];this.undo=function(){0<o&&e(n[--o])},this.redo=function(){n.length-1>o&&e(n[++o])},this.recordUndo=function(){var e;o++,(n=n.length>o?n.slice(0,o):n).push((e=Y.create(),{contents:t.html(),bookmark:e?e.bookmark(i):{s:{path:[0],offset:0},e:{path:[0],offset:0}}}))},this.recordUndo()}function X(){var o=new se;this.update=function(e,t){o.update(e,t)},this.updateRecentColor=function(e,t,n){o.updateRecentColor(e,t,n)},this.activate=function(e){e.find("button").not('button[data-event="codeview"]').removeClass("disabled")},this.deactivate=function(e){e.find("button").not('button[data-event="codeview"]').addClass("disabled")},this.updateFullscreen=function(e,t){e.find('button[data-event="fullscreen"]').toggleClass("active",t)},this.updateCodeview=function(e,t){e.find('button[data-event="codeview"]').toggleClass("active",t)}}function ee(){function a(e,t){var n=S(e),e=t?n.offset():n.position(),t=n.outerHeight(!0),n=n.position().top-n.offsetParent().parent().scrollTop();return{left:e.left,top:n+t}}function s(e,t){e.css({display:"block",left:t.left,top:t.top})}var l=new se;this.update=function(e,t,n){l.update(e,t);var o,i,r=e.find(".note-link-popover");t.anchor?(o=r.find("a"),i=S(t.anchor).attr("href"),o.attr("href",i).html(i),s(r,a(t.anchor,n))):r.hide();r=e.find(".note-image-popover");t.image?s(r,a(t.image,n)):r.hide();e=e.find(".note-air-popover");n&&!t.range.isCollapsed()?(t=u.rect2bnd(L.last(t.range.getClientRects())),s(e,{left:Math.max(t.left+t.width/2-20,0),top:t.top+t.height})):e.hide()},this.updateRecentColor=function(e,t,n){e.updateRecentColor(e,t,n)},this.hide=function(e){e.children().hide()}}function te(){this.update=function(e,t,n){var o=e.find(".note-control-selection");t.image?(e=S(t.image),n=n?e.offset():e.position(),e={w:e.outerWidth(!0),h:e.outerHeight(!0)},o.css({display:"block",left:n.left,top:n.top,width:e.w,height:e.h}).data("target",t.image),e=e.w+"x"+e.h,o.find(".note-control-selection-info").text(e)):o.hide()},this.hide=function(e){e.children().hide()}}function ne(){function l(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)}this.showImageDialog=function(e,r){return S.Deferred(function(t){var n=r.find(".note-image-dialog"),e=r.find(".note-image-input"),o=r.find(".note-image-url"),i=r.find(".note-image-btn");n.one("shown.bs.modal",function(){e.replaceWith(e.clone().on("change",function(){t.resolve(this.files),n.modal("hide")}).val("")),i.click(function(e){e.preventDefault(),t.resolve(o.val()),n.modal("hide")}),o.on("keyup paste",function(e){e="paste"===e.type?e.originalEvent.clipboardData.getData("text"):o.val();l(i,e)}).val("").trigger("focus")}).one("hidden.bs.modal",function(){e.off("change"),o.off("keyup paste"),i.off("click"),"pending"===t.state()&&t.reject()}).modal("show")})},this.showVideoDialog=function(e,i,r){return S.Deferred(function(t){var n=i.find(".note-video-dialog"),o=n.find(".note-video-url"),e=n.find(".note-video-btn");n.one("shown.bs.modal",function(){o.val(r.text).keyup(function(){l(e,o.val())}).trigger("keyup").trigger("focus"),e.click(function(e){e.preventDefault(),t.resolve(o.val()),n.modal("hide")})}).one("hidden.bs.modal",function(){o.off("keyup"),e.off("click"),"pending"===t.state()&&t.reject()}).modal("show")})},this.showLinkDialog=function(e,a,s){return S.Deferred(function(t){var n=a.find(".note-link-dialog"),o=n.find(".note-link-text"),i=n.find(".note-link-url"),e=n.find(".note-link-btn"),r=n.find("input[type=checkbox]");n.one("shown.bs.modal",function(){o.val(s.text),o.keyup(function(){s.text=o.val()}),s.url||(s.url=s.text,l(e,s.text)),i.keyup(function(){l(e,i.val()),s.text||o.val(i.val())}).val(s.url).trigger("focus").trigger("select"),r.prop("checked",s.newWindow),e.one("click",function(e){e.preventDefault(),t.resolve({range:s.range,url:i.val(),text:o.val(),newWindow:r.is(":checked")}),n.modal("hide")})}).one("hidden.bs.modal",function(){o.off("keyup"),i.off("keyup"),e.off("click"),"pending"===t.state()&&t.reject()}).modal("show")}).promise()},this.showHelpDialog=function(e,t){return S.Deferred(function(e){t.find(".note-help-dialog").one("hidden.bs.modal",function(){e.resolve()}).modal("show")}).promise()}}var oe,ie=function(){this.insertTab=function(e,t,n){var o=E.createText(new Array(n+1).join(E.NBSP_CHAR));(t=t.deleteContents()).insertNode(o,!0),(t=Y.create(o,n)).select()},this.insertParagraph=function(){var e=Y.create();e=(e=e.deleteContents()).wrapBodyInlineWithPara();var t,n,o=E.ancestor(e.sc,E.isPara);o?(t=E.splitTree(o,e.getStartPoint()),n=(n=E.listDescendant(o,E.isEmptyAnchor)).concat(E.listDescendant(t,E.isEmptyAnchor)),S.each(n,function(e,t){E.remove(t)})):(n=e.sc.childNodes[e.so],t=S(E.emptyPara)[0],n?e.sc.insertBefore(t,n):e.sc.appendChild(t)),Y.create(t,0).normalize().select()}},re=function(){this.tab=function(e,t){var n=E.ancestor(e.commonAncestor(),E.isCell),e=E.ancestor(n,E.isTable),e=E.listDescendant(e,E.isCell),n=L[t?"prev":"next"](e,n);n&&Y.create(n,0).select()},this.createTable=function(e,t){for(var n=[],o=0;o<e;o++)n.push("<td>"+E.blank+"</td>");for(var i,r=n.join(""),a=[],s=0;s<t;s++)a.push("<tr>"+r+"</tr>");return i=a.join(""),S('<table class="table table-bordered">'+i+"</table>")[0]}},ae=function(){this.insertOrderedList=function(){this.toggleList("OL")},this.insertUnorderedList=function(){this.toggleList("UL")},this.indent=function(){var o=this,e=Y.create().wrapBodyInlineWithPara(),t=e.nodes(E.isPara,{includeAncestor:!0}),t=L.clusterBy(t,u.peq2("parentNode"));S.each(t,function(e,t){var n=L.head(t);E.isLi(n)?o.wrapList(t,n.parentNode.nodeName):S.each(t,function(e,t){S(t).css("marginLeft",function(e,t){return(parseInt(t,10)||0)+25})})}),e.select()},this.outdent=function(){var o=this,e=Y.create().wrapBodyInlineWithPara(),t=e.nodes(E.isPara,{includeAncestor:!0}),t=L.clusterBy(t,u.peq2("parentNode"));S.each(t,function(e,t){var n=L.head(t);E.isLi(n)?o.releaseList([t]):S.each(t,function(e,t){S(t).css("marginLeft",function(e,t){return 25<(t=parseInt(t,10)||0)?t-25:""})})}),e.select()},this.toggleList=function(n){var o=this,e=Y.create().wrapBodyInlineWithPara(),t=e.nodes(E.isPara,{includeAncestor:!0}),i=L.clusterBy(t,u.peq2("parentNode"));L.find(t,E.isPurePara)?S.each(i,function(e,t){o.wrapList(t,n)}):(t=e.nodes(E.isList,{includeAncestor:!0}).filter(function(e){return!S.nodeName(e,n)})).length?S.each(t,function(e,t){E.replace(t,n)}):this.releaseList(i,!0),e.select()},this.wrapList=function(e,t){var n=L.head(e),o=L.last(e),i=E.isList(n.previousSibling)&&n.previousSibling,n=E.isList(o.nextSibling)&&o.nextSibling,o=i||E.insertAfter(E.create(t||"UL"),o);e=S.map(e,function(e){return E.isPurePara(e)?E.replace(e,"LI"):e}),E.appendChildNodes(o,e),n&&(E.appendChildNodes(o,L.from(n.childNodes)),E.remove(n))},this.releaseList=function(e,r){var a=[];return S.each(e,function(e,t){var n=L.head(t),o=L.last(t),i=r?E.lastAncestor(n,E.isList):n.parentNode,o=1<i.childNodes.length?E.splitTree(i,{node:o.parentNode,offset:E.position(o)+1},!0):null,n=E.splitTree(i,{node:n.parentNode,offset:E.position(n)},!0);t=r?E.listDescendant(n,E.isLi):L.from(n.childNodes).filter(E.isLi),!r&&E.isList(i.parentNode)||(t=S.map(t,function(e){return E.replace(e,"P")})),S.each(L.from(t).reverse(),function(e,t){E.insertAfter(t,i)});o=L.compact([i,n,o]);S.each(o,function(e,t){t=[t].concat(E.listDescendant(t,E.isList));S.each(t.reverse(),function(e,t){E.nodeLength(t)||E.remove(t,!0)})}),a=a.concat(t)}),a}},se=function(){this.update=function(n,e){function t(e,t){e.find(".dropdown-menu li a").each(function(){var e=S(this).data("value")+""==t+"";this.className=e?"checked":""})}function o(e,t){n.find(e).toggleClass("active",t())}var i=n.find(".note-fontname");!i.length||(r=e["font-family"])&&(r=(r=L.head(r.split(","))).replace(/\'/g,""),i.find(".note-current-fontname").text(r),t(i,r));var r=n.find(".note-fontsize");r.find(".note-current-fontsize").text(e["font-size"]),t(r,parseFloat(e["font-size"])),t(n.find(".note-height"),parseFloat(e["line-height"])),o('button[data-event="bold"]',function(){return"bold"===e["font-bold"]}),o('button[data-event="italic"]',function(){return"italic"===e["font-italic"]}),o('button[data-event="underline"]',function(){return"underline"===e["font-underline"]}),o('button[data-event="strikethrough"]',function(){return"strikethrough"===e["font-strikethrough"]}),o('button[data-event="superscript"]',function(){return"superscript"===e["font-superscript"]}),o('button[data-event="subscript"]',function(){return"subscript"===e["font-subscript"]}),o('button[data-event="justifyLeft"]',function(){return"left"===e["text-align"]||"start"===e["text-align"]}),o('button[data-event="justifyCenter"]',function(){return"center"===e["text-align"]}),o('button[data-event="justifyRight"]',function(){return"right"===e["text-align"]}),o('button[data-event="justifyFull"]',function(){return"justify"===e["text-align"]}),o('button[data-event="insertUnorderedList"]',function(){return"unordered"===e["list-style"]}),o('button[data-event="insertOrderedList"]',function(){return"ordered"===e["list-style"]})},this.updateRecentColor=function(e,t,n){var o=S(e).closest(".note-color").find(".note-recent-color"),e=JSON.parse(o.attr("data-value"));e[t]=n,o.attr("data-value",JSON.stringify(e));t="backColor"===t?"background-color":"color";o.find("i").css(t,n)}};N.hasCodeMirror&&(N.isSupportAmd?require(["CodeMirror"],function(e){oe=e}):oe=window.CodeMirror);S.summernote=S.summernote||{},S.extend(S.summernote,{version:"0.5.10",options:{width:null,height:null,minHeight:null,maxHeight:null,focus:!1,tabsize:4,styleWithSpan:!0,disableLinkTarget:!1,disableDragAndDrop:!1,disableResizeEditor:!1,codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},lang:"en-US",direction:null,toolbar:[["style",["style"]],["font",["bold","italic","underline","superscript","subscript","strikethrough","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["height",["height"]],["table",["table"]],["insert",["link","picture","video","hr"]],["view",["fullscreen","codeview"]],["help",["help"]]],airMode:!1,airPopover:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]],styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],defaultFontName:"Helvetica Neue",fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],fontSizes:["8","9","10","11","12","14","18","24","36"],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],insertTableMaxSize:{col:10,row:10},oninit:null,onfocus:null,onblur:null,onenter:null,onkeyup:null,onkeydown:null,onImageUpload:null,onImageUploadError:null,onToolbarClick:null,onCreateLink:function(e){return-1!==e.indexOf("@")&&-1===e.indexOf(":")?e="mailto:"+e:-1===e.indexOf("://")&&(e="http://"+e),e},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"showLinkDialog"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"showLinkDialog"}}},lang:{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",clear:"Remove Font Style",height:"Line Height",name:"Font Family",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag an image here",selectFromFiles:"Select from files",remove:"Remove Image"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",openInNewWindow:"Open in new window"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video"},table:{table:"Table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",normal:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style"},history:{undo:"Undo",redo:"Redo"}}}});var le=new function(){function h(e,t){var n=t.event,o=t.value,i=t.title,r=t.className,a=t.dropdown,t=t.hide;return'<button type="button" class="btn btn-default btn-sm btn-small'+(r?" "+r:"")+(a?" dropdown-toggle":"")+'"'+(a?' data-toggle="dropdown"':"")+(i?' title="'+i+'"':"")+(n?' data-event="'+n+'"':"")+(o?" data-value='"+o+"'":"")+(t?" data-hide='"+t+"'":"")+' tabindex="-1">'+e+(a?' <span class="caret"></span>':"")+"</button>"+(a||"")}function p(e,t){return h('<i class="'+e+'"></i>',t)}function g(e,t){return'<div class="'+e+' popover bottom in" style="display: none;"><div class="arrow"></div><div class="popover-content">'+t+"</div></div>"}function i(e,t,n,o){return'<div class="'+e+' modal" aria-hidden="false"><div class="modal-dialog"><div class="modal-content">'+(t?'<div class="modal-header"><button type="button" class="close" aria-hidden="true" tabindex="-1">&times;</button><h4 class="modal-title">'+t+"</h4></div>":"")+'<form class="note-modal-form"><div class="modal-body"><div class="row-fluid">'+n+"</div></div>"+(o?'<div class="modal-footer">'+o+"</div>":"")+"</form></div></div></div>"}function f(a,s){var e,t,n,o,i,r,l,d,c,u,f;return'<div class="note-popover">'+(u=p("fa fa-edit icon-edit",{title:a.link.edit,event:"showLinkDialog",hide:!0}),f=p("fa fa-unlink icon-unlink",{title:a.link.unlink,event:"unlink"}),g("note-link-popover",'<a href="http://www.google.com" target="_blank">www.google.com</a>&nbsp;&nbsp;<div class="note-insert btn-group">'+u+f+"</div>"))+(e=h('<span class="note-fontsize-10">100%</span>',{title:a.image.resizeFull,event:"resize",value:"1"}),t=h('<span class="note-fontsize-10">50%</span>',{title:a.image.resizeHalf,event:"resize",value:"0.5"}),n=h('<span class="note-fontsize-10">25%</span>',{title:a.image.resizeQuarter,event:"resize",value:"0.25"}),o=p("fa fa-align-left icon-align-left",{title:a.image.floatLeft,event:"floatMe",value:"left"}),i=p("fa fa-align-right icon-align-right",{title:a.image.floatRight,event:"floatMe",value:"right"}),r=p("fa fa-align-justify icon-align-justify",{title:a.image.floatNone,event:"floatMe",value:"none"}),l=p("fa fa-square icon-unchecked",{title:a.image.shapeRounded,event:"imageShape",value:"img-rounded"}),d=p("fa fa-circle-o icon-circle-blank",{title:a.image.shapeCircle,event:"imageShape",value:"img-circle"}),c=p("fa fa-picture-o icon-picture",{title:a.image.shapeThumbnail,event:"imageShape",value:"img-thumbnail"}),u=p("fa fa-times icon-times",{title:a.image.shapeNone,event:"imageShape",value:""}),f=p("fa fa-trash-o icon-trash",{title:a.image.remove,event:"removeMedia",value:"none"}),g("note-image-popover",'<div class="btn-group">'+e+t+n+'</div><div class="btn-group">'+o+i+r+'</div><div class="btn-group">'+l+d+c+u+'</div><div class="btn-group">'+f+"</div>"))+(s.airMode?function(){for(var e="",t=0,n=s.airPopover.length;t<n;t++){var o=s.airPopover[t];e+='<div class="note-'+o[0]+' btn-group">';for(var i=0,r=o[1].length;i<r;i++)e+=y[o[1][i]](a,s);e+="</div>"}return g("note-air-popover",e)}():"")+"</div>"}function v(){return'<div class="note-handle"><div class="note-control-selection"><div class="note-control-selection-bg"></div><div class="note-control-holder note-control-nw"></div><div class="note-control-holder note-control-ne"></div><div class="note-control-holder note-control-sw"></div><div class="note-control-sizing note-control-se"></div><div class="note-control-selection-info"></div></div></div>'}function r(e,t){return'<table class="note-shortcut"><thead><tr><th></th><th>'+e+"</th></tr></thead><tbody>"+t+"</tbody></table>"}function a(e,t){var n='<table class="note-shortcut-layout"><tbody><tr><td>'+s(e,t)+"</td><td>"+o(e,t)+"</td></tr><tr><td>"+d(e,t)+"</td><td>"+l(e,t)+"</td></tr>";return t.extraKeys&&(n+='<tr><td colspan="2">'+c(e,t)+"</td></tr>"),n+="</tbody></table>"}function m(e,t){var n,o;return'<div class="note-dialog">'+(n='<div class="note-group-select-from-files"><h5>'+e.image.selectFromFiles+'</h5><input class="note-image-input" type="file" name="files" accept="image/*" /></div><h5>'+e.image.url+'</h5><input class="note-image-url form-control span12" type="text" />',o='<button href="#" class="btn btn-primary note-image-btn disabled" disabled>'+e.image.insert+"</button>",i("note-image-dialog",e.image.insert,n,o))+(n='<div class="form-group"><label>'+e.link.textToDisplay+'</label><input class="note-link-text form-control span12" type="text" /></div><div class="form-group"><label>'+e.link.url+'</label><input class="note-link-url form-control span12" type="text" /></div>',o='<button href="#" class="btn btn-primary note-link-btn disabled " disabled>'+e.link.insert+"</button>",i("note-link-dialog",e.link.insert,n,o))+(n='<div class="form-group"><label>'+e.video.url+'</label>&nbsp;<small class="text-muted">'+e.video.providers+'</small><input class="note-video-url form-control span12" type="text" /></div>',o='<button href="#" class="btn btn-primary note-video-btn disabled" disabled>'+e.video.insert+"</button>",i("note-video-dialog",e.video.insert,n,o))+(t='<a class="modal-close pull-right" aria-hidden="true" tabindex="-1">'+e.shortcut.close+'</a><div class="title">'+e.shortcut.shortcuts+"</div>"+(N.isMac?a(e,t):a(e,t).replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"))+'<p class="text-center"><a href="//hackerwins.github.io/summernote/" target="_blank">Summernote 0.5.10</a> · <a href="//github.com/HackerWins/summernote" target="_blank">Project</a> · <a href="//github.com/HackerWins/summernote/issues" target="_blank">Issues</a></p>',i("note-help-dialog","",t,""))+"</div>"}function b(e,t){var c=t.colors;e.find(".note-color-palette").each(function(){for(var e=S(this),t=e.attr("data-target-event"),n=[],o=0,i=c.length;o<i;o++){for(var r=c[o],a=[],s=0,l=r.length;s<l;s++){var d=r[s];a.push(['<button type="button" class="note-color-btn" style="background-color:',d,';" data-event="',t,'" data-value="',d,'" title="',d,'" data-toggle="button" tabindex="-1"></button>'].join(""))}n.push('<div class="note-color-row">'+a.join("")+"</div>")}e.html(n.join(""))})}var y={picture:function(e){return p("fa fa-picture-o icon-picture",{event:"showImageDialog",title:e.image.image,hide:!0})},link:function(e){return p("fa fa-link icon-link",{event:"showLinkDialog",title:e.link.link,hide:!0})},video:function(e){return p("fa fa-youtube-play icon-play",{event:"showVideoDialog",title:e.video.video,hide:!0})},table:function(e){return p("fa fa-table icon-table",{title:e.table.table,dropdown:'<ul class="note-table dropdown-menu"><div class="note-dimension-picker"><div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div><div class="note-dimension-picker-highlighted"></div><div class="note-dimension-picker-unhighlighted"></div></div><div class="note-dimension-display"> 1 x 1 </div></ul>'})},style:function(o,e){e=e.styleTags.reduce(function(e,t){var n=o.style["p"===t?"normal":t];return e+'<li><a data-event="formatBlock" href="#" data-value="'+t+'">'+("p"===t||"pre"===t?n:"<"+t+">"+n+"</"+t+">")+"</a></li>"},"");return p("fa fa-magic icon-magic",{title:o.style.style,dropdown:'<ul class="dropdown-menu">'+e+"</ul>"})},fontname:function(e,t){var n=t.fontNames.reduce(function(e,t){return N.isFontInstalled(t)?e+'<li><a data-event="fontName" href="#" data-value="'+t+'"><i class="fa fa-check icon-ok"></i> '+t+"</a></li>":e},""),t='<span class="note-current-fontname">'+t.defaultFontName+"</span>";return h(t,{title:e.font.name,dropdown:'<ul class="dropdown-menu">'+n+"</ul>"})},fontsize:function(e,t){t=t.fontSizes.reduce(function(e,t){return e+'<li><a data-event="fontSize" href="#" data-value="'+t+'"><i class="fa fa-check icon-ok"></i> '+t+"</a></li>"},"");return h('<span class="note-current-fontsize">11</span>',{title:e.font.size,dropdown:'<ul class="dropdown-menu">'+t+"</ul>"})},color:function(e){var t=h('<i class="fa fa-font icon-font" style="color:black;background-color:yellow;"></i>',{className:"note-recent-color",title:e.color.recent,event:"color",value:'{"backColor":"yellow"}'}),n='<ul class="dropdown-menu"><li><div class="btn-group"><div class="note-palette-title">'+e.color.background+'</div><div class="note-color-reset" data-event="backColor" data-value="inherit" title="'+e.color.transparent+'">'+e.color.setTransparent+'</div><div class="note-color-palette" data-target-event="backColor"></div></div><div class="btn-group"><div class="note-palette-title">'+e.color.foreground+'</div><div class="note-color-reset" data-event="foreColor" data-value="inherit" title="'+e.color.reset+'">'+e.color.resetToDefault+'</div><div class="note-color-palette" data-target-event="foreColor"></div></div></li></ul>';return t+h("",{title:e.color.more,dropdown:n})},bold:function(e){return p("fa fa-bold icon-bold",{event:"bold",title:e.font.bold})},italic:function(e){return p("fa fa-italic icon-italic",{event:"italic",title:e.font.italic})},underline:function(e){return p("fa fa-underline icon-underline",{event:"underline",title:e.font.underline})},strikethrough:function(e){return p("fa fa-strikethrough icon-strikethrough",{event:"strikethrough",title:e.font.strikethrough})},superscript:function(e){return p("fa fa-superscript icon-superscript",{event:"superscript",title:e.font.superscript})},subscript:function(e){return p("fa fa-subscript icon-subscript",{event:"subscript",title:e.font.subscript})},clear:function(e){return p("fa fa-eraser icon-eraser",{event:"removeFormat",title:e.font.clear})},ul:function(e){return p("fa fa-list-ul icon-list-ul",{event:"insertUnorderedList",title:e.lists.unordered})},ol:function(e){return p("fa fa-list-ol icon-list-ol",{event:"insertOrderedList",title:e.lists.ordered})},paragraph:function(e){var t=p("fa fa-align-left icon-align-left",{title:e.paragraph.left,event:"justifyLeft"}),n=p("fa fa-align-center icon-align-center",{title:e.paragraph.center,event:"justifyCenter"}),o=p("fa fa-align-right icon-align-right",{title:e.paragraph.right,event:"justifyRight"}),i=p("fa fa-align-justify icon-align-justify",{title:e.paragraph.justify,event:"justifyFull"}),r=p("fa fa-outdent icon-indent-left",{title:e.paragraph.outdent,event:"outdent"}),a=p("fa fa-indent icon-indent-right",{title:e.paragraph.indent,event:"indent"});return p("fa fa-align-left icon-align-left",{title:e.paragraph.paragraph,dropdown:'<div class="dropdown-menu"><div class="note-align btn-group">'+t+n+o+i+'</div><div class="note-list btn-group">'+a+r+"</div></div>"})},height:function(e,t){t=t.lineHeights.reduce(function(e,t){return e+'<li><a data-event="lineHeight" href="#" data-value="'+parseFloat(t)+'"><i class="fa fa-check icon-ok"></i> '+t+"</a></li>"},"");return p("fa fa-text-height icon-text-height",{title:e.font.height,dropdown:'<ul class="dropdown-menu">'+t+"</ul>"})},help:function(e){return p("fa fa-question icon-question",{event:"showHelpDialog",title:e.options.help,hide:!0})},fullscreen:function(e){return p("fa fa-arrows-alt icon-fullscreen",{event:"fullscreen",title:e.options.fullscreen})},codeview:function(e){return p("fa fa-code icon-code",{event:"codeview",title:e.options.codeview})},undo:function(e){return p("fa fa-undo icon-undo",{event:"undo",title:e.history.undo})},redo:function(e){return p("fa fa-repeat icon-repeat",{event:"redo",title:e.history.redo})},hr:function(e){return p("fa fa-minus icon-hr",{event:"insertHorizontalRule",title:e.hr.insert})}},o=function(e){var t="<tr><td>⌘ + B</td><td>"+e.font.bold+"</td></tr><tr><td>⌘ + I</td><td>"+e.font.italic+"</td></tr><tr><td>⌘ + U</td><td>"+e.font.underline+"</td></tr><tr><td>⌘ + ⇧ + S</td><td>"+e.font.strikethrough+"</td></tr><tr><td>⌘ + \\</td><td>"+e.font.clear+"</td></tr>";return r(e.shortcut.textFormatting,t)},s=function(e){var t="<tr><td>⌘ + Z</td><td>"+e.history.undo+"</td></tr><tr><td>⌘ + ⇧ + Z</td><td>"+e.history.redo+"</td></tr><tr><td>⌘ + ]</td><td>"+e.paragraph.indent+"</td></tr><tr><td>⌘ + [</td><td>"+e.paragraph.outdent+"</td></tr><tr><td>⌘ + ENTER</td><td>"+e.hr.insert+"</td></tr>";return r(e.shortcut.action,t)},l=function(e){var t="<tr><td>⌘ + ⇧ + L</td><td>"+e.paragraph.left+"</td></tr><tr><td>⌘ + ⇧ + E</td><td>"+e.paragraph.center+"</td></tr><tr><td>⌘ + ⇧ + R</td><td>"+e.paragraph.right+"</td></tr><tr><td>⌘ + ⇧ + J</td><td>"+e.paragraph.justify+"</td></tr><tr><td>⌘ + ⇧ + NUM7</td><td>"+e.lists.ordered+"</td></tr><tr><td>⌘ + ⇧ + NUM8</td><td>"+e.lists.unordered+"</td></tr>";return r(e.shortcut.paragraphFormatting,t)},d=function(e){var t="<tr><td>⌘ + NUM0</td><td>"+e.style.normal+"</td></tr><tr><td>⌘ + NUM1</td><td>"+e.style.h1+"</td></tr><tr><td>⌘ + NUM2</td><td>"+e.style.h2+"</td></tr><tr><td>⌘ + NUM3</td><td>"+e.style.h3+"</td></tr><tr><td>⌘ + NUM4</td><td>"+e.style.h4+"</td></tr><tr><td>⌘ + NUM5</td><td>"+e.style.h5+"</td></tr><tr><td>⌘ + NUM6</td><td>"+e.style.h6+"</td></tr>";return r(e.shortcut.documentStyle,t)},c=function(e,t){var n,o=t.extraKeys,i="";for(n in o)o.hasOwnProperty(n)&&(i+="<tr><td>"+n+"</td><td>"+o[n]+"</td></tr>");return r(e.shortcut.extraKeys,i)};this.createLayoutByAirMode=function(e,t){t.keyMap[N.isMac?"mac":"pc"];var n=S.extend(S.summernote.lang["en-US"],S.summernote.lang[t.lang]),o=u.uniqueId();e.addClass("note-air-editor note-editable"),e.attr({id:"note-editor-"+o,contentEditable:!0});var i=document.body,e=S(f(n,t));e.addClass("note-air-layout"),e.attr("id","note-popover-"+o),e.appendTo(i),b(e,t);e=S(v());e.addClass("note-air-layout"),e.attr("id","note-handle-"+o),e.appendTo(i);t=S(m(n,t));t.addClass("note-air-layout"),t.attr("id","note-dialog-"+o),t.find("button.close, a.modal-close").click(function(){S(this).closest(".modal").modal("hide")}),t.appendTo(i)},this.createLayoutByFrame=function(e,t){var n=S('<div class="note-editor"></div>');t.width&&n.width(t.width),0<t.height&&S('<div class="note-statusbar">'+(t.disableResizeEditor?"":'<div class="note-resizebar"><div class="note-icon-bar"></div><div class="note-icon-bar"></div><div class="note-icon-bar"></div></div>')+"</div>").prependTo(n);var o=!e.is(":disabled"),o=S('<div class="note-editable" contentEditable="'+o+'"></div>').prependTo(n);t.height&&o.height(t.height),t.direction&&o.attr("dir",t.direction),o.html(E.html(e)||E.emptyPara),S('<textarea class="note-codable"></textarea>').prependTo(n);for(var i=S.extend(S.summernote.lang["en-US"],S.summernote.lang[t.lang]),r="",a=0,s=t.toolbar.length;a<s;a++){var l=t.toolbar[a][0],d=t.toolbar[a][1];r+='<div class="note-'+l+' btn-group">';for(var c=0,u=d.length;c<u;c++)S.isFunction(y[d[c]])&&(r+=y[d[c]](i,t));r+="</div>"}o=S(r='<div class="note-toolbar btn-toolbar">'+r+"</div>").prependTo(n);t.keyMap[N.isMac?"mac":"pc"];b(o,t);o=S(f(i,t)).prependTo(n);b(o,t),S(v()).prependTo(n),S(m(i,t)).prependTo(n).find("button.close, a.modal-close").click(function(){S(this).closest(".modal").modal("hide")}),S('<div class="note-dropzone"><div class="note-dropzone-message"></div></div>').prependTo(n),n.insertAfter(e),e.hide()},this.noteEditorFromHolder=function(e){return e.hasClass("note-air-editor")?e:e.next().hasClass("note-editor")?e.next():S()},this.createLayout=function(e,t){this.noteEditorFromHolder(e).length||(t.airMode?this.createLayoutByAirMode(e,t):this.createLayoutByFrame(e,t))},this.layoutInfoFromHolder=function(e){e=this.noteEditorFromHolder(e);if(e.length){var t,n=E.buildLayoutInfo(e);for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].call());return n}},this.removeLayout=function(e,t,n){n.airMode?(e.removeClass("note-air-editor note-editable").removeAttr("id contentEditable"),t.popover.remove(),t.handle.remove(),t.dialog.remove()):(e.html(t.editable.html()),t.editor.remove(),e.show())}},de=new function(){function o(e){E.isImg(e.target)&&e.preventDefault()}function i(e){e=b(e.currentTarget||e.target),g.hide(e.popover()),v.hide(e.handle())}function r(e){var t=e.originalEvent.clipboardData;t&&t.items&&t.items.length&&(e=b(e.currentTarget||e.target).editable(),"file"===(t=L.head(t.items)).kind&&-1!==t.type.indexOf("image/")&&y(e,[t.getAsFile()]),h.afterCommand(e))}function a(e){var t,n,o,i,r,a,s,l;E.isControlSizing(e.target)&&(e.preventDefault(),e.stopPropagation(),e=b(e.target),t=e.handle(),n=e.popover(),o=e.editable(),e=e.editor(),i=t.find(".note-control-selection").data("target"),r=S(i),a=r.offset(),s=u.scrollTop(),l=e.data("options").airMode,u.on("mousemove",function(e){h.resizeTo({x:e.clientX-a.left,y:e.clientY-(a.top-s)},r,!e.shiftKey),v.update(t,{image:i},l),g.update(n,{image:i},l)}).one("mouseup",function(){u.off("mousemove"),h.afterCommand(o)}),r.data("ratio")||r.data("ratio",r.height()/r.width()))}function s(e){S(e.target).closest("[data-event]").length&&e.preventDefault()}function l(e){var t,n,o,i,r,a,s=S(e.target).closest("[data-event]");s.length&&(t=s.attr("data-event"),n=s.attr("data-value"),r=s.attr("data-hide"),o=b(e.target),e.preventDefault(),-1!==S.inArray(t,["resize","floatMe","removeMedia","imageShape"])&&(i=o.handle().find(".note-control-selection"),i=S(i.data("target"))),r&&s.parents(".popover").hide(),h[t]?((r=o.editable()).trigger("focus"),h[t](r,n,i)):C[t]&&C[t].call(this,o),-1!==S.inArray(t,["backColor","foreColor"])&&((a=o.editor().data("options",a)).airMode?g:p).updateRecentColor(L.head(s),t,n),w(e))}function d(e){e.preventDefault(),e.stopPropagation();var t=b(e.target).editable(),n=t.offset().top-u.scrollTop(),o=b(e.currentTarget||e.target).editor().data("options");u.on("mousemove",function(e){e=e.clientY-(n+k),e=0<o.minHeight?Math.max(e,o.minHeight):e;e=0<o.maxHeight?Math.min(e,o.maxHeight):e,t.height(e)}).one("mouseup",function(){u.off("mousemove")})}var c=S(window),u=S(document),f=S("html, body"),h=new $,p=new X,g=new ee,v=new te,m=new ne,b=function(e){var e=S(e).closest(".note-editor, .note-air-editor, .note-air-layout");return e.length?(e=e.is(".note-editor, .note-air-editor")?e:S("#note-editor-"+L.last(e.attr("id").split("-"))),E.buildLayoutInfo(e)):null},y=function(o,e){var i=o.data("callbacks");i.onImageUpload?i.onImageUpload(e,h,o):S.each(e,function(e,t){var n=t.name;K.readFileAsDataURL(t).then(function(e){h.insertImage(o,e,n)}).fail(function(){i.onImageUploadError&&i.onImageUploadError()})})},C={showLinkDialog:function(e){var t=HZ.textEditor.InsertLink.InsertLinkDialog.$richTextEditor,n=t.getSelection(),n=S(n.anchorNode);!n.hasClass("note-editable")&&n.closest(".note-editable").length||((n=t.$editor.children().first()).length||(n=S("<p><br></p>").appendTo(t.$editor)),t.selectNode(n,!0));var o=e.editable(),i=e.editor().data("options"),r=h.getLinkInfo(o);h.saveRange(o),HZ.textEditor.InsertLink.InsertLinkDialog.onInsertLinkCallback=function(e){h.restoreRange(o);var t=e.find(".text-input").val(),e=e.find(".url-input").val();""!==t&&""!==e&&h.createLink(o,{range:r.range,text:t,url:e,isNewWindow:!0},i)},HZ.textEditor.InsertLink.InsertLinkDialog.onViewLoadedCallback=function(e){e.find(".text-input").val(r.text),e.find(".url-input").val(r.url)},"undefined"!=typeof lightbox&&lightbox.isShowing()?(lightbox.detachKeyboardHandler(),HZ.ui.Yamdi.show(HZ.textEditor.InsertLink.InsertLinkDialog)):HZ.textEditor.InsertLink.showDialog()},showImageDialog:function(e){var t=e.editable();h.saveRange(t),HZ.textEditor.InsertPhoto.InsertPhotoDialog.onInsertPhotoCallback=function(e){h.restoreRange(t);e=e.find(".space-preview-thumb");h.insertIframedImage(t,e.data("spaceid"),e.data("width"),e.data("height"),e.data("isupload"),e.attr("src")),setTimeout(S.proxy(function(){this.$richTextEditor.limitImages()},this),250)},"undefined"!=typeof lightbox&&lightbox.isShowing()?(lightbox.detachKeyboardHandler(),HZ.ui.Yamdi.show(HZ.textEditor.InsertPhoto.InsertPhotoDialog)):HZ.textEditor.InsertPhoto.showDialog()},showVideoDialog:function(e){var t=e.editable();h.saveRange(t),HZ.textEditor.InsertVideo.InsertVideoDialog.onInsertVideoCallback=function(e){h.restoreRange(t),h.insertVideo(t,e.find(".video-input").val())},"undefined"!=typeof lightbox&&lightbox.isShowing()?(lightbox.detachKeyboardHandler(),HZ.ui.Yamdi.show(HZ.textEditor.InsertVideo.InsertVideoDialog)):HZ.textEditor.InsertVideo.showDialog()},showHelpDialog:function(e){var t=e.dialog(),n=e.editable();h.saveRange(n,!0),m.showHelpDialog(n,t).then(function(){h.restoreRange(n)})},fullscreen:function(e){function t(e){n.css("width",e.w),i.css("height",e.h),r.css("height",e.h),r.data("cmeditor")&&r.data("cmeditor").setsize(null,e.h)}var n=e.editor(),o=e.toolbar(),i=e.editable(),r=e.codable(),a=n.data("options");n.toggleClass("fullscreen");e=n.hasClass("fullscreen");e?(i.data("orgheight",i.css("height")),c.on("resize",function(){t({w:c.width(),h:c.height()-o.outerHeight()})}).trigger("resize"),f.css("overflow","hidden")):(c.off("resize"),t({w:a.width||"",h:i.data("orgheight")}),f.css("overflow","visible")),p.updateFullscreen(o,e)},codeview:function(e){var t,n,o=e.editor(),i=e.toolbar(),r=e.editable(),a=e.codable(),s=e.popover(),l=o.data("options");o.toggleClass("codeview");o=o.hasClass("codeview");o?(a.val(E.html(r,!0)),a.height(r.height()),p.deactivate(i),g.hide(s),a.focus(),N.hasCodeMirror&&(t=oe.fromTextArea(a[0],l.codemirror),l.codemirror.tern&&(n=new oe.TernServer(l.codemirror.tern),t.ternServer=n,t.on("cursorActivity",function(e){n.updateArgHints(e)})),t.setSize(null,r.outerHeight()),a.data("cmEditor",t))):(N.hasCodeMirror&&(t=a.data("cmEditor"),a.val(t.getValue()),t.toTextArea()),r.html(E.value(a)||E.emptyPara),r.height(l.height?a.height():"auto"),p.activate(i),r.focus()),p.updateCodeview(e.toolbar(),o)}},w=function(o){setTimeout(function(){var e,t=b(o.currentTarget||o.target),n=h.currentStyle(o.target);n&&((e=t.editor().data("options").airMode)||p.update(t.toolbar(),n),g.update(t.popover(),n,e),v.update(t.handle(),n,e))},0)},k=24,T=18,x=function(t){var n=S(),o=t.dropzone,i=t.dropzone.find(".note-dropzone-message");u.on("dragenter",function(e){t.editor.hasClass("codeview")||n.length||(t.editor.addClass("dragover"),o.width(t.editor.width()),o.height(t.editor.height()),i.text("Drag Image Here")),n=n.add(e.target)}).on("dragleave",function(e){(n=n.not(e.target)).length||t.editor.removeClass("dragover")}).on("drop",function(){n=S(),t.editor.removeClass("dragover")}),o.on("dragenter",function(){o.addClass("hover"),i.text("Drop Image")}).on("dragleave",function(){o.removeClass("hover"),i.text("Drag Image Here")}),o.on("drop",function(e){e.preventDefault();var t=e.originalEvent.dataTransfer;t&&t.files&&((e=b(e.currentTarget||e.target)).editable().focus(),y(e.editable(),t.files))}).on("dragover",!1)};this.bindKeyMap=function(o,i){var r=o.editor,a=o.editable;o=b(a),a.on("keydown",function(e){var t=[];e.metaKey&&t.push("CMD"),e.ctrlKey&&!e.altKey&&t.push("CTRL"),e.shiftKey&&t.push("SHIFT");var n=W.nameFromCode[e.keyCode];n&&t.push(n);t=i[t.join("+")];t?(e.preventDefault(),h[t]?h[t](a,r.data("options")):C[t]&&C[t].call(this,o)):W.isEdit(e.keyCode)&&h.afterCommand(a)})},this.attach=function(e,t){this.bindKeyMap(e,t.keyMap[N.isMac?"mac":"pc"]),e.editable.on("mousedown",o),e.editable.on("keyup mouseup",w),e.editable.on("scroll",i),e.editable.on("paste",r),e.handle.on("mousedown",a),e.popover.on("click",l),e.popover.on("mousedown",s),t.airMode||(n=e,t.disableDragAndDrop?u.on("drop",function(e){e.preventDefault()}):x(n),e.toolbar.on("click",l),e.toolbar.on("mousedown",s),t.disableResizeEditor||e.statusbar.on("mousedown",d)),(t.airMode?e.popover:e.toolbar).find(".note-dimension-picker-mousecatcher").css({width:t.insertTableMaxSize.col+"em",height:t.insertTableMaxSize.row+"em"}).on("mousemove",function(e){!function(e,t){var n=S(e.target.parentNode),o=n.next(),i=n.find(".note-dimension-picker-mousecatcher"),r=n.find(".note-dimension-picker-highlighted"),n=n.find(".note-dimension-picker-unhighlighted");a=void 0===e.offsetX?(a=S(e.target).offset(),{x:e.pageX-a.left,y:e.pageY-a.top}):{x:e.offsetX,y:e.offsetY};var e=Math.ceil(a.x/T)||1,a=Math.ceil(a.y/T)||1;r.css({width:e+"em",height:a+"em"}),i.attr("data-value",e+"x"+a),3<e&&e<t.insertTableMaxSize.col&&n.css({width:e+1+"em"}),3<a&&a<t.insertTableMaxSize.row&&n.css({height:a+1+"em"}),o.html(e+" x "+a)}(e,t)}),e.editor.data("options",t),t.styleWithSpan&&!N.isMSIE&&setTimeout(function(){document.execCommand("styleWithCSS",0,!0)},0);var n=new G(e.editable);e.editable.data("NoteHistory",n),t.onenter&&e.editable.keypress(function(e){13===e.keyCode&&t.onenter(e)}),t.onfocus&&e.editable.focus(t.onfocus),t.onblur&&e.editable.blur(t.onblur),t.onkeyup&&e.editable.keyup(t.onkeyup),t.onkeydown&&e.editable.keydown(t.onkeydown),t.onpaste&&e.editable.on("paste",t.onpaste),t.onToolbarClick&&e.toolbar.click(t.onToolbarClick),t.onChange&&(n=function(){h.triggerOnChange(e.editable)},N.isMSIE?e.editable.on("DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted",n):e.editable.on("input",n)),e.editable.data("callbacks",{onChange:t.onChange,onAutoSave:t.onAutoSave,onImageUpload:t.onImageUpload,onImageUploadError:t.onImageUploadError,onFileUpload:t.onFileUpload,onFileUploadError:t.onFileUpload})},this.dettach=function(e,t){e.editable.off(),e.popover.off(),e.handle.off(),e.dialog.off(),t.airMode||(e.dropzone.off(),e.toolbar.off(),e.statusbar.off())}};S.fn.extend({summernote:function(o){return o=S.extend({},S.summernote.options,o),this.each(function(e,t){var n=S(t);le.createLayout(n,o);t=le.layoutInfoFromHolder(n);de.attach(t,o),E.isTextarea(n[0])&&n.closest("form").submit(function(){n.val(n.code())})}),this.first().length&&o.focus&&le.layoutInfoFromHolder(this.first()).editable.focus(),this.length&&o.oninit&&o.oninit(),this},code:function(n){if(void 0!==n)return this.each(function(e,t){t=le.layoutInfoFromHolder(S(t));t&&t.editable&&t.editable.html(n)}),this;var e=this.first();if(e.length){var t=le.layoutInfoFromHolder(e);if(t&&t.editable){var o=t.editor.hasClass("codeview");return o&&N.hasCodeMirror&&t.codable.data("cmEditor").save(),o?t.codable.val():t.editable.html()}return E.isTextarea(e[0])?e.val():e.html()}},destroy:function(){return this.each(function(e,t){var n=S(t),o=le.layoutInfoFromHolder(n);o&&o.editable&&(t=o.editor.data("options"),de.dettach(o,t),le.removeLayout(n,o,t))}),this}})});

window.hzmr.push("summernote:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End summernote.js  **************/
/************* Start jquery.htmlClean.js for locale en-US **************/
try {!function(A){function C(t,e,n,a){if(t.tag.format&&0<n.length){n.push("\n");for(var i=0;i<a;i++)n.push("\t")}}function v(t,e){return x(t,function(t){return-1<A.inArray(t.tag.nameOriginal,e)})}function x(t,e,n){return!!e(t[t.length-(n=n||1)])||!!(0<t.length-n&&x(t,e,n+1))&&(t.pop(),!0)}function S(t){return t?(this.tag=t,this.isRoot=!1):(this.tag=new k("root"),this.isRoot=!0),this.attributes=[],this.children=[],this.hasAttribute=function(t){for(var e=0;e<this.attributes.length;e++)if(this.attributes[e].name==t)return!0;return!1},this.childrenToString=function(){return this.children.join("")},this}function I(t,e){return this.name=t,this.value=e,this}function k(t,a,i,r){return this.name=t.toLowerCase(),this.nameOriginal=this.name,this.render=!0,this.init=function(){if("--"==this.name?(this.isComment=!0,this.isSelfClosing=!0,this.format=!0):(this.isComment=!1,this.isSelfClosing=-1<A.inArray(this.name,u),this.isNonClosing=-1<A.inArray(this.name,m),this.isClosing=null!=a&&0<a.length,this.isInline=-1<A.inArray(this.name,s),this.disallowNest=-1<A.inArray(this.name,h),this.requiredParent=o[A.inArray(this.name,o)+1],this.allowEmpty=r&&-1<A.inArray(this.name,r.allowEmpty),this.toProtect=-1<A.inArray(this.name,c),this.format=-1<A.inArray(this.name,l)||!this.isInline),this.rawAttributes=i,this.requiredAttributes=g[A.inArray(this.name,g)+1],r){if(r.tagAttributesCache||(r.tagAttributesCache=[]),-1==A.inArray(this.name,r.tagAttributesCache)){for(var t=d[A.inArray(this.name,d)+1].slice(0),e=0;e<r.allowedAttributes.length;e++){var n=r.allowedAttributes[e][0];(1==r.allowedAttributes[e].length||-1<A.inArray(this.name,r.allowedAttributes[e][1]))&&-1==A.inArray(n,t)&&t.push(n)}r.tagAttributesCache.push(this.name),r.tagAttributesCache.push(t)}this.allowedAttributes=r.tagAttributesCache[A.inArray(this.name,r.tagAttributesCache)+1]}},this.init(),this.rename=function(t){this.name=t,this.init()},this}function E(t){for(;n(t)&&0<t.children.length;)t=t.children[0];if(!T(t))return!1;var e=j(t);return 0<e.length&&A.htmlClean.isWhitespace(e.charAt(0))}function q(t){for(;n(t)&&0<t.children.length;)t=t.children[t.children.length-1];if(!T(t))return!1;var e=j(t);return 0<e.length&&A.htmlClean.isWhitespace(e.charAt(e.length-1))}function T(t){return t.constructor==String}function R(t){return T(t)||t.tag.isInline}function n(t){return t.constructor==S}function j(t){return t.replace(/&nbsp;|\n/g," ").replace(/\s\s+/g," ")}A.fn.htmlClean=function(t){return this.each(function(){this.value?this.value=A.htmlClean(this.value,t):this.innerHTML=A.htmlClean(this.innerHTML,t)})},A.htmlClean=function(t,e){(e=A.extend({},A.htmlClean.defaults,e)).allowEmpty=P.concat(e.allowEmpty);var n,a,i=/(<(\/)?(\w+:)?([\w]+)([^>]*)>)|<!--(.*?--)>/gi,r=/([\w\-]+)\s*=\s*(".*?"|'.*?'|[^\s>\/]*)/gi,s=new S,l=[s],h=s;for(t=(t=e.bodyOnly&&(n=/<body[^>]*>((\n|.)*)<\/body>/i.exec(t))?n[1]:t).concat("<xxx>");n=i.exec(t);){var o,c=n[6]?new k("--",null,n[6],e):new k(n[4],n[2],n[5],e),u=t.substring(a,n.index);if(0<u.length&&(o=h.children[h.children.length-1],0<h.children.length&&T(o=h.children[h.children.length-1])?h.children[h.children.length-1]=o.concat(u):h.children.push(u)),a=i.lastIndex,c.isClosing)v(l,[c.name])&&(l.pop(),h=l[l.length-1]);else{for(var m,d=new S(c);m=r.exec(c.rawAttributes);){if("style"==m[1].toLowerCase()&&e.replaceStyles)for(var g=!c.isInline,p=0;p<e.replaceStyles.length;p++)e.replaceStyles[p][0].test(m[2])&&(g=g||!(c.render=!1),h.children.push(d),l.push(d),h=d,c=new k(e.replaceStyles[p][1],"","",e),d=new S(c));null!=c.allowedAttributes&&(0==c.allowedAttributes.length||-1<A.inArray(m[1],c.allowedAttributes))&&d.attributes.push(new I(m[1],m[2]))}A.each(c.requiredAttributes,function(){var t=this.toString();d.hasAttribute(t)||d.attributes.push(new I(t,""))});for(var f=0;f<e.replace.length;f++)for(var b=0;b<e.replace[f][0].length;b++){var y="string"==typeof e.replace[f][0][b];if(y&&e.replace[f][0][b]==c.name||!y&&e.replace[f][0][b].test(n)){c.rename(e.replace[f][1]),f=e.replace.length;break}}u=!0;if(h.isRoot||(h.tag.isInline&&!c.isInline?(u=x(l,function(t){return t.isRoot||!t.tag.isInline}))&&(h=l[l.length-1]):h.tag.disallowNest&&c.disallowNest&&!c.requiredParent?u=!1:c.requiredParent&&(u=v(l,c.requiredParent))&&(h=l[l.length-1])),u)if(h.children.push(d),c.toProtect)for(;w=i.exec(t);){var w=new k(w[4],w[1],w[5],e);if(w.isClosing&&w.name==c.name){d.children.push(RegExp.leftContext.substring(a)),a=i.lastIndex;break}}else c.isSelfClosing||c.isNonClosing||(l.push(d),h=d)}}return A.htmlClean.trim(function t(n,a){var i=[],e=0==n.attributes.length,r=0;if(n.tag.isComment)a.allowComments&&(i.push("\x3c!--"),i.push(n.tag.rawAttributes),i.push(">"),a.format&&C(n,0,i,r-1));else{var s=n.tag.render&&(0==a.allowedTags.length||-1<A.inArray(n.tag.name,a.allowedTags))&&(0==a.removeTags.length||-1==A.inArray(n.tag.name,a.removeTags));if(!n.isRoot&&s&&(i.push("<"),i.push(n.tag.name),A.each(n.attributes,function(){var t,e;-1==A.inArray(this.name,a.removeAttrs)&&(e=RegExp(/^(['"]?)(.*?)['"]?$/).exec(this.value),t=e[2],e=e[1]||"'",null!=(t="class"==this.name&&0<a.allowedClasses.length?A.grep(t.split(" "),function(e){return 0<A.grep(a.allowedClasses,function(t){return t==e||t[0]==e&&(1==t.length||-1<A.inArray(n.tag.name,t[1]))}).length}).join(" "):t)&&(0<t.length||-1<A.inArray(this.name,n.tag.requiredAttributes))&&(i.push(" "),i.push(this.name),i.push("="),i.push(e),i.push(t),i.push(e)))})),n.tag.isSelfClosing)s&&i.push(" />"),e=!1;else if(n.tag.isNonClosing)e=!1;else{if(!n.isRoot&&s&&i.push(">"),r=a.formatIndent++,n.tag.toProtect)l=A.htmlClean.trim(n.children.join("")).replace(/<br>/gi,"\n"),i.push(l),e=0==l.length;else{for(var l=[],h=0;h<n.children.length;h++){var o=n.children[h],c=A.htmlClean.trim(j(T(o)?o:o.childrenToString()));R(o)&&0<h&&0<c.length&&(E(o)||q(n.children[h-1]))&&l.push(" "),T(o)?0<c.length&&l.push(c):h==n.children.length-1&&"br"==o.tag.name||(a.format&&C(o,0,l,r),l=l.concat(t(o,a)))}a.formatIndent--,0<l.length&&(a.format&&"\n"!=l[0]&&C(n,0,i,r),i=i.concat(l),e=!1)}!n.isRoot&&s&&(a.format&&C(n,0,i,r-1),i.push("</"),i.push(n.tag.name),i.push(">"))}if(!n.tag.allowEmpty&&e)return[]}return i}(s,e).join(""))},A.htmlClean.defaults={bodyOnly:!0,allowedTags:[],removeTags:["basefont","center","dir","font","frame","frameset","isindex","menu","noframes","s","strike","u"],allowedAttributes:[],removeAttrs:[],allowedClasses:[],format:!1,formatIndent:0,replace:[[["b","big"],"strong"],[["i"],"em"]],replaceStyles:[[/font-weight:\s*bold/i,"strong"],[/font-style:\s*italic/i,"em"],[/vertical-align:\s*super/i,"sup"],[/vertical-align:\s*sub/i,"sub"]],allowComments:!1,allowEmpty:[]},A.htmlClean.trim=function(t){return A.htmlClean.trimStart(A.htmlClean.trimEnd(t))},A.htmlClean.trimStart=function(t){return t.substring(A.htmlClean.trimStartIndex(t))},A.htmlClean.trimStartIndex=function(t){for(var e=0;e<t.length-1&&A.htmlClean.isWhitespace(t.charAt(e));e++);return e},A.htmlClean.trimEnd=function(t){return t.substring(0,A.htmlClean.trimEndIndex(t))},A.htmlClean.trimEndIndex=function(t){for(var e=t.length-1;0<=e&&A.htmlClean.isWhitespace(t.charAt(e));e--);return e+1},A.htmlClean.isWhitespace=function(t){return-1!=A.inArray(t,e)};var s=["a","abbr","acronym","address","b","big","br","button","caption","cite","code","del","em","font","hr","i","input","img","ins","label","legend","map","q","s","samp","select","option","param","small","span","strike","strong","sub","sup","tt","u","var"],l=["address","button","caption","code","input","label","legend","select","option","param"],h=["h1","h2","h3","h4","h5","h6","p","th","td","object"],P=["th","td"],o=[null,"li",["ul","ol"],"dt",["dl"],"dd",["dl"],"td",["tr"],"th",["tr"],"tr",["table","thead","tbody","tfoot"],"thead",["table"],"tbody",["table"],"tfoot",["table"],"param",["object"]],c=["script","style","pre","code"],u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],m=["!doctype","?xml"],d=[["class"],"?xml",[],"!doctype",[],"a",["accesskey","class","href","name","title","rel","rev","type","tabindex"],"abbr",["class","title"],"acronym",["class","title"],"blockquote",["cite","class"],"button",["class","disabled","name","type","value"],"del",["cite","class","datetime"],"form",["accept","action","class","enctype","method","name"],"iframe",["class","height","name","sandbox","seamless","src","srcdoc","width"],"input",["accept","accesskey","alt","checked","class","disabled","ismap","maxlength","name","size","readonly","src","tabindex","type","usemap","value"],"img",["alt","class","height","src","width"],"ins",["cite","class","datetime"],"label",["accesskey","class","for"],"legend",["accesskey","class"],"link",["href","rel","type"],"meta",["content","http-equiv","name","scheme","charset"],"map",["name"],"optgroup",["class","disabled","label"],"option",["class","disabled","label","selected","value"],"q",["class","cite"],"script",["src","type"],"select",["class","disabled","multiple","name","size","tabindex"],"style",["type"],"table",["class","summary"],"th",["class","colspan","rowspan"],"td",["class","colspan","rowspan"],"textarea",["accesskey","class","cols","disabled","name","readonly","rows","tabindex"],"param",["name","value"],"embed",["height","src","type","width"]],g=[[],"img",["alt"]],e=[" "," ","\t","\n","\r","\f"]}(jQuery);

window.hzmr.push("jquery.htmlClean:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.htmlClean.js  **************/
/************* Start richTextEditor.js for locale en-US **************/
try {HZ.ns("HZ.textEditor"),HZ.textEditor.RichTextEditor=HZ.textEditor.RichTextEditor||{},$.fn.RichTextEditor=function(t){this.imageLimit=10,this.inactiveHeight=102;var e=this.textArea=null;this.activeHeight=102,this.shortFormMaxHeight=102,this.longFormMaxHeight=320,this.styleWithSpan=!1,this.toolbar=[["style",["bold","italic"]],["list",["ul","ol"]],["picture",["picture"]],["video",["video"]],["link",["link"]]],this.allowedTags=["p","br","a","img","iframe","b","i","ul","ol","li"],this.allowedAttributes=[["target",["a"]],["frameborder",["iframe"]],["class",["p"]],["style",["p"]],["data-hzurl",["img"]],["onContextMenu",["img"]],["onmousedown",["img"]],["ondragstart",["img"]],["onselectstart",["img"]],["width",["img"]],["height",["img"]]],this.removeTags=[],this.removeAttributes=[],this.allowEmpty=[],this.replaceTags=[[["div"],"p"]],this.allowedHotKeyFunctions=["italic","bold"],this.supportsDirectUpload=!(UIHelper.isIE6||UIHelper.isIE7||UIHelper.isIE8||UIHelper.isIE9),this.onEnter=function(t){},this.onKeyUp=function(t){},this.onKeyDown=function(t){this.disableControlCommands(t)},this.onFocus=function(t){},this.onBlur=function(t){this.$editor.find("div").length},this.onPaste=function(t){setTimeout($.proxy(function(){this.limitImages()},this),0)},this.setDirty=function(){if(this.$editorWrapper&&this.$editorWrapper.parents("form"))return this.$editorWrapper.closest("form").addClass("dirty")},this.setClean=function(){return this.$editorWrapper.closest("form").removeClass("dirty")},this.isDirty=function(){return this.$editorWrapper.closest("form").hasClass("dirty")},this.contentHasChanged=function(){if(!this.isDirty())return!1;var t=this.$editor.code();return e&&e.length?e!=t:!this.isEmpty()},this.onChange=function(t,e){this.setDirty(),this.limitImages()},this.onInit=function(){this.initObjectReferences(),this.initOnEditorClick(),this.initOnIframeWrapperClick(),this.initOnWindowResize(),this.prepareDialogs(),this.repositionToolbar(),this.styleToolbarButtons(),this.supportsDirectUpload&&this.initUploadPhotoButton(),this.resizeToolbarButtons(),this.stylePopovers(),this.showEditor(),this.translateText(),this.setClean(),$(window).on("beforeunload",$.proxy(function(){if(this.contentHasChanged())return _hgt("You haven't finished your post yet. Do you want to leave without posting?")},this))},this.initObjectReferences=function(){this.$editor=this.$wrapper.find(".note-editable"),this.$toolbar=this.$wrapper.find(".note-toolbar"),this.$linkPopover=this.$wrapper.find(".note-link-popover"),this.$editor.wrap('<div class="note-editable-wrapper"></div>'),this.$editorWrapper=this.$editor.parent(".note-editable-wrapper").css("min-height",this.inactiveHeight),(e=this.textArea&&0<this.textArea.length?this.textArea.val():null)&&this.textArea.attr("placeholder")&&e==this.textArea.attr("placeholder")&&(e=null)},this.focusEditor=function(t){return this.$editor.focus(),t&&this.selectNode(this.$editor,!0),this},this.blurEditor=function(){return this.$editor.blur(),this.clearSelection(),this},this.wrapWithParagraph=function(){var t=this.getSelection(),e=$(t.anchorNode);return t.anchorNode&&3===t.anchorNode.nodeType&&e.parent().hasClass("note-editable")&&(e.wrap("<p></p>"),this.selectNode(e.parent(),!1)),this},this.limitImages=function(){var t=this.$editor.find("img");t.length>=this.imageLimit?(t.slice(this.imageLimit).remove(),this.$toolbar.find(".note-picture button").prop("disabled",!0).attr("data-event",""),this.$toolbar.find(".note-upload button").prop("disabled",!0)):(this.$toolbar.find(".note-picture button").prop("disabled",!1).attr("data-event","showImageDialog"),this.$toolbar.find(".note-upload button").prop("disabled",!1))},this.clearSelection=function(){return window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this},this.isEmpty=function(){return""==$.trim(this.$editor.text())&&!this.$editor.find("img, iframe").length},this.resizeToolbarButtons=function(){return this.$toolbar.find("button span").toggle(460<this.$editor.width()),this},this.initUploadPhotoButton=function(){return this.$uploadPhotoFileInput=$('<input name="file" type="file">').appendTo("body").hide(),this.$uploadPhotoButton=$('<button type="button" class="btn btn-default btn-sm btn-small" title="'+_hgt("Upload Photo")+'" data-hide="true" tabindex="-1"><i class="fa-link hzi-font hzi-Add_Photo"></i><span>'+_hgt("Photo")+"</span></button>").on("click",$.proxy(function(){this.$uploadPhotoFileInput.click()},this)),this.$uploadPhotoFileInput.ajaxfileupload({action:"/createTempPhoto",params:{type:-1,minHeight:0,minWidth:0},submit_button:null,onStart:$.proxy(function(){this.insertThrobber()},this),onComplete:$.proxy(function(t){!1===t.status&&void 0!==t.message||t.error||t.tempImageUrl&&this.insertUploadedPhoto(t.tempImageUrl)},this)}),this.$uploadPhotoButton.insertBefore(this.$toolbar.find(".note-picture")),this.$uploadPhotoButton.wrap('<div class="note-upload btn-group"></div>'),this},this.insertThrobber=function(){this.focusEditor();var t=document.selection;t?(t=t.createRange(),document.execCommand("insertImage",!1,HZ.utils.Links.getPicUrl("greenThrobber.gif")),t.collapse(!1),t.select()):document.execCommand("insertImage",!1,HZ.utils.Links.getPicUrl("greenThrobber.gif")),this.$imageThrobber=this.$editor.find('img[src="'+HZ.utils.Links.getPicUrl("greenThrobber.gif")+'"]'),this.selectNode(this.$imageThrobber,!1)},this.insertUploadedPhoto=function(t){var e;this.$imageThrobber.length&&(e=$('<img oncontextmenu="return false;" data-pin-no-hover="true" class="hide-context"  data-hzurl="'+t+'" src="'+t+'">').on("load",$.proxy(function(t){},this)),this.$imageThrobber.replaceWith(e),(t=e.next()).length||(t=$("<p><br></p>").insertAfter(e),this.selectNode(t,!0)))},this.showEditor=function(){return this.$toolbar.show(),this},this.disableControlCommands=function(t){if(t.ctrlKey||t.metaKey)switch(t.keyCode){case 66:case 98:this.preventDefault(t);break;case 73:case 105:break;case 85:case 117:this.preventDefault(t)}},this.interceptPastedFiles=function(t){for(var e=t.originalEvent.clipboardData,i=new RegExp("^data:"),o=0;o<e.types.length;o++)"Files"===e.types[o]&&(setTimeout($.proxy(function(){this.$editor.find("img").each(function(t,e){e=$(e);e.attr("src").match(i)&&e.remove()})},this),250),this.preventDefault(t));return this},this.preventDefault=function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},this.interceptPastedHtml=function(t){var e=HZ.utils.Links.getPageUrl("previewHouzzObject"),i=new RegExp("\\/\\/(player.)?vimeo.com\\/([a-z]*\\/)*([0-9]{6,11})[?]?.*"),t=t.originalEvent.clipboardData.getData("text/html"),o=new RegExp("https?://st.(houzz2?|stghouzz).com/([sf]imgs|simgstmp)/"),s=new RegExp(e),a=new RegExp("^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*"),r=new RegExp(i);return t.length&&setTimeout($.proxy(function(){this.$editor.find("img").each(function(t,e){e=$(e);e.attr("src")&&!e.attr("src").match(o)&&e.remove()}),this.$editor.find("iframe").each(function(t,e){e=$(e);!e.attr("src")||e.attr("src").match(s)||e.attr("src").match(a)||e.attr("src").match(r)||e.remove()}),this.$editor.find("p:not(.iframe-wrapper):not(.iframe-throbber), a").each(function(t,e){$(e).attr("class","").attr("style","")})},this),250),this},this.interceptPastedText=function(t){for(var e=0;e<t.originalEvent.clipboardData.types.length;e++)if("text/html"===t.originalEvent.clipboardData.types[e])return this;var i=t.originalEvent.clipboardData.getData("text/plain");return i.length&&this.convertUrlsToLinks(t,i),this};return this.interceptKeyDown=function(t){var e,i,o,s=t.which,a=this.getSelection(),a=$(a.anchorNode);return 32===s||47<s&&s<58||64<s&&s<91||95<s&&s<112||(185<s&&s<193||218<s&&s<223)?a.closest(".iframe-wrapper").length&&(o=this.onEnterKey(a),this.selectNode(o,!0)):37===s||38===s?a.closest(".iframe-wrapper").length&&((e=a.prev()).length||(e=$("<p><br></p>"),a.before(e)),this.selectNode(e,!1),this.preventDefault(t)):39===s||40===s?a.closest(".iframe-wrapper").length&&((o=a.next()).length||(o=$("<p><br></p>"),a.after(o)),this.selectNode(o,!0),this.preventDefault(t)):8===s?(i=a.closest(".iframe-wrapper")).length&&(e=this.onBackspaceKey(i),this.selectNode(e,!1),this.preventDefault(t)):13===s&&(i=a.closest(".iframe-wrapper")).length&&(o=this.onEnterKey(a),this.selectNode(o,!0),this.preventDefault(t)),this},this.onEnterKey=function(t){var e=$("<p><br></p>");return t.after(e).remove(),e},this.onBackspaceKey=function(t){var e=t.prev();return e.length||(e=$("<p><br></p>"),t.before(e)),t.remove(),e},this.selectNode=function(t,e){var i,o;return window.getSelection&&document.createRange?(o=document.createRange(),i=window.getSelection(),null!=e?(o.selectNodeContents(t[0]),o.collapse(e)):o.selectNode(t[0]),i.removeAllRanges(),i.addRange(o)):document.selection&&document.body.createTextRange&&((o=document.body.createTextRange()).moveToElementText(t[0]),o.collapse(e),o.select()),this},this.selectIframeWrapper=function(){var t=this.getSelection(),e=$(t.anchorNode).closest(".iframe-wrapper");return e.length?e.hasClass("loading")?((t=e.prev()).length||(t=$("<p><br></p>"),e.before(t)),this.selectNode(t,!1)):(this.selectNode(e),e.addClass("selected")):this.$wrapper.find(".iframe-wrapper.selected").removeClass("selected"),this},this.getSelection=function(){return window.getSelection?window.getSelection():document.selection.createRange?document.selection.createRange():void 0},this.scrollToCursor=function(t){if(t&&"keyup"==t.type){var e=t.keyCode;if(0<=$.inArray(e,[8,9,16,17,18,19,20,27,33,34,35,36,37,38,39,40,46,91,93,144,145]))return this}var i=this.getSelection();return"None"!==i.type&&i.anchorNode&&(this.$cursorSpan=this.$cursorSpan||$('<span class="cursor-span"></span>'),i.getRangeAt(0).insertNode(this.$cursorSpan[0]),t=this.$cursorSpan.offset().top,e=this.$editorWrapper.offset().top,i=this.$editorWrapper.offset().top+this.$editorWrapper.height(),(t<e-10||i+10<t)&&this.$editorWrapper.scrollTop(this.$cursorSpan.position().top)),this},this.editSummernoteHotkeys=function(t){return this.editKeyMap($.summernote.options.keyMap.pc,t),this.editKeyMap($.summernote.options.keyMap.mac,t),this},this.editKeyMap=function(t,e){for(var i in t){var o=t[i];-1==$.inArray(o,e)&&delete t[i]}return this},this.repositionToolbar=function(){return this.$wrapper.find(".note-editor").append(this.$toolbar.hide().detach()),this},this.stylePopovers=function(){var t=this.$linkPopover.find("button[data-event=showLinkDialog]"),e=this.$linkPopover.find("button[data-event=unlink]");return t.before("|&nbsp;").after("&nbsp;|&nbsp;"),t.replaceWith('<span data-event="showLinkDialog">'+_hgt("Change")+"</span>"),e.replaceWith('<span data-event="unlink">'+_hgt("Remove")+"</span>"),this},this.prepareDialogs=function(){return HZ.textEditor.InsertPhoto.prepare(),HZ.textEditor.InsertLink.prepare(),HZ.textEditor.InsertVideo.prepare(),HZ.textEditor.InsertPhoto.InsertPhotoDialog.$richTextEditor=this,HZ.textEditor.InsertLink.InsertLinkDialog.$richTextEditor=this,HZ.textEditor.InsertVideo.InsertVideoDialog.$richTextEditor=this},this.resizeEditor=function(){return this},this.styleToolbarButtons=function(){var t=this.$toolbar;return t.find(".note-style").addClass("hidden-xs"),t.find(".note-list").addClass("hidden-xs"),t.find(".note-video").addClass("hidden-xs"),t.find(".note-link").addClass("hidden-xs"),t.find(".fa.icon-bold").removeClass("fa fa-bold icon-bold").addClass("hzi-font hzi-Bold"),t.find(".fa.icon-italic").removeClass("fa fa-italic icon-italic").addClass("hzi-font hzi-Italics"),t.find(".fa.icon-list-ol").removeClass("fa fa-list-ol icon-list-ol").addClass("hzi-font hzi-Ordered-List"),t.find(".fa.icon-list-ul").removeClass("fa fa-list-ul icon-list-ul").addClass("hzi-font hzi-Unordered-List"),t.find(".fa.icon-picture").removeClass("fa fa-picture-o icon-picture").addClass("hzi-font hzi-Houzz-Photo").after("<span>"+(this.supportsDirectUpload?_hgt("Houzz Photo"):_hgt("Photo"))+"</span>"),t.find(".note-picture button").attr("title",_hgt("Choose or Upload a Photo")),t.find(".fa.icon-play").removeClass("fa fa-youtube-play icon-play").addClass("hzi-font hzi-Video").after("<span>"+_hgt("Video")+"</span>"),t.find(".fa.icon-link").removeClass("fa fa-link-o icon-link").addClass("hzi-font hzi-Link").after("<span>"+_hgt("Link")+"</span>"),this},this.translateText=function(){this.$toolbar.find("button[title=Bold]").attr("title",_hgt("Bold")),this.$toolbar.find("button[title=Italic]").attr("title",_hgt("Italic")),this.$toolbar.find('button[title="Unordered list"]').attr("title",_hgt("Unordered List")),this.$toolbar.find('button[title="Ordered list"]').attr("title",_hgt("Ordered List")),this.$toolbar.find('button[title="Upload Photo"]').attr("title",_hgt("Upload Photo")),this.$toolbar.find('button[title="Choose or Upload a Photo"]').attr("title",_hgt("Choose or Upload a Photo")),this.$toolbar.find("button[title=Video]").attr("title",_hgt("Video")),this.$toolbar.find("button[title=Link]").attr("title",_hgt("Link")),this.$toolbar.find("button[title=Fullscreen]").attr("title",_hgt("Fullscreen"))},this.initOnIframeWrapperClick=function(){return this.$editor.on("click",".iframe-wrapper",$.proxy(function(t){this.$editor.find(".iframe-wrapper.selected").removeClass("selected"),this.selectNode(t.currentTarget);var e=this.getSelection(),i=document.createRange();i.selectNode(t.currentTarget),e.removeAllRanges(),e.addRange(i),$(t.currentTarget).addClass("selected")},this)),this},this.initOnEditorClick=function(){return this.$editorWrapper.on("click",$.proxy(function(t){$(t.target).hasClass("note-editable-wrapper")&&this.focusEditor(),$(t.target).closest(".iframe-wrapper").length||this.$editor.find(".iframe-wrapper.selected").removeClass("selected")},this)),this},this.initOnToolbarButtonClick=function(){return this.$toolbar.find("button").on("click",$.proxy(function(t){this.$editor.off("blur")},this)),this},this.initOnWindowResize=function(){var t=this.$editor.width();return $(window).resize($.throttle(250,$.proxy(function(){this.$editor.width()!=t&&(t=this.$editor.width(),this.resizeIframeWrappers(),this.resizeToolbarButtons())},this))),this},this.resizeIframeWrappers=function(){var t=this.$editor.find(".iframe-wrapper");return t.length&&t.each(function(t,e){var i=$(e),o=new RegExp("height=(:?[0-9]+)"),s=new RegExp("width=(:?[0-9]+)"),e=i.find("iframe").attr("src"),o=o.exec(e),e=s.exec(e),o=o&&1<o.length?parseInt(o[1]):null,e=e&&1<e.length?parseInt(e[1]):null,e=o&&e?o/(e>this.$editor.width()?e:this.$editor.width()):.56;i.css("padding-bottom",100*e+5+"%")}),this},this.cleanHtml=function(){var t=$.htmlClean(this.$editor.code(),{allowedTags:this.allowedTags,allowedAttributes:this.allowedAttributes,removeAttrs:this.removeAttributes,removeTags:this.removeTags,replace:this.replaceTags,allowEmpty:this.allowEmpty});return this.$editor.html(t),this.$editor.contents().each(function(t,e){3===e.nodeType&&$(e).wrap("<p></p>")}),this},this.positionCaretAtEnd=function(){return this.selectNode(this.$editor,!1),this},this.prepare=function(){return this.$wrapper=this.closest(".rich-text-editor-wrapper"),this.editSummernoteHotkeys(this.allowedHotKeyFunctions),this},this.init=function(){return this.summernote({styleWithSpan:this.styleWithSpan,toolbar:this.toolbar,onkeyup:$.proxy(function(t){this.onKeyUp(t)},this),onkeydown:$.proxy(function(t){return this.onKeyDown(t)},this),onenter:$.proxy(function(t){this.onEnter(t)},this),onfocus:$.proxy(function(t){this.onFocus(t)},this),onblur:$.proxy(function(t){this.onBlur(t)},this),onpaste:$.proxy(function(t){this.onPaste(t)},this),onChange:$.proxy(function(t,e){this.onChange(t,e)},this),oninit:$.proxy(function(){this.onInit()},this)}),this},this.convertUrlsToLinks=function(t,e){var i=new RegExp("https?://*"),o=e.match(i),i=new RegExp("https?://(?:www\\.)?(?:mytest|houzztest|houzz2?|stghouzz)\\.[A-Za-z\\./]*/("+HZ.utils.Config.spaceCommand+"|"+HZ.utils.Config.galleryCommand+"|projects)/(\\d+)(?=(?:\\D|$))[/\\?=&\\+%\\w-#]*");e.match(i);o&&o[0].length&&(-1===e.indexOf("://")&&(e="http://"+e),document.execCommand("insertHTML",!0,'<a href="'+e+'" target="_blank">'+e+"</a>"),t.preventDefault())},$.extend(this,t||{}),this},HZ.textEditor.InsertPhotoDialog=function(){HZ.textEditor.InsertPhotoDialog.superclass.constructor.call(this),this.initVariables=function(){return this.allSpaces={},this.isUploadedImage=!1,this.areIdeabooksLoaded=!1,this.ideabooks={},this.ideabookSpaces={},this.areProjectsLoaded=!1,this.projects={},this.projectSpaces={},this},this.createDialogBody=function(){var t='<ul class="nav nav-tabs"><li class="active"><div>'+_hgt("Ideabooks")+"</div></li><li><div>"+_hgt("Projects")+"</div></li><li><div>"+_hgt("Houzz URL")+"</div></li></ul>",e='<div class="tab-view ideabooks-view"><select class="ideabook-list form-control"></select><div class="no-ideabooks-message">'+_hgt("Give your ideas a home: create an ideabook for each thing you’re working on")+'</div><div class="ideabook-spaces-wrapper"><div class="ideabook-spaces-list">&nbsp;</div><div class="load-more-ideabook-spaces-throbber"></div><a class="load-more-ideabook-spaces-button">'+_hgt("Show More Photos")+"</a></div></div>",i='<div class="tab-view projects-view"><select class="project-list form-control"></select><div class="no-projects-message">'+_hgt("Show off your work: upload your project photos")+'</div><div class="project-spaces-wrapper"><div class="project-spaces-list">&nbsp;</div><div class="load-more-project-spaces-throbber"></div><a class="load-more-project-spaces-button">'+_hgt("Show More Photos")+"</a></div></div>",o='<div class="tab-view houzz-view"><div class="url-label">'+_hgt("Insert a photo you found on Houzz")+'</div><input class="url-input" type="text" placeholder="'+_hgt("Paste a URL here")+'"><div class="url-caption mtm">'+_hgt("e.g. http://www.houzz.com/photos/5/Amazing-Kitchen")+"</div></div>";return this.$body=$('<div class="insert-photo-wrapper row"><div class="left-container col-md-6"><div class="ajax-throbber"></div>'+t+e+i+o+'</div><div class="right-container col-md-6"><div class="preview-view"><div class="preview-wrapper"></div><form action="javascript:;" class="dropzone hz-dropzone"></form><div class="dropzone-messages"></div></div></div></div>'),this},this.defineViewObjects=function(){return this.$leftContainer=this.$body.find(".left-container"),this.$tabControls=this.$body.find(".nav-tabs"),this.$tabViews=this.$body.find(".tab-view"),this.$ideabooksView=this.$body.find(".ideabooks-view"),this.$projectsView=this.$body.find(".projects-view"),this.$houzzView=this.$body.find(".houzz-view"),this.$previewView=this.$body.find(".preview-view"),this},this.addEventListeners=function(){return this.$tabControls.find("li").on("click",$.proxy(function(t){this.viewTabAtIndex($(t.target).closest("li").index())},this)),this.$previewView.on("click",".delete-preview-icon",$.proxy(function(){this.deselectSpace(),this.getBody().find(".url-input").val("")},this)),this.$houzzView.find(".url-input").on("paste",$.proxy(function(t){setTimeout($.proxy(function(){this.previewSpaceByUrl($(t.target).val())},this),0)},this)).on("focus",$.proxy(function(t){this.previewSpaceByUrl($(t.target).val())},this)).on("focus",function(t){$(this).select()}),this.$ideabooksView.find(".ideabook-list").change($.proxy(function(t){this.loadSpacesFromIdeabook($(t.target).val())},this)),this.$projectsView.find(".project-list").change($.proxy(function(t){this.loadSpacesFromProject($(t.target).val())},this)),this},this.initDropzoneSettings=function(){var i=this;return this.dropzoneSettings={autoProcessQueue:!0,url:"/createTempPhoto",forceFallback:!1,paramName:"file",parallelUploads:1,createImageThumbnails:!0,addRemoveLinks:!1,thumbnailWidth:340,thumbnailHeight:360,maxFilesize:30,maxFiles:1,uploadMultiple:!1,previewsContainer:".dropzone-messages",previewTemplate:"<div class='dz-preview dz-file-preview'><div class='dz-details'><div class='dz-filename hide'><span data-dz-name></span></div><div class='dz-size hide' data-dz-size></div> <img class='hide' data-dz-thumbnail /></div><div class='dz-progress hide'><span class='dz-upload' data-dz-uploadprogress></span></div><div class='dz-success-mark hide'><span>✔</span></div><div class='dz-error-mark hide'><span>✘</span></div><div class='dz-error-message'><span data-dz-errormessage></span></div></div>",acceptedFiles:".jpg,.jpeg,.gif,.png,.tif,.tiff",dictDefaultMessage:"<i></i>"+_hgt("Click or drag & drop a photo here to upload"),dictFallbackMessage:_hgt(""),dictFallbackText:_hgt("Click 'Browse' to select an image file from your hard drive, then click 'Upload'"),dictFileTooBig:_hgt("File is too big ({size}MB). Max filesize: {max}MB.",{"size:":"{{filesize}}",max:"{{maxFilesize}}"}),dictInvalidFileType:_hgt("You can't upload files of this type"),dictResponseError:_hgt("Server responded with {statusCode} code.",{statusCode:"{{statusCode}}"}),dictCancelUpload:_hgt("Cancel upload"),dictCancelUploadConfirmation:_hgt("Are you sure you want to cancel this upload?"),dictRemoveFile:_hgt("Remove file"),dictRemoveFileConfirmation:null,init:function(){var t=$(this.element).find(".dz-default.dz-message");t.find("i").remove(),t.find("span").append('<button class="hzBtn secondary"><i class="hzi-font hzi-Search"></i><span>'+_hgt("Browse")+"</span></button>"),this.on("sending",function(t,e,i){i.append("type",-1),i.append("minWidth",0),i.append("minHeight",0)}).on("complete",function(t){}).on("success",function(t,e){this.removeFile(t),(e="string"==typeof e?JSON.parse(e):e)&&"false"===e.success?(i.displayMessages(_hgt("Error uploading photo")),i.isUploadedImage=!1):e&&e.tempImageUrl&&(i.selectedSpaceImageUrl=e.tempImageUrl,i.isUploadedImage=!0,i.previewSpace())}).on("maxfilesexceeded",function(t){t&&this.removeFile(t)}).on("error",function(t,e,i){t&&this.removeFile(t)})}},this},this.prepareDialogSettings=function(){return this.dialogSettings={title:_hgt("Insert Photo"),body:this.$body,formName:"insert-photo-form",dialogClassName:"insert-photo-dialog",dialogSize:"modal-lg",controls:[HZ.ui.AjaxThrobber.getThrobber(),HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(this.onCancel,this)),HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Insert"),"",$.proxy(this.onInsertPhoto,this),!1)],onViewLoaded:$.proxy(function(){this.$richTextEditor.blurEditor(),this.resetDialog(),this.loadIdeabooks(),this.loadProjects(),this.initDropzone()},this),onViewUnloaded:$.proxy(function(){var t=this.$richTextEditor.getSelection();$(t.anchorNode).closest(".note-editable").length||this.$richTextEditor.focusEditor()},this)},this},this.resetDialog=function(){return this.$ideabooksView.find(".load-more-ideabook-spaces-throbber").hide(),this.$ideabooksView.find(".load-more-ideabook-spaces-button").hide(),this.$projectsView.find(".load-more-project-spaces-throbber").hide(),this.$projectsView.find(".load-more-project-spaces-button").hide(),this.$houzzView.find(".url-input").val(""),this.areIdeabooksLoaded&&this.areProjectsLoaded||this.$leftContainer.addClass("loading-spaces"),this.deselectSpace(),this},this.initDropzone=function(){return this.dropzone||(this.dropzone=new Dropzone(".hz-dropzone",this.dropzoneSettings),this.initAjaxFileUpload()),this},this.previewSpaceByUrl=function(t){var e=new RegExp("https?://(?:www\\.)?(?:mytest|houzztest|houzz2?|stghouzz)\\.[A-Za-z\\./]*/("+HZ.utils.Config.spaceCommand+"|"+HZ.utils.Config.photoCommand+"|"+HZ.utils.Config.productCommand+"|"+HZ.utils.Config.galleryCommand+"|projects)/(\\d+)(?=(?:\\D|$))[/\\?=&\\+%\\w-#]*","g"),e=t.match(e);return e&&e.length&&HZ.ajaz.Services.getMinimalSpaceData(e[0],$.proxy(function(t){if(t&&"true"===t.success&&t.spaces&&t.images){var e,i=HZ.data.Spaces.getCollection(),o=HZ.data.Images.getCollection();if(Object.keys)e=t.urlToId[Object.keys(t.urlToId)[0]];else for(var s in t.urlToId){e=t.urlToId[s];break}$.extend(!0,i,t.spaces),$.extend(!0,o,t.images),HZ.data.Spaces.addAll(i),HZ.data.Images.addAll(o),o=(i=HZ.data.Spaces.get(e)).iids[0],this.selectedSpaceImageUrl=HZ.utils.Links.C.baseStaticImageUrl+o+"_4-0000/home-design.jpg",this.selectedSpaceId=e,this.selectedSpaceWidth=i.w,this.selectedSpaceHeight=i.h,this.limitWidthWithinBounds(550),this.previewSpace()}},this)),this},this.initAjaxFileUpload=function(){var t=this.$previewView.find(".hz-dropzone .dz-fallback");return t.find('input[type="file"]').ajaxfileupload({action:"/createTempPhoto",params:{type:-1},submit_button:t.find("button[type=submit]"),onStart:function(){},onComplete:$.proxy(function(t){!1===t.status&&void 0!==t.message?(this.isUploadedImage=!1,this.displayMessages(t.message)):t.error?(this.isUploadedImage=!1,this.displayMessages(t.errorMessage||"")):t.tempImageUrl&&(this.selectedSpaceImageUrl=t.tempImageUrl,this.isUploadedImage=!0,this.previewSpace())},this)}),this},this.displayMessages=function(t){return this.$previewView.find(".dropzone-messages").html(t).show().delay(3e3).fadeOut(300),this},this.onInsertPhoto=function(){return this.onInsertPhotoCallback&&this.onInsertPhotoCallback.apply(this,[$(this.getBody())]),HZ.ui.Yamdi.hide(this),this},this.onCancel=function(){return HZ.ui.Yamdi.hide(this),this},this.viewTabAtIndex=function(t){return this.$tabControls.find("li").removeClass("active").eq(t).addClass("active"),this.$tabViews.hide().eq(t).show(),2===t&&this.$tabViews.eq(t).find(".url-input").focus(),this},this.infiniteScroll=function(t,e,i){return-90<-1*(t.height()-(e.height()-t.position().top))&&i(),this},this.loadIdeabooks=function(){return this.areIdeabooksLoaded||(HZ.ajaz.Services.getMyGalleries($.proxy(this.populateIdeabooks,this)),this.$ideabooksView.find(".ideabooks-list").empty().append('<option value="-1">'+_hgt("Loading Ideabooks...")+"</option>").attr("disabled","disabled")),this},this.loadProjects=function(){return this.areProjectsLoaded||(HZ.ajaz.Services.getProfessionalProjects(null,$.proxy(this.populateProjects,this)),this.$projectsView.find(".project-list").empty().append('<option value="-1">'+_hgt("Loading Projects...")+"</option>").attr("disabled","disabled")),this},this.populateIdeabooks=function(t){var e=this.$ideabooksView.find(".ideabook-list").removeAttr("disabled").empty();if(this.areIdeabooksLoaded=!0,!t.success||"true"!=t.success)return this.$ideabooksView.find(".ideabook-spaces-wrapper").hide(),this.$ideabooksView.find(".no-ideabooks-message").show(),void e.prop("disabled",!0);for(var i,o=0;o<t.galleries.own.length;o++){var s=t.galleries.own[o],a=s.id;this.ideabooks[a]=s,this.ideabooks[a].ajaxFromItem=0,this.ideabooks[a].ajaxItemsPerPage=1e3,this.ideabooks[a].fromItem=0,this.ideabooks[a].itemsPerPage=50,e.append('<option value="'+a+'">'+s.title+"</option>")}if(e.customDropdown(),Object.keys)i=Object.keys(this.ideabooks).length;else for(var r in i=0,this.ideabooks)i++;return i?this.loadSpacesFromIdeabook(t.galleries.own[0].id):(this.$ideabooksView.find(".no-ideabooks-message").show(),e.parent(".dropdown-wrapper-2").hide()),this.areProjectsLoaded&&this.areIdeabooksLoaded&&this.initTabViews(),this},this.populateProjects=function(t){var e=this.$projectsView.find(".project-list").removeAttr("disabled").empty();if(this.areProjectsLoaded=!0,!t.success||"true"!=t.success)return this.$projectsView.find(".project-spaces-wrapper").hide(),this.$projectsView.find(".no-projects-wrapper").show(),void e.prop("disabled",!0);for(var i,o=0;o<t.projects.length;o++){var s=t.projects[o],a=s.id;this.projects[a]=s,this.projects[a].ajaxFromItem=0,this.projects[a].ajaxItemsPerPage=1e3,this.projects[a].fromItem=0,this.projects[a].itemsPerPage=50,e.append('<option value="'+a+'">'+s.title+"</option>")}if(e.customDropdown(),Object.keys)i=Object.keys(this.projects).length;else for(var r in i=0,this.projects)i++;return i?this.loadSpacesFromProject(t.projects[0].id):(this.$projectsView.find(".no-projects-message").show(),e.parent(".dropdown-wrapper-2").hide()),this.areProjectsLoaded&&this.areIdeabooksLoaded&&this.initTabViews(),this},this.loadSpacesFromIdeabook=function(t){var e;return t!=this.currentIdeabookId&&(this.currentIdeabookId=t,this.$ideabooksView.find(".ideabook-spaces-list").empty(),t in this.ideabookSpaces?(e=this.ideabooks[t].fromItem,this.ideabooks[t].fromItem=0,this.populateIdeabookPhotos(t,e)):this.getSpacesForIdeabook(t)),this},this.loadSpacesFromProject=function(t){var e;return t!=this.currentProjectId&&(this.currentProjectId=t,this.$projectsView.find(".project-spaces-list").empty(),t in this.projectSpaces?(e=this.projects[t].fromItem,this.projects[t].fromItem=0,this.populateProjectPhotos(t,e)):this.getSpacesForProject(t)),this},this.getSpacesForIdeabook=function(i){var o=this.$ideabooksView.find(".load-more-ideabook-spaces-throbber").show();return HZ.ajaz.Services.getHousesByGallery(i,this.ideabooks[i].ajaxFromItem,this.ideabooks[i].ajaxItemsPerPage,$.proxy(function(t){for(var e in this.ideabookSpaces[i]=this.ideabookSpaces[i]||[],t.houses=t.houses||[],$.merge(this.ideabookSpaces[i],t.houses),t.houses)this.allSpaces[t.houses[e].i]=t.houses[e];t.hasMore?(this.ideabooks[i].ajaxFromItem+=this.ideabooks[i].ajaxItemsPerPage,this.getSpacesForIdeabook(i)):(o.hide(),this.populateIdeabookPhotos(i))},this)),this},this.getSpacesForProject=function(s){var a=this.$projectsView.find(".load-more-project-spaces-throbber").show();return HZ.ajaz.Services.getProfessionalProjectPhotosPaginated(s,null,this.projects[s].ajaxFromItem,this.projects[s].ajaxItemsPerPage,$.proxy(function(t){this.projectSpaces[s]=this.projectSpaces[s]||[];var e,i=[];for(o in t.spaces)i.push(t.spaces[o]);$.merge(this.projectSpaces[s],i);for(var o=0;o<i.length;o++)e=i[o],this.allSpaces[e.id]=e;t.hasMore?(this.projects[s].ajaxFromItem+=this.projects[s].ajaxItemsPerPage,this.getSpacesForProject(s)):(a.hide(),this.populateProjectPhotos(s))},this)),this},this.populateIdeabookPhotos=function(o,s){for(var a=this.ideabookSpaces[o],t=s||this.ideabooks[o].fromItem+this.ideabooks[o].itemsPerPage,r=this.$ideabooksView.find(".ideabook-spaces-list"),e=this.ideabooks[o].fromItem;e<t&&e<a.length;e++){var i=a[e],n=$('<img src="'+i.thumb+'">').hide(),i=$('<div id="thumb-'+i.i+'" class="picker-thumb"></div>').attr("data-spaceid",i.i).css("background-image","url("+i.thumb+")").append('<div class="selectedcheck"></div>').append(n).on("click",$.proxy(function(t){this.selectSpace($(t.target).data("spaceid"))},this));r.append(i)}return n&&n.one("load",$.proxy(function(t){var e,i=this.$ideabooksView.find(".ideabook-spaces-wrapper");0<a.length-(s||this.ideabooks[o].fromItem)?(e=$.proxy(function(){this.populateIdeabookPhotos(o)},this),i.on("scroll",$.throttle(250,$.proxy(function(){this.infiniteScroll(r,i,e)},this)))):i.off("scroll")},this)).each(function(){this.complete&&$(this).load()}),this.ideabooks[o].fromItem=e,this},this.populateProjectPhotos=function(o,s){for(var a=this.projectSpaces[o],t=s||this.projects[o].fromItem+this.projects[o].itemsPerPage,r=this.$projectsView.find(".project-spaces-list"),e=this.projects[o].fromItem;e<t&&e<a.length;e++){var i=a[e],n=$('<img src="'+i.thumb+'">').hide(),i=$('<div id="thumb-'+i.id+'" class="picker-thumb"></div>').attr("data-spaceid",i.id).css("background-image","url("+i.thumb+")").append('<div class="selectedcheck"></div>').append(n).on("click",$.proxy(function(t){this.selectSpace($(t.target).data("spaceid"))},this));r.append(i)}return n&&n.one("load",$.proxy(function(t){var e,i=this.$projectsView.find(".project-spaces-wrapper");0<a.length-(s||this.projects[o].fromItem)?(e=function(){this.populateProjectPhotos(o)},i.on("scroll",$.throttle(250,function(){this.infiniteScroll(r,i,e)}))):i.off("scroll")},this)).each(function(){this.complete&&$(this).load()}),this.projects[o].fromItem=e,this},this.initTabViews=function(){var t=this.$projectsView.find(".project-list option").length,e=this.$ideabooksView.find(".ideabook-list option").length;return this.$leftContainer.removeClass("loading-spaces"),t?this.viewTabAtIndex(1):e?this.viewTabAtIndex(0):this.viewTabAtIndex(2),this},this.selectSpace=function(t){return this.selectedSpaceId=t,this.selectedSpaceImageUrl=this.allSpaces[t].img,this.selectedSpaceWidth=this.allSpaces[t].originalWidth,this.selectedSpaceHeight=this.allSpaces[t].originalHeight,this.limitWidthWithinBounds(550),this.previewSpace(),this.$leftContainer.find("#thumb-"+t).addClass("selected"),this},this.limitWidthWithinBounds=function(t){var e=this.selectedSpaceWidth/this.selectedSpaceHeight;return this.selectedSpaceWidth>t&&(this.selectedSpaceWidth=t,this.selectedSpaceHeight=this.selectedSpaceWidth/e),this},this.previewSpace=function(){this.deselectSpace(),this.$previewView.find(".hz-dropzone").hide();var t=$('<div class="ajax-throbber"></div>'),e=$('<i class="delete-preview-icon"></i>'),i=$('<img class="space-preview-thumb">').hide().attr("src",this.selectedSpaceImageUrl).attr("data-spaceid",this.selectedSpaceId).attr("data-width",this.selectedSpaceWidth).attr("data-height",this.selectedSpaceHeight).attr("data-isupload",this.isUploadedImage).on("load",function(){t.hide(),$(this).show(),e.show()}),i=$('<span class="space-preview"></span>').append(i).append(e);return this.$previewView.find(".preview-wrapper").empty().append(t).append(i).show(),this.isUploadedImage=!1,this.getControls().find("input[type=submit]").attr("disabled",!1),this},this.deselectSpace=function(){return this.$leftContainer.find(".picker-thumb.selected").removeClass("selected"),this.$previewView.find(".preview-wrapper").empty().hide(),this.$previewView.find(".hz-dropzone").show(),this.getControls().find("input[type=submit]").attr("disabled",!0),this},this.prepare=function(){return this.initVariables(),this.createDialogBody(),this.defineViewObjects(),this.addEventListeners(),this.prepareDialogSettings(),this.initDropzoneSettings(),this.init(this.dialogSettings),this},this.showDialog=function(){return HZ.ui.Yamdi.show(this),this}},HZ.extend(HZ.textEditor.InsertPhotoDialog,HZ.ui.yamdi.Dialog),HZ.textEditor.InsertPhoto=new function(){this.prepare=function(){return this.InsertPhotoDialog||(this.InsertPhotoDialog=new HZ.textEditor.InsertPhotoDialog,this.InsertPhotoDialog.prepare()),this},this.showDialog=function(){return this.InsertPhotoDialog.showDialog(),this}},HZ.textEditor.InsertVideoDialog=function(){HZ.textEditor.InsertVideoDialog.superclass.constructor.call(this),this.onInsertVideoCallback=null,this.prepare=function(){return this.init({title:_hgt("Insert Video"),body:'<div class="video-label">'+_hgt("Video URL")+'</div><div class="video-caption">'+_hgt("(Youtube and Vimeo supported)")+'</div><input class="video-input" type="text">',formName:"insert-video-form",dialogClassName:"insert-video-dialog",controls:[HZ.ui.AjaxThrobber.getThrobber(),HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(this.onCancel,this)),HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Insert"),"",$.proxy(this.onInsertVideo,this),!1)],onViewLoaded:function(){this.getBody().find(".video-input").val("").focus()},onViewUnloaded:function(){var t=this.$richTextEditor.getSelection();$(t.anchorNode).closest(".note-editable").length||this.$richTextEditor.focusEditor()}}),this},this.showDialog=function(){return HZ.ui.Yamdi.show(this),this},this.onCancel=function(){return HZ.ui.Yamdi.hide(this),this},this.onInsertVideo=function(){return this.onInsertVideoCallback&&this.onInsertVideoCallback($(this.getBody())),HZ.ui.Yamdi.hide(this),this}},HZ.extend(HZ.textEditor.InsertVideoDialog,HZ.ui.yamdi.Dialog),HZ.textEditor.InsertVideo=new function(){this.prepare=function(){return this.InsertVideoDialog||(this.InsertVideoDialog=new HZ.textEditor.InsertVideoDialog,this.InsertVideoDialog.prepare()),this},this.showDialog=function(){return this.InsertVideoDialog.showDialog(),this}},HZ.textEditor.InsertLinkDialog=function(){HZ.textEditor.InsertLinkDialog.superclass.constructor.call(this),this.onInsertLinkCallback=null,this.prepare=function(){this.init({title:_hgt("Insert Link"),body:'<div class="form-group"><label class="text-label control-label">'+_hgt("Text to Display")+'</label><input class="text-input form-control" type="text"></div><div class="form-group"><label class="url-label control-label">'+_hgt("Web Address (URL)")+'</label><input class="url-input form-control" type="text"></div>',formName:"insert-link-form",dialogClassName:"insert-link-dialog",controls:[HZ.ui.AjaxThrobber.getThrobber(),HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(this.onCancel,this)),HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Insert"),"",$.proxy(this.onInsertLink,this),!1)],onViewLoaded:function(){this.onViewLoadedCallback&&this.onViewLoadedCallback($(this.getBody())),this.getBody().find(".url-input").focus()},onViewUnloaded:function(){var t=this.$richTextEditor.getSelection();$(t.anchorNode).closest(".note-editable").length||this.$richTextEditor.focusEditor()}});var i=this.getBody().find(".text-input");return this.getBody().find(".url-input").on("keyup paste",function(){var t=i.val(),e=$(this);setTimeout(function(){(""==t||t.length<e.val().length&&t==e.val().substring(0,t.length)||0<e.val().length&&e.val()==t.substring(0,e.val().length))&&i.val(e.val())},100)}),this},this.showDialog=function(){return HZ.ui.Yamdi.show(this),this},this.onCancel=function(){return HZ.ui.Yamdi.hide(this),this},this.onInsertLink=function(){return this.onInsertLinkCallback&&this.onInsertLinkCallback($(this.getBody())),HZ.ui.Yamdi.hide(this),this}},HZ.extend(HZ.textEditor.InsertLinkDialog,HZ.ui.yamdi.Dialog),HZ.textEditor.InsertLink=new function(){this.prepare=function(){return this.InsertLinkDialog||(this.InsertLinkDialog=new HZ.textEditor.InsertLinkDialog,this.InsertLinkDialog.prepare()),this},this.showDialog=function(){return this.InsertLinkDialog.showDialog(),this}};

window.hzmr.push("richTextEditor:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End richTextEditor.js  **************/
/************* Start questionRichTextEditor.js for locale en-US **************/
try {$.fn.PostQuestionEditor=function(){return this.onSubmit=function(){var t=this.$richTextEditor.isEmpty()?"":this.$richTextEditor.code();return this.$textarea.val(t),this},this.overrideResizeEditorFn=function(){return this.previousResizeEditorFn=this.$richTextEditor.resizeEditor,this.$richTextEditor.resizeEditor=function(){return this},this},this.restoreResizeEditorFn=function(){return this.$richTextEditor.resizeEditor=this.previousResizeEditorFn,this.previousResizeEditorFn=null,this},this.setDefaultValue=function(){var t=this.$textarea.attr("placeholder"),i=this.$textarea.val();return""!=i&&i!=t&&(this.$richTextEditor.code(this.$textarea.val()),this.$richTextEditor.$editor.find("iframe.js-iframe-hz").each(function(t){var i=$(this),e=i.data("content"),s=i[0].contentWindow.document;s.write(e),s.close(),i.removeAttr("data-content")}),this.$richTextEditor.$editor.find("img, iframe").css("display","block"),this.$richTextEditor.$editor.find("iframe").css("width","100%"),this.$richTextEditor.resizeIframeWrappers(),this.$richTextEditor.resizeEditor()),this},this.prepareFullscreen=function(){return this.$enterFullscreenButton=$('<div class="note-link btn-group hidden-xs"><button type="button" class="btn btn-default btn-sm btn-small" title="Fullscreen"><i class="hzi-font hzi-Full-screen"></i></button></div>').css("float","right").on("click",$.proxy(this.enterFullscreen,this)).appendTo(this.$richTextEditor.$toolbar),this.$cancelFullscreenButton=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(this.exitFullscreen,this)).hide().css({float:"right","margin-right":"13px"}).insertAfter(this.$submitButton),this.$titleInputWrapper=this.find(".bubble--post"),this.$formTitle=$('<div class="form-title">'+_hgt("What are you working on?")+"</div>").hide().insertBefore(this.$titleInputWrapper),this.$exitFullscreenButton=$('<div class="exit-fullscreen-wrapper"><i class="hzi-font hzi-Exit-full-screen"></i><span>'+_hgt("Back")+"</span></div>").hide().on("click",$.proxy(this.exitFullscreen,this)).insertBefore(this.$titleInputWrapper),this.$clearFix=$('<div class="clearfix"></div>').hide().insertBefore(this.$titleInputWrapper),this},this.togglePollDialogButton=function(){var t=18===parseInt(this.$questionTopicSelect.val());return this.$showPollDialogButton.toggle(t),this},this.enterFullscreen=function(){return this.$cancelFullscreenButton.show(),this.$addChoicesWrapper.hide(),this.togglePollDialogButton(),this.$questionTopicSelect.on("change",$.proxy(this.togglePollDialogButton,this)),this.$formTitle.show(),this.$clearFix.show(),this.$enterFullscreenButton.hide(),this.$exitFullscreenButton.show(),this.wrap('<p class="full-screen-wrapper">').addClass("full-screen"),this.$richTextEditor.$toolbar.find("button span").show(),HZ.textEditor.AddPollOptions.AddPollOptionsDialog.setButtonLabel(),this.height("auto"),this.overrideResizeEditorFn(),this.$richTextEditor.resizeIframeWrappers(),this.resizeEditor(),this.$richTextEditor.resizeToolbarButtons(),$(window).on("resize",this.throttledResize),this},this.exitFullscreen=function(){return this.$cancelFullscreenButton.hide(),this.$showPollDialogButton.hide(),this.$addChoicesWrapper.show(),this.$questionTopicSelect.off("change",this.togglePollDialogButton),this.$formTitle.hide(),this.$clearFix.hide(),this.$exitFullscreenButton.hide(),this.$enterFullscreenButton.show(),this.unwrap().removeClass("full-screen"),this.$richTextEditor.$toolbar.find("button span").css("display",""),this.height(""),this.restoreResizeEditorFn(),$(window).off("resize",this.throttledResize),this.find(".note-editable-wrapper").css("height","").css("max-height",""),this.$richTextEditor.resizeIframeWrappers(),this.$richTextEditor.resizeToolbarButtons(),this.$richTextEditor.resizeEditor(),this},this.resizeEditor=function(){var t=$(window).height()-320;return this.$richTextEditor.$editorWrapper.css("height",t).css("max-height",t),this},this.preparePollOptionsDialog=function(){return this.$showPollDialogButton=$(HZ.ui.ButtonFactory.createBaseIconButton(_hgt("Add Poll Options"),"add-poll-options-button","","","hzi-Add-Photo-Button")).insertAfter(".editQuestionTopic").hide().on("click",$.proxy(HZ.textEditor.AddPollOptions.showDialog,HZ.textEditor.AddPollOptions)),HZ.textEditor.AddPollOptions.prepare({$formWrapper:this.$addChoicesWrapper,$button:this.$showPollDialogButton}),this},this.initCustomFileInputs=function(){return this.$fileInputs.each(function(t,i){new CustomFileInput($(i)).prepare().init()}),this},this.onFocus=function(t){var t=$(t.target).closest(".choiceLine").next();t.length&&!t.find(".custom-file-input-wrapper").length&&(t=t.find(".optionFileInput"),new CustomFileInput(t).prepare().init())},this.initAddChoiceOnFocus=function(){return this.find("#editQuestionAddChoicesContainer").on("focus",".optionInput",$.proxy(this.onFocus,this)),this},this.initRichTextEditor=function(){return this.$textarea.hide(),this.$richTextEditor.init(),this.$addPhotoButton.hide(),this},this.prepare=function(){return this.$rteWrapper=$('<div class="rich-text-editor-wrapper"><div class="rich-text-editor"></div></div>'),this.$textarea=this.find("#editQuestionBody").after('<input type="hidden" name="isHtml" value="1"/>').after(this.$rteWrapper),this.$addPhotoButton=this.find("#expandFileInputs"),this.$submitButton=this.find("#editQuestionSubmitBtn"),this.$fileInputs=this.find(".optionFileInput"),this.$questionTopicSelect=this.find("#editQuestionTopicBox"),this.$addChoicesWrapper=this.find(".edit-question-add-choices-wrapper"),this.$richTextEditor=this.$rteWrapper.find(".rich-text-editor").RichTextEditor({inactiveHeight:127,activeHeight:127,shortFormMaxHeight:127,longFormMaxHeight:320,textArea:this.$textarea}).prepare(),this.throttledResize=$.throttle(250,$.proxy(function(){this.resizeEditor()},this)),this},this.init=function(){return this.initRichTextEditor(),this.prepareFullscreen(),this.preparePollOptionsDialog(),this.initCustomFileInputs(),this.initAddChoiceOnFocus(),this.setDefaultValue(),this.$submitButton.on("click",$.proxy(this.onSubmit,this)),this},this},HZ.textEditor.AddPollOptionsDialog=function(){HZ.textEditor.AddPollOptionsDialog.superclass.constructor.call(this),this.positionDialog=function(){return this.getForm().closest("#yamdiContainer").css({top:200,"margin-top":0}),this},this.onCancel=function(){return HZ.ui.Yamdi.hide(this),this},this.onAddPollOptions=function(){return HZ.ui.Yamdi.hide(this),this},this.onViewLoaded=function(){return this.$formWrapper.show(),this.$form.appendTo(this.getBody()),this.getBody().on("focus",".optionInput",$.proxy(this.onFocus,this)),this},this.onViewUnloaded=function(){return this.$form.appendTo(this.$formWrapper),this.$formWrapper.hide(),this.getBody().off("focus"),this.setButtonLabel(),this},this.setButtonLabel=function(){this.calcNumPollOptions(),this.$buttonLabel.text(_hgt("Add Poll Options")+" ( "+this.numPollOptions+" )")},this.calcNumPollOptions=function(){return this.numPollOptions=0,this.$form.find(".optionInput").each($.proxy(function(t,i){var e=$(i).val(),s=$(i).attr("placeholder");$(i).val().length&&e!=s&&this.numPollOptions++},this)),this},this.onFocus=function(t){t=$(t.target).closest(".choiceLine");return t.index()===t.siblings(".choiceLine").length-1&&this.getBody().scrollTop(this.$form.height()),this},this.prepare=function(t){return this.$formWrapper=t.$formWrapper,this.$button=t.$button,this.$form=this.$formWrapper.find("#editQuestionAddChoicesContainer"),this.$buttonLabel=this.$button.find(".button-label"),this.init({title:_hgt("Add Poll Options"),body:"",formName:"add-poll-options-form",dialogClassName:"add-poll-options-dialog",controls:[HZ.ui.AjaxThrobber.getThrobber(),HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"",$.proxy(this.onCancel,this)),HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Add"),"",$.proxy(this.onAddPollOptions,this),!0)],onViewLoaded:$.proxy(this.onViewLoaded,this),onViewUnloaded:$.proxy(this.onViewUnloaded,this)}),this},this.showDialog=function(){return HZ.ui.Yamdi.show(this),this.positionDialog(),this}},HZ.extend(HZ.textEditor.AddPollOptionsDialog,HZ.ui.yamdi.Dialog),HZ.textEditor.AddPollOptions=new function(){this.prepare=function(t){this.AddPollOptionsDialog||(this.AddPollOptionsDialog=new HZ.textEditor.AddPollOptionsDialog,this.AddPollOptionsDialog.prepare(t))},this.showDialog=function(){this.AddPollOptionsDialog.showDialog()}};var CustomFileInput=function(t){this.initCustomInput=function(){return this.$input.wrap(this.$wrapper),this.$wrapper=this.$input.parent(),this.$wrapper.append(this.$button).append(this.$label),this},this.addEventListeners=function(){return this.$button.on("click",$.proxy(function(t){this.$input.click()},this)),this.$input.on("change",$.proxy(function(t){t=$(t.currentTarget).val().split(/(\\|\/)/g).pop();this.$label.text(t.length?t:"No file chosen")},this)),this},this.show=function(){return this.$input.hide(),this.$button.show(),this.$label.show(),this},this.hide=function(){return this.$input.show(),this.$button.hide(),this.$label.hide(),this},this.prepare=function(){return this.$input=t,this.$wrapper=$('<div class="custom-file-input-wrapper"></div>'),this.$button=$('<a class="hzBtn secondary">'+_hgt("Choose File")+"</a>"),this.$label=$("<span>"+_hgt("No file chosen")+"</span>"),this},this.init=function(){return this.initCustomInput(),this.addEventListeners(),this.show(),this}};

window.hzmr.push("questionRichTextEditor:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End questionRichTextEditor.js  **************/
/************* Start commentRichTextEditor.js for locale en-US **************/
try {$.fn.AddCommentEditor=function(){return this.prepare=function(){return this.$textarea=this.find(".commentBody").after('<input type="hidden" name="isHtml" value="1"/>').after('<div class="rich-text-editor-wrapper"><div class="rich-text-editor"></div></div>'),this.$errorMsgDiv=this.find(".commentError"),this.$richTextEditor=this.find(".rich-text-editor").RichTextEditor({inactiveHeight:50,activeHeight:50,shortFormMaxHeight:50,longFormMaxHeight:250,textArea:this.$textarea}).prepare(),this.$submitButton=this.find(".submitAddComment"),this},this.init=function(){return this.$textarea.hide(),this.find(".addCommentExtra").show(),this.$richTextEditor.init(),this.$richTextEditor.$editor.focus(),this.$submitButton.on("click",$.proxy(this.onClick,this)),this.addClass("active"),this},this.onClick=function(t){var i=this.$richTextEditor.isEmpty()?"":this.$richTextEditor.code();return this.$textarea.val(i),this},this},$.fn.EditCommentEditor=function(t){t=t||{};var m=!1;return this.onShow=function(){return this},this.onHide=function(){return this},this.submit=function(t){if(!m){m=!0,this.$cancelButton.prop("disabled",!0),this.$submitButton.prop("disabled",!0);var i,e=this.$form.find('[name="objectType"]').val(),r=this.$form.find('[name="objectId"]').val(),s=this.$form.find('[name="commentId"]').val(),h=this.$form.find("textarea"),o=this.$form.find(".commentError"),n=this.$richTextEditor.isEmpty()?"":this.$richTextEditor.code(),a=this.$form.find('[name="isHtml"]').val(),d=this.$form.find('[name="privacy"]').val();if(n.length){var c=parseInt(h.attr("maxlength"),10)||1e4,h=n.length;if(i=c<h?_hgt("Your post is {numOfCharsToDelete} too long, posts can be up to {lengthLimit} characters. Please make it a little shorter and try again.",{lengthLimit:c,numOfCharsToDelete:_hgtp("","1 character","{n} characters",h-c,{n:h-c})}):i)return m=!1,this.$cancelButton.prop("disabled",!1),this.$submitButton.prop("disabled",!1),o.text(i).slideDown(),void t.stopPropagation();HZ.ajaz.Services.updateComment(e,r,s,n,d,"",a,$.proxy(this.onSuccess,this))}else i=_hgt("Please enter your comment."),m=!1,this.$cancelButton.prop("disabled",!1),this.$submitButton.prop("disabled",!1),i&&(o.text(i).slideDown(),t.stopPropagation())}},this.onSuccess=function(t){"true"===t.success&&t.comments&&(this.$form.find(".editCommentError").hide(),this.replaceWith($(t.comments)),m=!1,this.$cancelButton.prop("disabled",!1),this.$submitButton.prop("disabled",!1),this.$form.removeClass("dirty"))},this.hideEditor=function(){return this.onHide(),this.find(".error").hide(),this.removeClass("active"),this.$form.removeClass("dirty"),this.$form.hide().appendTo(this.$tempWrapper.find(".editCommentDiv")),this.append(this.$tempWrapper.children()),this.$submitButton.off("click",$.proxy(this.submit,this)),this.$cancelButton.remove(),this.$richTextEditor.closest(".rich-text-editor-wrapper").remove(),this},this.showEditor=function(){return this.onShow(),this.addClass("active"),this.$tempWrapper=$("<div></div>").addClass("temp").hide(),this.children().appendTo(this.$tempWrapper),this.append(this.$tempWrapper),this.append(this.$form.show().detach()),this.$form.find(".addCommentExtra").show(),this.$richTextEditor.code(this.$textarea.val()),this.$richTextEditor.resizeEditor(),this.$richTextEditor.resizeToolbarButtons(),this.$richTextEditor.focusEditor(),this},this.prepare=function(){return $.extend(this,t),this.$form=this.find(".commentForm"),this.$textarea=this.find(".user-text-input").after('<input type="hidden" name="isHtml" value="1"/>'),this.$rteWrapper=$('<div class="rich-text-editor-wrapper"><div class="rich-text-editor"></div></div>').insertAfter(this.$textarea),this.$richTextEditor=this.$rteWrapper.find(".rich-text-editor").RichTextEditor({inactiveHeight:50,activeHeight:50,shortFormMaxHeight:50,longFormMaxHeight:250,textArea:this.$textarea}).prepare(),this.$submitButton=this.find(".submitAddComment"),this},this.init=function(){return this.$textarea.hide(),this.$richTextEditor.init(),this.$submitButton.on("click",$.proxy(this.submit,this)),this.$cancelButton=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"cancel-edit-comment",$.proxy(this.hideEditor,this)).insertAfter(this.$submitButton),this.find(".error").hide(),this},this};

window.hzmr.push("commentRichTextEditor:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End commentRichTextEditor.js  **************/
/************* Start productMainButton.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.ProductMainButton=new function(){var a=null,e=null,i=null,r=null,s=null,l=null,o=null,n=!1;this.init=function(t){t&&(t.hasOwnProperty("isPhone")?t.isPhone:HZ.utils.Config.isResponsive,e=t.hasOwnProperty("isDesktop")?!0===t.isDesktop:!HZ.utils.Config.isResponsive,t.hasOwnProperty("scopeId")&&(i=t.scopeId),t.hasOwnProperty("spaceId")&&(r=t.spaceId),t.hasOwnProperty("vendorListingId")&&(s=t.vendorListingId),t.hasOwnProperty("sampleVendorListingId")&&(l=t.sampleVendorListingId),t.hasOwnProperty("signUpSourceLinks")&&(o=t.signUpSourceLinks),t.hasOwnProperty("isInlineWithQuantity")&&(n=t.isInlineWithQuantity))},this.setMountNode=function(t){(a=t).on("click",".btn-add-to-cart",this.handleAddToCartClick.bind(this)),a.on("click",".btn-add-sample-to-cart",this.handleAddSampleToCartClick.bind(this)),a.on("click",".btn-check-availability",this.handleCheckAvailabilityClick.bind(this)),a.on("click",".btn-visit-store",this.handleVisitStoreClick.bind(this))},this.updateView=function(t,e){var i=HZ.data.Spaces.get(t),n=HZ.utils.Marketplace.ListingUtils.getSpaceVendorListing(i,e);i&&(r=i.id,t=HZ.data.ProductsInfo.get(r),e=null,n&&(s=n.lid,e=HZ.data.Users.get(n.vid),n.hasOwnProperty("sbbSampleVlid")&&(l=n.sbbSampleVlid)),a&&a.empty().append(this.renderMainProductButton(i,t,n,e)))},this.renderMainProductButton=function(t,e,i,n){var a=null;return t&&t.prod&&(e=e||HZ.data.ProductsInfo.get(t.id),i||e&&e.mp&&(i=HZ.data.ListingsInfo.get(e.plid)),(e||i)&&(a=e&&e.mp||i&&i.mpListing?(i&&!n&&(n=HZ.data.Users.get(i.vid)),this.renderMarketplaceProductButton(i,n)):this.renderExternalProductButton(t,e,i,n))),a},this.renderMarketplaceProductButton=function(t){var e,i,n,a,s,r,l,o=null;return t&&(e=t.buyable,i=t.avail,n=t.activeMPListing,s=t.itx,l=!(a=!(r=null)),(r=HZ.data.CurrentSessionUser?HZ.data.CurrentSessionUser.getUserId():r)&&(l=!!HZ.data.Users.get(r).p),r=t.isut,o=i&&n?s&&!r&&l?this.renderJoinTradeButton():(l=t.pending,this.renderAddToCartButton(a=!e||l?!1:a)):this.renderAddToWishListButton(),t.hasOwnProperty("sbbSamplePrice")&&(o+=this.renderBuySampleButton(t.sbbSamplePrice))),o},this.renderJoinTradeButton=function(){return HZ.utils.Html.template('<a target="_blank" href="%linkUrl%" compid="joinTradeButton" class="btn btn-primary btn-lg btn-block header-3 ptl pbm mb0 btn-join-trade %className%"%scopeIdAttr%>%label%</a>',{linkUrl:HZ.utils.Links.getPageUrl("trade-program"),scopeIdAttr:this.renderScopeIdAttr(),label:_hgt("Join the Houzz Trade Program"),className:this.getMarketPlaceButtonExtraClassNames()})},this.renderBuySampleButton=function(t){t=_hgt("Buy Sample - {samplePrice}",{samplePrice:t});return HZ.utils.Html.template('<button compid="addSampleToCart" class="btn btn-lg btn-block btn-primary-outline btn-add-sample-to-cart mts"%scopeId%>%label%</button>',{label:t,scopeId:this.renderScopeIdAttr()})},this.renderAddToCartButton=function(t){return HZ.utils.Html.template('<button compid="addToCart" class="btn btn-primary btn-lg btn-block btn-add-to-cart%className%"%disabledAttr%%scopeIdAttr%><i class="icon icon-font icon-shopping_cart mrs"></i> <span class="btn-label">%label%</span></button>',{disabledAttr:t?"":" disabled",scopeIdAttr:this.renderScopeIdAttr(),label:_hgt("Add to Cart"),className:this.getMarketPlaceButtonExtraClassNames()})},this.renderAddToWishListButton=function(){return HZ.utils.Html.template('<button compid="availabilityNotification" class="btn btn-primary btn-lg btn-block btn-check-availability%className%"%scopeIdAttr%>%label%</button>',{scopeIdAttr:this.renderScopeIdAttr(),label:_hgt("Check Availability"),className:this.getMarketPlaceButtonExtraClassNames()})},this.getMarketPlaceButtonExtraClassNames=function(){var t="";return t=e||!HZ.utils.Config.isResponsive?n||HZ.lb.Config.isMainProdBtnQuantityInline?" header-5 ptm pbm mt0 mb0":" header-3 ptl pbm mb0":t},this.renderExternalProductButton=function(t,e,i,n){var a,s,r,l=null;return t&&(a=!(r=HZ.data.SpaceListingIds.get(t.id))||1===r.length,s=t.hasOwnProperty("tl"),r=(r=HZ.data.PPCAds.get(t.id))&&r.isPPCProduct,i=i?!i.discon:!!e&&e.av,n=!!(e=n||HZ.data.Users.get(t.ow))&&e.mpv,r||s&&a?i?(t=t.srct,!i||n&&(2===t||8===t)||(i=!HZ.data.CurrentSessionUser,n=HZ.utils.User.isHiddenUser(e),t=_hgt("Visit Store"),e=null,e=i&&!n?"btn btn-primary btn-lg btn-block header-3 ptl pbm mb0 btn-visit-store btn-visit-store--visitor":"btn btn-primary btn-lg btn-visit-store",l=HZ.utils.Html.template('<button compid="visitStore" class="%className%"%scopeIdAttr%>%label%</button>',{label:t,className:e,scopeIdAttr:this.renderScopeIdAttr()}))):l=_hgt("Currently not available"):l=""),l},this.renderScopeIdAttr=function(){return i?HZ.utils.Html.template(' scopeid="%scopeId%"',{scopeId:i}):""},this.handleAddToCartClick=function(t){var e=$("#qtySelector").val()||1;e&&r&&s&&HZ.cart.Actions.addItem(r,s,e)},this.handleAddSampleToCartClick=function(t){r&&l&&HZ.cart.Actions.addItem(r,l,1)},this.handleCheckAvailabilityClick=function(t){var e;HZ.data.CurrentSessionUser?(HZ.ui.yamdi.Common.loading(_hgt("Loading")),HZ.ajaz.Services.Cart.addToWishList(r,HZ.module.AvailabilityNotification.handleAddToWishListResponse)):(e=null,e=o&&o.hasOwnProperty("checkAvailability")?o.checkAvailability.sourceLink:75,HZ.auth.Manager.signup(e))},this.handleVisitStoreClick=function(t){var e,i,n,a=HZ.data.Spaces.get(r),s=HZ.data.PPCAds.get(r);s&&s.isPPCProduct&&s.ppcProductUrl?window.open(s.ppcProductUrl):HZ.data.CurrentSessionUser?(e=a.tl)&&window.open(e):(n=i=null,s=HZ.utils.Links.getSpaceLink(r),a=null,a=o&&o.hasOwnProperty("visitStore")?(i=(e=o.visitStore).sourceLink,n=e.messageId,e.options):(i=68,n=6,{rtEvent:"visitstore_lb_click"}),HZ.auth.Manager.signup(i,n,s,null,a))}};

window.hzmr.push("productMainButton:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productMainButton.js  **************/
/************* Start productBadge.js for locale en-US **************/
try {HZ.ns("HZ.modules.ProductBadge"),HZ.modules.ProductBadge=new function(){this.config={},this.addConfig=function(e,r){this.config[e]=r},this.renderBadge=function(e){var r=["product-badge-label","text-xs","text-bold"];r.push(e.className);e=e.label;return'<div class="product-badge"><span class="'+r.join(" ")+'">'+e+"</span></div>"},this.renderFromCountryBadge=function(e,r){var t=[],a=[],s=[];Array.isArray(this.config.supportedCountryFlags)&&(t=this.config.supportedCountryFlags),Array.isArray(this.config.europeanCountryCodes)&&(a=this.config.europeanCountryCodes),Array.isArray(this.config.countryNameWhiteList)&&(s=this.config.countryNameWhiteList);var n="";return Array.isArray(a)&&-1!==a.indexOf(e)&&(a=e,Array.isArray(t)&&-1===t.indexOf(e)&&(a="other"),r=_hgt("Houzz {importCountry}",{importCountry:r}),Array.isArray(s)&&-1===s.indexOf(e)&&(r=_hgt("Houzz Europe"),a="EU"),r='<i class="'+["country-flag","country-flag--"+a].join(" ")+'"></i>&nbsp;'+r,n=HZ.modules.ProductBadge.renderBadge({label:r,className:"product-badge-label--imported"})),n},this.renderTradeExclusiveBadge=function(e){return this.renderBadge({label:e,className:"product-badge-label--trade"})},this.renderExclusiveBadge=function(){return this.renderBadge({label:_hgt("Houzz Exclusive"),className:"product-badge-label--exclusive"})},this.renderBestSellerBadge=function(){return this.renderBadge({label:_hgt("Best Seller"),className:"product-badge-label--bestseller"})}};

window.hzmr.push("productBadge:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End productBadge.js  **************/
/************* Start proPerceptionBanner.js for locale en-US **************/
try {HZ.ns("HZ.modules.ProPerceptionBanner"),HZ.modules.ProPerceptionBanner=new function(){var o,t,r="proPerceptionBanner.show",i=HZ.ctx&&HZ.ctx.config&&HZ.ctx.config["pro-perception"],d=!1,n=this;this.moduleName="proPerceptionBannerModule",this.init=function(e){o=e,i?d=!0:$.ajax({url:"/j/proPerceptionBannerModule",method:"POST",data:{__ct:HZ.data.CSRFToken}}).done(function(e){HZ.utils.loadJukwaaModule(e,n.loadModule)}).fail(function(e){})},this.loadModule=function(){HZ&&HZ.WebModule&&($(document).trigger("proPerceptionBanner.moduleLoaded"),n.renderToContainer())},this.renderToContainer=function(){var e="pro-perception-banner",n=this.moduleName;!o||0<o.find("."+e).length||HZ&&HZ.WebModule&&(e=$("<div>").addClass(e),o.append(e.show()),HZ.WebModule.render(n,e[0]),d=!0,t&&setTimeout(t,100))},this.show=function(e){var n={};e&&(n.spaceOwnerId=e.ow),i&&(n.container=o),d?$(document).trigger(r,n):t=function(){$(document).trigger(r,n)}},this.hide=function(){t=t&&null,$(document).trigger("proPerceptionBanner.hide")}};

window.hzmr.push("proPerceptionBanner:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End proPerceptionBanner.js  **************/
/************* Start newPostSignup.js for locale en-US **************/
try {HZ.ns("HZ.signup"),HZ.signup.newPostSignup=new function(){this.init=function(i,s){HZ.OmniLogAPI.userTypeChooserFlowStarted();var e=$("<div/>",{id:"signup-success",class:"dialog",scopeId:"signup-success"}),d="<div id='header'><h1 class='header-2'>"+_hgt("Which describes you best?")+"</h1></div><div id='body'><div class='row'><div id='homeowner' class='col-sm-6 trackMe' compId='homeowner'><div class='wrapper'><div class='icon'></div><div class='title header-5'>"+_hgt("Homeowner")+"</div><div class='description'>"+_hgt("I am a homeowner or interested in home design.")+"</div></div></div><div id='pro' class='col-sm-6 trackMe' compId='pro'><div class='wrapper'><div class='icon'></div><div class='title header-5'>"+_hgt("Professional")+"</div><div class='description'>"+_hgt("I offer home improvement services or sell home products.")+"</div></div></div></div></div>";return e.html(d),e.find("#homeowner").on("click",function(){i()}),e.find("#pro").on("click",function(){s()}),e}};

window.hzmr.push("newPostSignup:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End newPostSignup.js  **************/
/************* Start hoverCard.js for locale en-US **************/
try {HZ.ns("HZ.utils"),HZ.utils.HoverCard=new function(){var A,Z,i={},a={useWiderFollowCell:0,cardContentWidth:414,statCardWidth:86,reviewCardWidth:86,ajazTimeout:300,dropDownTimeout:500};function y(t){return HZ.utils.Html.escapeHtmlEntities(t).replace(/'/g,"&apos;")}function e(t,a,r){var e={},o=$(this);r&&"true"==r.success&&(r=r.userDetail,e[t]={},e[t][a]=r,i=$.extend(!0,i,e),d(r,o,t,a))}function o(){$("#hzHoverCardContainer:visible").hide()}function r(t){var a,r=$(this);"mouseenter"==t.type?(a=$("#hzHoverCardContainer").data("dropDownTimer"),clearTimeout(a),$("#hzHoverCardContainer").removeData("dropDownTimer"),a=setTimeout(function(){var t=r.attr("data-type"),a=r.attr("data-id");t&&a&&(i&&i[t]&&i[t][a]?d(i[t][a],r,t,a):HZ.ajaz.Services.getHoverCardData(t,a,$.proxy(e,r,t,a))),$("#hzHoverCardContainer").removeData("ajazTimer")},A.ajazTimeout),$("#hzHoverCardContainer").data("ajazTimer",a)):"mouseleave"==t.type&&(clearTimeout($("#hzHoverCardContainer").data("ajazTimer")),$("#hzHoverCardContainer").data("dropDownTimer",setTimeout(function(){$("#hzHoverCardContainer").removeData("dropDownTimer"),o()},A.dropDownTimeout)))}var n=function(t,a,r,e){var o,i,n="",s="profLink",d="",l="",v="",c="",u="",m="",C="",h="",p="",w="",T="",k="",E="",L=HZ.data.CurrentSessionUser,O=t.isPro,g=t.uname,H=t.name,f=t.pic,R=t.link,z=t.loc,P=t.allowFollow,_=t.isFollower,b=t.galCount,D=t.projCount,F=t.cmtCount,I=t.reviewRating,N=t.numReview,S=t.reviewLink,U=t.proType,W=t.galLink,j=t.prjLink,M=t.publicGallery,B=t.publicProject;Z=A.cardContentWidth,e.pTrk&&e.pTrkParam&&(R="#",n="rel='nofollow'",d=e.pTrk,s=e.pTrkParam),e.gTrk&&e.gTrkParam&&(W="#",w="onmousedown='"+e.gTrk+"' id='"+e.gTrkParam+"'"),e.prjTrk&&e.prjTrkParam&&(j="#",T="onmousedown='"+e.prjTrk+"' id='"+e.prjTrkParam+"'"),1==P&&(A.useWiderFollowCell&&(Z+=30,E="wider-card"),1==_?(o="hzBtn followBtn--hoverCard following",i=_hgt("Following")):0==_&&(o="hzBtn followBtn--hoverCard",i=_hgt("Follow")),r=HZ.data.CurrentSessionUser?'HZ.actions.Follow.updateFollow(this,{u: "'+g+'"}); HZ.utils.HoverCard.toggleFollowStatus("'+a+'", "'+r+'"); return false;':HZ.auth?"HZ.auth.Manager.signup(10, null, window.location.href); return false;":'window.location.href="'+A.followRedirectLink+'"; return false;',v="<div class='hzFollowBtnWrapper'>"+("<input id='followButton_"+g+"' type='button' class='"+o+"' value='"+y(i)+"' onclick='"+r+"'/>")+"</div>",r=t.followersCount,t=t.followersLink,0<r&&(c=L?"<div class='statCard'><a target='_blank' href='"+t+"'><div class='counter'>"+r+"</div><div class='itemName'>"+_hgtp("Followers","Follower","Followers",r)+"</div></a></div>":"<div class='statCard'><div class='counter'>"+r+"</div><div class='itemName'>"+_hgtp("Followers","Follower","Followers",r)+"</div></div>")),""==c&&(Z-=A.statCardWidth),v="<div class='statCard followStatCard "+E+"'>"+v+"</div>",M&&(u=L?"<div class='statCard'><a target='_blank' href='"+W+"' "+w+"><div class='counter'>"+b+"</div><div class='itemName'>"+_hgtp("Ideabooks","Ideabook","Ideabooks",b)+"</div></a></div>":"<div class='statCard'><div class='counter'>"+b+"</div><div class='itemName'>"+_hgtp("Ideabooks","Ideabook","Ideabooks",b)+"</div></div>"),0<D&&B?m=L?"<div class='statCard'><a target='_blank' href='"+j+"' "+T+"><div class='counter'>"+D+"</div><div class='itemName'>"+_hgtp("Projects","Project","Projects",D)+"</div></a></div>":"<div class='statCard'><div class='counter'>"+D+"</div><div class='itemName'>"+_hgtp("Projects","Project","Projects",D)+"</div></div>":Z-=A.statCardWidth;F="<div class='statCard'><div class='counter'>"+F+"</div><div class='itemName'>"+_hgtp("Comments","Comment{context_comment_as_a_noun}","Comments",F,{context_comment_as_a_noun:""})+"</div></div>",p=1==O?(U&&"Not specified"!=U&&(l=U),z&&(0<l.length&&(l+=" | "),l+=z),l=l&&"<div class='hzHoverCardLoc'>"+y(l)+"</div>",h="<div class='counter'>"+N+"</div><div class='itemName'>"+_hgtp("Reviews","Review","Reviews",N)+"</div>",e.rTrk&&e.rTrkParam&&(S="#",k="onmousedown='"+e.rTrk+"' id='"+e.rTrkParam+"'"),h=L?"<div class='statCard reviewCard'><a target='_blank' href='"+S+"' "+k+">"+h+"</a></div>":"<div class='statCard reviewCard'>"+h+"</div>",0<N&&(C="<div class='classification counter'><div class='cover'></div><div class='progress' style='width: "+2*I+"%'></div></div>"),HZ.utils.Html.template("<div class='hzHoverCard hbs'>\n\t\t<div class='hzHoverCardContent'>\n\t\t\t<div class='upper'>\n\t\t\t\t<a target='_blank' href='%PROFILELINK%' %REL% id='%ID%' class='user-thumb-link' onmousedown='%MOUSEDOWN%'><img class='hzHoverCardUserThumb hz-user-image' src='%USERTHUMB%'/></a>\n\t\t\t\t<div class='basic-info'>\n\t\t\t\t\t<div class='hzHoverCardUserName'>\n\t\t\t\t\t\t<a target='_blank' class='nameLink hz-username' href='%PROFILELINK%' %REL% id='%ID%' onmousedown='%MOUSEDOWN%'>%USERNAME%</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t%REVIEW_STARS%\n\t\t\t\t\t%PRODESC%\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t%FOLLOW%\n\t\t\t%FOLLOWERS%\n\t\t\t%PROCARD%\n\t\t\t%IDEABOOK%\n\t\t\t%PROJECT%\n\t\t\t%COMMENT%\n\t\t\t<div class='hzHCClearFix'></div>\n\t\t</div>\n\t\t</div>",{USERNAME:H,PROFILELINK:R,REL:n,MOUSEDOWN:d,ID:s,USERTHUMB:f,PRODESC:l,REVIEW_STARS:C,FOLLOW:v,FOLLOWERS:c,PROJECT:m,COMMENT:F,PROCARD:h})):(z&&(l+=z),l=l&&"<div class='hzHoverCardLoc'>"+l+"</div>",p=HZ.utils.Html.template("<div class='hzHoverCard hbs'>\n\t\t<div class='hzHoverCardContent'>\n\t\t\t<div class='upper'>\n\t\t\t\t<a target='_blank' href='%PROFILELINK%' %REL% id='%ID%' class='user-thumb-link' onmousedown='%MOUSEDOWN%'><img class='hzHoverCardUserThumb hz-user-image' src='%USERTHUMB%'/></a>\n\t\t\t\t<div class='basic-info'>\n\t\t\t\t\t<div class='hzHoverCardUserName'>\n\t\t\t\t\t\t<a target='_blank' class='nameLink hz-username' href='%PROFILELINK%' %REL% id='%ID%' onmousedown='%MOUSEDOWN%'>%USERNAME%</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\t\t\t</div>\n\t\t\t%FOLLOW%\n\t\t\t%FOLLOWERS%\n\t\t\t%IDEABOOK%\n\t\t\t%PROJECT%\n\t\t\t%COMMENT%\n\t\t\t%NO_PUBLIC_GALLERY%\n\t\t\t<div class='hzHCClearFix'></div>\n\t\t</div>\n\t\t</div>",{USERNAME:H,PROFILELINK:R,USERTHUMB:f,USERDESC:l,FOLLOW:v,FOLLOWERS:c,IDEABOOK:u,PROJECT:m,COMMENT:F,NO_PUBLIC_GALLERY:"%NO_PUBLIC_GALLERY%"}),HZ.utils.Html.template(p,{NO_PUBLIC_GALLERY:M?"":"<div class='statCard'></div>"})),p=$(p);return p.find(".statCard").last().addClass("lastCard"),p},s=function(t){return{pTrk:t.attr("ptrk"),pTrkParam:t.attr("ptrk-param"),gTrk:t.attr("gtrk"),gTrkParam:t.attr("gtrk-param"),prjTrk:t.attr("prjtrk"),prjTrkParam:t.attr("prjtrk-param"),rTrk:t.attr("rtrk"),rTrkParam:t.attr("rtrk-param")}},d=function(t,a,r,e){var o=n(t,r,e,s(a)),i=$(".houzz-header"),t=$(".houzz-header-secondary"),r=80;(i.length||t.length)&&(r=i.height()+t.height()),e=a.offset().top-$(document).scrollTop(),i=$(window).height()-e-a.height(),t=a.offset().left-$(document).scrollLeft(),e=110+r<e||i<=e?"south":"north",e+=$(window).width()-t-a.outerWidth()<t?" right":"",(o=$(o)).css("width",Z),o.data("srcElement",a),0<a.closest("body").length&&a.tipBubble({content:o,borderColor:"#CCC",point:e,attachTo:"body",id:"hzHoverCardContainer",showCloseBtn:!1,width:Z,fadeDuration:1})};this.toggleFollowStatus=function(t,a){i&&i[t]&&i[t][a]&&(i[t][a].isFollower=1-i[t][a].isFollower)},this.init=function(t){A=$.extend({},a,t||{}),HZ.data.CurrentSessionUser,$("body").on("mouseenter mouseleave",".hzHouzzer",r),$("body").on("mouseenter","#hzHoverCardContainer",function(){clearTimeout($("#hzHoverCardContainer").data("dropDownTimer"))}).on("mouseleave","#hzHoverCardContainer",function(){$(this).data("dropDownTimer",setTimeout(function(){o()},A.dropDownTimeout))}),$("#lbImage, #lbInfoScroller").on("mousewheel DOMMouseScroll",function(){clearTimeout($("#hzHoverCardContainer").data("ajazTimer")),clearTimeout($("#hzHoverCardContainer").data("dropDownTimer")),o()})}};

window.hzmr.push("hoverCard:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End hoverCard.js  **************/
/************* Start followButton.js for locale en-US **************/
try {HZ.ns("HZ.actions.Follow"),HZ.actions.Follow=new function(){function t(o,l){var e=o.find("i");if((l=$.trim(l))==_hgt("Follow"))o.removeClass("following unfollow"),e.removeClass("hzi-Following2 hzi-Unfollow").addClass("hzi-Follow");else if(l==_hgt("Unfollow"))o.removeClass("following").addClass("unfollow"),e.removeClass("hzi-Follow hzi-Following2").addClass("hzi-Unfollow");else{if(l!=_hgt("Following"))return;o.removeClass("unfollow").addClass("following"),e.removeClass("hzi-Follow hzi-Unfollow").addClass("hzi-Following2")}o.is("input")?o.attr("value",l):(o.contents().last().replaceWith(l),o.attr("title",l))}var o=this;this.updateFollow=function(n,o){var s,l,n=$(n);o&&(s=n.hasClass("following")||n.hasClass("unfollow")?"u":"f",o.u&&(l=o.u)),s&&l&&HZ.ajaz.Services.updateFollow(s,l,function(o){var l,e;l=s,e=n,"true"==(o=o).success?t(e,"f"==l?_hgt("Following"):_hgt("Follow")):2==o.error?HZ.auth.Manager.signup(10,30):(l=_hgt("Follow operation failed."),1==o.error&&(l=_hgt("The user you are trying to follow has disabled this feature.")),4==o.error&&(l=_hgt("To follow other people, you need to allow others to follow you. You can update your privacy settings on Edit Profile page.")),alert(l))})},this.updateFollowBtn=function(o,l){(o.hasClass("following")||o.hasClass("unfollow"))&&t(o,l?_hgt("Unfollow"):_hgt("Following"))},this.handleSignup=function(o){HZ.ajaz.Services.setVisitorProperty("postSignupFollowedUsername",o.followedUsername,function(){HZ.auth.Manager.signup(10,o.messageId,window.location.href,null,{sourceUser:o.followedUsername})})},$("body").on("mouseenter",".followBtn",function(){o.updateFollowBtn($(this),!0)}).on("mouseleave",".followBtn",function(){o.updateFollowBtn($(this),!1)})};

window.hzmr.push("followButton:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End followButton.js  **************/
/************* Start fontSmoothing.js for locale en-US **************/
try {var TypeHelpers=new function(){var n=this;n.hasSmoothing=function(){if(void 0!==screen.fontSmoothingEnabled)return screen.fontSmoothingEnabled;try{var t=document.createElement("canvas");t.width="35",t.height="35",t.style.display="none",document.body.appendChild(t);var e=t.getContext("2d");e.textBaseline="top",e.font="32px Arial",e.fillStyle="black",e.strokeStyle="black",e.fillText("O",0,0);for(var n=8;n<=32;n++)for(var a=1;a<=32;a++){var o=e.getImageData(a,n,1,1).data[3];if(255!=o&&0!=o)return!0}return!1}catch(t){return null}},n.insertClasses=function(){var t=n.hasSmoothing(),e=document.getElementsByTagName("html")[0];e.className+=1==t?" hasFontSmoothing-true":0==t?" hasFontSmoothing-false":" hasFontSmoothing-unknown"}};

window.hzmr.push("fontSmoothing:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End fontSmoothing.js  **************/
/************* Start widgetWizard.js for locale en-US **************/
try {var WidgetWizard={width:700,height:500,frameWidth:10,wizardTable:null,wizardFrame:null,baseDiv:null,closeButton:null,widgetURLs:{},referer:null,defaultType:null,isIE6:window.external&&void 0===window.XMLHttpRequest,setBounds:function(e,t,i,s,a){e=e.style;e.width=s,e.height=a,e.top=i,e.left=t},initWidgetFrame:function(){var e=document.createElement("div");e.id="wizardPlaceHolder",e.style.position=this.isIE6?"absolute":"fixed",document.body.insertBefore(e,document.body.firstChild),this.baseDiv=e;var t=document.createElement("div");t.id="wizardPlaceHolderBG",this.setBounds(t,0,0,"100%",this.isIE6?"2000px":"100%"),e.appendChild(t);var i=this.frameWidth,t='<table class="wizardFrameTable" cellpadding=0 cellspacing=0 border=0 style="padding:0"><tr><td style="height:'+i+'px;"></td><td style="background-position: 0px -40px"></td><td style="background-position: -30px 0px"></td></tr><tr><td style="background-position: 0px -80px;"><div style="width:'+i+'px"></div></td><td style="height:300px;background:#EEEEEE;"><iframe id="wizardIFrame" scrolling="no" frameborder="0" style="padding:0;margin:0;width:'+this.width+"px;height:"+this.height+'px;"></iframe></td><td style="background-position: -30px -80px"><div style="width:'+i+'px"></div></td></tr><tr><td style="background-position: 0px -30px; height:10px;"></td><td style="background-position: 0px -70px"></td><td style="background-position: -30px -30px"></td></tr></table>',i=document.createElement("div");i.innerHTML=t,i.style.position="absolute",e.appendChild(i),this.wizardTable=i,this.wizardFrame=document.getElementById("wizardIFrame");i=document.createElement("div");i.className="oldCloseButton",i.onclick=function(){WidgetWizard.hide()},e.appendChild(i),this.closeButton=i},show:function(e,t){e=e||this.defaultType;e=this.widgetURLs[e];null!=t&&0<t&&(e+="/galleryId="+t),this.referer&&(e+="/ref="+encodeURIComponent(this.referer)),this.wizardFrame.src=e,this.baseDiv.style.display="block",this.reposition(),this.eventHandler1=EventConnector.connect(window,"onresize",WidgetWizard,WidgetWizard.reposition),this.eventHandler2=EventConnector.connect(window,"onscroll",WidgetWizard,WidgetWizard.resetTop),$("html").addClass("modalDialog")},hide:function(){this.wizardFrame.src="",this.baseDiv.style.display="none",EventConnector.disconnect(this.eventHandler1),EventConnector.disconnect(this.eventHandler2),$("html").removeClass("modalDialog")},reposition:function(){var e=0,t=0,t="number"==typeof window.innerWidth?(e=window.innerWidth,window.innerHeight):(e=document.documentElement.clientWidth,document.documentElement.clientHeight),e=e/2-this.width/2-this.frameWidth,t=t/2-this.height/2-this.frameWidth;this.setBounds(this.wizardTable,e+"px",t+"px",this.width+"px",this.height+"px"),this.setBounds(this.closeButton,e-5+"px",t-5+"px","29px","29px")},resetTop:function(){var e;this.isIE6&&(e=0,document.documentElement?e=document.documentElement.scrollTop:document.body&&(e=document.body.scrollTop),this.baseDiv.style.top=e+"px")},stepDlg:null,stepDialog:function(e,s){var a=-1,o=null,n=null;function l(){0<a&&(t(a-1),$("select.form-control").customDropdown())}function d(){a<s.length-1&&(t(a+1),$("select.form-control").customDropdown())}function t(e){var t,i;e!==a&&(i=(t=WidgetWizard.stepDlg.getBody().find(".dialog-step")).eq(e),t.hide(),o&&-1!=a&&o(a,WidgetWizard.stepDlg.getBody().find(".dialog-step").eq(a)),a=e,i.show(),function(){var e=WidgetWizard.stepDlg.getControls();e.find("#hzStepDlgBackBtn").show(),e.find("#hzStepDlgNextBtn").show(),e.find("#hzStepDlgDoneBtn").hide(),0===a&&e.find("#hzStepDlgBackBtn").hide();a===s.length-1&&(e.find("#hzStepDlgNextBtn").hide(),e.find("#hzStepDlgDoneBtn").show())}(),n&&n(a,WidgetWizard.stepDlg.getBody().find(".dialog-step").eq(a)))}function r(){a=0,HZ.ui.Yamdi.hideDialog(WidgetWizard.stepDlg)}return function(e,t){var i="dialogFrame stepDlg";{var s,a,o,n;WidgetWizard.stepDlg?((n=WidgetWizard.stepDlg.getControls()).find("#hzStepDlgBackBtn").off().on("click",l),n.find("#hzStepDlgNextBtn").off().on("click",d),WidgetWizard.stepDlg.getView().attr("class",i)):(WidgetWizard.stepDlg=new HZ.ui.yamdi.Dialog,s=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Back"),"hzStepDlgBackBtn",l),a=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Next"),"hzStepDlgNextBtn",d),o=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Done"),"hzStepDlgDoneBtn",r),n=[s,a,o],WidgetWizard.stepDlg.init({dialogClassName:i,controls:n,preferredWidth:700}))}WidgetWizard.stepDlg.setTitle(e+'<span class="closeButton hzi-font hzi-CloseX"></span>'),WidgetWizard.stepDlg.getTitle().on("click",".closeButton",r),WidgetWizard.stepDlg.setBody(function(e){for(var t=0,i=e.length;t<i;t++)e[t]='<div class="dialog-step">'+e[t]+"</div>";return e}(t).join(""))}(e,s),{setInitialStep:function(e){this.initialStepIndex=e},show:function(){HZ.ui.Yamdi.show(WidgetWizard.stepDlg),t(this.initialStepIndex),$("select.form-control").customDropdown()},onViewLoaded:function(e){n=e},onViewUnloaded:function(e){o=e},dialogBody:WidgetWizard.stepDlg.getBody()}},spaceOptions:[],styleOptions:[],metroOptions:[],galleryTypeToWidgetUrlMappingForHtmlEmbed:{},galleryTypeToWidgetUrlMappingForWordpressEmbed:{},widgetConfigurations:{},browseGalleryType:null,userGalleryType:null,currentGalleryType:null,featuredGalleryType:null,proGalleryType:null,versionTag:null,galleryTypeToLinkUrlMapping:{},userImage:null,userImageUrl:null,username:null,displayUsername:null,galleryTitleText:null,defaultMode:null,isCobrandPage:!1,showNewWizard:function(e){var r=this.isNewMetroSelectorEnabled;if("true"==this.isCobrandPage){var t=HZ.utils.Links.getPageUrl(""),i=document.URL.split("//");return 2<=i.length&&(t+=i[1].split("/").slice(1).join("/")+"/embed="+this.defaultMode),void(window.location.href=t)}i="<select class='select-metro form-control'><option value='all'>"+_hgt("All Cities")+"</option></select>";r&&(i="<div class='inline-dropdown-container browse-metro-selector'><div class='browse-metro-selector__trigger'>"+_hgt("All Metro Areas")+"</div></div>");var t="<div class='steps-overview'><div class='step-label active'>"+_hgt("Step 1: Choose")+"</div><div class='step-label'>"+_hgt("Step 2: Customize")+"</div><div class='step-label'>"+_hgt("Step 3: Embed")+"</div></div><div class='left-container'><div class='step-description'><p>"+_hgt("Display your ideabooks and featured design articles on your blog or website - in only 3 steps!")+"</p></div><form action='' class='choose-widget-type'><div class='form-group'><div class='step-instruction'>"+_hgt("Choose your widget:")+"</div><div class='input-group'><input type='radio' name='widgetType' value='7' class='widget-type' checked><div class='input-text-group'><span class='primary-description'>"+_hgt("Slide show of this ideabook")+"</span><span class='secondary-description'>"+_hgt("Go to an existing ideabook to create this widget")+"</span></div></div><div class='input-group'><input type='radio' name='widgetType' value='1' class='widget-type'><div class='input-text-group'><span class='primary-description'>"+_hgt("All Featured Houzz Articles")+"</span></div></div><div class='input-group'><input type='radio' name='widgetType' value='6' class='widget-type'><div class='input-text-group'><span class='primary-description'>"+_hgt("Your recent personal ideabooks")+"</span><span class='secondary-description'>"+_hgt("Create at least one ideabook to enable this feature")+"</span></div></div><div class='input-group'><input type='radio' name='widgetType' value='8' class='widget-type'><div class='input-text-group'><span class='primary-description'>"+_hgt("Image Search")+"</span><span class='secondary-description'>"+_hgt("Browse 4 million images from Houzz")+"</span></div></div><div class='input-group'><input type='radio' name='widgetType' value='9' class='widget-type'><div class='input-text-group'><span class='primary-description'>"+_hgt("Your Houzz professional profile")+"</span><span class='secondary-description'>"+_hgt("Slideshow of your professional work")+"</span></div></div></div></form></div>",s="<div class='steps-overview'><div class='step-label'>"+_hgt("Step 1: Choose")+"</div><div class='step-label active'>"+_hgt("Step 2: Customize")+"</div><div class='step-label'>"+_hgt("Step 3: Embed")+"</div></div><div class='left-container'><div class='step-description'><p>"+_hgt("The pictures in your ideabooks probably look best when they're large, but you can customize your widget to work in any space.")+"</p></div><form action='' class='choose-widget-size'><div class='form-group'><div class='step-instruction'>"+_hgt("Choose your widget size:")+"</div><div class='input-group-container'><div class='input-group'><input type='radio' name='widgetSize' value='120' class='widget-size'><div class='input-text-group'><span>120 x 115</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='160' class='widget-size'><div class='input-text-group'><span>160 x 145</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='200' class='widget-size'><div class='input-text-group'><span>200 x 175</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='240' class='widget-size'><div class='input-text-group'><span>240 x 205</span></div></div></div><div class='input-group-container'><div class='input-group'><input type='radio' name='widgetSize' value='300' class='widget-size' checked><div class='input-text-group'><span>300 x 275</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='380' class='widget-size'><div class='input-text-group'><span>380 x 310</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='480' class='widget-size'><div class='input-text-group'><span>480 x 385</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='620' class='widget-size'><div class='input-text-group'><span>620 x 490</span></div></div></div><div class='input-group'><input type='checkbox' name='keepTitleVisible' class='keep-title-visible' checked><div class='input-text-group'><span>"+_hgt("Always show caption")+"</span></div></div><div class='input-group'><input type='checkbox' name='openInNewWindow' class='open-in-new-window' checked><div class='input-text-group'><span>"+_hgt("Open Ideabooks in new window")+"</span></div></div></div></form></div>",a="<div class='steps-overview'><div class='step-label'>"+_hgt("Step 1: Choose")+"</div><div class='step-label active'>"+_hgt("Step 2: Customize")+"</div><div class='step-label'>"+_hgt("Step 3: Embed")+"</div></div><div class='left-container'><div class='step-description'><p>"+_hgt("The pictures in your ideabooks probably look best when they're large, but you can customize your widget to work in any space.")+"</p></div><form action='' class='choose-widget-size'><div class='form-group'><div class='step-instruction'>"+_hgt("Choose your widget:")+"</div><div class='input-group-container'><div class='input-group'><input type='radio' name='widgetSize' value='120' class='widget-size'/><div class='input-text-group'><span>120 x 115</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='160' class='widget-size'/><div class='input-text-group'><span>160 x 145</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='200' class='widget-size'/><div class='input-text-group'><span>200 x 205</span></div></div></div><div class='input-group-container'><div class='input-group'><input type='radio' name='widgetSize' value='240' class='widget-size'/><div class='input-text-group'><span>240 x 205</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='300' class='widget-size' checked/><div class='input-text-group'><span>300 x 275</span></div></div><div class='input-group'><input type='radio' name='widgetSize' value='380' class='widget-size'/><div class='input-text-group'><span>380 x 310</span></div></div></div></div><div class='form-group'><div class='step-instruction'>"+_hgt("Filter Photos:")+"</div><div class='input-group complex-radio-group'><input type='radio' name='filterPhotosBy' value='by-category' class='filter-photos' checked/><div class='input-text-group'><span>"+_hgt("By category...")+"</span><select class='select-space form-control'><option value='all'>"+_hgt("All Spaces")+"</option></select><select class='select-style form-control'><option value='all'>"+_hgt("All Styles")+"</option></select>"+i+"</div></div><div class='input-group complex-radio-group'><input type='radio' name='filterPhotosBy' value='by-search' class='filter-photos'/><div class='input-text-group'><span>"+_hgt("By search...")+"</span><div class='input-group'><input type='text' class='form-control search-images-input'><span class='input-group-btn'><button class='btn btn-default search-images-button' type='button'>"+_hgt("Search")+"</button></span></div></div></div></div></form></div>",o="<div class='steps-overview'><div class='step-label'>"+_hgt("Step 1: Choose")+"</div><div class='step-label'>"+_hgt("Step 2: Customize")+"</div><div class='step-label active'>"+_hgt("Step 3: Embed")+"</div></div><div class='left-container'><div class=html-embed-container><p>"+_hgt("Copy the HTML code below and paste it into your blog or website")+"</p><textarea class='html-embed-code'>...</textarea></div><div class='wordpress-embed-container'><img class='icon' src='//www.houzz.com/res/classic-2004/pic/wordpress-icon.png?v=classic-2004'><span>"+_hgt("WordPress user? Copy the shortcode below:")+"</span><textarea class='wordpress-embed-code'>...</textarea><a href='//www.houzz.com/buttonsAndBadges#shortcode'>"+_hgt("Learn more about Wordpress.com shortcodes")+"</a></div><div class='blogger-embed-container'><img class='icon' src='//www.houzz.com/res/classic-2004/pic/bloggerIcon.gif?v=classic-2004'><a class='blogger-embed-link'>"+_hgt("Blogger.com user? Click here.")+"</a></div></div>",n="<div class='steps-overview'><div class='step-label'>"+_hgt("Step 1: Choose")+"</div><div class='step-label'>"+_hgt("Step 2: Customize")+"</div><div class='step-label active'>"+_hgt("Step 3: Embed")+"</div></div><div class='left-container'><a class='back-link'>"+_hgt("Back")+"</a><div class='blogger-embed-container'><textarea class='html-embed-code small'>...</textarea><ol><li>"+_hgt("Mark and copy the HTML code above.")+"</li><li>"+_hgt("Go to your Blogger.com dashboard and click on 'Design'.")+"</li><li>"+_hgt("Click on 'Add a Gadget' on the side column.")+"</li><li>"+_hgt("In the popup window look up 'HTML/JavaScript' (it's the 6th item in the list) and click on the '+' sign.")+"</li><li>"+_hgt("The window will show 'Title' and 'Content' fields. In the 'Content' field, paste the copied code. Give your gadget a nice title too.")+"</li><li>"+_hgt("Click on 'Save' - the popup window will close. The Houzz widget will appear in the list of gadgets. Click 'Preview' to check it out.")+"</li></ol></div></div>",d={widgetType:WidgetWizard.galleryTypeToWidgetUrlMappingForHtmlEmbed[e]?parseInt(e):this.featuredGalleryType,widgetSize:300,keepTitleVisible:!0,openInNewWindow:!0,filterPhotosBy:null,spaceCategory:"all",styleCategory:"all",metroCategory:"all",searchImagesBy:""},l=this.stepDialog(_hgt("Embed a Widget on Your Website or Blog"),[t,s,o]);function p(t,i){var e;0==t?(i.on("click","input[type=radio], input[type=checkbox]",function(e){e.stopPropagation()}),i.on("click",".input-group",function(e){g.apply(this,[e,i])}),i.on("click",".widget-type",function(){d.widgetType=parseInt($(this).val()),w()}),function(e){for(var t,i,s=e.find(".choose-widget-type").find(".input-group"),a=0,o=s.length;a<o;a++)t=$(s[a]),i=parseInt(t.find("input").val()),this.galleryTypeToWidgetUrlMappingForHtmlEmbed[i]||(9==i?t.hide():(t.addClass("disabled"),t.find("input").attr("disabled",!0)))}.apply(WidgetWizard,[i]),u(t,i)):1==t?(i.on("click",".input-group",function(e){var t=$(e.target);t.hasClass("select-space")||t.hasClass("select-style")||t.hasClass("select-metro")||g.apply(this,[e,i])}),i.on("click","input[type=radio], input[type=checkbox]",function(e){e.stopPropagation()}),i.on("click",".widget-size",function(){d.widgetSize=parseInt($(this).val()),w()}),i.on("click",".keep-title-visible",function(){d.keepTitleVisible=$(this).prop("checked"),w()}),i.on("click",".open-in-new-window",function(){d.openInNewWindow=$(this).prop("checked"),w()}),i.on("click",".filter-photos",function(){d.filterPhotosBy=$(this).val(),w()}),i.on("change",".select-space",function(){d.spaceCategory=$(this).val(),$(".filter-photos").filter("[value=by-category]").click()}),i.on("change",".select-style",function(){d.styleCategory=$(this).val(),$(".filter-photos").filter("[value=by-category]").click()}),r||i.on("change",".select-metro",function(){d.metroCategory=$(this).val(),$(".filter-photos").filter("[value=by-category]").click()}),i.on("click",".search-images-input",function(){$(".filter-photos").filter("[value=by-search]").click()}),i.on("blur",".search-images-input",function(e){d.searchImagesBy=$(this).val(),w()}),i.on("click",".search-images-button",function(){d.searchImagesBy=$(".search-images-input").val(),$(".filter-photos").filter("[value=by-search]").click()}),i.on("keypress",".search-images-input",function(e){!function(e,t){var i=e.originalEvent;13===i.keyCode&&(d.searchImagesBy=$(this).val(),w(),i.returnValue=!1,e.preventDefault())}.apply(this,[e,i])}),i.on("change",".select-space, .select-style, .select-metro",function(e){w()}),function(e,t){1==e&&(d.widgetType===this.browseGalleryType?t.empty().append(a):t.empty().append(s))}.apply(WidgetWizard,[t,i]),u(t,i),r&&(e=new HZ.modules.LocationDropdown({containerElement:".browse-metro-selector",allMetroAreasOptionValue:"all",selectedValue:d.metroCategory&&"all"!==d.metroCategory?d.metroCategory:null,onMetroAreaSelected:function(e){d.metroCategory=e.slug,d.selectedMetroAreaName=e.name,$(".filter-photos").filter("[value=by-category]").click(),this.setTriggerLabel(e.name),this.close(),"all"!==e.slug?this.showAllMetroAreasOption():this.hideAllMetroAreasOption()}}),d.selectedMetroAreaName&&e.setTriggerLabel(d.selectedMetroAreaName))):2==t&&(i.on("click",".blogger-embed-link",function(e){i.empty().append(n),h(t,i),w()}),i.on("click",".back-link",function(e){i.empty().append(o),h(t,i),w()}),i.on("click","textarea",function(){$(this).select()}),h(t,i)),w()}function c(e,t){t.off()}function g(e,t){var i,s,a;$(this).hasClass("disabled")||(i=$(this).find("input[type=radio]"),s=$(this).find("input[type=checkbox]"),i.length&&(a=i.prop("class"),i.prop("checked",!0),"widget-type"==a||"widget-size"==a?d[i.prop("name")]=parseInt(i.val()):a&&(d[i.prop("name")]=i.val())),s.length&&(s.prop("checked",!s.prop("checked")),d[s.prop("name")]=s.prop("checked")),w())}function u(e,t){var i,s,a,o,n,l;0==e?(l=t.find(".widget-type[value="+(d.widgetType||"null")+"]")).length&&l.prop("checked",!0):1==e&&(i=t.find(".widget-size[value="+(d.widgetSize||"null")+"]"),s=t.find(".keep-title-visible"),a=t.find(".open-in-new-window"),o=t.find(".filter-photos[value="+(d.filterPhotosBy||"null")+"]"),n=t.find(".select-space"),l=t.find(".select-style"),e=t.find(".search-images-input"),i.length&&i.prop("checked",!0),s.length&&s.prop("checked",d.keepTitleVisible),a.length&&a.prop("checked",d.openInNewWindow),o.length&&o.prop("checked",!0),n.length&&n.prop("value",d.spaceCategory),l.length&&l.prop("value",d.styleCategory),r||(t=t.find(".select-metro")).length&&t.prop("value",d.metroCategory),e.length&&e.val(d.searchImagesBy))}function h(e,t){2==e&&(e=t.find(".html-embed-code"),t=t.find(".wordpress-embed-code"),e.length&&e.text(y.apply(WidgetWizard,[!0])),t.length&&t.text(function(){var e="",t=this.galleryTypeToWidgetUrlMappingForWordpressEmbed[d.widgetType];{if(!t)return null;d.widgetType===this.browseGalleryType&&("by-category"===d.filterPhotosBy?("all"!==d.spaceCategory&&(t+="/"+d.spaceCategory),"all"!==d.styleCategory&&(t+="/"+d.styleCategory),"all"!==d.metroCategory&&(t+="/"+d.metroCategory)):"by-search"===d.filterPhotosBy&&(t+="/"+d.searchImagesBy))}e+="houzz="+t,d.widgetSize&&(e+=" w="+d.widgetSize);return"["+e+"]"}.apply(WidgetWizard)))}function v(){var e=this.galleryTypeToWidgetUrlMappingForHtmlEmbed[d.widgetType];return e?(d.widgetType===this.browseGalleryType&&("by-search"===d.filterPhotosBy?(e=e[1],e+="/"+d.searchImagesBy):(e=e[0],"all"!==d.styleCategory&&(e+="/st="+d.styleCategory),"all"!==d.spaceCategory&&(e+="/cat="+d.spaceCategory),"all"!==d.metroCategory&&(e+="/metro="+d.metroCategory))),d.openInNewWindow&&(e+="/new_window=yes"),d.keepTitleVisible&&(e+="/title_on=yes"),e+="/width="+d.widgetSize):null}function y(e){var t=v.apply(this),i=Math.floor(1e7*Math.random()),s=Math.floor(8999999*Math.random()+1e6),a=12,o=18;return d.widgetSize<200&&(a=11),200==d.widgetSize&&(o=11),d.widgetSize<380&&(o=12),300==d.widgetSize&&(o=14),t='<iframe data-hzvt="'+this.versionTag+'" name="HouzzWidget'+i+'" id="HouzzWidget'+i+'" border=0 frameborder="0" SCROLLING=NO style="border:0 none;width:'+d.widgetSize+"px;height:"+this.widgetConfigurations[d.widgetSize].height+'px;" src="'+t+'"></iframe>',e?(o=function(e){var t=this.galleryTypeToLinkUrlMapping[d.widgetType],i="";{var s;d.widgetType==this.userGalleryType||d.widgetType==this.proGalleryType?(s=d.widgetType==this.userGalleryType?this.displayUsername+"'s ideabooks":this.displayUsername+" Featured on Houzz",i=d.widgetSize<200||!this.userImage?'<div><a href="'+t+'" target="_blank">'+s+"</a></div>":'<table style="height:40px;width:100%;" cellpadding=0 cellspacing=0 border=0><tr><td style="width:40px;"><a href="'+t+'" target="_blank"><img src="'+this.userImageUrl+'" border=0 style="border:0;" width=40 height=40/></a></td><td style="padding-left:5px;"><a href="'+t+'" target="_blank" style="float:left;font-size:'+e+'px;">'+s+"</a></td></tr></table>"):d.widgetType==this.featuredGalleryType?i=_hgt("Today's Ideabooks"):d.widgetType==this.currentGalleryType&&(i='<a href="'+t+'" target="_blank">'+this.galleryTitleText+"</a>")}return'<div style="font-size:'+e+'px;margin-bottom:3px;">'+i+"</div>"}.apply(WidgetWizard,[o]),'<div id="hzroot'+s+'" style="width:'+d.widgetSize+"px;text-align:center;font-size:"+a+'px;padding:0;border:0;margin:0;">'+o+'<div style="padding:0;margin:0;border:0;margin-bottom:3px;">'+t+"</div></div>"):t}function w(){var e,t,i,s=l.dialogBody.children(".widget-preview");s.length||(s=$('<div class="widget-preview"><div class="widget-preview-container">...</div><span class="widget-preview-label">'+_hgt("Widget Preview")+"</span></div>"),l.dialogBody.append(s)),e=s.find(".widget-preview-container"),300<d.widgetSize?e.html('<div class="preview-unavailable-container"><div class="preview-unavailable">Preview Unavailable</div></div>'):(i=e.find("iframe")).length&&i.prop("src")===v.apply(WidgetWizard)||(t=$('<div class="throbber"></div>'),s=y.apply(WidgetWizard,[!1]),i=(s=$("<div>"+s+"</div>")).find("iframe"),e.empty().append(t),s.attr("style",s.attr("style")+"margin:auto;"),i.css("visibility","hidden").css("position","absolute").attr("onload","("+function(e){var t=$(e).closest(".widget-preview-container");t.find(".throbber").hide(),$(e).css("position","static"),t.animate({width:$(e).width(),height:$(e).height()},500,function(){$(e).css("visibility","visible")})}.toString()+")(this);"),e.append(s))}a=function(e,t,i,s){var a,o,e=$("<div>"+e+"</div>"),n="",l="",d="";for(a=0,o=t.length;a<o;a++)n+='<option value="'+t[a].slug+'">'+t[a].label+"</option>";for(a=0,o=i.length;a<o;a++)l+='<option value="'+i[a].slug+'">'+i[a].label+"</option>";if(e.find(".select-space").append(n),e.find(".select-style").append(l),!r){for(a=0,o=s.length;a<o;a++)d+='<option value="'+s[a].slug+'">'+s[a].label+"</option>";e.find(".select-metro").append(d)}return e[0].innerHTML}(a,this.spaceOptions,this.styleOptions,this.metroOptions),l.onViewLoaded(p),l.onViewUnloaded(c),l.setInitialStep(1),l.show()}};WidgetWizard.initWidgetFrame();

window.hzmr.push("widgetWizard:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End widgetWizard.js  **************/
/************* Start jquery-ui-1.10.3.custom.widget-only.js for locale en-US **************/
try {!function(d,h){var i=0,r=Array.prototype.slice,n=d.cleanData;d.cleanData=function(t){for(var e,i=0;null!=(e=t[i]);i++)try{d(e).triggerHandler("remove")}catch(t){}n(t)},d.widget=function(t,i,e){var n,s,o,a,r={},u=t.split(".")[0];t=t.split(".")[1],n=u+"-"+t,e||(e=i,i=d.Widget),d.expr[":"][n.toLowerCase()]=function(t){return!!d.data(t,n)},d[u]=d[u]||{},s=d[u][t],o=d[u][t]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),h):new o(t,e)},d.extend(o,s,{version:e.version,_proto:d.extend({},e),_childConstructors:[]}),(a=new i).options=d.widget.extend({},a.options),d.each(e,function(e,n){return d.isFunction(n)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=n,h;function s(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}}),o.prototype=d.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix:t},r,{constructor:o,namespace:u,widgetName:t,widgetFullName:n}),s?(d.each(s._childConstructors,function(t,e){var i=e.prototype;d.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),d.widget.bridge(t,o)},d.widget.extend=function(t){for(var e,i,n=r.call(arguments,1),s=0,o=n.length;s<o;s++)for(e in n[s])i=n[s][e],n[s].hasOwnProperty(e)&&i!==h&&(t[e]=d.isPlainObject(i)?d.isPlainObject(t[e])?d.widget.extend({},t[e],i):d.widget.extend({},i):i);return t},d.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;d.fn[o]=function(i){var t="string"==typeof i,n=r.call(arguments,1),s=this;return i=!t&&n.length?d.widget.extend.apply(null,[i].concat(n)):i,t?this.each(function(){var t,e=d.data(this,a);return e?d.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,n))!==e&&t!==h?(s=t&&t.jquery?s.pushStack(t.get()):t,!1):h:d.error("no such method '"+i+"' for "+o+" widget instance"):d.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var t=d.data(this,a);t?t.option(i||{})._init():d.data(this,a,new e(i,this))}),s}},d.Widget=function(){},d.Widget._childConstructors=[],d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,e){e=d(e||this.defaultElement||this)[0],this.element=d(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=d.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=d(),this.hoverable=d(),this.focusable=d(),e!==this&&(d.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=d(e.style?e.ownerDocument:e.document||e),this.window=d(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:d.noop,_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(d.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:d.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return d.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=d.widget.extend({},this.options[t]),s=0;i.length-1>s;s++)n[i[s]]=n[i[s]]||{},n=n[i[s]];if(t=i.pop(),e===h)return n[t]===h?null:n[t];n[t]=e}else{if(e===h)return this.options[t]===h?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(s,o,t){var a,r=this;"boolean"!=typeof s&&(t=o,o=s,s=!1),t?(o=a=d(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),d.each(t,function(t,e){function i(){return s||!0!==r.options.disabled&&!d(this).hasClass("ui-state-disabled")?("string"==typeof e?r[e]:e).apply(r,arguments):h}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||d.guid++);var n=t.match(/^(\w+)\s*(.*)$/),t=n[1]+r.eventNamespace,n=n[2];n?a.delegate(n,t,i):o.bind(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){d(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){d(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){d(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){d(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,e,i){var n,s,o=this.options[t];if(i=i||{},(e=d.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],s=e.originalEvent)for(n in s)n in e||(e[n]=s[n]);return this.element.trigger(e,i),!(d.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},d.each({show:"fadeIn",hide:"fadeOut"},function(o,a){d.Widget.prototype["_"+o]=function(e,t,i){var n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o,s=!d.isEmptyObject(t="number"==typeof(t=t||{})?{duration:t}:t);t.complete=i,t.delay&&e.delay(t.delay),s&&d.effects&&d.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){d(this)[o](),i&&i.call(e[0]),t()})}})}(jQuery);

window.hzmr.push("jquery-ui-1.10.3.custom.widget-only:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery-ui-1.10.3.custom.widget-only.js  **************/
/************* Start flagContent.js for locale en-US **************/
try {HZ.ns("HZ.flag"),HZ.flag.flagDialogInstance=null,HZ.flag.FlagDialog=function(){HZ.flag.FlagDialog.superclass.constructor.call(this);var i=this;this.prepare=function(){var t=_hgt("Report Comment"),e=_hgt("Why are you reporting this comment?"),a=$('<div id="report-dialog"><form action="javascript:;"><div class="why-report text-bold mbm">'+e+'</div>\n\t\t\t\t\t<ul id="report-type-list" class="list-unstyled">\n\t\t\t\t\t\t<li class="report-type-item radio"><label><input type="radio" name="report-type" class="report-type" value="spam" id="report-spam"/>'+_hgt("Spam")+'</label></li>\n\t\t\t\t\t\t<li class="report-type-item radio"><label><input type="radio" name="report-type" class="report-type" value="abuse" id="report-abuse"/>'+_hgt("Inappropriate or abusive")+'</label></li>\n\t\t\t\t\t\t<li class="report-type-item report-type-item--question-only radio"><label><input type="radio" name="report-type" class="report-type" value="miscategorized" id="report-miscategorized"/>'+_hgt("Miscategorized")+'</label></li>\n\t\t\t\t\t\t<li class="report-type-item radio"><label><input type="radio" name="report-type" class="report-type" value="dislike" id="report-dislike"/>'+_hgt("I just don't like it")+"</label></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t</form></div>"),l=HZ.ui.InputButtonUtils.createSecondaryInputButton(_hgt("Cancel"),"flagCancelBtn"),e=HZ.ui.InputButtonUtils.createPrimaryInputButton(_hgt("Submit"),"flagConfirmBtn"),e=[HZ.ui.AjaxThrobber.getThrobber(),l,e];i.init({title:t,body:a,controls:e,onViewLoaded:o}),i.hideStatus()};var o=function(){HZ.ui.AjaxThrobber.setInCall(!1),$(".report-type").prop("checked",!1),i.hideStatus()};this.bindButtonHandler=function(a){var t=$("#flagConfirmBtn"),e=$("#flagCancelBtn");t.unbind("click").bind("click",function(t){var e;i.hideStatus(),a?(HZ.ui.AjaxThrobber.setInCall(!0),void 0===(e=$(".report-type:checked").val())?(i.showStatus(_hgt("Please select one of the options.")),HZ.ui.AjaxThrobber.setInCall(!1)):a(t,e)):HZ.ui.yamdi.Common.hideAllDialogs()}),e.unbind("click").one("click",function(t){HZ.ui.yamdi.Common.hideAllDialogs()})}},HZ.extend(HZ.flag.FlagDialog,HZ.ui.yamdi.Dialog),HZ.flag.ShowFlagDialog=function(t){var e=void 0===t||void 0===t.isComment||t.isComment,t=void 0!==t&&void 0!==t.okCallback?t.okCallback:null;null===HZ.flag.flagDialogInstance&&(HZ.flag.flagDialogInstance=new HZ.flag.FlagDialog,HZ.flag.flagDialogInstance.prepare()),e?(HZ.flag.flagDialogInstance.setTitle(_hgt("Report Comment")),HZ.flag.flagDialogInstance.getBody().find(".why-report").text(_hgt("Why are you reporting this comment?")),HZ.flag.flagDialogInstance.getBody().find(".report-type-item--question-only").css("display","none")):(HZ.flag.flagDialogInstance.setTitle(_hgt("Report Post")),HZ.flag.flagDialogInstance.getBody().find(".why-report").text(_hgt("Why are you reporting this post?")),HZ.flag.flagDialogInstance.getBody().find(".report-type-item--question-only").css("display","block")),HZ.ui.Yamdi.show(HZ.flag.flagDialogInstance),HZ.flag.flagDialogInstance.bindButtonHandler(t)};

window.hzmr.push("flagContent:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End flagContent.js  **************/
/************* Start feedComments.js for locale en-US **************/
try {!function(d){d.widget("hz.feedComments",{objectId:null,objectType:null,commentCount:null,fbShareable:null,clearRecentCommentsOnFirstLoad:!1,isProductQuestion:!1,isGetCommentsCalled:!1,$cachedMoreComments:d(),cachedCommentCount:null,options:{source:null,dataName:"hz",loaderClass:"loader",loaderHideClass:"loaderHide",commentsToggleClass:"commentsToggle",editCommentSelector:".editCommentDiv",commentBodyInput:"textarea.commentBody",slideDuration:400,selectors:{commentable:".feedComments",comment:".comment",moreComments:".moreComments",loadedCount:".moreComments .loadedCount",remainingCount:".moreComments .remainingCount",commentCount:".moreComments .commentCount",addCommentForm:".addComment form",lastCommentInput:".addComment form input[name='lastCommentId']",bodyInput:".addComment form textarea[name='body']",seeMoreComments:"a.seeMoreComments",commentsContainer:".commentsContainer",addComment:".addComment",submitButton:".addComment form .submitAddComment",addCommentExtra:".addComment .addCommentExtra",fileInputs:".fileInputs",editErrorMessage:".editCommentDiv .commentError",errorMessage:".addComment .commentError"}},_findObject:function(e){e=this.element.find(e);return 0<e.length?e:null},_initElements:function(){for(var e in this.elements=new Object,this.options.selectors){var t=this.options.selectors[e];this.elements[e]=this._findObject(t)}},_create:function(){this.objectId=null,this.objectType=null,this.topCommentId=null,this.lastCommentId=0,this.commentCount=null,this.numCommentsLoaded=null,this.executing=!1;var e=this._getAndValidateData(this.element,this.options.dataName,["id","type","cc","crc","ipq"]);this.objectId=e.id,this.objectType=e.type,this.commentCount=e.cc,this.fbShareable=e.fbs,this.clearRecentCommentsOnFirstLoad=e.crc,this.isProductQuestion=e.ipq,this._initElements(),null!=this.elements.bodyInput&&(this.elements.bodyInput.css("resize","none").css("height","1em").autosize(),void 0!==HZ.modules&&void 0!==HZ.modules.SpacePreview&&HZ.modules.SpacePreview.init(this.elements.bodyInput)),this._updateCommentsEvent()},_showLoader:function(e){this.$loadRestoreElement=d(e),this.$loadRestoreElement.addClass(this.options.loaderHideClass).after(d("<div class='"+this.options.loaderClass+"'></div>"))},_hideLoader:function(){this.$loadRestoreElement.siblings("."+this.options.loaderClass).hide().remove(),this.$loadRestoreElement.removeClass(this.options.loaderHideClass)},_initCommentsToggle:function(){this.elements.seeMoreComments.addClass(this.options.commentsToggleClass).text(_hgt("Hide comments"))},_updateCommentsEvent:function(e){var t;void 0!==e&&null!=e&&(this.commentCount=e),void 0===this.elements&&this._initElements(),this.elements.comments=this._findObject(this.options.selectors.comment),this.numCommentsLoaded=null!=this.elements.comments?this.elements.comments.length:0,this.numCommentsRemaining=this.commentCount-this.numCommentsLoaded,0<this.numCommentsLoaded&&(t=this.elements.comments.first(),e=this._getAndValidateData(t,this.options.dataName,["id"]),this.topCommentId=e.id,t=this.elements.comments.last(),e=this._getAndValidateData(t,this.options.dataName,["id"]),this.lastCommentId=e.id),null!=this.elements.moreComments&&this.numCommentsLoaded>=this.commentCount&&this._initCommentsToggle(),null!=this.elements.loadedCount&&this.elements.loadedCount.html(this.numCommentsLoaded),null!=this.elements.remainingCount&&this.elements.remainingCount.text(this.numCommentsRemaining)},_getAndValidateData:function(e,t,n){var o,s=e.data(t);if(void 0===s)throw"incompatible element, no data";for(o in n)if(n.hasOwnProperty(o)){var i=n[o];if(i instanceof Array){var m,a=!1;for(m in i)if(void 0!==s[i[m]]){a=!0;break}if(!a)throw"incompatible element, required attribute not found"}else if(void 0===s[i])throw"incompatible element, required attribute not found: "+i}return s},deleteClick:function(t){HZ.ui.yamdi.Common.confirm(_hgt("Delete a comment"),_hgt("Are you sure you want to delete this comment?"),_hgt("Delete Comment"),d.proxy(function(){var e;this.executing||(this.executing=!0,this.$commentToDelete=d(t.target).closest(this.options.selectors.comment),e=this.$commentToDelete.data("hz").id,HZ.ajaz.Services.deleteComment(this.objectType,this.objectId,e,d.proxy(this._deleteAjaxHandler,this)))},this),null,null,function(){d(document).trigger("keyboardHandlerRequired",{source:this,event:t})},function(){d(document).trigger("keyboardHandlerReleased",{source:this,event:t})})},_deleteAjaxHandler:function(t){"true"==t.success&&this.$commentToDelete.slideUp(this.options.slideDuration,d.proxy(function(){var e=t.commentCount;this.$commentToDelete.remove(),this._updateCommentsEvent(e),HZ.globalComments&&(e={commentId:(e=this.$commentToDelete.data("hz")).id,translation:null,language:e.lang},HZ.globalComments.removeComments([e]))},this)),HZ.ui.yamdi.Common.hideAllDialogs(),this.executing=!1,this._notifyObservers()},editClick:function(e){var m=d(e.target).closest(this.options.selectors.comment).find(this.options.editCommentSelector).first().clone();this.$commentToUpdate=d(e.target).closest(this.options.selectors.comment),HZ.ui.yamdi.Common.confirm(_hgt("Edit comment"),m,_hgt("Submit"),d.proxy(function(){var e,t,n,o,s,i;this.executing||(this.executing=!0,e=m.find("form [name='objectType']").val(),t=m.find("form [name='objectId']").val(),n=m.find("form [name='commentId']").val(),o=d.trim(m.find("form [name='body']").val()),i=m.find("form [name='privacy']"),s=d(i).prop("checked")?d(i).val():null,i=m.find("form [name='isHtml']").val(),m.find(this.options.commentBodyInput).attr("disabled","true"),HZ.ajaz.Services.updateComment(e,t,n,o,s,this.options.source,i,d.proxy(this._editCommentAjaxHandler,this)))},this),null,null,function(){d(document).trigger("keyboardHandlerRequired",{source:this,event:e})},function(){d(document).trigger("keyboardHandlerReleased",{source:this,event:e})})},flagClick:function(e){var n,t=d(e.currentTarget),o=t.closest(this.options.selectors.comment),s=t.closest(this.options.selectors.commentable),i=o.data("hz").id,e=s.data("hz").type,m=(s.data("hz").ipq,e===HZ.ajaz.ContentFlag.COMMENTABLE_GALLERY?HZ.ajaz.ContentFlag.COMMENT:HZ.ajaz.ContentFlag.ANSWER),a=this;o.hasClass("flaggedComment")?(this._showLoader(t.parents(".flag-message")),HZ.ajaz.ContentFlag.removeFlag(m,i,function(e){var t,n;"true"==e.success?(n=function(){o.removeClass("flaggedComment"),a._hideLoader()},UIHelper.isIE8||UIHelper.isIE7||UIHelper.isIE6?(o.css({"max-height":"10000px"}),n()):o.animate({"max-height":"10000px"},"slow",n),void 0!==e.as&&(t=e.as,n=o.find(".admin-controls"),e=o.find(".hz-spam-control"),0===t?(o.removeClass("isolated rejected"),n.removeClass("active"),e.text("")):1===t?(o.removeClass("rejected").addClass("isolated"),n.addClass("active"),e.text("("+_hgt("Pending")+")")):2===t?(o.removeClass("isolated rejected"),n.removeClass("active"),e.text("")):4===t&&(o.addClass("isolated rejected"),n.addClass("active"),e.text("("+_hgt("Rejected")+")")))):a._hideLoader()})):HZ.flag.ShowFlagDialog({okCallback:function(e,t){HZ.ajaz.ContentFlag.addFlag(m,i,t,n,function(e){HZ.ui.AjaxThrobber.setInCall(!1),"true"===e.success?(HZ.ui.yamdi.Common.hideAllDialogs(),o.addClass("flaggedComment")):HZ.flag.flagDialogInstance.showStatus(e.error)})},isComment:!0})},_editCommentAjaxHandler:function(e){"true"==e.success&&e.comments&&((e=d(e.comments)).hide(),this.$commentToUpdate.replaceWith(e),e.fadeIn()),HZ.ui.yamdi.Common.hideAllDialogs(),this.executing=!1,this._notifyObservers()},_toggleCommentsContainer:function(){this.elements.commentsContainer.is(":visible")?(this.elements.commentsContainer.slideUp(this.options.slideDuration),this.elements.seeMoreComments.text(_hgt("Show comments"))):this._showCommentsContainer(),this._notifyObservers()},_showCommentsContainer:function(){this.elements.commentsContainer.is(":visible")||(this.elements.commentsContainer.slideDown(this.options.slideDuration),this.elements.seeMoreComments.text(_hgt("Hide comments")))},showMoreClick:function(e){var t,n,o;d(e.target).hasClass(this.options.commentsToggleClass)?this._toggleCommentsContainer():this.executing||(this.executing=!0,this.isGetCommentsCalled?this._showCachedMoreComments():(this._showLoader(e.currentTarget),this.clearRecentCommentsOnFirstLoad&&this._clearRecentCommentsPreAjax(),t=this.topCommentId,n=[],o=null,e=this.element.closest(".feedItem").length,HZ.globalComments&&(n=HZ.globalComments.getSelectedLanguages(),o=this.numCommentsRemaining),HZ.ajaz.Services.getComments(this.objectType,this.objectId,o,t,null,this.options.source,n,e,d.proxy(this._showMoreAjaxHandler,this))))},cachedCommentsExist:function(){return this.isGetCommentsCalled},getComments:function(){this.executing||(this.executing=!0,this.isGetCommentsCalled=!0,HZ.ajaz.Services.getComments(this.objectType,this.objectId,this.numCommentsRemaining,this.topCommentId,null,this.options.source,HZ.globalComments?HZ.globalComments.getSelectedLanguages():[],this.element.closest(".feedItem").length,d.proxy(this._onGetComments,this)))},_onGetComments:function(e){var t;e.comments&&(t=d(d("<div>").html(e.comments).text()).hide().prependTo(this.elements.commentsContainer),this.$cachedMoreComments=t,this.cachedCommentCount=e.commentCount,HZ.globalComments&&(t=d.map(t,function(e,t){e=d(e).data("hz");return{commentId:e.id,translation:null,language:e.lang}}),HZ.globalComments.setComments(t,!1),HZ.globalComments.toggleTranslateAllButton(),this.elements.seeMoreComments[0].dispatchEvent(new Event("gc-showMoreComments")))),this.executing=!1},_showCachedMoreComments:function(){this._showLoader(this.elements.seeMoreComments),this.clearRecentCommentsOnFirstLoad&&this._clearRecentCommentsPreAjax(),this.$cachedMoreComments.length?(this._updateCommentsEvent(this.cachedCommentCount),this.$cachedMoreComments.slideDown(this.options.slideDuration,d.proxy(function(){void 0!==HZ.feedComments&&void 0!==HZ.feedComments.Peekable&&void 0!==HZ.feedComments.Peekable.peekableHandler&&this.$cachedMoreComments.find(".commentBodyContent.comment-peekable").each(HZ.feedComments.Peekable.peekableHandler),this._hideLoader(),this.executing=!1},this)),HZ.globalComments&&HZ.globalComments.toggleTranslateAllButton()):(this._updateCommentsEvent(0),this._hideLoader(),this.executing=!1),HZ.globalComments&&(HZ.globalComments.enableSelectAllLanguagesView(),this.elements.moreComments.hide()),this.isGetCommentsCalled=!1},_clearRecentCommentsPreAjax:function(){this.topCommentId=4294967295},_clearRecentCommentsPostAjax:function(){this.elements.commentsContainer.empty(),this.clearRecentCommentsOnFirstLoad=!1},_showMoreAjaxHandler:function(e){var t;e.comments?(this.clearRecentCommentsOnFirstLoad&&this._clearRecentCommentsPostAjax(),(t=d(d("<div>").html(e.comments).text())).hide(),this.elements.commentsContainer.prepend(t),e=e.commentCount,this._updateCommentsEvent(e),t.slideDown(this.options.slideDuration,d.proxy(function(){void 0!==HZ.feedComments&&void 0!==HZ.feedComments.Peekable&&void 0!==HZ.feedComments.Peekable.peekableHandler&&t.find(".commentBodyContent.comment-peekable").each(HZ.feedComments.Peekable.peekableHandler),this._hideLoader(),this.executing=!1},this)),HZ.globalComments&&(e=d.map(t,function(e,t){e=d(e).data("hz");return{commentId:e.id,translation:null,language:e.lang}}),HZ.globalComments.setComments(e,!1),HZ.globalComments.toggleTranslateAllButton(),this.elements.seeMoreComments[0].dispatchEvent(new Event("gc-showMoreComments")))):(this._updateCommentsEvent(0),this._hideLoader(),this.executing=!1),HZ.globalComments&&(HZ.globalComments.enableSelectAllLanguagesView(),this.elements.moreComments.hide())},_addCommentKeypress:function(e){13!=(e.keyCode||e.which)||e.shiftKey||(e.preventDefault(),this.submitAddComment(e))},validateAddComment:function(){return!this.executing&&(""!=d.trim(this.elements.bodyInput.val())&&(this.executing=!0,this.elements.bodyInput.attr("disabled","true"),!0))},updateLastCommentFormInput:function(){null!=this.lastCommentId&&this.elements.lastCommentInput.val(this.lastCommentId)},submitAddComment:function(e){var t,n,o,s;HZ.feedComments.requireLoggedIn(69)&&(this.executing||(t=this.elements.bodyInput.attr("placeholder"),o=d.trim(this.elements.bodyInput.val()),n=parseInt(this.elements.bodyInput.attr("maxlength"),10)||1e4,""!=o&&o!==t?n<(o=o.length)?(s=_hgt("Your post is {numOfCharsToDelete} too long, posts can be up to {lengthLimit} characters. Please make it a little shorter and try again.",{lengthLimit:n,numOfCharsToDelete:_hgtp("","1 character","{n} characters",o-n,{n:o-n})}),this.elements.errorMessage.text(s).slideDown(this.options.slideDuration)):(!this.options.source||0==(s=this.elements.addCommentForm.find("input[name='source']")).length&&(s=d("<input type='hidden' name='source' value='"+this.options.source+"'/>"),this.elements.addCommentForm.append(s)),d.proxy(function(){this.executing=!0,this.updateLastCommentFormInput();var e={success:d.proxy(function(e,t,n,o){e=d.parseJSON(d(e).text());this._addCommentAjaxHandler(e);e=this.elements.addComment.find("textarea.add-comment-rte");e.data("hz-addCommentRte")&&e.addCommentRte("destroy")},this),error:d.proxy(function(e,t,n){this._addCommentAjaxHandler(n)},this)};if(HZ.globalComments){var t=HZ.globalComments.getSelectedLanguages(),n=this.elements.addCommentForm.find("input[name=preferredLanguages]");-1==d.inArray("other",t)&&t.push("other"),n.length?n.val(t.join(",")):(n=d('<input type="hidden" name="preferredLanguages" value="'+t.join(",")+'">'),this.elements.addCommentForm.append(n));n=this.elements.addCommentForm.find("input[name=lastCommentId]");if(n.length){for(var o,s=0;s<t.length;s++){var i=t[s],i=HZ.globalComments.getLastCommentIdByLanguage(i),i=parseInt(i)||null;(!o||o<i)&&(o=i)}n.val(o||n.val())}}n=this.elements.addCommentForm.find("input[name=isReferrerGalleryFeed]");n.length?n.val(1):d('<input type="hidden" name="isReferrerGalleryFeed">').val(1).appendTo(this.elements.addCommentForm),this.elements.addCommentForm.ajaxSubmit(e),this.elements.addCommentForm.find("input, textarea, button, select").attr("readonly","true"),this._showLoader(this.elements.submitButton),this._showCommentsContainer()},this)()):this.elements.errorMessage.text(_hgt("Please enter your comment.")).slideDown(this.options.slideDuration)))},_addCommentAjaxHandler:function(e){var t;e&&"true"==e.success?((t=d(e.comments)).hide(),this.elements.commentsContainer.append(t),this.elements.addCommentForm.get(0).reset(),this.elements.addCommentExtra.hide(),this.elements.addComment.find(".hzProIndicator").hide(),null!=this.elements.fileInputs&&(this.elements.fileInputs[0].innerHTML=this.elements.fileInputs[0].innerHTML,this.elements.fileInputs.hide().find("input").hide().first().show()),this.elements.addCommentForm.find(".attachment-previews").empty(),void 0!==HZ.modules&&void 0!==HZ.modules.SpacePreview&&HZ.modules.SpacePreview&&HZ.modules.SpacePreview.clearCache&&HZ.modules.SpacePreview.clearCache(this.elements.bodyInput),this.elements.bodyInput.trigger("autosize"),this.elements.bodyInput.trigger("reset"),this.elements.errorMessage.hide(),e=e.commentCount,this._updateCommentsEvent(e),t.fadeIn((this.options.slideDuration,d.proxy(function(){void 0!==HZ.feedComments&&void 0!==HZ.feedComments.Peekable&&void 0!==HZ.feedComments.Peekable.peekableHandler&&t.find(".commentBodyContent.comment-peekable").each(HZ.feedComments.Peekable.peekableHandler)},this))),HZ.globalComments&&(e=d.map(t,function(e,t){e=d(e).data("hz");return{commentId:e.id,translation:null,language:e.lang}}),HZ.globalComments.setComments(e,!0))):HZ.ui.yamdi.Common.alert(_hgt("Unable to add comment"),_hgt("Unable to add comment.  Please reload the page and try again.")),this.executing=!1,this.elements.addCommentForm.find("input, textarea, button, select").removeAttr("readonly"),this._hideLoader(),this._notifyObservers()},_notifyObservers:function(){this.options.contentChangedHandler&&this.options.contentChangedHandler()}})}(jQuery),HZ.ns("HZ.feedComments"),HZ.feedComments=new function(){var t={source:null,feedContainer:".feedContainer",feedInfo:".feedInfo",feedActions:".feedActions"},o="hz-feedComments",s=".feedComments",i="span.commentButton",m=".addComment form textarea[name='body']",a=".addComment",d=".fileInputs",l=".addCommentExtra",r=".submitAddComment",c=".moreComments a",h=".comment .deleteComment",u=".comment .editComment",C=".addComment .link--addPhoto",g=".addComment .addCommentFileInput",f=".hzProIndicator.hzProfileCompleted.hzProView",p=".comment .flagComment, .comment .unflag";this.init=function(e){function n(){$(".add-comment-rte").each(function(e,t){$(t).data("hz-addCommentRte")&&$(t).addCommentRte("destroy")}),$(".edit-comment-rte").each(function(e,t){$(t).data("hz-editCommentRte")&&$(t).editCommentRte("destroy")})}var o=!1;if(!e.source)throw"source attribute required";config={},$.extend(config,t,e),null==$(config.feedContainer).data("feedCommentsConfig")&&($(config.feedContainer).data("feedCommentsConfig",config),$(m).initPlaceHolders(),$(config.feedContainer).on("mouseover",f,function(e){$(this).tipBubble({id:"proIndicatorHelp",content:_hgt("This pro has a complete profile."),point:"north",width:"auto",offsetY:4,position:"absolute",attachTo:"body",showCloseBtn:!1})}).on("mouseout",f,function(){$(this).tipBubble("hide")}),$(config.feedContainer).on("click",i,function(e){var t=$(this).closest(config.feedInfo),n=t.parents(".feedItem").find(s);HZ.feedComments.requireLoggedIn(69)&&0!=t.length&&0!=n.length&&(n.show(),void 0!==HZ.feedComments&&void 0!==HZ.feedComments.Peekable&&void 0!==HZ.feedComments.Peekable.peekableHandler&&n.find(".commentBodyContent.comment-peekable").each(HZ.feedComments.Peekable.peekableHandler),n.find(m).focus())}),$(config.feedContainer).on("focus",m,function(e){$(document).trigger("keyboardHandlerRequired",{source:this,event:e});b(this,config);var t=$(this).parents(s).find(l);t.is(":visible")||t.show(),$(this).parents(a).find(".hzProIndicator").show(),n(),$(this).prop("disabled",!0).closest(".addComment").find(".link--addPhoto").hide(),o?$(this).addCommentRte({onFocus:function(){$(document).trigger("keyboardHandlerRequired",{source:this,event:e})},onBlur:function(){HZ.ui.Yamdi.isShowing()||$(document).trigger("keyboardHandlerReleased",{source:this,event:e})}}).prop("disabled",!1):HZ.utils.ResourceLoader.requireCommentRichTextEditorResources($.proxy(function(){$(this).addCommentRte({onFocus:function(){$(document).trigger("keyboardHandlerRequired",{source:this,event:e})},onBlur:function(){HZ.ui.Yamdi.isShowing()||$(document).trigger("keyboardHandlerReleased",{source:this,event:e})}}).prop("disabled",!1),o=!0},this))}),$(config.feedContainer).on("blur",m,function(e){$(document).trigger("keyboardHandlerReleased",{source:this,event:e})}),$(config.feedContainer).on("click",r,function(e){b(this,config).submitAddComment(e)}),$(config.feedContainer).on("click",c,function(e){b(this,config).showMoreClick(e)}),$(config.feedContainer).on("click",h,function(e){e.preventDefault(),b(this,config).deleteClick(e)}),$(config.feedContainer).on("click",u,function(e){n();var t=$(this).closest(".comment").find("textarea.edit-comment-rte");t.length?o?t.editCommentRte({onFocus:function(){$(document).trigger("keyboardHandlerRequired",{source:this,event:e})},onBlur:function(){HZ.ui.Yamdi.isShowing()||$(document).trigger("keyboardHandlerReleased",{source:this,event:e})}}):HZ.utils.ResourceLoader.requireCommentRichTextEditorResources(function(){t.editCommentRte({onFocus:function(){$(document).trigger("keyboardHandlerRequired",{source:this,event:e})},onBlur:function(){HZ.ui.Yamdi.isShowing()||$(document).trigger("keyboardHandlerReleased",{source:this,event:e})}}),o=!0}):b(this,config).editClick(e)}),$(config.feedContainer).on("click",p,function(e){e.preventDefault(),b(this,config).flagClick(e)}),$(config.feedContainer).on("click",C,function(e){HZ.feedComments.requireLoggedIn(69)&&((e=$(e.currentTarget).parents(a).find(d)).is(":visible")||(e.show(),UIHelper.isMSIE||e.find("input.addCommentFileInput").first().click()))}),$(config.feedContainer).on("change",g,function(e){$(this).next("input.addCommentFileInput").css("display","block")}))},this.requireLoggedIn=function(e){return null!=HZ.data.CurrentSessionUser||(HZ.auth.Manager.signup(e),!1)},this.getFeedCommentsWidget=function(e){return b(e,config)};var b=function(e,t){var n=null,e=$(e).closest(s);return n=null==(n=e.data(o))?e.feedComments({source:t.source}).data(o):n}};

window.hzmr.push("feedComments:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End feedComments.js  **************/
/************* Start jquery.form.min.js for locale en-US **************/
try {!function(F){"use strict";function a(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),F(this).ajaxSubmit(t))}function r(e){var t=e.target,a=F(t);if(!a.is("[type=submit],[type=image]")){var r=a.closest("[type=submit]");if(0===r.length)return;t=r[0]}var n=this;"image"==(n.clk=t).type&&(void 0!==e.offsetX?(n.clk_x=e.offsetX,n.clk_y=e.offsetY):"function"==typeof F.fn.offset?(a=a.offset(),n.clk_x=e.pageX-a.left,n.clk_y=e.pageY-a.top):(n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function O(){var e;F.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}var h={};h.fileapi=void 0!==F("<input type='file'/>").get(0).files,h.formdata=void 0!==window.FormData,F.fn.ajaxSubmit=function(A){function e(e){for(var a=new FormData,t=0;t<e.length;t++)a.append(e[t].name,e[t].value);if(A.extraData)for(var r=function(e){for(var t,a=F.param(e).split("&"),r=a.length,n=[],i=0;i<r;i++)a[i]=a[i].replace(/\+/g," "),t=a[i].split("="),n.push([decodeURIComponent(t[0]),decodeURIComponent(t[1])]);return n}(A.extraData),t=0;t<r.length;t++)r[t]&&a.append(r[t][0],r[t][1]);A.data=null;var n=F.extend(!0,{},F.ajaxSettings,A,{contentType:!1,processData:!1,cache:!1,type:E||"POST"});A.uploadProgress&&(n.xhr=function(){var e=jQuery.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,a=e.loaded||e.position,r=e.total;e.lengthComputable&&(t=Math.ceil(a/r*100)),A.uploadProgress(e,a,r,t)},!1),e}),n.data=null;var i=n.beforeSend;return n.beforeSend=function(e,t){t.data=a,i&&i.call(this,e,t)},F.ajax(n)}function t(e){function l(e){return e.contentWindow?e.contentWindow.document:e.contentDocument||e.document}function t(){var e=L.attr("target"),t=L.attr("action");i.setAttribute("target",n),E||i.setAttribute("method","POST"),t!=f.url&&i.setAttribute("action",f.url),f.skipEncodingOverride||E&&!/post/i.test(E)||L.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(g=setTimeout(function(){v=!0,c(b)},f.timeout));var a=[];try{if(f.extraData)for(var r in f.extraData)f.extraData.hasOwnProperty(r)&&(F.isPlainObject(f.extraData[r])&&f.extraData[r].hasOwnProperty("name")&&f.extraData[r].hasOwnProperty("value")?a.push(F('<input type="hidden" name="'+f.extraData[r].name+'">').val(f.extraData[r].value).appendTo(i)[0]):a.push(F('<input type="hidden" name="'+r+'">').val(f.extraData[r]).appendTo(i)[0]));f.iframeTarget||(d.appendTo("body"),p.attachEvent?p.attachEvent("onload",c):p.addEventListener("load",c,!1)),setTimeout(function e(){try{var t=l(p).readyState;O("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){O("Server abort: ",e," (",e.name,")"),c(y),g&&clearTimeout(g),g=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),e?i.setAttribute("target",e):L.removeAttr("target"),F(a).remove()}}function c(t){if(!h.aborted&&!w){try{j=l(p)}catch(e){O("cannot access response document: ",e),t=y}if(t===b&&h)return h.abort("timeout"),void x.reject(h,"timeout");if(t==y&&h)return h.abort("server abort"),void x.reject(h,"error","server abort");if(j&&j.location.href!=f.iframeSrc||v){p.detachEvent?p.detachEvent("onload",c):p.removeEventListener("load",c,!1);var a,t="success";try{if(v)throw"timeout";var e="xml"==f.dataType||j.XMLDocument||F.isXMLDoc(j);if(O("isXml="+e),!e&&window.opera&&(null===j.body||!j.body.innerHTML)&&--S)return O("requeing onLoad callback, DOM not available"),void setTimeout(c,250);var r=j.body||j.documentElement;h.responseText=r?r.innerHTML:null,h.responseXML=j.XMLDocument||j,e&&(f.dataType="xml"),h.getResponseHeader=function(e){return{"content-type":f.dataType}[e]},r&&(h.status=Number(r.getAttribute("status"))||h.status,h.statusText=r.getAttribute("statusText")||h.statusText);var n,i,o,s=(f.dataType||"").toLowerCase(),u=/(json|script|text)/.test(s);u||f.textarea?(n=j.getElementsByTagName("textarea")[0])?(h.responseText=n.value,h.status=Number(n.getAttribute("status"))||h.status,h.statusText=n.getAttribute("statusText")||h.statusText):u&&(i=j.getElementsByTagName("pre")[0],o=j.getElementsByTagName("body")[0],i?h.responseText=i.textContent||i.innerText:o&&(h.responseText=o.textContent||o.innerText)):"xml"==s&&!h.responseXML&&h.responseText&&(h.responseXML=k(h.responseText));try{T=D(h,s,f)}catch(e){t="parsererror",h.error=a=e||t}}catch(e){O("error caught: ",e),t="error",h.error=a=e||t}h.aborted&&(O("upload aborted"),t=null),"success"===(t=h.status?200<=h.status&&h.status<300||304===h.status?"success":"error":t)?(f.success&&f.success.call(f.context,T,"success",h),x.resolve(h.responseText,"success",h),m&&F.event.trigger("ajaxSuccess",[h,f])):t&&(void 0===a&&(a=h.statusText),f.error&&f.error.call(f.context,h,t,a),x.reject(h,"error",a),m&&F.event.trigger("ajaxError",[h,f,a])),m&&F.event.trigger("ajaxComplete",[h,f]),m&&!--F.active&&F.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,h,t),w=!0,f.timeout&&clearTimeout(g),setTimeout(function(){f.iframeTarget||d.remove(),h.responseXML=null},100)}}}var a,r,f,m,n,d,p,h,v,g,i=L[0],o=!!F.fn.prop,x=F.Deferred();if(e)for(r=0;r<M.length;r++)a=F(M[r]),o?a.prop("disabled",!1):a.removeAttr("disabled");if((f=F.extend(!0,{},F.ajaxSettings,A)).context=f.context||f,n="jqFormIO"+(new Date).getTime(),f.iframeTarget?(s=(d=F(f.iframeTarget)).attr("name"))?n=s:d.attr("name",n):(d=F('<iframe name="'+n+'" src="'+f.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),p=d[0],h={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";O("aborting upload... "+t),this.aborted=1;try{p.contentWindow.document.execCommand&&p.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",f.iframeSrc),h.error=t,f.error&&f.error.call(f.context,h,t,e),m&&F.event.trigger("ajaxError",[h,f,t]),f.complete&&f.complete.call(f.context,h,t)}},(m=f.global)&&0==F.active++&&F.event.trigger("ajaxStart"),m&&F.event.trigger("ajaxSend",[h,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,h,f))return f.global&&F.active--,x.reject(),x;if(h.aborted)return x.reject(),x;(e=i.clk)&&(s=e.name)&&!e.disabled&&(f.extraData=f.extraData||{},f.extraData[s]=e.value,"image"==e.type&&(f.extraData[s+".x"]=i.clk_x,f.extraData[s+".y"]=i.clk_y));var b=1,y=2,e=F("meta[name=csrf-token]").attr("content"),s=F("meta[name=csrf-param]").attr("content");s&&e&&(f.extraData=f.extraData||{},f.extraData[s]=e),f.forceSync?t():setTimeout(t,10);var T,j,w,S=50,k=F.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},u=F.parseJSON||function(e){return window.eval("("+e+")")},D=function(e,t,a){var r=e.getResponseHeader("content-type")||"",n="xml"===t||!t&&0<=r.indexOf("xml"),e=n?e.responseXML:e.responseText;return n&&"parsererror"===e.documentElement.nodeName&&F.error&&F.error("parsererror"),"string"==typeof(e=a&&a.dataFilter?a.dataFilter(e,t):e)&&("json"===t||!t&&0<=r.indexOf("json")?e=u(e):("script"===t||!t&&0<=r.indexOf("javascript"))&&F.globalEval(e)),e};return x}if(!this.length)return O("ajaxSubmit: skipping submit process - no element selected"),this;var E,L=this;"function"==typeof A&&(A={success:A}),E=this.attr("method"),r=(r=(r="string"==typeof(a=this.attr("action"))?F.trim(a):"")||window.location.href||"")&&(r.match(/^([^#]+)/)||[])[1],A=F.extend(!0,{url:r,success:F.ajaxSettings.success,type:E||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},A);var a={};if(this.trigger("form-pre-serialize",[this,A,a]),a.veto)return O("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(A.beforeSerialize&&!1===A.beforeSerialize(this,A))return O("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var r=A.traditional;void 0===r&&(r=F.ajaxSettings.traditional);var M=[],n=this.formToArray(A.semantic,M);if(A.data&&(A.extraData=A.data,u=F.param(A.data,r)),A.beforeSubmit&&!1===A.beforeSubmit(n,this,A))return O("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[n,this,A,a]),a.veto)return O("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;a=F.param(n,r);u&&(a=a?a+"&"+u:u),"GET"==A.type.toUpperCase()?(A.url+=(0<=A.url.indexOf("?")?"&":"?")+a,A.data=null):A.data=a;var i,o=[];A.resetForm&&o.push(function(){L.resetForm()}),A.clearForm&&o.push(function(){L.clearForm(A.includeHidden)}),!A.dataType&&A.target?(i=A.success||function(){},o.push(function(e){var t=A.replaceTarget?"replaceWith":"html";F(A.target)[t](e).each(i,arguments)})):A.success&&o.push(A.success),A.success=function(e,t,a){for(var r=A.context||this,n=0,i=o.length;n<i;n++)o[n].apply(r,[e,t,a||L,L])};var s,r=0<F('input[type=file]:enabled[value!=""]',this).length,u="multipart/form-data",a=L.attr("enctype")==u||L.attr("encoding")==u,u=h.fileapi&&h.formdata;O("fileAPI :"+u),!1!==A.iframe&&(A.iframe||(r||a)&&!u)?A.closeKeepAlive?F.get(A.closeKeepAlive,function(){s=t(n)}):s=t(n):s=(r||a)&&u?e(n):F.ajax(A),L.removeData("jqxhr").data("jqxhr",s);for(var l=0;l<M.length;l++)M[l]=null;return this.trigger("form-submit-notify",[this,A]),this},F.fn.ajaxForm=function(e){if((e=e||{}).delegation=e.delegation&&F.isFunction(F.fn.on),e.delegation||0!==this.length)return e.delegation?(F(document).off("submit.form-plugin",this.selector,a).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,e,a).on("click.form-plugin",this.selector,e,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,a).bind("click.form-plugin",e,r);var t={s:this.selector,c:this.context};return!F.isReady&&t.s?(O("DOM not ready, queuing ajaxForm"),F(function(){F(t.s,t.c).ajaxForm(e)})):O("terminating; zero elements found by selector"+(F.isReady?"":" (DOM not ready)")),this},F.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},F.fn.formToArray=function(e,t){var a=[];if(0===this.length)return a;var r,n,i,o,s,u,l,c,f,m=this[0],d=e?m.getElementsByTagName("*"):m.elements;if(!d)return a;for(r=0,s=d.length;r<s;r++)if(f=(o=d[r]).name)if(e&&m.clk&&"image"==o.type)o.disabled||m.clk!=o||(a.push({name:f,value:F(o).val(),type:o.type}),a.push({name:f+".x",value:m.clk_x},{name:f+".y",value:m.clk_y}));else if((i=F.fieldValue(o,!0))&&i.constructor==Array)for(t&&t.push(o),n=0,u=i.length;n<u;n++)a.push({name:f,value:i[n]});else if(h.fileapi&&"file"==o.type&&!o.disabled){t&&t.push(o);var p=o.files;if(p.length)for(n=0;n<p.length;n++)a.push({name:f,value:p[n],type:o.type});else a.push({name:f,value:"",type:o.type})}else null!=i&&(t&&t.push(o),a.push({name:f,value:i,type:o.type,required:o.required}));return e||!m.clk||(f=(c=(l=F(m.clk))[0]).name)&&!c.disabled&&"image"==c.type&&(a.push({name:f,value:l.val()}),a.push({name:f+".x",value:m.clk_x},{name:f+".y",value:m.clk_y})),a},F.fn.formSerialize=function(e){return F.param(this.formToArray(e))},F.fn.fieldSerialize=function(n){var i=[];return this.each(function(){var e=this.name;if(e){var t=F.fieldValue(this,n);if(t&&t.constructor==Array)for(var a=0,r=t.length;a<r;a++)i.push({name:e,value:t[a]});else null!=t&&i.push({name:this.name,value:t})}}),F.param(i)},F.fn.fieldValue=function(e){for(var t=[],a=0,r=this.length;a<r;a++){var n=this[a],n=F.fieldValue(n,e);null==n||n.constructor==Array&&!n.length||(n.constructor==Array?F.merge(t,n):t.push(n))}return t},F.fieldValue=function(e,t){var a=e.name,r=e.type,n=e.tagName.toLowerCase();if((t=void 0===t?!0:t)&&(!a||e.disabled||"reset"==r||"button"==r||("checkbox"==r||"radio"==r)&&!e.checked||("submit"==r||"image"==r)&&e.form&&e.form.clk!=e||"select"==n&&-1==e.selectedIndex))return null;if("select"!=n)return F(e).val();n=e.selectedIndex;if(n<0)return null;for(var i=[],o=e.options,s="select-one"==r,u=s?n+1:o.length,l=s?n:0;l<u;l++){var c=o[l];if(c.selected){var f=(f=c.value)||(c.attributes&&c.attributes.value&&!c.attributes.value.specified?c.text:c.value);if(s)return f;i.push(f)}}return i},F.fn.clearForm=function(e){return this.each(function(){F("input,select,textarea",this).clearFields(e)})},F.fn.clearFields=F.fn.clearInputs=function(a){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();r.test(e)||"textarea"==t?this.value="":"checkbox"==e||"radio"==e?this.checked=!1:"select"==t?this.selectedIndex=-1:"file"==e?/MSIE/.test(navigator.userAgent)?F(this).replaceWith(F(this).clone()):F(this).val(""):a&&(!0===a&&/hidden/.test(e)||"string"==typeof a&&F(this).is(a))&&(this.value="")})},F.fn.resetForm=function(){return this.each(function(){"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset()})},F.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},F.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var e=this.type;"checkbox"==e||"radio"==e?this.checked=t:"option"==this.tagName.toLowerCase()&&(e=F(this).parent("select"),t&&e[0]&&"select-one"==e[0].type&&e.find("option").selected(!1),this.selected=t)})},F.fn.ajaxSubmit.debug=!1}(jQuery);

window.hzmr.push("jquery.form.min:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.form.min.js  **************/
/************* Start spacePreview.js for locale en-US **************/
try {HZ.ns("HZ.modules"),HZ.modules.SpacePreview=new function(){var u=new RegExp("https?://(?:www\\.)?(?:mytest|houzztest|houzz2?|stghouzz)\\.[A-Za-z\\./]*/("+HZ.utils.Config.spaceCommand+"|"+HZ.utils.Config.photoCommand+"|"+HZ.utils.Config.productCommand+"|"+HZ.utils.Config.galleryCommand+"|projects)/(\\d+)(?=(?:\\D|$))[/\\?=&\\+%\\w-#]*","g");this.init=function(e){var t,a;void 0!==e&&e.length&&((t=e.parents(".bubble--post").length?$('<div class="generatedPhotoCtn clearfix"></div>').insertAfter(e.parents(".bubble--post")):$('<div class="generatedPhotoCtn clearfix"></div>').insertAfter(e)).data("urlToId",{}),e.data("preview",{analyzing:!1}),""!==e.val()&&i(e,t),a=function(){var a=$(this).data("preview");!(!a||!a.analyzing)&&a.analyzing||i(e,t)},e.bind("keyup.linkConverter",$.debounce(700,a)).bind("change.linkConverter",a).bind("paste.linkConverter",function(){setTimeout(a,0)}).bind("reset",a),t.on("click",".removeThumb",function(a){n($(this),e,t)}))};var i=function(a,e){var t=[],i=[],n=[],d=a.data("preview");d&&(d.analyzing=!0),a.data("preview",d);for(var o,d=a.val(),r=e.data("urlToId"),s=(t=null===(t=d.match(u))?[]:t).length,l=0;l<s;l++)void 0===r[o=t[l]]&&i.push(o);for(o in r)r.hasOwnProperty(o)&&-1===$.inArray(o,t)&&n.push(o);n.length&&c(e,n),i.length?h(t,a,e):a.data("preview",{analyzing:!1})},h=function(a,i,n){var d,o,r,s=0,a=a.join(" "),l=$("#questionsGuidelines");a?HZ.ajaz.Services.getMinimalSpaceData(a,function(a){var e,t;a&&"true"===a.success&&a.spaces&&a.images&&(e=HZ.data.Spaces.getCollection(),t=HZ.data.Images.getCollection(),$.extend(!0,e,a.spaces),$.extend(!0,t,a.images),HZ.data.Spaces.addAll(e),HZ.data.Images.addAll(t),function(a){var e,t,i="";for(e in a)a.hasOwnProperty(e)&&(d=a[e],(o=HZ.data.Spaces.get(d))&&o.iids&&o.iids[0]&&(r=o.iids[0],o=HZ.data.Images.get(r),s=(s=o?o.ts:s)||"0000",t=HZ.utils.Links.getStaticImageUrlHost()+r+"_5-"+s+"/home-design.jpg",i+='<div class="houseThumbnail" data-id="'+d+'"><img width="75px" height="55px" src="'+t+'"/><a href="javascript:;" class="removeThumb"></a></div>'));i?n.html(i).show():n.html("").hide(),i&&0<l.length&&l.hide()}(a.urlToId),n.data("urlToId",a.urlToId)),i.data("preview",{analyzing:!1})}):i.data("preview",{analyzing:!1})},c=function(a,e){for(var t=a.data("urlToId"),i=e.length,n=0;n<i;n++){var d=e[n],o=t[d];a.find("[data-id="+o+"]").remove(),delete t[d]}""==a.html()&&a.hide(),a.data("urlToId",t)},n=function(a,e,t){var i,n,d=t.data("urlToId"),o=a.closest(".houseThumbnail"),r=o.attr("data-id");for(n in d)d.hasOwnProperty(n)&&d[n]===r&&(o.hide().remove(),i=e.val().replace(n,""),e.val(i),delete d[n]);""==t.html()&&t.hide(),t.data("urlToId",d)}};

window.hzmr.push("spacePreview:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End spacePreview.js  **************/
/************* Start zoomable.js for locale en-US **************/
try {HZ.ns("HZ.modules.Zoomable"),HZ.modules.Zoomable=new function(){var e,t;this.init=function(){$("body").off("click.photoViewer",".js-enlarge").on("click.photoViewer",".js-enlarge",e)},e=function(e){void 0===t&&(t=new HZ.dialogs.PhotoViewer).prepare(),t.showImage(this),e.preventDefault()}},HZ.ns("HZ.dialogs.PhotoViewer"),HZ.dialogs.PhotoViewer=function(){var $body,$imgThumbDiv,shouldShowImgInfo,imageObj,zoomCallback,zoomIndex,imageArr,imgNatureWidth,imgNatureHeight;HZ.dialogs.PhotoViewer.superclass.constructor.call(this);var DIALOG_FRAME_PADDING=15,IMAGE_INFO_DIV_HEIGHT=30,PHOTO_VIEWER_MARGIN=.025,IMAGE_DIV_MIN_HEIGHT=190;this.prepare=function(){var i,e;$body=$('<div id="photoViewer"><div class="hzLoadingDlgThrobber"></div><div class="photo-viewer__img-thumb text-center"></div><div class="photo-viewer__img-info text-l text-right hidden"></div><div id="photoViewerClose"><a id="photoViewerCloseBtn" href="javascript:;"><i class="hzi-font hzi-CloseX"></i></a></div><div id="imgAlt"></div></div>'),$imgThumbDiv=$body.find(".photo-viewer__img-thumb"),e={title:"",body:$body,controls:[],hideDialogOnBgClick:!0,dialogClassName:"dialogFrame-equalPadding dialogFrame-bodyOnly",onViewUnloaded:onViewUnloaded},(i=this).init(e),this.getView().find("#photoViewerCloseBtn").unbind("click.photoViewer").bind("click.photoViewer",function(){i.getDelegate().hide(i)}),this.getView().find(".photo-viewer__img-thumb").unbind("click.photoViewer").bind("click.photoViewer",function(){i.getDelegate().hide(i)}),this.getView().find("#imgAlt").bind("click",function(e){var t=$(e.target),e=t.attr("data-index"),e=$(imageArr[e]).attr("data-zoomsrc");i.showImage(imageObj,e),t.parent().find(".selected").removeClass("selected").end(),t.addClass("selected")})},this.showImage=function(e,t){var i,o,a=this,r=t||getSrc(e),n=$(e).attr("data-pin-no-hover"),d=$(e).attr("onmousedown"),s=$(e).attr("ondragstart"),l=$(e).attr("onselectstart"),t=$(e).attr("oncontextmenu");if(r&&(shouldShowImgInfo=!1,(e=$(e).parent()).is("a")&&(i=e.attr("href"))&&/^(https?|ftp):\/\/[^\s\/$.?#].[^\s]*$/.test(i)&&(shouldShowImgInfo=!0,o=/(houzz|gardenweb)/i.test(i)),window.lightbox&&window.lightbox.isShowing()?window.lightbox.showDialog(this):HZ.ui.Yamdi.show(this),showThrobber(),(imageObj=new Image).onload=function(){hideThrobber(),imgNatureWidth=imageObj.width,imgNatureHeight=imageObj.height,$imgThumbDiv.empty().append(imageObj),shouldShowImgInfo&&$body.find(".photo-viewer__img-info").empty().append('<a href="'+i+'" class="colorLink one-line" target="_blank">'+(o?_hgt("Visit Page")+'<span class="more-icon"></span>':i)+"</a>").removeClass("hidden"),a.handleResize(),$(window).on("resize.photoViewer",$.throttle(250,$.proxy(a.handleResize,a)))},imageObj.src=r,void 0!==n&&imageObj.setAttribute("data-pin-no-hover",n),void 0!==d&&imageObj.setAttribute("onmousedown",d),void 0!==s&&imageObj.setAttribute("ondragstart",s),void 0!==l&&imageObj.setAttribute("onselectstart",l),void 0!==t&&imageObj.setAttribute("oncontextmenu","event.preventDefault();return false;"),!$body.closest(".modal").hasClass("altZoom")&&imageArr&&imageArr.length)){if(1<imageArr.length){for(var h="",m=0;m<imageArr.length;m++)h+="<img class='"+(m==zoomIndex?"selected":"")+"' data-index='"+m+"' src='"+$(imageArr[m]).attr("src")+"' />";$body.find("#imgAlt").append(h),a.handleResize()}$body.closest(".modal").addClass("altZoom")}};var showThrobber=function(){$body.find(".hzLoadingDlgThrobber").removeClass("hidden")},hideThrobber=function(){$body.find(".hzLoadingDlgThrobber").addClass("hidden")},getSrc=function(e){var t=$(e),i=t.attr("src");return!1===t.hasClass("img-external")&&(e=/_[0-9]{1,2}((?:-(?:\S)+)?.jpg)/,t.attr("data-callback")&&(zoomCallback=t.attr("data-callback")),t.attr("data-zoomindex")?(zoomIndex=t.attr("data-zoomindex"),imageArr=t.siblings(),i=$(imageArr[zoomIndex]).attr("data-zoomsrc")):t.data("imgurl")?(i=t.data("imgurl"),t.data("alt-target")&&(imageArr=$(t.data("alt-target")))):i=e.test(i)?i.replace(e,"_9$1"):i.replace(/-w(\d+)-h(\d+)-/,function(e,t,i){var o=630,a=parseInt(t,10),t=parseInt(i,10),i=a/t;return Math.max(a,t)==a?(a=o,t=parseInt(o/i,10)):(t=o,a=parseInt(o*i,10)),"-w"+a+"-h"+t+"-"})),i},onViewUnloaded=function(){imageObj=null,imgNatureWidth=null,imgNatureHeight=null,$imgThumbDiv.empty().css({width:"auto",height:"auto"}),$body.find(".photo-viewer__img-info").empty().addClass("hidden"),$body.find("#imgAlt").empty(),$body.closest(".modal").removeClass("altZoom"),$(window).off("resize.photoViewer"),zoomCallback&&eval(zoomCallback)(),$(".hbs .modal-dialog").css({"margin-top":"","margin-bottom":"",width:""})};this.handleResize=function(){var e,t,i,o,a;void 0!==imageObj&&(a=UIHelper.getScreenBounds(),e=Math.floor(a.w*(1-2*PHOTO_VIEWER_MARGIN)-2*DIALOG_FRAME_PADDING-2),t=Math.floor(a.h*(1-2*PHOTO_VIEWER_MARGIN)-2*DIALOG_FRAME_PADDING-2),shouldShowImgInfo&&(t-=IMAGE_INFO_DIV_HEIGHT),i=imgNatureWidth/imgNatureHeight,o=Math.min(e,imgNatureWidth),t<(a=Math.floor(o/i))&&(a=Math.min(t,imgNatureHeight),o=Math.floor(a*i)),UIHelper.setBounds(imageObj,{x:"auto",y:"auto",w:o,h:a}),UIHelper.setBounds($imgThumbDiv[0],{x:"auto",y:"auto",w:Math.max(o,Math.min(e,Math.floor(i*IMAGE_DIV_MIN_HEIGHT))),h:Math.max(a,IMAGE_DIV_MIN_HEIGHT)}),$(imageObj).css({position:"relative",top:a<IMAGE_DIV_MIN_HEIGHT?"50%":0,"margin-top":a<IMAGE_DIV_MIN_HEIGHT?-Math.floor(a/2):0}),HZ.ui.Yamdi.center(),$(".hbs .modal-dialog").css({"margin-top":"0","margin-bottom":"0",width:Math.max(o,Math.min(e,Math.floor(i*IMAGE_DIV_MIN_HEIGHT)))+30}))}},HZ.extend(HZ.dialogs.PhotoViewer,HZ.ui.yamdi.Dialog),$(document).ready(function(){HZ.modules.Zoomable.init()});

window.hzmr.push("zoomable:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End zoomable.js  **************/
/************* Start globalComments.js for locale en-US **************/
try {HZ.ns("HZ.globalComments"),HZ.globalComments=new function(){var s,t,m,a,o,l,i,g,c,r,u,h,d,f,C;function p(){var e=0;return 1==i.length&&"all"==i[0]&&(i=b()),$.each(m,function(n,t){-1==$.inArray(n,i)&&"all"!=n&&(e+=t)}),e}function b(){return $.map(m,function(n,t){if("all"!=t)return t})}function v(){var n=C.getComments(),t=$.map(n,function(n,t){var e=$(n),n=e.data("hz").lang;if(-1!=$.inArray(n,i)&&n!=g&&e.hasClass("showing-original"))return e.data("hz").id});if(t.length){for(var e=[],o=0;o<t.length;o++){var a=s.find(".comment[data-hz*="+t[o]+"]").find(".gc-translateCommentButton"),l=a.find(".dialogThrobber");l.length||(a.html(HZ.ui.AjaxThrobber.getThrobber()+_hgt("See Translation")),l=a.find(".dialogThrobber")),l.show(),e.push(l)}u.getTranslations(t,function(n){for(var t=0;t<e.length;t++)e[t].hide();C.renderTranslations(n),h.toggleButton(C.getComments())})}else{n=$.map(n,function(n,t){n=$(n);if(!n.hasClass("showing-original"))return n.data("hz").id});C.renderOriginals(n),h.toggleButton(C.getComments())}}function L(n){for(var t=0,e=0,o=0;o<i.length;o++){var a=i[o],l=n[a];t+=l?l.length:0,e+=m[a]}f.setEnabled(t==e)}function I(){var a,d,f={},r={},o=[];function l(n){if(n.length!=o.length)return n;for(var t=0;t<n.length;t++){var e=n[t];if(-1==$.inArray(e,o))return n}return["all"]}this.init=function(n){return a=(n=n||{}).galleryId,d=n.defaultSiteLanguage,f=$.extend(f,n.commentIdsToComments||{}),r=$.extend(r,n.languagesToCommentIds||{}),o=n.enabledLanguages||[],this},this.getLastCommentIdByLanguage=function(n){var n=r[n],n=n?(n.sort(function(n,t){return n-t}),n[n.length-1]):null;return n},this.getLanguagesToCommentIds=function(){return r},this.getCommentIdsByLanguages=function(n,t,s){for(var i=[],g=[],c=this,e=0;e<n.length;e++){var o=n[e];!r[o]||r[o].length<m[o]?i.push(o):g=g.concat(r[o])}i=l(i),n=l(n),i.length?(HZ.ui.Utils.throbbing(!0),HZ.ajaz.Services.getGlobalCommentsHtml(a,i,n,t,function(n){if(HZ.ui.Utils.throbbing(!1),"true"==n.success){var t=n.comments,n=$($("<div>").html(t).text()),e=[],o=[];n.each(function(n,t){t=$(t).data("hz");e.push(t.id),o.push({commentId:t.id,translation:null,language:t.lang})}),c.setComments(o);for(var a=0;a<i.length;a++){var l=i[a];r.hasOwnProperty(l)||(r[l]=[])}s(g.concat(e),t)}})):(HZ.ajaz.Services.getGlobalCommentsHtml(a,[],n,t,function(){}),s(g))},this.getTranslations=function(n,t){for(var a={},e=[],l=this,o=0;o<n.length;o++){var s=n[o],i=f[s]?f[s].translation:null;(f[s]?f[s].language:null)!=d&&(i?a[s]=i:e.push(s))}if(e.length)for(var g=Math.ceil(e.length/50),c=0,r={},m=[],u=0;u<g;u++){var h=e.slice(50*u,50*u+50);HZ.ajaz.Services.getTranslatedComments(h,function(n){var e,o;"true"==n.success&&(e=n.comments,o=[],$.each(e,function(n,t){o.push({commentId:n,translation:e[n],language:void 0})}),m=m.concat(o),r=$.extend(r,e),++c==g&&(l.setComments(m),t($.extend({},a,r))))})}else t(a)},this.setComments=function(n){for(var t=0;t<n.length;t++){var e,o=n[t];o&&o.commentId&&(f[o.commentId]=$.extend(f[o.commentId]||{},o),(o=f[o.commentId]).language||(o.language="other"),(e=r[o.language])?-1==$.inArray(o.commentId,e)&&r[o.language].push(o.commentId):r[o.language]=[o.commentId])}},this.removeComments=function(n){for(var t=0;t<n.length;t++){var e,o=n[t];o&&o.commentId&&(f[o.commentId]&&delete f[o.commentId],(e=o.language)&&(o=r[e].indexOf(o.commentId),r[e].splice(o,1)))}}}function S(){var l,o,a,s=[],i=[],g=[],c=[],r=this;this.init=function(n){a=(n=n||{}).onChange||function(){},i=n.enabledLanguages||[],l=$(n.container)||null,o=l.find(".gc-langSelect-select").comboSelect({promoSelection:!1,hasSearch:!1,clearSelectionsOnOpen:!1});var t=l.find(".hzp-comboselect-option.hzp-comboselect-option-selected"),t=$.map(t,function(n,t){return $(n).data("value")});return g=-1!=$.inArray("all",t)?t.concat("all"):t,l.find(".hzp-comboselect-option").each(function(n,t){t=$(t).contents();$.each(t,function(n,t){$(t).hasClass("hzp-comboselect-option-check")?$(t).wrap('<span class="gc-langSelect-checkbox">'):t.nodeType==Node.TEXT_NODE&&$(t).wrap('<span class="gc-langSelect-optionLabel">')})}),c=t,this.setSelectedLanguages(t),$('<div class="gc-langSelect-applyWrapper"><input type="button" class="hzBtn secondary button gc-langSelect-applyButton" value="'+_hgt("Apply")+'"></div>').insertAfter(l.find(".hzp-comboselect-select")),l.on("combo-select-change",".hzp-comboselect",function(n,t){!function(n,t){var e=function(n){for(var t=[],e=0;e<n.length;e++)t.push(n[e].value);return t}(n),o=$(t).data("value");$(t).hasClass("hzp-comboselect-option-selected")||("all"==o?e=["other"]:-1<(n=$.inArray("all",e))&&e.splice(n,1));(function(n,t,e){$(t).hasClass("hzp-comboselect-option-selected")||(g="all"==n||-1!=$.inArray("all",e)?i.concat("all"):[n])})(o,t,e),r.setSelectedLanguages(e)}(t.value,t.node[0])}).on("combo-select-opened",".hzp-comboselect",function(n,t){r.setSelectedLanguages(c)}).on("combo-select-closed",".hzp-comboselect",function(n,t){r.setSelectedLanguages(c)}),l.find(".gc-langSelect-applyButton").on("click",function(){var n=[];o.data("comboSelect").getSelected().each(function(){n.push({value:$(this).data("value"),node:$(this)})});var t=$.map(n,function(n,t){return n.value});t.length||(t=g),c=t,r.setSelectedLanguages(t);var e=$.inArray("all",t);-1<e&&t.splice(e,1),a({languages:t}),l.find(".hzp-comboselect-combo").hide()}),n.onInit&&n.onInit.apply(this),this},this.setLastSavedLanguages=function(n){c=n},this.setTotalComments=function(n){n?l.show():l.hide()},this.setSelectedLanguages=function(n){n=function(n){(-1!=$.inArray("all",n)||n.length==i.length)&&(n=i.concat("all"));return n}(n),s=n,function(){var n,t=l.find(".hzp-comboselect-select");t.find(".hzp-comboselect-option").removeClass("hzp-comboselect-option-selected");for(var e=0;e<s.length;e++)n=s[e],t.find(".hzp-comboselect-option[data-value="+n+"]").addClass("hzp-comboselect-option-selected");!function(){var n=l.find(".hzp-comboselect-trigger-button"),t=s.length;{var e,o;t=0==t?_hgt("Select an option"):-1!=$.inArray("all",s)?_hgt("Showing All Languages"):1==t?"other"==(e=s[0])?_hgt("Showing Other Languages"):(o="",l.find("li[data-value="+e+"]").contents().each(function(n,t){t.nodeType==Node.TEXT_NODE&&(o=t.nodeValue)}),o=l.find("li[data-value="+e+"]").find(".gc-langSelect-optionLabel").text(),_hgt("Showing {language} Only",{language:o})):_hgt("Showing {number} Languages",{number:t})}n.text(t)}()}()},this.renderCommentCounts=function(a){l.find(".hzp-comboselect-option").each(function(n,t){var e=$(t),o=e.find(".gc-langSelect-commentsCount"),t=a[e.data("value")],t=t||"-";o.length?o.text(t):e.append('<span class="gc-langSelect-commentsCount">'+t+"</span>")})},this.setEnabledLanguages=function(n){i=n}}function T(){var t,a,e,l;this.init=function(n){return e=(n=n||{}).onClick||function(){},l=n.defaultSiteLanguage||null,t=$(n.container)||null,a&&a.length||(a=t.find(".gc-toggleTranslations-button")).length||(a=$('<span class=".gc-toggleTranslations-button colorLink"></span>').appendTo(t)),t.on("click",function(){e()}),n.onInit&&n.onInit(),this},this.setLanguages=function(n){!n.length||1==n.length&&n[0]==l?t.hide():t.show()},this.toggleButton=function(n){var e,o;(n=n.filter(":visible")).length?(o=e=!1,n.each(function(n,t){t=$(t);t.data("hz").lang!=l&&(o=!0,t.hasClass("showing-original")&&(e=!0))}),t.toggle(o),n=e?_hgt("Translate All"):_hgt("See Original Language"),a.text(n)):t.hide()}}function w(){var e,o,t,a;this.init=function(n){return t=n.onSelectAllLanguages||function(){},function(){e&&e.length||(e=$('<div class="gc-selectAllLanguages gc-top"><span class="gc-selectAllLanguages-button colorLink"></span></div>').insertBefore(s.find(".commentsContainer")).hide());o&&o.length||(o=$('<div class="gc-selectAllLanguages gc-bottom"><span class="gc-selectAllLanguages-button colorLink"></span></div>').insertAfter(s.find(".commentsContainer")).hide())}(),e.find(".gc-selectAllLanguages-button").on("click",function(){t(e),e.hide(),o.hide()}),o.find(".gc-selectAllLanguages-button").on("click",function(){t(o),e.hide(),o.hide()}),n.onInit&&n.onInit(),this},this.setEnabled=function(n){a=n},this.setNumOtherComments=function(n,t){r&&a&&n?(n=_hgtp("","Show 1 more comment from around the world","Show {number} other comments from around the world",n,{number:n}),e.find(".gc-selectAllLanguages-button").text(n),o.find(".gc-selectAllLanguages-button").text(n),e.show(),o.toggle(5<=t)):(e.hide(),o.hide())}}function z(){var a,t,e,l;function s(n,t){var e=$(n),o=e.find(".commentBodyText"),a=e.find(".gc-translatedComment"),l=e.find(".gc-translateCommentButton"),n=e.find(".gc-showOriginalComment");o.toggle(!t),l.toggle(!t),a.toggle(t),n.toggle(t),e.toggleClass("showing-translation",t),e.toggleClass("showing-original",!t)}this.init=function(n){return t=(n=n||{}).onTranslateComment||function(){},e=n.onShowOriginalComment||function(){},l=n.allLanguages||{},(a=$(n.container)||null).on("click",".gc-translateCommentButton",function(){var n=$(this).closest(".comment").data("hz").id;t(n)}).on("click",".gc-showOriginalCommentButton",function(){s($(this).closest(".comment"),!1),e()}),n.onInit&&n.onInit(),this},this.getComments=function(){return a.find(".comment")},this.getVisibleCommentIds=function(){var e=[];return a.find(".comment:visible").each(function(n,t){e.push($(t).data("hz").id)}),e},this.renderOriginals=function(n){for(var t=0;t<n.length;t++)this.renderOriginal(n[t])},this.renderOriginal=function(n){n=a.find(".comment[data-hz*="+n+"]");n.length&&s(n,!1)},this.renderTranslations=function(n){var e=this;$.each(n,function(n,t){e.renderTranslation(n,t)})},this.renderTranslation=function(n,t){var e,o=a.find(".comment[data-hz*="+n+"]");o.length&&(e=o.data("hz").lang,n=l[e].text,"it"!=g&&"es"!=g||(n=n.toLowerCase()),n="other"==e?_hgt("Translated from Other by Bing"):_hgt("Translated from {language} by Bing",{language:n}),o.find(".gc-translatedComment").html(t),o.find(".gc-showOriginalCommentLabel").text(n),s(o,!0))},this.appendComments=function(n){n=$($("<div>").html(n).text());$.each(n,function(n,t){t=$(t).data("hz").id,t=a.find(".comment[data-hz*="+t+"]");t.length&&t.remove()}),a.append(n)},this.sortComments=function(){var n=a.children().detach();n.sort(function(n,t){return-(new Date($(t).find(".comment-date time").attr("datetime"))-new Date($(n).find(".comment-date time").attr("datetime")))}),a.append(n)},this.showComments=function(n){a.children().hide();for(var t=0;t<n.length;t++)a.children("[data-hz*="+n[t]+"]").show()}}this.init=function(n){var e;e=(e=n)||{},s=$(e.container)||null,t=e.galleryId||null,m=e.languageCountMap||{},a=e.allLanguages||{},l=e.commentIdsToComments||{},o=$.each(e.languagesToCommentIds||{},function(n,t){e.languagesToCommentIds[n]=t.map(function(n){return parseInt(n)})}),i=e.selectedLanguages||[],g=e.defaultSiteLanguage||[],r=1==e.globalCommentsEnabled,c=e.onSelectLanguages||function(){},u=new I,C=new z,h=new T,d=new S,f=new w,function(){var e={};{var o;$.each(a,function(n,t){m[n]?e[n]=m[n]:e[n]=0}),(m=e).all||(o=0,$.each(m,function(n,t){t=parseInt(t),m[n]=t,o+=t}),m.all=o)}}(),L(o),u.init({galleryId:t,commentIdsToComments:l,languagesToCommentIds:o,defaultSiteLanguage:g,enabledLanguages:b()}),d.init({container:s.find(".gc-langSelect"),enabledLanguages:b(),onInit:function(){d.setTotalComments(m.all),d.renderCommentCounts(m)},onChange:function(n){(i=1==(i=n.languages).length&&"all"==i[0]?b():i).length?u.getCommentIdsByLanguages(i,"dropdown",function(n,t){t&&(C.appendComments(t),C.sortComments()),C.showComments(n),h.setLanguages(i),h.toggleButton(C.getComments()),L(u.getLanguagesToCommentIds()),f.setNumOtherComments(p(),C.getVisibleCommentIds().length),c&&c(i)}):(C.showComments([]),h.toggleButton(C.getComments()),h.setLanguages(i),f.setNumOtherComments(p(),C.getVisibleCommentIds().length))}}),C.init({container:s.find(".commentsContainer")[0],allLanguages:a,onInit:function(){},onTranslateComment:function(n){var t=s.find(".comment[data-hz*="+n+"]").find(".gc-translateCommentButton"),e=t.find(".dialogThrobber");e.length||(t.html(HZ.ui.AjaxThrobber.getThrobber()+_hgt("See Translation")),e=t.find(".dialogThrobber")),e.show(),u.getTranslations([n],function(n){e.hide(),C.renderTranslations(n),h.toggleButton(C.getComments())})},onShowOriginalComment:function(){h.toggleButton(C.getComments())}}),f.init({onInit:function(){f.setNumOtherComments(p(),C.getVisibleCommentIds().length)},onSelectAllLanguages:function(n){var t;i=b(),n.hasClass("gc-top")?t="button-bar-top":n.hasClass("gc-bottom")&&(t="button-bar-bottom"),u.getCommentIdsByLanguages(i,t,function(n,t){t&&(C.appendComments(t),C.sortComments()),C.showComments(n),h.toggleButton(C.getComments()),f.setNumOtherComments(p(),C.getVisibleCommentIds().length),c&&c(i)}),d.setLastSavedLanguages(i),d.setSelectedLanguages(i),h.setLanguages(i)}}),h.init({container:s.find(".gc-toggleTranslations")[0],defaultSiteLanguage:g,onInit:function(){h.setLanguages(i),h.toggleButton(C.getComments())},onClick:function(){var n=s.find(".seeMoreComments:visible"),t=HZ.feedComments.getFeedCommentsWidget(s.find(".feedComments"));n.length&&t&&!t.cachedCommentsExist()?(n.on("gc-showMoreComments",function(){v()}),t.getComments()):v()}})},this.enableSelectAllLanguagesView=function(){for(var n=0,t=0,e=u.getLanguagesToCommentIds(),o=0;o<i.length;o++){var a=i[o],l=e[a];n+=l?l.length:0,t+=m[a]}f.setEnabled(n==t),f.setNumOtherComments(p(),C.getVisibleCommentIds().length)},this.setComments=function(n,t){t&&function(n){for(var t=0;t<n.length;t++){var e=n[t];l[e.commentId]||(e=n[t].language||"other",m[e]?m[e]++:m[e]=1,m.all?m.all++:m.all=1)}}(n),d.setEnabledLanguages(b()),d.setTotalComments(m.all),d.renderCommentCounts(m),u.setComments(n)},this.toggleTranslateAllButton=function(){h.toggleButton(C.getComments())},this.getSelectedLanguages=function(){return i},this.getLastCommentIdByLanguage=function(n){return u.getLastCommentIdByLanguage(n)},this.removeComments=function(n){for(var t=0;t<n.length;t++){var e=n[t];m[e.language]--,m.all--}d.setEnabledLanguages(b()),d.setTotalComments(m.all),d.renderCommentCounts(m),u.removeComments(n)}};

window.hzmr.push("globalComments:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End globalComments.js  **************/
/************* Start like.js for locale en-US **************/
try {HZ.ns("HZ.like"),HZ.like.LikeDialog=function(){HZ.like.LikeDialog.superclass.constructor.call(this);var t,i=this;this.prepare=function(){var e=$('<div id="hzlikeListContainer"><ul></ul></div>');t=e.find("ul");e={title:_hgt("People who like this"),body:e,onViewLoaded:n};i.init(e)},this.appendToLikeList=function(e){t.append(e)};var n=function(){t.empty()}},HZ.extend(HZ.like.LikeDialog,HZ.ui.yamdi.Dialog),HZ.like.Like=new function(){function c(e){switch(parseInt(e,10)){case m.typeQuestion:return _hgt("Like this discussion");case m.typeIbk:return _hgt("Like this ideabook");case m.typeAnswer:case m.typeComment:return _hgt("Like this comment");case m.typeReview:return _hgt("Like this review");case m.typeVendorListing:return _hgt("Like this product");default:return _hgt("Like this item")}}function d(e){return parseInt(e,10)!==m.typeVendorListing?_hgt("Reject this item"):_hgt("Reject this product")}var C,m,h=this,t={typeQuestion:5,typeIbk:1,typeAnswer:6,typeComment:9,typeReview:20,typeVendorListing:93,isCobrand:!1,likeAction:"like",unlikeAction:"unlike",dislikeAction:"dislike",unDislikeAction:"undislike",showlikeAction:"showlikes",likeButtonLabel:_hgt("Like"),likeButtonIngLabel:_hgt("Liked"),dislikeButtonLabel:_hgt("Reject"),dislikeButtonIngLabel:_hgt("Rejected"),likeIconClass:"icon-thumb_outline",unlikeIconClass:"icon-close",likeIconIngClass:"icon-thumb_solid button-icon-liked",buttonLikeClassSelector:".button-like",buttonDisLikeClassSelector:".button-dislike"};function i(e,t){var d=$(t),h=d.attr("data-object-type"),p=d.attr("data-object-id"),L=d.attr("data-action-only"),b=!1;h&&p||(t=d.parents(".hzBtn"),h=t.attr("loty"),p=t.attr("loid"),b="true"===t.attr("lncb"));parseInt(d.attr("data-self"),10);e==m.showlikeAction&&HZ.ui.Yamdi.show(C);var f=e;e==m.unDislikeAction&&(e=m.dislikeAction),HZ.ajaz.Like.like(e,p,h,function(e){var t=d.parents(".likeContainer");if(e&&"true"==e.success){var i=e.numberOfLikes,n=t.find(".hz-showlike"),s="",l=e.userList;if(f==m.likeAction)d.addClass("unlike").removeClass("like").attr("title",_hgt("Unlike")).find(".hz-likeAction").remove(),d.find(".hz-like").attr("aria-label",_hgt("Unlike this comment")),d.find(".hz-like").addClass("hz-liked icon-thumb_solid").removeClass("hz-like icon-thumb_outline"),"0"!==L||b||(s=_hgtp("You like this.","You and 1 other person like this.","You and {countOfOtherLikes} people like this.",i-1,{countOfOtherLikes:i-1}),0==n.length&&(n=$('<a class="hz-showlike" data-object-type="'+h+'" data-object-id="'+p+'" title="'+s+'" href="#"></a>'),t.append(n)),n.html(_hgtp("","1 Like","{numOfLikes} Likes",i,{numOfLikes:i})));else if(f==m.unlikeAction)d.addClass("like").removeClass("unlike").attr("title",_hgt("Like")),d.find(".hz-liked").attr("aria-label",_hgt("Like this comment")),d.find(".hz-liked").addClass("hz-like icon-thumb_outline").removeClass("hz-liked icon-thumb_solid"),b||(0==i||"1"===L?(n.remove(),d.append('<span class="like-btn-label hz-likeAction" aria-label="'+_hgt("No likes yet")+'">'+_hgt("Like")+"</span>")):0<i&&(s=_hgtp("","1 person likes this.","{countOfLikes} people like this.",i,{countOfLikes:i}),n.attr("title",s),n.html(_hgtp("","1 Like","{numOfLikes} Likes",i,{numOfLikes:i}))));else if(f==m.dislikeAction)d.addClass("undislike").removeClass("dislike").attr("title",_hgt("Cancel")).find(".hz-likeAction").remove();else if(f==m.unDislikeAction)d.addClass("dislike").removeClass("undislike").attr("title",_hgt("Like"));else if(f==m.showlikeAction)for(var o=l.length,a=0;a<o;a++){var r=$("<li></li>"),k=l[a],u=k.link,c=k.userName,k=k.userImage,k=$("<a class='likeUserImg hz-user-image' href='"+u+"'><img width='40' height='40' src='"+k+"'/></a>"),c=$("<div class='likeUserTextInfo'><a class='colorLink' href='"+u+"'>"+c+"</a></div><div style='clear:both'></div>");r.append(k).append(c),a==o-1&&r.addClass("last-like"),C.appendToLikeList(r),HZ.ui.Yamdi.center()}}else f==m.showlikeAction&&(HZ.ui.Yamdi.hide(C),e=_hgt("Cannot get the list of people who like this.<br/>{error}<br/>Please try it later.",{error:e.error}),HZ.ui.yamdi.Common.alert(_hgt("Internal Error"),e))})}this.init=function(e){e&&(m=$.extend({},t,e)),HZ.data.CurrentSessionUser?($(document).on("click","span.like",function(e){i(m.likeAction,this),e.preventDefault()}),$(document).on("click","span.unlike",function(e){i(m.unlikeAction,this),e.preventDefault()}),$(document).on("click","span.dislike",function(e){i(m.dislikeAction,this),e.preventDefault()}),$(document).on("click","span.undislike",function(e){i(m.unDislikeAction,this),e.preventDefault()})):$(document).on("click","span.like,span.unlike",function(e){HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Like.SOURCE_LINK_LIKE,null,window.location.href):window.location.href=m.likeRedirectLink,e.preventDefault()}),(C=new HZ.like.LikeDialog).prepare();e=$(".button-like");$(document).on("click","a.hz-showlike",function(e){e.preventDefault(),!HZ.data.CurrentSessionUser&&m.isCobrand?HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Like.SOURCE_LINK_LIKE,null,window.location.href):window.location.href=m.likeRedirectLink:i(m.showlikeAction,this)}),e.length&&($(document).on("click",".button-like .counter-bubble",function(e){e.stopImmediatePropagation(),e.preventDefault();!HZ.data.CurrentSessionUser&&m.isCobrand?HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Like.SOURCE_LINK_LIKE,null,window.location.href):window.location.href=m.likeRedirectLink:i(m.showlikeAction,this)}),$(document).on("click",m.buttonLikeClassSelector,function(e){HZ.data.CurrentSessionUser?h.updateLikes(this):(HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Like.SOURCE_LINK_LIKE,null,window.location.href):window.location.href=m.likeRedirectLink,e.preventDefault())}),$(document).on("click",m.buttonDisLikeClassSelector,function(e){HZ.data.CurrentSessionUser?h.updateLikes(this):(HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Like.SOURCE_LINK_LIKE,null,window.location.href):window.location.href=m.likeRedirectLink,e.preventDefault())}),$(document).on("mouseover",m.buttonLikeClassSelector,function(){$(this).attr("lop")!=m.unlikeAction&&$(this).attr("lop")!=m.unDislikeActionlikeAction||HZ.like.Like.updateLikeBtn($(this),!0)}).on("mouseout",m.buttonLikeClassSelector,function(){$(this).attr("lop")!=m.unlikeAction&&$(this).attr("lop")!=m.unDislikeActionlikeAction||h.updateLikeBtn($(this),!1)}),$(document).on("mouseover",m.buttonDisLikeClassSelector,function(){$(this).attr("lop")!=m.unlikeAction&&$(this).attr("lop")!=m.unDislikeActionlikeAction||HZ.like.Like.updateLikeBtn($(this),!0)}).on("mouseout",m.buttonDisLikeClassSelector,function(){$(this).attr("lop")!=m.unlikeAction&&$(this).attr("lop")!=m.unDislikeActionlikeAction||h.updateLikeBtn($(this),!1)}),$(document).on("mouseover",".button-like .counter-bubble",function(e){var t=$(this).parents(".button-like");"unlike"==t.attr("lop")&&(h.updateLikeBtn(t,!1),e.stopImmediatePropagation())}).on("mouseout",".button-like .counter-bubble",function(){var e=$(this).parents(".button-like");"unlike"==e.attr("lop")&&h.updateLikeBtn(e,!0)}))},this.updateLikes=function(e){$btn=$(e);var a=$btn.attr("lop"),r=$btn.attr("loty"),k=$btn.attr("loid"),u="true"===$btn.attr("lncb"),e=a;e==m.unDislikeAction&&(e=m.unlikeAction);HZ.ajaz.Like.like(e,k,r,function(e){var t,i,n,s,l,o;e&&"true"==e.success&&(l=$(m.buttonDisLikeClassSelector+'[loid*="'+k+'"]'),t=$(m.buttonLikeClassSelector+'[loid*="'+k+'"]'),i=$btn.find(".button-icon"),n=$btn.find(".button-label"),s=$btn.find(".counter-bubble"),a==m.likeAction?($btn.addClass("hz-liked"),n.text(m.likeButtonIngLabel),$btn.attr("title",function(e){switch(parseInt(e,10)){case m.typeQuestion:return _hgt("Stop liking this discussion");case m.typeIbk:return _hgt("Stop liking this ideabook");case m.typeAnswer:case m.typeComment:return _hgt("Stop liking this comment");case m.typeReview:return _hgt("Stop liking this review");case m.typeVendorListing:return _hgt("Stop liking this product");default:return _hgt("Stop liking this item")}}(r)),$btn.attr("lop",m.unlikeAction),i.removeClass(m.likeIconClass).addClass(m.likeIconIngClass),h.updateDisLikeButtonClassWhenLike(l,r),u||(0<s.length?(s.text(e.formattedLikeCount||parseInt(s[0].innerHTML,10)+1),o=_hgtp("","You and 1 other person like this.","You and {countOfOtherLikes} people like this.",e.numberOfLikes-1,{countOfOtherLikes:e.numberOfLikes-1}),s.attr("title",o)):(s=$('<span title="'+_hgt("You like this.")+'" class="counter-bubble">1</span>'),$btn.append(s)))):a==m.unlikeAction?($btn.removeClass("hz-liked"),n.text(m.likeButtonLabel),$btn.attr("title",c(r)),$btn.attr("lop",m.likeAction),u||0<s.length&&((l=e.formattedLikeCount||parseInt(s[0].innerHTML,10)-1)<1?s.remove():(s.text(l),o=_hgtp("","1 person likes this.","{countOfLikes} people like this.",e.numberOfLikes,{countOfLikes:e.numberOfLikes}),s.attr("title",o))),i.removeClass(m.likeIconIngClass).removeClass(m.unlikeIconClass).addClass(m.likeIconClass)):a==m.dislikeAction?($btn.addClass("hz-liked"),n.text(m.dislikeButtonLabel),$btn.attr("title",parseInt(r,10)!==m.typeVendorListing?_hgt("Stop rejecting this item"):_hgt("Stop rejecting this product")),$btn.attr("lop",m.unDislikeAction),i.removeClass(m.likeIconClass).addClass(m.likeIconIngClass),h.updateLikeButtonClassWhenDislike(t,r)):a==m.unDislikeAction&&($btn.removeClass("hz-liked"),n.text(m.dislikeButtonLabel),$btn.attr("title",d(r)),$btn.attr("lop",m.dislikeAction),i.removeClass(m.likeIconIngClass).removeClass(m.unlikeIconClass).addClass(m.likeIconClass)))})},this.updateLikeBtn=function(e,t){e=$(e).find(".button-icon");t?e.removeClass(m.likeIconIngClass).addClass(m.unlikeIconClass):e.removeClass(m.unlikeIconClass).addClass(m.likeIconIngClass)},this.updateLikeButtonClassWhenDislike=function(e,t){var i=e.find(".button-icon"),n=e.find(".button-label");e.removeClass("hz-liked"),n.text(m.dislikeButtonLabel),e.attr("title",c(t)),e.attr("lop",m.likeAction),i.removeClass(m.likeIconIngClass).removeClass(m.unlikeIconClass).addClass(m.likeIconClass)},this.updateDisLikeButtonClassWhenLike=function(e,t){var i=e.find(".button-icon"),n=e.find(".button-label");e.removeClass("hz-liked"),n.text(m.dislikeButtonLabel),e.attr("title",d(t)),e.attr("lop",m.dislikeAction),i.removeClass(m.likeIconIngClass).removeClass(m.unlikeIconClass).addClass(m.likeIconClass)}};

window.hzmr.push("like:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End like.js  **************/
/************* Start clipping.js for locale en-US **************/
try {HZ.ns("HZ.clipping"),void 0===HZ.clipping.Clip&&(HZ.clipping.Clip=new function(){var c,t;function n(n,i){var l=$(i),t=l.attr("data-object-type"),i=l.attr("data-object-id");t&&i||(t=l.parents(".hzBtn").attr("loty"),i=l.parents(".hzBtn").attr("loid")),HZ.ajaz.Clipping.clip(n,i,t,function(i){var t=l.parents(".clipContainer");i&&"true"==i.success&&(n==c.clipAction?(l.addClass("unclip").removeClass("clip").attr("title",_hgt("Bookmarked")),l.find(".hz-clip").addClass("hz-unclip hzi-Bookmarked-Circle").removeClass("hz-clip hzi-Bookmark-Circle"),t.find(".hz-clips").text(_hgt("Bookmarked"))):n==c.unclipAction&&(l.addClass("clip").removeClass("unclip").attr("title",_hgt("Bookmark")),l.find(".hz-unclip").addClass("hz-clip hzi-Bookmark-Circle").removeClass("hz-unclip hzi-Bookmarked-Circle"),t.find(".hz-clips").text(_hgt("Bookmark"))))})}t={typeAnswer:6,typeComment:9,clipAction:"clip",unclipAction:"unclip",clipTitle:"Bookmark",unclipTitle:"Bookmarked"},this.init=function(i){i&&(c=$.extend({},t,i))},this.executeClip=function(i){HZ.data.CurrentSessionUser?n($(i).parents(".clipContainer").find(".hz-clips").text()==c.unclipTitle?c.unclipAction:c.clipAction,i):HZ.auth?HZ.auth.Manager.signup(HZ.ajaz.Clipping.SOURCE_LINK_CLIPPING,null,window.location.href):window.location.href=c.clipRedirectLink}});

window.hzmr.push("clipping:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End clipping.js  **************/
/************* Start saveToUniversalGallery.js for locale en-US **************/
try {HZ.ns("HZ.modules.SaveToUniversalGallery"),HZ.modules.SaveToUniversalGallery=new function(){var a="saveToUniversalGalleryModule",i=1,s=2,o=3,n=5,t=6,l=13,d=this;this.isModuleLoaded=!1,this.isInitialized=!1,this.init=function(){d.isInitialized=!0,HZ.data.CurrentSessionUser&&$.ajax({url:"/j/saveToUniversalGalleryModule",method:"POST",data:{__ct:HZ.data.CSRFToken}}).done(function(e){HZ.utils.loadJukwaaModule(e,d.loadModule)}).fail(function(e){})},this.loadModule=function(){var e;HZ&&HZ.WebModule&&(d.isModuleLoaded=!0,e=document.getElementById("save-to-universal-gallery-module"),HZ.WebModule.render("saveToUniversalGalleryModule",e),$(document).trigger(a))},this.save=function(e,i){HZ.data.CurrentSessionUser?("number"!=typeof e&&(e=Number(e)),$(document).trigger("dialogOpened.saveToUniversalGallery"),d.isModuleLoaded||!d.isInitialized?this.openSaveDialog(e,i):$(document).bind(a,function(){this.openSaveDialog(e,i)}.bind(this))):HZ.auth.Manager.signup(HZ.modules.SaveToUniversalGallery.signupSource,HZ.modules.SaveToUniversalGallery.signUpMessageId,window.location.href)},this.openSaveDialog=function(e,i){i={objectId:e,objectType:i};$(document).trigger("JUKWAA_OPEN_SAVE_TO_UNIVERSAL_GALLERY_DIALOG",i)},this.onClose=function(){$(document).trigger("dialogClosed.saveToUniversalGallery")},this.saveSpace=function(e){this.save(e,o)},this.saveProduct=function(e){this.save(e,l)},this.saveGallery=function(e){this.save(e,i)},this.saveProfessional=function(e){this.save(e,s)},this.saveDiscussion=function(e){this.save(e,n)},this.saveComment=function(e){this.save(e,t)}};

window.hzmr.push("saveToUniversalGallery:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End saveToUniversalGallery.js  **************/
/************* Start topics.js for locale en-US **************/
try {HZ.ns("HZ.topics"),HZ.topics.TopicModule=function(){var n=this,t=new Object;this.initContent=function(t){n.submitUrl=t.submitUrl,n.objectId=t.objectId,n.objectType=t.objectType,n.title=t.title,n.isMobile="isMobile"in t&&t.isMobile,n.isEditable="isEditable"in t&&t.isEditable,n.isEditable&&($("#editTopicsButton").click(n.toggleEdit),$("#editTopicsDoneButton").click(n.toggleEdit),$("#addTopicInput").keypress(n.addTopicKeyPress),$("#editTopicsAddButton").click(n.addTopicName),$("#topicList").sortable(),$("#topicList").bind("sortupdate",n.handleParentTopicReorder),$("#topicList").sortable("disable"),$("#addTopicInput").autocomplete({source:function(t,e){n.autoComplete(t,e)}})),n.initTopics()},t.initContent=n.initContent,this.initTopics=function(){$(".ddTopArticles").each(function(){var t=$(this).find("a").first();0<t.length&&n.updateImage(t)}),n.objectType!=HZ.ajaz.Services.Topics.TOPIC_RELATION_CHILD_IDEABOOK&&$(".adminSection").remove(),n.isMobile?$("#topicList > .topic > .topicName").click(function(t){t.stopPropagation(),n.toggleMenu(this)}):$("#topicList > .topic").hover(function(t){var e=jQuery.data(this,"timer");void 0!==e&&clearTimeout(e),n.openMenu2(this)},function(t){var e=setTimeout(function(){n.closeMenu2(t.target)},250);jQuery.data(this,"timer",e)})},this.addTopicKeyPress=function(t){"13"==(t.keyCode||t.which)&&n.addTopicName()},this.removeTopic=function(e){var t=$(e).attr("topicId");HZ.ajaz.Services.Topics.removeTopic(t,n.objectId,n.objectType,function(t){t.success&&$(e).parent(".topic").remove()})},t.removeTopic=n.removeTopic,this.addTopicName=function(){var e=$.trim($("#addTopicInput").val());""!=e?HZ.ajaz.Services.Topics.getTopicByName(e,function(t){void 0===t[HZ.ajaz.Services.Topics.RET_PARAM_ADDED_TOPIC_ID]||null==t[HZ.ajaz.Services.Topics.RET_PARAM_ADDED_TOPIC_ID]?HZ.ui.yamdi.Common.confirm("Create new topic named: '"+e+"'?","Are you sure you want to create this as NEW topic?  Please check that there are no typos and that you intend to CREATE a brand new topic.","Create",function(){o(e,n.objectId,n.objectType),HZ.ui.yamdi.Common.hideAllDialogs()}):o(e,n.objectId,n.objectType)}):alert("invalid name")};var o=function(t,e,i){return HZ.ajaz.Services.Topics.addTopic(t,e,i,function(t){void 0!==t[HZ.ajaz.Services.Topics.RET_PARAM_ADDED_TOPIC]?($("#topicList").append(t[HZ.ajaz.Services.Topics.RET_PARAM_ADDED_TOPIC]),$("#addTopicInput").val(""),n.toggleEdit(),n.toggleEdit(),n.initTopics()):alert("Error adding topic")}),!1};return this.toggleEdit=function(){var t=$("#editTopicsButton"),e=$("#addTopicArea"),i=$(".xTopic");"block"==t.css("display")?(t.css("display","none"),e.css("display","block"),i.css("display","inline"),$("#topicList").sortable("enable")):(t.css("display","block"),e.css("display","none"),i.css("display","none"),$("#topicList").sortable("disable"))},t.toggleEdit=n.toggleEdit,this.autoComplete=function(t,e){t=$.trim(t.term);""!=t&&HZ.ajaz.Services.Topics.autoComplete(t,function(t){void 0!==t[HZ.ajaz.Services.Topics.RET_PARAM_SEARCH_LIST]?(t=t[HZ.ajaz.Services.Topics.RET_PARAM_SEARCH_LIST],e($.map(t,function(t){return{label:t.name,value:t.name}}))):alert("Error in autocomplete")})},this.openMenu2=function(t){$(".topicContainer").find(".topicDropAreaContainer").hide();var e=$(t).closest("div.topic").find(".topicDropAreaContainer");e.show();var i,o=e.parent(),s=o.position(),c=e.find(".triangle"),t=e.closest(".topicContainer").width()-e.width(),s=s.left>t?t:s.left;n.isMobile?(e.css({left:"20px",width:"calc(100% - 40px)"}),n.boundBodyClickHandler=$.proxy(n.handleBodyClick,n),(i=$(document.body)).on("click.topicPopup",function(t){n.boundBodyClickHandler(),i.off("click.topicPopup",n.boundBodyClickHandler)})):e.css("left",s+"px");s=e.outerHeight()-e.innerHeight();e.css("top",o.position().top+o.outerHeight()-s+"px"),c.css("left","0px");s=o.offset().left+o.outerWidth()/2,s=(s-=c.outerWidth()/(o.outerWidth()<c.outerWidth()?3:2))-c.offset().left;c.css("left",Math.floor(s)+"px")},this.closeMenu2=function(t){$(t).closest("div.topic").find(".topicDropAreaContainer").hide()},this.toggleMenu=function(t){$(t).closest("div.topic").find(".topicDropAreaContainer").is(":visible")?n.closeMenu2(t):n.openMenu2(t)},this.handleBodyClick=function(){$(".topicContainer").find(".topicDropAreaContainer").hide()},this.toggle=function(t,e){t=$(t),e=$(e);"none"==t.css("display")?(t.show(),e.hide()):(t.hide(),e.show())},t.toggle=n.toggle,this.updateName=function(e,t){HZ.ajaz.Services.Topics.updateName(n.objectId,t,function(t){t&&"true"==t.success?e.inlineEdit("saveCompleted"):(t=t&&t.error?t.error:"Error, please try again",alert("Error: "+t))})},t.updateName=n.updateName,this.updateDesc=function(e,t){HZ.ajaz.Services.Topics.updateDesc(n.objectId,t,function(t){t&&"true"==t.success?e.inlineEdit("saveCompleted"):(t=t&&t.error?t.error:"Error, please try again",alert("Error: "+t))})},t.updateDesc=n.updateDesc,this.updateTopListHtml=function(t,e,i){var o,s=!0;for(o in $(t).empty(),links=" <a href = '#' title = 'Click to delete' style = 'color:red' onclick = '$(this).parent().remove();'>[X]</a>",currentItemText="<span style = 'float:right'>CURRENT ITEM</span>",e)item=e[o],isCurrentItem=!1,item.id==n.objectId&&(isCurrentItem=!(s=!1)),$(t).append('<li class = "topListItem" iid = '+item.id+">"+item.title+links+(isCurrentItem?currentItemText:"")+"</li>");s&&$(t).append('<li class = "topListItemNew" iid = '+n.objectId+">"+decodeURIComponent(n.title)+links+"<span style = 'float:right'>NEW</span></li>")},this.getTopList=function(t,e){HZ.ajaz.Services.Topics.getTop(t,n.objectType,function(t){t&&"true"==t.success?n.updateTopListHtml(e,t.result):(t=t&&t.error?t.error:"Error, please try again",alert("Error: "+t))})},t.getTopList=n.getTopList,this.saveTopList=function(o,s){var t=$(s),c=t.parent().find("#manageMessage");n.saveTopListGeneric(o,n.objectType,t,function(){c.text("saving").slideDown("fast")},function(){n.getTopList(o,s),c.text("Success").delay(1500).slideUp("slow")},function(t,e,i){n.getTopList(o,s),c.text("Error:"+i).delay(1500).slideUp("slow")})},t.saveTopList=n.saveTopList,this.saveTopListGeneric=function(t,e,i,o,s,c){var n=[];i.children("li").each(function(){n.push($(this).attr("iid"))}),o(),HZ.ajaz.Services.Topics.saveTop(t,e,n,function(t){t&&"true"==t.success?s():(t=t&&t.error?t.error:"Error, please try again",c(),alert("Error: "+t))})},t.saveTopListGeneric=n.saveTopListGeneric,this.updateImage=function(t,e){var i=$(t),o=i.find("img").attr("src"),s=i.closest(".topicAreaArticles").find(".ddTopArticlesPic a").find("img"),t=i.closest(".topicAreaArticles").find("a");s.attr("src",o),t.removeClass("on"),i.addClass("on")},t.updateImage=n.updateImage,this.handleParentTopicReorder=function(t,e){if(!($("#topicList > .topic").length<1)){var o=$("#topicList > .topicSeparator")[0];$("#topicList > .topicSeparator").remove();var s=$("#topicList").children();for(i=0;i<s.length-1;i++)$(s[i]).after($(o).clone());var c=new Array;$("#topicList > .topic > .xTopic").each(function(){c.push($(this).attr("topicid"))}),HZ.ajaz.Services.Topics.updateParentOrder(n.objectId,n.objectType,c)}},t}();

window.hzmr.push("topics:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End topics.js  **************/
/************* Start tipBox.js for locale en-US **************/
try {HZ.ns("HZ.tipBox"),HZ.tipBox.TipBox=new function(){var i=!1;function s(t,i,o){t&&t.length&&!i.hasClass("tipBoxAbsolute")&&o.css("margin-left",t.offset().left+t.outerWidth()/2-i.offset().left-o.outerWidth()/2)}this.init=function(t){i||($(".hzTipBox").each(function(t){var i,o=$(this),e=o.attr("data-tip-id"),n=o.attr("data-name"),a=$(".hzTipBox[data-name="+n+"] "+".tipBoxArrow");a&&0<a.length&&o&&0<o.length&&(n=a.data("point-to"),i=$(n),o.hasClass("tipBoxAbsolute")&&(i.prepend(o),o.hover(function(t){t.stopPropagation()})),s(i,o,a),a.fadeTo(1e3,1),$(window).resize(function(){s(i,o,a),a.fadeTo(1e3,1)})),o&&0<o.length&&o.removeClass("invisibleBox"),$(".hzCloseTip").click(function(t){o.slideUp("fast",function(){HZ.ajaz.Services.tipBox(e)})})}),i=!0)}};

window.hzmr.push("tipBox:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End tipBox.js  **************/
/************* Start profileUtils.js for locale en-US **************/
try {HZ.ns("HZ.profileUtils"),HZ.profileUtils.SaveAndExit=new function(){var e={};function t(){$(".profile-action-button").removeClass("btn-primary").addClass("whitebutton").off("click").find("span").text(_hgt("Done Editing")),$(window).unbind("beforeunload")}function i(){$("form.withSaveAndExit").find("input,textarea").on("input",function(o){n()}).on("change",function(o){n()}).on("focus",function(o){a(o)}).end().find("select").on("change",function(o){n()}).on("focus",function(o){a(o)})}function a(o){o=$(o.target);void 0===e[o.attr("name")]&&(e[o.attr("name")]=o.val())}function n(){$(".profile-action-button").removeClass("whitebutton").addClass("btn-primary").find("span").text(_hgt("Save and Exit")).end().off("click").on("click",function(o){o.preventDefault(),$(window).unbind("beforeunload"),$('[name="saveAndExit"]').val(!0).parents("form").submit()}),$("form.withSaveAndExit .hzBtn.primary, form.withSaveAndExit #updateBtn, form.withSaveAndExit #continueBtn").on("click",function(o){t()}),$(window).unbind("beforeunload").bind("beforeunload",function(o){var t,i=!0;for(t in e)i=$('[name="'+t+'"]').val()!==e[t];if(i)return _hgt("Your changes have not been saved yet!")})}this.init=function(o){o?setTimeout(i,o):i()},this.resetSaveAndExit=function(){t()}},HZ.profileUtils.ProType=new function(){this.fixProTypes=function(){var o,t=(t=window.location.hash).replace("#",""),i=HZ.data.ProfessionalTypes.get(t);i&&(i=$("<div/>").text(i).html(),o=$("#firstProfessionalType").html(),(o=(t=$("#moreProfessionalTypes").html()).replace(i,o))!=t&&($("#firstProfessionalType").html(i),$("#moreProfessionalTypes").html(o)))}},HZ.profileUtils.ContactUser=new function(){var t="",i="",e="";this.init=function(o){t=o.userDisplayName,i=o.userName,e=o.senderName,o.fromEmail},this.showSendEmailDialog=function(){HZ.dialogs.ContactProDialog||(HZ.dialogs.ContactProDialog=new HZ.email.ContactProDialog),HZ.dialogs.ContactProDialog.prepare({toUserName:i,toUserDisplayName:t,subject:_hgt("Houzz message from {senderName}",{senderName:e}),message:"",type:HZ.sendEmail.types.USER}),HZ.ui.Yamdi.show(HZ.dialogs.ContactProDialog)}},HZ.profileUtils.ContactPro=new function(){var t=0,i="",e="",a="",n="",s=!1,r=null,l=null;this.init=function(o){t=o.sessionType,i=o.userDisplayName,e=o.userName,a=o.senderName,n=o.fromEmail,s=o.isShortForm},this.setMultipleLocationsData=function(o){r=o},this.setDefaultEmailToPopulate=function(o){l=o},this.showSendEmailDialog=function(o){HZ.dialogs.ContactProDialog||(HZ.dialogs.ContactProDialog=new HZ.email.ContactProDialog),0!=t?o?HZ.ui.yamdi.Common.confirm("",_hgt("Contacting pros on Houzz is reserved for personal project inquiries only. I confirm this is not a promotional message or solicitation"),_hgt("Click to confirm")+" >>",function(){HZ.ui.yamdi.Common.hideAllDialogs(),HZ.dialogs.ContactProDialog.prepare({toUserName:e,toUserDisplayName:i,locationData:r,defaultEmailToPopulate:l,subject:_hgt("Houzz project inquiry from {senderName}",{senderName:a}),message:"",fromEmail:n,isShortForm:s}),HZ.ui.Yamdi.show(HZ.dialogs.ContactProDialog)}):(HZ.dialogs.ContactProDialog.prepare({toUserName:e,toUserDisplayName:i,locationData:r,defaultEmailToPopulate:l,subject:_hgt("Houzz project inquiry from {senderName}",{senderName:a}),message:"",isShortForm:s}),HZ.ui.Yamdi.show(HZ.dialogs.ContactProDialog)):(HZ.dialogs.GuestContactProDialog||(HZ.dialogs.GuestContactProDialog=new HZ.email.GuestContactProDialog),HZ.dialogs.GuestContactProDialog.prepare({toUserName:e,toUserDisplayName:i,locationData:r,defaultEmailToPopulate:l,subject:_hgt("Houzz project inquiry"),message:"",isShortForm:s}),HZ.ui.Yamdi.show(HZ.dialogs.GuestContactProDialog))}};

window.hzmr.push("profileUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End profileUtils.js  **************/
/************* Start professionalsRenderer.js for locale en-US **************/
try {HZ.ns("HZ.modules.ProfessionalsRenderer"),HZ.modules.ProfessionalsRenderer=new function(){function e(r){r=$(r.currentTarget).data("user-id"),a[r]&&(HZ.profileUtils.ContactPro.init(a[r]),HZ.profileUtils.ContactPro.showSendEmailDialog(0))}var o,a={},i={};this.init=function(r){a=(r=r||{}).contactData,r.currentUser,o=r.directoryRedesign||!1,$(".pros-renderer-contact-btn").on("click",e),o&&$(".project-zoom").hover(function(){var r=$(this).find(".image-zoom"),e=r.data("image-id"),o=r.prop("src"),a=r.data("zoom-url");i[e]?i[e]&&i[e].largeImageUrl&&r.prop("src",i[e].largeImageUrl):(i[e]="pending",$('<img src="'+a+'">').load(function(){i[e]={originalImageUrl:o,largeImageUrl:a},r.is(":hover")&&r.prop("src",i[e].largeImageUrl)}))},function(){var r=$(this).find(".image-zoom"),e=r.data("image-id");i[e]&&i[e].largeImageUrl&&r.prop("src",i[e].originalImageUrl)})}};

window.hzmr.push("professionalsRenderer:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End professionalsRenderer.js  **************/
/************* Start makkariSDK.js for locale en-US **************/
try {HZ.ns("HZ.utils"),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Omnilog=t():(e.Omnilog=e.Omnilog||{},e.Omnilog["makkari-sdk"]=t())}(self,()=>{return n={316:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logError=void 0;var a=o(338),l=n(o(144)),c="/j/ajax/client-error-light";function u(e,t,o,n,i,r){"function"==typeof t&&n instanceof e?t(o,n,i,r):console.log("OmniLogSDK ".concat(o," Error: ").concat(n.message))}t.logError=function(e,t,o,n){try{if("undefined"==typeof window)return;var i={type:e},r=encodeURIComponent(JSON.stringify(i));(0,l.default)("".concat(((0,a.isTestingEnv)(o)?"".concat("https://www.stghouzz.com"):"".concat("https://www.houzz.com")).concat(c),"?p=").concat(r)),console.log("OmniLogSDK ".concat(e," Error: ").concat(t.message))}catch(e){}},t.default=function(a,l,c){return void 0===l&&(l=t.logError),void 0===c&&(c=Error),function(e,t,o){var r=o.value;return o.value=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var n=(null===(e=null==this?void 0:this.OmnilogHelper)||void 0===e?void 0:e.getEnvironment())||"";try{var i=r.apply(this,t);return i&&"function"==typeof i.then&&"function"==typeof i.catch?i.catch(function(e){u(c,l,a,e,n,t)}):i}catch(e){u(c,l,a,e,n,t)}},o}}},642:function(e,t,o){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=this&&this.__rest||function(e,t){var o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});function a(e,t){return"function"!=typeof(null==e?void 0:e.getAttribute)||(t.position=void 0!==t.position?t.position:function(e,t){for(var o=0;o<t.length;o++){var n=parseInt((null==e?void 0:e.getAttribute(t[o]))||"",10);if(!isNaN(n))return n}}(e,["posId","data-posid","data-pos-id"]),t.elementType=t.elementType||e.getAttribute("role")||e.nodeName||void 0,t.elementLabel=t.elementLabel||e.getAttribute("label")||e.getAttribute("aria-label")||void 0,t.entityType=t.entityType||e.getAttribute("entityType")||e.getAttribute("data-entity-type")||void 0,t.entityId=t.entityId||e.getAttribute("objId")||e.getAttribute("data-objid")||e.getAttribute("entityId")||e.getAttribute("data-entity-id")||void 0,t.campaignId=t.campaignId||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||void 0,t.campaignToken=t.campaignToken||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||e.getAttribute("campaignToken")||e.getAttribute("data-campaign-token")||void 0,t.creativeId=t.creativeId||e.getAttribute("creativeId")||e.getAttribute("data-creative-id")||void 0,t.section=t.section||e.getAttribute("section")||e.getAttribute("data-section")||void 0,t.component=t.component||e.getAttribute("component")||e.getAttribute("data-component")||void 0,t.compId=t.compId||e.getAttribute("compId")||e.getAttribute("data-compid")||void 0,t.l1Section=t.section||e.getAttribute("data-section")||void 0,t.l2Container=t.l2Container||t.container||e.getAttribute("data-container")||void 0,t.l3Component=t.component||e.getAttribute("data-component")||void 0,t.cta=t.cta||e.getAttribute("data-cta")||void 0,t.extraInfo=t.extraInfo||e.getAttribute("data-extra-info")||void 0),t}function c(){return r.default.getLocalStorage()}var u=o(924),r=i(o(670)),s=o(304),E="persisted_evt_src",d="transient_evt_src",I={trackingInfo:null,eventSource:null},S=function(o){return o?(Object.keys(o).forEach(function(e){var t=o[e];return t&&"object"==typeof t&&S(t)||!t&&delete o[e]}),o):{}},_={setEventSource:function(e){try{var t,o,n,i,r,a=c();a&&e&&"object"==typeof e&&(t=e.experience,o=e.parentFlow,n=e.activeFlow,i=l(e,["experience","parentFlow","activeFlow"]),r={experience:t,parentFlow:o,activeFlow:n},a.set(d,i,10),a.set(E,r))}catch(e){}},updateEventSource:function(e){var t;e&&(t=_.getEventSource()||{},_.setEventSource(Object.assign({},t,e)))},getEventSource:function(){var e=c(),t=e.get(E)||{},e=e.get(d)||{},e=n(n({},t),e);return S(e)},getEventSourceFromTargetElement:function(e,t){return e?a(e,t):{}},collectEventSourceFromDOM:function(e){var t={};if(!e)return t;try{for(var o=e;o;)t=o?a(o,t):t,o=o.parentNode}catch(e){}return!t.component&&t.compId&&(t.component=t.compId),t},getTrackingInfoAndSetEventSource:function(e,r){if(!e)return I;var t=function(e){var t;if("function"!=typeof(null==e?void 0:e.getAttribute))return I;var o={compId:null,posId:null,scopeId:null,objId:null,anchorText:null,eventType:r||u.UIEvents.ELEMENT_CLICKED,hasTrackMe:!1},n={};try{for(var i=e;i;)o.compId=o.compId||i.getAttribute("compId")||i.getAttribute("data-compid"),o.scopeId=o.scopeId||i.getAttribute("scopeId")||i.getAttribute("data-scopeid"),o.objId=o.objId||i.getAttribute("objId")||i.getAttribute("data-objid"),o.posId=o.posId||i.getAttribute("posId")||i.getAttribute("data-posid"),o.anchorText=o.anchorText||(null===(t=null==i?void 0:i.innerText)||void 0===t?void 0:t.replace(/[\s:]/g,"").substring(0,30)),o.hasTrackMe=o.hasTrackMe||i.classList.contains("hz-track-me")||i.classList.contains("trackMe"),o.eventType=o.eventType||i.getAttribute("data-event-name")||i.getAttribute("data-event-type"),n=a(i,n),i=i.parentElement;return o.eventType&&Object.values(u.UIEvents).includes(o.eventType),{trackingInfo:o,eventSource:n}}catch(e){return I}}(e)||{},o=t.trackingInfo,e=t.eventSource,t=void 0===e?{}:e;if(o&&t){e=s.ExperienceUtils.getExperience()||null;e&&(t.experience=e);e=s.FlowUtils.getParentFlow();e&&(t.parentFlow=e);e=s.FlowUtils.getActiveFlow();return e&&(t.activeFlow=e),_.setEventSource(t),{trackingInfo:o,eventSource:t}}return I}};t.default=_},924:(e,t)=>{"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.OmnilogError=t.DeviceType=t.OmnilogLocalStorageKey=t.RouterNSProductMap=t.IdentityEventType=t.ViewMode=t.DeviceOrientation=t.EventInitiator=t.TestBotType=t.UIEvents=t.Channel=t.ComponentOsType=t.ComponentType=t.ComponentName=t.ComponentDetailedType=t.OmnilogStatusCodes=t.OmnilogHeaders=t.OmniLoggerConst=t.OmniLoggerEventNames=void 0,(o=t.OmniLoggerEventNames||(t.OmniLoggerEventNames={})).EXPERIENCE_LOADED="Experience Loaded",o.EXPERIENCE_UNLOADED="Experience Unloaded",o.OMNILOG_EVENT="omnilog",o.TEST_REGISTERED="Tests Registered",o.SESSION_STARTED="Session Started",o.USER_ATTRIBUTE_UPDATED="User Attribute Updated",(t.OmniLoggerConst||(t.OmniLoggerConst={})).OMNILOG_TOKEN_HEADER_NAME="X-HZ-OMNILOG-TOKEN",(o=t.OmnilogHeaders||(t.OmnilogHeaders={})).EXTERNAL_SESSION_ID_HEADER="x-ol-ext-session-id",o.SESSION_ID_HEADER="x-ol-session-id",o.EXTERNAL_DEVICE_ID_HEADER="x-ol-ext-device-id",o.EXPERIENCE_ID_HEADER="x-ol-exp-id",o.EXPERIENCE_NAME_HEADER="x-ol-exp-name",o.FLOW_ID_HEADER="x-ol-flow-id",o.FLOW_NAME_HEADER="x-ol-flow-name",o.FLOW_STEP_NAME_HEADER="x-ol-step-name",o.PRODUCT_HEADER="x-ol-product",o.PRODUCT_VARIANT_HEADER="x-ol-product-variant",o.MID_HEADER="x-ol-mid",(o=t.OmnilogStatusCodes||(t.OmnilogStatusCodes={}))[o.STATUS_CODE_SUCCESS=1]="STATUS_CODE_SUCCESS",o[o.STATUS_CODE_FAILURE=-1]="STATUS_CODE_FAILURE",(o=t.ComponentDetailedType||(t.ComponentDetailedType={}))[o.C2_LEGACY_WEB=101]="C2_LEGACY_WEB",o[o.JUWKAA_ISOMORHPIC_JS_WEB=102]="JUWKAA_ISOMORHPIC_JS_WEB",o[o.SITE_DESIGNER_LEGACY_WEB=103]="SITE_DESIGNER_LEGACY_WEB",o[o.SITE_DESIGNER_ISOMORPHIC_JS_WEB=104]="SITE_DESIGNER_ISOMORPHIC_JS_WEB",o[o.IVY_LEGACY_WEB=105]="IVY_LEGACY_WEB",o[o.IVY_ISOMORPHIC_JS_WEB=106]="IVY_ISOMORPHIC_JS_WEB",o[o.CONX_LEGACY_WEB=107]="CONX_LEGACY_WEB",o[o.WINDOWS_MOBILE_APP=110]="WINDOWS_MOBILE_APP",o[o.PRO_SITES_WEB=112]="PRO_SITES_WEB",o[o.HOUZZ_PRO_CLIPPER=151]="HOUZZ_PRO_CLIPPER",o[o.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",o[o.HOUZZ_IOS_MOBILE_APP=201]="HOUZZ_IOS_MOBILE_APP",o[o.HOUZZ_ANDROID_MOBILE_APP=202]="HOUZZ_ANDROID_MOBILE_APP",o[o.HOUZZ_PRO_IOS_MOBILE_APP=251]="HOUZZ_PRO_IOS_MOBILE_APP",o[o.HOUZZ_PRO_ANDROID_MOBILE_APP=252]="HOUZZ_PRO_ANDROID_MOBILE_APP",o[o.C2_WEB_SERVER=301]="C2_WEB_SERVER",o[o.JUKWAA_WEB_SERVER=302]="JUKWAA_WEB_SERVER",o[o.GRAPHQL_SERVER=303]="GRAPHQL_SERVER",o[o.C2_SERVICE=304]="C2_SERVICE",o[o.IDENTITY_SERVICE=305]="IDENTITY_SERVICE",o[o.AD_SERVER=306]="AD_SERVER",o[o.BATCH=307]="BATCH",o[o.CONX_SERVER=308]="CONX_SERVER",o[o.PRO_SITES_WEB_SERVER=312]="PRO_SITES_WEB_SERVER",o[o.IVY_SERVICE_SERVER=315]="IVY_SERVICE_SERVER",o[o.EPN=401]="EPN",o[o.SALESFORCE=501]="SALESFORCE",o[o.BLUESHIFT=502]="BLUESHIFT",o[o.ELOQUA=503]="ELOQUA",o[o.UNKNOWN=-1]="UNKNOWN",(o=t.ComponentName||(t.ComponentName={})).JUKWAA_WEB="Jukwaa Web Client",o.PRO_SITES_WEB="Pro Site Web Client",o.SITE_DESIGNER_WEB="Site Designer Web Client",o.GRAPHQL_SERVER="Graphql Server",o.GRAPHQL_HOUZZ_PRO_SERVER="GraphQL Houzz Pro Server",o.JUKWAA_WEB_SERVER="Jukwaa Web Server",o.PRO_SITES_WEB_SERVER="Pro Site Web Server",o.SITE_DESIGNER_WEB_SERVER="Site Designer Web Server",o.IVY_SERVICE_SERVER="Ivy Service Server",o.GMAIL_CRM_CHROME_EXTENSION="Gmail CRM Chrome Extension",o.PRODUCT_CLIPPER_CHROME_EXTENSION="Product Clipper Chrome Extension",o.IMAGE_CLIPPER_CHROME_EXTENSION="Image Clipper Chrome Extension",o.HOUZZ_PRO_CLIPPER="Houzz Pro Clipper",(o=t.ComponentType||(t.ComponentType={}))[o.CLIENT_BROWSER=100]="CLIENT_BROWSER",o[o.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",o[o.SERVER_WEB=300]="SERVER_WEB",o[o.SERVER_OFFLINE=400]="SERVER_OFFLINE",o[o.SERVER_SERVICE=500]="SERVER_SERVICE",(o=t.ComponentOsType||(t.ComponentOsType={}))[o.LINUX=1]="LINUX",o[o.WINDOWS=2]="WINDOWS",o[o.OSX=3]="OSX",o[o.IOS=4]="IOS",o[o.ANDROID=5]="ANDROID",o[o.OTHER=6]="OTHER",(o=t.Channel||(t.Channel={})).DIRECT="Direct",o.EMAIL="Email",o.PAID="Paid",o.SEARCH="Search",o.SOCIAL="Social",o.PARTNER="Partner",o.INTERNAL="Internal",o.REFERRAL="Referral",o[o.UNKNOWN=100]="UNKNOWN",(o=t.UIEvents||(t.UIEvents={})).ELEMENT_CLICKED="Element Clicked",o.ELEMENT_FOCUSED="Element Focused",o.ELEMENT_BLURRED="Element Blurred",o.ELEMENT_SCROLLED="Element Scrolled",o.ELEMENT_VIEWED="Element Viewed",o.ELEMENT_EXPANDED="Element Expanded",o.ELEMENT_COLLAPSED="Element Collapsed",o.INPUT_CHANGED="Input Changed",o.MEDIA_PLAYED="Media Played",o.MEDIA_PAUSED="Media Paused",o.MEDIA_PLAY_COMPLETED="Media Play Completed",o.MEDIA_TIME_CHANGED="Media Time Changed",o.MEDIA_RESTARTED="Media Restarted",o.FORM_SUBMITTED="Form Submitted",(o=t.TestBotType||(t.TestBotType={}))[o.NONE=0]="NONE",o[o.AUTOMATION=1]="AUTOMATION",o[o.MANUAL=4]="MANUAL",o[o.BATCH=16]="BATCH",o[o.HOUZZ_STAFF=32]="HOUZZ_STAFF",o[o.ANALYTICAL_BOT=64]="ANALYTICAL_BOT",(o=t.EventInitiator||(t.EventInitiator={}))[o.USER_SERVER=0]="USER_SERVER",o[o.USER_CLIENT=1]="USER_CLIENT",o[o.APPLICATION_SERVER=2]="APPLICATION_SERVER",o[o.APPLICATION_CLIENT=3]="APPLICATION_CLIENT",o[o.PRO_AI_ASSIST_USER_SERVER=4]="PRO_AI_ASSIST_USER_SERVER",o[o.PRO_AI_ASSIST_USER_CLIENT=5]="PRO_AI_ASSIST_USER_CLIENT",o[o.PRO_AI_ASSIST_APPLICATION_SERVER=6]="PRO_AI_ASSIST_APPLICATION_SERVER",o[o.PRO_AI_ASSIST_APPLICATION_CLIENT=7]="PRO_AI_ASSIST_APPLICATION_CLIENT",(o=t.DeviceOrientation||(t.DeviceOrientation={}))[o.PORTRAIT=1]="PORTRAIT",o[o.LANDSCAPE=2]="LANDSCAPE",(o=t.ViewMode||(t.ViewMode={})).STANDALONE="Standalone",o.DEFAULT="Default",o.LIGHTBOX="Lightbox",o.QUICKVIEW="Quick View",(o=t.IdentityEventType||(t.IdentityEventType={})).LOGIN="login",o.LOGOUT="logout",o.MODIFY="modify",t.RouterNSProductMap={HOUZZ:"Houzz",PRO_SOLUTIONS:"Houzz Pro",UNKNOWN:"UNKNOWN"},(o=t.OmnilogLocalStorageKey||(t.OmnilogLocalStorageKey={})).ActiveExperience="OMNILOG_ACTIVE_EXPERIENCE",o.FlowStack="OMNILOG_FLOW_STACK",o.ParentFlow="OMNILOG_PARENT_FLOW",o.LogoutCount="OMNILOG_LOGOUT_COUNT",(o=t.DeviceType||(t.DeviceType={}))[o.NONE=0]="NONE",o[o.DESKTOP=1]="DESKTOP",o[o.TABLET=2]="TABLET",o[o.SMARTPHONE=3]="SMARTPHONE",o[o.SMART_TV=4]="SMART_TV",o[o.OTHER=5]="OTHER",(t=t.OmnilogError||(t.OmnilogError={})).INIT="omnilog.init",t.CALL_MAKKARI_API="omnilog.callMakkariApi",t.EXPERIENCE_LOADED="omnilog.experienceLoaded",t.EXPERIENCE_UNLOADED="omnilog.experienceUnLoaded",t.SEND_INTERACTION_EVENT="omnilog.sendInteractionEvent",t.SEND_OUTCOME_EVENT="omnilog.sendOutcomeEvent",t.SEND_IDENTITY_EVENT="omnilog.sendIdentityEvent",t.FLOW_STARTED="omnilog.flowStarted",t.FLOW_STEP_LOADED="omnilog.flowStepLoaded",t.FLOW_STEP_COMPLETED="omnilog.flowStepCompleted",t.FLOW_COMPLETED="omnilog.flowCompleted",t.FLOW_STEP_UNLOADED="omnilog.flowStepUnloaded",t.DUPLICATE_EXPERIENCE="omnilog.duplicate_experience",t.BUILD_CLIENT_TOKEN="omnilog.buildClientToken",t.LOG_ERROR="omnilog.log_error"},304:function(e,i,t){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.IdentityUtils=i.UserAttributeUtils=i.ExperienceUtils=i.FlowUtils=void 0;var r=t(924),a=n(t(670)),l=t(214),c=n(t(345)),t=n(t(642));i.FlowUtils={init:function(){i.FlowUtils.setFlowStack([])},getStorage:function(){return a.default.getSessionStorage()},getParentFlow:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.ParentFlow)||null},setParentFlow:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ParentFlow,e)},getFlowStack:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.FlowStack)||[]},setFlowStack:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.FlowStack,e)},pushToFlowStack:function(e){var t=i.FlowUtils.getFlowStack()||[];t.unshift(e),i.FlowUtils.setFlowStack(t)},popFlowStack:function(){var e=i.FlowUtils.getFlowStack()||[],t=e.shift();return i.FlowUtils.setFlowStack(e),t},resetFlows:function(){i.FlowUtils.setFlowStack([]),i.FlowUtils.setParentFlow(null)},getActiveFlow:function(){var e=i.FlowUtils.getFlowStack();return 0<(null==e?void 0:e.length)?e[0]:null},updateActiveFlow:function(e,t){var o;0!==i.FlowUtils.getFlowStack().length&&((o=i.FlowUtils.popFlowStack())&&(o[e]=t),i.FlowUtils.pushToFlowStack(o))}},i.ExperienceUtils={getStorage:function(){return a.default.getSessionStorage()},setActiveExperience:function(e){var t=i.ExperienceUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ActiveExperience,e)},getExperience:function(){return i.ExperienceUtils.getStorage().get(r.OmnilogLocalStorageKey.ActiveExperience)}},i.UserAttributeUtils={getSetUaDetails:function(e,t,o){if(e&&t)return{user_attribute_set:JSON.stringify([{name:e,value:t,expiration:o||null}])}},getUnsetUaDetails:function(e){if(e)return{user_attribute_unset:JSON.stringify([e])}}},i.IdentityUtils={getLogoutCount:function(){return parseInt(a.default.getLocalStorage().get(r.OmnilogLocalStorageKey.LogoutCount),10)||0},updateLogoutCount:function(){a.default.getLocalStorage().set(r.OmnilogLocalStorageKey.LogoutCount,i.IdentityUtils.getLogoutCount()+1)},getClientIdModifier:function(){var e=i.IdentityUtils.getLogoutCount();if(!e)return null;var t="".concat(e);if(e<1e3)for(var o=4-t.length,n=0;n<o;n++)t="0".concat(t);return t}};var u=o(o({getProductInfo:function(e,t){var o=u.getProductInfoByRoutingDescriptor(t)||{},n=o.product,t=o.productVariant,o=e&&(0,l.getProductInfo)()||{},e=o.product,o=o.productVariant;return{product:n||e||r.RouterNSProductMap.UNKNOWN,productVariant:t||o||r.RouterNSProductMap.UNKNOWN}},getClientEventTokenFromRequestHeaders:function(e){var t=null;return e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]&&((t={}).experienceId=e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER],t.experienceName=e[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER],t.externalDeviceId=e[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER],t.externalSessionId=e[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER],t.sessionId=e[r.OmnilogHeaders.SESSION_ID_HEADER],t.flowId=e[r.OmnilogHeaders.FLOW_ID_HEADER],t.flowName=e[r.OmnilogHeaders.FLOW_NAME_HEADER],t.stepName=e[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER],t.product=e[r.OmnilogHeaders.PRODUCT_HEADER],t.productVariant=e[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER],t.mid=e[r.OmnilogHeaders.MID_HEADER]),t},getInfoFromClientToken:function(e){if(!e)return{};var t=e.experienceId,o=e.experienceName,n=e.flowId,i=e.flowName,r=e.stepName,a=e.flowStep;return{experience:{experienceInstanceId:t,experienceName:o,product:e.product,productVariant:e.productVariant},activeFlow:{flowId:n,flowName:i,stepName:r,flowStep:a},session:{sessionId:e.sessionId,externalSessionId:e.externalSessionId}}},buildClientTokenHeader:function(e){if(!e)return null;var t={};return e.experienceName&&(t[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER]=e.experienceName),e.experienceId&&(t[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]=e.experienceId),e.externalDeviceId&&(t[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER]=e.externalDeviceId),e.externalSessionId&&(t[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER]=e.externalSessionId),e.sessionId&&(t[r.OmnilogHeaders.SESSION_ID_HEADER]=e.sessionId),e.flowId&&(t[r.OmnilogHeaders.FLOW_ID_HEADER]=e.flowId),e.flowName&&(t[r.OmnilogHeaders.FLOW_NAME_HEADER]=e.flowName),e.stepName&&(t[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER]=e.stepName),e.product&&(t[r.OmnilogHeaders.PRODUCT_HEADER]=e.product),e.productVariant&&(t[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER]=e.productVariant),e.mid&&(t[r.OmnilogHeaders.MID_HEADER]=e.mid),t}},t.default),{FlowUtils:i.FlowUtils,ExperienceUtils:i.ExperienceUtils,UserAttributeUtils:i.UserAttributeUtils,IdentityUtils:i.IdentityUtils,getTestRegisteredEventDetails:function(e){return void 0===e&&(e={}),{test_selections:JSON.stringify(e)}},isNull:function(e){return null==e},countryCodeMapping:function(e){return e===c.default["co.uk"].countryCode?"UK":e},getProductInfoByRoutingDescriptor:function(e){var t=e||{},o=t.namespace,e=void 0===o?"":o,o=t.siteName,t=void 0===o?"":o,o=r.RouterNSProductMap[e];if(!o)return null;e=u.countryCodeMapping(t.replace("".concat(e,"_"),""));return e?{product:o,productVariant:"".concat(o," ").concat(e)}:null},stringifyIfExist:function(e){return u.isNull(e)?e:JSON.stringify(e)},getViewPortDimensions:function(){var e=document.documentElement||{};return{viewportWidth:Math.max(e.clientWidth||0,window.innerWidth||0)||null,viewportHeight:Math.max(e.clientHeight||0,window.innerHeight||0)||null}}});i.default=u},27:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOGGER_NAMESPACE=t.MAKKARI_API_ENDPOINT=t.MAKKARI_DEVICE_STORAGE_KEY=void 0,t.MAKKARI_DEVICE_STORAGE_KEY="makkari_device",t.MAKKARI_API_ENDPOINT="/j/cdp-api",t.LOGGER_NAMESPACE="makkariDebug"},658:function(e,t,o){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var n,a=o(924),l=o(27),s=o(214),E=o(338),i=o(316);function d(e){(0,s.log)("MakkariSDK onSuccess::",e)}function I(e,t){(0,s.log)("MakkariSDK onError::",e,t)}function S(e,t,o,n){(0,s.sendFallbackTracking)(o),(0,i.logError)(a.OmnilogError.CALL_MAKKARI_API,e,n)}c.getInstance=function(){var e;return"undefined"!=typeof window&&(null!==(e=null===window||void 0===window?void 0:window.HZ)&&void 0!==e&&e.Makkari?n=window.HZ.Makkari:(n=new c,null!==window&&void 0!==window&&window.HZ&&(window.HZ.Makkari=n))),n},c.prototype.init=function(e,t,o,n){(0,s.log)("MakkariSDK init");var i=n||{},r=i.enableXhrTransport,a=i.enablePostMethod,n=void 0!==a&&a,a=i.authToken,i=i.environment;this.enableXhrTransport=void 0!==r&&r,this.enablePostMethod=n,this.authToken=a,this.environment=i},c.prototype.getDeviceId=function(){var e=(0,s.getDevice)();return null==e?void 0:e.deviceId},c.prototype.getMid=function(){var e;return null===(e=this.identity)||void 0===e?void 0:e.mId},c.prototype.getIdentity=function(e,t,o){(0,s.log)("MakkariSDK getIdentity");var n=(0,s.normalizeUserIdentities)(e);this.callMakkariApi("".concat(l.MAKKARI_API_ENDPOINT,"/identify"),"POST",r({},n),function(e){void 0===e&&(e={}),"function"==typeof t&&t(r({input:n},e))},o)},c.prototype.getIdentityInput=function(){return this.identity?this.identity.input:""},c.prototype.sendEvent=function(e,t){void 0===t&&(t={}),(0,s.log)("MakkariSDK sendEvent::",e),this.callMakkariApi("".concat(l.MAKKARI_API_ENDPOINT,"/events"),"POST",{event:e},t.onSuccess,t.onError)},c.prototype.getProductInfo=function(){return(0,s.getProductInfo)()},c.prototype.sendIdentityEvent=function(e,t,o,n){(0,s.log)("MakkariSDK sendIdentityEvent::",e,this.identity);var i=null,t=(0,s.normalizeUserIdentities)(t);if(e===a.IdentityEventType.LOGIN)i="login";else{if(e!==a.IdentityEventType.LOGOUT)return void(0,s.log)("MakkariSDK sendIdentityEvent:: unsupported eventType ".concat(e));i="logout",this.identity&&this.identity.mId&&(i="".concat(this.identity.mId,"/logout")),t=this.getIdentityInput()}this.callMakkariApi("".concat(l.MAKKARI_API_ENDPOINT,"/user/").concat(i),"POST",r({},t),o,n)},c.prototype.callMakkariApi=function(e,t,o,n,i){var r,a=this,l="function"==typeof n?n:d,c="function"==typeof i?i:I,n=(0,s.getEventHost)((0,E.isTestingEnv)(this.environment));if((0,s.isHouzzHost)()&&this.enableXhrTransport&&this.enablePostMethod){i={"Content-Type":"application/json; charset=utf-8"};i["x-makkari-jwt-token"]=this.authToken||(null===(r=null===(r=s._global.HZ)||void 0===r?void 0:r.ctx)||void 0===r?void 0:r.makkariToken),i["x-makkari-c2-token"]=null===(r=null===(r=s._global.HZ)||void 0===r?void 0:r.data)||void 0===r?void 0:r.CSRFToken,fetch("".concat(n).concat(e),{method:t,body:JSON.stringify(o),headers:i,keepalive:!0}).then(function(e){if(e.ok)return e.json();var t=new Error("Makkari API call failed: incorrect HTTP status code returned");throw t.statusText=e.statusText,t}).then(function(e){l(e)}).catch(function(e){S(e,0,o,a.environment),c(e.statusText,e.message)})}else if((0,s.isHouzzHost)()&&this.enableXhrTransport){var u=encodeURIComponent(JSON.stringify(o));fetch("".concat(n).concat(e,"?p=").concat(u),{method:"get",keepalive:!0}).then(function(e){if(e.ok)return e.json();var t=new Error("Makkari API call failed: incorrect HTTP status code returned");throw t.statusText=e.statusText,t}).then(function(e){l(e)}).catch(function(e){S(e,0,o,a.environment),c(e.statusText,e.message)})}else try{u=encodeURIComponent(JSON.stringify(o)),s._global.$.ajax({url:"".concat(n).concat(e,"?p=").concat(u),dataType:"jsonp",success:l,error:function(e,t,o){c(t,o)}})}catch(e){S(e,0,o,this.environment),c(e)}},o=c;function c(){(0,s.log)("MakkariSDK constructed"),this.enableXhrTransport=!1,this.enablePostMethod=!1,this.authToken="",this.environment=""}t.default=o},214:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendFallbackTracking=t.getEventHost=t.normalizeUserIdentities=t.isHouzzHost=t.getProductInfo=t.getDevice=t.uuidv4=t._global=t.log=void 0;var i=n(o(670)),l=o(924),c=n(o(304)),u=n(o(345)),r=o(27);function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}t.log=function(){},t._global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},t.uuidv4=a,t.getDevice=function(){var e=i.default.getLocalStorage();try{var t=e.get(r.MAKKARI_DEVICE_STORAGE_KEY);if(t)return t;var o={deviceId:a()};return e.set(r.MAKKARI_DEVICE_STORAGE_KEY,o),o}catch(e){}},t.getProductInfo=function(){if(document.location&&document.location.hostname)return function(e){var t=e?e.split("."):[],o=t.length,n=l.RouterNSProductMap.UNKNOWN,i=l.RouterNSProductMap.UNKNOWN;if(o<2)return{product:n,productVariant:i};"www"===t[0]?n=l.RouterNSProductMap.HOUZZ:"pro"===t[0]&&(n=l.RouterNSProductMap.PRO_SOLUTIONS);var r=o-1,a=null,e=t[r],o=u.default;return(a=o[e]||0<=r-1&&o[e=t[r-1]+"."+t[r]]?o[e]:a)&&(a=c.default.countryCodeMapping(a.countryCode),i="".concat(n," ").concat(a)),{product:n,productVariant:i}}(document.location.hostname)},t.isHouzzHost=function(){var e=document.location.host.split("."),t=-1!==["www","pro"].indexOf(e[0]),e=-1!==["houzz","houzz2","stghouzz","houzzdev"].indexOf(e[1]);return t&&e},t.normalizeUserIdentities=function(e){return{user_id:e?e.customerid:null,user_name:e?e.other:null,visitor_id:e?e.other2:null}},t.getEventHost=function(e){return e?"https://evt.stghouzz.com":"https://evt.houzz.com"},t.sendFallbackTracking=function(e){}},670:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(150);function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,o){return t&&a(e.prototype,t),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}var c=(l(S,[{key:"setData",value:function(e,t,o,n){return!(!e||!t||(e[t]=o,n&&(o=Date.now(),e[t+r.CONSTS.EXPIRE_KEY]=o+1e3*Math.abs(n)),0))}},{key:"setNS",value:function(e,t,o,n){return!(!e||!n)&&(this.data[n]||(this.data[n]={}),this.setData(this.data[n],e,t,o))}},{key:"set",value:function(e,t,o){return this.setData(this.data,e,t,o)}},{key:"deleteNS",value:function(e){e&&this.data[e]&&delete this.data[e]}},{key:"getNS",value:function(e,t){return e&&t&&this.data[t]?this.getFromData(this.data[t],e):null}},{key:"getFromData",value:function(e,t){if(!e||!t)return null;var o=e[t],n=e[t+r.CONSTS.EXPIRE_KEY];return n&&Date.now()>=n?(delete e[t],delete e[t+r.CONSTS.EXPIRE_KEY],null):o}},{key:"get",value:function(e){return this.getFromData(this.data,e)}},{key:"remove",value:function(e){var t=this.namespace?this.data[this.namespace]:this.data,o=t[e];return delete t[e],delete t[e+r.CONSTS.EXPIRE_KEY],o}}]),S),u=(l(I,[{key:"get",value:function(e){var t=window.sessionStorage.getItem(e),o=window.sessionStorage.getItem(e+r.CONSTS.EXPIRE_KEY),n=null;if(o){var i=Date.now();try{if(i>=JSON.parse(o))return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),n}catch(t){return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),n}}try{n=JSON.parse(t)}catch(e){n=t}return n}},{key:"remove",value:function(e){var t=this.get(e);return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}},{key:"set",value:function(e,t,o){if(t&&"object"===n(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.sessionStorage.setItem(e,t),o&&(t=Date.now(),window.sessionStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}}]),I),s=(l(d,[{key:"isExpired",value:function(e){var t=window.localStorage.getItem(e+r.CONSTS.EXPIRE_KEY);if(t){var o=Date.now();try{if(o>=JSON.parse(t))return!0}catch(e){return!0}}}},{key:"get",value:function(e){var t=window.localStorage.getItem(e),o=null;if(this.isExpired(e))return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),o;try{o=JSON.parse(t)}catch(e){o=t}return o}},{key:"set",value:function(e,t,o){if(t&&"object"===n(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.localStorage.setItem(e,t),o&&(t=Date.now(),window.localStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}},{key:"remove",value:function(e){var t=this.get(e);return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}}]),d),o=(l(E,[{key:"verifyStorageSupport",value:function(){try{window.localStorage.setItem("hz",1),window.localStorage.removeItem("hz"),this.isLocalStorageSupported=!0}catch(e){}try{window.sessionStorage.setItem("hz",1),window.sessionStorage.removeItem("hz"),this.isSessionStorageSupported=!0}catch(e){}}},{key:"getSessionStorage",value:function(){return this.isSessionStorageSupported?(null===this.sessionStorage&&(this.sessionStorage=new u),this.sessionStorage):this.getInMemoryStorage()}},{key:"getLocalStorage",value:function(){return this.isLocalStorageSupported?(null===this.localStorage&&(this.localStorage=new s),this.localStorage):this.getInMemoryStorage()}},{key:"getInMemoryStorage",value:function(){return this.fallbackStorage}}]),new E);function E(){i(this,E),this.isSessionStorageSupported=!1,this.isLocalStorageSupported=!1,this.sessionStorage=null,this.localStorage=null,this.fallbackStorage=new c,this.verifyStorageSupport()}function d(){i(this,d)}function I(){i(this,I)}function S(){i(this,S),this.data={}}t.default=o},345:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={com:{ccTLD:"us",domain:"com",locale:"en-US",countryCode:"US",countryNativeName:"United States",timeZone:"America/Los_Angeles",siteId:"101",localeId:"1001",seoLang:"en",commonAvailableInCountryCodes:["US","CA"]},"co.uk":{ccTLD:"uk",domain:"co.uk",locale:"en-GB",countryCode:"GB",countryNativeName:"United Kingdom",timeZone:"Europe/London",siteId:"102",localeId:"1002",seoLang:"en-gb",commonAvailableInCountryCodes:["GB"]},"com.au":{ccTLD:"au",domain:"com.au",locale:"en-AU",countryCode:"AU",countryNativeName:"Australia",timeZone:"Australia/ACT",siteId:"103",localeId:"1003",seoLang:"en-au",commonAvailableInCountryCodes:["AU"]},de:{ccTLD:"de",domain:"de",locale:"de-DE",countryCode:"DE",countryNativeName:"Deutschland",timeZone:"Europe/Berlin",siteId:"104",localeId:"1004",seoLang:"de",commonAvailableInCountryCodes:["DE","AT"]},fr:{ccTLD:"fr",domain:"fr",locale:"fr-FR",countryCode:"FR",countryNativeName:"France",timeZone:"Europe/Paris",siteId:"105",localeId:"1005",seoLang:"fr",commonAvailableInCountryCodes:["FR","BE"]},ru:{ccTLD:"ru",domain:"ru",locale:"ru-RU",countryCode:"RU",countryNativeName:"Россия",timeZone:"Europe/Moscow",siteId:"106",localeId:"1006",seoLang:"ru",commonAvailableInCountryCodes:["RU"]},jp:{ccTLD:"jp",domain:"jp",locale:"ja-JP",countryCode:"JP",countryNativeName:"日本",timeZone:"Asia/Tokyo",siteId:"107",localeId:"1007",seoLang:"ja",commonAvailableInCountryCodes:["JP"]},it:{ccTLD:"it",domain:"it",locale:"it-IT",countryCode:"IT",countryNativeName:"Italia",timeZone:"Europe/Rome",siteId:"108",localeId:"1008",seoLang:"it",commonAvailableInCountryCodes:["IT"]},es:{ccTLD:"es",domain:"es",locale:"es-ES",countryCode:"ES",countryNativeName:"España",timeZone:"Europe/Madrid",siteId:"109",localeId:"1009",seoLang:"es",commonAvailableInCountryCodes:["ES"]},dk:{ccTLD:"dk",domain:"dk",locale:"da-DK",countryCode:"DK",countryNativeName:"Danmark",timeZone:"Europe/Copenhagen",siteId:"110",localeId:"1010",seoLang:"da",commonAvailableInCountryCodes:["DK"]},no:{ccTLD:"no",domain:"no",locale:"nb-NO",countryCode:"NO",countryNativeName:"Norway",timeZone:"Europe/Oslo",siteId:"111",localeId:"1011",seoLang:"nb",commonAvailableInCountryCodes:["NO"]},fi:{ccTLD:"fi",domain:"fi",locale:"fi-FI",countryCode:"FI",countryNativeName:"Suomi",timeZone:"Europe/Helsinki",siteId:"112",localeId:"1012",seoLang:"fi",commonAvailableInCountryCodes:["FI"]},se:{ccTLD:"se",domain:"se",locale:"sv-SE",countryCode:"SE",countryNativeName:"Sverige",timeZone:"Europe/Stockholm",siteId:"113",localeId:"1013",seoLang:"sv",commonAvailableInCountryCodes:["SE"]},ie:{ccTLD:"ie",domain:"ie",locale:"en-IE",countryCode:"IE",countryNativeName:"Ireland",timeZone:"Europe/Dublin",siteId:"114",localeId:"1014",seoLang:"en-ie",commonAvailableInCountryCodes:["IE"]},"co.nz":{ccTLD:"nz",domain:"co.nz",locale:"en-NZ",countryCode:"NZ",countryNativeName:"New Zealand",timeZone:"Pacific/Auckland",siteId:"115",localeId:"1015",seoLang:"en-nz",commonAvailableInCountryCodes:["NZ"]},"com.sg":{ccTLD:"sg",domain:"com.sg",locale:"en-SG",countryCode:"SG",countryNativeName:"Singapore",timeZone:"Asia/Singapore",siteId:"116",localeId:"1016",seoLang:"en-sg",commonAvailableInCountryCodes:["SG"]},in:{ccTLD:"in",domain:"in",locale:"en-IN",countryCode:"IN",countryNativeName:"India",timeZone:"Asia/Calcutta",siteId:"117",localeId:"1017",seoLang:"en-in",commonAvailableInCountryCodes:["IN"]},nl:{ccTLD:"nl",domain:"nl",locale:"nl-NL",countryCode:"NL",countryNativeName:"Netherlands",timeZone:"Europe/Amsterdam",siteId:"118",localeId:"1018",seoLang:"nl",commonAvailableInCountryCodes:["NL"]},at:{ccTLD:"at",domain:"at",locale:"de-AT",countryCode:"AT",countryNativeName:"Austria",timeZone:"Europe/Vienna",siteId:"119",localeId:"1019",seoLang:"de-at",commonAvailableInCountryCodes:["AT"]}}},150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTS=void 0,t.CONSTS={EXPIRE_KEY:"_expires"}},338:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isTestingEnv=n._global=void 0,n._global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},n.isTestingEnv=function(e){var t,o=!0;return o="production"===(e=e||(null!==(t=null===(t=null===n._global||void 0===n._global?void 0:n._global.HZ)||void 0===t?void 0:t.ctx)&&void 0!==t&&t.env?n._global.HZ.ctx.env:null!==(t=null===(t=null===(t=null===n._global||void 0===n._global?void 0:n._global.HZ)||void 0===t?void 0:t.utils)||void 0===t?void 0:t.OmnilogData)&&void 0!==t&&t.environment?n._global.HZ.utils.OmnilogData.environment:""))||"prod"===e?!1:o}},144:function(e,t){void 0===(t=function(e,t){"use strict";function E(t){try{delete window[t]}catch(e){window[t]=void 0}}function d(e){e=document.getElementById(e);e&&document.getElementsByTagName("head")[0].removeChild(e)}t.exports=function(r){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],l=r,c=a.timeout||5e3,u=a.jsonpCallback||"callback",s=void 0;return new Promise(function(t,e){var o=a.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),n=u+"_"+o;window[o]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),d(n),E(o)},l+=-1===l.indexOf("?")?"?":"&";var i=document.createElement("script");i.setAttribute("src",""+l+u+"="+o),a.charset&&i.setAttribute("charset",a.charset),a.nonce&&i.setAttribute("nonce",a.nonce),a.referrerPolicy&&i.setAttribute("referrerPolicy",a.referrerPolicy),i.id=n,document.getElementsByTagName("head")[0].appendChild(i),s=setTimeout(function(){e(new Error("JSONP request to "+r+" timed out")),E(o),d(n),window[o]=function(){E(o)}},c),i.onerror=function(){e(new Error("JSONP request to "+r+" failed")),E(o),d(n),s&&clearTimeout(s)}})}}.apply(t,[t,e]))||(e.exports=t)}},i={},function e(t){var o=i[t];if(void 0!==o)return o.exports;o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(658);var n,i}),HZ.utils.MakkariSDK=window.Omnilog["makkari-sdk"].default;

window.hzmr.push("makkariSDK:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End makkariSDK.js  **************/
/************* Start omnilogSessionUtils.js for locale en-US **************/
try {HZ.ns("HZ.utils"),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Omnilog=t():(e.Omnilog=e.Omnilog||{},e.Omnilog["omnilog-session-utils"]=t())}(self,()=>(()=>{"use strict";var n={924:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.OmnilogError=t.DeviceType=t.OmnilogLocalStorageKey=t.RouterNSProductMap=t.IdentityEventType=t.ViewMode=t.DeviceOrientation=t.EventInitiator=t.TestBotType=t.UIEvents=t.Channel=t.ComponentOsType=t.ComponentType=t.ComponentName=t.ComponentDetailedType=t.OmnilogStatusCodes=t.OmnilogHeaders=t.OmniLoggerConst=t.OmniLoggerEventNames=void 0,(n=t.OmniLoggerEventNames||(t.OmniLoggerEventNames={})).EXPERIENCE_LOADED="Experience Loaded",n.EXPERIENCE_UNLOADED="Experience Unloaded",n.OMNILOG_EVENT="omnilog",n.TEST_REGISTERED="Tests Registered",n.SESSION_STARTED="Session Started",n.USER_ATTRIBUTE_UPDATED="User Attribute Updated",(t.OmniLoggerConst||(t.OmniLoggerConst={})).OMNILOG_TOKEN_HEADER_NAME="X-HZ-OMNILOG-TOKEN",(n=t.OmnilogHeaders||(t.OmnilogHeaders={})).EXTERNAL_SESSION_ID_HEADER="x-ol-ext-session-id",n.SESSION_ID_HEADER="x-ol-session-id",n.EXTERNAL_DEVICE_ID_HEADER="x-ol-ext-device-id",n.EXPERIENCE_ID_HEADER="x-ol-exp-id",n.EXPERIENCE_NAME_HEADER="x-ol-exp-name",n.FLOW_ID_HEADER="x-ol-flow-id",n.FLOW_NAME_HEADER="x-ol-flow-name",n.FLOW_STEP_NAME_HEADER="x-ol-step-name",n.PRODUCT_HEADER="x-ol-product",n.PRODUCT_VARIANT_HEADER="x-ol-product-variant",n.MID_HEADER="x-ol-mid",(n=t.OmnilogStatusCodes||(t.OmnilogStatusCodes={}))[n.STATUS_CODE_SUCCESS=1]="STATUS_CODE_SUCCESS",n[n.STATUS_CODE_FAILURE=-1]="STATUS_CODE_FAILURE",(n=t.ComponentDetailedType||(t.ComponentDetailedType={}))[n.C2_LEGACY_WEB=101]="C2_LEGACY_WEB",n[n.JUWKAA_ISOMORHPIC_JS_WEB=102]="JUWKAA_ISOMORHPIC_JS_WEB",n[n.SITE_DESIGNER_LEGACY_WEB=103]="SITE_DESIGNER_LEGACY_WEB",n[n.SITE_DESIGNER_ISOMORPHIC_JS_WEB=104]="SITE_DESIGNER_ISOMORPHIC_JS_WEB",n[n.IVY_LEGACY_WEB=105]="IVY_LEGACY_WEB",n[n.IVY_ISOMORPHIC_JS_WEB=106]="IVY_ISOMORPHIC_JS_WEB",n[n.CONX_LEGACY_WEB=107]="CONX_LEGACY_WEB",n[n.WINDOWS_MOBILE_APP=110]="WINDOWS_MOBILE_APP",n[n.PRO_SITES_WEB=112]="PRO_SITES_WEB",n[n.HOUZZ_PRO_CLIPPER=151]="HOUZZ_PRO_CLIPPER",n[n.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",n[n.HOUZZ_IOS_MOBILE_APP=201]="HOUZZ_IOS_MOBILE_APP",n[n.HOUZZ_ANDROID_MOBILE_APP=202]="HOUZZ_ANDROID_MOBILE_APP",n[n.HOUZZ_PRO_IOS_MOBILE_APP=251]="HOUZZ_PRO_IOS_MOBILE_APP",n[n.HOUZZ_PRO_ANDROID_MOBILE_APP=252]="HOUZZ_PRO_ANDROID_MOBILE_APP",n[n.C2_WEB_SERVER=301]="C2_WEB_SERVER",n[n.JUKWAA_WEB_SERVER=302]="JUKWAA_WEB_SERVER",n[n.GRAPHQL_SERVER=303]="GRAPHQL_SERVER",n[n.C2_SERVICE=304]="C2_SERVICE",n[n.IDENTITY_SERVICE=305]="IDENTITY_SERVICE",n[n.AD_SERVER=306]="AD_SERVER",n[n.BATCH=307]="BATCH",n[n.CONX_SERVER=308]="CONX_SERVER",n[n.PRO_SITES_WEB_SERVER=312]="PRO_SITES_WEB_SERVER",n[n.IVY_SERVICE_SERVER=315]="IVY_SERVICE_SERVER",n[n.EPN=401]="EPN",n[n.SALESFORCE=501]="SALESFORCE",n[n.BLUESHIFT=502]="BLUESHIFT",n[n.ELOQUA=503]="ELOQUA",n[n.UNKNOWN=-1]="UNKNOWN",(n=t.ComponentName||(t.ComponentName={})).JUKWAA_WEB="Jukwaa Web Client",n.PRO_SITES_WEB="Pro Site Web Client",n.SITE_DESIGNER_WEB="Site Designer Web Client",n.GRAPHQL_SERVER="Graphql Server",n.GRAPHQL_HOUZZ_PRO_SERVER="GraphQL Houzz Pro Server",n.JUKWAA_WEB_SERVER="Jukwaa Web Server",n.PRO_SITES_WEB_SERVER="Pro Site Web Server",n.SITE_DESIGNER_WEB_SERVER="Site Designer Web Server",n.IVY_SERVICE_SERVER="Ivy Service Server",n.GMAIL_CRM_CHROME_EXTENSION="Gmail CRM Chrome Extension",n.PRODUCT_CLIPPER_CHROME_EXTENSION="Product Clipper Chrome Extension",n.IMAGE_CLIPPER_CHROME_EXTENSION="Image Clipper Chrome Extension",n.HOUZZ_PRO_CLIPPER="Houzz Pro Clipper",(n=t.ComponentType||(t.ComponentType={}))[n.CLIENT_BROWSER=100]="CLIENT_BROWSER",n[n.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",n[n.SERVER_WEB=300]="SERVER_WEB",n[n.SERVER_OFFLINE=400]="SERVER_OFFLINE",n[n.SERVER_SERVICE=500]="SERVER_SERVICE",(n=t.ComponentOsType||(t.ComponentOsType={}))[n.LINUX=1]="LINUX",n[n.WINDOWS=2]="WINDOWS",n[n.OSX=3]="OSX",n[n.IOS=4]="IOS",n[n.ANDROID=5]="ANDROID",n[n.OTHER=6]="OTHER",(n=t.Channel||(t.Channel={})).DIRECT="Direct",n.EMAIL="Email",n.PAID="Paid",n.SEARCH="Search",n.SOCIAL="Social",n.PARTNER="Partner",n.INTERNAL="Internal",n.REFERRAL="Referral",n[n.UNKNOWN=100]="UNKNOWN",(n=t.UIEvents||(t.UIEvents={})).ELEMENT_CLICKED="Element Clicked",n.ELEMENT_FOCUSED="Element Focused",n.ELEMENT_BLURRED="Element Blurred",n.ELEMENT_SCROLLED="Element Scrolled",n.ELEMENT_VIEWED="Element Viewed",n.ELEMENT_EXPANDED="Element Expanded",n.ELEMENT_COLLAPSED="Element Collapsed",n.INPUT_CHANGED="Input Changed",n.MEDIA_PLAYED="Media Played",n.MEDIA_PAUSED="Media Paused",n.MEDIA_PLAY_COMPLETED="Media Play Completed",n.MEDIA_TIME_CHANGED="Media Time Changed",n.MEDIA_RESTARTED="Media Restarted",n.FORM_SUBMITTED="Form Submitted",(n=t.TestBotType||(t.TestBotType={}))[n.NONE=0]="NONE",n[n.AUTOMATION=1]="AUTOMATION",n[n.MANUAL=4]="MANUAL",n[n.BATCH=16]="BATCH",n[n.HOUZZ_STAFF=32]="HOUZZ_STAFF",n[n.ANALYTICAL_BOT=64]="ANALYTICAL_BOT",(n=t.EventInitiator||(t.EventInitiator={}))[n.USER_SERVER=0]="USER_SERVER",n[n.USER_CLIENT=1]="USER_CLIENT",n[n.APPLICATION_SERVER=2]="APPLICATION_SERVER",n[n.APPLICATION_CLIENT=3]="APPLICATION_CLIENT",n[n.PRO_AI_ASSIST_USER_SERVER=4]="PRO_AI_ASSIST_USER_SERVER",n[n.PRO_AI_ASSIST_USER_CLIENT=5]="PRO_AI_ASSIST_USER_CLIENT",n[n.PRO_AI_ASSIST_APPLICATION_SERVER=6]="PRO_AI_ASSIST_APPLICATION_SERVER",n[n.PRO_AI_ASSIST_APPLICATION_CLIENT=7]="PRO_AI_ASSIST_APPLICATION_CLIENT",(n=t.DeviceOrientation||(t.DeviceOrientation={}))[n.PORTRAIT=1]="PORTRAIT",n[n.LANDSCAPE=2]="LANDSCAPE",(n=t.ViewMode||(t.ViewMode={})).STANDALONE="Standalone",n.DEFAULT="Default",n.LIGHTBOX="Lightbox",n.QUICKVIEW="Quick View",(n=t.IdentityEventType||(t.IdentityEventType={})).LOGIN="login",n.LOGOUT="logout",n.MODIFY="modify",t.RouterNSProductMap={HOUZZ:"Houzz",PRO_SOLUTIONS:"Houzz Pro",UNKNOWN:"UNKNOWN"},(n=t.OmnilogLocalStorageKey||(t.OmnilogLocalStorageKey={})).ActiveExperience="OMNILOG_ACTIVE_EXPERIENCE",n.FlowStack="OMNILOG_FLOW_STACK",n.ParentFlow="OMNILOG_PARENT_FLOW",n.LogoutCount="OMNILOG_LOGOUT_COUNT",(n=t.DeviceType||(t.DeviceType={}))[n.NONE=0]="NONE",n[n.DESKTOP=1]="DESKTOP",n[n.TABLET=2]="TABLET",n[n.SMARTPHONE=3]="SMARTPHONE",n[n.SMART_TV=4]="SMART_TV",n[n.OTHER=5]="OTHER",(t=t.OmnilogError||(t.OmnilogError={})).INIT="omnilog.init",t.CALL_MAKKARI_API="omnilog.callMakkariApi",t.EXPERIENCE_LOADED="omnilog.experienceLoaded",t.EXPERIENCE_UNLOADED="omnilog.experienceUnLoaded",t.SEND_INTERACTION_EVENT="omnilog.sendInteractionEvent",t.SEND_OUTCOME_EVENT="omnilog.sendOutcomeEvent",t.SEND_IDENTITY_EVENT="omnilog.sendIdentityEvent",t.FLOW_STARTED="omnilog.flowStarted",t.FLOW_STEP_LOADED="omnilog.flowStepLoaded",t.FLOW_STEP_COMPLETED="omnilog.flowStepCompleted",t.FLOW_COMPLETED="omnilog.flowCompleted",t.FLOW_STEP_UNLOADED="omnilog.flowStepUnloaded",t.DUPLICATE_EXPERIENCE="omnilog.duplicate_experience",t.BUILD_CLIENT_TOKEN="omnilog.buildClientToken",t.LOG_ERROR="omnilog.log_error"},84:function(e,t,n){var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTestBotType=t.getSessionId=t.getExtSessionId=void 0;function i(e){return e?{utm_source:(e=new URL(e).searchParams).get("utm_source"),utm_campaign:e.get("utm_campaign"),utm_term:e.get("utm_term"),utm_content:e.get("utm_content"),utm_medium:e.get("utm_medium"),m_refid:e.get("m_refid")}:null}function s(e){return!!(!(e=e.lastActiveTime)||e<0||isNaN(e))||Date.now()-e>r}function E(e,t,n,o){var r=Date.now(),e={sessionId:(0,S.v4)(),sessionStartTime:r,lastActiveTime:r,channel:n||R(e,t),campaign:o||f(e)};return c.default.getLocalStorage().set(g,e),e}function l(){try{var e=A();return e?(e.lastActiveTime=Date.now(),void c.default.getLocalStorage().set(g,e)):void 0}catch(e){}}var u=n(924),c=o(n(670)),S=n(614),_=o(n(851)),g="OMNILOG_SESSION",r=18e5,d=/refid=([^&]+)/,m=/-ocnt-/,I=/ptr-|ptr_|partners_/,O=/-ptr-mpl/,p={hostname:"",pathname:"",searchParams:""},R=function(e,t){var n=null,o=new URL(e).searchParams,r=t?new URL(t):p,a=r.hostname,i=r.pathname,s=r.searchParams,r=a+("/"===i?"":i),i=new RegExp(_.default.houzz).test(a);new RegExp(_.default.unknown).test(r)?n=null:new RegExp(_.default.social).test(r)?n=u.Channel.SOCIAL:new RegExp(_.default.email).test(r)?n=u.Channel.EMAIL:new RegExp(_.default.search).test(r)&&(n=u.Channel.SEARCH);a=s.toString(),r=o.toString();if(new RegExp(d).test(a)||new RegExp(d).test(r)){s="",o=a.match(d),r=r.match(d);return Array.isArray(o)&&0<o.length?s=o[1]:Array.isArray(r)&&0<r.length&&(s=r[1]),new RegExp(m).test(s)?u.Channel.SOCIAL:new RegExp(I).test(s)&&!new RegExp(O).test(s)?u.Channel.PARTNER:u.Channel.PAID}return(n===u.Channel.SEARCH||n===u.Channel.EMAIL||null===n)&&new RegExp(/\/nllc\/|source=gmail/).test(a)||new RegExp(/utm_medium=email|source=marketing_email|lsmr=Email/).test(e)?u.Channel.EMAIL:null===n?t?i?u.Channel.INTERNAL:u.Channel.REFERRAL:u.Channel.DIRECT:n},f=function(e){if(!e)return null;e=new RegExp("[?&]utm_campaign(=([^&#]*)|&|#|$)").exec(e);return e&&e[2]?e[2]:null},A=function(){return c.default.getLocalStorage().get(g)};t.getExtSessionId=function(){var e=A();return(null==e?void 0:e.sessionId)||""},t.getSessionId=function(){var e=A();return(null==e?void 0:e.sessionId)||""},t.getTestBotType=function(){if("undefined"!=typeof document){var e=document.cookie||"";return-1!==e.indexOf("tt=automation")?u.TestBotType.AUTOMATION:-1!==e.indexOf("tt=manual")?u.TestBotType.MANUAL:void 0}},t.default={OMNILOG_SESSION_STORAGE_KEY:g,SESSION_EXPIRE_IN_MS:r,isSessionTimedOut:s,computeChannel:R,computeCampaign:f,getSession:A,updateSession:function(e,t){if(e){var n=A();if(!n)return{session:E(e,t),isContinued:!1};var o=s(n),r=R(e,t),a=f(e),i=n.channel,n=n.campaign;return o&&r===u.Channel.INTERNAL?{session:E("","",i),isContinued:!0}:(o||r!==u.Channel.INTERNAL)&&(o||null!==r&&r!==i||null!==a&&a!=n)?{session:E(e,t),isContinued:!1}:void l()}},buildNewSession:E,getSessionStartEventDetails:function(e,t,n,o){var r=i(e);return a(a({session_channel:n.channel},r),{is_continued_session:o,url:e,referrer_url:t})},parseUtmQueries:i,shouldFireNewSession:function(e,t,n){if(s(e))return!0;var o=e.channel,r=e.campaign;try{var a=R(t,n);if(null!==a&&a!==o)return!0;var i=f(t);return null!==i&&i!=r}catch(e){return!1}},getExtSessionId:t.getExtSessionId,getSessionId:t.getSessionId}},670:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(150);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var E=(s(g,[{key:"setData",value:function(e,t,n,o){return!(!e||!t||(e[t]=n,o&&(n=Date.now(),e[t+a.CONSTS.EXPIRE_KEY]=n+1e3*Math.abs(o)),0))}},{key:"setNS",value:function(e,t,n,o){return!(!e||!o)&&(this.data[o]||(this.data[o]={}),this.setData(this.data[o],e,t,n))}},{key:"set",value:function(e,t,n){return this.setData(this.data,e,t,n)}},{key:"deleteNS",value:function(e){e&&this.data[e]&&delete this.data[e]}},{key:"getNS",value:function(e,t){return e&&t&&this.data[t]?this.getFromData(this.data[t],e):null}},{key:"getFromData",value:function(e,t){if(!e||!t)return null;var n=e[t],o=e[t+a.CONSTS.EXPIRE_KEY];return o&&Date.now()>=o?(delete e[t],delete e[t+a.CONSTS.EXPIRE_KEY],null):n}},{key:"get",value:function(e){return this.getFromData(this.data,e)}},{key:"remove",value:function(e){var t=this.namespace?this.data[this.namespace]:this.data,n=t[e];return delete t[e],delete t[e+a.CONSTS.EXPIRE_KEY],n}}]),g),l=(s(_,[{key:"get",value:function(e){var t=window.sessionStorage.getItem(e),n=window.sessionStorage.getItem(e+a.CONSTS.EXPIRE_KEY),o=null;if(n){var r=Date.now();try{if(r>=JSON.parse(n))return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),o}catch(t){return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),o}}try{o=JSON.parse(t)}catch(e){o=t}return o}},{key:"remove",value:function(e){var t=this.get(e);return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),t}},{key:"set",value:function(e,t,n){if(t&&"object"===o(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.sessionStorage.setItem(e,t),n&&(t=Date.now(),window.sessionStorage.setItem(e+a.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(n))),!0}}]),_),u=(s(S,[{key:"isExpired",value:function(e){var t=window.localStorage.getItem(e+a.CONSTS.EXPIRE_KEY);if(t){var n=Date.now();try{if(n>=JSON.parse(t))return!0}catch(e){return!0}}}},{key:"get",value:function(e){var t=window.localStorage.getItem(e),n=null;if(this.isExpired(e))return window.localStorage.removeItem(e),window.localStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),n;try{n=JSON.parse(t)}catch(e){n=t}return n}},{key:"set",value:function(e,t,n){if(t&&"object"===o(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.localStorage.setItem(e,t),n&&(t=Date.now(),window.localStorage.setItem(e+a.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(n))),!0}},{key:"remove",value:function(e){var t=this.get(e);return window.localStorage.removeItem(e),window.localStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),t}}]),S),n=(s(c,[{key:"verifyStorageSupport",value:function(){try{window.localStorage.setItem("hz",1),window.localStorage.removeItem("hz"),this.isLocalStorageSupported=!0}catch(e){}try{window.sessionStorage.setItem("hz",1),window.sessionStorage.removeItem("hz"),this.isSessionStorageSupported=!0}catch(e){}}},{key:"getSessionStorage",value:function(){return this.isSessionStorageSupported?(null===this.sessionStorage&&(this.sessionStorage=new l),this.sessionStorage):this.getInMemoryStorage()}},{key:"getLocalStorage",value:function(){return this.isLocalStorageSupported?(null===this.localStorage&&(this.localStorage=new u),this.localStorage):this.getInMemoryStorage()}},{key:"getInMemoryStorage",value:function(){return this.fallbackStorage}}]),new c);function c(){r(this,c),this.isSessionStorageSupported=!1,this.isLocalStorageSupported=!1,this.sessionStorage=null,this.localStorage=null,this.fallbackStorage=new E,this.verifyStorageSupport()}function S(){r(this,S)}function _(){r(this,_)}function g(){r(this,g),this.data={}}t.default=n},150:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTS=void 0,t.CONSTS={EXPIRE_KEY:"_expires"}},614:(e,t,n)=>{var o;n.r(t),n.d(t,{NIL:()=>L,parse:()=>m,stringify:()=>c,v1:()=>l,v3:()=>N,v4:()=>C,v5:()=>y,validate:()=>i,version:()=>P});var r=new Uint8Array(16);function u(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(r)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,i=function(e){return"string"==typeof e&&a.test(e)};for(var s=[],E=0;E<256;++E)s.push((E+256).toString(16).substr(1));const c=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!i(t))throw TypeError("Stringified UUID is invalid");return t};var S,_,g=0,d=0;const l=function(e,t,n){var o=t&&n||0,r=t||new Array(16),a=(e=e||{}).node||S,i=void 0!==e.clockseq?e.clockseq:_;null!=a&&null!=i||(E=e.random||(e.rng||u)(),null==a&&(a=S=[1|E[0],E[1],E[2],E[3],E[4],E[5]]),null==i&&(i=_=16383&(E[6]<<8|E[7])));var s=void 0!==e.msecs?e.msecs:Date.now(),n=void 0!==e.nsecs?e.nsecs:d+1,E=s-g+(n-d)/1e4;if(E<0&&void 0===e.clockseq&&(i=i+1&16383),1e4<=(n=(E<0||g<s)&&void 0===e.nsecs?0:n))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=s,_=i;n=(1e4*(268435455&(s+=122192928e5))+(d=n))%4294967296;r[o++]=n>>>24&255,r[o++]=n>>>16&255,r[o++]=n>>>8&255,r[o++]=255&n;s=s/4294967296*1e4&268435455;r[o++]=s>>>8&255,r[o++]=255&s,r[o++]=s>>>24&15|16,r[o++]=s>>>16&255,r[o++]=i>>>8|128,r[o++]=255&i;for(var l=0;l<6;++l)r[o+l]=a[l];return t||c(r)},m=function(e){if(!i(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function I(e,i,s){function t(e,t,n,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),16!==(t="string"==typeof t?m(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var r=new Uint8Array(16+e.length);if(r.set(t),r.set(e,t.length),(r=s(r))[6]=15&r[6]|i,r[8]=63&r[8]|128,n){o=o||0;for(var a=0;a<16;++a)n[o+a]=r[a];return n}return c(r)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function O(e){return 14+(e+64>>>9<<4)+1}function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function R(e,t,n,o,r,a){return p((a=p(p(t,e),p(o,a)))<<r|a>>>32-r,n)}function f(e,t,n,o,r,a,i){return R(t&n|~t&o,e,t,r,a,i)}function A(e,t,n,o,r,a,i){return R(t&o|n&~o,e,t,r,a,i)}function T(e,t,n,o,r,a,i){return R(t^n^o,e,t,r,a,i)}function h(e,t,n,o,r,a,i){return R(n^(t|~o),e,t,r,a,i)}const N=I("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,o="0123456789abcdef",r=0;r<n;r+=8){var a=e[r>>5]>>>r%32&255,a=parseInt(o.charAt(a>>>4&15)+o.charAt(15&a),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[O(t)-1]=t;for(var n=1732584193,o=-271733879,r=-1732584194,a=271733878,i=0;i<e.length;i+=16){var s=n,E=o,l=r,u=a,n=f(n,o,r,a,e[i],7,-680876936),a=f(a,n,o,r,e[i+1],12,-389564586),r=f(r,a,n,o,e[i+2],17,606105819),o=f(o,r,a,n,e[i+3],22,-1044525330);n=f(n,o,r,a,e[i+4],7,-176418897),a=f(a,n,o,r,e[i+5],12,1200080426),r=f(r,a,n,o,e[i+6],17,-1473231341),o=f(o,r,a,n,e[i+7],22,-45705983),n=f(n,o,r,a,e[i+8],7,1770035416),a=f(a,n,o,r,e[i+9],12,-1958414417),r=f(r,a,n,o,e[i+10],17,-42063),o=f(o,r,a,n,e[i+11],22,-1990404162),n=f(n,o,r,a,e[i+12],7,1804603682),a=f(a,n,o,r,e[i+13],12,-40341101),r=f(r,a,n,o,e[i+14],17,-1502002290),n=A(n,o=f(o,r,a,n,e[i+15],22,1236535329),r,a,e[i+1],5,-165796510),a=A(a,n,o,r,e[i+6],9,-1069501632),r=A(r,a,n,o,e[i+11],14,643717713),o=A(o,r,a,n,e[i],20,-373897302),n=A(n,o,r,a,e[i+5],5,-701558691),a=A(a,n,o,r,e[i+10],9,38016083),r=A(r,a,n,o,e[i+15],14,-660478335),o=A(o,r,a,n,e[i+4],20,-405537848),n=A(n,o,r,a,e[i+9],5,568446438),a=A(a,n,o,r,e[i+14],9,-1019803690),r=A(r,a,n,o,e[i+3],14,-187363961),o=A(o,r,a,n,e[i+8],20,1163531501),n=A(n,o,r,a,e[i+13],5,-1444681467),a=A(a,n,o,r,e[i+2],9,-51403784),r=A(r,a,n,o,e[i+7],14,1735328473),n=T(n,o=A(o,r,a,n,e[i+12],20,-1926607734),r,a,e[i+5],4,-378558),a=T(a,n,o,r,e[i+8],11,-2022574463),r=T(r,a,n,o,e[i+11],16,1839030562),o=T(o,r,a,n,e[i+14],23,-35309556),n=T(n,o,r,a,e[i+1],4,-1530992060),a=T(a,n,o,r,e[i+4],11,1272893353),r=T(r,a,n,o,e[i+7],16,-155497632),o=T(o,r,a,n,e[i+10],23,-1094730640),n=T(n,o,r,a,e[i+13],4,681279174),a=T(a,n,o,r,e[i],11,-358537222),r=T(r,a,n,o,e[i+3],16,-722521979),o=T(o,r,a,n,e[i+6],23,76029189),n=T(n,o,r,a,e[i+9],4,-640364487),a=T(a,n,o,r,e[i+12],11,-421815835),r=T(r,a,n,o,e[i+15],16,530742520),n=h(n,o=T(o,r,a,n,e[i+2],23,-995338651),r,a,e[i],6,-198630844),a=h(a,n,o,r,e[i+7],10,1126891415),r=h(r,a,n,o,e[i+14],15,-1416354905),o=h(o,r,a,n,e[i+5],21,-57434055),n=h(n,o,r,a,e[i+12],6,1700485571),a=h(a,n,o,r,e[i+3],10,-1894986606),r=h(r,a,n,o,e[i+10],15,-1051523),o=h(o,r,a,n,e[i+1],21,-2054922799),n=h(n,o,r,a,e[i+8],6,1873313359),a=h(a,n,o,r,e[i+15],10,-30611744),r=h(r,a,n,o,e[i+6],15,-1560198380),o=h(o,r,a,n,e[i+13],21,1309151649),n=h(n,o,r,a,e[i+4],6,-145523070),a=h(a,n,o,r,e[i+11],10,-1120210379),r=h(r,a,n,o,e[i+2],15,718787259),o=h(o,r,a,n,e[i+9],21,-343485551),n=p(n,s),o=p(o,E),r=p(r,l),a=p(a,u)}return[n,o,r,a]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(O(t)),o=0;o<t;o+=8)n[o>>5]|=(255&e[o/8])<<o%32;return n}(e),8*e.length))}),C=function(e,t,n){var o=(e=e||{}).random||(e.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=o[r];return t}return c(o)};function v(e,t){return e<<t|e>>>32-t}const y=I("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var r=0;r<o.length;++r)e.push(o.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,i=Math.ceil(a/16),s=new Array(i),E=0;E<i;++E){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=e[64*E+4*u]<<24|e[64*E+4*u+1]<<16|e[64*E+4*u+2]<<8|e[64*E+4*u+3];s[E]=l}s[i-1][14]=8*(e.length-1)/Math.pow(2,32),s[i-1][14]=Math.floor(s[i-1][14]),s[i-1][15]=8*(e.length-1)&4294967295;for(var c=0;c<i;++c){for(var S=new Uint32Array(80),_=0;_<16;++_)S[_]=s[c][_];for(var g=16;g<80;++g)S[g]=v(S[g-3]^S[g-8]^S[g-14]^S[g-16],1);for(var d=n[0],m=n[1],I=n[2],O=n[3],p=n[4],R=0;R<80;++R)var f=Math.floor(R/20),f=v(d,5)+function(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o}}(f,m,I,O)+p+t[f]+S[R]>>>0,p=O,O=I,I=v(m,30)>>>0,m=d,d=f;n[0]=n[0]+d>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+I>>>0,n[3]=n[3]+O>>>0,n[4]=n[4]+p>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}),L="00000000-0000-0000-0000-000000000000",P=function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},851:e=>{e.exports=JSON.parse('{"unknown":"(?:(?:(?:finance|news|eurosport|sports|astrology|travel|answers|screen|weather|messenger|games|movies|cars|omg|lifestyle)\\\\.yahoo|(?:accounts|keep|support|drive|groups|developers|maps|sites)\\\\.google|maps\\\\.yandex)\\\\.com|maps\\\\.yandex\\\\.(?:ru|ua|by)|(?:shopping|match)\\\\.yahoo\\\\.net|groups\\\\.google\\\\.co\\\\.uk|n\\\\.maps\\\\.yandex\\\\.ru)","search":"(?:www\\\\.(?:google\\\\.(?:com(?:|\\\\.af|\\\\.ar|\\\\.au|\\\\.bd|\\\\.bh|\\\\.bn|\\\\.bo|\\\\.br|\\\\.co|\\\\.cu|\\\\.do|\\\\.ec|\\\\.eg|\\\\.et|\\\\.fj|\\\\.gh|\\\\.gt|\\\\.hk|\\\\.jm|\\\\.kw|\\\\.lb|\\\\.ly|\\\\.mt|\\\\.mx|\\\\.my|\\\\.ng|\\\\.ni|\\\\.np|\\\\.om|\\\\.pa|\\\\.pe|\\\\.ph|\\\\.pk|\\\\.pr|\\\\.py|\\\\.qa|\\\\.sa|\\\\.sg|\\\\.sv|\\\\.tr|\\\\.tw|\\\\.ua|\\\\.uy|\\\\.vn)|co\\\\.(?:cr|id|il|in|jp|ke|kr|ls|ma|nz|th|tz|uk|uz|ve|za|zw)|am|as|at|az|ba|be|bg|bs|by|de|dk|dz|ee|es|fi|fr|ge|gg|gr|hn|hr|hu|ie|it|je|jo|kg|kz|li|lk|lt|lu|lv|md|mn|mu|mw|nl|no|pl|pt|ro|rs|ru|rw|se|si|sk|sn|tn|tt|ae|vg|ca|cd|cat|ch|ci|cl|cm|cz)|(?:so|gigablast|dogpile|yandex|amazon|baidu|qwant|ask|bing|cnn|search)\\\\.com|yandex\\\\.(?:ru|ua|by)|goyellow\\\\.de|bing\\\\.com\\\\/images\\\\/search|startsiden\\\\.no)|google\\\\.(?:com(?:\\\\/imgres||\\\\.af|\\\\.ar|\\\\.au|\\\\.bd|\\\\.bh|\\\\.bn|\\\\.bo|\\\\.br|\\\\.co|\\\\.cu|\\\\.do|\\\\.ec|\\\\.eg|\\\\.et|\\\\.fj|\\\\.gh|\\\\.gt|\\\\.hk|\\\\.jm|\\\\.kw|\\\\.lb|\\\\.ly|\\\\.mt|\\\\.mx|\\\\.my|\\\\.ng|\\\\.ni|\\\\.np|\\\\.om|\\\\.pa|\\\\.pe|\\\\.ph|\\\\.pk|\\\\.pr|\\\\.py|\\\\.qa|\\\\.sa|\\\\.sg|\\\\.sv|\\\\.tr|\\\\.tw|\\\\.ua|\\\\.uy|\\\\.vn)|co\\\\.(?:uk\\\\/imgres|cr|id|il|in|jp|ke|kr|ls|ma|nz|th|tz|ve|za|zw|uk|uz)|ca\\\\/imgres|am|as|at|az|ba|be|bg|bs|by|de|dk|dz|ee|es|fi|fr|ge|gg|gr|hn|hr|hu|ie|it|je|jo|kg|kz|li|lk|lt|lu|lv|md|mn|mu|mw|nl|no|pl|pt|ro|rs|ru|rw|se|si|sk|sn|tt|ae|vg|tn|ca|cd|cat|ch|ci|cl|cm|cz)|(?:(?:(?:(?:imag|)es\\\\.||ar\\\\.|au\\\\.|br\\\\.|ca\\\\.|de\\\\.|dk\\\\.|fr\\\\.|hk\\\\.|in\\\\.|it\\\\.|mx\\\\.|nz\\\\.|qc\\\\.|ru\\\\.|se\\\\.|uk\\\\.|us\\\\.)search\\\\.||ca\\\\.|us\\\\.)yahoo|search\\\\.(?:nifty|aol|bt|tb\\\\.ask|avg|naver)|(?:tieba|m)\\\\.baidu|dogpile|webcrawler|yandex|amazon|lycos|lite\\\\.qwant|news\\\\.google|duckduckgo|ask|bing)\\\\.com|search\\\\.(?:(?:earthlink|ukr|daum)\\\\.net|(?:goo\\\\.ne|yahoo\\\\.co)\\\\.jp|aol\\\\.co\\\\.uk|seznam\\\\.cz)|(?:(?:|link\\\\.)2gis|(?:|go\\\\.)mail|yandex|nova\\\\.rambler)\\\\.ru|suche\\\\.(?:(?:aol|web|t\\\\-online)\\\\.de|gmx\\\\.net)|yandex\\\\.(?:ua|by)|(?:recherche\\\\.aol|lemoteur\\\\.orange)\\\\.fr|(?:cgi\\\\.search\\\\.biglobe\\\\.ne|websearch\\\\.rakuten\\\\.co)\\\\.jp|(?:so\\\\.|)m\\\\.sm\\\\.cn|ricerca\\\\.virgilio\\\\.it|meta\\\\.ua|ecosia\\\\.org|bing\\\\.com\\\\/images\\\\/search|com\\\\.google\\\\.android\\\\.googlequicksearchbox)","email":"(?:mail\\\\.(?:(?:zoho|qq|aol|yandex|google|yahoo)\\\\.com|yandex\\\\.(?:ru|kz|ua|by)|yahoo\\\\.(?:co\\\\.(?:uk|jp)|net)|ukr\\\\.net|rambler\\\\.ru)|(?:inbox(?:|\\\\.google)|email\\\\.telstra|outlook\\\\.live)\\\\.com|webmail\\\\.(?:(?:iinet\\\\.net|optusnet\\\\.com)\\\\.au|freenet\\\\.de)|(?:e|touch|click)\\\\.mail\\\\.ru|email\\\\.seznam\\\\.cz|orange\\\\.fr\\\\/webmail|com\\\\.google\\\\.android\\\\.gm)","paid":"(?:(?:(?:www\\\\.||partner\\\\.)googleadservices|paid\\\\.outbrain|imasdk\\\\.googleapis|tpc\\\\.googlesyndication)\\\\.com|googleads\\\\.g\\\\.doubleclick\\\\.net)","social":"(?:pinterest\\\\.(?:com(?:|\\\\.au|\\\\.mx)|co\\\\.(?:uk|kr)|fr|de|es|ru|it|jp|pt|ph|at|nz|se|dk|ca|cl|ch)|(?:(?:|m\\\\.|l\\\\.|lm\\\\.)facebook|(?:|l\\\\.)instagram|(?:m|away)\\\\.vk|github|quora|vk|twitter|web\\\\.skype|linkedin|getpocket|douban|youtube|reddit|t\\\\.umblr)\\\\.com|com\\\\.(?:(?:twitter|instagram|linkedin)\\\\.android|pinterest|google\\\\.android\\\\.talk|facebook\\\\.katana|slack)|forums\\\\.whirlpool\\\\.net\\\\.au|ok\\\\.ru|t\\\\.co|lnkd\\\\.in|disq\\\\.us|youtu\\\\.be|org\\\\.telegram\\\\.messenger)","houzz":"(?:houzz\\\\.(?:com(?:|\\\\.au|\\\\.sg)|co\\\\.(?:uk|nz)|de|fr|ru|jp|it|es|dk|se|ie|in)|(?:gardenweb|checkout\\\\.stripe)\\\\.com)"}')}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;t=o[e]={exports:{}};return n[e].call(t.exports,t,t.exports,r),t.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(84)})()),HZ.utils.OmnilogSessionUtils=window.Omnilog["omnilog-session-utils"].default;

window.hzmr.push("omnilogSessionUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End omnilogSessionUtils.js  **************/
/************* Start browserStorageUtils.js for locale en-US **************/
try {HZ.ns("HZ.utils"),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["browser-storage"]=t():(e.Omnilog=e.Omnilog||{},e.Omnilog["browser-storage"]=t())}(window,function(){return r={},n.m=o={1:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(2);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,o){return t&&i(e.prototype,t),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}var u=(s(g,[{key:"setData",value:function(e,t,o,r){return!(!e||!t||(e[t]=o,r&&(o=Date.now(),e[t+a.CONSTS.EXPIRE_KEY]=o+1e3*Math.abs(r)),0))}},{key:"setNS",value:function(e,t,o,r){return!(!e||!r)&&(this.data[r]||(this.data[r]={}),this.setData(this.data[r],e,t,o))}},{key:"set",value:function(e,t,o){return this.setData(this.data,e,t,o)}},{key:"deleteNS",value:function(e){e&&this.data[e]&&delete this.data[e]}},{key:"getNS",value:function(e,t){return e&&t&&this.data[t]?this.getFromData(this.data[t],e):null}},{key:"getFromData",value:function(e,t){if(!e||!t)return null;var o=e[t],r=e[t+a.CONSTS.EXPIRE_KEY];return r&&Date.now()>=r?(delete e[t],delete e[t+a.CONSTS.EXPIRE_KEY],null):o}},{key:"get",value:function(e){return this.getFromData(this.data,e)}},{key:"remove",value:function(e){var t=this.namespace?this.data[this.namespace]:this.data,o=t[e];return delete t[e],delete t[e+a.CONSTS.EXPIRE_KEY],o}}]),g),l=(s(d,[{key:"get",value:function(e){var t=window.sessionStorage.getItem(e),o=window.sessionStorage.getItem(e+a.CONSTS.EXPIRE_KEY),r=null;if(o){var n=Date.now();try{if(n>=JSON.parse(o))return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),r}catch(t){return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),r}}try{r=JSON.parse(t)}catch(e){r=t}return r}},{key:"remove",value:function(e){var t=this.get(e);return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),t}},{key:"set",value:function(e,t,o){if(t&&"object"===r(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.sessionStorage.setItem(e,t),o&&(t=Date.now(),window.sessionStorage.setItem(e+a.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}}]),d),c=(s(f,[{key:"isExpired",value:function(e){var t=window.localStorage.getItem(e+a.CONSTS.EXPIRE_KEY);if(t){var o=Date.now();try{if(o>=JSON.parse(t))return!0}catch(e){return!0}}}},{key:"get",value:function(e){var t=window.localStorage.getItem(e),o=null;if(this.isExpired(e))return window.localStorage.removeItem(e),window.localStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),o;try{o=JSON.parse(t)}catch(e){o=t}return o}},{key:"set",value:function(e,t,o){if(t&&"object"===r(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.localStorage.setItem(e,t),o&&(t=Date.now(),window.localStorage.setItem(e+a.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}},{key:"remove",value:function(e){var t=this.get(e);return window.localStorage.removeItem(e),window.localStorage.removeItem(e+a.CONSTS.EXPIRE_KEY),t}}]),f),o=(s(S,[{key:"verifyStorageSupport",value:function(){try{window.localStorage.setItem("hz",1),window.localStorage.removeItem("hz"),this.isLocalStorageSupported=!0}catch(e){}try{window.sessionStorage.setItem("hz",1),window.sessionStorage.removeItem("hz"),this.isSessionStorageSupported=!0}catch(e){}}},{key:"getSessionStorage",value:function(){return this.isSessionStorageSupported?(null===this.sessionStorage&&(this.sessionStorage=new l),this.sessionStorage):this.getInMemoryStorage()}},{key:"getLocalStorage",value:function(){return this.isLocalStorageSupported?(null===this.localStorage&&(this.localStorage=new c),this.localStorage):this.getInMemoryStorage()}},{key:"getInMemoryStorage",value:function(){return this.fallbackStorage}}]),new S);function S(){n(this,S),this.isSessionStorageSupported=!1,this.isLocalStorageSupported=!1,this.sessionStorage=null,this.localStorage=null,this.fallbackStorage=new u,this.verifyStorageSupport()}function f(){n(this,f)}function d(){n(this,d)}function g(){n(this,g),this.data={}}t.default=o},19:function(e,t,o){e.exports=o(1)},2:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTS=void 0,t.CONSTS={EXPIRE_KEY:"_expires"}}},n.c=r,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19);function n(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var o,r}),HZ.utils.BrowserStorageUtils=window.Omnilog["browser-storage"];

window.hzmr.push("browserStorageUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End browserStorageUtils.js  **************/
/************* Start omnilogTrackingUtils.js for locale en-US **************/
try {HZ.ns("HZ.utils"),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Omnilog=t():(e.Omnilog=e.Omnilog||{},e.Omnilog["omnilog-tracking-utils"]=t())}(self,()=>(()=>{"use strict";var n={642:function(e,t,o){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=this&&this.__rest||function(e,t){var o={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]]);return o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});function a(e,t){return"function"!=typeof(null==e?void 0:e.getAttribute)||(t.position=void 0!==t.position?t.position:function(e,t){for(var o=0;o<t.length;o++){var n=parseInt((null==e?void 0:e.getAttribute(t[o]))||"",10);if(!isNaN(n))return n}}(e,["posId","data-posid","data-pos-id"]),t.elementType=t.elementType||e.getAttribute("role")||e.nodeName||void 0,t.elementLabel=t.elementLabel||e.getAttribute("label")||e.getAttribute("aria-label")||void 0,t.entityType=t.entityType||e.getAttribute("entityType")||e.getAttribute("data-entity-type")||void 0,t.entityId=t.entityId||e.getAttribute("objId")||e.getAttribute("data-objid")||e.getAttribute("entityId")||e.getAttribute("data-entity-id")||void 0,t.campaignId=t.campaignId||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||void 0,t.campaignToken=t.campaignToken||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||e.getAttribute("campaignToken")||e.getAttribute("data-campaign-token")||void 0,t.creativeId=t.creativeId||e.getAttribute("creativeId")||e.getAttribute("data-creative-id")||void 0,t.section=t.section||e.getAttribute("section")||e.getAttribute("data-section")||void 0,t.component=t.component||e.getAttribute("component")||e.getAttribute("data-component")||void 0,t.compId=t.compId||e.getAttribute("compId")||e.getAttribute("data-compid")||void 0,t.l1Section=t.section||e.getAttribute("data-section")||void 0,t.l2Container=t.l2Container||t.container||e.getAttribute("data-container")||void 0,t.l3Component=t.component||e.getAttribute("data-component")||void 0,t.cta=t.cta||e.getAttribute("data-cta")||void 0,t.extraInfo=t.extraInfo||e.getAttribute("data-extra-info")||void 0),t}function E(){return r.default.getLocalStorage()}var c=o(924),r=i(o(670)),u=o(304),s="persisted_evt_src",d="transient_evt_src",I={trackingInfo:null,eventSource:null},S=function(o){return o?(Object.keys(o).forEach(function(e){var t=o[e];return t&&"object"==typeof t&&S(t)||!t&&delete o[e]}),o):{}},_={setEventSource:function(e){try{var t,o,n,i,r,a=E();a&&e&&"object"==typeof e&&(t=e.experience,o=e.parentFlow,n=e.activeFlow,i=l(e,["experience","parentFlow","activeFlow"]),r={experience:t,parentFlow:o,activeFlow:n},a.set(d,i,10),a.set(s,r))}catch(e){}},updateEventSource:function(e){var t;e&&(t=_.getEventSource()||{},_.setEventSource(Object.assign({},t,e)))},getEventSource:function(){var e=E(),t=e.get(s)||{},e=e.get(d)||{},e=n(n({},t),e);return S(e)},getEventSourceFromTargetElement:function(e,t){return e?a(e,t):{}},collectEventSourceFromDOM:function(e){var t={};if(!e)return t;try{for(var o=e;o;)t=o?a(o,t):t,o=o.parentNode}catch(e){}return!t.component&&t.compId&&(t.component=t.compId),t},getTrackingInfoAndSetEventSource:function(e,r){if(!e)return I;var t=function(e){var t;if("function"!=typeof(null==e?void 0:e.getAttribute))return I;var o={compId:null,posId:null,scopeId:null,objId:null,anchorText:null,eventType:r||c.UIEvents.ELEMENT_CLICKED,hasTrackMe:!1},n={};try{for(var i=e;i;)o.compId=o.compId||i.getAttribute("compId")||i.getAttribute("data-compid"),o.scopeId=o.scopeId||i.getAttribute("scopeId")||i.getAttribute("data-scopeid"),o.objId=o.objId||i.getAttribute("objId")||i.getAttribute("data-objid"),o.posId=o.posId||i.getAttribute("posId")||i.getAttribute("data-posid"),o.anchorText=o.anchorText||(null===(t=null==i?void 0:i.innerText)||void 0===t?void 0:t.replace(/[\s:]/g,"").substring(0,30)),o.hasTrackMe=o.hasTrackMe||i.classList.contains("hz-track-me")||i.classList.contains("trackMe"),o.eventType=o.eventType||i.getAttribute("data-event-name")||i.getAttribute("data-event-type"),n=a(i,n),i=i.parentElement;return o.eventType&&Object.values(c.UIEvents).includes(o.eventType),{trackingInfo:o,eventSource:n}}catch(e){return I}}(e)||{},o=t.trackingInfo,e=t.eventSource,t=void 0===e?{}:e;if(o&&t){e=u.ExperienceUtils.getExperience()||null;e&&(t.experience=e);e=u.FlowUtils.getParentFlow();e&&(t.parentFlow=e);e=u.FlowUtils.getActiveFlow();return e&&(t.activeFlow=e),_.setEventSource(t),{trackingInfo:o,eventSource:t}}return I}};t.default=_},924:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.OmnilogError=t.DeviceType=t.OmnilogLocalStorageKey=t.RouterNSProductMap=t.IdentityEventType=t.ViewMode=t.DeviceOrientation=t.EventInitiator=t.TestBotType=t.UIEvents=t.Channel=t.ComponentOsType=t.ComponentType=t.ComponentName=t.ComponentDetailedType=t.OmnilogStatusCodes=t.OmnilogHeaders=t.OmniLoggerConst=t.OmniLoggerEventNames=void 0,(o=t.OmniLoggerEventNames||(t.OmniLoggerEventNames={})).EXPERIENCE_LOADED="Experience Loaded",o.EXPERIENCE_UNLOADED="Experience Unloaded",o.OMNILOG_EVENT="omnilog",o.TEST_REGISTERED="Tests Registered",o.SESSION_STARTED="Session Started",o.USER_ATTRIBUTE_UPDATED="User Attribute Updated",(t.OmniLoggerConst||(t.OmniLoggerConst={})).OMNILOG_TOKEN_HEADER_NAME="X-HZ-OMNILOG-TOKEN",(o=t.OmnilogHeaders||(t.OmnilogHeaders={})).EXTERNAL_SESSION_ID_HEADER="x-ol-ext-session-id",o.SESSION_ID_HEADER="x-ol-session-id",o.EXTERNAL_DEVICE_ID_HEADER="x-ol-ext-device-id",o.EXPERIENCE_ID_HEADER="x-ol-exp-id",o.EXPERIENCE_NAME_HEADER="x-ol-exp-name",o.FLOW_ID_HEADER="x-ol-flow-id",o.FLOW_NAME_HEADER="x-ol-flow-name",o.FLOW_STEP_NAME_HEADER="x-ol-step-name",o.PRODUCT_HEADER="x-ol-product",o.PRODUCT_VARIANT_HEADER="x-ol-product-variant",o.MID_HEADER="x-ol-mid",(o=t.OmnilogStatusCodes||(t.OmnilogStatusCodes={}))[o.STATUS_CODE_SUCCESS=1]="STATUS_CODE_SUCCESS",o[o.STATUS_CODE_FAILURE=-1]="STATUS_CODE_FAILURE",(o=t.ComponentDetailedType||(t.ComponentDetailedType={}))[o.C2_LEGACY_WEB=101]="C2_LEGACY_WEB",o[o.JUWKAA_ISOMORHPIC_JS_WEB=102]="JUWKAA_ISOMORHPIC_JS_WEB",o[o.SITE_DESIGNER_LEGACY_WEB=103]="SITE_DESIGNER_LEGACY_WEB",o[o.SITE_DESIGNER_ISOMORPHIC_JS_WEB=104]="SITE_DESIGNER_ISOMORPHIC_JS_WEB",o[o.IVY_LEGACY_WEB=105]="IVY_LEGACY_WEB",o[o.IVY_ISOMORPHIC_JS_WEB=106]="IVY_ISOMORPHIC_JS_WEB",o[o.CONX_LEGACY_WEB=107]="CONX_LEGACY_WEB",o[o.WINDOWS_MOBILE_APP=110]="WINDOWS_MOBILE_APP",o[o.PRO_SITES_WEB=112]="PRO_SITES_WEB",o[o.HOUZZ_PRO_CLIPPER=151]="HOUZZ_PRO_CLIPPER",o[o.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",o[o.HOUZZ_IOS_MOBILE_APP=201]="HOUZZ_IOS_MOBILE_APP",o[o.HOUZZ_ANDROID_MOBILE_APP=202]="HOUZZ_ANDROID_MOBILE_APP",o[o.HOUZZ_PRO_IOS_MOBILE_APP=251]="HOUZZ_PRO_IOS_MOBILE_APP",o[o.HOUZZ_PRO_ANDROID_MOBILE_APP=252]="HOUZZ_PRO_ANDROID_MOBILE_APP",o[o.C2_WEB_SERVER=301]="C2_WEB_SERVER",o[o.JUKWAA_WEB_SERVER=302]="JUKWAA_WEB_SERVER",o[o.GRAPHQL_SERVER=303]="GRAPHQL_SERVER",o[o.C2_SERVICE=304]="C2_SERVICE",o[o.IDENTITY_SERVICE=305]="IDENTITY_SERVICE",o[o.AD_SERVER=306]="AD_SERVER",o[o.BATCH=307]="BATCH",o[o.CONX_SERVER=308]="CONX_SERVER",o[o.PRO_SITES_WEB_SERVER=312]="PRO_SITES_WEB_SERVER",o[o.IVY_SERVICE_SERVER=315]="IVY_SERVICE_SERVER",o[o.EPN=401]="EPN",o[o.SALESFORCE=501]="SALESFORCE",o[o.BLUESHIFT=502]="BLUESHIFT",o[o.ELOQUA=503]="ELOQUA",o[o.UNKNOWN=-1]="UNKNOWN",(o=t.ComponentName||(t.ComponentName={})).JUKWAA_WEB="Jukwaa Web Client",o.PRO_SITES_WEB="Pro Site Web Client",o.SITE_DESIGNER_WEB="Site Designer Web Client",o.GRAPHQL_SERVER="Graphql Server",o.GRAPHQL_HOUZZ_PRO_SERVER="GraphQL Houzz Pro Server",o.JUKWAA_WEB_SERVER="Jukwaa Web Server",o.PRO_SITES_WEB_SERVER="Pro Site Web Server",o.SITE_DESIGNER_WEB_SERVER="Site Designer Web Server",o.IVY_SERVICE_SERVER="Ivy Service Server",o.GMAIL_CRM_CHROME_EXTENSION="Gmail CRM Chrome Extension",o.PRODUCT_CLIPPER_CHROME_EXTENSION="Product Clipper Chrome Extension",o.IMAGE_CLIPPER_CHROME_EXTENSION="Image Clipper Chrome Extension",o.HOUZZ_PRO_CLIPPER="Houzz Pro Clipper",(o=t.ComponentType||(t.ComponentType={}))[o.CLIENT_BROWSER=100]="CLIENT_BROWSER",o[o.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",o[o.SERVER_WEB=300]="SERVER_WEB",o[o.SERVER_OFFLINE=400]="SERVER_OFFLINE",o[o.SERVER_SERVICE=500]="SERVER_SERVICE",(o=t.ComponentOsType||(t.ComponentOsType={}))[o.LINUX=1]="LINUX",o[o.WINDOWS=2]="WINDOWS",o[o.OSX=3]="OSX",o[o.IOS=4]="IOS",o[o.ANDROID=5]="ANDROID",o[o.OTHER=6]="OTHER",(o=t.Channel||(t.Channel={})).DIRECT="Direct",o.EMAIL="Email",o.PAID="Paid",o.SEARCH="Search",o.SOCIAL="Social",o.PARTNER="Partner",o.INTERNAL="Internal",o.REFERRAL="Referral",o[o.UNKNOWN=100]="UNKNOWN",(o=t.UIEvents||(t.UIEvents={})).ELEMENT_CLICKED="Element Clicked",o.ELEMENT_FOCUSED="Element Focused",o.ELEMENT_BLURRED="Element Blurred",o.ELEMENT_SCROLLED="Element Scrolled",o.ELEMENT_VIEWED="Element Viewed",o.ELEMENT_EXPANDED="Element Expanded",o.ELEMENT_COLLAPSED="Element Collapsed",o.INPUT_CHANGED="Input Changed",o.MEDIA_PLAYED="Media Played",o.MEDIA_PAUSED="Media Paused",o.MEDIA_PLAY_COMPLETED="Media Play Completed",o.MEDIA_TIME_CHANGED="Media Time Changed",o.MEDIA_RESTARTED="Media Restarted",o.FORM_SUBMITTED="Form Submitted",(o=t.TestBotType||(t.TestBotType={}))[o.NONE=0]="NONE",o[o.AUTOMATION=1]="AUTOMATION",o[o.MANUAL=4]="MANUAL",o[o.BATCH=16]="BATCH",o[o.HOUZZ_STAFF=32]="HOUZZ_STAFF",o[o.ANALYTICAL_BOT=64]="ANALYTICAL_BOT",(o=t.EventInitiator||(t.EventInitiator={}))[o.USER_SERVER=0]="USER_SERVER",o[o.USER_CLIENT=1]="USER_CLIENT",o[o.APPLICATION_SERVER=2]="APPLICATION_SERVER",o[o.APPLICATION_CLIENT=3]="APPLICATION_CLIENT",o[o.PRO_AI_ASSIST_USER_SERVER=4]="PRO_AI_ASSIST_USER_SERVER",o[o.PRO_AI_ASSIST_USER_CLIENT=5]="PRO_AI_ASSIST_USER_CLIENT",o[o.PRO_AI_ASSIST_APPLICATION_SERVER=6]="PRO_AI_ASSIST_APPLICATION_SERVER",o[o.PRO_AI_ASSIST_APPLICATION_CLIENT=7]="PRO_AI_ASSIST_APPLICATION_CLIENT",(o=t.DeviceOrientation||(t.DeviceOrientation={}))[o.PORTRAIT=1]="PORTRAIT",o[o.LANDSCAPE=2]="LANDSCAPE",(o=t.ViewMode||(t.ViewMode={})).STANDALONE="Standalone",o.DEFAULT="Default",o.LIGHTBOX="Lightbox",o.QUICKVIEW="Quick View",(o=t.IdentityEventType||(t.IdentityEventType={})).LOGIN="login",o.LOGOUT="logout",o.MODIFY="modify",t.RouterNSProductMap={HOUZZ:"Houzz",PRO_SOLUTIONS:"Houzz Pro",UNKNOWN:"UNKNOWN"},(o=t.OmnilogLocalStorageKey||(t.OmnilogLocalStorageKey={})).ActiveExperience="OMNILOG_ACTIVE_EXPERIENCE",o.FlowStack="OMNILOG_FLOW_STACK",o.ParentFlow="OMNILOG_PARENT_FLOW",o.LogoutCount="OMNILOG_LOGOUT_COUNT",(o=t.DeviceType||(t.DeviceType={}))[o.NONE=0]="NONE",o[o.DESKTOP=1]="DESKTOP",o[o.TABLET=2]="TABLET",o[o.SMARTPHONE=3]="SMARTPHONE",o[o.SMART_TV=4]="SMART_TV",o[o.OTHER=5]="OTHER",(t=t.OmnilogError||(t.OmnilogError={})).INIT="omnilog.init",t.CALL_MAKKARI_API="omnilog.callMakkariApi",t.EXPERIENCE_LOADED="omnilog.experienceLoaded",t.EXPERIENCE_UNLOADED="omnilog.experienceUnLoaded",t.SEND_INTERACTION_EVENT="omnilog.sendInteractionEvent",t.SEND_OUTCOME_EVENT="omnilog.sendOutcomeEvent",t.SEND_IDENTITY_EVENT="omnilog.sendIdentityEvent",t.FLOW_STARTED="omnilog.flowStarted",t.FLOW_STEP_LOADED="omnilog.flowStepLoaded",t.FLOW_STEP_COMPLETED="omnilog.flowStepCompleted",t.FLOW_COMPLETED="omnilog.flowCompleted",t.FLOW_STEP_UNLOADED="omnilog.flowStepUnloaded",t.DUPLICATE_EXPERIENCE="omnilog.duplicate_experience",t.BUILD_CLIENT_TOKEN="omnilog.buildClientToken",t.LOG_ERROR="omnilog.log_error"},304:function(e,i,t){var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.IdentityUtils=i.UserAttributeUtils=i.ExperienceUtils=i.FlowUtils=void 0;var r=t(924),a=n(t(670)),l=t(214),E=n(t(345)),t=n(t(642));i.FlowUtils={init:function(){i.FlowUtils.setFlowStack([])},getStorage:function(){return a.default.getSessionStorage()},getParentFlow:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.ParentFlow)||null},setParentFlow:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ParentFlow,e)},getFlowStack:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.FlowStack)||[]},setFlowStack:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.FlowStack,e)},pushToFlowStack:function(e){var t=i.FlowUtils.getFlowStack()||[];t.unshift(e),i.FlowUtils.setFlowStack(t)},popFlowStack:function(){var e=i.FlowUtils.getFlowStack()||[],t=e.shift();return i.FlowUtils.setFlowStack(e),t},resetFlows:function(){i.FlowUtils.setFlowStack([]),i.FlowUtils.setParentFlow(null)},getActiveFlow:function(){var e=i.FlowUtils.getFlowStack();return 0<(null==e?void 0:e.length)?e[0]:null},updateActiveFlow:function(e,t){var o;0!==i.FlowUtils.getFlowStack().length&&((o=i.FlowUtils.popFlowStack())&&(o[e]=t),i.FlowUtils.pushToFlowStack(o))}},i.ExperienceUtils={getStorage:function(){return a.default.getSessionStorage()},setActiveExperience:function(e){var t=i.ExperienceUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ActiveExperience,e)},getExperience:function(){return i.ExperienceUtils.getStorage().get(r.OmnilogLocalStorageKey.ActiveExperience)}},i.UserAttributeUtils={getSetUaDetails:function(e,t,o){if(e&&t)return{user_attribute_set:JSON.stringify([{name:e,value:t,expiration:o||null}])}},getUnsetUaDetails:function(e){if(e)return{user_attribute_unset:JSON.stringify([e])}}},i.IdentityUtils={getLogoutCount:function(){return parseInt(a.default.getLocalStorage().get(r.OmnilogLocalStorageKey.LogoutCount),10)||0},updateLogoutCount:function(){a.default.getLocalStorage().set(r.OmnilogLocalStorageKey.LogoutCount,i.IdentityUtils.getLogoutCount()+1)},getClientIdModifier:function(){var e=i.IdentityUtils.getLogoutCount();if(!e)return null;var t="".concat(e);if(e<1e3)for(var o=4-t.length,n=0;n<o;n++)t="0".concat(t);return t}};var c=o(o({getProductInfo:function(e,t){var o=c.getProductInfoByRoutingDescriptor(t)||{},n=o.product,t=o.productVariant,o=e&&(0,l.getProductInfo)()||{},e=o.product,o=o.productVariant;return{product:n||e||r.RouterNSProductMap.UNKNOWN,productVariant:t||o||r.RouterNSProductMap.UNKNOWN}},getClientEventTokenFromRequestHeaders:function(e){var t=null;return e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]&&((t={}).experienceId=e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER],t.experienceName=e[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER],t.externalDeviceId=e[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER],t.externalSessionId=e[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER],t.sessionId=e[r.OmnilogHeaders.SESSION_ID_HEADER],t.flowId=e[r.OmnilogHeaders.FLOW_ID_HEADER],t.flowName=e[r.OmnilogHeaders.FLOW_NAME_HEADER],t.stepName=e[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER],t.product=e[r.OmnilogHeaders.PRODUCT_HEADER],t.productVariant=e[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER],t.mid=e[r.OmnilogHeaders.MID_HEADER]),t},getInfoFromClientToken:function(e){if(!e)return{};var t=e.experienceId,o=e.experienceName,n=e.flowId,i=e.flowName,r=e.stepName,a=e.flowStep;return{experience:{experienceInstanceId:t,experienceName:o,product:e.product,productVariant:e.productVariant},activeFlow:{flowId:n,flowName:i,stepName:r,flowStep:a},session:{sessionId:e.sessionId,externalSessionId:e.externalSessionId}}},buildClientTokenHeader:function(e){if(!e)return null;var t={};return e.experienceName&&(t[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER]=e.experienceName),e.experienceId&&(t[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]=e.experienceId),e.externalDeviceId&&(t[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER]=e.externalDeviceId),e.externalSessionId&&(t[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER]=e.externalSessionId),e.sessionId&&(t[r.OmnilogHeaders.SESSION_ID_HEADER]=e.sessionId),e.flowId&&(t[r.OmnilogHeaders.FLOW_ID_HEADER]=e.flowId),e.flowName&&(t[r.OmnilogHeaders.FLOW_NAME_HEADER]=e.flowName),e.stepName&&(t[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER]=e.stepName),e.product&&(t[r.OmnilogHeaders.PRODUCT_HEADER]=e.product),e.productVariant&&(t[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER]=e.productVariant),e.mid&&(t[r.OmnilogHeaders.MID_HEADER]=e.mid),t}},t.default),{FlowUtils:i.FlowUtils,ExperienceUtils:i.ExperienceUtils,UserAttributeUtils:i.UserAttributeUtils,IdentityUtils:i.IdentityUtils,getTestRegisteredEventDetails:function(e){return void 0===e&&(e={}),{test_selections:JSON.stringify(e)}},isNull:function(e){return null==e},countryCodeMapping:function(e){return e===E.default["co.uk"].countryCode?"UK":e},getProductInfoByRoutingDescriptor:function(e){var t=e||{},o=t.namespace,e=void 0===o?"":o,o=t.siteName,t=void 0===o?"":o,o=r.RouterNSProductMap[e];if(!o)return null;e=c.countryCodeMapping(t.replace("".concat(e,"_"),""));return e?{product:o,productVariant:"".concat(o," ").concat(e)}:null},stringifyIfExist:function(e){return c.isNull(e)?e:JSON.stringify(e)},getViewPortDimensions:function(){var e=document.documentElement||{};return{viewportWidth:Math.max(e.clientWidth||0,window.innerWidth||0)||null,viewportHeight:Math.max(e.clientHeight||0,window.innerHeight||0)||null}}});i.default=c},27:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LOGGER_NAMESPACE=t.MAKKARI_API_ENDPOINT=t.MAKKARI_DEVICE_STORAGE_KEY=void 0,t.MAKKARI_DEVICE_STORAGE_KEY="makkari_device",t.MAKKARI_API_ENDPOINT="/j/cdp-api",t.LOGGER_NAMESPACE="makkariDebug"},214:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendFallbackTracking=t.getEventHost=t.normalizeUserIdentities=t.isHouzzHost=t.getProductInfo=t.getDevice=t.uuidv4=t._global=t.log=void 0;var i=n(o(670)),l=o(924),E=n(o(304)),c=n(o(345)),r=o(27);function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}t.log=function(){},t._global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},t.uuidv4=a,t.getDevice=function(){var e=i.default.getLocalStorage();try{var t=e.get(r.MAKKARI_DEVICE_STORAGE_KEY);if(t)return t;var o={deviceId:a()};return e.set(r.MAKKARI_DEVICE_STORAGE_KEY,o),o}catch(e){}},t.getProductInfo=function(){if(document.location&&document.location.hostname)return function(e){var t=e?e.split("."):[],o=t.length,n=l.RouterNSProductMap.UNKNOWN,i=l.RouterNSProductMap.UNKNOWN;if(o<2)return{product:n,productVariant:i};"www"===t[0]?n=l.RouterNSProductMap.HOUZZ:"pro"===t[0]&&(n=l.RouterNSProductMap.PRO_SOLUTIONS);var r=o-1,a=null,e=t[r],o=c.default;return(a=o[e]||0<=r-1&&o[e=t[r-1]+"."+t[r]]?o[e]:a)&&(a=E.default.countryCodeMapping(a.countryCode),i="".concat(n," ").concat(a)),{product:n,productVariant:i}}(document.location.hostname)},t.isHouzzHost=function(){var e=document.location.host.split("."),t=-1!==["www","pro"].indexOf(e[0]),e=-1!==["houzz","houzz2","stghouzz","houzzdev"].indexOf(e[1]);return t&&e},t.normalizeUserIdentities=function(e){return{user_id:e?e.customerid:null,user_name:e?e.other:null,visitor_id:e?e.other2:null}},t.getEventHost=function(e){return e?"https://evt.stghouzz.com":"https://evt.houzz.com"},t.sendFallbackTracking=function(e){}},670:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(150);function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,o){return t&&a(e.prototype,t),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}var E=(l(S,[{key:"setData",value:function(e,t,o,n){return!(!e||!t||(e[t]=o,n&&(o=Date.now(),e[t+r.CONSTS.EXPIRE_KEY]=o+1e3*Math.abs(n)),0))}},{key:"setNS",value:function(e,t,o,n){return!(!e||!n)&&(this.data[n]||(this.data[n]={}),this.setData(this.data[n],e,t,o))}},{key:"set",value:function(e,t,o){return this.setData(this.data,e,t,o)}},{key:"deleteNS",value:function(e){e&&this.data[e]&&delete this.data[e]}},{key:"getNS",value:function(e,t){return e&&t&&this.data[t]?this.getFromData(this.data[t],e):null}},{key:"getFromData",value:function(e,t){if(!e||!t)return null;var o=e[t],n=e[t+r.CONSTS.EXPIRE_KEY];return n&&Date.now()>=n?(delete e[t],delete e[t+r.CONSTS.EXPIRE_KEY],null):o}},{key:"get",value:function(e){return this.getFromData(this.data,e)}},{key:"remove",value:function(e){var t=this.namespace?this.data[this.namespace]:this.data,o=t[e];return delete t[e],delete t[e+r.CONSTS.EXPIRE_KEY],o}}]),S),c=(l(I,[{key:"get",value:function(e){var t=window.sessionStorage.getItem(e),o=window.sessionStorage.getItem(e+r.CONSTS.EXPIRE_KEY),n=null;if(o){var i=Date.now();try{if(i>=JSON.parse(o))return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),n}catch(t){return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),n}}try{n=JSON.parse(t)}catch(e){n=t}return n}},{key:"remove",value:function(e){var t=this.get(e);return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}},{key:"set",value:function(e,t,o){if(t&&"object"===n(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.sessionStorage.setItem(e,t),o&&(t=Date.now(),window.sessionStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}}]),I),u=(l(d,[{key:"isExpired",value:function(e){var t=window.localStorage.getItem(e+r.CONSTS.EXPIRE_KEY);if(t){var o=Date.now();try{if(o>=JSON.parse(t))return!0}catch(e){return!0}}}},{key:"get",value:function(e){var t=window.localStorage.getItem(e),o=null;if(this.isExpired(e))return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),o;try{o=JSON.parse(t)}catch(e){o=t}return o}},{key:"set",value:function(e,t,o){if(t&&"object"===n(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.localStorage.setItem(e,t),o&&(t=Date.now(),window.localStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(o))),!0}},{key:"remove",value:function(e){var t=this.get(e);return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}}]),d),o=(l(s,[{key:"verifyStorageSupport",value:function(){try{window.localStorage.setItem("hz",1),window.localStorage.removeItem("hz"),this.isLocalStorageSupported=!0}catch(e){}try{window.sessionStorage.setItem("hz",1),window.sessionStorage.removeItem("hz"),this.isSessionStorageSupported=!0}catch(e){}}},{key:"getSessionStorage",value:function(){return this.isSessionStorageSupported?(null===this.sessionStorage&&(this.sessionStorage=new c),this.sessionStorage):this.getInMemoryStorage()}},{key:"getLocalStorage",value:function(){return this.isLocalStorageSupported?(null===this.localStorage&&(this.localStorage=new u),this.localStorage):this.getInMemoryStorage()}},{key:"getInMemoryStorage",value:function(){return this.fallbackStorage}}]),new s);function s(){i(this,s),this.isSessionStorageSupported=!1,this.isLocalStorageSupported=!1,this.sessionStorage=null,this.localStorage=null,this.fallbackStorage=new E,this.verifyStorageSupport()}function d(){i(this,d)}function I(){i(this,I)}function S(){i(this,S),this.data={}}t.default=o},345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={com:{ccTLD:"us",domain:"com",locale:"en-US",countryCode:"US",countryNativeName:"United States",timeZone:"America/Los_Angeles",siteId:"101",localeId:"1001",seoLang:"en",commonAvailableInCountryCodes:["US","CA"]},"co.uk":{ccTLD:"uk",domain:"co.uk",locale:"en-GB",countryCode:"GB",countryNativeName:"United Kingdom",timeZone:"Europe/London",siteId:"102",localeId:"1002",seoLang:"en-gb",commonAvailableInCountryCodes:["GB"]},"com.au":{ccTLD:"au",domain:"com.au",locale:"en-AU",countryCode:"AU",countryNativeName:"Australia",timeZone:"Australia/ACT",siteId:"103",localeId:"1003",seoLang:"en-au",commonAvailableInCountryCodes:["AU"]},de:{ccTLD:"de",domain:"de",locale:"de-DE",countryCode:"DE",countryNativeName:"Deutschland",timeZone:"Europe/Berlin",siteId:"104",localeId:"1004",seoLang:"de",commonAvailableInCountryCodes:["DE","AT"]},fr:{ccTLD:"fr",domain:"fr",locale:"fr-FR",countryCode:"FR",countryNativeName:"France",timeZone:"Europe/Paris",siteId:"105",localeId:"1005",seoLang:"fr",commonAvailableInCountryCodes:["FR","BE"]},ru:{ccTLD:"ru",domain:"ru",locale:"ru-RU",countryCode:"RU",countryNativeName:"Россия",timeZone:"Europe/Moscow",siteId:"106",localeId:"1006",seoLang:"ru",commonAvailableInCountryCodes:["RU"]},jp:{ccTLD:"jp",domain:"jp",locale:"ja-JP",countryCode:"JP",countryNativeName:"日本",timeZone:"Asia/Tokyo",siteId:"107",localeId:"1007",seoLang:"ja",commonAvailableInCountryCodes:["JP"]},it:{ccTLD:"it",domain:"it",locale:"it-IT",countryCode:"IT",countryNativeName:"Italia",timeZone:"Europe/Rome",siteId:"108",localeId:"1008",seoLang:"it",commonAvailableInCountryCodes:["IT"]},es:{ccTLD:"es",domain:"es",locale:"es-ES",countryCode:"ES",countryNativeName:"España",timeZone:"Europe/Madrid",siteId:"109",localeId:"1009",seoLang:"es",commonAvailableInCountryCodes:["ES"]},dk:{ccTLD:"dk",domain:"dk",locale:"da-DK",countryCode:"DK",countryNativeName:"Danmark",timeZone:"Europe/Copenhagen",siteId:"110",localeId:"1010",seoLang:"da",commonAvailableInCountryCodes:["DK"]},no:{ccTLD:"no",domain:"no",locale:"nb-NO",countryCode:"NO",countryNativeName:"Norway",timeZone:"Europe/Oslo",siteId:"111",localeId:"1011",seoLang:"nb",commonAvailableInCountryCodes:["NO"]},fi:{ccTLD:"fi",domain:"fi",locale:"fi-FI",countryCode:"FI",countryNativeName:"Suomi",timeZone:"Europe/Helsinki",siteId:"112",localeId:"1012",seoLang:"fi",commonAvailableInCountryCodes:["FI"]},se:{ccTLD:"se",domain:"se",locale:"sv-SE",countryCode:"SE",countryNativeName:"Sverige",timeZone:"Europe/Stockholm",siteId:"113",localeId:"1013",seoLang:"sv",commonAvailableInCountryCodes:["SE"]},ie:{ccTLD:"ie",domain:"ie",locale:"en-IE",countryCode:"IE",countryNativeName:"Ireland",timeZone:"Europe/Dublin",siteId:"114",localeId:"1014",seoLang:"en-ie",commonAvailableInCountryCodes:["IE"]},"co.nz":{ccTLD:"nz",domain:"co.nz",locale:"en-NZ",countryCode:"NZ",countryNativeName:"New Zealand",timeZone:"Pacific/Auckland",siteId:"115",localeId:"1015",seoLang:"en-nz",commonAvailableInCountryCodes:["NZ"]},"com.sg":{ccTLD:"sg",domain:"com.sg",locale:"en-SG",countryCode:"SG",countryNativeName:"Singapore",timeZone:"Asia/Singapore",siteId:"116",localeId:"1016",seoLang:"en-sg",commonAvailableInCountryCodes:["SG"]},in:{ccTLD:"in",domain:"in",locale:"en-IN",countryCode:"IN",countryNativeName:"India",timeZone:"Asia/Calcutta",siteId:"117",localeId:"1017",seoLang:"en-in",commonAvailableInCountryCodes:["IN"]},nl:{ccTLD:"nl",domain:"nl",locale:"nl-NL",countryCode:"NL",countryNativeName:"Netherlands",timeZone:"Europe/Amsterdam",siteId:"118",localeId:"1018",seoLang:"nl",commonAvailableInCountryCodes:["NL"]},at:{ccTLD:"at",domain:"at",locale:"de-AT",countryCode:"AT",countryNativeName:"Austria",timeZone:"Europe/Vienna",siteId:"119",localeId:"1019",seoLang:"de-at",commonAvailableInCountryCodes:["AT"]}}},150:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTS=void 0,t.CONSTS={EXPIRE_KEY:"_expires"}}},i={};return function e(t){var o=i[t];if(void 0!==o)return o.exports;o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(304)})()),HZ.utils.OmnilogTrackingUtils=window.Omnilog["omnilog-tracking-utils"].default;

window.hzmr.push("omnilogTrackingUtils:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End omnilogTrackingUtils.js  **************/
/************* Start omnilogSDK.js for locale en-US **************/
try {HZ.ns("HZ.utils"),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Omnilog=t():(e.Omnilog=e.Omnilog||{},e.Omnilog["omnilog-sdk"]=t())}(self,()=>(()=>{var n={337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DummyIdentityUtils=t.DummyUserAttributeUtils=t.DummySessionUtils=t.DummyRequestUtils=t.DummyFlowUtils=t.DummyExpUtils=t.DummyOmnilogHelper=void 0;var o=n(924);t.DummyOmnilogHelper={getRequestId:function(){return""},getRoutingDescriptor:function(){return{siteName:"",namespace:"",environment:"",name:""}},getActiveUser:function(){return null},getDeviceType:function(){return o.DeviceType.NONE},sendEvent:function(e,t){},sendIdentityEvent:function(e,t,n){},initialize:function(){},getExtDeviceId:function(){return null},getAdminUserId:function(){return null},getDeviceOrientation:function(){},getEnvironment:function(){return""},getViewContext:function(){return{}},getComponent:function(){return{type:o.ComponentType.CLIENT_BROWSER,detailedType:o.ComponentDetailedType.JUWKAA_ISOMORHPIC_JS_WEB,componentName:"Jukwaa Web"}},getDebugUtil:function(){return{sendDebugLog:function(){}}},getMid:function(){return null},getIdentityInput:function(){return null},getChannel:function(){return o.Channel.UNKNOWN},getProductInfo:function(){return{}},getClientInfo:function(){return{clientId:"NO_CLIENT_ID",xClientId:"NO_CLIENT_ID",extClientId:"",clientComponentType:o.ComponentDetailedType.JUWKAA_ISOMORHPIC_JS_WEB,visitorId:"NO_CLIENT_ID",xVisitorId:"NO_CLIENT_ID"}},getClientIp:function(){return""},abTestForOmnilog:function(){return{}},getHouzzProTeamId:function(){return""},getHouzzProTeamManagerUserId:function(){return""},getClientUrl:function(){return""},getFullRequestUrl:function(){return""},getReferer:function(){return""},getRegisteredAbTests:function(){return null},isProAIAssist:function(){return!1}},t.DummyExpUtils={getStorage:function(){},setActiveExperience:function(){},getExperience:function(){}},t.DummyFlowUtils={init:function(){},getStorage:function(){},setParentFlow:function(){},getParentFlow:function(){return null},getFlowStack:function(){return[]},setFlowStack:function(){},pushToFlowStack:function(){},popFlowStack:function(){return null},resetFlows:function(){},getActiveFlow:function(){return null},updateActiveFlow:function(e,t){}},t.DummyRequestUtils={getToken:function(){return null}},t.DummySessionUtils={getSession:function(){return null},getSessionId:function(){return""},getExtSessionId:function(){return""},updateSession:function(){return null}},t.DummyUserAttributeUtils={getSetUaDetails:function(e,t,n){},getUnsetUaDetails:function(e){}},t.DummyIdentityUtils={getLogoutCount:function(){return 0},updateLogoutCount:function(){},getClientIdModifier:function(){return null}}},316:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logError=void 0;var a=n(338),s=o(n(144)),l="/j/ajax/client-error-light";function u(e,t,n,o,i,r){"function"==typeof t&&o instanceof e?t(n,o,i,r):console.log("OmniLogSDK ".concat(n," Error: ").concat(o.message))}t.logError=function(e,t,n,o){try{if("undefined"==typeof window)return;var i={type:e},r=encodeURIComponent(JSON.stringify(i));(0,s.default)("".concat(((0,a.isTestingEnv)(n)?"".concat("https://www.stghouzz.com"):"".concat("https://www.houzz.com")).concat(l),"?p=").concat(r)),console.log("OmniLogSDK ".concat(e," Error: ").concat(t.message))}catch(e){}},t.default=function(a,s,l){return void 0===s&&(s=t.logError),void 0===l&&(l=Error),function(e,t,n){var r=n.value;return n.value=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=(null===(e=null==this?void 0:this.OmnilogHelper)||void 0===e?void 0:e.getEnvironment())||"";try{var i=r.apply(this,t);return i&&"function"==typeof i.then&&"function"==typeof i.catch?i.catch(function(e){u(l,s,a,e,o,t)}):i}catch(e){u(l,s,a,e,o,t)}},n}}},642:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__rest||function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});function a(e,t){return"function"!=typeof(null==e?void 0:e.getAttribute)||(t.position=void 0!==t.position?t.position:function(e,t){for(var n=0;n<t.length;n++){var o=parseInt((null==e?void 0:e.getAttribute(t[n]))||"",10);if(!isNaN(o))return o}}(e,["posId","data-posid","data-pos-id"]),t.elementType=t.elementType||e.getAttribute("role")||e.nodeName||void 0,t.elementLabel=t.elementLabel||e.getAttribute("label")||e.getAttribute("aria-label")||void 0,t.entityType=t.entityType||e.getAttribute("entityType")||e.getAttribute("data-entity-type")||void 0,t.entityId=t.entityId||e.getAttribute("objId")||e.getAttribute("data-objid")||e.getAttribute("entityId")||e.getAttribute("data-entity-id")||void 0,t.campaignId=t.campaignId||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||void 0,t.campaignToken=t.campaignToken||e.getAttribute("campaignId")||e.getAttribute("data-campaign-id")||e.getAttribute("campaignToken")||e.getAttribute("data-campaign-token")||void 0,t.creativeId=t.creativeId||e.getAttribute("creativeId")||e.getAttribute("data-creative-id")||void 0,t.section=t.section||e.getAttribute("section")||e.getAttribute("data-section")||void 0,t.component=t.component||e.getAttribute("component")||e.getAttribute("data-component")||void 0,t.compId=t.compId||e.getAttribute("compId")||e.getAttribute("data-compid")||void 0,t.l1Section=t.section||e.getAttribute("data-section")||void 0,t.l2Container=t.l2Container||t.container||e.getAttribute("data-container")||void 0,t.l3Component=t.component||e.getAttribute("data-component")||void 0,t.cta=t.cta||e.getAttribute("data-cta")||void 0,t.extraInfo=t.extraInfo||e.getAttribute("data-extra-info")||void 0),t}function l(){return r.default.getLocalStorage()}var u=n(924),r=i(n(670)),c=n(304),d="persisted_evt_src",p="transient_evt_src",E={trackingInfo:null,eventSource:null},g=function(n){return n?(Object.keys(n).forEach(function(e){var t=n[e];return t&&"object"==typeof t&&g(t)||!t&&delete n[e]}),n):{}},m={setEventSource:function(e){try{var t,n,o,i,r,a=l();a&&e&&"object"==typeof e&&(t=e.experience,n=e.parentFlow,o=e.activeFlow,i=s(e,["experience","parentFlow","activeFlow"]),r={experience:t,parentFlow:n,activeFlow:o},a.set(p,i,10),a.set(d,r))}catch(e){}},updateEventSource:function(e){var t;e&&(t=m.getEventSource()||{},m.setEventSource(Object.assign({},t,e)))},getEventSource:function(){var e=l(),t=e.get(d)||{},e=e.get(p)||{},e=o(o({},t),e);return g(e)},getEventSourceFromTargetElement:function(e,t){return e?a(e,t):{}},collectEventSourceFromDOM:function(e){var t={};if(!e)return t;try{for(var n=e;n;)t=n?a(n,t):t,n=n.parentNode}catch(e){}return!t.component&&t.compId&&(t.component=t.compId),t},getTrackingInfoAndSetEventSource:function(e,r){if(!e)return E;var t=function(e){var t;if("function"!=typeof(null==e?void 0:e.getAttribute))return E;var n={compId:null,posId:null,scopeId:null,objId:null,anchorText:null,eventType:r||u.UIEvents.ELEMENT_CLICKED,hasTrackMe:!1},o={};try{for(var i=e;i;)n.compId=n.compId||i.getAttribute("compId")||i.getAttribute("data-compid"),n.scopeId=n.scopeId||i.getAttribute("scopeId")||i.getAttribute("data-scopeid"),n.objId=n.objId||i.getAttribute("objId")||i.getAttribute("data-objid"),n.posId=n.posId||i.getAttribute("posId")||i.getAttribute("data-posid"),n.anchorText=n.anchorText||(null===(t=null==i?void 0:i.innerText)||void 0===t?void 0:t.replace(/[\s:]/g,"").substring(0,30)),n.hasTrackMe=n.hasTrackMe||i.classList.contains("hz-track-me")||i.classList.contains("trackMe"),n.eventType=n.eventType||i.getAttribute("data-event-name")||i.getAttribute("data-event-type"),o=a(i,o),i=i.parentElement;return n.eventType&&Object.values(u.UIEvents).includes(n.eventType),{trackingInfo:n,eventSource:o}}catch(e){return E}}(e)||{},n=t.trackingInfo,e=t.eventSource,t=void 0===e?{}:e;if(n&&t){e=c.ExperienceUtils.getExperience()||null;e&&(t.experience=e);e=c.FlowUtils.getParentFlow();e&&(t.parentFlow=e);e=c.FlowUtils.getActiveFlow();return e&&(t.activeFlow=e),m.setEventSource(t),{trackingInfo:n,eventSource:t}}return E}};t.default=m},924:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.OmnilogError=t.DeviceType=t.OmnilogLocalStorageKey=t.RouterNSProductMap=t.IdentityEventType=t.ViewMode=t.DeviceOrientation=t.EventInitiator=t.TestBotType=t.UIEvents=t.Channel=t.ComponentOsType=t.ComponentType=t.ComponentName=t.ComponentDetailedType=t.OmnilogStatusCodes=t.OmnilogHeaders=t.OmniLoggerConst=t.OmniLoggerEventNames=void 0,(n=t.OmniLoggerEventNames||(t.OmniLoggerEventNames={})).EXPERIENCE_LOADED="Experience Loaded",n.EXPERIENCE_UNLOADED="Experience Unloaded",n.OMNILOG_EVENT="omnilog",n.TEST_REGISTERED="Tests Registered",n.SESSION_STARTED="Session Started",n.USER_ATTRIBUTE_UPDATED="User Attribute Updated",(t.OmniLoggerConst||(t.OmniLoggerConst={})).OMNILOG_TOKEN_HEADER_NAME="X-HZ-OMNILOG-TOKEN",(n=t.OmnilogHeaders||(t.OmnilogHeaders={})).EXTERNAL_SESSION_ID_HEADER="x-ol-ext-session-id",n.SESSION_ID_HEADER="x-ol-session-id",n.EXTERNAL_DEVICE_ID_HEADER="x-ol-ext-device-id",n.EXPERIENCE_ID_HEADER="x-ol-exp-id",n.EXPERIENCE_NAME_HEADER="x-ol-exp-name",n.FLOW_ID_HEADER="x-ol-flow-id",n.FLOW_NAME_HEADER="x-ol-flow-name",n.FLOW_STEP_NAME_HEADER="x-ol-step-name",n.PRODUCT_HEADER="x-ol-product",n.PRODUCT_VARIANT_HEADER="x-ol-product-variant",n.MID_HEADER="x-ol-mid",(n=t.OmnilogStatusCodes||(t.OmnilogStatusCodes={}))[n.STATUS_CODE_SUCCESS=1]="STATUS_CODE_SUCCESS",n[n.STATUS_CODE_FAILURE=-1]="STATUS_CODE_FAILURE",(n=t.ComponentDetailedType||(t.ComponentDetailedType={}))[n.C2_LEGACY_WEB=101]="C2_LEGACY_WEB",n[n.JUWKAA_ISOMORHPIC_JS_WEB=102]="JUWKAA_ISOMORHPIC_JS_WEB",n[n.SITE_DESIGNER_LEGACY_WEB=103]="SITE_DESIGNER_LEGACY_WEB",n[n.SITE_DESIGNER_ISOMORPHIC_JS_WEB=104]="SITE_DESIGNER_ISOMORPHIC_JS_WEB",n[n.IVY_LEGACY_WEB=105]="IVY_LEGACY_WEB",n[n.IVY_ISOMORPHIC_JS_WEB=106]="IVY_ISOMORPHIC_JS_WEB",n[n.CONX_LEGACY_WEB=107]="CONX_LEGACY_WEB",n[n.WINDOWS_MOBILE_APP=110]="WINDOWS_MOBILE_APP",n[n.PRO_SITES_WEB=112]="PRO_SITES_WEB",n[n.HOUZZ_PRO_CLIPPER=151]="HOUZZ_PRO_CLIPPER",n[n.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",n[n.HOUZZ_IOS_MOBILE_APP=201]="HOUZZ_IOS_MOBILE_APP",n[n.HOUZZ_ANDROID_MOBILE_APP=202]="HOUZZ_ANDROID_MOBILE_APP",n[n.HOUZZ_PRO_IOS_MOBILE_APP=251]="HOUZZ_PRO_IOS_MOBILE_APP",n[n.HOUZZ_PRO_ANDROID_MOBILE_APP=252]="HOUZZ_PRO_ANDROID_MOBILE_APP",n[n.C2_WEB_SERVER=301]="C2_WEB_SERVER",n[n.JUKWAA_WEB_SERVER=302]="JUKWAA_WEB_SERVER",n[n.GRAPHQL_SERVER=303]="GRAPHQL_SERVER",n[n.C2_SERVICE=304]="C2_SERVICE",n[n.IDENTITY_SERVICE=305]="IDENTITY_SERVICE",n[n.AD_SERVER=306]="AD_SERVER",n[n.BATCH=307]="BATCH",n[n.CONX_SERVER=308]="CONX_SERVER",n[n.PRO_SITES_WEB_SERVER=312]="PRO_SITES_WEB_SERVER",n[n.IVY_SERVICE_SERVER=315]="IVY_SERVICE_SERVER",n[n.EPN=401]="EPN",n[n.SALESFORCE=501]="SALESFORCE",n[n.BLUESHIFT=502]="BLUESHIFT",n[n.ELOQUA=503]="ELOQUA",n[n.UNKNOWN=-1]="UNKNOWN",(n=t.ComponentName||(t.ComponentName={})).JUKWAA_WEB="Jukwaa Web Client",n.PRO_SITES_WEB="Pro Site Web Client",n.SITE_DESIGNER_WEB="Site Designer Web Client",n.GRAPHQL_SERVER="Graphql Server",n.GRAPHQL_HOUZZ_PRO_SERVER="GraphQL Houzz Pro Server",n.JUKWAA_WEB_SERVER="Jukwaa Web Server",n.PRO_SITES_WEB_SERVER="Pro Site Web Server",n.SITE_DESIGNER_WEB_SERVER="Site Designer Web Server",n.IVY_SERVICE_SERVER="Ivy Service Server",n.GMAIL_CRM_CHROME_EXTENSION="Gmail CRM Chrome Extension",n.PRODUCT_CLIPPER_CHROME_EXTENSION="Product Clipper Chrome Extension",n.IMAGE_CLIPPER_CHROME_EXTENSION="Image Clipper Chrome Extension",n.HOUZZ_PRO_CLIPPER="Houzz Pro Clipper",(n=t.ComponentType||(t.ComponentType={}))[n.CLIENT_BROWSER=100]="CLIENT_BROWSER",n[n.CLIENT_MOBILE_APP=200]="CLIENT_MOBILE_APP",n[n.SERVER_WEB=300]="SERVER_WEB",n[n.SERVER_OFFLINE=400]="SERVER_OFFLINE",n[n.SERVER_SERVICE=500]="SERVER_SERVICE",(n=t.ComponentOsType||(t.ComponentOsType={}))[n.LINUX=1]="LINUX",n[n.WINDOWS=2]="WINDOWS",n[n.OSX=3]="OSX",n[n.IOS=4]="IOS",n[n.ANDROID=5]="ANDROID",n[n.OTHER=6]="OTHER",(n=t.Channel||(t.Channel={})).DIRECT="Direct",n.EMAIL="Email",n.PAID="Paid",n.SEARCH="Search",n.SOCIAL="Social",n.PARTNER="Partner",n.INTERNAL="Internal",n.REFERRAL="Referral",n[n.UNKNOWN=100]="UNKNOWN",(n=t.UIEvents||(t.UIEvents={})).ELEMENT_CLICKED="Element Clicked",n.ELEMENT_FOCUSED="Element Focused",n.ELEMENT_BLURRED="Element Blurred",n.ELEMENT_SCROLLED="Element Scrolled",n.ELEMENT_VIEWED="Element Viewed",n.ELEMENT_EXPANDED="Element Expanded",n.ELEMENT_COLLAPSED="Element Collapsed",n.INPUT_CHANGED="Input Changed",n.MEDIA_PLAYED="Media Played",n.MEDIA_PAUSED="Media Paused",n.MEDIA_PLAY_COMPLETED="Media Play Completed",n.MEDIA_TIME_CHANGED="Media Time Changed",n.MEDIA_RESTARTED="Media Restarted",n.FORM_SUBMITTED="Form Submitted",(n=t.TestBotType||(t.TestBotType={}))[n.NONE=0]="NONE",n[n.AUTOMATION=1]="AUTOMATION",n[n.MANUAL=4]="MANUAL",n[n.BATCH=16]="BATCH",n[n.HOUZZ_STAFF=32]="HOUZZ_STAFF",n[n.ANALYTICAL_BOT=64]="ANALYTICAL_BOT",(n=t.EventInitiator||(t.EventInitiator={}))[n.USER_SERVER=0]="USER_SERVER",n[n.USER_CLIENT=1]="USER_CLIENT",n[n.APPLICATION_SERVER=2]="APPLICATION_SERVER",n[n.APPLICATION_CLIENT=3]="APPLICATION_CLIENT",n[n.PRO_AI_ASSIST_USER_SERVER=4]="PRO_AI_ASSIST_USER_SERVER",n[n.PRO_AI_ASSIST_USER_CLIENT=5]="PRO_AI_ASSIST_USER_CLIENT",n[n.PRO_AI_ASSIST_APPLICATION_SERVER=6]="PRO_AI_ASSIST_APPLICATION_SERVER",n[n.PRO_AI_ASSIST_APPLICATION_CLIENT=7]="PRO_AI_ASSIST_APPLICATION_CLIENT",(n=t.DeviceOrientation||(t.DeviceOrientation={}))[n.PORTRAIT=1]="PORTRAIT",n[n.LANDSCAPE=2]="LANDSCAPE",(n=t.ViewMode||(t.ViewMode={})).STANDALONE="Standalone",n.DEFAULT="Default",n.LIGHTBOX="Lightbox",n.QUICKVIEW="Quick View",(n=t.IdentityEventType||(t.IdentityEventType={})).LOGIN="login",n.LOGOUT="logout",n.MODIFY="modify",t.RouterNSProductMap={HOUZZ:"Houzz",PRO_SOLUTIONS:"Houzz Pro",UNKNOWN:"UNKNOWN"},(n=t.OmnilogLocalStorageKey||(t.OmnilogLocalStorageKey={})).ActiveExperience="OMNILOG_ACTIVE_EXPERIENCE",n.FlowStack="OMNILOG_FLOW_STACK",n.ParentFlow="OMNILOG_PARENT_FLOW",n.LogoutCount="OMNILOG_LOGOUT_COUNT",(n=t.DeviceType||(t.DeviceType={}))[n.NONE=0]="NONE",n[n.DESKTOP=1]="DESKTOP",n[n.TABLET=2]="TABLET",n[n.SMARTPHONE=3]="SMARTPHONE",n[n.SMART_TV=4]="SMART_TV",n[n.OTHER=5]="OTHER",(t=t.OmnilogError||(t.OmnilogError={})).INIT="omnilog.init",t.CALL_MAKKARI_API="omnilog.callMakkariApi",t.EXPERIENCE_LOADED="omnilog.experienceLoaded",t.EXPERIENCE_UNLOADED="omnilog.experienceUnLoaded",t.SEND_INTERACTION_EVENT="omnilog.sendInteractionEvent",t.SEND_OUTCOME_EVENT="omnilog.sendOutcomeEvent",t.SEND_IDENTITY_EVENT="omnilog.sendIdentityEvent",t.FLOW_STARTED="omnilog.flowStarted",t.FLOW_STEP_LOADED="omnilog.flowStepLoaded",t.FLOW_STEP_COMPLETED="omnilog.flowStepCompleted",t.FLOW_COMPLETED="omnilog.flowCompleted",t.FLOW_STEP_UNLOADED="omnilog.flowStepUnloaded",t.DUPLICATE_EXPERIENCE="omnilog.duplicate_experience",t.BUILD_CLIENT_TOKEN="omnilog.buildClientToken",t.LOG_ERROR="omnilog.log_error"},639:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){e[o=void 0===o?n:o]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(r<3?i(a):3<r?i(t,n,a):i(t,n))||a);return 3<r&&a&&Object.defineProperty(t,n,a),a},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},l=this&&this.__rest||function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n},u=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=n(924),p=n(614),E=c(n(304)),g=a(n(84)),m=n(337),f=c(n(935)),n=c(n(316)),I=function(){return"undefined"==typeof window},n=(v.getInstance=function(e){return v.omnilogInstance=!v.omnilogInstance?new v(e):v.omnilogInstance},v.prototype.init=function(e){e=(e||{}).OmnilogHelper;if(!this.OmnilogHelper&&!e)throw new Error("All clients of omnilog have to initialize OmnilogSDK with an OmnilogHelper util object... ");e&&(this.OmnilogHelper=e),this.OmnilogHelper.getChannel()!==d.Channel.INTERNAL&&this.teardown(),"function"==typeof this.OmnilogHelper.initialize&&this.OmnilogHelper.initialize({}),this.buildSessionStartEventAndPushQueue(),this.registeredABTests={},this.registerABTests(this.OmnilogHelper.getRegisteredAbTests()||{}),this.sentABTests={},setInterval(this.resetSentABTests.bind(this),6e4),this.isInitialized=!0},v.prototype.resetSentABTests=function(){this.sentABTests={}},v.prototype.setActiveExperience=function(e){this.ExperienceUtils.setActiveExperience(e)},v.prototype.resetExperience=function(){this.experienceTracker={},I()||(this.ExperienceUtils.setActiveExperience(null),E.default.updateEventSource({experience:null}))},v.prototype.buildExperience=function(e,t,n,o){var i="";o&&o.experienceId&&(i=o.experienceId);var r=(t=void 0===t?{}:t)||{},a=r.name,s=r.experienceArgumentsJson,l=this.OmnilogHelper.getProductInfo(t)||{},o=l.product,r=l.productVariant,t=this.OmnilogHelper.getEnvironment()?this.OmnilogHelper.getEnvironment().toUpperCase():"",l=(this.OmnilogHelper.getViewContext()||{}).viewMode,l={experienceInstanceId:n||(0,p.v4)(),product:o||"Houzz",productVariant:r||"Houzz US",environment:t,experienceName:e||a,experienceArgumentsJson:s,globalDirectivesJson:void 0,viewMode:l||d.ViewMode.DEFAULT};return i&&(l.referrerExperienceInstanceId=i),l},v.prototype.getExperience=function(){if(I()){var e=this.RequestUtils.getToken();return e?E.default.getInfoFromClientToken(e).experience:null}return this.ExperienceUtils.getExperience()},v.prototype.getEventQueue=function(){return this.eventQueue},v.prototype.isEligibleForSend=function(e){this.OmnilogHelper.getDebugUtil();var t=this.OmnilogHelper.getRequestId();if(e===d.OmniLoggerEventNames.EXPERIENCE_LOADED){if(this.experienceTracker[t])return!1;this.experienceTracker[t]=this.getExperience()||{}}else(new Date).getTime(),e===this.lastEventName&&this.lastEventTimestamp;return!0},v.prototype.experienceLoaded=function(e,t,n,o,i){void 0===t&&(t={}),I()||(n=n||this.OmnilogHelper.getRoutingDescriptor(),i=Object.assign({},E.default.getEventSource(),i||{}),this.setActiveExperience(this.buildExperience(e,n,o,i)),this.resetFlows(),this.sendEvent(d.OmniLoggerEventNames.EXPERIENCE_LOADED,t,i))},v.prototype.experienceUnLoaded=function(e,t,n,o,i){void 0===t&&(t={}),n=n||this.OmnilogHelper.getRoutingDescriptor(),this.setActiveExperience(this.buildExperience(e,n,o,i)),this.sendEvent(d.OmniLoggerEventNames.EXPERIENCE_UNLOADED,t,i)},v.prototype.sendInteractionEvent=function(e,t,n){var o,i;!I()&&Object.values(d.UIEvents).includes(e)&&t&&(o=n||E.default.collectEventSourceFromDOM(t)||{},(i=this.getExperience()||{}).experienceInstanceId&&(o.experienceId=i.experienceInstanceId),i.experienceName&&(o.experienceName=i.experienceName),t=(n=this.getFlowInfo()||{}).flowId,i=n.flowName,n=n.stepName,t&&(o.flowId=t),i&&(o.flowName=i),n&&(o.stepName=n),this.sendEvent(e,{},o))},v.prototype.sendOutcomeEvent=function(e,t,n,o){this.sendEvent(e,s(s({},t),{status_code:n,status_message:o}))},v.prototype.getEventData=function(e,t,n,o){var i=this.getFlowInfo(),r=i||{},a=(r.flowId,r.flowName,r.stepName,t||{}),r=a.eventInitiator,t=l(a,["eventInitiator"]);n=I()?void 0:this.getEventSource(n);a=I()?void 0:this.getClientState(),n=s(s({timestamp:Date.now(),eventId:(0,p.v4)(),eventInitiator:void 0!==r?r:function(e,t,n){var o=!!t.getToken(),t=!n&&!o,n=!I(),o=!1;try{o=e.isProAIAssist()}catch(e){}return(n?1:0)|(t?2:0)|(o?4:0)}(this.OmnilogHelper,this.RequestUtils,n),eventName:e,clientState:a},o),{eventSource:n});return i&&(n.flowInfo=i),t&&(n.eventDetails=t),n},v.prototype.getClientState=function(){if(!I()){var e=E.default.getViewPortDimensions()||{},t=e.viewportWidth,n=e.viewportHeight,e=null;return n&&!isNaN(n)&&null!==window&&void 0!==window&&window.scrollY&&(e=window.scrollY/n),{orientation:this.OmnilogHelper.getDeviceOrientation()||void 0,scrollAmount:e||void 0,viewportWidth:t,viewportHeight:n,url:this.OmnilogHelper.getClientUrl()}}},v.prototype.getEventSource=function(e){if(void 0===e&&(e={}),I())return{};var t=E.default.getEventSource(),n=this.getFlowInfo()||{},o=n.flowId,i=n.flowName,r=n.stepName,a=t.experience||{},n=a.experienceInstanceId,a=a.experienceName;return delete(e=s(s({},t),e)).activeFlow,delete e.parentFlow,delete e.experience,o&&(e.flowId=o),i&&(e.flowName=i),r&&(e.stepName=r),n&&!e.experienceId&&(e.experienceId=n),a&&!e.experienceName&&(e.experienceName=a),e},v.prototype.getSessionContext=function(){var e=this.OmnilogHelper.getClientInfo(),t=e.clientId,n=e.clientIdModifier,o=e.xClientId,i=e.extClientId,r=e.clientComponentType,a=void 0===r?d.ComponentDetailedType.UNKNOWN:r,s=e.userAgent,l=e.visitorId,r=e.xVisitorId,e=e.botIndicator,u=!I()&&(null===(u=this.SessionUtils.getSession())||void 0===u?void 0:u.sessionStartTime)||-1,r={clientId:t,xClientId:o,extClientId:i,clientComponentType:a,userAgent:s,visitorId:l,xVisitorId:r,botIndicator:e||(0,g.getTestBotType)()||void 0,clientIdModifier:n||this.IdentityUtils.getClientIdModifier()||void 0},e=this.OmnilogHelper.getActiveUser(),c=this.OmnilogHelper.abTestForOmnilog()||{},n=JSON.stringify(Array.from(Object.keys(c),function(e){return"".concat(e,": ").concat(c[e])}));return{activeUserName:null==e?void 0:e.userName,activeUserType:null==e?void 0:e.userType,activeUserId:null==e?void 0:e.userId,administrativeUserId:this.OmnilogHelper.getAdminUserId()||void 0,clientInfo:r,sessionId:this.getSessionId(),extSessionId:this.getExtSessionId(),sessionStartTime:u,mid:this.OmnilogHelper.getMid()||void 0,abBuckets:n,houzzProTeamId:this.OmnilogHelper.getHouzzProTeamId()||void 0,houzzProTeamManagerUserId:this.OmnilogHelper.getHouzzProTeamManagerUserId()||void 0}},v.prototype.getSessionId=function(){if(I()){var e=this.RequestUtils.getToken();return e&&(null===(e=E.default.getInfoFromClientToken(e).session)||void 0===e?void 0:e.sessionId)||""}return this.SessionUtils.getSessionId()},v.prototype.getExtSessionId=function(){if(I()){var e=this.RequestUtils.getToken();return e&&(null===(e=E.default.getInfoFromClientToken(e).session)||void 0===e?void 0:e.externalSessionId)||""}return this.SessionUtils.getExtSessionId()},v.prototype.getDebugInfo=function(){var e=this.OmnilogHelper.getMid(),t=this.OmnilogHelper.getMid();if(!e||!t||"".concat(e)!=="".concat(t))return{mid:e||"NO_MID",mpid:t||"NO_MPID",identifyInput:this.OmnilogHelper.getIdentityInput()}},v.prototype.getComponent=function(){var e=this.OmnilogHelper.getComponent(),t=e.detailedType,n=e.componentName,o=e.serviceName,e=e.serverIp,n=o?"".concat(n," (").concat(o,")"):n;return{type:I()?d.ComponentType.SERVER_WEB:d.ComponentType.CLIENT_BROWSER,detailedType:t||d.ComponentDetailedType.JUWKAA_ISOMORHPIC_JS_WEB,componentName:n||d.ComponentName.JUKWAA_WEB,device:{deviceType:this.OmnilogHelper.getDeviceType()},serverIp:e}},v.prototype.getClientRequest=function(){return{requestId:this.OmnilogHelper.getRequestId()||"NO_REQUEST",clientIp:this.OmnilogHelper.getClientIp()||"NO_IP"}},v.prototype.sendEvent=function(e,t,n,o){this.isInitialized||this.init(),this.isEligibleForSend(e)&&(this.buildSessionStartEventAndPushQueue(),n=[this.getEventData(e,t,n,o)],o=this.getEventQueue(),this.eventQueue=[],this.pushABTestEvent(n),n=this.buildOmniLogRecord(u(u([],o,!0),n,!0)),this.OmnilogHelper.sendEvent(e,n),this.lastEventTimestamp=(new Date).getTime(),this.lastEventName=e)},v.prototype.sendIdentityEvent=function(e,t,n,o){this.sendEvent(e,t),this.OmnilogHelper.sendIdentityEvent(e,t,n,o),e===d.IdentityEventType.LOGOUT&&this.IdentityUtils.updateLogoutCount()},v.prototype.generateFlowId=function(){return(0,p.v4)()},v.prototype.getActiveFlow=function(){if(I()){var e=this.RequestUtils.getToken();return e?E.default.getInfoFromClientToken(e).activeFlow:void 0}return this.FlowUtils.getActiveFlow()},v.prototype.setActiveFlow=function(e){return this.FlowUtils.pushToFlowStack(e)},v.prototype.setParentFlow=function(e){this.FlowUtils.setParentFlow(e)},v.prototype.getParentFlow=function(){return I()?this.getActiveFlow():this.FlowUtils.getParentFlow()},v.prototype.pushToFlowStack=function(e){this.FlowUtils.pushToFlowStack(e)},v.prototype.popFlowStack=function(){if(!I())return this.FlowUtils.popFlowStack()},v.prototype.flowStarted=function(e,t){var n,o=this.getParentFlow();o&&o.flowName===e||(n={flowName:e,flowStep:0,flowId:"",stepName:""},this.getActiveFlow()&&o||(n.flowId=this.generateFlowId(),this.setParentFlow(n)),this.setActiveFlow(n),this.sendEvent("".concat(e," - Started"),t))},v.prototype.flowStepLoaded=function(e,t,n){e&&t&&(this.sendEvent("".concat(e," - ").concat(t," - Loaded"),n),this.FlowUtils.updateActiveFlow("stepName",t))},v.prototype.flowStepCompleted=function(e,t,n){e&&t&&(this.sendEvent("".concat(e," - ").concat(t," - Completed"),n),(n=this.getActiveFlow())&&this.FlowUtils.updateActiveFlow("flowStep",n.flowStep+1))},v.prototype.flowCompleted=function(e,t){this.sendEvent("".concat(e," - Completed"),t),this.popFlowStack(),this.FlowUtils.getFlowStack().length||this.resetFlows()},v.prototype.flowAbandoned=function(){this.popFlowStack(),this.FlowUtils.getFlowStack().length||this.resetFlows()},v.prototype.flowStepUnloaded=function(e,t,n){void 0===n&&(n={}),this.sendEvent("".concat(e," - ").concat(t," - Unloaded"),n)},v.prototype.resetFlows=function(){I()||(this.FlowUtils.resetFlows(),E.default.updateEventSource({parentFlow:null,activeFlow:null}))},v.prototype.teardown=function(){I()||(this.resetFlows(),this.resetExperience())},v.prototype.buildOmniLogRecord=function(e){return{protocol:{logVersion:1.2,componentTimestamp:Date.now(),sdkVersion:f.default.version},component:this.getComponent(),session:this.getSessionContext(),logEntries:[{clientRequest:this.getClientRequest(),experience:this.getExperience(),events:e}],debug:this.getDebugInfo()}},v.prototype.getFlowInfo=function(){var e=this.getActiveFlow(),t=this.getParentFlow(),n=(e||{}).stepName,e=t||{},t=e.flowName,e=e.flowId;return t&&e?{flowId:e,flowName:t,stepName:n}:null},v.prototype.buildClientToken=function(){if(!I()){var e={},t=this.ExperienceUtils.getExperience()||{},n=t.experienceName,o=t.experienceInstanceId,i=this.OmnilogHelper.getRoutingDescriptor(),r=this.OmnilogHelper.getProductInfo(i),a=r.product,s=r.productVariant,t=(this.FlowUtils.getActiveFlow()||{}).stepName,i=this.FlowUtils.getParentFlow();return i&&(i=(r=i||{}).flowName,r=r.flowId,e.flowId=r,e.flowName=i,e.stepName=t),e.experienceId=o,e.experienceName=n,e.externalDeviceId=this.OmnilogHelper.getExtDeviceId(),e.externalSessionId="".concat(!I()&&(null===(n=this.SessionUtils.getSession())||void 0===n?void 0:n.sessionStartTime)||-1),e.sessionId=this.SessionUtils.getSessionId(),e.product=a||null,e.productVariant=s||null,e.mid=this.OmnilogHelper.getMid(),e}},v.prototype.registerABTests=function(e){(e=void 0===e?{}:e)&&"object"==typeof e&&0!==Object.keys(e).length&&(this.registeredABTests=s(s({},this.registeredABTests),e))},v.prototype.setUserAttribute=function(e,t,n){this.sendEvent(d.OmniLoggerEventNames.USER_ATTRIBUTE_UPDATED,this.UserAttributeUtils.getSetUaDetails(e,t,n))},v.prototype.unsetUserAttribute=function(e){this.sendEvent(d.OmniLoggerEventNames.USER_ATTRIBUTE_UPDATED,this.UserAttributeUtils.getUnsetUaDetails(e))},v.prototype.getRegisteredAbTests=function(){var n=this;try{return Object.keys(this.registeredABTests).reduce(function(e,t){return n.sentABTests[t]!==n.registeredABTests[t]&&(e[t]=n.registeredABTests[t]),e},{})}catch(n){return{}}},v.prototype.pushABTestEvent=function(e){var t=this.getRegisteredAbTests();0<Object.keys(t).length&&(t=this.getEventData(d.OmniLoggerEventNames.TEST_REGISTERED,E.default.getTestRegisteredEventDetails(t)),e.push(t)),this.sentABTests=s(s({},this.sentABTests),this.registeredABTests),this.registeredABTests={}},v.prototype.buildSessionStartEventAndPushQueue=function(){var e=this.updateSession()||{},t=e.session,n=e.isContinued,o=void 0!==n&&n;t&&(e=this.OmnilogHelper.getFullRequestUrl(),n=this.OmnilogHelper.getReferer(),o=g.default.getSessionStartEventDetails(e,n,t,o),o=this.getEventData(d.OmniLoggerEventNames.SESSION_STARTED,o),this.eventQueue.push(o))},v.prototype.updateSession=function(){return I()?void 0:this.SessionUtils.updateSession(this.OmnilogHelper.getFullRequestUrl(),this.OmnilogHelper.getReferer())},r([(v.omnilogInstance=null,n.default)(d.OmnilogError.INIT)],v.prototype,"init",null),r([(0,n.default)(d.OmnilogError.EXPERIENCE_LOADED)],v.prototype,"experienceLoaded",null),r([(0,n.default)(d.OmnilogError.EXPERIENCE_UNLOADED)],v.prototype,"experienceUnLoaded",null),r([(0,n.default)(d.OmnilogError.SEND_INTERACTION_EVENT)],v.prototype,"sendInteractionEvent",null),r([(0,n.default)(d.OmnilogError.SEND_OUTCOME_EVENT)],v.prototype,"sendOutcomeEvent",null),r([(0,n.default)(d.OmnilogError.SEND_IDENTITY_EVENT)],v.prototype,"sendIdentityEvent",null),r([(0,n.default)(d.OmnilogError.FLOW_STARTED)],v.prototype,"flowStarted",null),r([(0,n.default)(d.OmnilogError.FLOW_STEP_LOADED)],v.prototype,"flowStepLoaded",null),r([(0,n.default)(d.OmnilogError.FLOW_STEP_COMPLETED)],v.prototype,"flowStepCompleted",null),r([(0,n.default)(d.OmnilogError.FLOW_COMPLETED)],v.prototype,"flowCompleted",null),r([(0,n.default)(d.OmnilogError.FLOW_STEP_UNLOADED)],v.prototype,"flowStepUnloaded",null),r([(0,n.default)(d.OmnilogError.BUILD_CLIENT_TOKEN)],v.prototype,"buildClientToken",null),v);function v(e){this.eventQueue=[],this.isInitialized=!1,this.experienceTracker={},this.lastEventTimestamp=0,this.lastEventName=null,this.registeredABTests={},this.sentABTests={},this.userAttributeEvents=[];var t=e.OmnilogHelper,n=e.ExperienceUtils,o=e.FlowUtils,i=e.SessionUtils,r=e.RequestUtils,a=e.UserAttributeUtils,e=e.IdentityUtils;this.OmnilogHelper=t||m.DummyOmnilogHelper,this.ExperienceUtils=n||m.DummyExpUtils,this.FlowUtils=o||m.DummyFlowUtils,this.RequestUtils=r||m.DummyRequestUtils,this.SessionUtils=i||m.DummySessionUtils,this.UserAttributeUtils=a||m.DummyUserAttributeUtils,this.IdentityUtils=e||m.DummyIdentityUtils,this.FlowUtils.init()}t.default=n},84:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTestBotType=t.getSessionId=t.getExtSessionId=void 0;function a(e){return e?{utm_source:(e=new URL(e).searchParams).get("utm_source"),utm_campaign:e.get("utm_campaign"),utm_term:e.get("utm_term"),utm_content:e.get("utm_content"),utm_medium:e.get("utm_medium"),m_refid:e.get("m_refid")}:null}function s(e){return!!(!(e=e.lastActiveTime)||e<0||isNaN(e))||Date.now()-e>i}function l(e,t,n,o){var i=Date.now(),e={sessionId:(0,p.v4)(),sessionStartTime:i,lastActiveTime:i,channel:n||_(e,t),campaign:o||h(e)};return d.default.getLocalStorage().set(g,e),e}function u(){try{var e=O();return e?(e.lastActiveTime=Date.now(),void d.default.getLocalStorage().set(g,e)):void 0}catch(e){}}var c=n(924),d=o(n(670)),p=n(614),E=o(n(851)),g="OMNILOG_SESSION",i=18e5,m=/refid=([^&]+)/,f=/-ocnt-/,I=/ptr-|ptr_|partners_/,v=/-ptr-mpl/,S={hostname:"",pathname:"",searchParams:""},_=function(e,t){var n=null,o=new URL(e).searchParams,i=t?new URL(t):S,r=i.hostname,a=i.pathname,s=i.searchParams,i=r+("/"===a?"":a),a=new RegExp(E.default.houzz).test(r);new RegExp(E.default.unknown).test(i)?n=null:new RegExp(E.default.social).test(i)?n=c.Channel.SOCIAL:new RegExp(E.default.email).test(i)?n=c.Channel.EMAIL:new RegExp(E.default.search).test(i)&&(n=c.Channel.SEARCH);r=s.toString(),i=o.toString();if(new RegExp(m).test(r)||new RegExp(m).test(i)){s="",o=r.match(m),i=i.match(m);return Array.isArray(o)&&0<o.length?s=o[1]:Array.isArray(i)&&0<i.length&&(s=i[1]),new RegExp(f).test(s)?c.Channel.SOCIAL:new RegExp(I).test(s)&&!new RegExp(v).test(s)?c.Channel.PARTNER:c.Channel.PAID}return(n===c.Channel.SEARCH||n===c.Channel.EMAIL||null===n)&&new RegExp(/\/nllc\/|source=gmail/).test(r)||new RegExp(/utm_medium=email|source=marketing_email|lsmr=Email/).test(e)?c.Channel.EMAIL:null===n?t?a?c.Channel.INTERNAL:c.Channel.REFERRAL:c.Channel.DIRECT:n},h=function(e){if(!e)return null;e=new RegExp("[?&]utm_campaign(=([^&#]*)|&|#|$)").exec(e);return e&&e[2]?e[2]:null},O=function(){return d.default.getLocalStorage().get(g)};t.getExtSessionId=function(){var e=O();return(null==e?void 0:e.sessionId)||""},t.getSessionId=function(){var e=O();return(null==e?void 0:e.sessionId)||""},t.getTestBotType=function(){if("undefined"!=typeof document){var e=document.cookie||"";return-1!==e.indexOf("tt=automation")?c.TestBotType.AUTOMATION:-1!==e.indexOf("tt=manual")?c.TestBotType.MANUAL:void 0}},t.default={OMNILOG_SESSION_STORAGE_KEY:g,SESSION_EXPIRE_IN_MS:i,isSessionTimedOut:s,computeChannel:_,computeCampaign:h,getSession:O,updateSession:function(e,t){if(e){var n=O();if(!n)return{session:l(e,t),isContinued:!1};var o=s(n),i=_(e,t),r=h(e),a=n.channel,n=n.campaign;return o&&i===c.Channel.INTERNAL?{session:l("","",a),isContinued:!0}:(o||i!==c.Channel.INTERNAL)&&(o||null!==i&&i!==a||null!==r&&r!=n)?{session:l(e,t),isContinued:!1}:void u()}},buildNewSession:l,getSessionStartEventDetails:function(e,t,n,o){var i=a(e);return r(r({session_channel:n.channel},i),{is_continued_session:o,url:e,referrer_url:t})},parseUtmQueries:a,shouldFireNewSession:function(e,t,n){if(s(e))return!0;var o=e.channel,i=e.campaign;try{var r=_(t,n);if(null!==r&&r!==o)return!0;var a=h(t);return null!==a&&a!=i}catch(e){return!1}},getExtSessionId:t.getExtSessionId,getSessionId:t.getSessionId}},304:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.IdentityUtils=i.UserAttributeUtils=i.ExperienceUtils=i.FlowUtils=void 0;var r=t(924),a=o(t(670)),s=t(214),l=o(t(345)),t=o(t(642));i.FlowUtils={init:function(){i.FlowUtils.setFlowStack([])},getStorage:function(){return a.default.getSessionStorage()},getParentFlow:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.ParentFlow)||null},setParentFlow:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ParentFlow,e)},getFlowStack:function(){return i.FlowUtils.getStorage().get(r.OmnilogLocalStorageKey.FlowStack)||[]},setFlowStack:function(e){var t=i.FlowUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.FlowStack,e)},pushToFlowStack:function(e){var t=i.FlowUtils.getFlowStack()||[];t.unshift(e),i.FlowUtils.setFlowStack(t)},popFlowStack:function(){var e=i.FlowUtils.getFlowStack()||[],t=e.shift();return i.FlowUtils.setFlowStack(e),t},resetFlows:function(){i.FlowUtils.setFlowStack([]),i.FlowUtils.setParentFlow(null)},getActiveFlow:function(){var e=i.FlowUtils.getFlowStack();return 0<(null==e?void 0:e.length)?e[0]:null},updateActiveFlow:function(e,t){var n;0!==i.FlowUtils.getFlowStack().length&&((n=i.FlowUtils.popFlowStack())&&(n[e]=t),i.FlowUtils.pushToFlowStack(n))}},i.ExperienceUtils={getStorage:function(){return a.default.getSessionStorage()},setActiveExperience:function(e){var t=i.ExperienceUtils.getStorage();t&&t.set(r.OmnilogLocalStorageKey.ActiveExperience,e)},getExperience:function(){return i.ExperienceUtils.getStorage().get(r.OmnilogLocalStorageKey.ActiveExperience)}},i.UserAttributeUtils={getSetUaDetails:function(e,t,n){if(e&&t)return{user_attribute_set:JSON.stringify([{name:e,value:t,expiration:n||null}])}},getUnsetUaDetails:function(e){if(e)return{user_attribute_unset:JSON.stringify([e])}}},i.IdentityUtils={getLogoutCount:function(){return parseInt(a.default.getLocalStorage().get(r.OmnilogLocalStorageKey.LogoutCount),10)||0},updateLogoutCount:function(){a.default.getLocalStorage().set(r.OmnilogLocalStorageKey.LogoutCount,i.IdentityUtils.getLogoutCount()+1)},getClientIdModifier:function(){var e=i.IdentityUtils.getLogoutCount();if(!e)return null;var t="".concat(e);if(e<1e3)for(var n=4-t.length,o=0;o<n;o++)t="0".concat(t);return t}};var u=n(n({getProductInfo:function(e,t){var n=u.getProductInfoByRoutingDescriptor(t)||{},o=n.product,t=n.productVariant,n=e&&(0,s.getProductInfo)()||{},e=n.product,n=n.productVariant;return{product:o||e||r.RouterNSProductMap.UNKNOWN,productVariant:t||n||r.RouterNSProductMap.UNKNOWN}},getClientEventTokenFromRequestHeaders:function(e){var t=null;return e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]&&((t={}).experienceId=e[r.OmnilogHeaders.EXPERIENCE_ID_HEADER],t.experienceName=e[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER],t.externalDeviceId=e[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER],t.externalSessionId=e[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER],t.sessionId=e[r.OmnilogHeaders.SESSION_ID_HEADER],t.flowId=e[r.OmnilogHeaders.FLOW_ID_HEADER],t.flowName=e[r.OmnilogHeaders.FLOW_NAME_HEADER],t.stepName=e[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER],t.product=e[r.OmnilogHeaders.PRODUCT_HEADER],t.productVariant=e[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER],t.mid=e[r.OmnilogHeaders.MID_HEADER]),t},getInfoFromClientToken:function(e){if(!e)return{};var t=e.experienceId,n=e.experienceName,o=e.flowId,i=e.flowName,r=e.stepName,a=e.flowStep;return{experience:{experienceInstanceId:t,experienceName:n,product:e.product,productVariant:e.productVariant},activeFlow:{flowId:o,flowName:i,stepName:r,flowStep:a},session:{sessionId:e.sessionId,externalSessionId:e.externalSessionId}}},buildClientTokenHeader:function(e){if(!e)return null;var t={};return e.experienceName&&(t[r.OmnilogHeaders.EXPERIENCE_NAME_HEADER]=e.experienceName),e.experienceId&&(t[r.OmnilogHeaders.EXPERIENCE_ID_HEADER]=e.experienceId),e.externalDeviceId&&(t[r.OmnilogHeaders.EXTERNAL_DEVICE_ID_HEADER]=e.externalDeviceId),e.externalSessionId&&(t[r.OmnilogHeaders.EXTERNAL_SESSION_ID_HEADER]=e.externalSessionId),e.sessionId&&(t[r.OmnilogHeaders.SESSION_ID_HEADER]=e.sessionId),e.flowId&&(t[r.OmnilogHeaders.FLOW_ID_HEADER]=e.flowId),e.flowName&&(t[r.OmnilogHeaders.FLOW_NAME_HEADER]=e.flowName),e.stepName&&(t[r.OmnilogHeaders.FLOW_STEP_NAME_HEADER]=e.stepName),e.product&&(t[r.OmnilogHeaders.PRODUCT_HEADER]=e.product),e.productVariant&&(t[r.OmnilogHeaders.PRODUCT_VARIANT_HEADER]=e.productVariant),e.mid&&(t[r.OmnilogHeaders.MID_HEADER]=e.mid),t}},t.default),{FlowUtils:i.FlowUtils,ExperienceUtils:i.ExperienceUtils,UserAttributeUtils:i.UserAttributeUtils,IdentityUtils:i.IdentityUtils,getTestRegisteredEventDetails:function(e){return void 0===e&&(e={}),{test_selections:JSON.stringify(e)}},isNull:function(e){return null==e},countryCodeMapping:function(e){return e===l.default["co.uk"].countryCode?"UK":e},getProductInfoByRoutingDescriptor:function(e){var t=e||{},n=t.namespace,e=void 0===n?"":n,n=t.siteName,t=void 0===n?"":n,n=r.RouterNSProductMap[e];if(!n)return null;e=u.countryCodeMapping(t.replace("".concat(e,"_"),""));return e?{product:n,productVariant:"".concat(n," ").concat(e)}:null},stringifyIfExist:function(e){return u.isNull(e)?e:JSON.stringify(e)},getViewPortDimensions:function(){var e=document.documentElement||{};return{viewportWidth:Math.max(e.clientWidth||0,window.innerWidth||0)||null,viewportHeight:Math.max(e.clientHeight||0,window.innerHeight||0)||null}}});i.default=u},27:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOGGER_NAMESPACE=t.MAKKARI_API_ENDPOINT=t.MAKKARI_DEVICE_STORAGE_KEY=void 0,t.MAKKARI_DEVICE_STORAGE_KEY="makkari_device",t.MAKKARI_API_ENDPOINT="/j/cdp-api",t.LOGGER_NAMESPACE="makkariDebug"},214:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendFallbackTracking=t.getEventHost=t.normalizeUserIdentities=t.isHouzzHost=t.getProductInfo=t.getDevice=t.uuidv4=t._global=t.log=void 0;var i=o(n(670)),s=n(924),l=o(n(304)),u=o(n(345)),r=n(27);function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}t.log=function(){},t._global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},t.uuidv4=a,t.getDevice=function(){var e=i.default.getLocalStorage();try{var t=e.get(r.MAKKARI_DEVICE_STORAGE_KEY);if(t)return t;var n={deviceId:a()};return e.set(r.MAKKARI_DEVICE_STORAGE_KEY,n),n}catch(e){}},t.getProductInfo=function(){if(document.location&&document.location.hostname)return function(e){var t=e?e.split("."):[],n=t.length,o=s.RouterNSProductMap.UNKNOWN,i=s.RouterNSProductMap.UNKNOWN;if(n<2)return{product:o,productVariant:i};"www"===t[0]?o=s.RouterNSProductMap.HOUZZ:"pro"===t[0]&&(o=s.RouterNSProductMap.PRO_SOLUTIONS);var r=n-1,a=null,e=t[r],n=u.default;return(a=n[e]||0<=r-1&&n[e=t[r-1]+"."+t[r]]?n[e]:a)&&(a=l.default.countryCodeMapping(a.countryCode),i="".concat(o," ").concat(a)),{product:o,productVariant:i}}(document.location.hostname)},t.isHouzzHost=function(){var e=document.location.host.split("."),t=-1!==["www","pro"].indexOf(e[0]),e=-1!==["houzz","houzz2","stghouzz","houzzdev"].indexOf(e[1]);return t&&e},t.normalizeUserIdentities=function(e){return{user_id:e?e.customerid:null,user_name:e?e.other:null,visitor_id:e?e.other2:null}},t.getEventHost=function(e){return e?"https://evt.stghouzz.com":"https://evt.houzz.com"},t.sendFallbackTracking=function(e){}},670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(150);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var l=(s(g,[{key:"setData",value:function(e,t,n,o){return!(!e||!t||(e[t]=n,o&&(n=Date.now(),e[t+r.CONSTS.EXPIRE_KEY]=n+1e3*Math.abs(o)),0))}},{key:"setNS",value:function(e,t,n,o){return!(!e||!o)&&(this.data[o]||(this.data[o]={}),this.setData(this.data[o],e,t,n))}},{key:"set",value:function(e,t,n){return this.setData(this.data,e,t,n)}},{key:"deleteNS",value:function(e){e&&this.data[e]&&delete this.data[e]}},{key:"getNS",value:function(e,t){return e&&t&&this.data[t]?this.getFromData(this.data[t],e):null}},{key:"getFromData",value:function(e,t){if(!e||!t)return null;var n=e[t],o=e[t+r.CONSTS.EXPIRE_KEY];return o&&Date.now()>=o?(delete e[t],delete e[t+r.CONSTS.EXPIRE_KEY],null):n}},{key:"get",value:function(e){return this.getFromData(this.data,e)}},{key:"remove",value:function(e){var t=this.namespace?this.data[this.namespace]:this.data,n=t[e];return delete t[e],delete t[e+r.CONSTS.EXPIRE_KEY],n}}]),g),u=(s(E,[{key:"get",value:function(e){var t=window.sessionStorage.getItem(e),n=window.sessionStorage.getItem(e+r.CONSTS.EXPIRE_KEY),o=null;if(n){var i=Date.now();try{if(i>=JSON.parse(n))return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),o}catch(t){return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),o}}try{o=JSON.parse(t)}catch(e){o=t}return o}},{key:"remove",value:function(e){var t=this.get(e);return window.sessionStorage.removeItem(e),window.sessionStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}},{key:"set",value:function(e,t,n){if(t&&"object"===o(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.sessionStorage.setItem(e,t),n&&(t=Date.now(),window.sessionStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(n))),!0}}]),E),c=(s(p,[{key:"isExpired",value:function(e){var t=window.localStorage.getItem(e+r.CONSTS.EXPIRE_KEY);if(t){var n=Date.now();try{if(n>=JSON.parse(t))return!0}catch(e){return!0}}}},{key:"get",value:function(e){var t=window.localStorage.getItem(e),n=null;if(this.isExpired(e))return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),n;try{n=JSON.parse(t)}catch(e){n=t}return n}},{key:"set",value:function(e,t,n){if(t&&"object"===o(t))try{t=JSON.stringify(t)}catch(e){return!1}return window.localStorage.setItem(e,t),n&&(t=Date.now(),window.localStorage.setItem(e+r.CONSTS.EXPIRE_KEY,t+1e3*Math.abs(n))),!0}},{key:"remove",value:function(e){var t=this.get(e);return window.localStorage.removeItem(e),window.localStorage.removeItem(e+r.CONSTS.EXPIRE_KEY),t}}]),p),n=(s(d,[{key:"verifyStorageSupport",value:function(){try{window.localStorage.setItem("hz",1),window.localStorage.removeItem("hz"),this.isLocalStorageSupported=!0}catch(e){}try{window.sessionStorage.setItem("hz",1),window.sessionStorage.removeItem("hz"),this.isSessionStorageSupported=!0}catch(e){}}},{key:"getSessionStorage",value:function(){return this.isSessionStorageSupported?(null===this.sessionStorage&&(this.sessionStorage=new u),this.sessionStorage):this.getInMemoryStorage()}},{key:"getLocalStorage",value:function(){return this.isLocalStorageSupported?(null===this.localStorage&&(this.localStorage=new c),this.localStorage):this.getInMemoryStorage()}},{key:"getInMemoryStorage",value:function(){return this.fallbackStorage}}]),new d);function d(){i(this,d),this.isSessionStorageSupported=!1,this.isLocalStorageSupported=!1,this.sessionStorage=null,this.localStorage=null,this.fallbackStorage=new l,this.verifyStorageSupport()}function p(){i(this,p)}function E(){i(this,E)}function g(){i(this,g),this.data={}}t.default=n},345:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={com:{ccTLD:"us",domain:"com",locale:"en-US",countryCode:"US",countryNativeName:"United States",timeZone:"America/Los_Angeles",siteId:"101",localeId:"1001",seoLang:"en",commonAvailableInCountryCodes:["US","CA"]},"co.uk":{ccTLD:"uk",domain:"co.uk",locale:"en-GB",countryCode:"GB",countryNativeName:"United Kingdom",timeZone:"Europe/London",siteId:"102",localeId:"1002",seoLang:"en-gb",commonAvailableInCountryCodes:["GB"]},"com.au":{ccTLD:"au",domain:"com.au",locale:"en-AU",countryCode:"AU",countryNativeName:"Australia",timeZone:"Australia/ACT",siteId:"103",localeId:"1003",seoLang:"en-au",commonAvailableInCountryCodes:["AU"]},de:{ccTLD:"de",domain:"de",locale:"de-DE",countryCode:"DE",countryNativeName:"Deutschland",timeZone:"Europe/Berlin",siteId:"104",localeId:"1004",seoLang:"de",commonAvailableInCountryCodes:["DE","AT"]},fr:{ccTLD:"fr",domain:"fr",locale:"fr-FR",countryCode:"FR",countryNativeName:"France",timeZone:"Europe/Paris",siteId:"105",localeId:"1005",seoLang:"fr",commonAvailableInCountryCodes:["FR","BE"]},ru:{ccTLD:"ru",domain:"ru",locale:"ru-RU",countryCode:"RU",countryNativeName:"Россия",timeZone:"Europe/Moscow",siteId:"106",localeId:"1006",seoLang:"ru",commonAvailableInCountryCodes:["RU"]},jp:{ccTLD:"jp",domain:"jp",locale:"ja-JP",countryCode:"JP",countryNativeName:"日本",timeZone:"Asia/Tokyo",siteId:"107",localeId:"1007",seoLang:"ja",commonAvailableInCountryCodes:["JP"]},it:{ccTLD:"it",domain:"it",locale:"it-IT",countryCode:"IT",countryNativeName:"Italia",timeZone:"Europe/Rome",siteId:"108",localeId:"1008",seoLang:"it",commonAvailableInCountryCodes:["IT"]},es:{ccTLD:"es",domain:"es",locale:"es-ES",countryCode:"ES",countryNativeName:"España",timeZone:"Europe/Madrid",siteId:"109",localeId:"1009",seoLang:"es",commonAvailableInCountryCodes:["ES"]},dk:{ccTLD:"dk",domain:"dk",locale:"da-DK",countryCode:"DK",countryNativeName:"Danmark",timeZone:"Europe/Copenhagen",siteId:"110",localeId:"1010",seoLang:"da",commonAvailableInCountryCodes:["DK"]},no:{ccTLD:"no",domain:"no",locale:"nb-NO",countryCode:"NO",countryNativeName:"Norway",timeZone:"Europe/Oslo",siteId:"111",localeId:"1011",seoLang:"nb",commonAvailableInCountryCodes:["NO"]},fi:{ccTLD:"fi",domain:"fi",locale:"fi-FI",countryCode:"FI",countryNativeName:"Suomi",timeZone:"Europe/Helsinki",siteId:"112",localeId:"1012",seoLang:"fi",commonAvailableInCountryCodes:["FI"]},se:{ccTLD:"se",domain:"se",locale:"sv-SE",countryCode:"SE",countryNativeName:"Sverige",timeZone:"Europe/Stockholm",siteId:"113",localeId:"1013",seoLang:"sv",commonAvailableInCountryCodes:["SE"]},ie:{ccTLD:"ie",domain:"ie",locale:"en-IE",countryCode:"IE",countryNativeName:"Ireland",timeZone:"Europe/Dublin",siteId:"114",localeId:"1014",seoLang:"en-ie",commonAvailableInCountryCodes:["IE"]},"co.nz":{ccTLD:"nz",domain:"co.nz",locale:"en-NZ",countryCode:"NZ",countryNativeName:"New Zealand",timeZone:"Pacific/Auckland",siteId:"115",localeId:"1015",seoLang:"en-nz",commonAvailableInCountryCodes:["NZ"]},"com.sg":{ccTLD:"sg",domain:"com.sg",locale:"en-SG",countryCode:"SG",countryNativeName:"Singapore",timeZone:"Asia/Singapore",siteId:"116",localeId:"1016",seoLang:"en-sg",commonAvailableInCountryCodes:["SG"]},in:{ccTLD:"in",domain:"in",locale:"en-IN",countryCode:"IN",countryNativeName:"India",timeZone:"Asia/Calcutta",siteId:"117",localeId:"1017",seoLang:"en-in",commonAvailableInCountryCodes:["IN"]},nl:{ccTLD:"nl",domain:"nl",locale:"nl-NL",countryCode:"NL",countryNativeName:"Netherlands",timeZone:"Europe/Amsterdam",siteId:"118",localeId:"1018",seoLang:"nl",commonAvailableInCountryCodes:["NL"]},at:{ccTLD:"at",domain:"at",locale:"de-AT",countryCode:"AT",countryNativeName:"Austria",timeZone:"Europe/Vienna",siteId:"119",localeId:"1019",seoLang:"de-at",commonAvailableInCountryCodes:["AT"]}}},150:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTS=void 0,t.CONSTS={EXPIRE_KEY:"_expires"}},338:(e,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.isTestingEnv=o._global=void 0,o._global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},o.isTestingEnv=function(e){var t,n=!0;return n="production"===(e=e||(null!==(t=null===(t=null===o._global||void 0===o._global?void 0:o._global.HZ)||void 0===t?void 0:t.ctx)&&void 0!==t&&t.env?o._global.HZ.ctx.env:null!==(t=null===(t=null===(t=null===o._global||void 0===o._global?void 0:o._global.HZ)||void 0===t?void 0:t.utils)||void 0===t?void 0:t.OmnilogData)&&void 0!==t&&t.environment?o._global.HZ.utils.OmnilogData.environment:""))||"prod"===e?!1:n}},144:function(e,t){void 0===(t=function(e,t){"use strict";function d(t){try{delete window[t]}catch(e){window[t]=void 0}}function p(e){e=document.getElementById(e);e&&document.getElementsByTagName("head")[0].removeChild(e)}t.exports=function(r){var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=r,l=a.timeout||5e3,u=a.jsonpCallback||"callback",c=void 0;return new Promise(function(t,e){var n=a.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),o=u+"_"+n;window[n]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),c&&clearTimeout(c),p(o),d(n)},s+=-1===s.indexOf("?")?"?":"&";var i=document.createElement("script");i.setAttribute("src",""+s+u+"="+n),a.charset&&i.setAttribute("charset",a.charset),a.nonce&&i.setAttribute("nonce",a.nonce),a.referrerPolicy&&i.setAttribute("referrerPolicy",a.referrerPolicy),i.id=o,document.getElementsByTagName("head")[0].appendChild(i),c=setTimeout(function(){e(new Error("JSONP request to "+r+" timed out")),d(n),p(o),window[n]=function(){d(n)}},l),i.onerror=function(){e(new Error("JSONP request to "+r+" failed")),d(n),p(o),c&&clearTimeout(c)}})}}.apply(t,[t,e]))||(e.exports=t)},614:(e,t,n)=>{"use strict";var o;n.r(t),n.d(t,{NIL:()=>C,parse:()=>f,stringify:()=>d,v1:()=>u,v3:()=>T,v4:()=>N,v5:()=>R,validate:()=>a,version:()=>D});var i=new Uint8Array(16);function c(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&r.test(e)};for(var s=[],l=0;l<256;++l)s.push((l+256).toString(16).substr(1));const d=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!a(t))throw TypeError("Stringified UUID is invalid");return t};var p,E,g=0,m=0;const u=function(e,t,n){var o=t&&n||0,i=t||new Array(16),r=(e=e||{}).node||p,a=void 0!==e.clockseq?e.clockseq:E;null!=r&&null!=a||(l=e.random||(e.rng||c)(),null==r&&(r=p=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=E=16383&(l[6]<<8|l[7])));var s=void 0!==e.msecs?e.msecs:Date.now(),n=void 0!==e.nsecs?e.nsecs:m+1,l=s-g+(n-m)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),1e4<=(n=(l<0||g<s)&&void 0===e.nsecs?0:n))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=s,E=a;n=(1e4*(268435455&(s+=122192928e5))+(m=n))%4294967296;i[o++]=n>>>24&255,i[o++]=n>>>16&255,i[o++]=n>>>8&255,i[o++]=255&n;s=s/4294967296*1e4&268435455;i[o++]=s>>>8&255,i[o++]=255&s,i[o++]=s>>>24&15|16,i[o++]=s>>>16&255,i[o++]=a>>>8|128,i[o++]=255&a;for(var u=0;u<6;++u)i[o+u]=r[u];return t||d(i)},f=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function I(e,a,s){function t(e,t,n,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),16!==(t="string"==typeof t?f(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=s(i))[6]=15&i[6]|a,i[8]=63&i[8]|128,n){o=o||0;for(var r=0;r<16;++r)n[o+r]=i[r];return n}return d(i)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function v(e){return 14+(e+64>>>9<<4)+1}function S(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function _(e,t,n,o,i,r){return S((r=S(S(t,e),S(o,r)))<<i|r>>>32-i,n)}function h(e,t,n,o,i,r,a){return _(t&n|~t&o,e,t,i,r,a)}function O(e,t,n,o,i,r,a){return _(t&o|n&~o,e,t,i,r,a)}function y(e,t,n,o,i,r,a){return _(t^n^o,e,t,i,r,a)}function A(e,t,n,o,i,r,a){return _(n^(t|~o),e,t,i,r,a)}const T=I("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,o="0123456789abcdef",i=0;i<n;i+=8){var r=e[i>>5]>>>i%32&255,r=parseInt(o.charAt(r>>>4&15)+o.charAt(15&r),16);t.push(r)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[v(t)-1]=t;for(var n=1732584193,o=-271733879,i=-1732584194,r=271733878,a=0;a<e.length;a+=16){var s=n,l=o,u=i,c=r,n=h(n,o,i,r,e[a],7,-680876936),r=h(r,n,o,i,e[a+1],12,-389564586),i=h(i,r,n,o,e[a+2],17,606105819),o=h(o,i,r,n,e[a+3],22,-1044525330);n=h(n,o,i,r,e[a+4],7,-176418897),r=h(r,n,o,i,e[a+5],12,1200080426),i=h(i,r,n,o,e[a+6],17,-1473231341),o=h(o,i,r,n,e[a+7],22,-45705983),n=h(n,o,i,r,e[a+8],7,1770035416),r=h(r,n,o,i,e[a+9],12,-1958414417),i=h(i,r,n,o,e[a+10],17,-42063),o=h(o,i,r,n,e[a+11],22,-1990404162),n=h(n,o,i,r,e[a+12],7,1804603682),r=h(r,n,o,i,e[a+13],12,-40341101),i=h(i,r,n,o,e[a+14],17,-1502002290),n=O(n,o=h(o,i,r,n,e[a+15],22,1236535329),i,r,e[a+1],5,-165796510),r=O(r,n,o,i,e[a+6],9,-1069501632),i=O(i,r,n,o,e[a+11],14,643717713),o=O(o,i,r,n,e[a],20,-373897302),n=O(n,o,i,r,e[a+5],5,-701558691),r=O(r,n,o,i,e[a+10],9,38016083),i=O(i,r,n,o,e[a+15],14,-660478335),o=O(o,i,r,n,e[a+4],20,-405537848),n=O(n,o,i,r,e[a+9],5,568446438),r=O(r,n,o,i,e[a+14],9,-1019803690),i=O(i,r,n,o,e[a+3],14,-187363961),o=O(o,i,r,n,e[a+8],20,1163531501),n=O(n,o,i,r,e[a+13],5,-1444681467),r=O(r,n,o,i,e[a+2],9,-51403784),i=O(i,r,n,o,e[a+7],14,1735328473),n=y(n,o=O(o,i,r,n,e[a+12],20,-1926607734),i,r,e[a+5],4,-378558),r=y(r,n,o,i,e[a+8],11,-2022574463),i=y(i,r,n,o,e[a+11],16,1839030562),o=y(o,i,r,n,e[a+14],23,-35309556),n=y(n,o,i,r,e[a+1],4,-1530992060),r=y(r,n,o,i,e[a+4],11,1272893353),i=y(i,r,n,o,e[a+7],16,-155497632),o=y(o,i,r,n,e[a+10],23,-1094730640),n=y(n,o,i,r,e[a+13],4,681279174),r=y(r,n,o,i,e[a],11,-358537222),i=y(i,r,n,o,e[a+3],16,-722521979),o=y(o,i,r,n,e[a+6],23,76029189),n=y(n,o,i,r,e[a+9],4,-640364487),r=y(r,n,o,i,e[a+12],11,-421815835),i=y(i,r,n,o,e[a+15],16,530742520),n=A(n,o=y(o,i,r,n,e[a+2],23,-995338651),i,r,e[a],6,-198630844),r=A(r,n,o,i,e[a+7],10,1126891415),i=A(i,r,n,o,e[a+14],15,-1416354905),o=A(o,i,r,n,e[a+5],21,-57434055),n=A(n,o,i,r,e[a+12],6,1700485571),r=A(r,n,o,i,e[a+3],10,-1894986606),i=A(i,r,n,o,e[a+10],15,-1051523),o=A(o,i,r,n,e[a+1],21,-2054922799),n=A(n,o,i,r,e[a+8],6,1873313359),r=A(r,n,o,i,e[a+15],10,-30611744),i=A(i,r,n,o,e[a+6],15,-1560198380),o=A(o,i,r,n,e[a+13],21,1309151649),n=A(n,o,i,r,e[a+4],6,-145523070),r=A(r,n,o,i,e[a+11],10,-1120210379),i=A(i,r,n,o,e[a+2],15,718787259),o=A(o,i,r,n,e[a+9],21,-343485551),n=S(n,s),o=S(o,l),i=S(i,u),r=S(r,c)}return[n,o,i,r]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(v(t)),o=0;o<t;o+=8)n[o>>5]|=(255&e[o/8])<<o%32;return n}(e),8*e.length))}),N=function(e,t,n){var o=(e=e||{}).random||(e.rng||c)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=o[i];return t}return d(o)};function w(e,t){return e<<t|e>>>32-t}const R=I("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var i=0;i<o.length;++i)e.push(o.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var r=e.length/4+2,a=Math.ceil(r/16),s=new Array(a),l=0;l<a;++l){for(var u=new Uint32Array(16),c=0;c<16;++c)u[c]=e[64*l+4*c]<<24|e[64*l+4*c+1]<<16|e[64*l+4*c+2]<<8|e[64*l+4*c+3];s[l]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var p=new Uint32Array(80),E=0;E<16;++E)p[E]=s[d][E];for(var g=16;g<80;++g)p[g]=w(p[g-3]^p[g-8]^p[g-14]^p[g-16],1);for(var m=n[0],f=n[1],I=n[2],v=n[3],S=n[4],_=0;_<80;++_)var h=Math.floor(_/20),h=w(m,5)+function(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o}}(h,f,I,v)+S+t[h]+p[_]>>>0,S=v,v=I,I=w(f,30)>>>0,f=m,m=h;n[0]=n[0]+m>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+I>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+S>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}),C="00000000-0000-0000-0000-000000000000",D=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},851:e=>{"use strict";e.exports=JSON.parse('{"unknown":"(?:(?:(?:finance|news|eurosport|sports|astrology|travel|answers|screen|weather|messenger|games|movies|cars|omg|lifestyle)\\\\.yahoo|(?:accounts|keep|support|drive|groups|developers|maps|sites)\\\\.google|maps\\\\.yandex)\\\\.com|maps\\\\.yandex\\\\.(?:ru|ua|by)|(?:shopping|match)\\\\.yahoo\\\\.net|groups\\\\.google\\\\.co\\\\.uk|n\\\\.maps\\\\.yandex\\\\.ru)","search":"(?:www\\\\.(?:google\\\\.(?:com(?:|\\\\.af|\\\\.ar|\\\\.au|\\\\.bd|\\\\.bh|\\\\.bn|\\\\.bo|\\\\.br|\\\\.co|\\\\.cu|\\\\.do|\\\\.ec|\\\\.eg|\\\\.et|\\\\.fj|\\\\.gh|\\\\.gt|\\\\.hk|\\\\.jm|\\\\.kw|\\\\.lb|\\\\.ly|\\\\.mt|\\\\.mx|\\\\.my|\\\\.ng|\\\\.ni|\\\\.np|\\\\.om|\\\\.pa|\\\\.pe|\\\\.ph|\\\\.pk|\\\\.pr|\\\\.py|\\\\.qa|\\\\.sa|\\\\.sg|\\\\.sv|\\\\.tr|\\\\.tw|\\\\.ua|\\\\.uy|\\\\.vn)|co\\\\.(?:cr|id|il|in|jp|ke|kr|ls|ma|nz|th|tz|uk|uz|ve|za|zw)|am|as|at|az|ba|be|bg|bs|by|de|dk|dz|ee|es|fi|fr|ge|gg|gr|hn|hr|hu|ie|it|je|jo|kg|kz|li|lk|lt|lu|lv|md|mn|mu|mw|nl|no|pl|pt|ro|rs|ru|rw|se|si|sk|sn|tn|tt|ae|vg|ca|cd|cat|ch|ci|cl|cm|cz)|(?:so|gigablast|dogpile|yandex|amazon|baidu|qwant|ask|bing|cnn|search)\\\\.com|yandex\\\\.(?:ru|ua|by)|goyellow\\\\.de|bing\\\\.com\\\\/images\\\\/search|startsiden\\\\.no)|google\\\\.(?:com(?:\\\\/imgres||\\\\.af|\\\\.ar|\\\\.au|\\\\.bd|\\\\.bh|\\\\.bn|\\\\.bo|\\\\.br|\\\\.co|\\\\.cu|\\\\.do|\\\\.ec|\\\\.eg|\\\\.et|\\\\.fj|\\\\.gh|\\\\.gt|\\\\.hk|\\\\.jm|\\\\.kw|\\\\.lb|\\\\.ly|\\\\.mt|\\\\.mx|\\\\.my|\\\\.ng|\\\\.ni|\\\\.np|\\\\.om|\\\\.pa|\\\\.pe|\\\\.ph|\\\\.pk|\\\\.pr|\\\\.py|\\\\.qa|\\\\.sa|\\\\.sg|\\\\.sv|\\\\.tr|\\\\.tw|\\\\.ua|\\\\.uy|\\\\.vn)|co\\\\.(?:uk\\\\/imgres|cr|id|il|in|jp|ke|kr|ls|ma|nz|th|tz|ve|za|zw|uk|uz)|ca\\\\/imgres|am|as|at|az|ba|be|bg|bs|by|de|dk|dz|ee|es|fi|fr|ge|gg|gr|hn|hr|hu|ie|it|je|jo|kg|kz|li|lk|lt|lu|lv|md|mn|mu|mw|nl|no|pl|pt|ro|rs|ru|rw|se|si|sk|sn|tt|ae|vg|tn|ca|cd|cat|ch|ci|cl|cm|cz)|(?:(?:(?:(?:imag|)es\\\\.||ar\\\\.|au\\\\.|br\\\\.|ca\\\\.|de\\\\.|dk\\\\.|fr\\\\.|hk\\\\.|in\\\\.|it\\\\.|mx\\\\.|nz\\\\.|qc\\\\.|ru\\\\.|se\\\\.|uk\\\\.|us\\\\.)search\\\\.||ca\\\\.|us\\\\.)yahoo|search\\\\.(?:nifty|aol|bt|tb\\\\.ask|avg|naver)|(?:tieba|m)\\\\.baidu|dogpile|webcrawler|yandex|amazon|lycos|lite\\\\.qwant|news\\\\.google|duckduckgo|ask|bing)\\\\.com|search\\\\.(?:(?:earthlink|ukr|daum)\\\\.net|(?:goo\\\\.ne|yahoo\\\\.co)\\\\.jp|aol\\\\.co\\\\.uk|seznam\\\\.cz)|(?:(?:|link\\\\.)2gis|(?:|go\\\\.)mail|yandex|nova\\\\.rambler)\\\\.ru|suche\\\\.(?:(?:aol|web|t\\\\-online)\\\\.de|gmx\\\\.net)|yandex\\\\.(?:ua|by)|(?:recherche\\\\.aol|lemoteur\\\\.orange)\\\\.fr|(?:cgi\\\\.search\\\\.biglobe\\\\.ne|websearch\\\\.rakuten\\\\.co)\\\\.jp|(?:so\\\\.|)m\\\\.sm\\\\.cn|ricerca\\\\.virgilio\\\\.it|meta\\\\.ua|ecosia\\\\.org|bing\\\\.com\\\\/images\\\\/search|com\\\\.google\\\\.android\\\\.googlequicksearchbox)","email":"(?:mail\\\\.(?:(?:zoho|qq|aol|yandex|google|yahoo)\\\\.com|yandex\\\\.(?:ru|kz|ua|by)|yahoo\\\\.(?:co\\\\.(?:uk|jp)|net)|ukr\\\\.net|rambler\\\\.ru)|(?:inbox(?:|\\\\.google)|email\\\\.telstra|outlook\\\\.live)\\\\.com|webmail\\\\.(?:(?:iinet\\\\.net|optusnet\\\\.com)\\\\.au|freenet\\\\.de)|(?:e|touch|click)\\\\.mail\\\\.ru|email\\\\.seznam\\\\.cz|orange\\\\.fr\\\\/webmail|com\\\\.google\\\\.android\\\\.gm)","paid":"(?:(?:(?:www\\\\.||partner\\\\.)googleadservices|paid\\\\.outbrain|imasdk\\\\.googleapis|tpc\\\\.googlesyndication)\\\\.com|googleads\\\\.g\\\\.doubleclick\\\\.net)","social":"(?:pinterest\\\\.(?:com(?:|\\\\.au|\\\\.mx)|co\\\\.(?:uk|kr)|fr|de|es|ru|it|jp|pt|ph|at|nz|se|dk|ca|cl|ch)|(?:(?:|m\\\\.|l\\\\.|lm\\\\.)facebook|(?:|l\\\\.)instagram|(?:m|away)\\\\.vk|github|quora|vk|twitter|web\\\\.skype|linkedin|getpocket|douban|youtube|reddit|t\\\\.umblr)\\\\.com|com\\\\.(?:(?:twitter|instagram|linkedin)\\\\.android|pinterest|google\\\\.android\\\\.talk|facebook\\\\.katana|slack)|forums\\\\.whirlpool\\\\.net\\\\.au|ok\\\\.ru|t\\\\.co|lnkd\\\\.in|disq\\\\.us|youtu\\\\.be|org\\\\.telegram\\\\.messenger)","houzz":"(?:houzz\\\\.(?:com(?:|\\\\.au|\\\\.sg)|co\\\\.(?:uk|nz)|de|fr|ru|jp|it|es|dk|se|ie|in)|(?:gardenweb|checkout\\\\.stripe)\\\\.com)"}')},935:e=>{"use strict";e.exports={version:"2.0.62"}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;t=o[e]={exports:{}};return n[e].call(t.exports,t,t.exports,i),t.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(924),i(639)})()),HZ.utils.OmnilogSDK=window.Omnilog["omnilog-sdk"].default;

window.hzmr.push("omnilogSDK:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End omnilogSDK.js  **************/
/************* Start omnilogClientSDK.js for locale en-US **************/
try {HZ.ns("HZ.utils");var REFERRER_AUTH_STORAGE_KEY="ja",PORTRAIT=1,LANDSCAPE=2,COMPONENT_TYPE_CLIENT_BROWSER=100,COMPONENT_DETAILED_TYPE_C2_WEB=101,OMNILOG_EVENT="omnilog",isMakkariXhrTransportEnabled=!0,isMakkariPostEnabled=!0,makkariInstance=null;function initMakkariInstance(){HZ.utils.OmnilogData.isMakkariEnabled&&HZ.utils.MakkariSDK&&(makkariInstance=HZ.utils.MakkariSDK.getInstance())}var OmnilogTrackingUtils=HZ.utils.OmnilogTrackingUtils,OmnilogHelper={getClientId:function(){return HZ.utils.OmnilogData.visitorId},getXClientId:function(){return HZ.utils.OmnilogData.visitorIdXs},getRequestId:function(){return HZ.utils.Logger.pageRequestId},getRoutingDescriptor:function(){return{}},getActiveUser:function(){return HZ.utils.OmnilogData.activeUserName?{userName:HZ.utils.OmnilogData.activeUserName,userType:HZ.utils.OmnilogData.activeUserType,userId:HZ.utils.OmnilogData.activeUserId}:null},getAdminUserId:function(){return HZ.utils.OmnilogData.administrativeUserId},getDeviceType:function(){return HZ.utils.OmnilogData.deviceType},getDeviceOrientation:function(){return HZ.utils.OmnilogData.isMobile?PORTRAIT:LANDSCAPE},sendEvent:function(t,n){makkariInstance?makkariInstance.sendEvent(n):HZ.utils.OmnilogData&&HZ.utils.OmnilogData.loggingEndpoint?HZ.utils.Logger.sendOmniLogEvent(OMNILOG_EVENT,n,HZ.utils.OmnilogData.loggingEndpoint):HZ.utils.Logger.sendEventLogLightweight(OMNILOG_EVENT,n)},sendIdentityEvent:function(t,n,i,e){makkariInstance&&makkariInstance.sendIdentityEvent(t,n,i,e)},getEventSource:function(t){try{return HZ.utils.OmnilogTrackingUtils&&HZ.utils.BrowserStorageUtils?t?HZ.utils.OmnilogTrackingUtils.getEventSourceFromEventTarget(t):HZ.utils.OmnilogTrackingUtils.getEventSource():{}}catch(t){return console.log(t),{}}},getViewPortDimensions:function(){return{viewportWidth:0,viewportHeight:0}},initialize:function(t){var n;HZ.utils.OmnilogData&&(makkariInstance||initMakkariInstance(),n={customerid:HZ.utils.OmnilogData.activeUserId?HZ.utils.OmnilogData.activeUserId+"":null,other:HZ.utils.OmnilogData.activeUserName,other2:HZ.utils.OmnilogData.visitorId},makkariInstance&&makkariInstance.init(n,function(){},function(){},{enableXhrTransport:isMakkariXhrTransportEnabled,enablePostMethod:isMakkariPostEnabled}))},shouldEnableEventQueue:function(){return!0},getEnvironment:function(){return HZ.utils.OmnilogData.environment},getExtDeviceId:function(){if(makkariInstance)return makkariInstance.getDeviceId()},getViewContext:function(){return{viewMode:"Default"}},getComponent:function(){return{type:COMPONENT_TYPE_CLIENT_BROWSER,detailedType:COMPONENT_DETAILED_TYPE_C2_WEB,componentName:"C2 Web"}},getDebugUtil:function(){return{sendDebugLog:function(){}}},updateEventSource:function(t){HZ.utils.OmnilogTrackingUtils&&HZ.utils.OmnilogTrackingUtils.updateEventSource(t)},getMid:function(){try{if(makkariInstance)return makkariInstance.getMid();if(window.mParticle&&window.mParticle.Identity)return window.mParticle.Identity.getCurrentUser().getMPID()}catch(t){return""}},getMPid:function(){return""},getIdentityInput:function(){return null},getChannel:function(){return"Internal"},getProductInfo:function(t){try{return HZ.utils.OmnilogTrackingUtils&&"function"==typeof HZ.utils.OmnilogTrackingUtils.getProductInfo?HZ.utils.OmnilogTrackingUtils.getProductInfo(!0,t):{}}catch(t){return console.log(t),{}}},getClientInfo:function(){try{var t=HZ.utils.OmnilogData.visitorId||"NO_CLIENT_ID";return{clientId:t,xClientId:HZ.utils.OmnilogData.visitorIdXs||t||"NO_CLIENT_ID",extClientId:"",clientComponentType:101,userAgent:navigator&&navigator.userAgent?navigator.userAgent:""}}catch(t){return console.log(t),{}}},abTestForOmnilog:function(){return{}},getClientIp:function(){return HZ.utils.OmnilogData.clientIp},getHouzzProTeamId:function(){return null},getHouzzProTeamManagerUserId:function(){return null},getClientUrl:function(){return isMakkariXhrTransportEnabled&&isMakkariPostEnabled&&window.location.href},getFullRequestUrl:function(){return window.location.href},getReferer:function(){return document.referrer},getRegisteredAbTests:function(){return{}},isProAIAssist:function(){return!1}};Object.keys(OmnilogHelper).forEach(function(t){var n=OmnilogHelper[t];OmnilogHelper[t]=function(){var t=Array.prototype.slice.call(arguments);try{return n.apply(OmnilogHelper,t)}catch(t){console.log(t)}}});var omnilogInstance=HZ.utils.OmnilogSDK.getInstance({OmnilogHelper:OmnilogHelper,ExperienceUtils:HZ.utils.OmnilogTrackingUtils.ExperienceUtils,FlowUtils:HZ.utils.OmnilogTrackingUtils.FlowUtils,SessionUtils:HZ.utils.OmnilogSessionUtils});HZ.utils.OmnilogClientSDK=omnilogInstance;

window.hzmr.push("omnilogClientSDK:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End omnilogClientSDK.js  **************/
/************* Start dropzone.js for locale en-US **************/
try {!function(){function s(e,t,i){var n=s.resolve(e);if(null==n){i=i||e,t=t||"root";var o=new Error('Failed to require "'+i+'" from "'+t+'"');throw o.path=i,o.parent=t,o.require=!0,o}o=s.modules[n];return o.exports||(o.exports={},o.client=o.component=!0,o.call(this,o.exports,s.relative(n),o)),o.exports}s.modules={},s.aliases={},s.resolve=function(e){for(var t=[e="/"===e.charAt(0)?e.slice(1):e,e+".js",e+".json",e+"/index.js",e+"/index.json"],i=0;i<t.length;i++){e=t[i];if(s.modules.hasOwnProperty(e))return e;if(s.aliases.hasOwnProperty(e))return s.aliases[e]}},s.normalize=function(e,t){var i=[];if("."!=t.charAt(0))return t;e=e.split("/"),t=t.split("/");for(var n=0;n<t.length;++n)".."==t[n]?e.pop():"."!=t[n]&&""!=t[n]&&i.push(t[n]);return e.concat(i).join("/")},s.register=function(e,t){s.modules[e]=t},s.alias=function(e,t){if(!s.modules.hasOwnProperty(e))throw new Error('Failed to alias "'+e+'", it does not exist');s.aliases[t]=e},s.relative=function(n){var o=s.normalize(n,"..");function t(e){return s(t.resolve(e),n,e)}return t.resolve=function(e){var t=e.charAt(0);if("/"==t)return e.slice(1);if("."==t)return s.normalize(o,e);var i=n.split("/"),t=(t=function(e,t){for(var i=e.length;i--;)if(e[i]===t)return i;return-1}(i,"deps")+1)||0;return e=i.slice(0,t+1).join("/")+"/deps/"+e},t.exists=function(e){return s.modules.hasOwnProperty(t.resolve(e))},t},s.register("component-emitter/index.js",function(e,t,i){function n(e){if(e)return function(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}(e)}(i.exports=n).prototype.on=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){var i=this;function n(){i.off(e,n),t.apply(this,arguments)}return this._callbacks=this._callbacks||{},t._off=n,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=function(e,t){this._callbacks=this._callbacks||{};var i=this._callbacks[e];if(!i)return this;if(1==arguments.length)return delete this._callbacks[e],this;var n=i.indexOf(t._off||t);return~n&&i.splice(n,1),this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),i=this._callbacks[e];if(i)for(var n=0,o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,t);return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),s.register("dropzone/index.js",function(e,t,i){i.exports=t("./lib/dropzone.js")}),s.register("dropzone/lib/dropzone.js",function(e,a,d){!function(){var t,e,i,o={}.hasOwnProperty,l=[].slice,n="undefined"!=typeof Emitter&&null!==Emitter?Emitter:a("emitter"),s=function(){},r=function(){var k;!function(e,t){for(var i in t)o.call(t,i)&&(e[i]=t[i]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(T,n),T.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","selectedfiles","addedfile","removedfile","thumbnail","storeVideoThumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded"];var t=0;function T(e,t){if(this.element=e,this.version=T.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(T.instances.push(this),e.dropzone=this,e=null!=(e=T.optionsForElement(this.element))?e:{},this.options=k({},this.defaultOptions,e,null!=t?t:{}),this.options.forceFallback||!T.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(t=this.getExistingFallback())&&t.parentNode&&t.parentNode.removeChild(t),this.options.previewsContainer?this.previewsContainer=T.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element,this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=T.getElements(this.options.clickable,"clickable")),this.init()}return T.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,maxVideoFileSize:5e4,thumbnailWidth:100,thumbnailHeight:100,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,addRemoveLinks:!1,previewsContainer:null,dictDefaultMessage:_hgt("Drop files here to upload"),dictFallbackMessage:_hgt("Your browser does not support drag'n'drop file uploads."),dictFallbackText:_hgt("Please use the fallback form below to upload your files like in the olden days."),dictFileTooBig:_hgt("File is too big ({size}MB). Max filesize: {max}MB.",{"size:":"{{filesize}}",max:"{{maxFilesize}}"}),dictInvalidFileType:_hgt("You can't upload files of this type."),dictResponseError:_hgt("Server responded with {statusCode} code.",{statusCode:"{{statusCode}}"}),dictCancelUpload:_hgt("Cancel upload"),dictCancelUploadConfirmation:_hgt("Are you sure you want to cancel this upload?"),dictRemoveFile:_hgt("Remove file"),dictRemoveFileConfirmation:null,dictMaxFilesExceeded:_hgt("You can only upload {maxFilesAllowed} files.",{maxFilesAllowed:"{{maxFiles}}"}),dictVideoTooLong:_hgt("You can not upload videos longer than 600 seconds"),dictVideoTooShort:_hgt("You can not upload videos shorter than 15 seconds"),accept:function(e,t){return t()},init:function(){return s},forceFallback:!1,fallback:function(){var e,t,i,n,o,s;for(this.element.className=this.element.className+" dz-browser-not-supported",n=0,o=(s=this.element.getElementsByTagName("div")).length;n<o;n++)e=s[n],/(^| )dz-message($| )/.test(e.className)&&((t=e).className="dz-message");return t||(t=T.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t)),(i=t.getElementsByTagName("span")[0])&&(i.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},i=e.width/e.height,n=this.options.thumbnailWidth/this.options.thumbnailHeight;return e.height<this.options.thumbnailHeight||e.width<this.options.thumbnailWidth?(t.trgHeight=t.srcHeight,t.trgWidth=t.srcWidth):n<i?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*n):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/n),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return t=0,this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return e.preventDefault(),t++,this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){if(0==--t)return this.element.classList.remove("dz-drag-hover")},selectedfiles:function(e){if(this.element===this.previewsContainer)return this.element.classList.add("dz-started")},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i=this;return t.previewElement=T.createElement(this.options.previewTemplate),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),t.previewElement.querySelector("[data-dz-name]").textContent=t.name,t.previewElement.querySelector("[data-dz-size]").innerHTML=this.filesize(t.size),this.options.addRemoveLinks&&(t._removeLink=T.createElement('<a class="dz-remove" href="javascript:undefined;">'+this.options.dictRemoveFile+"</a>"),t._removeLink.addEventListener("click",function(e){return e.preventDefault(),e.stopPropagation(),t.status===T.UPLOADING?T.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?T.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)}),t.previewElement.appendChild(t._removeLink)),this._updateMaxFilesReachedClass()},removedfile:function(e){var t;return null!=(t=e.previewElement)&&t.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){var i;return e.previewElement.classList.remove("dz-file-preview"),e.previewElement.classList.add("dz-image-preview"),(i=e.previewElement.querySelector("[data-dz-thumbnail]")).alt=e.name,i.src=t},storeVideoThumbnail:function(e){window.sessionStorage&&this.videoThumbnail&&window.sessionStorage.setItem("hzVideoThumb-"+e,this.videoThumbnail)},error:function(e,t){return e.previewElement.classList.add("dz-error"),e.type.match("video")&&window.alert(t),e.previewElement.querySelector("[data-dz-errormessage]").textContent=t},errormultiple:s,processing:function(e){if(e.previewElement.classList.add("dz-processing"),e._removeLink)return e._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:s,uploadprogress:function(e,t,i){return e.previewElement.querySelector("[data-dz-uploadprogress]").style.width=t+"%"},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(e,t){return e.type.match("video")&&this.emit("storeVideoThumbnail",t.finalizeId),e.previewElement.classList.add("dz-success")},successmultiple:s,canceled:function(e){return this.emit("error",e,"Upload canceled.")},canceledmultiple:s,complete:function(e){if(e._removeLink)return e._removeLink.textContent=this.options.dictRemoveFile},completemultiple:s,maxfilesexceeded:s,previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-details">\n    <div class="dz-filename"><span data-dz-name></span></div>\n    <div class="dz-size" data-dz-size></div>\n    <img data-dz-thumbnail />\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-success-mark"><span>✔</span></div>\n  <div class="dz-error-mark"><span>✘</span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n</div>'},k=function(){for(var e,t,i,n=arguments[0],o=2<=arguments.length?l.call(arguments,1):[],s=0,r=o.length;s<r;s++)for(e in t=o[s])i=t[e],n[e]=i;return n},T.prototype.getAcceptedFiles=function(){for(var e,t=this.files,i=[],n=0,o=t.length;n<o;n++)(e=t[n]).accepted&&i.push(e);return i},T.prototype.getRejectedFiles=function(){for(var e,t=this.files,i=[],n=0,o=t.length;n<o;n++)(e=t[n]).accepted||i.push(e);return i},T.prototype.getQueuedFiles=function(){for(var e,t=this.files,i=[],n=0,o=t.length;n<o;n++)(e=t[n]).status===T.QUEUED&&i.push(e);return i},T.prototype.getUploadingFiles=function(){for(var e,t=this.files,i=[],n=0,o=t.length;n<o;n++)(e=t[n]).status===T.UPLOADING&&i.push(e);return i},T.prototype.init=function(){var e,t,i,n,o,s,r,l=this;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(T.createElement('<div class="dz-default dz-message"><span class="dz-message-text">'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(i=function(){return l.hiddenFileInput&&document.body.removeChild(l.hiddenFileInput),l.hiddenFileInput=document.createElement("input"),l.hiddenFileInput.setAttribute("type","file"),l.hiddenFileInput.setAttribute("multiple","multiple"),null!=l.options.acceptedFiles&&l.hiddenFileInput.setAttribute("accept",l.options.acceptedFiles),l.hiddenFileInput.style.visibility="hidden",l.hiddenFileInput.style.position="absolute",l.hiddenFileInput.style.top="0",l.hiddenFileInput.style.left="0",l.hiddenFileInput.style.height="0",l.hiddenFileInput.style.width="0",document.body.appendChild(l.hiddenFileInput),l.hiddenFileInput.addEventListener("change",function(){var e=l.hiddenFileInput.files;return e.length&&(l.emit("selectedfiles",e),l.handleFiles(e)),i()})}),this.URL=null!=(s=window.URL)?s:window.webkitURL,n=0,o=(r=this.events).length;n<o;n++)e=r[n],this.on(e,this.options[e]);return this.on("uploadprogress",function(){return l.updateTotalUploadProgress()}),this.on("removedfile",function(){return l.updateTotalUploadProgress()}),this.on("canceled",function(e){return l.emit("complete",e)}),t=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return l.emit("dragstart",e)},dragenter:function(e){return t(e),l.emit("dragenter",e)},dragover:function(e){return t(e),l.emit("dragover",e)},dragleave:function(e){return l.emit("dragleave",e)},drop:function(e){return t(e),l.drop(e)},dragend:function(e){return l.emit("dragend",e)}}}],this.clickableElements.forEach(function(t){return l.listeners.push({element:t,events:{click:function(e){if(t!==l.element||e.target===l.element||T.elementInside(e.target,l.element.querySelector(".dz-message")))return i(),l.hiddenFileInput.click()}}})}),this.enable(),this.options.init.call(this)},T.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),null!=(e=this.hiddenFileInput)&&e.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone},T.prototype.updateTotalUploadProgress=function(){var e,t,i,n,o,s=0,r=0;if(this.getAcceptedFiles().length){for(i=0,n=(o=this.getAcceptedFiles()).length;i<n;i++)s+=(e=o[i]).upload.bytesSent,r+=e.upload.total;t=100*s/r}else t=100;return this.emit("totaluploadprogress",t,r,s)},T.prototype.getFallbackForm=function(){var e,t;return(e=this.getExistingFallback())?e:(e='<div class="dz-fallback">',this.options.dictFallbackText&&(e+="<p>"+this.options.dictFallbackText+"</p>"),e+='<input type="file" name="'+this.options.paramName+(this.options.uploadMultiple?"[]":"")+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><button type="submit">Upload!</button></div>',e=T.createElement(e),"FORM"!==this.element.tagName?(t=T.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(e):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:e)},T.prototype.getExistingFallback=function(){for(var e,t=function(e){for(var t,i=0,n=e.length;i<n;i++)if(t=e[i],/(^| )fallback($| )/.test(t.className))return t},i=["div","form"],n=0,o=i.length;n<o;n++)if(e=t(this.element.getElementsByTagName(i[n])))return e},T.prototype.setupEventListeners=function(){for(var i,n,o,e=this.listeners,t=[],s=0,r=e.length;s<r;s++)i=e[s],t.push(function(){var e=i.events,t=[];for(n in e)o=e[n],t.push(i.element.addEventListener(n,o,!1));return t}());return t},T.prototype.removeEventListeners=function(){for(var i,n,o,e=this.listeners,t=[],s=0,r=e.length;s<r;s++)i=e[s],t.push(function(){var e=i.events,t=[];for(n in e)o=e[n],t.push(i.element.removeEventListener(n,o,!1));return t}());return t},T.prototype.disable=function(){var e,t,i,n,o;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),o=[],t=0,i=(n=this.files).length;t<i;t++)e=n[t],o.push(this.cancelUpload(e));return o},T.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},T.prototype.filesize=function(e){var t=1e11<=e?(e/=1e11,"TB"):1e8<=e?(e/=1e8,"GB"):1e5<=e?(e/=1e5,"MB"):100<=e?(e/=100,"KB"):(e*=10,"b");return"<strong>"+Math.round(e)/10+"</strong> "+t},T.prototype._updateMaxFilesReachedClass=function(){return this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?this.element.classList.add("dz-max-files-reached"):this.element.classList.remove("dz-max-files-reached")},T.prototype.drop=function(e){var t;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("selectedfiles",t),t.length&&((e=e.dataTransfer.items)&&e.length&&(null!=e[0].webkitGetAsEntry||null!=e[0].getAsEntry)?this.handleItems(e):this.handleFiles(t)))},T.prototype.handleFiles=function(e){for(var t,i=[],n=0,o=e.length;n<o;n++)t=e[n],i.push(this.addFile(t));return i},T.prototype.handleItems=function(e){for(var t,i,n=0,o=e.length;n<o;n++)null==(i=e[n]).webkitGetAsEntry||(t=i.webkitGetAsEntry()).isFile?this.addFile(i.getAsFile()):t.isDirectory&&this.addDirectory(t,t.name)},T.prototype.accept=function(e,t){return!e.type.match(/video.*/)&&e.size>1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.type.match(/video.*/)&&e.size>1024*this.options.maxVideoFileSize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxVideoFileSize)):T.isValidFile(e,this.options.acceptedFiles)?this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)},T.prototype.addFile=function(t){var i=this;return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=T.ADDED,this.emit("addedfile",t),this.options.createImageThumbnails&&(t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024||t.type.match(/video.*/)&&t.size<=1024*this.options.maxVideoFileSize*1024)&&this.createThumbnail(t),this.accept(t,function(e){return e?(t.accepted=!1,i._errorProcessing([t],e)):i.enqueueFile(t)})},T.prototype.enqueueFiles=function(e){for(var t,i=0,n=e.length;i<n;i++)t=e[i],this.enqueueFile(t);return null},T.prototype.enqueueFile=function(e){var t=this;if(e.accepted=!0,e.status!==T.ADDED)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=T.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return t.processQueue()},1)},T.prototype.addDirectory=function(n,o){var s=this;return n.createReader().readEntries(function(e){for(var t=0,i=e.length;t<i;t++)(n=e[t]).isFile?n.file(function(e){if(!s.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=o+"/"+e.name,s.addFile(e)}):n.isDirectory&&s.addDirectory(n,o+"/"+n.name)},function(e){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(e):void 0})},T.prototype.removeFile=function(e){if(e.status===T.UPLOADING&&this.cancelUpload(e),this.files=i(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")},T.prototype.removeAllFiles=function(e){var t,i,n,o;for(null==e&&(e=!1),i=0,n=(o=this.files.slice()).length;i<n;i++)(t=o[i]).status===T.UPLOADING&&!e||this.removeFile(t);return null},T.prototype.createThumbnail=function(r){var l=this,a=new FileReader;return a.onload=function(){var n=new Image;if(n.onload=function(){var e,t,i;return r.width=n.width,r.height=n.height,null==(e=l.options.resize.call(l,r)).trgWidth&&(e.trgWidth=l.options.thumbnailWidth),null==e.trgHeight&&(e.trgHeight=l.options.thumbnailHeight),i=(t=document.createElement("canvas")).getContext("2d"),t.width=e.trgWidth,t.height=e.trgHeight,i.drawImage(n,null!=(i=e.srcX)?i:0,null!=(i=e.srcY)?i:0,e.srcWidth,e.srcHeight,null!=(i=e.trgX)?i:0,null!=(i=e.trgY)?i:0,e.trgWidth,e.trgHeight),t=t.toDataURL("image/png"),r.type.match("video")&&(l.videoThumbnail=t),l.emit("thumbnail",r,t)},!r.type.match("video"))return n.src=a.result;function e(){r.duration=i.duration,!o&&i.duration<HZ.uploadVideo.MIN_VIDEO_DURATION?(l.emit("error",r,l.options.dictVideoTooShort),i.removeEventListener("timeupdate",e),i.pause()):!o&&i.duration>HZ.uploadVideo.MAX_VIDEO_DURATION?(l.emit("error",r,l.options.dictVideoTooLong),i.removeEventListener("timeupdate",e),i.pause()):!isNaN(i.duration)&&s()&&(i.removeEventListener("timeupdate",e),i.pause())}var t=new Blob([a.result],{type:r.type}),t=URL.createObjectURL(t),i=document.createElement("video"),o=HZ.uploadVideo.canEditProProfile;i.addEventListener("loadeddata",function(){r.duration=i.duration,!o&&i.duration<HZ.uploadVideo.MIN_VIDEO_DURATION?(l.emit("error",r,l.options.dictVideoTooShort),i.removeEventListener("timeupdate",e),i.pause()):!o&&i.duration>HZ.uploadVideo.MAX_VIDEO_DURATION?(l.emit("error",r,l.options.dictVideoTooLong),i.removeEventListener("timeupdate",e),i.pause()):!isNaN(i.duration)&&s()&&(i.removeEventListener("timeupdate",e),i.pause())});var s=function(){var e=document.createElement("canvas");e.width=i.videoWidth,e.height=i.videoHeight,e.getContext("2d").drawImage(i,0,0,e.width,e.height);e=e.toDataURL();return 1e5<e.length&&(n.src=e),l.emit("thumbnail",r,e)};i.addEventListener("timeupdate",e),i.preload="metadata",i.src=t,i.muted=!0,i.playsInline=!0,i.play()},r.type.match("image")?a.readAsDataURL(r):r.type.match("video")?a.readAsArrayBuffer(r):void 0},T.prototype.processQueue=function(){var e,t=this.options.parallelUploads,i=this.getUploadingFiles().length,n=i;if(!(t<=i)&&0<(e=this.getQueuedFiles()).length){if(this.options.uploadMultiple)return this.processFiles(e.slice(0,t-i));for(;n<t;){if(!e.length)return;this.processFile(e.shift()),n++}}},T.prototype.processFile=function(e){return this.processFiles([e])},T.prototype.processFiles=function(e){for(var t,i=0,n=e.length;i<n;i++)(t=e[i]).processing=!0,t.status=T.UPLOADING,this.emit("processing",t);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)},T.prototype._getFilesWithXhr=function(o){var s;return function(){for(var e=this.files,t=[],i=0,n=e.length;i<n;i++)(s=e[i]).xhr===o&&t.push(s);return t}.call(this)},T.prototype.cancelUpload=function(e){var t,i,n,o,s,r,l;if(e.status===T.UPLOADING){for(n=0,s=(i=this._getFilesWithXhr(e.xhr)).length;n<s;n++)(t=i[n]).status=T.CANCELED;for(e.xhr.abort(),o=0,r=i.length;o<r;o++)t=i[o],this.emit("canceled",t);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(l=e.status)!==T.ADDED&&l!==T.QUEUED||(e.status=T.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()},T.prototype.uploadFile=function(e){return this.uploadFiles([e])},T.prototype.uploadFiles=function(p){var u,e,i,t,n,o,s,r,l,a,d,c,h,m,f,v,g,y,F,E,b,w,z,L,x=this,C=new XMLHttpRequest;for(HZ.utils.OmnilogData&&HZ.utils.OmnilogData.isOmnilogEnabled&&HZ.utils.OmnilogClientSDK&&"function"==typeof HZ.utils.OmnilogClientSDK.buildClientToken&&((z=HZ.utils.OmnilogClientSDK.buildClientToken()||{})&&(L=HZ.utils.OmnilogTrackingUtils.buildClientTokenHeader(z),this.options.headers||(this.options.headers={}),k(this.options.headers,L))),c=0,v=p.length;c<v;c++)(u=p[c]).xhr=C;for(t in C.open(this.options.method,this.options.url,!0),C.withCredentials=!!this.options.withCredentials,l=null,i=function(){for(var e=[],t=0,i=p.length;t<i;t++)u=p[t],e.push(x._errorProcessing(p,l||x.options.dictResponseError.replace("{{statusCode}}",C.status).replace("{{statusText}}",C.statusText),C));return e},a=function(e){var t,i,n,o,s,r,l,a,d;if(null!=e)for(i=100*e.loaded/e.total,n=0,r=p.length;n<r;n++)(u=p[n]).upload={progress:i,total:e.total,bytesSent:e.loaded};else{for(t=!0,i=100,o=0,l=p.length;o<l;o++)100===(u=p[o]).upload.progress&&u.upload.bytesSent===u.upload.total||(t=!1),u.upload.progress=i,u.upload.bytesSent=u.upload.total;if(t)return}for(d=[],s=0,a=p.length;s<a;s++)u=p[s],d.push(x.emit("uploadprogress",u,i,u.upload.bytesSent));return d},C.onload=function(t){var e;if(p[0].status!==T.CANCELED&&4===C.readyState){if(l=C.responseText,C.getResponseHeader("content-type")&&~C.getResponseHeader("content-type").indexOf("application/json"))try{l=JSON.parse(l)}catch(e){t=e,l="Invalid JSON response from server."}if(!l.reqUrl)return a(),200<=(e=C.status)&&e<300?x._finished(p,l,t):i();x.subjectId=l.projectId,x.viewSpaceUrl=l.viewSpaceUrl,HZ.uploadVideo&&HZ.uploadVideo.uploader&&HZ.uploadVideo.uploader.uploadVideoChunks(u,l,x._finished.bind(x),a)}},C.onerror=function(){if(p[0].status!==T.CANCELED)return i()},(null!=(L=C.upload)?L:C).onprogress=a,n={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&k(n,this.options.headers),n)C.setRequestHeader(t,n[t]);if(e=new FormData,this.options.params)for(r in E=this.options.params)d=E[r],e.append(r,d);for(h=0,g=p.length;h<g;h++)u=p[h],this.emit("sending",u,C,e);if(this.options.uploadMultiple&&this.emit("sendingmultiple",p,C,e),"FORM"===this.element.tagName)for(m=0,y=(b=this.element.querySelectorAll("input, textarea, select, button")).length;m<y;m++)s=(o=b[m]).getAttribute("name"),(!(w=o.getAttribute("type"))||"checkbox"!==(w=w.toLowerCase())&&"radio"!==w||o.checked)&&e.append(s,o.value);for(f=0,F=p.length;f<F;f++)(u=p[f]).type.match(/video.*/)?e.append(""+this.options.paramName+(this.options.uploadMultiple?"[]":""),new Blob,u.name.replace(/\.[^/.]+$/,"")):e.append(""+this.options.paramName+(this.options.uploadMultiple?"[]":""),u,u.name);return HZ&&HZ.data&&HZ.data.CSRFToken&&(e.append("__ct",HZ.data.CSRFToken),e.append("_csrf",HZ.data.CSRFToken)),1===p.length&&(e.append("fileType",u.type),e.append("fileName",u.name),e.append("fileSize",u.size),u.type.match(/video.*/)&&(isNaN(u.duration)?e.append("duration",-1):e.append("duration",u.duration),e.append("returnResult",1))),C.send(e)},T.prototype._finished=function(e,t,i){for(var n,o=0,s=e.length;o<s;o++)(n=e[o]).status=T.SUCCESS,this.emit("success",n,t,i),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()},T.prototype._errorProcessing=function(e,t,i){for(var n,o=0,s=e.length;o<s;o++)(n=e[o]).status=T.ERROR,this.emit("error",n,t,i),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()},T}();r.version="3.7.1",r.options={},r.optionsForElement=function(e){if(e.id)return r.options[t(e.id)]},r.instances=[],r.forElement=function(e){if(null==(null!=(e="string"==typeof e?document.querySelector(e):e)?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},r.autoDiscover=!0,r.discover=function(){var e,t,s,i,n,o;for(document.querySelectorAll?s=document.querySelectorAll(".dropzone"):(s=[],(e=function(e){for(var t,i=[],n=0,o=e.length;n<o;n++)t=e[n],/(^| )dropzone($| )/.test(t.className)?i.push(s.push(t)):i.push(void 0);return i})(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),o=[],i=0,n=s.length;i<n;i++)t=s[i],!1!==r.optionsForElement(t)?o.push(new r(t)):o.push(void 0);return o},r.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],r.isBrowserSupported=function(){var e,t,i,n=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(e=0,t=(i=r.blacklistedBrowsers).length;e<t;e++)i[e].test(navigator.userAgent)&&(n=!1);else n=!1;else n=!1;return n},i=function(e,t){for(var i,n=[],o=0,s=e.length;o<s;o++)(i=e[o])!==t&&n.push(i);return n},t=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})},r.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},r.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},r.getElement=function(e,t){var i;if("string"==typeof e?i=document.querySelector(e):null!=e.nodeType&&(i=e),null==i)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},r.getElements=function(e,t){var i,n,o,s,r,l,a;if(e instanceof Array){n=[];try{for(o=0,r=e.length;o<r;o++)i=e[o],n.push(this.getElement(i,t))}catch(e){n=null}}else if("string"==typeof e)for(n=[],s=0,l=(a=document.querySelectorAll(e)).length;s<l;s++)i=a[s],n.push(i);else null!=e.nodeType&&(n=[e]);if(null==n||!n.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},r.confirm=function(e,t,i){return window.confirm(e)?t():null!=i?i():void 0},r.isValidFile=function(e,t){var i,n,o,s,r,l;if(!t)return!0;for(t=t.split(","),i=(n=e.type).replace(/\/.*$/,""),s=e.name.toLowerCase(),r=0,l=t.length;r<l;r++)if("."===(o=(o=t[r]).trim()).charAt(0)){if(-1!==s.indexOf(o,e.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(i===o.replace(/\/.*$/,""))return!0}else if(n===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new r(this,e)})}),null!=d?d.exports=r:window.Dropzone=r,r.ADDED="added",r.QUEUED="queued",r.ACCEPTED=r.QUEUED,r.UPLOADING="uploading",r.PROCESSING=r.UPLOADING,r.CANCELED="canceled",r.ERROR="error",r.SUCCESS="success",e=function(t,i){var n=!1,e=!0,o=t.document,s=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",l=o.addEventListener?"removeEventListener":"detachEvent",a=o.addEventListener?"":"on",d=function(e){if("readystatechange"!==e.type||"complete"===o.readyState)return("load"===e.type?t:o)[l](a+e.type,d,!1),!n&&(n=!0)?i.call(t,e.type||e):void 0},p=function(){try{s.doScroll("left")}catch(e){return void setTimeout(p,50)}return d("poll")};if("complete"!==o.readyState){if(o.createEventObject&&s.doScroll){try{e=!t.frameElement}catch(e){}e&&p()}return o[r](a+"DOMContentLoaded",d,!1),o[r](a+"readystatechange",d,!1),t[r](a+"load",d,!1)}},r._autoDiscoverFunction=function(){if(r.autoDiscover)return r.discover()},e(window,r._autoDiscoverFunction)}.call(this)}),s.alias("component-emitter/index.js","dropzone/deps/emitter/index.js"),s.alias("component-emitter/index.js","emitter/index.js"),"object"==typeof exports?module.exports=s("dropzone"):"function"==typeof define&&define.amd?define(function(){return s("dropzone")}):this.Dropzone=s("dropzone")}();

window.hzmr.push("dropzone:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End dropzone.js  **************/
/************* Start metroAreas.js for locale en-US **************/
try {
HZ.ns("HZ.data");

HZ.data.OrderedCountryCodes = ["US","AU","CA","DK","FR","DE","IN","IE","IT","JP","NZ","RU","SG","ES","SE","GB","more"];
HZ.data.CountryConfig = {"US":{"id":"6252001","name":"United States","whole_name":"All United States","slug":"usa"},"AU":{"id":"2077456","name":"Australia","whole_name":"All Australia","slug":"australia"},"CA":{"id":"6251999","name":"Canada","whole_name":"All Canada","slug":"canada"},"DK":{"id":"2623032","name":"Denmark","whole_name":"All Denmark","slug":"denmark"},"FR":{"id":"3017382","name":"France","whole_name":"All France","slug":"france"},"DE":{"id":"2921044","name":"Germany","whole_name":"All Germany","slug":"germany"},"IN":{"id":"1269750","name":"India","whole_name":"All India","slug":"india"},"IE":{"id":"2963597","name":"Ireland","whole_name":"All Ireland","slug":"ireland"},"IT":{"id":"3175395","name":"Italy","whole_name":"All Italy","slug":"italy"},"JP":{"id":"1861060","name":"Japan","whole_name":"All Japan","slug":"japan"},"NZ":{"id":"2186224","name":"New Zealand","whole_name":"All New Zealand","slug":"new-zealand"},"RU":{"id":"2017370","name":"Russia","whole_name":"All Russia","slug":"russia"},"SG":{"id":"1880251","name":"Singapore","whole_name":"All Singapore","slug":"singapore"},"ES":{"id":"2510769","name":"Spain","whole_name":"All Spain","slug":"spain"},"SE":{"id":"2661886","name":"Sweden","whole_name":"All Sweden","slug":"sweden"},"GB":{"id":"2635167","name":"United Kingdom","whole_name":"All United Kingdom","slug":"united-kingdom"},"more":{"id":"0","name":"More Metro Areas","whole_name":"","slug":null}};
HZ.data.OrderedMetroAreas = {"US":[72,34,28,65,43,58,37,54,66,84,52,44,20,59,68,98,35,45,42,47,57,22,46,91,56,78,97,50,77,89,2,55,81,26,74,48,51,30,1,79,82,86,87,95,39,29,41,90,80,73,49,67,63,38,12,64,76,25,69,53,85,92],"GB":[128,185,186,187,126,129,188,189,190,191,124,192,103,193,194,195,196,21,100,197,199,200,242,201],"more":[71,232,23,75,24,33],"CA":[60,88,62,94,36,40],"AU":[104,83,114,107,108,115,112,105,111,70,106,99,109,61,113,110],"IE":[135,93,136],"NZ":[96,131,134,132,133,130],"DE":[137,138,139,147,140,244,142,143,144,145,146,243,149,150,151],"DK":[152,153,155,154,156],"ES":[157,158,159,160,161,162,163,164],"FR":[165,166,167,168,245,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184],"IN":[202,203,204,205,206,207,208,209],"IT":[251,250,253,252,249,210,211,212,247,248],"JP":[220,219,213,214,215,216,217,246,218],"RU":[223,224,225,222],"SE":[226,228,229,230],"SG":[231]};
HZ.data.MetroConfig = {"72":{"id":"72","name":"Albuquerque","slug":"albuquerque"},"34":{"id":"34","name":"Atlanta","slug":"atlanta"},"28":{"id":"28","name":"Austin","slug":"austin"},"65":{"id":"65","name":"Baltimore","slug":"baltimore"},"43":{"id":"43","name":"Birmingham","slug":"birmingham"},"58":{"id":"58","name":"Boise","slug":"boise"},"37":{"id":"37","name":"Boston","slug":"boston"},"54":{"id":"54","name":"Bridgeport","slug":"bridgeport"},"66":{"id":"66","name":"Burlington","slug":"burlington"},"84":{"id":"84","name":"Cedar Rapids","slug":"cedar-rapids"},"52":{"id":"52","name":"Charleston","slug":"charleston"},"44":{"id":"44","name":"Charlotte","slug":"charlotte"},"20":{"id":"20","name":"Chicago","slug":"chicago"},"59":{"id":"59","name":"Cincinnati","slug":"cincinnati"},"68":{"id":"68","name":"Cleveland","slug":"cleveland"},"98":{"id":"98","name":"Columbus","slug":"columbus"},"35":{"id":"35","name":"DC Metro","slug":"dc-metro"},"45":{"id":"45","name":"Dallas","slug":"dallas"},"42":{"id":"42","name":"Denver","slug":"denver"},"47":{"id":"47","name":"Detroit","slug":"detroit"},"57":{"id":"57","name":"Grand Rapids","slug":"grand-rapids"},"22":{"id":"22","name":"Hawaii","slug":"hawaii"},"46":{"id":"46","name":"Houston","slug":"houston"},"91":{"id":"91","name":"Huntington","slug":"huntington"},"56":{"id":"56","name":"Indianapolis","slug":"indianapolis"},"78":{"id":"78","name":"Jackson","slug":"jackson"},"97":{"id":"97","name":"Jacksonville","slug":"jacksonville"},"50":{"id":"50","name":"Kansas City","slug":"kansas-city"},"77":{"id":"77","name":"Las Vegas","slug":"las-vegas"},"89":{"id":"89","name":"Little Rock","slug":"little-rock"},"2":{"id":"2","name":"Los Angeles","slug":"los-angeles"},"55":{"id":"55","name":"Louisville","slug":"louisville"},"81":{"id":"81","name":"Manchester","slug":"manchester-NH"},"26":{"id":"26","name":"Miami","slug":"miami"},"74":{"id":"74","name":"Milwaukee","slug":"milwaukee"},"48":{"id":"48","name":"Minneapolis","slug":"minneapolis"},"51":{"id":"51","name":"Nashville","slug":"nashville"},"30":{"id":"30","name":"New Orleans","slug":"new-orleans"},"1":{"id":"1","name":"New York","slug":"new-york"},"79":{"id":"79","name":"Newark","slug":"newark"},"82":{"id":"82","name":"Oklahoma City","slug":"oklahoma-city"},"86":{"id":"86","name":"Omaha","slug":"omaha"},"87":{"id":"87","name":"Orange County","slug":"orange-county"},"95":{"id":"95","name":"Orlando","slug":"orlando"},"39":{"id":"39","name":"Philadelphia","slug":"philadelphia"},"29":{"id":"29","name":"Phoenix","slug":"phoenix"},"41":{"id":"41","name":"Portland","slug":"portland"},"90":{"id":"90","name":"Portland Maine","slug":"portland-maine"},"80":{"id":"80","name":"Providence","slug":"providence"},"73":{"id":"73","name":"Raleigh","slug":"raleigh"},"49":{"id":"49","name":"Richmond","slug":"richmond"},"67":{"id":"67","name":"Sacramento","slug":"sacramento"},"63":{"id":"63","name":"Salt Lake City","slug":"salt-lake-city"},"38":{"id":"38","name":"San Diego","slug":"san-diego"},"12":{"id":"12","name":"San Francisco","slug":"san-francisco"},"64":{"id":"64","name":"San Luis Obispo","slug":"san-luis-obispo"},"76":{"id":"76","name":"Santa Barbara","slug":"santa-barbara"},"25":{"id":"25","name":"Seattle","slug":"seattle"},"69":{"id":"69","name":"St Louis","slug":"st-louis"},"53":{"id":"53","name":"Tampa","slug":"tampa"},"85":{"id":"85","name":"Wichita","slug":"wichita"},"92":{"id":"92","name":"Wilmington","slug":"wilmington"},"128":{"id":"128","name":"Belfast","slug":"belfast"},"185":{"id":"185","name":"Berkshire","slug":"berkshire"},"186":{"id":"186","name":"Buckinghamshire","slug":"buckinghamshire"},"187":{"id":"187","name":"Cambridgeshire","slug":"cambridgeshire"},"126":{"id":"126","name":"Cardiff","slug":"cardiff"},"129":{"id":"129","name":"Channel Islands","slug":"channel-islands"},"188":{"id":"188","name":"Cheshire","slug":"cheshire"},"189":{"id":"189","name":"Cornwall","slug":"cornwall"},"190":{"id":"190","name":"Devon","slug":"devon"},"191":{"id":"191","name":"Dorset","slug":"dorset"},"124":{"id":"124","name":"Edinburgh","slug":"edinburgh"},"192":{"id":"192","name":"Essex","slug":"essex"},"103":{"id":"103","name":"Glasgow","slug":"glasgow"},"193":{"id":"193","name":"Gloucestershire","slug":"gloucestershire"},"194":{"id":"194","name":"Hampshire","slug":"hampshire"},"195":{"id":"195","name":"Hertfordshire","slug":"hertfordshire"},"196":{"id":"196","name":"Kent","slug":"kent"},"21":{"id":"21","name":"London","slug":"london"},"100":{"id":"100","name":"Manchester","slug":"manchester-UK"},"197":{"id":"197","name":"Oxfordshire","slug":"oxfordshire"},"199":{"id":"199","name":"Surrey","slug":"surrey"},"200":{"id":"200","name":"Sussex","slug":"sussex"},"242":{"id":"242","name":"West Midlands","slug":"west-midlands"},"201":{"id":"201","name":"Wiltshire","slug":"wiltshire"},"71":{"id":"71","name":"Amsterdam","slug":"amsterdam"},"232":{"id":"232","name":"Brussels","slug":"brussels"},"23":{"id":"23","name":"Hong Kong","slug":"hong-kong"},"75":{"id":"75","name":"Mexico City","slug":"mexico-city"},"24":{"id":"24","name":"Tel Aviv","slug":"tel-aviv"},"33":{"id":"33","name":"Other","slug":"other-metro"},"60":{"id":"60","name":"Calgary","slug":"calgary"},"88":{"id":"88","name":"Edmonton","slug":"edmonton"},"62":{"id":"62","name":"Montreal","slug":"montreal"},"94":{"id":"94","name":"Ottawa","slug":"ottawa"},"36":{"id":"36","name":"Toronto","slug":"toronto"},"40":{"id":"40","name":"Vancouver","slug":"vancouver"},"104":{"id":"104","name":"Adelaide","slug":"adelaide"},"83":{"id":"83","name":"Brisbane","slug":"brisbane"},"114":{"id":"114","name":"Cairns","slug":"cairns"},"107":{"id":"107","name":"Canberra - Queanbeyan","slug":"canberra-queanbeyan"},"108":{"id":"108","name":"Central Coast","slug":"central-coast"},"115":{"id":"115","name":"Darwin","slug":"darwin"},"112":{"id":"112","name":"Geelong","slug":"geelong"},"105":{"id":"105","name":"Gold Coast - Tweed","slug":"gold-coast-tweed"},"111":{"id":"111","name":"Hobart","slug":"hobart"},"70":{"id":"70","name":"Melbourne","slug":"melbourne"},"106":{"id":"106","name":"Newcastle - Maitland","slug":"newcastle-maitland"},"99":{"id":"99","name":"Perth","slug":"perth"},"109":{"id":"109","name":"Sunshine Coast","slug":"sunshine-coast"},"61":{"id":"61","name":"Sydney","slug":"sydney"},"113":{"id":"113","name":"Townsville","slug":"townsville"},"110":{"id":"110","name":"Wollongong","slug":"wollongong"},"135":{"id":"135","name":"Cork","slug":"cork"},"93":{"id":"93","name":"Dublin","slug":"dublin"},"136":{"id":"136","name":"Limerick","slug":"limerick"},"96":{"id":"96","name":"Auckland","slug":"auckland"},"131":{"id":"131","name":"Christchurch","slug":"christchurch"},"134":{"id":"134","name":"Dunedin","slug":"dunedin"},"132":{"id":"132","name":"Hamilton","slug":"hamilton"},"133":{"id":"133","name":"Napier-Hastings","slug":"napier-hastings"},"130":{"id":"130","name":"Wellington","slug":"wellington"},"137":{"id":"137","name":"Berlin","slug":"berlin"},"138":{"id":"138","name":"Bonn","slug":"bonn"},"139":{"id":"139","name":"Bremen","slug":"bremen"},"147":{"id":"147","name":"Cologne","slug":"cologne"},"140":{"id":"140","name":"Dortmund","slug":"dortmund"},"244":{"id":"244","name":"Dresden","slug":"dresden"},"142":{"id":"142","name":"Dusseldorf","slug":"dusseldorf"},"143":{"id":"143","name":"Essen","slug":"essen"},"144":{"id":"144","name":"Frankfurt","slug":"frankfurt"},"145":{"id":"145","name":"Hamburg","slug":"hamburg"},"146":{"id":"146","name":"Hanover","slug":"hanover"},"243":{"id":"243","name":"Leipzig","slug":"leipzig"},"149":{"id":"149","name":"Munich","slug":"munich"},"150":{"id":"150","name":"Nuremberg","slug":"nuremberg"},"151":{"id":"151","name":"Stuttgart","slug":"stuttgart"},"152":{"id":"152","name":"Aalborg","slug":"aalborg"},"153":{"id":"153","name":"Aarhus","slug":"aarhus"},"155":{"id":"155","name":"Copenhagen","slug":"copenhagen"},"154":{"id":"154","name":"Esbjerg","slug":"esbjerg"},"156":{"id":"156","name":"Odense","slug":"odense"},"157":{"id":"157","name":"Alicante-Costa Blanca","slug":"alicante"},"158":{"id":"158","name":"Barcelona","slug":"barcelona"},"159":{"id":"159","name":"Bilbao","slug":"bilbao"},"160":{"id":"160","name":"Madrid","slug":"madrid"},"161":{"id":"161","name":"Malaga","slug":"malaga"},"162":{"id":"162","name":"Palma de Mallorca","slug":"palma-de-mallorca"},"163":{"id":"163","name":"Seville","slug":"seville"},"164":{"id":"164","name":"Valencia","slug":"valencia"},"165":{"id":"165","name":"Angers","slug":"angers"},"166":{"id":"166","name":"Bordeaux","slug":"bordeaux"},"167":{"id":"167","name":"Brest","slug":"brest"},"168":{"id":"168","name":"Clermont-Ferrand","slug":"clermont-ferrand"},"245":{"id":"245","name":"Corsica","slug":"corsica"},"169":{"id":"169","name":"Dijon","slug":"dijon"},"170":{"id":"170","name":"Grenoble","slug":"grenoble"},"171":{"id":"171","name":"Le Havre","slug":"le-havre"},"172":{"id":"172","name":"Lille","slug":"lille"},"173":{"id":"173","name":"Lyon","slug":"lyon"},"174":{"id":"174","name":"Marseille","slug":"marseille"},"175":{"id":"175","name":"Montpellier","slug":"montpellier"},"176":{"id":"176","name":"Nancy","slug":"nancy"},"177":{"id":"177","name":"Nantes","slug":"nantes"},"178":{"id":"178","name":"Nice","slug":"nice"},"179":{"id":"179","name":"Paris","slug":"paris"},"180":{"id":"180","name":"Reims","slug":"reims"},"181":{"id":"181","name":"Rennes","slug":"rennes"},"182":{"id":"182","name":"Saint-Etienne","slug":"saint-etienne"},"183":{"id":"183","name":"Strasbourg","slug":"strasbourg"},"184":{"id":"184","name":"Toulouse","slug":"toulouse"},"202":{"id":"202","name":"Ahmedabad","slug":"ahmedabad"},"203":{"id":"203","name":"Bengaluru","slug":"bengaluru"},"204":{"id":"204","name":"Chennai","slug":"chennai"},"205":{"id":"205","name":"Delhi","slug":"delhi"},"206":{"id":"206","name":"Hyderabad","slug":"hyderabad"},"207":{"id":"207","name":"Kolkata","slug":"kolkata"},"208":{"id":"208","name":"Mumbai","slug":"mumbai"},"209":{"id":"209","name":"Pune","slug":"pune"},"251":{"id":"251","name":"Bari","slug":"bari"},"250":{"id":"250","name":"Bologna","slug":"bologna"},"253":{"id":"253","name":"Cagliari","slug":"cagliari"},"252":{"id":"252","name":"Catania-Palermo","slug":"catania-palermo"},"249":{"id":"249","name":"Florence","slug":"florence"},"210":{"id":"210","name":"Milan","slug":"milan"},"211":{"id":"211","name":"Naples","slug":"naples"},"212":{"id":"212","name":"Rome","slug":"rome"},"247":{"id":"247","name":"Turin","slug":"turin"},"248":{"id":"248","name":"Venice","slug":"venice"},"220":{"id":"220","name":"Fukuoka","slug":"fukuoka"},"219":{"id":"219","name":"Kobe","slug":"kobe"},"213":{"id":"213","name":"Kyoto","slug":"kyoto"},"214":{"id":"214","name":"Nagoya","slug":"nagoya"},"215":{"id":"215","name":"Osaka","slug":"osaka"},"216":{"id":"216","name":"Sapporo","slug":"sapporo"},"217":{"id":"217","name":"Tokyo ","slug":"tokyo"},"246":{"id":"246","name":"Tokyo Suburbs","slug":"tokyo-suburbs"},"218":{"id":"218","name":"Yokohama","slug":"yokohama"},"223":{"id":"223","name":"Moscow","slug":"moscow"},"224":{"id":"224","name":"Novosibirsk ","slug":"novosibirsk"},"225":{"id":"225","name":"Saint Petersburg ","slug":"saint-petersburg"},"222":{"id":"222","name":"Yekaterinburg","slug":"yekaterinburg"},"226":{"id":"226","name":"Gothenburg","slug":"gothenburg"},"228":{"id":"228","name":"Malmo","slug":"malmo"},"229":{"id":"229","name":"Orebro","slug":"orebro"},"230":{"id":"230","name":"Stockholm","slug":"stockholm"},"231":{"id":"231","name":"Singapore","slug":"singapore"}};

window.hzmr.push("metroAreas:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End metroAreas.js  **************/
/************* Start jquery.menu-aim.js for locale en-US **************/
try {!function(y){y.fn.menuAim=function(e){return this.each(function(){!function(e){var f=y(this),a=null,s=[],h=null,n=null,m=y.extend({rowSelector:"> li",submenuSelector:"*",submenuDirection:"right",tolerance:75,enter:y.noop,exit:y.noop,activate:y.noop,deactivate:y.noop,exitMenu:y.noop},e),t=3,x=300,i=function(e){e!=a&&(a&&m.deactivate(a),m.activate(e),a=e)},o=function(e){var t=u();t?n=setTimeout(function(){o(e)},t):i(e)},u=function(){if(!a||!y(a).is(m.submenuSelector))return 0;var e=f.offset(),t={x:e.left,y:e.top-m.tolerance},n={x:e.left+f.outerWidth(),y:t.y},i={x:e.left,y:e.top+f.outerHeight()+m.tolerance},o={x:e.left+f.outerWidth(),y:i.y},u=s[s.length-1],r=s[0];if(!u)return 0;if((r=r||u).x<e.left||r.x>o.x||r.y<e.top||r.y>o.y)return 0;if(h&&u.x==h.x&&u.y==h.y)return 0;function c(e,t){return(t.y-e.y)/(t.x-e.x)}var l=n,e=o;"left"==m.submenuDirection?(l=i,e=t):"below"==m.submenuDirection?(l=o,e=i):"above"==m.submenuDirection&&(l=t,e=n);t=c(u,l),n=c(u,e),l=c(r,l),e=c(r,e);return t<l&&e<n?(h=u,x):(h=null,0)};f.mouseleave(function(){n&&clearTimeout(n),m.exitMenu(this)&&(a&&m.deactivate(a),a=null)}).find(m.rowSelector).mouseenter(function(){n&&clearTimeout(n),m.enter(this),o(this)}).mouseleave(function(){m.exit(this)}).click(function(){i(this)}),y(document).mousemove(function(e){s.push({x:e.pageX,y:e.pageY}),s.length>t&&s.shift()})}.call(this,e)}),this}}(jQuery);

window.hzmr.push("jquery.menu-aim:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.menu-aim.js  **************/
/************* Start metroDropdownComponent.js for locale en-US **************/
try {HZ.ns("HZ.modules.LocationDropdown"),HZ.modules.LocationDropdown=function(s){if(s&&s.hasOwnProperty("containerElement")&&"function"==typeof $){var i,r=16,l="more",e=$(document),c=$("#navContainer"),a=HZ.data.CountryConfig,u=HZ.data.MetroConfig,d=HZ.data.OrderedCountryCodes,m=HZ.data.OrderedMetroAreas,t=HZ.utils&&HZ.utils.Config&&HZ.utils.Config.isResponsive,_="string"==typeof s.containerElement?$(s.containerElement):s.containerElement,p=s.$triggerElement||_.find(".browse-metro-selector__trigger"),f=_.data("baseUrl"),y=!1,o=s.selectedValue||_.data("selectedMetroArea"),w=this,n=s.allMetroAreasOptionValue||"all-metros",v='<li class="%countryItemClass%" data-country-code="%loweredCountryCode%" data-value="%allCountryValue%"><span class="%countryFlagClass%" data-country-code="%loweredCountryCode%"></span>%countryName%</li>',g=void 0!==window.pageXOffset,h="CSS1Compat"===(document.compatMode||"");return t||z(),e.one("click",".browse-metro-selector__trigger",S.bind(w)),this.init=S,this.open=L,this.close=E,this.toggle=N,this.setTriggerLabel=O,this.showAllMetroAreasOption=function(){var e=_.find(".countries-container__all-metros-option");e.length?e.show():_.find(".countries-container").prepend(HZ.utils.Html.template(v,{countryItemClass:"countries-container__country countries-container__all-metros-option text-sm",countryFlagClass:"hzi-font hzi-location-pin-fill country__flag--all",loweredCountryCode:n,countryName:_hgt("All Metro Areas")}))},this.hideAllMetroAreasOption=function(){_.find(".countries-container__all-metros-option").hide()},this}function C(){return o&&o!==n}function b(){var e=d.map(function(e){var t=a[e],o=e.toLowerCase();return HZ.utils.Html.template(v,{countryItemClass:"countries-container__country text-sm",countryFlagClass:e===l?"hzi-font hzi-ellipsis country__flag--more":"country__flag",loweredCountryCode:o,allCountryValue:t.slug,countryName:t.name})}).join("");return'<ul class="countries-container">'+(C()?HZ.utils.Html.template(v,{countryItemClass:"countries-container__country countries-container__all-metros-option text-sm",countryFlagClass:"hzi-font hzi-location-pin-fill country__flag--all",loweredCountryCode:n,countryName:_hgt("All Metro Areas")}):"")+e+"</ul>"}function H(){return'<div class="metros-container">'+d.map(function(e){var t=a[e],o=m[e]&&m[e].slice(0)||[],n=e.toLowerCase();return e!==l&&o.unshift({name:t.whole_name,slug:t.slug}),'<div class="metro-areas-wrapper" data-country-code="'+n+'">'+function(e,t){if(!e||!e.length)return[];for(var o=[],n=e.slice(0);n.length;)o.push(n.splice(0,Math.min(t,n.length)));return o}(o,Math.max(d.length,r)).map(function(e){return'<ul class="metro-areas-list">'+e.map(function(e){e="number"==typeof e?u[e]:e;return'<li class="metro-areas-list__city text-sm" data-value="'+e.slug+'">'+e.name+"</li>"}).join("")+"</ul>"}).join("")+"</div>"}).join("")+"</div>"}function A(){var e=_hgt("All Metro Areas");return(C()?'<div class="countries-container__all-metros-option text-m">'+e+"</div>":"")+d.map(function(e){var t=e.toLowerCase(),o=a[e],n=m[e]||[],e=e!==l?'<li class="metro-areas-list__city text-m" data-value="'+o.slug+'">'+o.whole_name+"</li>":"";return metroAreasHtml=n.map(function(e){e=u[e];return'<li class="metro-areas-list__city text-m" data-value="'+e.slug+'">'+e.name+"</li>"}).join(""),'<div class="country"><input type="checkbox" class="country__checkbox" id="country-'+t+'"/><label class="country__label text-m" for="country-'+t+'">'+o.name+'<span class="country__label__caret--right hzi-font hzi-chevron-right text-s"></span><span class="country__label__caret--down hzi-font hzi-chevron-down text-s"></span></label><ul class="country__metros-list">'+e+metroAreasHtml+"</ul></div>"}).join("")}function x(){var n={},r=i.find(".countries-container__country"),a=i.find(".metro-areas-wrapper");function o(e){var t=$(e.target),o=t.text(),e=t.data("value")||"",t=f,e=""!==e?"/"+e:"";0<t.indexOf("/_3_")?t=t.replace("/_3_",e):0<t.indexOf("/_19_")?t=t.replace("/_19_",e):t+=e,E(),O(o),document.location=t}e.on("click",".metro-areas-list__city, .countries-container__all-metros-option",function(e){var t=$(e.target);s.onMetroAreaSelected?s.onMetroAreaSelected.call(w,{name:t.text(),slug:t.data("value")||t.data("countryCode")}):o(e)}),t||(e.on("mouseleave",".browse-metro-selector",function(){E()}),$(".countries-container").menuAim({activate:function(e){var t,o=$(e),e=o.data("countryCode").toLowerCase();r.removeClass("countries-container__country--active"),a.removeClass("metro-areas-wrapper--active"),o.addClass("countries-container__country--active"),n.hasOwnProperty(e)?t=n[e]:n[e]=t=i.find(".metro-areas-wrapper[data-country-code="+e+"]"),t.addClass("metro-areas-wrapper--active")},tolerance:100,rowSelector:".countries-container__country"}),$(".countries-container").on("click",".countries-container__country",function(e){var t=$(e.target);t.data("countryCode")!=l&&t.data("value")&&(s.onMetroAreaSelected?s.onMetroAreaSelected.call(w,{name:t.text(),slug:t.data("value")}):o(e))}))}function M(){e.on("click",".browse-metro-selector__trigger",N),x()}function Z(e){var t,o,n;i.length&&(n=(o=(t=i.find(".countries-container__country")).eq(e)).length&&o.data("countryCode"),e=i.find(".metro-areas-wrapper"),n=i.find(".metro-areas-wrapper[data-country-code="+n+"]"),t.removeClass("countries-container__country--active"),o.addClass("countries-container__country--active"),e.removeClass("metro-areas-wrapper--active"),n.addClass("metro-areas-wrapper--active"))}function O(e){p.text(e)}function z(){o&&isNaN(o)&&a.hasOwnProperty(o)?O(a[o].name):o&&!isNaN(o)&&u.hasOwnProperty(o)?O(u[o].name):o&&O(o)}function E(){_.removeClass("browse-metro-selector--active"),i.removeClass("browse-metro-selector__dropdown--open browse-metro-selector__dropdown--open-above"),y=!1}function L(){var e,t,o,n,r,a;e=$(window).height(),t=_.offset().top,o=p.outerHeight(),n=i.outerHeight(),r=g?window.pageYOffset:(h?document.documentElement:document.body).scrollTop,a=c.outerHeight(),!(n<=e-o-t+r)&&n+10<=t-(r+a)&&i.addClass("browse-metro-selector__dropdown--open-above"),_.addClass("browse-metro-selector--active"),i.addClass("browse-metro-selector__dropdown--open"),y=!0}function N(){y?E():(Z(o?1:0),L())}function S(){return _.length||(_="string"==typeof s.containerElement?$(s.containerElement):s.containerElement),i=$("<div/>",{class:"browse-metro-selector__dropdown",role:"dropdown-modal"}),t?i.append(A()):i.append(b()).append(H()),_.find(".browse-metro-selector__dropdown").remove(),_.append(i),M(),Z(o?1:0),L(),this}},$(function(){$(".browse-metro-selector").length&&new HZ.modules.LocationDropdown({containerElement:$(".browse-metro-selector")})});

window.hzmr.push("metroDropdownComponent:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End metroDropdownComponent.js  **************/
/************* Start viewGallery.js for locale en-US **************/
try {function expandDiv(t,e){void 0===e&&(e=!0);var o=document.getElementById(t+"Full"),t=document.getElementById(t+"Partial");o&&t&&(o.style.display=e?"inline":"none",t.style.display=e?"none":"inline")}function showDiv(t,e,o){void 0===e&&(e=!0);t=document.getElementById(t+"Full");t&&(t.style.display=e?"block":"none",$(o).hide())}HZ.ns("HZ.galleries"),HZ.galleries.AddComment=new function(){var o,n=null,i=null,a=null;this.init=function(){n=$(".addComment textarea.commentBody").first(),o=$("#addAnswerAnchor"),i=$("a[name='comments']").first(),a=$(".addComment .addCommentExtra").first(),a.find(".addImageButton .button-icon").first();var t=$("#disclaimer");1==t.length&&(t.remove().css("display","block"),a.prepend(t)),n.bind("focus",function(){a.show()});function e(){n.length?n.is(":visible")?(n.focus(),l(n)):l($(".addComment .note-editable").focus()):l(o)}"#addComment"==location.hash?e():"#comments"==location.hash?(i.focus(),l(i)):location.hash&&1<location.hash.length&&(t=location.hash.substr(1),!$.isNumeric(t)||1<=(t=$("a[name='"+t+"']").first()).length&&l(t)),$(".button-comment").click(e)};var l=function(t){var e;0!=t.length&&(e=t.offset(),0<(t=$("#navContainer").first()).length&&(e.top-=t.height()+10),$("html, body").animate({scrollTop:e.top}))}},$(document).ready(function(){HZ.galleries.AddComment.init(),setTimeout(function(){$(".houzztv-player").css({visibility:"visible"})},1500)}),HZ.galleries.ViewGallery=new function(){this.SOURCE_LINK_SPACEACTIONS_EMAIL=11;this.init=function(t){t.galleryId,$("#gallerySpaces").on("click touchstart",".promote, .touch-promote, .save-button, .email-button",function(){HZ.spaceActions.handleButtonClick($(this),t)}),HZ.data.CurrentSessionUser||t.isProductGallery||t.isBrandSpotlight||$("#gallerySpaces").on("mouseenter",".gallery-photo",function(){var t=$(this),e=t.height(),o=Math.floor(.6*e);if("ontouchstart"in document.documentElement){$(".touch-promote").hide();e=t.find(".touch-promote");e&&0!=e.length||(e=$("<div class='touch-promote' data-type='hover'><span class='likeIt icon-wrap'>"+_hgt("Save Photo")+"<span class='more-icon'></span></span><br/></div>"),t.append(e)),$(e).show();var n=o-$(e).outerHeight()-8;$(e).css("top",n+"px")}else{var i=HZ.spaceActions.PhotoOverlay.assembleOverlayElements(),n=i.length;if(0<n)for(var a=n;0<=a;a--)t.append(i[a])}})},this.showSendSpaceEmailDialog=function(t){HZ.data.CurrentSessionUser?HZ.data&&HZ.data.Spaces&&((t=HZ.data.Spaces.get(t))&&(HZ.dialogs.EmailDialog.prepare({type:HZ.sendEmail.types.SPACE,referenceId:t.id,subject:t.t,message:t.prod?HZ.sendEmail.texts.DEFAULT_MESSAGE_PRODUCT:HZ.sendEmail.texts.DEFAULT_MESSAGE_SPACE,staticMessageData:!(!t.prod||!HZ.lb.Config.tradeUser)&&HZ.lb.Config.tradeUser}),HZ.ui.Yamdi.show(HZ.dialogs.EmailDialog))):HZ.auth.Manager.signup(this.SOURCE_LINK_SPACEACTIONS_EMAIL)},this.attachCollaborateAvatarHover=function(){var t=$(".gallery-collaborator-info");t.on("mouseenter",".hz-user-image",function(){var t=$(this),e=t.attr("tooltip-data");t.tipBubble({content:_hgt("<b>{collaboratorName}</b>",{collaboratorName:e}),id:"collaborator-tooltip",width:"auto",point:"south",offsetX:-12,offsetY:0,borderColor:"#ccc",showCloseBtn:!1,position:"absolute",attachTo:"body",fadeDuration:0})}),t.on("mouseleave",".hz-user-image",function(){$(this).tipBubble("hide")})}},HZ.galleries.ViewSketches=new function(){var i={};function a(){var e,o,n;this.init=function(t){return t=t||{},e=$(t.selector),o=e.find(".gallery-sketch-thumb-container.hidden"),(n=e.find(".viewSketches-showMore")).on("click",function(){o.removeClass("hidden"),n.hide()}),this}}this.init=function(t){for(var e=(t=t||{}).views||[],o=0;o<e.length;o++){var n=new a;(i[e[o].id]=n).init({selector:e[o].selector})}}};var searchWidgetLoaded=!1;function loadSearchWidget(t,e,o,n){searchWidgetLoaded||(document.getElementById("searchWidgetPreview").style.backgroundColor="#"+e,t.innerHTML=getSearchWidgetHtml(200,e,o,n,!1,!0),searchWidgetLoaded=!0)}function handleMouseOver(t){elemId="viewGalleryItemButtons"+t,elemId="imageOverlay"+t,toggleImageOverlay(elemId,!0)}function handleMouseOut(t){elemId="viewGalleryItemButtons"+t,elemId="imageOverlay"+t,toggleImageOverlay(elemId,!1)}function toggleImageButton(t,e){var o=document.getElementById(t);o&&(t=o.className||"",r=t.match(/^(.*?)($|\s)/),r&&(r=r[1],e||(r+=" "+r+"Collapsed"),o.className=r))}function toggleButtonsRibbon(t,e){t=document.getElementById(t);t.style.opacity=e?1:.5}function toggleImageOverlay(t,e){t=document.getElementById(t);t&&(t.style.display=e?"inline":"none")}function trimBottomPadding(t){var e=document.getElementById("floatingImage"+t),t=document.getElementById("itemText"+t);(!t||e.offsetHeight>t.offsetHeight)&&(e.style.paddingBottom=0)}HZ.galleries.StickyBanners=new function(){var e=[];function o(t){var o,e,n,i,a,l,s,r;function c(){a=t.position||function(){var t=i.offset().left;o.width();return{top:70,left:t}}(),o.css({position:"fixed",top:a.top||"",right:a.right||"",bottom:a.bottom||"",left:a.left||"","margin-left":a.marginLeft||""})}function d(){var t=$(window).scrollTop(),e=t+$(window).height(),e=l<t&&e<s;e&&!r?o.animate({opacity:1},250,null,function(){r=!0}):!e&&r&&o.animate({opacity:0},250,null,function(){r=!1})}this.init=function(){(o=$(t.stickyBanner)).parent().length||o.appendTo($("body")),i=$(t.container),c(),e=$(t.anchorTop),n=$(t.anchorBottom),l=e.offset().top+e.height(),s=n.offset().top,d(),$(window).scroll($.throttle(100,d)),$(window).resize($.throttle(100,c))}}this.setStickyBanner=function(t){t=new o({stickyBanner:t.stickyBanner,position:t.position,anchorTop:t.anchorTop,anchorBottom:t.anchorBottom,container:t.container});e.push(t),t.init()}};

window.hzmr.push("viewGallery:29383330");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End viewGallery.js  **************/
