diff options
Diffstat (limited to 'plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js')
-rw-r--r-- | plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js new file mode 100644 index 00000000..05ef0a3d --- /dev/null +++ b/plugins/jetpack/jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js @@ -0,0 +1,15 @@ +"use strict";(self.webpackChunkjetpack_search=self.webpackChunkjetpack_search||[]).push([[613],{5332:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(8294),n=r.n(s),a=r(211),i=r(4184);class o extends a.Component{constructor(){super(...arguments),n()(this,"handleOverlayOptionsUpdate",(e=>{this.props.updateOverlayOptions(e,(()=>this.props.showResults()))}))}componentDidMount(){(0,i.vJ)(this.handleOverlayOptionsUpdate),(0,i.Em)(this.props.toggleResults)}render(){return null}}},1773:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(8294),n=r.n(s),a=(r(3679),r(211)),i=r(3259),o=r.n(i);class l extends a.Component{constructor(){super(...arguments),n()(this,"handleCompositionStart",(()=>this.setState({isComposing:!0}))),n()(this,"handleCompositionEnd",(()=>this.setState({isComposing:!1}))),n()(this,"handleFilterInputClick",(e=>{e.preventDefault(),e.currentTarget.dataset.filterType&&("taxonomy"===e.currentTarget.dataset.filterType?this.props.setFilter(e.currentTarget.dataset.taxonomy,e.currentTarget.dataset.val):this.props.setFilter(e.currentTarget.dataset.filterType,e.currentTarget.dataset.val)),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleHistoryNavigation",(()=>{this.props.initializeQueryValues({isHistoryNavigation:!0})})),n()(this,"handleInput",o()((e=>{var t,r;null!==(t=e.inputType)&&void 0!==t&&t.includes("format")||""===e.target.value||(this.state.isComposing||"submit"!==this.props.overlayOptions.overlayTrigger&&(this.props.setSearchQuery(e.target.value),"immediate"===this.props.overlayOptions.overlayTrigger&&this.props.showResults(),"results"===this.props.overlayOptions.overlayTrigger&&(null===(r=this.props.response)||void 0===r?void 0:r.results)&&this.props.showResults()))}),200)),n()(this,"handleKeyup",(e=>{"Enter"===e.key&&(this.props.setSearchQuery(e.target.value),this.props.showResults())})),n()(this,"handleOverlayTriggerClick",(e=>{e.stopImmediatePropagation(),this.props.setSearchQuery(""),this.props.showResults()})),n()(this,"handleSubmit",(e=>{if(e.preventDefault(),this.handleInput.flush(),!this.props.isVisible){var t;const r=null===(t=e.target.querySelector(this.props.themeOptions.searchInputSelector))||void 0===t?void 0:t.value;"string"==typeof r&&this.props.setSearchQuery(r),this.props.showResults()}})),n()(this,"fixBodyScroll",(()=>{var e;this.props.isVisible?(this.preventBodyScroll(),null===(e=window)||void 0===e||e.scrollTo(0,0)):this.props.isVisible||this.restoreBodyScroll()})),this.state={isComposing:!1,bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""},this.props.initializeQueryValues()}componentDidMount(){this.disableUnnecessaryFormAndInputAttributes(),this.addEventListeners()}componentWillUnmount(){this.removeEventListeners(),this.restoreBodyScroll()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.fixBodyScroll()}disableUnnecessaryFormAndInputAttributes(){document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.removeAttribute("required"),e.removeAttribute("autocomplete"),e.form.removeAttribute("autocomplete")}))}addEventListeners(){window.addEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.addEventListener("submit",this.handleSubmit),e.addEventListener("keyup",this.handleKeyup),e.addEventListener("input",this.handleInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.addEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.addEventListener("click",this.handleFilterInputClick)}))}removeEventListeners(){window.removeEventListener("popstate",this.handleHistoryNavigation),document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.form.removeEventListener("submit",this.handleSubmit),e.removeEventListener("keyup",this.handleKeyup),e.removeEventListener("input",this.handleInput),e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd)})),document.querySelectorAll(this.props.themeOptions.overlayTriggerSelector).forEach((e=>{e.removeEventListener("click",this.handleOverlayTriggerClick,!0)})),document.querySelectorAll(this.props.themeOptions.filterInputSelector).forEach((e=>{e.removeEventListener("click",this.handleFilterInputClick)}))}preventBodyScroll(){this.setState({bodyScrollTop:parseInt(window.scrollY)||0,previousStyle:{top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,scrollBehavior:document.documentElement.style.scrollBehavior},previousBodyStyleAttribute:document.body.getAttribute("style")},(()=>{var e,t;const r=(null===(e=document.documentElement)||void 0===e?void 0:e.scrollHeight)-(null===(t=document.body)||void 0===t?void 0:t.scrollHeight)||0;document.body.setAttribute("style","position: fixed !important"),document.body.style.top=`-${this.state.bodyScrollTop-r}px`,document.body.style.left=0,document.body.style.right=0}))}restoreBodyScroll(){var e,t,r,s,n,a,i,o;this.state.previousBodyStyleAttribute?document.body.setAttribute("style",this.state.previousBodyStyleAttribute):document.body.removeAttribute("style"),document.body.style.top=null!==(e=null===(t=this.state.previousStyle)||void 0===t?void 0:t.top)&&void 0!==e?e:"",document.body.style.left=null!==(r=null===(s=this.state.previousStyle)||void 0===s?void 0:s.left)&&void 0!==r?r:"",document.body.style.right=null!==(n=null===(a=this.state.previousStyle)||void 0===a?void 0:a.right)&&void 0!==n?n:"",document.documentElement.style.scrollBehavior="revert",this.state.bodyScrollTop>0&&window.scrollTo(0,this.state.bodyScrollTop),document.documentElement.style.scrollBehavior=null!==(i=null===(o=this.state.previousStyle)||void 0===o?void 0:o.scrollBehavior)&&void 0!==i?i:"",this.setState({bodyScrollTop:0,previousStyle:null,previousBodyStyleAttribute:""})}render(){return null}}},1180:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736);const __=o.__;class l extends a.Component{needsOffset(e,t){return["gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGTitle(e){if("title"in this.props)return this.props.title?i().createElement("title",null,this.props.title):null;switch(e){default:return null;case"gridicons-audio":return i().createElement("title",null,__("Has audio.","jetpack-search-pkg"));case"gridicons-calendar":return i().createElement("title",null,__("Is an event.","jetpack-search-pkg"));case"gridicons-cart":return i().createElement("title",null,__("Is a product.","jetpack-search-pkg"));case"chevron-down":return i().createElement("title",null,__("Show filters","jetpack-search-pkg"));case"gridicons-comment":return i().createElement("title",null,__("Matching comment.","jetpack-search-pkg"));case"gridicons-cross":return i().createElement("title",null,__("Close search results","jetpack-search-pkg"));case"gridicons-filter":return i().createElement("title",null,__("Toggle search filters.","jetpack-search-pkg"));case"gridicons-folder":return i().createElement("title",null,__("Category","jetpack-search-pkg"));case"gridicons-image-multiple":return i().createElement("title",null,__("Has multiple images.","jetpack-search-pkg"));case"gridicons-image":return i().createElement("title",null,__("Has an image.","jetpack-search-pkg"));case"gridicons-page":return i().createElement("title",null,__("Page","jetpack-search-pkg"));case"gridicons-post":return i().createElement("title",null,__("Post","jetpack-search-pkg"));case"gridicons-jetpack-search":case"gridicons-search":return i().createElement("title",null,__("Magnifying Glass","jetpack-search-pkg"));case"gridicons-tag":return i().createElement("title",null,__("Tag","jetpack-search-pkg"));case"gridicons-video":return i().createElement("title",null,__("Has a video.","jetpack-search-pkg"))}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return i().createElement("g",null,i().createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-block":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return i().createElement("g",null,i().createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return i().createElement("g",null,i().createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return i().createElement("g",null,i().createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-down":return i().createElement("g",null,i().createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return i().createElement("g",null,i().createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-cross":return i().createElement("g",null,i().createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return i().createElement("g",null,i().createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return i().createElement("g",null,i().createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return i().createElement("g",null,i().createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return i().createElement("g",null,i().createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return i().createElement("g",null,i().createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-jetpack-search":return i().createElement("g",null,i().createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-pages":return i().createElement("g",null,i().createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return i().createElement("g",null,i().createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return i().createElement("g",null,i().createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return i().createElement("g",null,i().createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return i().createElement("g",null,i().createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return i().createElement("g",null,i().createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return i().createElement("g",null,i().createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}))}}render(){const{size:e=24,className:t=""}=this.props,r=this.props.height||e,s=this.props.width||e,n=this.props.style||{height:r,width:s},a="gridicons-"+this.props.icon;let o=["gridicon",a,t];return this.needsOffset(a,e)&&o.push("needs-offset"),o=o.join(" "),i().createElement("svg",{className:o,focusable:this.props.focusable,height:r,onClick:this.props.onClick,style:n,viewBox:"0 0 24 24",width:s,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},this.getSVGTitle(a),this.renderIcon(a))}}n()(l,"defaultProps",{"aria-hidden":"false",focusable:"true"}),t.Z=l},8852:function(e,t,r){var s=r(211),n=r.n(s),a=r(5736);const __=a.__,i="#fff",o=n().createElement("svg",{className:"jetpack-instant-search__jetpack-colophon-logo",height:12,width:12,viewBox:"0 0 32 32"},n().createElement("path",{className:"jetpack-logo__icon-circle",fill:"#069e08",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),n().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"15,19 7,19 15,3 "}),n().createElement("polygon",{className:"jetpack-logo__icon-triangle",fill:i,points:"17,29 17,13 25,13 "}));t.Z=e=>{const t="string"==typeof e.locale?e.locale.split("-",1)[0]:null,r=t&&"en"!==t?"https://"+t+".jetpack.com/search?utm_source=poweredby":"https://jetpack.com/search?utm_source=poweredby";return n().createElement("div",{className:"jetpack-instant-search__jetpack-colophon"},n().createElement("a",{href:r,rel:"external noopener noreferrer nofollow",target:"_blank",className:"jetpack-instant-search__jetpack-colophon-link"},o,n().createElement("span",{className:"jetpack-instant-search__jetpack-colophon-text"},__("Search powered by Jetpack","jetpack-search-pkg"))))}},4741:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180);t.Z=e=>{let{type:t,children:r}=e;return"warning"!==t?null:n().createElement("div",{className:"jetpack-instant-search__notice jetpack-instant-search__notice--warning"},n().createElement(a.Z,{icon:"info",size:20}),r)}},6321:function(e,t,r){var s=r(5736),n=r(211),a=r.n(n),i=r(9755);const __=s.__;t.Z=e=>{const{children:t,closeOverlay:r,colorTheme:s,hasOverlayWidgets:o,isVisible:l}=e;return(0,n.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(e.preventDefault(),r())},t=e=>{var t;const s=document.getElementsByClassName("jetpack-instant-search__search-results")[0];null!==(t=e.target)&&void 0!==t&&t.isConnected&&s&&!s.contains(e.target)&&r()};return window.addEventListener("keydown",e),l?window.addEventListener("click",t):window.removeEventListener("click",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("click",t)}}),[r,l]),a().createElement("div",{"aria-hidden":!l,"aria-labelledby":"jetpack-instant-search__overlay-title",className:["jetpack-instant-search",i.zg,`jetpack-instant-search__overlay--${s}`,o?"":"jetpack-instant-search__overlay--no-sidebar",l?"":"is-hidden"].join(" "),role:"dialog"},a().createElement("h1",{id:"jetpack-instant-search__overlay-title",className:"screen-reader-text"},__("Search results","jetpack-search-pkg")),t)}},4809:function(e,t,r){var s=r(211),n=r.n(s);t.Z=e=>{let{className:t,onClick:r,url:s}=e;const a=function(e){const t=e.split("/").filter((e=>e.length>0));return t.shift(),t}(s);return a.length<1?null:n().createElement("div",{className:`jetpack-instant-search__path-breadcrumb ${t||""}`},n().createElement("a",{className:"jetpack-instant-search__path-breadcrumb-link",href:`//${s}`,onClick:r},a.map(((e,t,r)=>n().createElement("span",{className:"jetpack-instant-search__path-breadcrumb-piece",key:e},decodeURIComponent(e),t!==r.length-1?" › ":"")))))}},1459:function(e,t,r){var s=r(2402),n=r.n(s),a=r(211),i=r.n(a),o=r(9087);t.Z=e=>{const{alt:t,isPhotonEnabled:r,maxHeight:s=600,maxWidth:l=600,src:c,lazyLoad:p=!0,...h}=e,u=(0,a.useRef)(),[d,m]=(0,a.useState)(null),g=(0,o.y)(c,l,s,r);return(0,a.useEffect)((()=>{if(!g)return;let e=null;return p&&"IntersectionObserver"in window?(e=new window.IntersectionObserver(((e,t)=>{for(const r of e)r.isIntersecting&&(m(g),t.unobserve(r.target))})),e.observe(u.current)):m(g),()=>{var t;null===(t=e)||void 0===t||t.disconnect()}}),[p,g]),i().createElement("img",n()({alt:t,ref:u,src:d},h))}},883:function(e,t,r){r(3679);var s=r(211),n=r.n(s),a=r(1180),i=r(2601);const o=["youtube","ooyala","anvplayer","wpvideo","bc_video","video","brightcove","tp_video","jwplayer","tempo-video","vimeo"],l=["gallery","ione_media_gallery"],c=["audio","soundcloud"],p={product:"cart",video:"video",gallery:"image-multiple",event:"calendar",events:"calendar"};t.Z=e=>{let{postType:t,shortcodeTypes:r,iconSize:s=18}=e;if(Object.keys(p).includes(t))return n().createElement(a.Z,{icon:p[t],size:s});const h=(0,i.Z)(r,o),u=(0,i.Z)(r,c),d=(0,i.Z)(r,l);return h?n().createElement(a.Z,{icon:"video",size:s}):u?n().createElement(a.Z,{icon:"audio",size:s}):"page"===t?n().createElement(a.Z,{icon:"pages",size:s}):d?n().createElement(a.Z,{icon:"image-multiple",size:s}):null}},4682:function(e,t,r){var s=r(211),n=r.n(s);class a extends s.Component{render(){const{formattedPrice:e,formattedSalePrice:t,formattedRegularPrice:r,price:a,salePrice:i}=this.props;return a?n().createElement("span",{className:"jetpack-instant-search__product-price"},i>0?n().createElement(s.Fragment,null,n().createElement("s",{className:"jetpack-instant-search__product-price-regular",dangerouslySetInnerHTML:{__html:r}}),n().createElement("span",{dangerouslySetInnerHTML:{__html:t}})):n().createElement("span",{dangerouslySetInnerHTML:{__html:e}})):null}}t.Z=a},6565:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(5736),n=r(211),a=r.n(n),i=r(1180);const _n=s._n;function o(e){let{rating:t=0,count:r=0,permalink:n}=e;return a().createElement("div",{className:"jetpack-instant-search__product-rating"},a().createElement("span",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-stars"},Array(5).fill(a().createElement(i.Z,{size:16,icon:"star-outline"})).fill(a().createElement(i.Z,{size:16,icon:"star"}),0,t))," ",a().createElement("a",{"aria-hidden":!0,className:"jetpack-instant-search__product-rating-count",href:n+"#reviews"},(0,s.sprintf)( +/* Translators: the placeholder is the number of product reviews. */ +_n("%d review","%d reviews",r,"jetpack-search-pkg"),r)),a().createElement("span",{className:"screen-reader-text"},(0,s.sprintf)( +/* Translators: the first placeholder is the average product rating out of 5; the second is the number of product reviews. */ +_n("Average rating of %1$d out of 5 from %2$d review.","Average rating of %1$d out of 5 from %2$d reviews.",r,"jetpack-search-pkg"),Number(t).toFixed(2),r)))}},423:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(3259),c=r.n(l),p=r(9755);const __=o.__;class h extends a.Component{constructor(){super(...arguments),n()(this,"overlayElement",document.getElementsByClassName(p.zg)[0]),n()(this,"checkScroll",c()((()=>{this.props.enableLoadOnScroll&&window.innerHeight+this.overlayElement.scrollTop>=this.overlayElement.scrollHeight&&this.props.onLoadNextPage()}),100))}componentDidMount(){this.overlayElement.addEventListener("scroll",this.checkScroll)}componentDidUnmount(){this.overlayElement.removeEventListener("scroll",this.checkScroll)}render(){return i().createElement("button",{className:"jetpack-instant-search__scroll-button",disabled:this.props.isLoading,onClick:this.props.onLoadNextPage},this.props.isLoading?i().createElement("span",null,__("Loading…","jetpack-search-pkg")):i().createElement("span",null,__("Load more","jetpack-search-pkg")))}}t.Z=h},5652:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(3259),l=r.n(o),c=r(9309),p=r(7390),h=r.n(p),u=r(5332),d=r(1773),m=r(6321),g=r(2975),_=r(8050),f=r(9755),v=r(1547),y=r(6302),E=r(8389),k=r(1530);class w extends a.Component{constructor(){var e;super(...arguments),e=this,n()(this,"getResultFormat",(()=>{const e=(0,y.ug)();return this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==f.Bk?f.Pz:e||this.state.overlayOptions.resultFormat})),n()(this,"initializeStaticFilters",(()=>{const e=(0,v.bA)();e.length>0&&0===Object.keys(this.props.staticFilters).length&&e.forEach((e=>this.props.setStaticFilter(e.filter_id,e.selected,!0)))})),n()(this,"hideResults",(e=>{this.props.shouldIntegrateWithDom&&(0,y.Q0)(this.props.initialHref,(()=>{this.setState({isVisible:!1}),this.props.clearQueryValues()}),e)})),n()(this,"toggleResults",(e=>{this.props.shouldIntegrateWithDom&&this.state.isVisible!==e&&(e&&this.initializeStaticFilters(),this.setState({isVisible:e}))})),n()(this,"showResults",this.toggleResults.bind(this,!0)),n()(this,"onChangeQueryString",(e=>{this.getResults(),this.props.hasActiveQuery&&!this.state.isVisible&&this.showResults(),!this.props.hasActiveQuery&&e&&this.hideResults(e),null!==this.props.searchQuery&&document.querySelectorAll(this.props.themeOptions.searchInputSelector).forEach((e=>{e.value=this.props.searchQuery}))})),n()(this,"loadNextPage",(()=>{this.props.hasNextPage&&this.getResults({pageHandle:this.props.response.page_handle})})),n()(this,"getResults",(function(){let{pageHandle:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.props.makeSearchRequest({aggregations:t?{}:e.props.aggregations,excludedPostTypes:e.state.overlayOptions.excludedPostTypes,filter:e.props.filters,staticFilters:e.props.staticFilters,pageHandle:t,query:e.props.searchQuery,resultFormat:e.getResultFormat(),siteId:e.props.options.siteId,sort:e.props.sort,postsPerPage:e.props.options.postsPerPage,adminQueryFilter:e.props.options.adminQueryFilter,isInCustomizer:e.props.isInCustomizer})})),n()(this,"updateOverlayOptions",((e,t)=>{this.setState((t=>({overlayOptionsCustomizerOverride:{...t.overlayOptionsCustomizerOverride,...e}})),t)})),this.state={isVisible:!!this.props.initialIsVisible,overlayOptionsCustomizerOverride:{}},this.getResults=l()(this.getResults,200),this.props.enableAnalytics?this.initializeAnalytics():(0,_.IJ)(),this.props.shouldIntegrateWithDom?this.props.initializeQueryValues():this.props.disableQueryStringIntegration()}static getDerivedStateFromProps(e,t){return{overlayOptions:{...e.overlayOptions,...t.overlayOptionsCustomizerOverride}}}componentDidMount(){this.getResults(),this.props.hasActiveQuery&&this.showResults()}componentDidUpdate(e,t){e.searchQuery===this.props.searchQuery&&e.sort===this.props.sort&&h()(e.filters)===h()(this.props.filters)&&h()(e.staticFilters)===h()(this.props.staticFilters)||this.onChangeQueryString(this.props.isHistoryNavigation),t.overlayOptions.defaultSort!==this.state.overlayOptions.defaultSort&&this.props.setSort(this.state.overlayOptions.defaultSort),h()(t.overlayOptions.excludedPostTypes)!==h()(this.state.overlayOptions.excludedPostTypes)&&this.getResults()}initializeAnalytics(){(0,_.tU)(),(0,_.vy)(),(0,_.AM)(this.props.options.siteId)}render(){const e=this.getResultFormat(),t=this.props.shouldCreatePortal?a.createPortal:e=>e;return i().createElement(a.Fragment,null,this.props.isInCustomizer&&i().createElement(u.Z,{showResults:this.showResults,toggleResults:this.toggleResults,updateOverlayOptions:this.updateOverlayOptions}),this.props.shouldIntegrateWithDom&&i().createElement(d.Z,{initializeQueryValues:this.props.initializeQueryValues,isVisible:this.state.isVisible,overlayOptions:this.state.overlayOptions,setFilter:this.props.setFilter,setSearchQuery:this.props.setSearchQuery,showResults:this.showResults,themeOptions:this.props.themeOptions}),t(i().createElement(m.Z,{closeColor:this.state.overlayOptions.closeColor,closeOverlay:this.hideResults,colorTheme:this.state.overlayOptions.colorTheme,hasOverlayWidgets:this.props.hasOverlayWidgets,isVisible:this.state.isVisible},i().createElement(g.Z,{closeOverlay:this.hideResults,enableLoadOnScroll:this.state.overlayOptions.enableInfScroll,enableSort:this.state.overlayOptions.enableSort,filters:this.props.filters,staticFilters:this.props.staticFilters,hasError:this.props.hasError,hasNextPage:this.props.hasNextPage,highlightColor:this.state.overlayOptions.highlightColor,isLoading:this.props.isLoading,isPhotonEnabled:this.props.options.isPhotonEnabled,isPrivateSite:this.props.options.isPrivateSite,isVisible:this.state.isVisible,locale:this.props.options.locale,onChangeSearch:this.props.setSearchQuery,onChangeSort:this.props.setSort,onLoadNextPage:this.loadNextPage,overlayTrigger:this.state.overlayOptions.overlayTrigger,postTypes:this.props.options.postTypes,response:this.props.response,resultFormat:e,searchQuery:this.props.searchQuery,showPoweredBy:this.state.overlayOptions.showPoweredBy,sort:this.props.sort,widgets:this.props.options.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay,hasNonSearchWidgets:this.props.options.hasNonSearchWidgets})),document.body))}}n()(w,"defaultProps",{overlayOptions:{},widgets:[]}),t.Z=(0,c.$j)(((e,t)=>({filters:(0,k.Zj)(e),staticFilters:(0,k.Bk)(e),hasActiveQuery:(0,k.en)(e),hasError:(0,k.xT)(e),isHistoryNavigation:(0,k.wI)(e),hasNextPage:(0,k.Qy)(e),isLoading:(0,k.hg)(e),response:(0,k.ck)(e),searchQuery:(0,k.uP)(e),sort:(0,k.r$)(e,t.overlayOptions.defaultSort),widgetOutsideOverlay:(0,k.ZN)(e)})),{clearQueryValues:E.Mz,disableQueryStringIntegration:E.OZ,initializeQueryValues:E.Ln,makeSearchRequest:E.x1,setStaticFilter:E.O1,setFilter:E.Tv,setSearchQuery:E.ql,setSort:E.HD})(w)},3725:function(e,t,r){var s=r(211),n=r.n(s),a=r(5736),i=r(5348),o=r.n(i),l=r(1180);const __=a.__;let c=null;t.Z=e=>{var t;const[r]=(0,s.useState)((()=>o()("jetpack-instant-search__box-input-"))),a=(0,s.useRef)(null);return(0,s.useEffect)((()=>{var t;e.isVisible?(t=a.current,()=>{c=document.activeElement,t.focus()})():e.shouldRestoreFocus&&c&&c.focus()}),[e.isVisible,e.shouldRestoreFocus]),n().createElement(s.Fragment,null,n().createElement("div",{className:"jetpack-instant-search__box"},n().createElement("label",{className:"jetpack-instant-search__box-label",htmlFor:r},n().createElement("div",{className:"jetpack-instant-search__box-gridicon"},n().createElement(l.Z,{icon:"search",size:24})),n().createElement("input",{autoComplete:"off",id:r,className:"search-field jetpack-instant-search__box-input",inputMode:"search",onChange:e.isVisible?e.onChange:null,ref:a,placeholder:__("Search…","jetpack-search-pkg"),type:"search",value:null!==(t=e.searchQuery)&&void 0!==t?t:""}),"string"==typeof e.searchQuery&&e.searchQuery.length>0&& +/* Translators: Button is used to clear the search input query. */ +n().createElement("input",{type:"button",value:__("clear","jetpack-search-pkg"),onClick:e.onClear}),n().createElement("button",{className:"screen-reader-text assistive-text"},__("Search","jetpack-search-pkg")))))}},7704:function(e,t,r){var s=r(211),n=r.n(s),a=r(9873);t.Z=e=>n().createElement("div",{className:"jetpack-instant-search__search-form-controls",role:"form"},e.children,e.enableSort&&n().createElement(a.Z,{onChange:e.onChangeSort,resultFormat:e.resultFormat,value:e.sort}))},2547:function(e,t,r){r.d(t,{Z:function(){return d},a:function(){return u}});var s=r(8294),n=r.n(s),a=(r(3679),r(211)),i=r.n(a),o=r(4553),l=r.n(o),c=r(5348),p=r.n(c),h=r(2160);const u=e=>e.split(" ").join("T");class d extends a.Component{constructor(){super(...arguments),n()(this,"filtersList",(0,a.createRef)()),n()(this,"idPrefix",p()("jetpack-instant-search__search-filter-")),n()(this,"toggleFilter",(()=>{this.props.onChange(this.getIdentifier(),(0,h.b)(this.filtersList.current))})),n()(this,"toggleStaticFilter",(e=>{this.props.onChange(this.getIdentifier(),e.target.value)})),n()(this,"renderDate",(e=>{let{key_as_string:t,doc_count:r}=e;const{locale:s="en-US"}=this.props;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-dates-${this.getIdentifier()}-${t}`,className:"jetpack-instant-search__search-filter-list-label"},new Date(u(t)).toLocaleString(s,function(e){switch(e){case"day":return{year:"numeric",month:"long",day:"numeric"};case"month":return{year:"numeric",month:"long"};case"year":return{year:"numeric"}}return{year:"numeric",month:"long"}}(this.props.configuration.interval))," ","(",r,")"))})),n()(this,"renderPostType",(e=>{let{key:t,doc_count:r}=e;const s=t in this.props.postTypes?this.props.postTypes[t].singular_name:t;return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(t),disabled:!this.isChecked(t)&&0===r,id:`${this.idPrefix}-post-types-${t}`,name:t,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-post-types-${t}`,className:"jetpack-instant-search__search-filter-list-label"},l()(s)," (",r,")"))})),n()(this,"renderTaxonomy",(e=>{let{key:t,doc_count:r}=e;const[s,n]=t&&t.split(/\/(.+)/);return i().createElement("div",null,i().createElement("input",{checked:this.isChecked(s),disabled:!this.isChecked(s)&&0===r,id:`${this.idPrefix}-taxonomies-${s}`,name:s,onChange:this.toggleFilter,type:"checkbox",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-taxonomies-${s}`,className:"jetpack-instant-search__search-filter-list-label"},l()(n)," (",r,")"))})),n()(this,"renderGroup",(e=>i().createElement("div",null,i().createElement("input",{checked:this.isChecked(e.value),id:`${this.idPrefix}-groups-${e.value}`,name:this.props.configuration.filter_id,onChange:this.toggleStaticFilter,value:e.value,type:"radio",className:"jetpack-instant-search__search-filter-list-input"}),i().createElement("label",{htmlFor:`${this.idPrefix}-groups-${e.value}`,className:"jetpack-instant-search__search-filter-list-label"},e.name))))}getIdentifier(){return"postType"===this.props.type?"post_types":"date"===this.props.type?`${this.props.configuration.interval}_${this.props.configuration.field}`:"taxonomy"===this.props.type?this.props.configuration.taxonomy:"group"===this.props.type?this.props.configuration.filter_id:void 0}isChecked(e){return Boolean(this.props.value&&this.props.value.includes(e))}renderDates(){return[...this.props.aggregation.buckets.filter((e=>!!e)).map(this.renderDate)].reverse().slice(0,this.props.configuration.count)}renderPostTypes(){return this.props.aggregation.buckets.map(this.renderPostType)}renderTaxonomies(){return this.props.aggregation.buckets.map(this.renderTaxonomy)}renderGroups(){return this.props.configuration.values.map(this.renderGroup)}render(){return i().createElement("div",null,i().createElement("h3",{className:"jetpack-instant-search__search-filter-sub-heading"},this.props.configuration.name),i().createElement("div",{ref:this.filtersList},i().createElement("div",{className:"jetpack-instant-search__search-filter-list jetpack-instant-search__search-static-filter-list"},"group"===this.props.type&&this.renderGroups()),this.props.aggregation&&"buckets"in this.props.aggregation&&i().createElement("div",{className:"jetpack-instant-search__search-filter-list"},"date"===this.props.type&&this.renderDates(),"postType"===this.props.type&&this.renderPostTypes(),"taxonomy"===this.props.type&&this.renderTaxonomies())))}}},1631:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(9309),c=r(2547),p=r(1547),h=r(8389),u=r(8050);const __=o.__;class d extends a.Component{constructor(){super(...arguments),n()(this,"onChangeFilter",((e,t)=>{this.props.setFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onChangeStaticFilter",((e,t)=>{(0,u.GE)({filterName:e,filterValue:t}),this.props.setStaticFilter(e,t),this.props.onChange&&this.props.onChange()})),n()(this,"onClearFilters",(e=>{e.preventDefault(),"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(this.props.clearFilters(),this.props.onChange&&this.props.onChange())})),n()(this,"renderFilterComponent",(e=>{let{configuration:t,results:r}=e;return r&&i().createElement(c.Z,{aggregation:r,configuration:t,locale:this.props.locale,onChange:this.onChangeFilter,postTypes:this.props.postTypes,type:(0,p.jc)(t),value:this.props.filters[(0,p.jZ)(t)]})})),n()(this,"renderStaticFilterComponent",(e=>e.hasOwnProperty("visible")&&!e.visible?null:i().createElement(c.Z,{aggregation:[],configuration:e,locale:this.props.locale,onChange:this.onChangeStaticFilter,postTypes:this.props.postTypes,type:(0,p.jc)(e),value:this.props.staticFilters[(0,p.jZ)(e)]})))}hasActiveFilters(){return Object.keys(this.props.filters).length>0}render(){var e,t,r,s;if(!this.props.widget)return null;const n=(0,p.bA)(),a=null===(e=this.props.results)||void 0===e?void 0:e.aggregations;return i().createElement("div",{className:"jetpack-instant-search__search-filters"},this.props.showTitle&&i().createElement("h2",{className:"jetpack-instant-search__search-filters-title"},__("Filter options","jetpack-search-pkg")),this.props.showClearFiltersButton&&this.hasActiveFilters()&&i().createElement("a",{class:"jetpack-instant-search__clear-filters-link",href:"#",onClick:this.onClearFilters,onKeyDown:this.onClearFilters,role:"button",tabIndex:"0"},__("Clear filters","jetpack-search-pkg")),(null===(t=this.props.widget)||void 0===t?void 0:t.filters)&&this.props.widget.filters.length>0&&n.map(this.renderStaticFilterComponent),null===(r=this.props.widget)||void 0===r||null===(s=r.filters)||void 0===s?void 0:s.map((e=>a?{configuration:e,results:a[e.filter_id]}:null)).filter((e=>!!e)).filter((e=>{let{results:t}=e;return!!t&&Array.isArray(t.buckets)&&t.buckets.length>0})).map(this.renderFilterComponent))}}n()(d,"defaultProps",{showClearFiltersButton:!0,showTitle:!0}),t.Z=(0,l.$j)(null,{clearFilters:h.K5,setFilter:h.Tv,setStaticFilter:h.O1})(d)},9988:function(e,t,r){var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(3725);const l=e=>e.preventDefault();class c extends a.Component{constructor(){super(...arguments),n()(this,"onClear",(()=>this.props.onChangeSearch(""))),n()(this,"onChangeSearch",(e=>this.props.onChangeSearch(e.currentTarget.value)))}render(){return i().createElement("form",{autoComplete:"off",onSubmit:l,role:"search",className:this.props.className},i().createElement("div",{className:"jetpack-instant-search__search-form"},i().createElement(o.Z,{isVisible:this.props.isVisible,onChange:this.onChangeSearch,onClear:this.onClear,shouldRestoreFocus:!0,searchQuery:this.props.searchQuery})))}}t.Z=c},3162:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180);t.Z=e=>{let{comments:t,iconSize:r=18}=e;return t?n().createElement("div",{className:"jetpack-instant-search__search-result-comments"},n().createElement(a.Z,{icon:"comment",size:r}),n().createElement("span",{className:"jetpack-instant-search__search-result-comments-text",dangerouslySetInnerHTML:{__html:t.join(" ... ")}})):null}},1954:function(e,t,r){r.d(t,{Z:function(){return c}});var s=r(211),n=r.n(s),a=r(4809),i=r(1459),o=r(3162),l=r(2547);function c(e){const{isMultiSite:t,locale:r="en-US"}=e,{result_type:s,fields:c,highlight:p}=e.result;if("post"!==s)return null;const h=Array.isArray(c["image.url.raw"])?c["image.url.raw"][0]:c["image.url.raw"];return n().createElement("li",{className:["jetpack-instant-search__search-result","jetpack-instant-search__search-result-expanded",`jetpack-instant-search__search-result-expanded--${c.post_type}`,h?"":"jetpack-instant-search__search-result-expanded--no-image",t?"is-multisite":""].join(" ")},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content-container"},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__copy-container"},n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-expanded__title"},n().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-expanded__title-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick,dangerouslySetInnerHTML:{__html:p.title}})),!t&&n().createElement(a.Z,{className:"jetpack-instant-search__search-result-expanded__path",onClick:e.onClick,url:`//${c["permalink.url.raw"]}`}),n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__content",dangerouslySetInnerHTML:{__html:p.content.join(" ... ")}}),p.comments&&n().createElement(o.Z,{comments:p.comments})),n().createElement("a",{className:"jetpack-instant-search__search-result-expanded__image-link",href:`//${c["permalink.url.raw"]}`,onClick:e.onClick},n().createElement("div",{className:"jetpack-instant-search__search-result-expanded__image-container"},h?n().createElement(i.Z,{alt:c["image.alt_text"],className:"jetpack-instant-search__search-result-expanded__image",isPhotonEnabled:e.isPhotonEnabled,src:`//${h}`}):null))),t&&n().createElement("ul",{className:"jetpack-instant-search__search-result-expanded__footer"},n().createElement("li",null,n().createElement(i.Z,{alt:c.blog_name,className:"jetpack-instant-search__search-result-expanded__footer-blog-image",isPhotonEnabled:!1,height:24,width:24,src:c.blog_icon_url,lazyLoad:!1}),n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-blog"},c.blog_name)),n().createElement("li",null,n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-author"},c.author)),n().createElement("li",null,n().createElement("span",{className:"jetpack-instant-search__search-result-expanded__footer-date"},new Date((0,l.a)(c.date)).toLocaleDateString(r,{year:"numeric",month:"short",day:"numeric"})))))}},122:function(e,t,r){var s=r(211),n=r.n(s),a=r(1180),i=r(4809),o=r(883),l=r(3162);class c extends s.Component{getIconSize(){return 18}getTags(){let e=this.props.result.fields["tag.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}getCategories(){let e=this.props.result.fields["category.name.default"];return e?(Array.isArray(e)||(e=[e]),e.slice(0,5)):[]}renderNoMatchingContent(){const e=this.getTags(),t=this.getCategories(),r=0===e.length&&0===t.length;return n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content"},r&&n().createElement(i.Z,{url:this.props.result.fields["permalink.url.raw"]}),n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-cats-and-tags"},0!==e.length&&n().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-tags"},e.map((e=>n().createElement("li",{className:"jetpack-instant-search__search-result-minimal-tag"},n().createElement(a.Z,{icon:"tag",size:this.getIconSize()}),n().createElement("span",{className:"jetpack-instant-search__search-result-minimal-tag-text"},e))))),0!==t.length&&n().createElement("ul",{className:"jetpack-instant-search__search-result-minimal-cats"},t.map((e=>n().createElement("li",{className:"jetpack-instant-search__search-result-minimal-cat"},n().createElement(a.Z,{icon:"folder",size:this.getIconSize()}),n().createElement("span",{className:"jetpack-instant-search__search-result-minimal-cat-text"},e)))))))}renderMatchingContent(){return n().createElement("div",{className:"jetpack-instant-search__search-result-minimal-content",dangerouslySetInnerHTML:{__html:this.props.result.highlight.content.join(" ... ")}})}render(){const{result_type:e,fields:t,highlight:r}=this.props.result;if("post"!==e)return null;const s=!r.content||""===r.content[0];return n().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-minimal"},n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-minimal-title"},n().createElement(o.Z,{postType:t.post_type,shortcodeTypes:t.shortcode_types}),n().createElement("a",{className:"jetpack-instant-search__search-result-title-link jetpack-instant-search__search-result-minimal-title-link",href:`//${t["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:r.title}})),s?this.renderNoMatchingContent():this.renderMatchingContent(),n().createElement(l.Z,{comments:r&&r.comments}))}}t.Z=c},6504:function(e,t,r){r(3679);var s=r(211),n=r.n(s),a=r(5736),i=r(1180),o=r(1459),l=r(6565),c=r(4682);const __=a.__;class p extends s.Component{render(){var e;const{result_type:t,fields:r,highlight:s}=this.props.result;if("post"!==t)return null;const a=Array.isArray(r["image.url.raw"])?r["image.url.raw"][0]:r["image.url.raw"],p=Array.isArray(s.title)&&s.title[0].length>0?s.title[0]:__("No title","jetpack-search-pkg"),h="string"==typeof this.props.searchQuery&&""!==this.props.searchQuery.trim(),u=p.includes("<mark>"),d=h&&!u&&Array.isArray(s.content)&&(null===(e=s.content[0])||void 0===e?void 0:e.length)>0;return n().createElement("li",{className:"jetpack-instant-search__search-result jetpack-instant-search__search-result-product"},n().createElement("a",{className:"jetpack-instant-search__search-result-product-img-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick},n().createElement("div",{className:"jetpack-instant-search__search-result-product-img-container "+(a?"":"jetpack-instant-search__search-result-product-img-container--placeholder")},a?n().createElement(o.Z,{alt:r["image.alt_text"],className:"jetpack-instant-search__search-result-product-img",isPhotonEnabled:this.props.isPhotonEnabled,src:`//${a}`}):n().createElement("div",{className:"jetpack-instant-search__search-result-product-img"},n().createElement(i.Z,{icon:"block",style:{}}),n().createElement(i.Z,{icon:"image",style:{},title:__("Does not have an image","jetpack-search-pkg")})))),n().createElement("h3",{className:"jetpack-instant-search__search-result-title jetpack-instant-search__search-result-product-title"},n().createElement("a",{className:"jetpack-instant-search__search-result-title-link",href:`//${r["permalink.url.raw"]}`,onClick:this.props.onClick,dangerouslySetInnerHTML:{__html:p}})),n().createElement(c.Z,{price:r["wc.price"],salePrice:r["wc.sale_price"],formattedPrice:r["wc.formatted_price"],formattedRegularPrice:r["wc.formatted_regular_price"],formattedSalePrice:r["wc.formatted_sale_price"]}),!!r["meta._wc_average_rating.double"]&&n().createElement(l.Z,{count:r["meta._wc_review_count.long"],rating:r["meta._wc_average_rating.double"],permalink:`//${r["permalink.url.raw"]}`}),d&&n().createElement("div",{className:"jetpack-instant-search__search-result-product-match"},n().createElement("mark",null,n().createElement(i.Z,{icon:"search",style:{},title:!1}),n().createElement("span",null,"comment"in s?__("Matches comments","jetpack-search-pkg"):__("Matches content","jetpack-search-pkg",0)))))}}t.Z=p},8192:function(e,t,r){var s=r(2402),n=r.n(s),a=r(8294),i=r.n(a),o=r(211),l=r.n(o),c=r(122),p=r(1954),h=r(6504),u=r(8050),d=r(9755);class m extends o.Component{constructor(){super(...arguments),i()(this,"onClick",(()=>{this.props.railcar&&(0,u.Lo)({...this.getCommonTrainTracksProps(),action:"click"})}))}componentDidMount(){this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}componentDidUpdate(e){this.props.railcar!==e.railcar&&this.props.railcar&&(0,u.Sn)(this.getCommonTrainTracksProps())}getCommonTrainTracksProps(){return{fetch_algo:this.props.railcar.fetch_algo,fetch_position:this.props.railcar.fetch_position,fetch_query:this.props.railcar.fetch_query,railcar:this.props.railcar.railcar,rec_blog_id:this.props.railcar.rec_blog_id,rec_post_id:this.props.railcar.rec_post_id,session_id:this.props.railcar.session_id,ui_algo:"jetpack-instant-search-ui/v1",ui_position:this.props.index}}render(){if(this.props.resultFormat===d.LI)return l().createElement(h.Z,n()({onClick:this.onClick},this.props));if(this.props.resultFormat===d.Pz){const e=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==d.Bk;return l().createElement(p.Z,n()({onClick:this.onClick},this.props,{isMultiSite:e}))}return l().createElement(c.Z,n()({onClick:this.onClick},this.props))}}t.Z=m},2975:function(e,t,r){var s=r(8294),n=r.n(s),a=r(5736),i=r(211),o=r.n(i),l=r(1180),c=r(4741),p=r(423),h=r(7704),u=r(9988),d=r(8192),m=r(4524),g=r(5825),_=r(1547),f=r(9755);const __=a.__,_n=a._n;class v extends i.Component{constructor(){super(...arguments),n()(this,"state",{shouldShowMobileSecondary:!1}),n()(this,"toggleMobileSecondary",(e=>{"click"!==e.type&&("keydown"!==e.type||"Enter"!==e.key&&" "!==e.key)||(" "===e.key&&e.preventDefault(),this.setState((e=>({shouldShowMobileSecondary:!e.shouldShowMobileSecondary}))))})),n()(this,"closeOverlay",(e=>{e.preventDefault(),this.props.closeOverlay()})),n()(this,"onKeyPressHandler",(e=>{"Enter"===e.key&&(e.preventDefault(),this.props.closeOverlay())}))}hasFilterOptions(){var e,t;let r=[...this.props.widgets];return(null===(e=this.props.widgetOutsideOverlay)||void 0===e||null===(t=e.filters)||void 0===t?void 0:t.length)>0&&(r=[this.props.widgetOutsideOverlay,...r]),r.length>0}getSearchTitle(){const{total:e=0,corrected_query:t=!1}=this.props.response,r=""!==this.props.searchQuery,s=!1!==t,n=(new Intl.NumberFormat).format(e),i=this.props.staticFilters&&this.props.staticFilters.group_id&&this.props.staticFilters.group_id!==f.Bk;if(this.props.isLoading)return r?__("Searching…","jetpack-search-pkg",0):__("Loading popular results…","jetpack-search-pkg");if(0===e||this.props.hasError)return __("No results found","jetpack-search-pkg");if(r&&s)return(0,a.sprintf)( +/* translators: %1$s: number of results. %2$s: the corrected search query. */ +_n('Found %1$s result for "%2$s"','Found %1$s results for "%2$s"',e,"jetpack-search-pkg"),n,t);if(i){var o;const t=(0,_.bA)().filter((e=>"group_id"===e.filter_id)),r=1===t.length&&t[0].values?t[0].values.filter((e=>e.value!==f.Bk)):{},s=null!==(o=r[0])&&void 0!==o&&o.name?r[0].name:__("All P2","jetpack-search-pkg");return(0,a.sprintf)( +/* translators: %1$s: number of results. - %2$s: site name. */ +_n("Found %1$s result in %2$s","Found %1$s results in %2$s",e,"jetpack-search-pkg"),n,s)}return r?(0,a.sprintf)( +/* translators: %s: number of results. */ +_n("Found %s result","Found %s results",e,"jetpack-search-pkg"),n,this.props.searchQuery):__("Showing popular results","jetpack-search-pkg")}renderPrimarySection(){const{highlightColor:e,searchQuery:t}=this.props,{results:r=[],total:s=0,corrected_query:n=!1}=this.props.response,l=(0,g.B)(e),h=!1!==n,u=s>0;return o().createElement(i.Fragment,null,o().createElement("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t.jetpack-instant-search *::selection,\n\t\t\t\t\t\t\t.jetpack-instant-search .jetpack-instant-search__search-results .jetpack-instant-search__search-results-primary .jetpack-instant-search__search-result mark {\n\t\t\t\t\t\t\t\tcolor: ${l};\n\t\t\t\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),o().createElement("h2",{className:"jetpack-instant-search__search-results-title"},this.getSearchTitle()),u&&h&&o().createElement("p",{className:"jetpack-instant-search__search-results-unused-query"}, +/* translators: %s: Search query. */ +(0,a.sprintf)(__('No results for "%s"',"jetpack-search-pkg"),t)),this.props.hasError&&o().createElement(c.Z,{type:"warning"},__("It looks like you're offline. Please reconnect for results.","jetpack-search-pkg")),u&&!this.props.hasError&&this.props.response._isOffline&&o().createElement(c.Z,{type:"warning"},__("It looks like you're offline. Please reconnect to load the latest results.","jetpack-search-pkg")),u&&!this.props.hasError&&o().createElement("ol",{className:`jetpack-instant-search__search-results-list is-format-${this.props.resultFormat}`},r.map(((e,t)=>o().createElement(d.Z,{index:t,key:t,staticFilters:this.props.staticFilters,isPhotonEnabled:this.props.isPhotonEnabled,locale:this.props.locale,railcar:this.props.isVisible?e.railcar:null,result:e,resultFormat:this.props.resultFormat,searchQuery:this.props.searchQuery})))),u&&this.props.hasNextPage&&o().createElement("div",{className:"jetpack-instant-search__search-results-pagination"},o().createElement(p.Z,{enableLoadOnScroll:this.props.enableLoadOnScroll,isLoading:this.props.isLoading,onLoadNextPage:this.props.onLoadNextPage})))}renderSecondarySection(){return o().createElement(m.Z,{filters:this.props.filters,staticFilters:this.props.staticFilters,isLoading:this.props.isLoading,locale:this.props.locale,postTypes:this.props.postTypes,response:this.props.response,showPoweredBy:this.props.showPoweredBy,widgets:this.props.widgets,widgetOutsideOverlay:this.props.widgetOutsideOverlay})}render(){return o().createElement("div",{"aria-hidden":!0===this.props.isLoading,className:"jetpack-instant-search__search-results"},o().createElement("div",{className:"jetpack-instant-search__search-results-controls",role:"form"},o().createElement(u.Z,{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-results-search-form",isVisible:this.props.isVisible,onChangeSearch:this.props.onChangeSearch,searchQuery:this.props.searchQuery}),o().createElement("button",{className:"jetpack-instant-search__overlay-close",onClick:this.closeOverlay,onKeyPress:this.onKeyPressHandler,tabIndex:"0","aria-label":__("Close search results","jetpack-search-pkg")},o().createElement(l.Z,{icon:"cross",size:"24","aria-hidden":"true",focusable:"false"}))),o().createElement(h.Z,{enableSort:this.props.enableSort,onChangeSort:this.props.onChangeSort,resultFormat:this.props.resultFormat,sort:this.props.sort},(this.hasFilterOptions()||this.props.hasNonSearchWidgets)&&o().createElement("div",{role:"button",onClick:this.toggleMobileSecondary,onKeyDown:this.toggleMobileSecondary,tabIndex:"0",className:"jetpack-instant-search__search-results-filter-button"},__("Filters","jetpack-search-pkg"),o().createElement(l.Z,{icon:"chevron-down",size:16,alt:__("Show search filters","jetpack-search-pkg"),"aria-hidden":"true"}),o().createElement("span",{className:"screen-reader-text assistive-text"},this.state.shouldShowMobileSecondary?__("Hide filters","jetpack-search-pkg"):__("Show filters","jetpack-search-pkg")))),o().createElement("div",{"aria-live":"polite",className:"jetpack-instant-search__search-results-content",id:"jetpack-instant-search__search-results-content"},o().createElement("div",{className:"jetpack-instant-search__search-results-primary"},this.renderPrimarySection()),o().createElement("div",{className:["jetpack-instant-search__search-results-secondary",(this.state.shouldShowMobileSecondary?"jetpack-instant-search__search-results-secondary--show-as-modal":"")+" "].join(" ")},this.renderSecondarySection())))}}t.Z=v},9873:function(e,t,r){r.d(t,{Z:function(){return c}});var s=r(8294),n=r.n(s),a=r(211),i=r.n(a),o=r(5736),l=r(343);const __=o.__;class c extends a.Component{constructor(){super(...arguments),n()(this,"handleKeyPress",(e=>{this.props.value!==e.currentTarget.value&&"Enter"===e.key&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleClick",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.dataset.value))})),n()(this,"handleSelectChange",(e=>{this.props.value!==e.currentTarget.value&&(e.preventDefault(),this.props.onChange(e.currentTarget.value))}))}render(){const e=(0,l.n)(this.props.resultFormat);return e.size>3?i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-select"},i().createElement("label",{htmlFor:"jetpack-instant-search__search-sort-select"},__("Sort:","jetpack-search-pkg")),i().createElement("select",{id:"jetpack-instant-search__search-sort-select",onBlur:this.handleSelectChange,onChange:this.handleSelectChange},[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("option",{value:t,key:t,selected:this.props.value===t?"selected":""},r)})))):i().createElement("div",{"aria-controls":"jetpack-instant-search__search-results-content",className:"jetpack-instant-search__search-sort jetpack-instant-search__search-sort-with-links"},i().createElement("div",{className:"screen-reader-text"},__("Sort by: ","jetpack-search-pkg")),[...e.entries()].map((e=>{let[t,r]=e;return i().createElement("a",{className:"jetpack-instant-search__search-sort-option "+(this.props.value===t?"is-selected":""),"data-value":t,key:t,onClick:this.handleClick,onKeyPress:this.handleKeyPress,role:"button",tabIndex:0},r)})))}}},4524:function(e,t,r){var s=r(211),n=r.n(s),a=r(1631),i=r(5181),o=r(8852);t.Z=e=>n().createElement("div",{className:"jetpack-instant-search__sidebar"},n().createElement(a.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!0,widget:e.widgetOutsideOverlay}),n().createElement(i.Z,null),e.widgets.map((t=>(0,s.createPortal)(n().createElement("div",{id:`${t.widget_id}-portaled-wrapper`,className:"jetpack-instant-search__portaled-wrapper"},n().createElement(a.Z,{filters:e.filters,staticFilters:e.staticFilters,loading:e.isLoading,locale:e.locale,postTypes:e.postTypes,results:e.response,showClearFiltersButton:!1,showTitle:!1,widget:t})),document.getElementById(`${t.widget_id}-wrapper`)))),e.showPoweredBy&&n().createElement(o.Z,{locale:e.locale}))},5181:function(e,t,r){r.d(t,{Z:function(){return o}});var s=r(8294),n=r.n(s),a=r(211),i=r.n(a);class o extends a.Component{constructor(){super(...arguments),n()(this,"container",(0,a.createRef)())}componentDidMount(){const e=document.getElementsByClassName("jetpack-instant-search__widget-area")[0];e&&(e.style.removeProperty("display"),this.container.current.appendChild(e))}shouldComponentUpdate(){return!1}render(){return i().createElement("div",{className:"jetpack-instant-search__widget-area-container",ref:this.container})}}},564:function(e,t,r){function s(e,t,r){if(!e)return"";const s=decodeURIComponent(e);return(!t||"false"!==s)&&(!(!t||"true"!==s)||(r&&0*+s==0?+s:s))}function n(e,t,r){let n,a;const i={},o=e.split("&");for(t=void 0===t||t,r=void 0===r||r;n=o.shift();)n=n.split("="),a=n.shift(),void 0!==i[a]?i[a]=[].concat(i[a],s(n.shift(),t,r)):i[a]=s(n.shift(),t,r);return i}r.d(t,{J:function(){return n}})},1559:function(e,t,r){r.r(t),r.d(t,{initialize:function(){return u}});r(554);var s=r(762),n=r(2687),a=r(9309),i=r(5652),o=r(2160),l=r(9755),c=r(5476),p=r(4184),h=r(9379);function u(){window[l.W1]&&"siteId"in window[l.W1]&&(0,n.render)(s.ZP.createElement(a.zt,{store:h.Z},s.ZP.createElement(i.Z,{aggregations:(0,c.a5)([...window[l.W1].widgets,...window[l.W1].widgetsOutsideOverlay]),enableAnalytics:!0,hasOverlayWidgets:!!window[l.W1].hasOverlayWidgets,initialHref:window.location.href,initialIsVisible:window[l.W1].showResults,isInCustomizer:(0,p.bS)(),overlayOptions:window[l.W1].overlayOptions,options:window[l.W1],shouldCreatePortal:!0,shouldIntegrateWithDom:!0,themeOptions:(0,o.C)(window[l.W1])})),document.body)}},5476:function(e,t,r){r.d(t,{Wb:function(){return m},a5:function(){return d},yC:function(){return T}});r(3679);var s=r(8750),n=r(5731),a=r(7390),i=r.n(a),o=r(9353),l=r(1547),c=r(9755);let p;const h=(0,o.Z)(30,5*c.AG),u=(0,o.Z)(30,30*c.AG);function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};return e.forEach((e=>{let{filters:r}=e;return r.forEach((e=>{t[e.filter_id]=g(e)}))})),t}function m(e){var t;return e=null!==(t=e)&&void 0!==t?t:{},Object.fromEntries(Object.entries(e).filter((e=>{var t;let[,r]=e;return(null==r||null===(t=r.buckets)||void 0===t?void 0:t.length)>0})).map((e=>{let[t,r]=e;const s=r.buckets.map((e=>({...e,doc_count:0})));return[t,{...r,buckets:s}]})))}function g(e){switch(e.type){case"date_histogram":return{date_histogram:{field:"post_date_gmt"===e.field?"date_gmt":"date",interval:e.interval}};case"taxonomy":{let t=`taxonomy.${e.taxonomy}.slug_slash_name`;return"post_tag"===e.taxonomy?t="tag.slug_slash_name":"category"===e.taxonomy&&(t="category.slug_slash_name"),{terms:{field:t,size:e.count}}}case"post_type":return{terms:{field:e.type,size:e.count}}}}C();const _=/(\d{4})-(\d{2})-(\d{2})/;function f(e,t,r){let s,n;"year"===r&&([,s,,]=t.match(_)),"month"===r&&([,s,n]=t.match(_));let a="",i="";if(n){const e=+n+1,t=e<10?`0${e}`:`${e}`;a=`${s}-${n}-01`,i=e<=12?`${s}-${t}-01`:+s+1+"-01-01"}else s&&(a=`${s}-01-01`,i=+s+1+"-01-01");return{range:{[e]:{gte:a,lt:i}}}}const v=new Map([["post_types",e=>({term:{post_type:e}})],["category",e=>({term:{"category.slug":e}})],["post_tag",e=>({term:{"tag.slug":e}})],["month_post_date",e=>f("date",e,"month")],["month_post_date_gmt",e=>f("date_gmt",e,"month")],["month_post_modified",e=>f("date",e,"month")],["month_post_modified_gmt",e=>f("date_gmt",e,"month")],["year_post_date",e=>f("date",e,"year")],["year_post_date_gmt",e=>f("date_gmt",e,"year")],["year_post_modified",e=>f("date",e,"year")],["year_post_modified_gmt",e=>f("date_gmt",e,"year")]]);function y(e){const t={};return Object.keys(e).forEach((r=>{const s=e[r];"group_id"===r&&s!==c.Bk&&(t[r]=s)})),t}function E(e,t,r){const s={bool:{must:[]}};return(0,l.wP)().filter((t=>{return r=e[t],Array.isArray(r)&&r.length>0;var r})).forEach((t=>{e[t].forEach((e=>{v.has(t)?s.bool.must.push(v.get(t)(e)):s.bool.must.push({term:{[`taxonomy.${t}.slug`]:e}})}))})),t&&s.bool.must.push(t),(null==r?void 0:r.length)>0&&s.bool.must.push({bool:{must_not:r.map((e=>v.get("post_types")(e)))}}),s}const k=new Map([["oldest","date_asc"],["newest","date_desc"],["relevance","score_default"]]);function w(e){return["price_asc","price_desc","rating_desc"].includes(e)?e:k.get(e,"score_default")}function S(e){let{aggregations:t,excludedPostTypes:r,filter:a,staticFilters:i,pageHandle:o,query:l,resultFormat:p,sort:h,postsPerPage:u=10,adminQueryFilter:d,isInCustomizer:m=!1}=e;null===l&&(l="");let g=["date","permalink.url.raw","tag.name.default","category.name.default","post_type","shortcode_types"];(p!==c.TZ||m)&&(g=g.concat(["has.image","image.url.raw","image.alt_text"])),(p===c.LI||m)&&(g=g.concat(["meta._wc_average_rating.double","meta._wc_review_count.long","wc.formatted_price","wc.formatted_regular_price","wc.formatted_sale_price","wc.price","wc.sale_price"])),i&&i.group_id&&i.group_id!==c.Bk&&(g=g.concat(["author","blog_name","blog_icon_url"]));let _={aggregations:t,fields:g,highlight_fields:["title","content","comments"],filter:E(a,d,r),query:encodeURIComponent(l),sort:w(h),page_handle:o,size:u};return i&&Object.keys(i).length>0&&(_={..._,...y(i)}),(0,s.c)((0,n.x)(_))}function b(e){return function(t){const r=h.get(e)||u.get(e);if("AbortError"===t.name)return r?{_isCached:!0,_isError:!1,_isOffline:!1,...r}:null;if(r)return{_isCached:!0,_isError:!0,_isOffline:!1,...r};throw t}}function j(e,t){return function(r){const s={...r,requestId:t};return h.set(e,s),u.set(e,s),s}}function C(){p&&p.abort(),p=new AbortController}function T(e,t){const r=i()(Array.from(arguments));if(!navigator.onLine&&u.get(r))return Promise.resolve(u.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!0,...e})));if(h.get(r))return Promise.resolve(h.get(r)).then((e=>({_isCached:!0,_isError:!1,_isOffline:!1,...e})));const s=S(e),n=b(r),a=j(r,t),o=`/sites/${e.siteId}/search?${s}`,{apiNonce:l,apiRoot:d,homeUrl:m,isPrivateSite:g,isWpcom:_}=window[c.W1],f=`https://public-api.wordpress.com/rest/v1.3${o}`,v=`${m}/wp-json/wpcom-origin/v1.3${o}`,y=`${d}jetpack/v4/search?${s}`;let E=f;return g&&_?E=v:g&&(E=y),C(),fetch(E,{headers:g?{"X-WP-Nonce":l}:{},credentials:g?"include":"same-origin",signal:p.signal}).then((e=>200!==e.status?Promise.reject(`Unexpected response from API with status code ${e.status}.`):e)).then((e=>e.json())).then(a).catch(n)}},2601:function(e,t,r){r.d(t,{Z:function(){return s}});r(3679);function s(e,t){Array.isArray(e)||(e=[e]);return 0!==e.filter((e=>t.includes(e))).length}},5825:function(e,t,r){function s(e){const t=function(e){let t;return"#"===e[0]&&(t=e.substring(1)),3===t.length&&(t=t.split("").map((e=>`${e}${e}`)).join("")),t}(e);return(299*parseInt(t.substr(0,2),16)+587*parseInt(t.substr(2,2),16)+114*parseInt(t.substr(4,2),16))/1e3>=128?"black":"white"}r.d(t,{B:function(){return s}})},2160:function(e,t,r){function s(e){return[...e.querySelectorAll('input[type="checkbox"]').values()].filter((e=>e.checked)).map((e=>e.name))}function n(e){const t={searchInputSelector:['input[name="s"]:not(.jetpack-instant-search__box-input)',"#searchform input.search-field:not(.jetpack-instant-search__box-input)",".search-form input.search-field:not(.jetpack-instant-search__box-input)",".searchform input.search-field:not(.jetpack-instant-search__box-input)"].join(", "),filterInputSelector:["a.jetpack-search-filter__link"],overlayTriggerSelector:[".jetpack-instant-search__open-overlay-button","header#site-header .search-toggle[data-toggle-target]"].join(",")};return e.theme_options?{...t,...e.theme_options}:t}r.d(t,{C:function(){return n},b:function(){return s}})},3499:function(e,t){const r=()=>{};t.Z=()=>r},1547:function(e,t,r){r.d(t,{$s:function(){return u},bA:function(){return i},do:function(){return c},i3:function(){return o},jZ:function(){return h},jc:function(){return d},wP:function(){return a}});r(3679);var s=r(9755);const n=Object.freeze(["post_types","category","post_format","post_tag","month_post_date","month_post_date_gmt","month_post_modified","month_post_modified_gmt","year_post_date","year_post_date_gmt","year_post_modified","year_post_modified_gmt"]);function a(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=window[s.W1])||void 0===t?void 0:t.widgetsOutsideOverlay;const i=new Set(n);return[...null!=r?r:[],...null!=a?a:[]].map((e=>e.filters)).filter((e=>Array.isArray(e))).reduce(((e,t)=>e.concat(t)),[]).filter((e=>"taxonomy"===e.type)).forEach((e=>i.add(e.taxonomy))),[...i]}function i(){var e;return null!==(e=window[s.W1])&&void 0!==e&&e.staticFilters?window[s.W1].staticFilters:[]}function o(){const e=i(),t=new Set;return e.forEach((e=>t.add(e.filter_id))),[...t]}function l(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets;return null!==(t=null==r?void 0:r.map(p).reduce(((e,t)=>e.concat(t)),[]))&&void 0!==t?t:[]}function c(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(e=window[s.W1])||void 0===e?void 0:e.widgets;const r=l(t);return a().filter((e=>!r.includes(e)))}function p(e){return e.filters.map(h).filter((e=>"string"==typeof e))}function h(e){return"date_histogram"===e.type?`${e.interval}_${e.field}`:"taxonomy"===e.type?`${e.taxonomy}`:"post_type"===e.type?"post_types":"group"===e.type?e.filter_id:null}function u(e){return e.includes("month")?{field:e.split("month_").pop(),type:"date_histogram",interval:"month"}:e.includes("year")?{field:e.split("year_").pop(),type:"date_histogram",interval:"year"}:"post_types"===e?{type:"post_type"}:"group"===e?{type:"group"}:{type:"taxonomy",taxonomy:e}}function d(e){return"date_histogram"===e.type?"date":"taxonomy"===e.type?"taxonomy":"post_type"===e.type?"postType":"group"===e.type?"group":void 0}},9087:function(e,t,r){r.d(t,{y:function(){return i}});r(3679);var s=r(9424),n=r(211);function a(e){return e?e.split("?",1)[0]:""}function i(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const[o,l]=(0,n.useState)(null),c=a(e),p=["gif","jpg","jpeg","png","webp"],h=null==c?void 0:c.substring(c.lastIndexOf(".")+1).toLowerCase(),u=p.includes(h);return(0,n.useEffect)((()=>{if(i&&u){const n=(0,s.Z)(c,{resize:`${t},${r}`});l(n||e)}else l(e)}),[e,t,r,i,c,u]),o}},6302:function(e,t,r){r.d(t,{Q0:function(){return p},_L:function(){return l},pm:function(){return o},ug:function(){return c}});r(3679);var s=r(8750),n=r(9755),a=r(1547),i=r(564);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;return(0,i.J)(e.substring(1),!1,!1)}function l(e){!function(e){if(history.pushState){const t=new window.URL(window.location.href);window[n.W1]&&"homeUrl"in window[n.W1]&&(t.href=window[n.W1].homeUrl),t.search=e,window.history.pushState(null,null,t.toString())}}((0,s.c)(e))}function c(){const e=o();return n.bk.includes(e.result_format)?e.result_format:null}function p(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(history.pushState&&history.replaceState){const n=new URL(e),i=o(n.search),l=[...(0,a.wP)(),...(0,a.i3)(),"s","sort"],c=Object.keys(i).some((e=>l.includes(e)));if(c&&l.forEach((e=>delete i[e])),n.search=(0,s.c)(i),r?window.history.replaceState(null,null,n.toString()):window.history.pushState(null,null,n.toString()),c)return void window.location.reload();t()}}},343:function(e,t,r){r.d(t,{n:function(){return n}});var s=r(9755);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e!==s.LI?s.aP:new Map([...s.aP,...s.rs])}},8050:function(e,t,r){r.d(t,{AM:function(){return l},GE:function(){return u},IJ:function(){return a},Lo:function(){return h},Sn:function(){return p},tU:function(){return i},vy:function(){return o}});let s=!0;const n={};function a(){s=!1}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&(window._tkq=window._tkq||[])}function o(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||s)&&window._tkq.push(["clearIdentity"])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t||s)&&(n.blog_id=e)}function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(r||s)&&window._tkq.push(["recordEvent",e,{...n,...t}])}function p(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_render",e,t)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_traintracks_interact",e,t)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c("jetpack_instant_search_static_filter_select",e,t)}},8389:function(e,t,r){function s(e){return{type:"MAKE_SEARCH_REQUEST",options:e}}function n(e){let{options:t,response:r}=e;return{type:"RECORD_SUCCESSFUL_SEARCH_REQUEST",options:t,response:r}}function a(e){return{type:"RECORD_FAILED_SEARCH_REQUEST",error:e}}function i(){let{isHistoryNavigation:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INITIALIZE_QUERY_VALUES",isHistoryNavigation:e}}function o(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SEARCH_QUERY",query:e,propagateToWindow:t}}function l(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"SET_SORT",sort:e,propagateToWindow:t}}function c(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_FILTER",name:e,value:t,propagateToWindow:r}}function p(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"SET_STATIC_FILTER",name:e,value:t,propagateToWindow:r}}function h(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"CLEAR_FILTERS",propagateToWindow:e}}function u(){return{type:"CLEAR_QUERY_VALUES"}}function d(){return{type:"DISABLE_QUERY_STRING_INTEGRATION"}}r.d(t,{C0:function(){return n},HD:function(){return l},K5:function(){return h},Ln:function(){return i},Mz:function(){return u},O1:function(){return p},OZ:function(){return d},Tv:function(){return c},Y6:function(){return a},ql:function(){return o},x1:function(){return s}})},4587:function(e,t,r){r(3679);var s=r(3259),n=r.n(s),a=r(5476),i=r(9755),o=r(1547),l=r(6302),c=r(8389);let p=0,h=!0;const u=n()(l._L,i.yb);t.Z={CLEAR_FILTERS:function(e){if(!1===e.propagateToWindow||!h)return;const t=(0,l.pm)();(0,o.wP)().forEach((e=>delete t[e])),(0,o.i3)().forEach((e=>delete t[e])),(0,l._L)(t)},DISABLE_QUERY_STRING_INTEGRATION:function(){h=!1},INITIALIZE_QUERY_VALUES:function(e,t){const r=(0,l.pm)();let s;"s"in r?t.dispatch((0,c.ql)(r.s,!1)):t.dispatch((0,c.ql)(null,!1)),i.kQ.includes(r.sort)?s=r.sort:"date"===r.orderby?s="string"==typeof r.order&&r.order.toUpperCase()===i.oy?"oldest":"newest":"relevance"===r.orderby&&(s="relevance"),"string"==typeof s&&t.dispatch((0,c.HD)(s,!1)),t.dispatch((0,c.K5)(!1)),(0,o.wP)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.Tv)(e,r[e],!1)))),(0,o.i3)().filter((e=>e in r)).forEach((e=>t.dispatch((0,c.O1)(e,r[e],!1))))},MAKE_SEARCH_REQUEST:function(e,t){p++,(0,a.yC)(e.options,p).then((r=>{null!==r&&t.dispatch((0,c.C0)({options:e.options,response:r}))})).catch((e=>{console.error("Jetpack Search encountered an error:",e),t.dispatch((0,c.Y6)(e))}))},SET_FILTER:function(e){if(!1===e.propagateToWindow||!h)return;if(!(0,o.wP)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_STATIC_FILTER:function(e){if(!1===e.propagateToWindow)return;if(!(0,o.i3)().includes(e.name))return;const t=(0,l.pm)();t[e.name]=e.value,(0,l._L)(t)},SET_SEARCH_QUERY:function(e){if(!1===e.propagateToWindow||!h)return;const t=(0,l.pm)();null!==e.query?t.s=e.query:delete t.s,u(t)},SET_SORT:function(e){if(!1===e.propagateToWindow||!h)return;if(!i.kQ.includes(e.sort))return;const t=(0,l.pm)();t.sort=e.sort,delete t.order,delete t.orderby,(0,l._L)(t)}}},9379:function(e,t,r){var s=r(835),n=r(4274),a=r.n(n),i=r(4587),o=r(4408);const l=[a()(i.Z)],c=(0,s.MT)(o.ZP,{},(0,s.md)(...l));t.Z=c},9267:function(e,t,r){r.d(t,{hg:function(){return i},p:function(){return o},xT:function(){return a}});var s=r(5476);let n={};function a(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":case"RECORD_SUCCESSFUL_SEARCH_REQUEST":return!1;case"RECORD_FAILED_SEARCH_REQUEST":return!0}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MAKE_SEARCH_REQUEST":return!0;case"RECORD_SUCCESSFUL_SEARCH_REQUEST":case"RECORD_FAILED_SEARCH_REQUEST":return!1}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECORD_SUCCESSFUL_SEARCH_REQUEST"===t.type){if("requestId"in e&&"requestId"in t.response&&e.requestId>t.response.requestId)return e;const a={...t.response};var r;if(t.options.pageHandle&&(a.aggregations={..."aggregations"in e&&!Array.isArray(e)?e.aggregations:{},...Array.isArray(a.aggregations)?{}:a.aggregations},a.results=[..."results"in e?e.results:[],...a.results],n={}),Array.isArray(a.results)&&a.results.length>a.total&&(a.total=a.results.length),!t.options.pageHandle)(null===(r=a.results)||void 0===r?void 0:r.length)>0?n=(0,s.Wb)(a.aggregations):a.aggregations=n;return a}return e}},9049:function(e,t,r){function s(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INITIALIZE_QUERY_VALUES":return t.isHistoryNavigation;case"SET_SEARCH_QUERY":case"SET_SORT":case"CLEAR_FILTERS":case"SET_FILTER":return!t.propagateToWindow&&e}return e}r.d(t,{w:function(){return s}})},4408:function(e,t,r){var s=r(835),n=r(9267),a=r(4754),i=r(5188),o=r(9049);t.ZP=(0,s.UY)({filters:a.u8,staticFilters:a.OY,hasError:n.xT,isLoading:n.hg,isHistoryNavigation:o.w,response:n.p,searchQuery:a.w4,serverOptions:i.M,sort:a.DY})},4754:function(e,t,r){r.d(t,{DY:function(){return i},OY:function(){return l},u8:function(){return o},w4:function(){return a}});r(3679);var s=r(9755),n=r(1547);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SEARCH_QUERY":return t.query;case"CLEAR_QUERY_VALUES":return null}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SORT":return s.kQ.includes(t.sort)?t.sort:e;case"CLEAR_QUERY_VALUES":return null}return e}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_FILTERS":case"CLEAR_QUERY_VALUES":return{};case"SET_FILTER":if(!(0,n.wP)().includes(t.name)||!Array.isArray(t.value)&&"string"!=typeof t.value)return e;if(0===t.value.length){const r={...e};return delete r[t.name],r}return{...e,[t.name]:"string"==typeof t.value?[t.value]:t.value}}return e}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_QUERY_VALUES":return{};case"SET_STATIC_FILTER":return(0,n.i3)().includes(t.name)?{...e,[t.name]:t.value}:e}return e}},5188:function(e,t,r){r.d(t,{M:function(){return n}});var s=r(9755);function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(e=window[s.W1])&&void 0!==e?e:{};return t}},1530:function(e,t,r){r.d(t,{Bk:function(){return u},Qy:function(){return o},ZN:function(){return m},Zj:function(){return h},ck:function(){return a},en:function(){return d},hg:function(){return l},r$:function(){return p},uP:function(){return c},wI:function(){return g},xT:function(){return i}});r(3679);var s=r(9755),n=r(1547);function a(e){return e.response}function i(e){return e.hasError}function o(e){var t;return!i(e)&&(null===(t=a(e))||void 0===t?void 0:t.page_handle)}function l(e){return e.isLoading}function c(e){return e.searchQuery}function p(e,t){return"string"!=typeof t&&(t=s.PP),"string"==typeof e.sort?e.sort:t}function h(e){return e.filters}function u(e){return e.staticFilters}function d(e){return null!==c(e)||function(e){return Object.keys(e.filters).length>0}(e)||function(e){return Object.keys(e.staticFilters).length>0}(e)||null!==e.sort}function m(e){if(!e.serverOptions.widgets||!e.filters)return{};const t=(0,n.do)(e.serverOptions.widgets);return{filters:Object.keys(e.filters).filter((e=>t.includes(e))).map(n.$s)}}function g(e){return e.isHistoryNavigation}}}]);
\ No newline at end of file |