(function(){"use strict";/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */(function(){var a=function(){var e=document.getElementById("diff-main");e&&(e.classList.remove("active"),typeof Storage<"u"&&localStorage.removeItem("diffSwitchState"))},f=function(){var e=document.getElementById("diff-main");e&&(e.classList.add("active"),typeof Storage<"u"&&localStorage.setItem("diffSwitchState","checked"))},r=function(){var e=document.getElementById("override-pane"),o=document.getElementById("core-pane"),t=e.parentElement.parentElement;o&&e&&(o.classList.remove("active"),t.classList.contains("options-grid-form-half")&&(t.classList.remove("options-grid-form-half"),t.classList.add("options-grid-form-full")),typeof Storage<"u"&&localStorage.removeItem("coreSwitchState"))},i=function(){var e=document.getElementById("override-pane"),o=document.getElementById("core-pane"),t=e.parentElement.parentElement;o&&e&&(o.classList.add("active"),t.classList.contains("options-grid-form-full")&&(t.classList.remove("options-grid-form-full"),t.classList.add("options-grid-form-half")),Joomla.editors.instances.jform_core&&Joomla.editors.instances.jform_core.refresh(),typeof Storage<"u"&&localStorage.setItem("coreSwitchState","checked"))};document.addEventListener("DOMContentLoaded",function(){var n=document.getElementById("jform_show_diff1"),e=document.getElementById("jform_show_diff0"),o=document.getElementById("jform_show_core1"),t=document.getElementById("jform_show_core0");n&&e&&(n.addEventListener("click",f),e.addEventListener("click",a)),o&&t&&(o.addEventListener("click",i),t.addEventListener("click",r)),typeof Storage<"u"&&localStorage.getItem("coreSwitchState")&&o&&(o.checked=!0,t.checked=!1,i()),typeof Storage<"u"&&localStorage.getItem("diffSwitchState")&&n&&(n.checked=!0,e.checked=!1,f())})})()})();
