(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function n(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function u(){var e=function(){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,u=arguments,o=r(o=e),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(n,i()?Reflect.construct(o,u||[],r(n).constructor):o.apply(n,u));var n,o,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(e,$e.modules.hookUI.After),u=e,(c=[{key:"getCommand",value:function(){return"document/save/save"}},{key:"getConditions",value:function(t){return"publish"===t.status}},{key:"getId",value:function(){return"redirect-after-republish"}},{key:"apply",value:function(t){"publish"===t.status&&duplicatePost.originalEditURL&&"1"===duplicatePost.rewriting&&window.location.assign(duplicatePost.originalEditURL)}}])&&n(u.prototype,c),Object.defineProperty(u,"prototype",{writable:!1}),u;var u,c}();$e.hooks.registerUIAfter(new e)}jQuery(window).on("elementor:init",function(){window.elementor.on("panel:init",function(){u(),"0"!==duplicatePost.rewriting&&elementor.getPanelView().footer.currentView.removeSubMenuItem("saver-options",{name:"save-template"})})})})();