Your IP : 18.116.81.110


Current Path : /home/church/www/wp-content/themes/neve/inc/admin/metabox/build/
Upload File :
Current File : /home/church/www/wp-content/themes/neve/inc/admin/metabox/build/index.js

!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){e.exports=n(6)()},function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,r,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t){e.exports=React},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";const o=(e,t,n)=>{const o=n<0?e.length+n:n,r=e.splice(t,1)[0];e.splice(o,0,r)},r=(e,t,n)=>(e=e.slice(),o(e,t,n),e);e.exports=r,e.exports.default=r,e.exports.mutate=o},function(e,t,n){n(9),e.exports=n(8)},function(e,t,n){"use strict";var o=n(7);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw a}}return n}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){l(e,t,n[t])}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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&&g(e,t)}n.r(t);var y=n(2),w=n(0),b=n.n(w),A=n(3),x=n(1),_=n.n(x);function S(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var E=function(){function e(){c(this,e),l(this,"refs",{})}return d(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(O)}}]),e}();function O(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function C(e,t){return Object.keys(e).reduce((function(n,o){return-1===t.indexOf(o)&&(n[o]=e[o]),n}),{})}var k={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},T=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function R(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function j(e,t){e.style["".concat(T,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function I(e,t){e.style["".concat(T,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function M(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function B(e,t,n){return Math.max(e,Math.min(n,t))}function P(e){return"px"===e.substr(-2)?parseFloat(e):0}function N(e){var t=window.getComputedStyle(e);return{bottom:P(t.marginBottom),left:P(t.marginLeft),right:P(t.marginRight),top:P(t.marginTop)}}function G(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function D(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function U(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function Y(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var o={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?o:K(e.parentNode,t,o)}}function V(e,t,n){return e<n&&e>t?e-1:e>n&&e<t?e+1:e}function W(e){var t=e.lockOffset,n=e.width,o=e.height,r=t,a=t,i="px";if("string"==typeof t){var l=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);_()(null!==l,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),r=parseFloat(t),a=parseFloat(t),i=l[1]}return _()(isFinite(r)&&isFinite(a),"lockOffset value should be a finite. Given %s",t),"%"===i&&(r=r*n/100,a=a*o/100),{x:r,y:a}}function L(e){var t=e.height,n=e.width,o=e.lockOffset,r=Array.isArray(o)?o:[o,o];_()(2===r.length,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",o);var a=i(r,2),l=a[0],s=a[1];return[W({height:t,lockOffset:l,width:n}),W({height:t,lockOffset:s,width:n})]}function F(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:F(e.parentNode):null}function H(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:P(t.gridColumnGap),y:P(t.gridRowGap)}:{x:0,y:0}}var Q=27,J=32,X=37,q=38,z=39,Z=40,$="A",ee="BUTTON",te="CANVAS",ne="INPUT",oe="OPTION",re="TEXTAREA",ae="SELECT";function ie(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),o=e.cloneNode(!0);return S(o.querySelectorAll(t)).forEach((function(e,t){("file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===te&&n[t].width>0&&n[t].height>0)&&e.getContext("2d").drawImage(n[t],0,0)})),o}function le(e){return null!=e.sortableHandle}var se=function(){function e(t,n){c(this,e),this.container=t,this.onScrollCallback=n}return d(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,o=e.minTranslate,r=e.maxTranslate,a=e.width,i=e.height,l={x:0,y:0},s={x:1,y:1},c=10,u=10,d=this.container,f=d.scrollTop,h=d.scrollLeft,p=d.scrollHeight,m=d.scrollWidth,g=0===f,v=p-f-d.clientHeight==0,y=0===h,w=m-h-d.clientWidth==0;n.y>=r.y-i/2&&!v?(l.y=1,s.y=u*Math.abs((r.y-i/2-n.y)/i)):n.x>=r.x-a/2&&!w?(l.x=1,s.x=c*Math.abs((r.x-a/2-n.x)/a)):n.y<=o.y+i/2&&!g?(l.y=-1,s.y=u*Math.abs((n.y-i/2-o.y)/i)):n.x<=o.x+a/2&&!y&&(l.x=-1,s.x=c*Math.abs((n.x-a/2-o.x)/a)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===l.x&&0===l.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:s.x*l.x,top:s.y*l.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var ce={axis:b.a.oneOf(["x","y","xy"]),contentWindow:b.a.any,disableAutoscroll:b.a.bool,distance:b.a.number,getContainer:b.a.func,getHelperDimensions:b.a.func,helperClass:b.a.string,helperContainer:b.a.oneOfType([b.a.func,"undefined"==typeof HTMLElement?b.a.any:b.a.instanceOf(HTMLElement)]),hideSortableGhost:b.a.bool,keyboardSortingTransitionDuration:b.a.number,lockAxis:b.a.string,lockOffset:b.a.oneOfType([b.a.number,b.a.string,b.a.arrayOf(b.a.oneOfType([b.a.number,b.a.string]))]),lockToContainerEdges:b.a.bool,onSortEnd:b.a.func,onSortMove:b.a.func,onSortOver:b.a.func,onSortStart:b.a.func,pressDelay:b.a.number,pressThreshold:b.a.number,keyCodes:b.a.shape({lift:b.a.arrayOf(b.a.number),drop:b.a.arrayOf(b.a.number),cancel:b.a.arrayOf(b.a.number),up:b.a.arrayOf(b.a.number),down:b.a.arrayOf(b.a.number)}),shouldCancelStart:b.a.func,transitionDuration:b.a.number,updateBeforeSortStart:b.a.func,useDragHandle:b.a.bool,useWindowAsScrollContainer:b.a.bool},ue={lift:[J],drop:[J],cancel:[Q],up:[q,X],down:[Z,z]},de={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:ue,shouldCancelStart:function(e){return-1!==[ne,re,ae,oe,ee].indexOf(e.target.tagName)||!!M(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},fe=Object.keys(ce);function he(e){_()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function pe(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}var me={index:b.a.number.isRequired,collection:b.a.oneOfType([b.a.number,b.a.string]),disabled:b.a.bool},ge=Object.keys(me);var ve=n(4),ye=n.n(ve);function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function xe(e,t){return(xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){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,o=Ee(e);if(t){var r=Ee(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oe=wp.compose.compose,Ce=wp.data,ke=Ce.withDispatch,Te=Ce.withSelect,Re=wp.element.Component,je=wp.components.Button,Ie=wp.i18n.__,Me=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return c(this,n),p(this,m(n).apply(this,arguments))}return v(n,t),d(n,[{key:"componentDidMount",value:function(){Object(A.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return _()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(y.createElement)(e,o({ref:t},this.props))}}]),n}(y.Component),l(t,"displayName",G("sortableHandle",e)),n}((function(){return wp.element.createElement("div",{className:"ti-sortable-handle"},wp.element.createElement(je,{isTertiary:!0,icon:"menu"}))})),Be=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return c(this,n),p(this,m(n).apply(this,arguments))}return v(n,t),d(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,o=e.index,r=Object(A.findDOMNode)(this);r.sortableInfo={collection:t,disabled:n,index:o,manager:this.context.manager},this.node=r,this.ref={node:r},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return _()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(y.createElement)(e,o({ref:t},C(this.props,ge)))}}]),n}(y.Component),l(t,"displayName",G("sortableElement",e)),l(t,"contextTypes",{manager:b.a.object.isRequired}),l(t,"propTypes",me),l(t,"defaultProps",{collection:0}),n}((function(e){var t=e.value,n=e.label,o=e.toggle;return wp.element.createElement("div",{className:"ti-sortable-item-area ti-sortable-item-area-".concat(t)},wp.element.createElement("div",{key:t,className:"ti-sortable-item"},wp.element.createElement(je,{isTertiary:!0,icon:"visibility",label:Ie("Toggle","neve"),showTooltip:!0,className:"ti-sortable-item-toggle",onClick:function(){o(t)}}),wp.element.createElement("div",{className:"ti-sortable-item-label"},n),wp.element.createElement(Me,null)))})),Pe=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return c(this,n),l(h(h(t=p(this,m(n).call(this,e)))),"state",{}),l(h(h(t)),"handleStart",(function(e){var n=t.props,o=n.distance,r=n.shouldCancelStart;if(2!==e.button&&!r(e)){t.touched=!0,t.position=U(e);var a=M(e.target,(function(e){return null!=e.sortableInfo}));if(a&&a.sortableInfo&&t.nodeIsChild(a)&&!t.state.sorting){var i=t.props.useDragHandle,l=a.sortableInfo,s=l.index,c=l.collection;if(l.disabled)return;if(i&&!M(e.target,le))return;t.manager.active={collection:c,index:s},Y(e)||e.target.tagName!==$||e.preventDefault(),o||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),l(h(h(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),l(h(h(t)),"handleMove",(function(e){var n=t.props,o=n.distance,r=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var a=U(e),i={x:t.position.x-a.x,y:t.position.y-a.y},l=Math.abs(i.x)+Math.abs(i.y);t.delta=i,o||r&&!(l>=r)?o&&l>=o&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),l(h(h(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),l(h(h(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),l(h(h(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),o=function(){if(n){var o=function(){var n=h.sortableInfo.index,o=N(h),r=H(t.container),u=t.scrollContainer.getBoundingClientRect(),g=i({index:n,node:h,collection:p});if(t.node=h,t.margin=o,t.gridGap=r,t.width=g.width,t.height=g.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=u,t.index=n,t.newIndex=n,t.axis={x:a.indexOf("x")>=0,y:a.indexOf("y")>=0},t.offsetEdge=K(h,t.container),t.initialOffset=U(m?s({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(ie(h)),R(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-o.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-o.top,"px"),width:"".concat(t.width,"px")}),m&&t.helper.focus(),c&&(t.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},m){var v=f?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,y=v.top,w=v.left,b=v.width,A=y+v.height,x=w+b;t.axis.x&&(t.minTranslate.x=w-t.boundingClientRect.left,t.maxTranslate.x=x-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=y-t.boundingClientRect.top,t.maxTranslate.y=A-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(f?0:u.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(f?t.contentWindow.innerWidth:u.left+u.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(f?0:u.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(f?t.contentWindow.innerHeight:u.top+u.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?h:t.contentWindow,m?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(k.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),k.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),d&&d({node:h,index:n,collection:p,isKeySorting:m,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),m&&t.keyMove(0)},r=t.props,a=r.axis,i=r.getHelperDimensions,l=r.helperClass,c=r.hideSortableGhost,u=r.updateBeforeSortStart,d=r.onSortStart,f=r.useWindowAsScrollContainer,h=n.node,p=n.collection,m=t.manager.isKeySorting,g=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=pe((function(){var t=h.sortableInfo.index;return Promise.resolve(u({collection:p,index:t,node:h,isKeySorting:m},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return g&&g.then?g.then(o):o()}}();return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),l(h(h(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),l(h(h(t)),"handleSortEnd",(function(e){var n=t.props,o=n.hideSortableGhost,r=n.onSortEnd,a=t.manager,i=a.active.collection,l=a.isKeySorting,s=t.manager.getOrderedRefs();t.listenerNode&&(l?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(k.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),k.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),o&&t.sortableGhost&&R(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=s.length;c<u;c++){var d=s[c],f=d.node;d.edgeOffset=null,d.boundingClientRect=null,j(f,null),I(f,null),d.translate=null}t.autoScroller.clear(),t.manager.active=null,t.manager.isKeySorting=!1,t.setState({sorting:!1,sortingIndex:null}),"function"==typeof r&&r({collection:i,newIndex:t.newIndex,oldIndex:t.index,isKeySorting:l,nodes:s},e),t.touched=!1})),l(h(h(t)),"autoscroll",(function(){var e=t.props.disableAutoscroll,n=t.manager.isKeySorting;if(e)t.autoScroller.clear();else{if(n){var o=s({},t.translate),r=0,a=0;return t.axis.x&&(o.x=Math.min(t.maxTranslate.x,Math.max(t.minTranslate.x,t.translate.x)),r=t.translate.x-o.x),t.axis.y&&(o.y=Math.min(t.maxTranslate.y,Math.max(t.minTranslate.y,t.translate.y)),a=t.translate.y-o.y),t.translate=o,j(t.helper,t.translate),t.scrollContainer.scrollLeft+=r,void(t.scrollContainer.scrollTop+=a)}t.autoScroller.update({height:t.height,maxTranslate:t.maxTranslate,minTranslate:t.minTranslate,translate:t.translate,width:t.width})}})),l(h(h(t)),"onAutoScroll",(function(e){t.translate.x+=e.left,t.translate.y+=e.top,t.animateNodes()})),l(h(h(t)),"handleKeyDown",(function(e){var n=e.keyCode,o=t.props,r=o.shouldCancelStart,a=o.keyCodes,i=s({},ue,void 0===a?{}:a);t.manager.active&&!t.manager.isKeySorting||!(t.manager.active||i.lift.includes(n)&&!r(e)&&t.isValidSortingTarget(e))||(e.stopPropagation(),e.preventDefault(),i.lift.includes(n)&&!t.manager.active?t.keyLift(e):i.drop.includes(n)&&t.manager.active?t.keyDrop(e):i.cancel.includes(n)?(t.newIndex=t.manager.active.index,t.keyDrop(e)):i.up.includes(n)?t.keyMove(-1):i.down.includes(n)&&t.keyMove(1))})),l(h(h(t)),"keyLift",(function(e){var n=e.target,o=M(n,(function(e){return null!=e.sortableInfo})).sortableInfo,r=o.index,a=o.collection;t.initialFocusedNode=n,t.manager.isKeySorting=!0,t.manager.active={index:r,collection:a},t.handlePress(e)})),l(h(h(t)),"keyMove",(function(e){var n=t.manager.getOrderedRefs(),o=n[n.length-1].node.sortableInfo.index,r=t.newIndex+e,a=t.newIndex;if(!(r<0||r>o)){t.prevIndex=a,t.newIndex=r;var i=V(t.newIndex,t.prevIndex,t.index),l=n.find((function(e){return e.node.sortableInfo.index===i})),s=l.node,c=t.containerScrollDelta,u=l.boundingClientRect||D(s,c),d=l.translate||{x:0,y:0},f=u.top+d.y-c.top,h=u.left+d.x-c.left,p=a<r,m=p&&t.axis.x?s.offsetWidth-t.width:0,g=p&&t.axis.y?s.offsetHeight-t.height:0;t.handleSortMove({pageX:h+m,pageY:f+g,ignoreTransition:0===e})}})),l(h(h(t)),"keyDrop",(function(e){t.handleSortEnd(e),t.initialFocusedNode&&t.initialFocusedNode.focus()})),l(h(h(t)),"handleKeyEnd",(function(e){t.manager.active&&t.keyDrop(e)})),l(h(h(t)),"isValidSortingTarget",(function(e){var n=t.props.useDragHandle,o=e.target,r=M(o,(function(e){return null!=e.sortableInfo}));return r&&r.sortableInfo&&!r.sortableInfo.disabled&&(n?le(o):o.sortableInfo)})),he(e),t.manager=new E,t.events={end:t.handleEnd,move:t.handleMove,start:t.handleStart},t}return v(n,t),d(n,[{key:"getChildContext",value:function(){return{manager:this.manager}}},{key:"componentDidMount",value:function(){var e=this,t=this.props.useWindowAsScrollContainer,n=this.getContainer();Promise.resolve(n).then((function(n){e.container=n,e.document=e.container.ownerDocument||document;var o=e.props.contentWindow||e.document.defaultView||window;e.contentWindow="function"==typeof o?o():o,e.scrollContainer=t?e.document.scrollingElement||e.document.documentElement:F(e.container)||e.container,e.autoScroller=new se(e.scrollContainer,e.onAutoScroll),Object.keys(e.events).forEach((function(t){return k[t].forEach((function(n){return e.container.addEventListener(n,e.events[t],!1)}))})),e.container.addEventListener("keydown",e.handleKeyDown)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach((function(t){return k[t].forEach((function(n){return e.container.removeEventListener(n,e.events[t])}))})),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(e){var t=this.props,n=t.lockAxis,o=t.lockOffset,r=t.lockToContainerEdges,a=t.transitionDuration,l=t.keyboardSortingTransitionDuration,s=void 0===l?a:l,c=this.manager.isKeySorting,u=e.ignoreTransition,d=U(e),f={x:d.x-this.initialOffset.x,y:d.y-this.initialOffset.y};if(f.y-=window.pageYOffset-this.initialWindowScroll.top,f.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=f,r){var h=i(L({height:this.height,lockOffset:o,width:this.width}),2),p=h[0],m=h[1],g={x:this.width/2-p.x,y:this.height/2-p.y},v={x:this.width/2-m.x,y:this.height/2-m.y};f.x=B(this.minTranslate.x+g.x,this.maxTranslate.x-v.x,f.x),f.y=B(this.minTranslate.y+g.y,this.maxTranslate.y-v.y,f.y)}"x"===n?f.y=0:"y"===n&&(f.x=0),c&&s&&!u&&I(this.helper,s),j(this.helper,f)}},{key:"animateNodes",value:function(){var e=this.props,t=e.transitionDuration,n=e.hideSortableGhost,o=e.onSortOver,r=this.containerScrollDelta,a=this.windowScrollDelta,i=this.manager.getOrderedRefs(),l=this.offsetEdge.left+this.translate.x+r.left,s=this.offsetEdge.top+this.translate.y+r.top,c=this.manager.isKeySorting,u=this.newIndex;this.newIndex=null;for(var d=0,f=i.length;d<f;d++){var h=i[d].node,p=h.sortableInfo.index,m=h.offsetWidth,g=h.offsetHeight,v={height:this.height>g?g/2:this.height/2,width:this.width>m?m/2:this.width/2},y=c&&p>this.index&&p<=u,w=c&&p<this.index&&p>=u,b={x:0,y:0},A=i[d].edgeOffset;A||(A=K(h,this.container),i[d].edgeOffset=A,c&&(i[d].boundingClientRect=D(h,r)));var x=d<i.length-1&&i[d+1],_=d>0&&i[d-1];x&&!x.edgeOffset&&(x.edgeOffset=K(x.node,this.container),c&&(x.boundingClientRect=D(x.node,r))),p!==this.index?(t&&I(h,t),this.axis.x?this.axis.y?w||p<this.index&&(l+a.left-v.width<=A.left&&s+a.top<=A.top+v.height||s+a.top+v.height<=A.top)?(b.x=this.width+this.marginOffset.x,A.left+b.x>this.containerBoundingRect.width-v.width&&x&&(b.x=x.edgeOffset.left-A.left,b.y=x.edgeOffset.top-A.top),null===this.newIndex&&(this.newIndex=p)):(y||p>this.index&&(l+a.left+v.width>=A.left&&s+a.top+v.height>=A.top||s+a.top+v.height>=A.top+g))&&(b.x=-(this.width+this.marginOffset.x),A.left+b.x<this.containerBoundingRect.left+v.width&&_&&(b.x=_.edgeOffset.left-A.left,b.y=_.edgeOffset.top-A.top),this.newIndex=p):y||p>this.index&&l+a.left+v.width>=A.left?(b.x=-(this.width+this.marginOffset.x),this.newIndex=p):(w||p<this.index&&l+a.left<=A.left+v.width)&&(b.x=this.width+this.marginOffset.x,null==this.newIndex&&(this.newIndex=p)):this.axis.y&&(y||p>this.index&&s+a.top+v.height>=A.top?(b.y=-(this.height+this.marginOffset.y),this.newIndex=p):(w||p<this.index&&s+a.top<=A.top+v.height)&&(b.y=this.height+this.marginOffset.y,null==this.newIndex&&(this.newIndex=p))),j(h,b),i[d].translate=b):n&&(this.sortableGhost=h,R(h,{opacity:0,visibility:"hidden"}))}null==this.newIndex&&(this.newIndex=this.index),c&&(this.newIndex=u);var S=c?this.prevIndex:u;o&&this.newIndex!==S&&o({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:S,isKeySorting:c,nodes:i,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return _()(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.refs.wrappedInstance}},{key:"getContainer",value:function(){var e=this.props.getContainer;return"function"!=typeof e?Object(A.findDOMNode)(this):e(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var t=r.withRef?"wrappedInstance":null;return Object(y.createElement)(e,o({ref:t},C(this.props,fe)))}},{key:"helperContainer",get:function(){var e=this.props.helperContainer;return"function"==typeof e?e():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){return this.props.useWindowAsScrollContainer?{left:0,top:0}:{left:this.scrollContainer.scrollLeft-this.initialScroll.left,top:this.scrollContainer.scrollTop-this.initialScroll.top}}},{key:"windowScrollDelta",get:function(){return{left:this.contentWindow.pageXOffset-this.initialWindowScroll.left,top:this.contentWindow.pageYOffset-this.initialWindowScroll.top}}}]),n}(y.Component),l(t,"displayName",G("sortableList",e)),l(t,"defaultProps",de),l(t,"propTypes",ce),l(t,"childContextTypes",{manager:b.a.object.isRequired}),n}((function(e){var t=e.children;return wp.element.createElement("div",{className:"neve-meta-control neve-meta-sortable-items"},t)})),Ne=function(e){!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&&xe(e,t)}(a,e);var t,n,o,r=_e(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.props.data.elements,n=JSON.parse(this.props.metaFieldValue);return wp.element.createElement("div",null,wp.element.createElement(Pe,{onSortEnd:this.props.onSortEnd,lockAxis:"y",useDragHandle:!0,hideSortableGhost:!1,onSortStart:this.props.onSortStart},n.map((function(n,o){return void 0!==t[n]&&wp.element.createElement(Be,{key:"item-".concat(n),index:o,value:n,label:t[n],toggle:e.props.toggle})}))),wp.element.createElement("div",{className:"disabled-items neve-meta-control"},Object.keys(t).map((function(o,r){return!n.includes(o)&&wp.element.createElement("div",{className:"ti-sortable-item-area",key:r},wp.element.createElement("div",{className:"ti-sortable-item hidden"},wp.element.createElement(je,{isTertiary:!0,icon:"hidden",label:Ie("Toggle","neve"),showTooltip:!0,className:"ti-sortable-item-toggle",onClick:function(){e.props.toggle(o)}}),wp.element.createElement("div",{className:"ti-sortable-item-label"},t[o])))}))))}}])&&Ae(t.prototype,n),o&&Ae(t,o),a}(Re),Ge=Oe([ke((function(e,t,n){var o=n.select;return{onSortStart:function(e){var t=e.index;document.querySelector(".ti-sortable-item-area:nth-of-type("+(t+1)+")").style.color="#ccc"},onSortEnd:function(n){var r=n.oldIndex,a=n.newIndex,i=JSON.parse(o("core/editor").getEditedPostAttribute("meta")[t.id]||t.data.default),l=ye()(i,r,a);t.stateUpdate(t.id,JSON.stringify(l)),e("core/editor").editPost({meta:we({},t.id,JSON.stringify(l))}),document.querySelector(".ti-sortable-item-area:nth-of-type("+(a+1)+")").style.color=null},toggle:function(n){var r=JSON.parse(o("core/editor").getEditedPostAttribute("meta")[t.id]||t.data.default);r.includes(n)?r=r.filter((function(e){return e!==n})):r.push(n),t.stateUpdate(t.id,JSON.stringify(r)),e("core/editor").editPost({meta:we({},t.id,JSON.stringify(r))})}}})),Te((function(e,t){return{metaFieldValue:e("core/editor").getEditedPostAttribute("meta")[t.id]||t.data.default}}))])(Ne),De=wp.components,Ue=De.Path,Ye=De.Rect,Ke=De.SVG,Ve=function(){return wp.element.createElement(Ke,{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Ue,{d:"M16.5 1.25H7.61111M16.5 9H0.5M16.5 16.75H7.61111",strokeWidth:"1.5"}))},We=function(){return wp.element.createElement(Ke,{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Ue,{d:"M12.9444 1.25H4.05556M16.5 9H0.5M12.9444 16.75H4.05556",strokeWidth:"1.5"}))},Le=function(){return wp.element.createElement(Ke,{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Ue,{d:"M0.5 1.25H9.38889M0.5 9H16.5M0.5 16.75H9.38889",strokeWidth:"1.5"}))};function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function qe(e,t){return(qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){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,o=et(e);if(t){var r=et(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Ze(this,n)}}function Ze(e,t){return!t||"object"!==Fe(t)&&"function"!=typeof t?$e(e):t}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tt=wp.compose.compose,nt=wp.data,ot=nt.withDispatch,rt=nt.withSelect,at=wp.element.Component,it=wp.components,lt=it.PanelBody,st=it.Button,ct=it.BaseControl,ut=it.RadioControl,dt=it.ButtonGroup,ft=it.ToggleControl,ht=it.RangeControl,pt=wp.i18n.__,mt=function(e){!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&&qe(e,t)}(a,e);var t,n,o,r=ze(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=r.call(this,e);var n=wp.data.select("core/editor").getEditedPostAttribute("meta"),o=function(e){return Object.keys(e).filter((function(t){return""===e[t]||0===e[t]})).forEach((function(t){return delete e[t]})),e};t.defaultState={neve_meta_sidebar:"default",neve_meta_container:"default",neve_meta_enable_content_width:"off",neve_meta_content_width:70,neve_meta_title_alignment:"left",neve_meta_author_avatar:"off",neve_meta_reading_time:"off",neve_post_elements_order:JSON.stringify(["title","meta","thumbnail","content","tags","comments","post-navigation"]),neve_meta_disable_header:"off",neve_meta_disable_footer:"off",neve_meta_disable_title:"off"};var i=Qe(Qe({},o(t.defaultState)),o(n));for(var l in i)Object.keys(t.defaultState).includes(l)||delete i[l];return t.state=Qe({},i),t.updateValues=t.updateValues.bind($e(t)),t.updateBlockWidth=t.updateBlockWidth.bind($e(t)),t}return t=a,(n=[{key:"componentDidUpdate",value:function(e,t,n){this.updateBlockWidth()}},{key:"updateValues",value:function(e,t){var n=this.state;n[e]=t,this.setState(n),this.props.setMetaValue(e,t)}},{key:"resetAll",value:function(){var e=this.state,t=Qe({},this.props.allMeta),n={};for(var o in Object.keys(e).map((function(e){var t="";"neve_meta_content_width"===e&&(t=0),n[e]=t})),n)Object.keys(t).includes(o)||delete n[o];this.props.setAllMetas(Qe(Qe({},t),n)),this.setState(this.defaultState)}},{key:"updateBlockWidth",value:function(){var e=this.state.neve_meta_enable_content_width,t=this.state.neve_meta_container;"default"===t&&(t=metaSidebar.actions.neve_meta_content_width.container);var n=this.state.neve_meta_content_width,o=metaSidebar.actions.neve_meta_content_width.content,r=o+"%",a=n+"%";"contained"===t&&(r=Math.round(o/100*metaSidebar.actions.neve_meta_content_width.editor)+"px",a=Math.round(n/100*metaSidebar.actions.neve_meta_content_width.editor)+"px"),document.contains(document.getElementById("neve-meta-editor-style"))&&document.getElementById("neve-meta-editor-style").remove();var i='.wp-block:not([data-align="full"]) { max-width: '+("on"===e?a:r)+"; }",l=document.head,s=document.createElement("style");s.setAttribute("id","neve-meta-editor-style"),s.innerHTML=i,l.appendChild(s)}},{key:"renderPageLayoutGroup",value:function(){var e=this;return"elementor_header_footer"!==wp.data.select("core/editor").getEditedPostAttribute("template")&&wp.element.createElement("div",{className:"nv-option-category"},wp.element.createElement(lt,{title:pt("Page Layout","neve"),intialOpen:!0},wp.element.createElement(ct,{id:"neve_meta_sidebar",label:pt("Sidebar","neve"),className:"neve-meta-control neve-meta-radio-image neve_meta_sidebar"},wp.element.createElement(ut,{selected:this.state.neve_meta_sidebar,options:[{label:wp.element.createElement(React.Fragment,null,wp.element.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABXCAYAAAC9UeOHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAN6SURBVHgB7ZrfThpREMZn1SgUWiwkFi6gtol3mnjhi/QJmj5C36SP1gsvTGir0Rb/Baop20UL3fJtugaH3QXKzlLj90s2G5Rlc37MmTNnFqfreW/9weCDiLMujxjHkSPx/TdO13UPfV82hUDKxyXKuMf6kpB7UIiCQhQUoqAQBYUoKERBIQoKUVCIgkIUFKKgEAWFKChEQSEKClFQiIJCFBSioBAFhSgoREEhCgpRUIiCQhQrsgAGg4F0Om3peZ54wwOvwerqqiwvL8uzUkmKxafB66zJVEi325Xzs9PgHMXt7W1wvr6+Ds7lclleVGuZinF+dF1fjEEEQMTl5aX8C9VqNRBjDX4jYi4E3/rR4ZdgasxDsViUzVevgyllBYSYJlVExudPzbllAEwzfFaYb6wwFdL69vUuL6QBxGLqWWImBKtIp9OZ6Zq1tTVZWUnO88hDcUk5DcyEnJ+dyazs7OzI9vb2xPdZRonJsovoSJoqiIJCoTD2dyy3GxsbsrW1Jc1mM/Z6RAgOJNq0MRHyPWGq1Ot1aTQakgSkXFxc3NUjUUD6gxESt6ogR0BGu92W09PxsK/ValKpVOTk5CRRBnCN8kjqQkZLcU34jUJG1IARGZBxfHwsk8CUxH3SrktSF5JUJ4QluOu6kf8fzRvIMyjdIe7m5ib2XmkLyXS3iwFggP1+f+J7MVAk19JwoxdHmjVOSKabOyRKHCHhShMVMblcLjjHRQewKONTj5Bpd6aQgZoDURAFkivo9Xoy771mIfUICXsaSbkklBFWpXt7e2PvwYqEaIqLkHw+bxIhJlMGDZ6kWmQ0hyCnRMmDiKTVJjcUYoGJkHK5kigEg93f35fd3d0gSg4ODmRWqkb9ERMhqDdwJG3CkEixzE7azEXxfLgcW3XRzJbdaTpcyBGtVktmpWrYPTMTggixaPtZ91hNCzP0QlFtpgVk4DMtMa9U642XqURKFjJAJpUqBoIwR2Nn1nIb10GqxVY/ikweQ4yCtuI0YgpDAaXSejDlLDvto2TyGCIO7+9TO8/7eVeYYeD5/JMgGhbx1G6hQv5HzJ/LPEQoREEhCgpRUIiCQhQUoqAQBYUoKERBIQoKUVCIgkIUFKKgEAWFKChEQSEKClFQiIJCFBSioBAFhSgoREEhCgi5EhLg+3K15P/23/viHMkjBzL6v/x3fwDAqWHdPm8hRQAAAABJRU5ErkJggg=="}),wp.element.createElement("span",{className:"option-label"},pt("Inherit","neve"))),value:"default"},{label:wp.element.createElement(React.Fragment,null,wp.element.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABYCAYAAACjxTpsAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFISURBVHgB7dWxSsNgGEbht6UEgnGpg3HrUGf1DrxTL0yFutXBToFAsK3WoYtnMIVgW84zZwiHl/8btW07i/bKslxMPtfrp2T0GP1ot9vZOPrFKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKGCSnpqmyevLc07JRVVlPr/98/cuBfReSvVd/e7+IefMpQCjAKMAowBPMnApwJMMXAowCjAKMArwJAOXAjzJwKUAowCjAKMATzJwKcCTDFwKMAowCuj9pnRdl9XqI0OYTq9SFEX+20FR3pfLDKGqLk8zyu6nr+s6QziGIDsHRanrm5wzH1pgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBRgFGAUYBQw2WzyNhpnEe19AbO4NutQ2DJ9AAAAAElFTkSuQmCC"}),wp.element.createElement("span",{className:"option-label"},pt("None","neve"))),value:"full-width"},{label:wp.element.createElement(React.Fragment,null,wp.element.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABXCAYAAABSk4i5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFDSURBVHgB7dUtT8NQFIfxM0ouYkWwUBLMMEMAiu/v+A6AQLH5+jVr9qL3iCZNTrPl+emrnuSe/+zrb7uPET6fd3FN7uv57CZ0xijAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjgNhL8/nzH1B6bJprmadDblChd18XU+r4f/DYlytv7R0ytqqrBb1OilFLiknhogVGAUYCTDJxk4CQDJxl4aIFRgFGAkwycZOAkAycZeGiBUYBRgJMMnGTgJAMnGXhogVFAyvdp2zbGOH2/uq4jS0qUzfo/xpgfg6xWr5ElJcrDYhFjlHIXmVKiLJcvcUk8tMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAowCjAKMAo4ABQ0jKnFSWXOgAAAABJRU5ErkJggg=="}),wp.element.createElement("span",{className:"option-label"},pt("Left","neve"))),value:"left"},{label:wp.element.createElement(React.Fragment,null,wp.element.createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABXCAYAAAC5pDO6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFVSURBVHgB7dlBSsNQFEbhWyORSCDYFajYgboH9z9zDerAOrMYCQSCmo498MqjCW3PB9nAIbn/IIv489V+/8QReX4/jxxPq4vFWehfhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgHJ/zLbto2315eY2/XNbVRVFfu200/evu9jbsMwxBSSw9R1HfcPjzG3oihiCju9MWVZxqnw+ALDAMMA5xo418C5Bs418PgCwwDDAOcaONfAuQbONfD4AsMAwwDnGjjXwLkGzjXw+ALDgORPqeu67ZOjaZrJbkSu5DCbzWd8rNeRo7xbbY/4IUgOU1WXcbVcRo5DeVtGyWHGz2B8ToXHFxgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgGGAYYBhgG/AIdeUYQlOqQ4AAAAABJRU5ErkJggg=="}),wp.element.createElement("span",{className:"option-label"},pt("Right","neve"))),value:"right"}],onChange:function(t){e.updateValues("neve_meta_sidebar",t)}})),wp.element.createElement(ct,{label:pt("Container","neve"),id:"neve_meta_container",className:"neve-meta-control neve-meta-button-group neve_meta_container"},wp.element.createElement(dt,null,wp.element.createElement(st,{isPrimary:"default"===this.state.neve_meta_container,isSecondary:"default"!==this.state.neve_meta_container,onClick:function(){e.updateValues("neve_meta_container","default")}}," ",pt("Default","neve")," "),wp.element.createElement(st,{isPrimary:"contained"===this.state.neve_meta_container,isSecondary:"contained"!==this.state.neve_meta_container,onClick:function(){e.updateValues("neve_meta_container","contained")}}," ",pt("Contained","neve")," "),wp.element.createElement(st,{isPrimary:"full-width"===this.state.neve_meta_container,isSecondary:"full-width"!==this.state.neve_meta_container,onClick:function(){e.updateValues("neve_meta_container","full-width")}}," ",pt("Full Width","neve")," "))),wp.element.createElement(ct,{id:"neve_meta_enable_content_width",className:"neve-meta-control neve-meta-checkbox neve_meta_enable_content_width"},wp.element.createElement(ft,{label:pt("Custom Content Width (%)","neve"),checked:"on"===this.state.neve_meta_enable_content_width,onChange:function(t){e.updateValues("neve_meta_enable_content_width",t?"on":"off"),e.updateValues("neve_meta_content_width",e.state.neve_meta_content_width)}})),"on"===this.state.neve_meta_enable_content_width?wp.element.createElement(ct,{id:"neve_meta_content_width",className:"neve-meta-control neve-meta-range neve_meta_content_width"},wp.element.createElement(ht,{value:this.state.neve_meta_content_width,onChange:function(t){e.updateValues("neve_meta_content_width",t)},min:0,max:100,step:"1"})):""))}},{key:"renderPageTitleGroup",value:function(){var e=this;if("elementor_header_footer"===wp.data.select("core/editor").getEditedPostAttribute("template"))return!1;var t=JSON.parse(this.state.neve_post_elements_order).includes("meta"),n=wp.data.select("core/editor").getCurrentPostType();return wp.element.createElement("div",{className:"nv-option-category"},wp.element.createElement(lt,{title:pt("Page Title","neve"),intialOpen:!0},wp.element.createElement(ct,{label:pt("Title alignment","neve"),id:"neve_meta_title_alignment",className:"neve-meta-control neve-meta-button-group neve_meta_title_alignment"},wp.element.createElement(dt,null,wp.element.createElement(st,{icon:Le,className:"nv-align-left",isPrimary:"left"===this.state.neve_meta_title_alignment,isSecondary:"left"!==this.state.neve_meta_title_alignment,onClick:function(){e.updateValues("neve_meta_title_alignment","left")}}),wp.element.createElement(st,{icon:We,className:"nv-align-center",isPrimary:"center"===this.state.neve_meta_title_alignment,isSecondary:"center"!==this.state.neve_meta_title_alignment,onClick:function(){e.updateValues("neve_meta_title_alignment","center")}}),wp.element.createElement(st,{icon:Ve,className:"nv-align-right",isPrimary:"right"===this.state.neve_meta_title_alignment,isSecondary:"right"!==this.state.neve_meta_title_alignment,onClick:function(){e.updateValues("neve_meta_title_alignment","right")}}))),t&&"post"===n?wp.element.createElement(ct,{id:"neve_meta_author_avatar",className:"neve-meta-control neve-meta-checkbox neve_meta_author_avatar"},wp.element.createElement(ft,{label:pt("Author Avatar","neve"),checked:"on"===this.state.neve_meta_author_avatar,onChange:function(t){e.updateValues("neve_meta_author_avatar",t?"on":"off")}})):"",metaSidebar.enable_pro&&t&&"post"===n?wp.element.createElement(ct,{id:"neve_meta_reading_time",className:"neve-meta-control neve-meta-checkbox neve_meta_reading_time"},wp.element.createElement(ft,{label:pt("Reading Time","neve"),checked:"on"===this.state.neve_meta_reading_time,onChange:function(t){e.updateValues("neve_meta_reading_time",t?"on":"off")}})):""))}},{key:"renderElementsGroup",value:function(){var e=this,t={elements:{title:pt("Post Title","neve"),meta:pt("Post Meta","neve"),thumbnail:pt("Featured Image","neve"),content:pt("Content","neve"),tags:pt("Tags","neve"),comments:pt("Comments","neve"),"post-navigation":pt("Post Navigation","neve")},default:metaSidebar.elementsDefaultOrder};metaSidebar.enable_pro&&(t.elements["author-biography"]=pt("Author Biography","neve"),t.elements["related-posts"]=pt("Related Posts","neve"),t.elements["sharing-icons"]=pt("Sharing Icons","neve"));var n=wp.data.select("core/editor").getEditedPostAttribute("template"),o=wp.data.select("core/editor").getCurrentPostType();return wp.element.createElement("div",{className:"nv-option-category"},wp.element.createElement(lt,{title:pt("Elements","neve"),intialOpen:!0},"elementor_header_footer"!==n&&"post"===o?wp.element.createElement(ct,{id:"neve_post_elements_order",className:"neve-meta-control neve-meta-sortable"},wp.element.createElement(Ge,{stateUpdate:this.updateValues,id:"neve_post_elements_order",data:t})):"",wp.element.createElement(ct,{id:"neve_meta_disable_header",className:"neve-meta-control neve-meta-checkbox neve_meta_disable_header"},wp.element.createElement(ft,{label:pt("Disable Header","neve"),checked:"on"===this.props.metaValue("neve_meta_disable_header"),onChange:function(t){e.updateValues("neve_meta_disable_header",t?"on":"off")}})),wp.element.createElement(ct,{id:"neve_meta_disable_footer",className:"neve-meta-control neve-meta-checkbox neve_meta_disable_footer"},wp.element.createElement(ft,{label:pt("Disable Footer","neve"),checked:"on"===this.props.metaValue("neve_meta_disable_footer"),onChange:function(t){e.updateValues("neve_meta_disable_footer",t?"on":"off")}})),"elementor_header_footer"!==n&&"page"===o?wp.element.createElement(ct,{id:"neve_meta_disable_title",className:"neve-meta-control neve-meta-checkbox neve_meta_disable_title"},wp.element.createElement(ft,{label:pt("Disable Title","neve"),checked:"on"===this.props.metaValue("neve_meta_disable_title"),onChange:function(t){e.updateValues("neve_meta_disable_title",t?"on":"off")}})):""))}},{key:"renderResetButton",value:function(){var e=this;return wp.element.createElement(ct,{label:pt("Reset all options to default","neve"),id:"neve_reset_all",className:"nv-reset-all components-panel__body is-opened"},wp.element.createElement(st,{icon:"image-rotate",className:"nv-reset-meta",onClick:function(){e.resetAll()},label:pt("Return to customizer settings","neve"),showTooltip:!0}))}},{key:"render",value:function(){return wp.element.createElement(React.Fragment,null,this.renderPageLayoutGroup(),this.renderPageTitleGroup(),this.renderElementsGroup(),this.renderResetButton())}}])&&Xe(t.prototype,n),o&&Xe(t,o),a}(at),gt=tt([ot((function(e,t){return{setMetaValue:function(t,n){e("core/editor").editPost({meta:Je({},t,n)})},setAllMetas:function(t){e("core/editor").editPost({meta:t})}}})),rt((function(e,t){return{metaValue:function(t){return e("core/editor").getEditedPostAttribute("meta")[t]},allMeta:e("core/editor").getEditedPostAttribute("meta")}}))])(mt),vt=wp.editPost,yt=vt.PluginSidebar,wt=vt.PluginSidebarMoreMenuItem,bt=wp.i18n.__,At=wp.keyboardShortcuts.useShortcut,xt=wp.element.useCallback,_t=wp.compose.compose,St=wp.data,Et=St.withDispatch,Ot=St.withSelect,Ct=_t(Et((function(e){e("core/keyboard-shortcuts").registerShortcut({name:"neve/open-meta-sidebar",category:"block",description:bt("Open Neve meta sidebar","neve"),keyCombination:{modifier:"access",character:"s"}})})),Ot((function(e){return{template:e("core/editor").getEditedPostAttribute("template")}})))((function(e){if(At("neve/open-meta-sidebar",xt((function(){var e=wp.data.select("core/edit-post").getActiveGeneralSidebarName();e?(wp.data.dispatch("core/edit-post").closeGeneralSidebar(e),"meta-sidebar/neve-meta-sidebar"!==e&&wp.data.dispatch("core/edit-post").openGeneralSidebar("meta-sidebar/neve-meta-sidebar")):wp.data.dispatch("core/edit-post").openGeneralSidebar("meta-sidebar/neve-meta-sidebar")}),[])),"elementor_canvas"===e.template)return document.getElementById("neve-page-settings-notice").style.display="none",!1;document.getElementById("neve-page-settings-notice").style.display="block";var t=bt("Neve Options","neve");return metaSidebar.whiteLabeled&&(t=metaSidebar.whiteLabelThemeName?metaSidebar.whiteLabelThemeName+" "+bt("Options","neve"):bt("Options","neve")),wp.element.createElement(React.Fragment,null,wp.element.createElement(wt,{target:"neve-meta-sidebar"},t),wp.element.createElement(yt,{name:"neve-meta-sidebar",title:t},wp.element.createElement(gt,null)))})),kt=wp.plugins.registerPlugin,Tt=wp.components.Icon,Rt=metaSidebar.whiteLabeled?"hammer":function(){return wp.element.createElement(Ke,{width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Ue,{d:"M4.77822 10.2133V19.3287H0.118347V0.802224C0.118347 0.712594 0.145598 0.649854 0.200099 0.614002C0.254601 0.578149 0.354519 0.622964 0.499857 0.748446L12.1359 10.2133V1.04422H16.7958V19.5976C16.7958 19.7051 16.7685 19.7724 16.714 19.7992C16.6595 19.8261 16.5596 19.7768 16.4143 19.6514L4.77822 10.2133Z"}),wp.element.createElement(Ye,{x:"0.118347",y:"22.3334",width:"16.6774",height:"1.51613"}))};kt("meta-sidebar",{icon:wp.element.createElement(Tt,{icon:Rt}),render:Ct})}]);