!function(){var o={Desktop:"DESKTOP",Portrait:"PORTRAIT",Landscape:"LANDSCAPE"},a=480,i=853,r=532,s=320,l=43,c=40,d=12,y=216,p=56,u=52,f=12,h=19,g=28,m=16,w=16,v=2147483647,b=!1,E=!1,L=!1,x=!1,k=o.Desktop,P=false,A={"accentColor":"#3C0072","buttonPlacementType":"right"},O={"hidePoweredBy":"true","photographerPlan":"PlanStdPremium216","addOnPlan":"AddOnBookingWidgetMonthly99Standard","flagshipPhotographerId":"542142448"},R=A.buttonPlacementType,T="zfInvoiceId",_={invoiceId:T};function z(n,a,o){var i,r,s,l,c=0;o=o||{};function d(){c=!1===o.leading?0:(new Date).getTime(),i=null,l=n.apply(r,s),i||(r=s=null)}function e(){var e=(new Date).getTime();c||!1!==o.leading||(c=e);var t=a-(e-c);return r=this,s=arguments,t<=0||a<t?(i&&(clearTimeout(i),i=null),c=e,l=n.apply(r,s),i||(r=s=null)):i||!1===o.trailing||(i=setTimeout(d,t)),l}return e.cancel=function(){clearTimeout(i),c=0,i=r=s=null},e}function D(e,t){e.contentWindow.postMessage(JSON.stringify(t),"*")}function C(e,t,n){var a=S();a!==k&&(k=a,H(e,t,x),D(n,{type:"layout-type-changed",layoutType:k}))}function H(e,t,n){t.classList.toggle("zf-bookme-frame_expanded",n),t.classList.toggle("zf-bookme-frame_collapsed",!n);var a=!1;k===o.Desktop?(t.style.zIndex="3",t.style.bottom=u-f+"px",t.style.maxHeight="calc(100% - "+(u-f)+"px)",n?("left"===R?(t.style.left=l-d+"px",t.style.right="auto"):"center"===R?(t.style.left="calc(50vw - "+(s+2*d)/2+"px)",t.style.right="auto"):(t.style.left="auto",t.style.right=l-d+"px"),t.style.width=s+2*d+"px",t.style.height=d+r+c+p+f+"px"):("left"===R?(t.style.left=l-f+(s-y)/2+"px",t.style.right="auto"):"center"===R?(t.style.left="calc(50vw - "+(y+2*f)/2+"px)",t.style.right="auto"):(t.style.left="auto",t.style.right=l-f+(s-y)/2+"px"),t.style.width=y+2*f+"px",t.style.height=p+2*f+"px")):(t.style.bottom="0",t.style.maxHeight="100%",n?(a=!0,t.style.zIndex=v+"",t.style.width="100vw",t.style.height="100%",t.style.left="auto",t.style.right="0"):(t.style.zIndex="3","left"===R?(t.style.left="0",t.style.right="auto"):"center"===R?(k===o.Landscape?t.style.left="calc(50vw - "+(p+2*f)/2+"px)":t.style.left="calc(50vw - "+(f+p+g)/2+"px)",t.style.right="auto"):(t.style.left="auto",t.style.right="0"),k===o.Landscape?(t.style.width="center"===R?p+2*f+"px":f+p+w+"px",t.style.height=f+p+m+"px"):(t.style.width=f+p+g+"px",t.style.height=f+p+h+"px"))),e.classList.toggle("zf-bookme-curtain_visible",a),e.classList.toggle("zf-bookme-curtain_hidden",!a),e.style.display=a?"block":"none",x=n}function I(e,t,n,a){if(a&&a.data&&a.source===n.contentWindow&&!L){var o=null;try{o=JSON.parse(a.data)}catch(e){}o&&o.type&&("loaded"===o.type?(E=!0,b=o.isMobile,C(e,t,n)):"collapsed"===o.type?H(e,t,!1):"expanding"===o.type?(H(e,t,!0),D(n,{type:"expanded"})):"hide"===o.type?(L=!0,e.style.display="none",t.style.display="none"):"remove-query-params"===o.type&&function(e){if(!e||!window.location.search)return;var t=window.location.href,n=new URL(t);e.forEach(function(e){var t=_[e];t&&n.searchParams.delete(t)});var a=n.href;t!==a&&window.history.replaceState({},document.title,a)}(o.queryParams))}}function S(){var e,t,n;return t=b?(e=window.innerWidth,window.innerHeight):(e=document.documentElement.clientWidth,document.documentElement.clientHeight),(e<t?(n=!1,P||e<=a&&t<=i):(n=!0,P||t<=a&&e<=i))?n?o.Landscape:o.Portrait:o.Desktop}function e(){var e="opacity: 1; visibility: visible; display: block; float: none; min-height: 0; min-width: 0; border: 0; margin: 0; padding: 0; overflow: hidden; transition: none 0s ease 0s !important;",a=document.createElement("div");a.setAttribute("style",e+" position: fixed; width: 100vw; height: 100vh; left: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.32); z-index: "+(v-1)+";"),a.classList.add("zf-bookme-curtain");var o=document.createElement("div");o.setAttribute("style",e+" background: none; position: fixed; max-width: 100vw;"),o.classList.add("zf-bookme-frame"),"left"===R?o.classList.add("zf-bookme-frame_left"):"center"===R?o.classList.add("zf-bookme-frame_center"):o.classList.add("zf-bookme-frame_right"),k=S();var n,i,t=new URL("https://bookme.zenfolio.com/widget?photographerId=a78b4585-cae9-4bf7-87c3-2d0520658eb5");t.searchParams.set("layoutType",k),n=t,A&&Object.getOwnPropertyNames(A).forEach(function(e){var t=A[e];t&&n.searchParams.set(e,t)}),i=t,O&&Object.getOwnPropertyNames(O).forEach(function(e){var t=O[e];t&&i.searchParams.set(e,t)});var r=function(a){if(!window.location.search)return!1;var o=!1,i=new URLSearchParams(window.location.search);return Object.getOwnPropertyNames(_).forEach(function(e){var t=_[e];if(t){var n=i.get(t);n&&(a.searchParams.set(e,n),t===T&&(o=!0))}}),o}(t);H(a,o,r);var s=document.createElement("iframe");s.setAttribute("allow","geolocation"),s.setAttribute("scrolling","no"),s.setAttribute("style",e+" background: none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; bottom: 0; right: 0;"),window.addEventListener("message",function(e){I(a,o,s,e)}),window.addEventListener("keydown",function(e){var t,n;t=s,(n=e)&&n.key&&x&&E&&!L&&("Escape"===n.key?D(t,{type:"escape"}):"Enter"!==n.key||n.target&&"TEXTAREA"===n.target.tagName||D(t,{type:"enter"}))},!0),window.addEventListener("click",function(e){var t,n,a;t=o,n=s,(a=e)&&a.target&&"HTML"!==a.target.tagName&&x&&E&&!L&&(t.contains(a.target)||D(n,{type:"close"}))},!0);var l=z(function(){var e,t,n;e=a,t=o,n=s,!L&&E&&C(e,t,n)},200,{leading:!1});window.addEventListener("resize",l),window.addEventListener("orientationchange",l),o.appendChild(s),document.body.appendChild(a),document.body.appendChild(o),s.src=t.href,"function"==typeof onBookMeRendered&&onBookMeRendered()}"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();