blob: 860b9e8ad5ec518fc0d7b465c7a9db25bdec6c2b [file] [log] [blame]
(function(e){"use strict";e(function(){e('[data-toggle="tooltip"]').tooltip(),e('[data-toggle="popover"]').popover(),e(".popover-dismiss").popover({trigger:"focus"})});function t(e){return e.offset().top+e.outerHeight()}e(function(){var n,o,i,s=e(".js-td-cover");if(!s.length)return;o=t(s),i=e(".js-navbar-scroll").offset().top,n=Math.ceil(e(".js-navbar-scroll").outerHeight()),o-i<n&&e(".js-navbar-scroll").addClass("navbar-bg-onscroll"),e(window).on("scroll",function(){var i=e(".js-navbar-scroll").offset().top-e(window).scrollTop(),s=t(e(".js-td-cover")),o=e(".js-navbar-scroll").offset().top;s-o<n?e(".js-navbar-scroll").addClass("navbar-bg-onscroll"):(e(".js-navbar-scroll").removeClass("navbar-bg-onscroll"),e(".js-navbar-scroll").addClass("navbar-bg-onscroll--fade"))})})})(jQuery),function(e){"use strict";e(function(){var t,e=document.getElementsByTagName("main")[0];if(!e)return;t=e.querySelectorAll("h1, h2, h3, h4, h5, h6"),t.forEach(function(e){if(e.id){var t=document.createElement("a");t.style.visibility="hidden",t.setAttribute("aria-hidden","true"),t.innerHTML=' <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',t.href="#"+e.id,e.insertAdjacentElement("beforeend",t),e.addEventListener("mouseenter",function(){t.style.visibility="initial"}),e.addEventListener("mouseleave",function(){t.style.visibility="hidden"})}})})}(jQuery),function(e){"use strict";var t={init:function(){e(document).ready(function(){e(document).on("keypress",".td-search-input",function(t){if(t.keyCode!==13)return;var n=e(this).val(),s="/update-site/search/?q="+n;return document.location=s,!1})})}};t.init()}(jQuery),function(){var e,t,n=function(){e=document.createElement("div"),e.classList.add("drawioframe"),t=document.createElement("iframe"),e.appendChild(t),document.body.appendChild(e)},s=function(){e&&(document.body.removeChild(e),e=void 0,t=void 0)},o=function(e,o){var i,a,r="https://embed.diagrams.net/";r+="?embed=1&ui=atlas&spin=1&modified=unsavedChanges&proto=json&saveAndEdit=1&noSaveBtn=1",i=document.createElement("div"),i.classList.add("drawio"),e.parentNode.insertBefore(i,e),i.appendChild(e),a=document.createElement("button"),a.classList.add("drawiobtn"),a.insertAdjacentHTML("beforeend",'<i class="fas fa-edit"></i>'),i.appendChild(a),a.addEventListener("click",function(){if(t)return;n();var a=function(n){var i,c,r=t.contentWindow;if(n.data.length>0&&n.source==r){if(i=JSON.parse(n.data),i.event=="init")r.postMessage(JSON.stringify({action:"load",xml:o}),"*");else if(i.event=="save")c=o.indexOf("data:image/png")==0?"xmlpng":"xmlsvg",r.postMessage(JSON.stringify({action:"export",format:c}),"*");else if(i.event=="export"){const n=e.src.replace(/^.*?([^/]+)$/,"$1"),t=document.createElement("a");t.setAttribute("href",i.data),t.setAttribute("download",n),document.body.appendChild(t),t.click(),t.parentNode.removeChild(t)}(i.event=="exit"||i.event=="export")&&(window.removeEventListener("message",a),s())}};window.addEventListener("message",a),t.setAttribute("src",r)})};document.addEventListener("DOMContentLoaded",function(){for(const s of document.getElementsByTagName("img")){const n=s,t=n.getAttribute("src");if(!t.endsWith(".svg")&&!t.endsWith(".png"))continue;const e=new XMLHttpRequest;e.responseType="blob",e.open("GET",t),e.addEventListener("load",function(){const t=new FileReader;t.addEventListener("load",function(){if(t.result.indexOf("mxfile")!=-1){const t=new FileReader;t.addEventListener("load",function(){const e=t.result;o(n,e)}),t.readAsDataURL(e.response)}}),t.readAsBinaryString(e.response)}),e.send()}})}()