!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},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=24)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),s=n.n(r),o=n(2);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}
/**
 * Builds new meta for use when saving post data.
 *
 * @since   3.1.3
 * @package Genesis\JS
 * @author  StudioPress
 * @license GPL-2.0-or-later
 */
function c(e,t){var n=Object(o.select)("core/editor").getEditedPostAttribute("meta");return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Object.keys(n).filter((function(e){return e.startsWith("_genesis")})).reduce((function(e,t){return e[t]=n[t],null===e[t]&&(e[t]=!1),e}),{}),s()({},e,t))}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(15);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(16),s=n(10);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?s(e):t}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.lodash}()},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(0),s=n(1),o=n(5),i=n(2),c=n(3),a=n(6),u=n(4),b=n.n(u),p=n(11),l=n.n(p),f=n(12),d=n.n(f),m=n(10),g=n.n(m),h=n(13),O=n.n(h),y=n(14),j=n.n(y),_=n(9),P=n.n(_),v=n(17),S=n(8),w=n.n(S),x=n(18);
/**
 * Provides a GenesisBreadcrumbsToggleInfo component that displays the state
 * of the global “breadcrumbs” Customzier checkbox for the current page type.
 *
 * Offers a link to either disable or enable breadcrumbs site-wide for
 * the current page type. The goal is to reduce the need to leave the editor
 * and visit the Customizer to turn breadcrumbs on or off.
 *
 * @since   3.1.0
 * @package Genesis\JS
 * @author  StudioPress
 * @license GPL-2.0-or-later
 */
var E=function(e){O()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=P()(e);if(t()){var s=P()(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return j()(this,n)}}(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).updateBreadcrumbsSetting=r.updateBreadcrumbsSetting.bind(g()(r)),r.state={typesWithBreadcrumbsEnabled:[],isStaticHomepage:!1,isPostsPage:!1,currentUserCanEditThemeOptions:!1,updating:!1},r}return d()(n,[{key:"componentDidMount",value:function(){var e=this;w()({path:"/genesis/v1/breadcrumbs"}).then((function(t){e.setState({typesWithBreadcrumbsEnabled:t})})),w()({path:"/wp/v2/users/me?context=edit"}).then((function(t){t.capabilities.edit_theme_options&&e.setState({currentUserCanEditThemeOptions:t.capabilities.edit_theme_options})})),w()({path:"/genesis/v1/reading-settings"}).then((function(t){"page"===t.show_on_front&&t.page_on_front===e.props.currentPostID&&e.setState({isStaticHomepage:!0}),"posts"===t.show_on_front&&t.page_for_posts===e.props.currentPostID&&e.setState({isPostsPage:!0})}))}},{key:"getPageLabel",value:function(){return this.state.isStaticHomepage?Object(s.__)("the Homepage","genesis"):this.state.isPostsPage?Object(s.__)("the Posts Page","genesis"):this.props.currentPostTypeLabel}},{key:"breadcrumbStatusTextIsNotSupported",value:function(){return!(this.state.currentUserCanEditThemeOptions||this.state.isStaticHomepage||this.state.isPostsPage||["post","page"].includes(this.props.currentPostType))}},{key:"postTypeHasBreadcrumbsDisabled",value:function(){return this.state.isStaticHomepage?!this.state.typesWithBreadcrumbsEnabled.includes("breadcrumb_front_page"):this.state.isPostsPage?!this.state.typesWithBreadcrumbsEnabled.includes("breadcrumb_posts_page"):"post"===this.props.currentPostType?!this.state.typesWithBreadcrumbsEnabled.includes("breadcrumb_single"):"page"===this.props.currentPostType?!this.state.typesWithBreadcrumbsEnabled.includes("breadcrumb_page"):""}},{key:"breadcrumbsValueToUpdate",value:function(){return this.state.isStaticHomepage?"breadcrumb_front_page":this.state.isPostsPage?"breadcrumb_posts_page":"post"===this.props.currentPostType?"breadcrumb_single":"page"===this.props.currentPostType?"breadcrumb_page":""}},{key:"updateBreadcrumbsSetting",value:function(e){var t=this;this.setState({updating:!0});var n=this.breadcrumbsValueToUpdate(),r={path:"/genesis/v1/breadcrumbs",method:"PUT",data:b()({},n,e)};return w()(r).then((function(e){t.setState({updating:!1,typesWithBreadcrumbsEnabled:e});var n=t.getPageLabel(),r=Object(s.sprintf)(Object(s.__)("Breadcrumbs now enabled on %s.","genesis"),n);t.postTypeHasBreadcrumbsDisabled()&&(r=Object(s.sprintf)(Object(s.__)("Breadcrumbs now disabled on %s.","genesis"),n)),Object(v.speak)(r,"assertive")})),!1}},{key:"render",value:function(){var e=this;if(this.breadcrumbStatusTextIsNotSupported())return"";var t=this.getPageLabel();if(this.state.updating){var n=Object(s.sprintf)(Object(s.__)("Disabling breadcrumbs on %s...","genesis"),t);return this.postTypeHasBreadcrumbsDisabled()&&(n=Object(s.sprintf)(Object(s.__)("Enabling breadcrumbs on %s...","genesis"),t)),Object(r.createElement)("p",null,Object(r.createElement)("span",null,n),Object(r.createElement)(c.Spinner,null))}var o="genesis-sidebar-label-enabled",i=Object(s.sprintf)(Object(s.__)("Breadcrumbs are enabled on %s. ","genesis"),t),a=Object(s.sprintf)(Object(s.__)("Disable breadcrumbs on %s?"),t),u=Object(s.__)("Disable breadcrumbs.","genesis"),b=0;return this.postTypeHasBreadcrumbsDisabled()&&(o="genesis-sidebar-label-disabled",i=Object(s.sprintf)(Object(s.__)("Breadcrumbs are disabled on %s.","genesis"),t),a=Object(s.sprintf)(Object(s.__)("Enable breadcrumbs on %s"),t),u=Object(s.__)("Enable breadcrumbs.","genesis"),b=1),Object(r.createElement)("p",{className:o},i+" ",Object(r.createElement)("button",{className:"genesis-sidebar-text-button",onClick:function(){return e.updateBreadcrumbsSetting(b)},"aria-label":a},u))}}]),n}(r.Component),T=Object(o.compose)([Object(i.withSelect)((function(){var e=Object(i.select)("core/editor").getCurrentPostType(),t=Object(i.select)("core").getPostType(e);return{currentPostType:e,currentPostTypeLabel:Object(x.get)(t,"name",Object(s.__)("Entries","genesis")),currentPostID:Object(i.select)("core/editor").getCurrentPostId()}}))])(E),B=n(7);var D=Object(o.compose)([Object(i.withSelect)((function(){return{hideBreadcrumbs:Object(i.select)("core/editor").getEditedPostAttribute("meta")._genesis_hide_breadcrumbs}})),Object(i.withDispatch)((function(e){return{onUpdate:function(t){e("core/editor").editPost({meta:Object(B.a)("_genesis_hide_breadcrumbs",!!t)})}}}))])((
/**
 * Adds a “hide breadcrumbs” checkbox to Genesis Block Editor sidebar in a
 * Breadcrumbs panel. Unchecked by default.
 *
 * If checked and the post is updated or published, `_genesis_hide_breadcrumbs`
 * is set to true in post meta.
 *
 * To disable the checkbox, use the PHP `genesis_breadcrumbs_toggle_enabled`
 * filter: `add_filter( 'genesis_breadcrumbs_toggle_enabled', '__return_false' );`.
 *
 * @since   3.1.0
 * @package Genesis\JS
 * @author  StudioPress
 * @license GPL-2.0-or-later
 */
function(e){var t=e.hideBreadcrumbs,n=void 0!==t&&t,o=e.onUpdate;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(c.Fill,{name:"GenesisSidebar"},Object(r.createElement)(c.PanelBody,{initialOpen:!0,title:Object(s.__)("Breadcrumbs","genesis")},Object(r.createElement)(c.PanelRow,null,Object(r.createElement)(c.CheckboxControl,{label:Object(s.__)("Hide Breadcrumbs","genesis"),checked:!!n,onChange:function(){return o(!n)}})),Object(r.createElement)(c.PanelRow,null,Object(r.createElement)(T,null)))))}));Object(a.registerPlugin)("genesis-breadcrumbs-toggle",{render:D})}]);