diff --git a/source/_themes/wazuh_doc_theme_v3/src/js-source/components/local-toc.js b/source/_themes/wazuh_doc_theme_v3/src/js-source/components/local-toc.js index aca846b2d1..13c7a23494 100644 --- a/source/_themes/wazuh_doc_theme_v3/src/js-source/components/local-toc.js +++ b/source/_themes/wazuh_doc_theme_v3/src/js-source/components/local-toc.js @@ -5,12 +5,24 @@ */ /* Fix for the first item when using the Bootstrap scrollspy in our documentation */ -if ( $('#local-toc').length > 0 ) { - /* Fix the href of the first item */ - const firstLocalTocItem = $('#local-toc > .navbar-nav > .nav-item:first-of-type > .nav-link'); - const firstSection = $('main:first-of-type > .section:first-of-type'); - firstLocalTocItem.attr('href', firstLocalTocItem.attr('href') + firstSection.attr('id')); -} +$(document).ready(function() { + if ($('#local-toc').length > 0) { + /* Fix the href of the first item */ + const firstLocalTocItem = $('#local-toc > .navbar-nav > .nav-item:first-of-type > .nav-link'); + let firstSection = $('main:first-of-type > .section:first-of-type'); + + /* Fix for docutils>=0.17 */ + if (firstSection.length === 0) { + firstSection = $('main:first-of-type > section:first-of-type'); + } + + // Check if the firstSection has a valid id before updating the href + const firstSectionId = firstSection.attr('id'); + if (firstSectionId) { + firstLocalTocItem.attr('href', firstLocalTocItem.attr('href') + firstSectionId); + } + } +}); /* Expand accordion functionality for the local-toc */ $('#local-toc .nav-link').on('click', function(e) { diff --git a/source/_themes/wazuh_doc_theme_v3/static/js/min/wazuh-documentation.min.js b/source/_themes/wazuh_doc_theme_v3/static/js/min/wazuh-documentation.min.js index 608858e47a..89c74905f4 100644 --- a/source/_themes/wazuh_doc_theme_v3/static/js/min/wazuh-documentation.min.js +++ b/source/_themes/wazuh_doc_theme_v3/static/js/min/wazuh-documentation.min.js @@ -1,2 +1,2 @@ -if($(document).ready(function(){if(window.matchMedia){let r=$('head > link[rel="icon"][media]');$.each(r,function(e,t){const n=window.matchMedia(t.media);function o(){n.matches&&(r.remove(),r=$(t).appendTo("head"))}n.addListener(o),o()})}}),"undefined"==typeof versions){const versions=[]}!function(n){window.matchMedia("(hover: hover)").matches&&(n(".navbar-nav .dropdown-toggle").on("mouseenter",function(e){n(this).closest(".dropdown").hasClass("show")||(e.stopPropagation(),n(this).trigger("click"))}),n(".navbar-nav .dropdown-toggle").on("mouseleave",function(e){var t=e.toElement||e.relatedTarget;n(this).closest(".dropdown").hasClass("show")&&t!==n(this).siblings()[0]&&(e.stopPropagation(),n(this).trigger("click"))}),n(".navbar-nav .dropdown-menu").on("mouseleave",function(e){e=e.toElement||e.relatedTarget;n(this).closest(".dropdown").hasClass("show")&&e!==n(this).siblings()[0]&&n(this).siblings().trigger("click")}))}(jQuery);const minVersionRedoc="4.0",useApiRedoc=0<=compareVersion(DOCUMENTATION_OPTIONS.VERSION,minVersionRedoc),newTabNodes=["user-manual/api/reference","cloud-service/apis/reference"];let oursHost=["documentation.wazuh.com"];function compareVersion(n,o){let r=!1;if("string"==typeof n&&"string"==typeof o){let e=n.split("."),t=o.split(".");2<=e.length&&2<=t.length&&(e=e.map(e=>parseInt(e)),t=t.map(e=>parseInt(e)),r=e[0]>t[0]?1:e[0]t[1]?1:e[1]e.setAttribute("aria-selected",!1)),Array.from(t.children).slice(1).forEach(e=>e.setAttribute("hidden",!0))}function selectNamedTabs(t,n=null){var e=document.querySelectorAll(`.sphinx-tabs-tab[name="${t}"]`);Array.from(e).map(e=>e.parentNode).forEach(e=>{null===e.querySelector(`[id="${n}"]`)&&(deselectTabList(e=e.querySelector(`.sphinx-tabs-tab[name="${t}"]`)),selectTab(e))})}window.addEventListener("DOMContentLoaded",()=>{var e=document.querySelectorAll(".sphinx-tabs-tab"),t=document.querySelectorAll('[role="tablist"]'),e=(e.forEach(e=>{e.addEventListener("click",changeTabs)}),t.forEach(e=>{e.addEventListener("keydown",keyTabs)}),session.getItem("sphinx-tabs-last-selected"));null!=e&&selectNamedTabs(e)}),(exports="undefined"==typeof exports?{}:exports).keyTabs=keyTabs,exports.changeTabs=changeTabs,exports.selectTab=selectTab,exports.deselectTabList=deselectTabList,exports.selectNamedTabs=selectNamedTabs,$(function(){$(".admonition").each(function(){var e=$(this);e.hasClass("long")||e.hasClass("not-long")||(2{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},Documentation={init:()=>{Documentation.initDomainIndexTable(),Documentation.initOnKeyListeners()},TRANSLATIONS:{},PLURAL_EXPR:e=>1===e?0:1,LOCALE:"unknown",gettext:e=>{var t=Documentation.TRANSLATIONS[e];switch(typeof t){case"undefined":return e;case"string":return t;default:return t[0]}},ngettext:(e,t,n)=>{var o=Documentation.TRANSLATIONS[e];return"undefined"!=typeof o?o[Documentation.PLURAL_EXPR(n)]:1===n?e:t},addTranslations:e=>{Object.assign(Documentation.TRANSLATIONS,e.messages),Documentation.PLURAL_EXPR=new Function("n",`return (${e.plural_expr})`),Documentation.LOCALE=e.locale},focusSearchBar:()=>{document.querySelectorAll("input[name=q]")[0]?.focus()},initDomainIndexTable:()=>{const t=e=>{var t=e.id.substr(7),t=document.querySelectorAll("tr.cg-"+t);"minus.png"===e.src.substr(-9)?(e.src=e.src.substr(0,e.src.length-9)+"plus.png",t.forEach(e=>e.style.display="none")):(e.src=e.src.substr(0,e.src.length-8)+"minus.png",t.forEach(e=>e.style.display=""))};var e=document.querySelectorAll("img.toggler");e.forEach(e=>e.addEventListener("click",e=>t(e.currentTarget))),e.forEach(e=>e.style.display=""),DOCUMENTATION_OPTIONS.COLLAPSE_INDEX&&e.forEach(t)},initOnKeyListeners:()=>{(DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS||DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)&&document.addEventListener("keydown",e=>{if(!BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)&&!(e.altKey||e.ctrlKey||e.metaKey)){if(!e.shiftKey)switch(e.key){case"ArrowLeft":DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS&&(t=document.querySelector('link[rel="prev"]'))&&t.href&&(window.location.href=t.href,e.preventDefault());break;case"ArrowRight":var t;DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS&&(t=document.querySelector('link[rel="next"]'))&&t.href&&(window.location.href=t.href,e.preventDefault())}"/"===e.key&&DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&(Documentation.focusSearchBar(),e.preventDefault())}})}},_=Documentation.gettext,SPHINX_HIGHLIGHT_ENABLED=(_ready(Documentation.init),!0),_highlight=(t,n,o,r)=>{if(t.nodeType===Node.TEXT_NODE){var s=t.nodeValue,a=t.parentNode,i=s.toLowerCase().indexOf(o);if(0<=i&&!a.classList.contains(r)&&!a.classList.contains("nohighlight")){let e;var l=a.closest("body, svg, foreignObject"),l=l&&l.matches("svg");l?e=document.createElementNS("http://www.w3.org/2000/svg","tspan"):(e=document.createElement("span")).classList.add(r),e.appendChild(document.createTextNode(s.substr(i,o.length))),a.insertBefore(e,a.insertBefore(document.createTextNode(s.substr(i+o.length)),t.nextSibling)),t.nodeValue=s.substr(0,i),l&&(s=document.createElementNS("http://www.w3.org/2000/svg","rect"),i=a.getBBox(),s.x.baseVal.value=i.x,s.y.baseVal.value=i.y,s.width.baseVal.value=i.width,s.height.baseVal.value=i.height,s.setAttribute("class",r),n.push({parent:a,target:s}))}}else t.matches&&!t.matches("button, select, textarea")&&t.childNodes.forEach(e=>_highlight(e,n,o,r))},_highlightText=(e,t,n)=>{var o=[];_highlight(e,o,t,n),o.forEach(e=>e.parent.insertAdjacentElement("beforebegin",e.target))},SphinxHighlight={highlightSearchWords:()=>{if(SPHINX_HIGHLIGHT_ENABLED){var e=new URL(window.location),t=localStorage.getItem("sphinx_highlight_terms")||e.searchParams.get("highlight")||"";localStorage.removeItem("sphinx_highlight_terms"),e.searchParams.delete("highlight"),window.history.replaceState({},"",e);const n=t.toLowerCase().split(/\s+/).filter(e=>e);if(0!==n.length){e=document.querySelectorAll("main>section");const o=e.length?e[0]:document.querySelector("body");window.setTimeout(()=>{n.forEach(e=>_highlightText(o,e,"highlighted"))},10);t=document.getElementById("searchbox");null!==t&&t.appendChild(document.createRange().createContextualFragment('"))}}},hideSearchWords:()=>{document.querySelectorAll("#searchbox .highlight-link").forEach(e=>e.remove()),document.querySelectorAll("span.highlighted").forEach(e=>e.classList.remove("highlighted")),localStorage.removeItem("sphinx_highlight_terms")},initEscapeListener:()=>{DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&document.addEventListener("keydown",e=>{BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&"Escape"===e.key&&(SphinxHighlight.hideSearchWords(),e.preventDefault())})}};function checkEncodeURI(e){return/\%/i.test(e)}if(_ready(SphinxHighlight.highlightSearchWords),_ready(SphinxHighlight.initEscapeListener),jQuery(function(d){const u=DOCUMENTATION_OPTIONS.VERSION,p="undefined"==typeof versions?[]:versions;o=d("#version-selector .current"),s=DOCUMENTATION_OPTIONS.VERSION,0 Version "+p[e]+(0==e?" (current)":"")+"",a==p[0]&&d(".no-latest-notice .link-latest").attr("href",i);return e.html(o),h}function f(t){if(Array.isArray(t))return t;{let e=t.trim();return"/"==(e="#"==(e=(e=e.replace(/\/$/,"/index.html")).replace(/\/{2,}/,"/")).charAt(e.length-1)?e.substring(0,e.length-1):e).charAt(e.length-1)||/.*(\.html|#.*)$/.test(e)||(e+="/"),e=checkEncodeURI(e="/"!=e.charAt(0)?"/"+e:e)?e:encodeURI(e)}}function g(n,e,t,o,s,a){var i=[],l=[];l[e]=t;let c=[];var h=O(e,n=n.reverse());let d="toBoth",u=(h==n.length&&(d="toBottom"),0==h&&(d="toTop"),c.push({page:t,version:e,versionNum:h,direction:d}),0);for(;c.length;){var p,f=c.pop();let e=N(f.page,s),t=S(f,e,n);for(0==t.length&&(1<(p=f.page.split("#")).length&&0!=(e=N(p[0],s)).length&&(f.page=p[0]),t=S(f,e,n));t.length;){var g=t.pop(),m=g.url,b=g.release,y=g.direction,g=O(g.release,n);c.push({page:m,version:b,versionNum:g,direction:y}),l[b]=m}if(1e3<=u)return!(c=[]);u++}for(x in historyArray1=C("toBottom",l,h,n),historyArray2=C("toTop",l,h,n),historyArray1)!{}.hasOwnProperty.call(historyArray1,x)||(i[x]=historyArray1[x]);for(x in historyArray2)!{}.hasOwnProperty.call(historyArray2,x)||(i[x]=historyArray2[x]);t=$(i[n[0]],o);if(!1!==t){var T,v=O(t.release,n);for(r in i)({}).hasOwnProperty.call(i,r)&&(T=O(r,n),parseInt(T)=parseInt(E))&&delete i[r]}return i}function O(e,t){let n=-1;for(i in t)e==t[i]&&(n=i);return n}function N(e,t){var n=[];for(forId in t)if({}.hasOwnProperty.call(t,forId))for(forRelease in t[forId])"target"!=forRelease&&e==t[forId][forRelease]&&n.push(t[forId]);return n}function $(e,t){let n=!1;for(forRelease in t)if({}.hasOwnProperty.call(t,forRelease))for(forUrl in t[forRelease])!{}.hasOwnProperty.call(t[forRelease],forUrl)||e.split("#")[0]!=t[forRelease][forUrl]||((n=[]).release=forRelease,n.url=t[forRelease][forUrl]);return n}function A(e,t){let n=!1;for(forRelease in t)if({}.hasOwnProperty.call(t,forRelease))for(forUrl in t[forRelease])!{}.hasOwnProperty.call(t[forRelease],forUrl)||e.split("#")[0]!=t[forRelease][forUrl]||((n=[]).release=forRelease,n.url=t[forRelease][forUrl]);return n}function S(e,t,n){for(var o=[],r=t;r.length;){var s,a,i,l=r.pop();for(forTarget in l.target)({}).hasOwnProperty.call(l.target,forTarget)&&(s=l.target[forTarget].split("=>"),a=parseInt(O(s[0],n)),i=parseInt(O(s[1],n)),e.page==l[s[0]])&&("toBottom"!=e.direction&&a=a&&o.push({release:s[1],direction:"toBottom",url:l[s[1]]})}return o}function C(e,t,n,o){var r,s=[];for(forVersions in o)({}).hasOwnProperty.call(o,forVersions)&&(forVersions=parseInt(forVersions),"toBottom"==e&&forVersions=n&&(null==t[o[forVersions]]?0!=forVersions&&-1!=(r=c(forVersions,o,s))&&(s[o[forVersions]]=s[o[r]]):s[o[forVersions]]=t[o[forVersions]]);return s}function l(e,t,n){let o=-1;for(i in t)({}).hasOwnProperty.call(t,i)&&(i=parseInt(i))>e&&null!=n[t[i]]&&-1==o&&(o=i);return o}function c(e,t,n){let o=-1;for(i in t)({}).hasOwnProperty.call(t,i)&&(i=parseInt(i))>=e&&null!=n[t[i-1]]&&-1==o&&(o=i-1);return o}e==p[0]&&(e="current"),document.querySelector("link[rel='canonical']")||((s=document.createElement("link")).setAttribute("rel","canonical"),s.setAttribute("href",document.location.protocol+"//"+document.location.host+"/"+e+a),document.head.appendChild(s)),d('#version-selector [data-toggle="tooltip"]').tooltip({container:"header"})}),$("#version-selector a.disable").click(function(e){return e.preventDefault(),e.stopPropagation(),!1}),0<$("#global-toc").length){function completelyHideMenuItems(){$("#global-toc li ul").each(function(){$(this).closest("li").hasClass("show")?(this.hidden=!1,$(this).slideDown(300)):$(this).slideUp(300,function(){this.hidden=!0})})}$("#global-toc .toctree-l1 a").each(function(e){$(this).siblings("ul").length&&($(this).closest("li").addClass("toc-toggle"),$(this).append($('')))}),$("#global-toc .current-toc-node").each(function(){$(this).on("click",function(e){e.preventDefault(),$("html, body").animate({scrollTop:0},"500")})}),$("#global-toc a .toc-toggle-btn").on("click",function(e){return $("#global-toc a .toc-toggle-btn .sr-only").text("Expand submenu"),$(this).find(".sr-only").text("Close submenu"),!(li=$(e.target).closest("li"))||0==li.children("ul").length||(e.stopPropagation(),e.preventDefault(),li.hasClass("show")?li.removeClass("show"):(li.siblings("li").removeClass("show"),li.addClass("show")),li.parents().hasClass("show")||$(".globaltoc li.show").addClass("show"),$(".globaltoc li.initial").removeClass("initial"),completelyHideMenuItems(),!1)}),emptyTocNodes&&(markTocNodesWithClass(emptyTocNodes,"empty-toc-node","#global-toc"),$("#global-toc .current-toc-node").addClass("empty-toc-node")),$("#global-toc .empty-toc-node").each(function(){$(this).on("click",function(e){e.preventDefault(),$(this).find(".toc-toggle-btn").click()})}),useApiRedoc&&(markTocNodesWithClass(newTabNodes,"js-new-tab",""),$(".js-new-tab").attr("target","_blank"));const G1=["Install Wazuh manager on Linux","Install Wazuh agent on Linux"].map(function(e){return e.toLowerCase()});function hideSubtree(e){$("#global-toc a").each(function(){-1!==jQuery.inArray($(this).text().toLowerCase(),e)&&($(this).siblings().hide(),$(this).children("button").hide())})}hideSubtree(G1)}if(0<$("#local-toc").length){const N1=$("#local-toc > .navbar-nav > .nav-item:first-of-type > .nav-link"),O1=$("main:first-of-type > .section:first-of-type");N1.attr("href",N1.attr("href")+O1.attr("id"))}if($("#local-toc .nav-link").on("click",function(e){e=$(e.target).attr("href"),e=$('[href="'+e+'"].headerlink').parent();e.hasClass("collapsed")&&e.click()}),0<$(".document").length){const S1=document.createElement("div");function filterCodeBlock(e,t){var n=e.clone(!0);n.find(".gp").empty();let o=n.text();n=findHeredocs(e),e=getCodeBlockType(t).toLowerCase();return o=String(o),-1===jQuery.inArray(e,["none","bash"])&&(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.replace(/(^|\n)\s*(\.\s{0,1}){3}\s*($|\n)/g,"\n")).replace(/(.+]\$\s)/g,"")).replace(/(.+]\#\s)/g,"")).replace(/ansible@ansible:.+\$\s/g,"")).replace(/mysql>\s/g,"")).replace(/sqlite>\s/g,"")).replace(/Query\s.+\)\n/g,"")).replace(/.+@.+:.+(\#|\$)\s/g,"")).replace(/^>\s/g,"")).replace(/\n>\s/g,"\n")).replace(/(?:\$\s)/g,"")).replace(/\n{2,}$/g,"\n"),-1!==jQuery.inArray(e,["yaml","python","perl","powershell"])||t.is($('[class*="conf"]'))||(o=/<<[^<]/.test(o)?replacePromptOnHeredoc(o,n,e):filterPrompt(o,e))),o=o.trim()}function findHeredocs(e){e=$(e).text().split("\n");const n=[];let o=!1,r,s,a;return e.forEach((e,t)=>{o?closes(r,e.trim())&&(o=!1,(a=t-1)>s)&&n.push({start:s,finish:a}):/<<[^<]/.test(e)&&(o=!0,s=t+1,r=e.split("<<")[1].trim())}),n}function filterPrompt(e,t){return"bash"!=t&&(e=e.replace(/(?:\#\s)/g,"")),e=-1e<=n&&n<=t)||(e=filterPrompt(e,o)),r.push(e)}),r.join("\n")}function closes(e,t){return t.replace(/[-\\'"]/g,"")==e.replace(/[-\\'"]/g,"")}function copyToClipboard(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}S1.setAttribute("class","output-title"),S1.setAttribute("role","button"),S1.innerHTML="Output",$('[class*="highlight-"].output').each(function(){$(this).addClass("collapsible").attr("aria-expanded","false"),$(this).prepend(S1.cloneNode(!0)),$(this).hasClass("collapsed")||$(this).addClass("expanded").attr("aria-expanded","true")}),$('[class*="highlight-"].output.collapsible .output-title').on("click",function(e){const t=$(e.target).closest('[class*="highlight-"]');"false"===t.attr("aria-expanded")?(t.removeClass("collapsed").attr("aria-expanded","true"),setTimeout(function(){t.addClass("expanded")},300)):(t.removeClass("expanded").attr("aria-expanded","false"),setTimeout(function(){t.addClass("collapsed")},300))}),$(".highlight").each(function(){if($(this).parent().hasClass("escaped-tag-signs")){let n=$(this).html();const o=n.split(/\\"+gtFragments.join(">")),t!=o.length-1?n+=e+"\\<":n+=e}),$(this).html(n)}}),$(".highlight").each(function(){const o=/\s+$/g;var e=$(this),t=(e.find(".gp").each(function(){var e=$(this);let t=e.text().match(o),n="";t=t&&t[0].length-1;for(let e=0;e"+n+"").insertAfter(e),e.html(e.html().replace(o," "))}),e.html()),n=getCodeBlockType(e.parent()).toLowerCase();if(-1===jQuery.inArray(n,["none","bash"])){const s=findHeredocs(t);if(null!=t.match(/(?:\$\s|\#)/g)){n=t.split("\n");const a=[];n.forEach(function(e,n){var t=s.find(({start:e})=>e===n),o=s.find(({finish:e})=>e===n),r=s.find(({start:e,finish:t})=>e'+e:o?e+="":r||(e=e.replace(/(?:\$\s)/g,'$ ')),a.push(e)}),e.html(a.join("\n"))}}}),$(".highlight").each(function(){var e=$(this).parent();e.closest('[class*="highlight-"]').hasClass("output")||e.hasClass("no-copy")||e.prepend('')}),$(".copy-to-clipboard").click(function(){const e=$(this);copyToClipboard(filterCodeBlock($(e).parent().find(".highlight"),$(e).parent())),$(e).addClass("copied"),$(e).find("svg").css({display:"none"}).find("span").css({display:"block"}),$(e).find("span").css({display:"block"}),setTimeout(function(){$(e).removeClass("copied")},700),setTimeout(function(){$(e).find("span").css({display:"none"}),$(e).find("svg").css({display:"block"}),$(e).focus()},1e3)})}if($(".document")){const f2="https://DOMAIN";function reponsiveTables(){$("table.docutils:not(.list-rows)").removeClass("table-responsive"),$("table.docutils:not(.list-rows)").each(function(){$(this).width()>$("main > div:first-of-type").width()&&$(this).addClass("table-responsive")})}$('[href^="'+f2+'/"]').each(function(){var e=$(this).attr("href");$(this).attr("href",e.replace(f2+"/",DOCUMENTATION_OPTIONS.URL_ROOT)),$(this).attr("target","_blank")}),$("main .reference.internal").each(function(){const t=this;newTabNodes.forEach(function(e){-1!==t.href.indexOf(e)&&$(t).attr("target","_blank")})}),$(".headerlink").text("Permalink to this headline"),$(".headerlink").attr("title","Permalink to this headline"),reponsiveTables(),$("table.docutils.list-rows").each(function(){$(this).attr("role","presentation")}),$(window).on("resize",reponsiveTables)} +if($(document).ready(function(){if(window.matchMedia){let r=$('head > link[rel="icon"][media]');$.each(r,function(e,t){const n=window.matchMedia(t.media);function o(){n.matches&&(r.remove(),r=$(t).appendTo("head"))}n.addListener(o),o()})}}),"undefined"==typeof versions){const versions=[]}!function(n){window.matchMedia("(hover: hover)").matches&&(n(".navbar-nav .dropdown-toggle").on("mouseenter",function(e){n(this).closest(".dropdown").hasClass("show")||(e.stopPropagation(),n(this).trigger("click"))}),n(".navbar-nav .dropdown-toggle").on("mouseleave",function(e){var t=e.toElement||e.relatedTarget;n(this).closest(".dropdown").hasClass("show")&&t!==n(this).siblings()[0]&&(e.stopPropagation(),n(this).trigger("click"))}),n(".navbar-nav .dropdown-menu").on("mouseleave",function(e){e=e.toElement||e.relatedTarget;n(this).closest(".dropdown").hasClass("show")&&e!==n(this).siblings()[0]&&n(this).siblings().trigger("click")}))}(jQuery);const minVersionRedoc="4.0",useApiRedoc=0<=compareVersion(DOCUMENTATION_OPTIONS.VERSION,minVersionRedoc),newTabNodes=["user-manual/api/reference","cloud-service/apis/reference"];let oursHost=["documentation.wazuh.com"];function compareVersion(n,o){let r=!1;if("string"==typeof n&&"string"==typeof o){let e=n.split("."),t=o.split(".");2<=e.length&&2<=t.length&&(e=e.map(e=>parseInt(e)),t=t.map(e=>parseInt(e)),r=e[0]>t[0]?1:e[0]t[1]?1:e[1]e.setAttribute("aria-selected",!1)),Array.from(t.children).slice(1).forEach(e=>e.setAttribute("hidden",!0))}function selectNamedTabs(t,n=null){var e=document.querySelectorAll(`.sphinx-tabs-tab[name="${t}"]`);Array.from(e).map(e=>e.parentNode).forEach(e=>{null===e.querySelector(`[id="${n}"]`)&&(deselectTabList(e=e.querySelector(`.sphinx-tabs-tab[name="${t}"]`)),selectTab(e))})}window.addEventListener("DOMContentLoaded",()=>{var e=document.querySelectorAll(".sphinx-tabs-tab"),t=document.querySelectorAll('[role="tablist"]'),e=(e.forEach(e=>{e.addEventListener("click",changeTabs)}),t.forEach(e=>{e.addEventListener("keydown",keyTabs)}),session.getItem("sphinx-tabs-last-selected"));null!=e&&selectNamedTabs(e)}),(exports="undefined"==typeof exports?{}:exports).keyTabs=keyTabs,exports.changeTabs=changeTabs,exports.selectTab=selectTab,exports.deselectTabList=deselectTabList,exports.selectNamedTabs=selectNamedTabs,$(function(){$(".admonition").each(function(){var e=$(this);e.hasClass("long")||e.hasClass("not-long")||(2{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},Documentation={init:()=>{Documentation.initDomainIndexTable(),Documentation.initOnKeyListeners()},TRANSLATIONS:{},PLURAL_EXPR:e=>1===e?0:1,LOCALE:"unknown",gettext:e=>{var t=Documentation.TRANSLATIONS[e];switch(typeof t){case"undefined":return e;case"string":return t;default:return t[0]}},ngettext:(e,t,n)=>{var o=Documentation.TRANSLATIONS[e];return"undefined"!=typeof o?o[Documentation.PLURAL_EXPR(n)]:1===n?e:t},addTranslations:e=>{Object.assign(Documentation.TRANSLATIONS,e.messages),Documentation.PLURAL_EXPR=new Function("n",`return (${e.plural_expr})`),Documentation.LOCALE=e.locale},focusSearchBar:()=>{document.querySelectorAll("input[name=q]")[0]?.focus()},initDomainIndexTable:()=>{const t=e=>{var t=e.id.substr(7),t=document.querySelectorAll("tr.cg-"+t);"minus.png"===e.src.substr(-9)?(e.src=e.src.substr(0,e.src.length-9)+"plus.png",t.forEach(e=>e.style.display="none")):(e.src=e.src.substr(0,e.src.length-8)+"minus.png",t.forEach(e=>e.style.display=""))};var e=document.querySelectorAll("img.toggler");e.forEach(e=>e.addEventListener("click",e=>t(e.currentTarget))),e.forEach(e=>e.style.display=""),DOCUMENTATION_OPTIONS.COLLAPSE_INDEX&&e.forEach(t)},initOnKeyListeners:()=>{(DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS||DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)&&document.addEventListener("keydown",e=>{if(!BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)&&!(e.altKey||e.ctrlKey||e.metaKey)){if(!e.shiftKey)switch(e.key){case"ArrowLeft":DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS&&(t=document.querySelector('link[rel="prev"]'))&&t.href&&(window.location.href=t.href,e.preventDefault());break;case"ArrowRight":var t;DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS&&(t=document.querySelector('link[rel="next"]'))&&t.href&&(window.location.href=t.href,e.preventDefault())}"/"===e.key&&DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&(Documentation.focusSearchBar(),e.preventDefault())}})}},_=Documentation.gettext,SPHINX_HIGHLIGHT_ENABLED=(_ready(Documentation.init),!0),_highlight=(t,n,o,r)=>{if(t.nodeType===Node.TEXT_NODE){var s=t.nodeValue,a=t.parentNode,i=s.toLowerCase().indexOf(o);if(0<=i&&!a.classList.contains(r)&&!a.classList.contains("nohighlight")){let e;var l=a.closest("body, svg, foreignObject"),l=l&&l.matches("svg");l?e=document.createElementNS("http://www.w3.org/2000/svg","tspan"):(e=document.createElement("span")).classList.add(r),e.appendChild(document.createTextNode(s.substr(i,o.length))),a.insertBefore(e,a.insertBefore(document.createTextNode(s.substr(i+o.length)),t.nextSibling)),t.nodeValue=s.substr(0,i),l&&(s=document.createElementNS("http://www.w3.org/2000/svg","rect"),i=a.getBBox(),s.x.baseVal.value=i.x,s.y.baseVal.value=i.y,s.width.baseVal.value=i.width,s.height.baseVal.value=i.height,s.setAttribute("class",r),n.push({parent:a,target:s}))}}else t.matches&&!t.matches("button, select, textarea")&&t.childNodes.forEach(e=>_highlight(e,n,o,r))},_highlightText=(e,t,n)=>{var o=[];_highlight(e,o,t,n),o.forEach(e=>e.parent.insertAdjacentElement("beforebegin",e.target))},SphinxHighlight={highlightSearchWords:()=>{if(SPHINX_HIGHLIGHT_ENABLED){var e=new URL(window.location),t=localStorage.getItem("sphinx_highlight_terms")||e.searchParams.get("highlight")||"";localStorage.removeItem("sphinx_highlight_terms"),e.searchParams.delete("highlight"),window.history.replaceState({},"",e);const n=t.toLowerCase().split(/\s+/).filter(e=>e);if(0!==n.length){e=document.querySelectorAll("main>section");const o=e.length?e[0]:document.querySelector("body");window.setTimeout(()=>{n.forEach(e=>_highlightText(o,e,"highlighted"))},10);t=document.getElementById("searchbox");null!==t&&t.appendChild(document.createRange().createContextualFragment('"))}}},hideSearchWords:()=>{document.querySelectorAll("#searchbox .highlight-link").forEach(e=>e.remove()),document.querySelectorAll("span.highlighted").forEach(e=>e.classList.remove("highlighted")),localStorage.removeItem("sphinx_highlight_terms")},initEscapeListener:()=>{DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&document.addEventListener("keydown",e=>{BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS&&"Escape"===e.key&&(SphinxHighlight.hideSearchWords(),e.preventDefault())})}};function checkEncodeURI(e){return/\%/i.test(e)}if(_ready(SphinxHighlight.highlightSearchWords),_ready(SphinxHighlight.initEscapeListener),jQuery(function(d){const u=DOCUMENTATION_OPTIONS.VERSION,p="undefined"==typeof versions?[]:versions;o=d("#version-selector .current"),s=DOCUMENTATION_OPTIONS.VERSION,0 Version "+p[e]+(0==e?" (current)":"")+"",a==p[0]&&d(".no-latest-notice .link-latest").attr("href",i);return e.html(o),h}function f(t){if(Array.isArray(t))return t;{let e=t.trim();return"/"==(e="#"==(e=(e=e.replace(/\/$/,"/index.html")).replace(/\/{2,}/,"/")).charAt(e.length-1)?e.substring(0,e.length-1):e).charAt(e.length-1)||/.*(\.html|#.*)$/.test(e)||(e+="/"),e=checkEncodeURI(e="/"!=e.charAt(0)?"/"+e:e)?e:encodeURI(e)}}function g(n,e,t,o,s,a){var i=[],l=[];l[e]=t;let c=[];var h=O(e,n=n.reverse());let d="toBoth",u=(h==n.length&&(d="toBottom"),0==h&&(d="toTop"),c.push({page:t,version:e,versionNum:h,direction:d}),0);for(;c.length;){var p,f=c.pop();let e=$(f.page,s),t=S(f,e,n);for(0==t.length&&(1<(p=f.page.split("#")).length&&0!=(e=$(p[0],s)).length&&(f.page=p[0]),t=S(f,e,n));t.length;){var g=t.pop(),m=g.url,b=g.release,y=g.direction,g=O(g.release,n);c.push({page:m,version:b,versionNum:g,direction:y}),l[b]=m}if(1e3<=u)return!(c=[]);u++}for(x in historyArray1=C("toBottom",l,h,n),historyArray2=C("toTop",l,h,n),historyArray1)!{}.hasOwnProperty.call(historyArray1,x)||(i[x]=historyArray1[x]);for(x in historyArray2)!{}.hasOwnProperty.call(historyArray2,x)||(i[x]=historyArray2[x]);t=N(i[n[0]],o);if(!1!==t){var T,v=O(t.release,n);for(r in i)({}).hasOwnProperty.call(i,r)&&(T=O(r,n),parseInt(T)=parseInt(E))&&delete i[r]}return i}function O(e,t){let n=-1;for(i in t)e==t[i]&&(n=i);return n}function $(e,t){var n=[];for(forId in t)if({}.hasOwnProperty.call(t,forId))for(forRelease in t[forId])"target"!=forRelease&&e==t[forId][forRelease]&&n.push(t[forId]);return n}function N(e,t){let n=!1;for(forRelease in t)if({}.hasOwnProperty.call(t,forRelease))for(forUrl in t[forRelease])!{}.hasOwnProperty.call(t[forRelease],forUrl)||e.split("#")[0]!=t[forRelease][forUrl]||((n=[]).release=forRelease,n.url=t[forRelease][forUrl]);return n}function A(e,t){let n=!1;for(forRelease in t)if({}.hasOwnProperty.call(t,forRelease))for(forUrl in t[forRelease])!{}.hasOwnProperty.call(t[forRelease],forUrl)||e.split("#")[0]!=t[forRelease][forUrl]||((n=[]).release=forRelease,n.url=t[forRelease][forUrl]);return n}function S(e,t,n){for(var o=[],r=t;r.length;){var s,a,i,l=r.pop();for(forTarget in l.target)({}).hasOwnProperty.call(l.target,forTarget)&&(s=l.target[forTarget].split("=>"),a=parseInt(O(s[0],n)),i=parseInt(O(s[1],n)),e.page==l[s[0]])&&("toBottom"!=e.direction&&a=a&&o.push({release:s[1],direction:"toBottom",url:l[s[1]]})}return o}function C(e,t,n,o){var r,s=[];for(forVersions in o)({}).hasOwnProperty.call(o,forVersions)&&(forVersions=parseInt(forVersions),"toBottom"==e&&forVersions=n&&(null==t[o[forVersions]]?0!=forVersions&&-1!=(r=c(forVersions,o,s))&&(s[o[forVersions]]=s[o[r]]):s[o[forVersions]]=t[o[forVersions]]);return s}function l(e,t,n){let o=-1;for(i in t)({}).hasOwnProperty.call(t,i)&&(i=parseInt(i))>e&&null!=n[t[i]]&&-1==o&&(o=i);return o}function c(e,t,n){let o=-1;for(i in t)({}).hasOwnProperty.call(t,i)&&(i=parseInt(i))>=e&&null!=n[t[i-1]]&&-1==o&&(o=i-1);return o}e==p[0]&&(e="current"),document.querySelector("link[rel='canonical']")||((s=document.createElement("link")).setAttribute("rel","canonical"),s.setAttribute("href",document.location.protocol+"//"+document.location.host+"/"+e+a),document.head.appendChild(s)),d('#version-selector [data-toggle="tooltip"]').tooltip({container:"header"})}),$("#version-selector a.disable").click(function(e){return e.preventDefault(),e.stopPropagation(),!1}),0<$("#global-toc").length){function completelyHideMenuItems(){$("#global-toc li ul").each(function(){$(this).closest("li").hasClass("show")?(this.hidden=!1,$(this).slideDown(300)):$(this).slideUp(300,function(){this.hidden=!0})})}$("#global-toc .toctree-l1 a").each(function(e){$(this).siblings("ul").length&&($(this).closest("li").addClass("toc-toggle"),$(this).append($('')))}),$("#global-toc .current-toc-node").each(function(){$(this).on("click",function(e){e.preventDefault(),$("html, body").animate({scrollTop:0},"500")})}),$("#global-toc a .toc-toggle-btn").on("click",function(e){return $("#global-toc a .toc-toggle-btn .sr-only").text("Expand submenu"),$(this).find(".sr-only").text("Close submenu"),!(li=$(e.target).closest("li"))||0==li.children("ul").length||(e.stopPropagation(),e.preventDefault(),li.hasClass("show")?li.removeClass("show"):(li.siblings("li").removeClass("show"),li.addClass("show")),li.parents().hasClass("show")||$(".globaltoc li.show").addClass("show"),$(".globaltoc li.initial").removeClass("initial"),completelyHideMenuItems(),!1)}),emptyTocNodes&&(markTocNodesWithClass(emptyTocNodes,"empty-toc-node","#global-toc"),$("#global-toc .current-toc-node").addClass("empty-toc-node")),$("#global-toc .empty-toc-node").each(function(){$(this).on("click",function(e){e.preventDefault(),$(this).find(".toc-toggle-btn").click()})}),useApiRedoc&&(markTocNodesWithClass(newTabNodes,"js-new-tab",""),$(".js-new-tab").attr("target","_blank"));const G1=["Install Wazuh manager on Linux","Install Wazuh agent on Linux"].map(function(e){return e.toLowerCase()});function hideSubtree(e){$("#global-toc a").each(function(){-1!==jQuery.inArray($(this).text().toLowerCase(),e)&&($(this).siblings().hide(),$(this).children("button").hide())})}hideSubtree(G1)}if($(document).ready(function(){if(0<$("#local-toc").length){var t=$("#local-toc > .navbar-nav > .nav-item:first-of-type > .nav-link");let e=$("main:first-of-type > .section:first-of-type");var n=(e=0===e.length?$("main:first-of-type > section:first-of-type"):e).attr("id");n&&t.attr("href",t.attr("href")+n)}}),$("#local-toc .nav-link").on("click",function(e){e=$(e.target).attr("href"),e=$('[href="'+e+'"].headerlink').parent();e.hasClass("collapsed")&&e.click()}),0<$(".document").length){const T1=document.createElement("div");function filterCodeBlock(e,t){var n=e.clone(!0);n.find(".gp").empty();let o=n.text();n=findHeredocs(e),e=getCodeBlockType(t).toLowerCase();return o=String(o),-1===jQuery.inArray(e,["none","bash"])&&(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.replace(/(^|\n)\s*(\.\s{0,1}){3}\s*($|\n)/g,"\n")).replace(/(.+]\$\s)/g,"")).replace(/(.+]\#\s)/g,"")).replace(/ansible@ansible:.+\$\s/g,"")).replace(/mysql>\s/g,"")).replace(/sqlite>\s/g,"")).replace(/Query\s.+\)\n/g,"")).replace(/.+@.+:.+(\#|\$)\s/g,"")).replace(/^>\s/g,"")).replace(/\n>\s/g,"\n")).replace(/(?:\$\s)/g,"")).replace(/\n{2,}$/g,"\n"),-1!==jQuery.inArray(e,["yaml","python","perl","powershell"])||t.is($('[class*="conf"]'))||(o=/<<[^<]/.test(o)?replacePromptOnHeredoc(o,n,e):filterPrompt(o,e))),o=o.trim()}function findHeredocs(e){e=$(e).text().split("\n");const n=[];let o=!1,r,s,a;return e.forEach((e,t)=>{o?closes(r,e.trim())&&(o=!1,(a=t-1)>s)&&n.push({start:s,finish:a}):/<<[^<]/.test(e)&&(o=!0,s=t+1,r=e.split("<<")[1].trim())}),n}function filterPrompt(e,t){return"bash"!=t&&(e=e.replace(/(?:\#\s)/g,"")),e=-1e<=n&&n<=t)||(e=filterPrompt(e,o)),r.push(e)}),r.join("\n")}function closes(e,t){return t.replace(/[-\\'"]/g,"")==e.replace(/[-\\'"]/g,"")}function copyToClipboard(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}T1.setAttribute("class","output-title"),T1.setAttribute("role","button"),T1.innerHTML="Output",$('[class*="highlight-"].output').each(function(){$(this).addClass("collapsible").attr("aria-expanded","false"),$(this).prepend(T1.cloneNode(!0)),$(this).hasClass("collapsed")||$(this).addClass("expanded").attr("aria-expanded","true")}),$('[class*="highlight-"].output.collapsible .output-title').on("click",function(e){const t=$(e.target).closest('[class*="highlight-"]');"false"===t.attr("aria-expanded")?(t.removeClass("collapsed").attr("aria-expanded","true"),setTimeout(function(){t.addClass("expanded")},300)):(t.removeClass("expanded").attr("aria-expanded","false"),setTimeout(function(){t.addClass("collapsed")},300))}),$(".highlight").each(function(){if($(this).parent().hasClass("escaped-tag-signs")){let n=$(this).html();const o=n.split(/\\"+gtFragments.join(">")),t!=o.length-1?n+=e+"\\<":n+=e}),$(this).html(n)}}),$(".highlight").each(function(){const o=/\s+$/g;var e=$(this),t=(e.find(".gp").each(function(){var e=$(this);let t=e.text().match(o),n="";t=t&&t[0].length-1;for(let e=0;e"+n+"").insertAfter(e),e.html(e.html().replace(o," "))}),e.html()),n=getCodeBlockType(e.parent()).toLowerCase();if(-1===jQuery.inArray(n,["none","bash"])){const s=findHeredocs(t);if(null!=t.match(/(?:\$\s|\#)/g)){n=t.split("\n");const a=[];n.forEach(function(e,n){var t=s.find(({start:e})=>e===n),o=s.find(({finish:e})=>e===n),r=s.find(({start:e,finish:t})=>e'+e:o?e+="":r||(e=e.replace(/(?:\$\s)/g,'$ ')),a.push(e)}),e.html(a.join("\n"))}}}),$(".highlight").each(function(){var e=$(this).parent();e.closest('[class*="highlight-"]').hasClass("output")||e.hasClass("no-copy")||e.prepend('')}),$(".copy-to-clipboard").click(function(){const e=$(this);copyToClipboard(filterCodeBlock($(e).parent().find(".highlight"),$(e).parent())),$(e).addClass("copied"),$(e).find("svg").css({display:"none"}).find("span").css({display:"block"}),$(e).find("span").css({display:"block"}),setTimeout(function(){$(e).removeClass("copied")},700),setTimeout(function(){$(e).find("span").css({display:"none"}),$(e).find("svg").css({display:"block"}),$(e).focus()},1e3)})}if($(".document")){const g2="https://DOMAIN";function reponsiveTables(){$("table.docutils:not(.list-rows)").removeClass("table-responsive"),$("table.docutils:not(.list-rows)").each(function(){$(this).width()>$("main > div:first-of-type").width()&&$(this).addClass("table-responsive")})}$('[href^="'+g2+'/"]').each(function(){var e=$(this).attr("href");$(this).attr("href",e.replace(g2+"/",DOCUMENTATION_OPTIONS.URL_ROOT)),$(this).attr("target","_blank")}),$("main .reference.internal").each(function(){const t=this;newTabNodes.forEach(function(e){-1!==t.href.indexOf(e)&&$(t).attr("target","_blank")})}),$(".headerlink").text("Permalink to this headline"),$(".headerlink").attr("title","Permalink to this headline"),reponsiveTables(),$("table.docutils.list-rows").each(function(){$(this).attr("role","presentation")}),$(window).on("resize",reponsiveTables)} //# sourceMappingURL=wazuh-documentation.min.js.map \ No newline at end of file