/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./src/editor.js": /*!***********************!*\ !*** ./src/editor.js ***! \***********************/ /***/ (() => { eval("{function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n(function () {\n var _wp = wp,\n plugins = _wp.plugins,\n editPost = _wp.editPost,\n compose = _wp.compose,\n data = _wp.data,\n i18n = _wp.i18n,\n components = _wp.components,\n blockEditor = _wp.blockEditor,\n hooks = _wp.hooks;\n var _React = React,\n createElement = _React.createElement,\n Fragment = _React.Fragment,\n useState = _React.useState;\n var PanelBody = components.PanelBody,\n PanelRow = components.PanelRow,\n ToggleControl = components.ToggleControl,\n Button = components.Button,\n Panel = components.Panel;\n var PluginSidebar = editPost.PluginSidebar,\n PluginSidebarMoreMenuItem = editPost.PluginSidebarMoreMenuItem;\n var InspectorControls = blockEditor.InspectorControls;\n var withSelect = data.withSelect,\n withDispatch = data.withDispatch;\n var __ = i18n.__;\n var pluginIcon = createElement(\"svg\", {\n className: \"ariafse-page-settings-button\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\"\n }, createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.2,0.4H5.8c-2.9,0-5.3,2.4-5.3,5.4v10.5c0,3,2.4,5.4,5.3,5.4h10.5c3,0,5.3-2.4,5.3-5.4V5.8 C21.6,2.8,19.2,0.4,16.2,0.4z M11,17.2c-3.4,0-6.2-2.8-6.2-6.2c0-1.1,0.3-2.2,0.9-3.2l1.7,1.7C7.3,10,7.2,10.5,7.2,11 c0,2.1,1.7,3.8,3.8,3.8c0.5,0,1-0.1,1.4-0.3l1.7,1.7C13.2,16.9,12.1,17.2,11,17.2z M9.2,11c0-1,0.8-1.8,1.8-1.8c1,0,1.8,0.8,1.8,1.8 S12,12.8,11,12.8C10,12.8,9.2,12,9.2,11z M17.2,16.8l-3.3-3.3c0.6-0.7,1-1.6,1-2.5c0-2.1-1.7-3.8-3.8-3.8c-0.9,0-1.8,0.3-2.5,1 L6.8,6.5C8,5.4,9.4,4.8,11,4.8c3.4,0,6.2,2.8,6.2,6.2V16.8z\"\n }));\n var HeaderToggleControls = function HeaderToggleControls(props) {\n var _props$meta, _props$meta2;\n var isSticky = !!(props !== null && props !== void 0 && (_props$meta = props.meta) !== null && _props$meta !== void 0 && _props$meta._ariafse_meta_sticky_header);\n var isTransparent = !!(props !== null && props !== void 0 && (_props$meta2 = props.meta) !== null && _props$meta2 !== void 0 && _props$meta2._ariafse_meta_transparent_header);\n return createElement(Fragment, null, !isTransparent && createElement(PanelRow, null, createElement(ToggleControl, {\n label: __(\"Enable Sticky Header\", \"aria-fse\"),\n checked: isSticky,\n onChange: function onChange(value) {\n return props.setMetaFieldValue(value, \"_ariafse_meta_sticky_header\");\n }\n })), !isSticky && createElement(PanelRow, null, createElement(ToggleControl, {\n label: __(\"Enable Transparent Header\", \"aria-fse\"),\n checked: isTransparent,\n onChange: function onChange(value) {\n return props.setMetaFieldValue(value, \"_ariafse_meta_transparent_header\");\n }\n })));\n };\n var DisableSectionPanel = function DisableSectionPanel(props) {\n var _props$meta3;\n var sections = Object.entries(ariaFse.disable_sections).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n config = _ref2[1];\n var checked = !!(props !== null && props !== void 0 && props.meta[config.key]);\n return createElement(PanelRow, {\n key: key\n }, createElement(ToggleControl, {\n label: config.label,\n checked: checked,\n onChange: function onChange(value) {\n return props.setMetaFieldValue(value, config.key);\n }\n }));\n });\n return createElement(Fragment, null, createElement(PanelBody, {\n title: __(\"Disable Elements\", \"aria-fse\"),\n initialOpen: true\n }, sections), !(props !== null && props !== void 0 && (_props$meta3 = props.meta) !== null && _props$meta3 !== void 0 && _props$meta3._ariafse_meta_header_display) && createElement(PanelBody, {\n title: __(\"Header Settings\", \"aria-fse\"),\n initialOpen: true\n }, createElement(HeaderToggleControls, props)));\n };\n var SidebarComponent = compose.compose(withSelect(function (select) {\n var meta = select(\"core/editor\").getEditedPostAttribute(\"meta\");\n return {\n meta: meta\n };\n }), withDispatch(function (dispatch) {\n return {\n setMetaFieldValue: function setMetaFieldValue(value, key) {\n dispatch(\"core/editor\").editPost({\n meta: _defineProperty({}, key, value)\n });\n }\n };\n }))(function (props) {\n return createElement(Fragment, null, createElement(PluginSidebarMoreMenuItem, {\n target: \"ariafse-page-settings-panel\",\n icon: pluginIcon\n }, __(\"Aria Page Settings\", \"aria-fse\")), createElement(PluginSidebar, {\n name: \"ariafse-page-settings-panel\",\n title: __(\"Aria Page Settings\", \"aria-fse\"),\n icon: pluginIcon\n }, createElement(DisableSectionPanel, props)));\n });\n plugins.registerPlugin(\"ariafse-page-settings\", {\n render: SidebarComponent\n });\n})();\n\n//# sourceURL=webpack://aria-fse/./src/editor.js?\n}"); /***/ }) /******/ }); /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module can't be inlined because the eval devtool is used. /******/ var __webpack_exports__ = {}; /******/ __webpack_modules__["./src/editor.js"](); /******/ /******/ })() ;