File: /home/lgooir/.trash/rising-bamboo/dist/js/admin/rising-bamboo-core-getting.js
(()=>{"use strict";function e(t){return e="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(t)}function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(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,r(o.key),o)}}function r(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=c(t);if(n){var i=c(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(this,r)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=wp.i18n.__,l=window.rbb_vars.text_domain,s=wp.components,f=s.Button,p=s.PanelBody,b=s.Placeholder,m=s.Spinner,y=wp.element,d=y.createRoot,v=y.Component,h=y.Fragment,w=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(d,e);var r,c,s,y=i(d);function d(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(e=y.apply(this,arguments)).changeOptions=e.changeOptions.bind(a(e)),e.state={isAPILoaded:!1,isAPISaving:!1},e}return r=d,(c=[{key:"componentDidMount",value:function(){var e=this;wp.api.loadPromise.then((function(){e.settings=new wp.api.models.Settings,!1===e.state.isAPILoaded&&e.settings.fetch().then((function(){e.setState({isAPILoaded:!0})}))}))}},{key:"changeOptions",value:function(e,n){var r=this;this.setState({isAPISaving:!0}),new wp.api.models.Settings(t({},e,n)).save().then((function(n){var o;r.setState((t(o={},e,n[e]),t(o,"isAPISaving",!1),o))}))}},{key:"render",value:function(){return this.state.isAPILoaded?React.createElement(h,null,"#"!==window.rbb_vars.info.support_link&&React.createElement("div",{className:"rbb-core-settings-main"},React.createElement(p,{className:"bg-none border-none"},React.createElement("div",{className:"rbb-core-info"},React.createElement("h2",{className:"mb-3 font-semibold"},u("سوالی از ما دارید؟",l)),React.createElement("p",{className:"mb-3"},u("خوشحال میشویم که به شما کمک کنیم، اگر کمکی نیاز داشتید",l)),React.createElement("div",{className:"rbb-core-info-button-group"},React.createElement(f,{className:"ml-0",variant:"secondary",target:"_blank",href:window.rbb_vars.info.support_link},u("دریافت پشتیبانی",l))))))):React.createElement(b,null,React.createElement(m,null))}}])&&n(r.prototype,c),s&&n(r,s),Object.defineProperty(r,"prototype",{writable:!1}),d}(v);d(document.getElementById("rbb-core-getting")).render(React.createElement(w,null))})();