From f77a375f6bacee83af320f94c5fd357791e0970d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 27 Feb 2024 15:11:06 +0100 Subject: [PATCH] Deployed 95d32b4 with MkDocs version: 1.5.3 --- 404.html | 2 +- assets/_markdown_exec_ansi.css | 266 ------------ assets/_mkdocstrings.css | 37 ++ assets/javascripts/bundle.0e2aa882.min.js | 3 + assets/javascripts/bundle.7c5c0157.min.js | 3 - assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + ...6c7302c4.min.js => search.1e90e0fb.min.js} | 4 +- assets/stylesheets/main.3a36e643.min.css | 1 - assets/stylesheets/main.ede334a4.min.css | 1 + assets/stylesheets/palette.ab4e12ef.min.css | 1 + assets/stylesheets/palette.ecc776e4.min.css | 1 - changelog/index.html | 2 +- code_of_conduct/index.html | 2 +- contributing/index.html | 6 +- coverage/index.html | 4 +- credits/index.html | 2 +- css/mkdocstrings.css | 1 + index.html | 44 +- license/index.html | 4 +- objects.inv | Bin 415 -> 587 bytes reference/SUMMARY.txt | 3 - reference/SUMMARY/index.html | 1 + reference/mkdocs_autorefs/debug/index.html | 90 ++++ reference/mkdocs_autorefs/index.html | 2 +- reference/mkdocs_autorefs/plugin/index.html | 126 +++--- .../mkdocs_autorefs/references/index.html | 405 ++++++++++-------- search/search_index.json | 2 +- sitemap.xml | 30 +- sitemap.xml.gz | Bin 298 -> 319 bytes 30 files changed, 510 insertions(+), 535 deletions(-) delete mode 100644 assets/_markdown_exec_ansi.css create mode 100644 assets/javascripts/bundle.0e2aa882.min.js delete mode 100644 assets/javascripts/bundle.7c5c0157.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js rename assets/javascripts/workers/{search.6c7302c4.min.js => search.1e90e0fb.min.js} (73%) delete mode 100644 assets/stylesheets/main.3a36e643.min.css create mode 100644 assets/stylesheets/main.ede334a4.min.css create mode 100644 assets/stylesheets/palette.ab4e12ef.min.css delete mode 100644 assets/stylesheets/palette.ecc776e4.min.css delete mode 100644 reference/SUMMARY.txt create mode 100644 reference/SUMMARY/index.html create mode 100644 reference/mkdocs_autorefs/debug/index.html diff --git a/404.html b/404.html index 6562f07..483d1fd 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ - mkdocs-autorefs

404 - Not found

\ No newline at end of file + mkdocs-autorefs

404 - Not found

\ No newline at end of file diff --git a/assets/_markdown_exec_ansi.css b/assets/_markdown_exec_ansi.css deleted file mode 100644 index 4c1b8a5..0000000 --- a/assets/_markdown_exec_ansi.css +++ /dev/null @@ -1,266 +0,0 @@ -/* - Inspired by https://spec.draculatheme.com/ specification, they should work - decently with both dark and light themes. - */ -:root { - --ansi-red: #ff5555; - --ansi-green: #50fa7b; - --ansi-blue: #265285; - --ansi-yellow: #ffb86c; - --ansi-magenta: #bd93f9; - --ansi-cyan: #8be9fd; - --ansi-black: #282a36; - --ansi-white: #f8f8f2; -} - -.-Color-Green, -.-Color-Faint-Green, -.-Color-Bold-Green { - color: var(--ansi-green); -} - -.-Color-Red, -.-Color-Faint-Red, -.-Color-Bold-Red { - color: var(--ansi-red); -} - -.-Color-Yellow, -.-Color-Faint-Yellow, -.-Color-Bold-Yellow { - color: var(--ansi-yellow); -} - -.-Color-Blue, -.-Color-Faint-Blue, -.-Color-Bold-Blue { - color: var(--ansi-blue); -} - -.-Color-Magenta, -.-Color-Faint-Magenta, -.-Color-Bold-Magenta { - color: var(--ansi-magenta); -} - -.-Color-Cyan, -.-Color-Faint-Cyan, -.-Color-Bold-Cyan { - color: var(--ansi-cyan); -} - -.-Color-White, -.-Color-Faint-White, -.-Color-Bold-White { - color: var(--ansi-white); -} - -.-Color-Black, -.-Color-Faint-Black, -.-Color-Bold-Black { - color: var(--ansi-black); -} - -.-Color-Faint { - opacity: 0.5; -} - -.-Color-Bold { - font-weight: bold; -} - -.-Color-BGBlack, -.-Color-Black-BGBlack, -.-Color-Blue-BGBlack, -.-Color-Bold-BGBlack, -.-Color-Bold-Black-BGBlack, -.-Color-Bold-Green-BGBlack, -.-Color-Bold-Cyan-BGBlack, -.-Color-Bold-Blue-BGBlack, -.-Color-Bold-Magenta-BGBlack, -.-Color-Bold-Red-BGBlack, -.-Color-Bold-White-BGBlack, -.-Color-Bold-Yellow-BGBlack, -.-Color-Cyan-BGBlack, -.-Color-Green-BGBlack, -.-Color-Magenta-BGBlack, -.-Color-Red-BGBlack, -.-Color-White-BGBlack, -.-Color-Yellow-BGBlack { - background-color: var(--ansi-black); -} - -.-Color-BGRed, -.-Color-Black-BGRed, -.-Color-Blue-BGRed, -.-Color-Bold-BGRed, -.-Color-Bold-Black-BGRed, -.-Color-Bold-Green-BGRed, -.-Color-Bold-Cyan-BGRed, -.-Color-Bold-Blue-BGRed, -.-Color-Bold-Magenta-BGRed, -.-Color-Bold-Red-BGRed, -.-Color-Bold-White-BGRed, -.-Color-Bold-Yellow-BGRed, -.-Color-Cyan-BGRed, -.-Color-Green-BGRed, -.-Color-Magenta-BGRed, -.-Color-Red-BGRed, -.-Color-White-BGRed, -.-Color-Yellow-BGRed { - background-color: var(--ansi-red); -} - -.-Color-BGGreen, -.-Color-Black-BGGreen, -.-Color-Blue-BGGreen, -.-Color-Bold-BGGreen, -.-Color-Bold-Black-BGGreen, -.-Color-Bold-Green-BGGreen, -.-Color-Bold-Cyan-BGGreen, -.-Color-Bold-Blue-BGGreen, -.-Color-Bold-Magenta-BGGreen, -.-Color-Bold-Red-BGGreen, -.-Color-Bold-White-BGGreen, -.-Color-Bold-Yellow-BGGreen, -.-Color-Cyan-BGGreen, -.-Color-Green-BGGreen, -.-Color-Magenta-BGGreen, -.-Color-Red-BGGreen, -.-Color-White-BGGreen, -.-Color-Yellow-BGGreen { - background-color: var(--ansi-green); -} - -.-Color-BGYellow, -.-Color-Black-BGYellow, -.-Color-Blue-BGYellow, -.-Color-Bold-BGYellow, -.-Color-Bold-Black-BGYellow, -.-Color-Bold-Green-BGYellow, -.-Color-Bold-Cyan-BGYellow, -.-Color-Bold-Blue-BGYellow, -.-Color-Bold-Magenta-BGYellow, -.-Color-Bold-Red-BGYellow, -.-Color-Bold-White-BGYellow, -.-Color-Bold-Yellow-BGYellow, -.-Color-Cyan-BGYellow, -.-Color-Green-BGYellow, -.-Color-Magenta-BGYellow, -.-Color-Red-BGYellow, -.-Color-White-BGYellow, -.-Color-Yellow-BGYellow { - background-color: var(--ansi-yellow); -} - -.-Color-BGBlue, -.-Color-Black-BGBlue, -.-Color-Blue-BGBlue, -.-Color-Bold-BGBlue, -.-Color-Bold-Black-BGBlue, -.-Color-Bold-Green-BGBlue, -.-Color-Bold-Cyan-BGBlue, -.-Color-Bold-Blue-BGBlue, -.-Color-Bold-Magenta-BGBlue, -.-Color-Bold-Red-BGBlue, -.-Color-Bold-White-BGBlue, -.-Color-Bold-Yellow-BGBlue, -.-Color-Cyan-BGBlue, -.-Color-Green-BGBlue, -.-Color-Magenta-BGBlue, -.-Color-Red-BGBlue, -.-Color-White-BGBlue, -.-Color-Yellow-BGBlue { - background-color: var(--ansi-blue); -} - -.-Color-BGMagenta, -.-Color-Black-BGMagenta, -.-Color-Blue-BGMagenta, -.-Color-Bold-BGMagenta, -.-Color-Bold-Black-BGMagenta, -.-Color-Bold-Green-BGMagenta, -.-Color-Bold-Cyan-BGMagenta, -.-Color-Bold-Blue-BGMagenta, -.-Color-Bold-Magenta-BGMagenta, -.-Color-Bold-Red-BGMagenta, -.-Color-Bold-White-BGMagenta, -.-Color-Bold-Yellow-BGMagenta, -.-Color-Cyan-BGMagenta, -.-Color-Green-BGMagenta, -.-Color-Magenta-BGMagenta, -.-Color-Red-BGMagenta, -.-Color-White-BGMagenta, -.-Color-Yellow-BGMagenta { - background-color: var(--ansi-magenta); -} - -.-Color-BGCyan, -.-Color-Black-BGCyan, -.-Color-Blue-BGCyan, -.-Color-Bold-BGCyan, -.-Color-Bold-Black-BGCyan, -.-Color-Bold-Green-BGCyan, -.-Color-Bold-Cyan-BGCyan, -.-Color-Bold-Blue-BGCyan, -.-Color-Bold-Magenta-BGCyan, -.-Color-Bold-Red-BGCyan, -.-Color-Bold-White-BGCyan, -.-Color-Bold-Yellow-BGCyan, -.-Color-Cyan-BGCyan, -.-Color-Green-BGCyan, -.-Color-Magenta-BGCyan, -.-Color-Red-BGCyan, -.-Color-White-BGCyan, -.-Color-Yellow-BGCyan { - background-color: var(--ansi-cyan); -} - -.-Color-BGWhite, -.-Color-Black-BGWhite, -.-Color-Blue-BGWhite, -.-Color-Bold-BGWhite, -.-Color-Bold-Black-BGWhite, -.-Color-Bold-Green-BGWhite, -.-Color-Bold-Cyan-BGWhite, -.-Color-Bold-Blue-BGWhite, -.-Color-Bold-Magenta-BGWhite, -.-Color-Bold-Red-BGWhite, -.-Color-Bold-White-BGWhite, -.-Color-Bold-Yellow-BGWhite, -.-Color-Cyan-BGWhite, -.-Color-Green-BGWhite, -.-Color-Magenta-BGWhite, -.-Color-Red-BGWhite, -.-Color-White-BGWhite, -.-Color-Yellow-BGWhite { - background-color: var(--ansi-white); -} - -.-Color-Black, -.-Color-Bold-Black, -.-Color-Black-BGBlack, -.-Color-Bold-Black-BGBlack, -.-Color-Black-BGGreen, -.-Color-Red-BGRed, -.-Color-Bold-Red-BGRed, -.-Color-Bold-Blue-BGBlue, -.-Color-Blue-BGBlue { - text-shadow: 0 0 1px var(--ansi-white); -} - -.-Color-Bold-Cyan-BGCyan, -.-Color-Bold-Magenta-BGMagenta, -.-Color-Bold-White, -.-Color-Bold-Yellow-BGYellow, -.-Color-Bold-Green-BGGreen, -.-Color-Cyan-BGCyan, -.-Color-Cyan-BGGreen, -.-Color-Green-BGCyan, -.-Color-Green-BGGreen, -.-Color-Magenta-BGMagenta, -.-Color-White, -.-Color-White-BGWhite, -.-Color-Yellow-BGYellow { - text-shadow: 0 0 1px var(--ansi-black); -} \ No newline at end of file diff --git a/assets/_mkdocstrings.css b/assets/_mkdocstrings.css index ce58265..d362d5b 100644 --- a/assets/_mkdocstrings.css +++ b/assets/_mkdocstrings.css @@ -26,28 +26,47 @@ float: right; } +/* Parameter headings must be inline, not blocks. */ +.doc-heading-parameter { + display: inline; +} + +/* Prefer space on the right, not the left of parameter permalinks. */ +.doc-heading-parameter .headerlink { + margin-left: 0 !important; + margin-right: 0.2rem; +} + /* Symbols in Navigation and ToC. */ :root, [data-md-color-scheme="default"] { + --doc-symbol-parameter-fg-color: #df50af; --doc-symbol-attribute-fg-color: #953800; --doc-symbol-function-fg-color: #8250df; + --doc-symbol-method-fg-color: #8250df; --doc-symbol-class-fg-color: #0550ae; --doc-symbol-module-fg-color: #5cad0f; + --doc-symbol-parameter-bg-color: #df50af1a; --doc-symbol-attribute-bg-color: #9538001a; --doc-symbol-function-bg-color: #8250df1a; + --doc-symbol-method-bg-color: #8250df1a; --doc-symbol-class-bg-color: #0550ae1a; --doc-symbol-module-bg-color: #5cad0f1a; } [data-md-color-scheme="slate"] { + --doc-symbol-parameter-fg-color: #ffa8cc; --doc-symbol-attribute-fg-color: #ffa657; --doc-symbol-function-fg-color: #d2a8ff; + --doc-symbol-method-fg-color: #d2a8ff; --doc-symbol-class-fg-color: #79c0ff; --doc-symbol-module-fg-color: #baff79; + --doc-symbol-parameter-bg-color: #ffa8cc1a; --doc-symbol-attribute-bg-color: #ffa6571a; --doc-symbol-function-bg-color: #d2a8ff1a; + --doc-symbol-method-bg-color: #d2a8ff1a; --doc-symbol-class-bg-color: #79c0ff1a; --doc-symbol-module-bg-color: #baff791a; } @@ -59,6 +78,15 @@ code.doc-symbol { font-weight: bold; } +code.doc-symbol-parameter { + color: var(--doc-symbol-parameter-fg-color); + background-color: var(--doc-symbol-parameter-bg-color); +} + +code.doc-symbol-parameter::after { + content: "param"; +} + code.doc-symbol-attribute { color: var(--doc-symbol-attribute-fg-color); background-color: var(--doc-symbol-attribute-bg-color); @@ -77,6 +105,15 @@ code.doc-symbol-function::after { content: "func"; } +code.doc-symbol-method { + color: var(--doc-symbol-method-fg-color); + background-color: var(--doc-symbol-method-bg-color); +} + +code.doc-symbol-method::after { + content: "meth"; +} + code.doc-symbol-class { color: var(--doc-symbol-class-fg-color); background-color: var(--doc-symbol-class-bg-color); diff --git a/assets/javascripts/bundle.0e2aa882.min.js b/assets/javascripts/bundle.0e2aa882.min.js new file mode 100644 index 0000000..9eb7c34 --- /dev/null +++ b/assets/javascripts/bundle.0e2aa882.min.js @@ -0,0 +1,3 @@ +"use strict";(()=>{var Bi=Object.create;var _r=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Ji=Object.getOwnPropertyNames,Bt=Object.getOwnPropertySymbols,Xi=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable;var uo=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))Ar.call(t,r)&&uo(e,r,t[r]);if(Bt)for(var r of Bt(t))ho.call(t,r)&&uo(e,r,t[r]);return e};var bo=(e,t)=>{var r={};for(var o in e)Ar.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Bt)for(var o of Bt(e))t.indexOf(o)<0&&ho.call(e,o)&&(r[o]=e[o]);return r};var Cr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ji(t))!Ar.call(e,n)&&n!==r&&_r(e,n,{get:()=>t[n],enumerable:!(o=Gi(t,n))||o.enumerable});return e};var Gt=(e,t,r)=>(r=e!=null?Bi(Xi(e)):{},Zi(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var vo=(e,t,r)=>new Promise((o,n)=>{var i=c=>{try{a(r.next(c))}catch(p){n(p)}},s=c=>{try{a(r.throw(c))}catch(p){n(p)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(i,s);a((r=r.apply(e,t)).next())});var xo=Cr((Hr,go)=>{(function(e,t){typeof Hr=="object"&&typeof go!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Hr,function(){"use strict";function e(r){var o=!0,n=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(H){return!!(H&&H!==document&&H.nodeName!=="HTML"&&H.nodeName!=="BODY"&&"classList"in H&&"contains"in H.classList)}function c(H){var mt=H.type,Fe=H.tagName;return!!(Fe==="INPUT"&&s[mt]&&!H.readOnly||Fe==="TEXTAREA"&&!H.readOnly||H.isContentEditable)}function p(H){H.classList.contains("focus-visible")||(H.classList.add("focus-visible"),H.setAttribute("data-focus-visible-added",""))}function l(H){H.hasAttribute("data-focus-visible-added")&&(H.classList.remove("focus-visible"),H.removeAttribute("data-focus-visible-added"))}function f(H){H.metaKey||H.altKey||H.ctrlKey||(a(r.activeElement)&&p(r.activeElement),o=!0)}function u(H){o=!1}function d(H){a(H.target)&&(o||c(H.target))&&p(H.target)}function g(H){a(H.target)&&(H.target.classList.contains("focus-visible")||H.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout(function(){n=!1},100),l(H.target))}function M(H){document.visibilityState==="hidden"&&(n&&(o=!0),ee())}function ee(){document.addEventListener("mousemove",Z),document.addEventListener("mousedown",Z),document.addEventListener("mouseup",Z),document.addEventListener("pointermove",Z),document.addEventListener("pointerdown",Z),document.addEventListener("pointerup",Z),document.addEventListener("touchmove",Z),document.addEventListener("touchstart",Z),document.addEventListener("touchend",Z)}function ne(){document.removeEventListener("mousemove",Z),document.removeEventListener("mousedown",Z),document.removeEventListener("mouseup",Z),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerdown",Z),document.removeEventListener("pointerup",Z),document.removeEventListener("touchmove",Z),document.removeEventListener("touchstart",Z),document.removeEventListener("touchend",Z)}function Z(H){H.target.nodeName&&H.target.nodeName.toLowerCase()==="html"||(o=!1,ne())}document.addEventListener("keydown",f,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",M,!0),ee(),r.addEventListener("focus",d,!0),r.addEventListener("blur",g,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var ao=Cr((Vt,io)=>{(function(t,r){typeof Vt=="object"&&typeof io=="object"?io.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Vt=="object"?Vt.ClipboardJS=r():t.ClipboardJS=r()})(Vt,function(){return function(){var e={686:function(o,n,i){"use strict";i.d(n,{default:function(){return Yi}});var s=i(279),a=i.n(s),c=i(370),p=i.n(c),l=i(817),f=i.n(l);function u(z){try{return document.execCommand(z)}catch(A){return!1}}var d=function(A){var L=f()(A);return u("cut"),L},g=d;function M(z){var A=document.documentElement.getAttribute("dir")==="rtl",L=document.createElement("textarea");L.style.fontSize="12pt",L.style.border="0",L.style.padding="0",L.style.margin="0",L.style.position="absolute",L.style[A?"right":"left"]="-9999px";var D=window.pageYOffset||document.documentElement.scrollTop;return L.style.top="".concat(D,"px"),L.setAttribute("readonly",""),L.value=z,L}var ee=function(A,L){var D=M(A);L.container.appendChild(D);var N=f()(D);return u("copy"),D.remove(),N},ne=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},D="";return typeof A=="string"?D=ee(A,L):A instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(A==null?void 0:A.type)?D=ee(A.value,L):(D=f()(A),u("copy")),D},Z=ne;function H(z){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(L){return typeof L}:H=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},H(z)}var mt=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=A.action,D=L===void 0?"copy":L,N=A.container,G=A.target,We=A.text;if(D!=="copy"&&D!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(G!==void 0)if(G&&H(G)==="object"&&G.nodeType===1){if(D==="copy"&&G.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(D==="cut"&&(G.hasAttribute("readonly")||G.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(We)return Z(We,{container:N});if(G)return D==="cut"?g(G):Z(G,{container:N})},Fe=mt;function P(z){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(L){return typeof L}:P=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},P(z)}function se(z,A){if(!(z instanceof A))throw new TypeError("Cannot call a class as a function")}function ce(z,A){for(var L=0;L0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof N.action=="function"?N.action:this.defaultAction,this.target=typeof N.target=="function"?N.target:this.defaultTarget,this.text=typeof N.text=="function"?N.text:this.defaultText,this.container=P(N.container)==="object"?N.container:document.body}},{key:"listenClick",value:function(N){var G=this;this.listener=p()(N,"click",function(We){return G.onClick(We)})}},{key:"onClick",value:function(N){var G=N.delegateTarget||N.currentTarget,We=this.action(G)||"copy",Yt=Fe({action:We,container:this.container,target:this.target(G),text:this.text(G)});this.emit(Yt?"success":"error",{action:We,text:Yt,trigger:G,clearSelection:function(){G&&G.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(N){return Lr("action",N)}},{key:"defaultTarget",value:function(N){var G=Lr("target",N);if(G)return document.querySelector(G)}},{key:"defaultText",value:function(N){return Lr("text",N)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return Z(N,G)}},{key:"cut",value:function(N){return g(N)}},{key:"isSupported",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],G=typeof N=="string"?[N]:N,We=!!document.queryCommandSupported;return G.forEach(function(Yt){We=We&&!!document.queryCommandSupported(Yt)}),We}}]),L}(a()),Yi=Qi},828:function(o){var n=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function s(a,c){for(;a&&a.nodeType!==n;){if(typeof a.matches=="function"&&a.matches(c))return a;a=a.parentNode}}o.exports=s},438:function(o,n,i){var s=i(828);function a(l,f,u,d,g){var M=p.apply(this,arguments);return l.addEventListener(u,M,g),{destroy:function(){l.removeEventListener(u,M,g)}}}function c(l,f,u,d,g){return typeof l.addEventListener=="function"?a.apply(null,arguments):typeof u=="function"?a.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(M){return a(M,f,u,d,g)}))}function p(l,f,u,d){return function(g){g.delegateTarget=s(g.target,f),g.delegateTarget&&d.call(l,g)}}o.exports=c},879:function(o,n){n.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},n.nodeList=function(i){var s=Object.prototype.toString.call(i);return i!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in i&&(i.length===0||n.node(i[0]))},n.string=function(i){return typeof i=="string"||i instanceof String},n.fn=function(i){var s=Object.prototype.toString.call(i);return s==="[object Function]"}},370:function(o,n,i){var s=i(879),a=i(438);function c(u,d,g){if(!u&&!d&&!g)throw new Error("Missing required arguments");if(!s.string(d))throw new TypeError("Second argument must be a String");if(!s.fn(g))throw new TypeError("Third argument must be a Function");if(s.node(u))return p(u,d,g);if(s.nodeList(u))return l(u,d,g);if(s.string(u))return f(u,d,g);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(u,d,g){return u.addEventListener(d,g),{destroy:function(){u.removeEventListener(d,g)}}}function l(u,d,g){return Array.prototype.forEach.call(u,function(M){M.addEventListener(d,g)}),{destroy:function(){Array.prototype.forEach.call(u,function(M){M.removeEventListener(d,g)})}}}function f(u,d,g){return a(document.body,u,d,g)}o.exports=c},817:function(o){function n(i){var s;if(i.nodeName==="SELECT")i.focus(),s=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var a=i.hasAttribute("readonly");a||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),a||i.removeAttribute("readonly"),s=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),p=document.createRange();p.selectNodeContents(i),c.removeAllRanges(),c.addRange(p),s=c.toString()}return s}o.exports=n},279:function(o){function n(){}n.prototype={on:function(i,s,a){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:s,ctx:a}),this},once:function(i,s,a){var c=this;function p(){c.off(i,p),s.apply(a,arguments)}return p._=s,this.on(i,p,a)},emit:function(i){var s=[].slice.call(arguments,1),a=((this.e||(this.e={}))[i]||[]).slice(),c=0,p=a.length;for(c;c{"use strict";var ms=/["'&<>]/;di.exports=fs;function fs(e){var t=""+e,r=ms.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(a){s={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}function Y(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o1||a(u,d)})})}function a(u,d){try{c(o[u](d))}catch(g){f(i[0][3],g)}}function c(u){u.value instanceof ft?Promise.resolve(u.value.v).then(p,l):f(i[0][2],u)}function p(u){a("next",u)}function l(u){a("throw",u)}function f(u,d){u(d),i.shift(),i.length&&a(i[0][0],i[0][1])}}function wo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Oe=="function"?Oe(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),n(a,c,s.done,s.value)})}}function n(i,s,a,c){Promise.resolve(c).then(function(p){i({value:p,done:a})},s)}}function I(e){return typeof e=="function"}function gt(e){var t=function(o){Error.call(o),o.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Xt=gt(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: +`+r.map(function(o,n){return n+1+") "+o.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=r}});function Je(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ze=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,o,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Oe(s),c=a.next();!c.done;c=a.next()){var p=c.value;p.remove(this)}}catch(M){t={error:M}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(I(l))try{l()}catch(M){i=M instanceof Xt?M.errors:[M]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var u=Oe(f),d=u.next();!d.done;d=u.next()){var g=d.value;try{To(g)}catch(M){i=i!=null?i:[],M instanceof Xt?i=Y(Y([],K(i)),K(M.errors)):i.push(M)}}}catch(M){o={error:M}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}}if(i)throw new Xt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)To(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Je(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Je(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var kr=ze.EMPTY;function Zt(e){return e instanceof ze||e&&"closed"in e&&I(e.remove)&&I(e.add)&&I(e.unsubscribe)}function To(e){I(e)?e():e.unsubscribe()}var Ue={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var xt={setTimeout:function(e,t){for(var r=[],o=2;o0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var o=this,n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?kr:(this.currentObservers=null,a.push(r),new ze(function(){o.currentObservers=null,Je(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var o=this,n=o.hasError,i=o.thrownError,s=o.isStopped;n?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new j;return r.source=this,r},t.create=function(r,o){return new Ho(r,o)},t}(j);var Ho=function(e){ie(t,e);function t(r,o){var n=e.call(this)||this;return n.destination=r,n.source=o,n}return t.prototype.next=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,r)},t.prototype.error=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,r)},t.prototype.complete=function(){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||o===void 0||o.call(r)},t.prototype._subscribe=function(r){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(r))!==null&&n!==void 0?n:kr},t}(w);var jr=function(e){ie(t,e);function t(r){var o=e.call(this)||this;return o._value=r,o}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var o=e.prototype._subscribe.call(this,r);return!o.closed&&r.next(this._value),o},t.prototype.getValue=function(){var r=this,o=r.hasError,n=r.thrownError,i=r._value;if(o)throw n;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(w);var Pt={now:function(){return(Pt.delegate||Date).now()},delegate:void 0};var It=function(e){ie(t,e);function t(r,o,n){r===void 0&&(r=1/0),o===void 0&&(o=1/0),n===void 0&&(n=Pt);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(r){var o=this,n=o.isStopped,i=o._buffer,s=o._infiniteTimeWindow,a=o._timestampProvider,c=o._windowTime;n||(i.push(r),!s&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(r),n=this,i=n._infiniteTimeWindow,s=n._buffer,a=s.slice(),c=0;c0?e.prototype.schedule.call(this,r,o):(this.delay=o,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,o){return o>0||this.closed?e.prototype.execute.call(this,r,o):this._execute(r,o)},t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!=null&&n>0||n==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.flush(this),0)},t}(Tt);var Ro=function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(St);var Dr=new Ro(ko);var Po=function(e){ie(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n}return t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!==null&&n>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.actions.push(this),r._scheduled||(r._scheduled=wt.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,o,n);var s=r.actions;o!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==o&&(wt.cancelAnimationFrame(o),r._scheduled=void 0)},t}(Tt);var Io=function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var o=this._scheduled;this._scheduled=void 0;var n=this.actions,i;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while((r=n[0])&&r.id===o&&n.shift());if(this._active=!1,i){for(;(r=n[0])&&r.id===o&&n.shift();)r.unsubscribe();throw i}},t}(St);var ge=new Io(Po);var x=new j(function(e){return e.complete()});function rr(e){return e&&I(e.schedule)}function Nr(e){return e[e.length-1]}function st(e){return I(Nr(e))?e.pop():void 0}function Ie(e){return rr(Nr(e))?e.pop():void 0}function or(e,t){return typeof Nr(e)=="number"?e.pop():t}var Ot=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nr(e){return I(e==null?void 0:e.then)}function ir(e){return I(e[Et])}function ar(e){return Symbol.asyncIterator&&I(e==null?void 0:e[Symbol.asyncIterator])}function sr(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ca(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cr=ca();function pr(e){return I(e==null?void 0:e[cr])}function lr(e){return Eo(this,arguments,function(){var r,o,n,i;return Jt(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,ft(r.read())];case 3:return o=s.sent(),n=o.value,i=o.done,i?[4,ft(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,ft(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function mr(e){return I(e==null?void 0:e.getReader)}function W(e){if(e instanceof j)return e;if(e!=null){if(ir(e))return pa(e);if(Ot(e))return la(e);if(nr(e))return ma(e);if(ar(e))return Fo(e);if(pr(e))return fa(e);if(mr(e))return ua(e)}throw sr(e)}function pa(e){return new j(function(t){var r=e[Et]();if(I(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function la(e){return new j(function(t){for(var r=0;r=2;return function(o){return o.pipe(e?v(function(n,i){return e(n,i,o)}):be,ye(1),r?tt(t):en(function(){return new ur}))}}function Yr(e){return e<=0?function(){return x}:y(function(t,r){var o=[];t.subscribe(E(r,function(n){o.push(n),e=2,!0))}function le(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new w}:t,o=e.resetOnError,n=o===void 0?!0:o,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(p){var l,f,u,d=0,g=!1,M=!1,ee=function(){f==null||f.unsubscribe(),f=void 0},ne=function(){ee(),l=u=void 0,g=M=!1},Z=function(){var H=l;ne(),H==null||H.unsubscribe()};return y(function(H,mt){d++,!M&&!g&&ee();var Fe=u=u!=null?u:r();mt.add(function(){d--,d===0&&!M&&!g&&(f=Br(Z,c))}),Fe.subscribe(mt),!l&&d>0&&(l=new dt({next:function(P){return Fe.next(P)},error:function(P){M=!0,ee(),f=Br(ne,n,P),Fe.error(P)},complete:function(){g=!0,ee(),f=Br(ne,s),Fe.complete()}}),W(H).subscribe(l))})(p)}}function Br(e,t){for(var r=[],o=2;oe.next(document)),e}function C(e,t=document){return Array.from(t.querySelectorAll(e))}function F(e,t=document){let r=fe(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function fe(e,t=document){return t.querySelector(e)||void 0}function Ve(){var e,t,r,o;return(o=(r=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.activeElement)!=null?r:document.activeElement)!=null?o:void 0}var Ha=T(h(document.body,"focusin"),h(document.body,"focusout")).pipe(Ae(1),q(void 0),m(()=>Ve()||document.body),X(1));function Ke(e){return Ha.pipe(m(t=>e.contains(t)),Q())}function ot(e,t){return $(()=>T(h(e,"mouseenter").pipe(m(()=>!0)),h(e,"mouseleave").pipe(m(()=>!1))).pipe(t?jt(r=>He(+!r*t)):be,q(e.matches(":hover"))))}function an(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)an(e,r)}function O(e,t,...r){let o=document.createElement(e);if(t)for(let n of Object.keys(t))typeof t[n]!="undefined"&&(typeof t[n]!="boolean"?o.setAttribute(n,t[n]):o.setAttribute(n,""));for(let n of r)an(o,n);return o}function br(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function _t(e){let t=O("script",{src:e});return $(()=>(document.head.appendChild(t),T(h(t,"load"),h(t,"error").pipe(b(()=>Vr(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(m(()=>{}),_(()=>document.head.removeChild(t)),ye(1))))}var sn=new w,$a=$(()=>typeof ResizeObserver=="undefined"?_t("https://unpkg.com/resize-observer-polyfill"):R(void 0)).pipe(m(()=>new ResizeObserver(e=>e.forEach(t=>sn.next(t)))),b(e=>T(Ze,R(e)).pipe(_(()=>e.disconnect()))),X(1));function ue(e){return{width:e.offsetWidth,height:e.offsetHeight}}function we(e){let t=e;for(;t.clientWidth===0&&t.parentElement;)t=t.parentElement;return $a.pipe(S(r=>r.observe(t)),b(r=>sn.pipe(v(o=>o.target===t),_(()=>r.unobserve(t)))),m(()=>ue(e)),q(ue(e)))}function At(e){return{width:e.scrollWidth,height:e.scrollHeight}}function vr(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}function cn(e){let t=[],r=e.parentElement;for(;r;)(e.clientWidth>r.clientWidth||e.clientHeight>r.clientHeight)&&t.push(r),r=(e=r).parentElement;return t.length===0&&t.push(document.body),t}function Qe(e){return{x:e.offsetLeft,y:e.offsetTop}}function pn(e){let t=e.getBoundingClientRect();return{x:t.x+window.scrollX,y:t.y+window.scrollY}}function Zr(e){return T(h(window,"load"),h(window,"resize")).pipe($e(0,ge),m(()=>Qe(e)),q(Qe(e)))}function ln(e){return T(Zr(e),we(document.body)).pipe(m(()=>pn(e)),q(pn(e)))}function gr(e){return{x:e.scrollLeft,y:e.scrollTop}}function Ye(e){return T(h(e,"scroll"),h(window,"resize")).pipe($e(0,ge),m(()=>gr(e)),q(gr(e)))}var mn=new w,ka=$(()=>R(new IntersectionObserver(e=>{for(let t of e)mn.next(t)},{threshold:0}))).pipe(b(e=>T(Ze,R(e)).pipe(_(()=>e.disconnect()))),X(1));function Ct(e){return ka.pipe(S(t=>t.observe(e)),b(t=>mn.pipe(v(({target:r})=>r===e),_(()=>t.unobserve(e)),m(({isIntersecting:r})=>r))))}function fn(e,t=16){return Ye(e).pipe(m(({y:r})=>{let o=ue(e),n=At(e);return r>=n.height-o.height-t}),Q())}var xr={drawer:F("[data-md-toggle=drawer]"),search:F("[data-md-toggle=search]")};function un(e){return xr[e].checked}function nt(e,t){xr[e].checked!==t&&xr[e].click()}function Be(e){let t=xr[e];return h(t,"change").pipe(m(()=>t.checked),q(t.checked))}function Ra(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function Pa(){return T(h(window,"compositionstart").pipe(m(()=>!0)),h(window,"compositionend").pipe(m(()=>!1))).pipe(q(!1))}function dn(){let e=h(window,"keydown").pipe(v(t=>!(t.metaKey||t.ctrlKey)),m(t=>({mode:un("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),v(({mode:t,type:r})=>{if(t==="global"){let o=Ve();if(typeof o!="undefined")return!Ra(o,r)}return!0}),le());return Pa().pipe(b(t=>t?x:e))}function Ee(){return new URL(location.href)}function it(e,t=!1){if(B("navigation.instant")&&!t){let r=O("a",{href:e.href});document.body.appendChild(r),r.click(),r.remove()}else location.href=e.href}function hn(){return new w}function bn(){return location.hash.slice(1)}function vn(e){let t=O("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function eo(e){return T(h(window,"hashchange"),e).pipe(m(bn),q(bn()),v(t=>t.length>0),X(1))}function gn(e){return eo(e).pipe(m(t=>fe(`[id="${t}"]`)),v(t=>typeof t!="undefined"))}function Ut(e){let t=matchMedia(e);return dr(r=>t.addListener(()=>r(t.matches))).pipe(q(t.matches))}function xn(){let e=matchMedia("print");return T(h(window,"beforeprint").pipe(m(()=>!0)),h(window,"afterprint").pipe(m(()=>!1))).pipe(q(e.matches))}function to(e,t){return e.pipe(b(r=>r?t():x))}function ro(e,t){return new j(r=>{let o=new XMLHttpRequest;return o.open("GET",`${e}`),o.responseType="blob",o.addEventListener("load",()=>{o.status>=200&&o.status<300?(r.next(o.response),r.complete()):r.error(new Error(o.statusText))}),o.addEventListener("error",()=>{r.error(new Error("Network error"))}),o.addEventListener("abort",()=>{r.complete()}),typeof(t==null?void 0:t.progress$)!="undefined"&&(o.addEventListener("progress",n=>{var i;if(n.lengthComputable)t.progress$.next(n.loaded/n.total*100);else{let s=(i=o.getResponseHeader("Content-Length"))!=null?i:0;t.progress$.next(n.loaded/+s*100)}}),t.progress$.next(5)),o.send(),()=>o.abort()})}function Ge(e,t){return ro(e,t).pipe(b(r=>r.text()),m(r=>JSON.parse(r)),X(1))}function yr(e,t){let r=new DOMParser;return ro(e,t).pipe(b(o=>o.text()),m(o=>r.parseFromString(o,"text/html")),X(1))}function yn(e,t){let r=new DOMParser;return ro(e,t).pipe(b(o=>o.text()),m(o=>r.parseFromString(o,"text/xml")),X(1))}function En(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function wn(){return T(h(window,"scroll",{passive:!0}),h(window,"resize",{passive:!0})).pipe(m(En),q(En()))}function Tn(){return{width:innerWidth,height:innerHeight}}function Sn(){return h(window,"resize",{passive:!0}).pipe(m(Tn),q(Tn()))}function On(){return V([wn(),Sn()]).pipe(m(([e,t])=>({offset:e,size:t})),X(1))}function Er(e,{viewport$:t,header$:r}){let o=t.pipe(re("size")),n=V([o,r]).pipe(m(()=>Qe(e)));return V([r,t,n]).pipe(m(([{height:i},{offset:s,size:a},{x:c,y:p}])=>({offset:{x:s.x-c,y:s.y-p+i},size:a})))}function Ia(e){return h(e,"message",t=>t.data)}function Fa(e){let t=new w;return t.subscribe(r=>e.postMessage(r)),t}function Mn(e,t=new Worker(e)){let r=Ia(t),o=Fa(t),n=new w;n.subscribe(o);let i=o.pipe(te(),ae(!0));return n.pipe(te(),Ne(r.pipe(U(i))),le())}var ja=F("#__config"),Ht=JSON.parse(ja.textContent);Ht.base=`${new URL(Ht.base,Ee())}`;function Te(){return Ht}function B(e){return Ht.features.includes(e)}function Le(e,t){return typeof t!="undefined"?Ht.translations[e].replace("#",t.toString()):Ht.translations[e]}function Ce(e,t=document){return F(`[data-md-component=${e}]`,t)}function me(e,t=document){return C(`[data-md-component=${e}]`,t)}function Wa(e){let t=F(".md-typeset > :first-child",e);return h(t,"click",{once:!0}).pipe(m(()=>F(".md-typeset",e)),m(r=>({hash:__md_hash(r.innerHTML)})))}function Ln(e){if(!B("announce.dismiss")||!e.childElementCount)return x;if(!e.hidden){let t=F(".md-typeset",e);__md_hash(t.innerHTML)===__md_get("__announce")&&(e.hidden=!0)}return $(()=>{let t=new w;return t.subscribe(({hash:r})=>{e.hidden=!0,__md_set("__announce",r)}),Wa(e).pipe(S(r=>t.next(r)),_(()=>t.complete()),m(r=>k({ref:e},r)))})}function Ua(e,{target$:t}){return t.pipe(m(r=>({hidden:r!==e})))}function _n(e,t){let r=new w;return r.subscribe(({hidden:o})=>{e.hidden=o}),Ua(e,t).pipe(S(o=>r.next(o)),_(()=>r.complete()),m(o=>k({ref:e},o)))}function Dt(e,t){return t==="inline"?O("div",{class:"md-tooltip md-tooltip--inline",id:e,role:"tooltip"},O("div",{class:"md-tooltip__inner md-typeset"})):O("div",{class:"md-tooltip",id:e,role:"tooltip"},O("div",{class:"md-tooltip__inner md-typeset"}))}function wr(...e){return O("div",{class:"md-tooltip2",role:"dialog"},O("div",{class:"md-tooltip2__inner md-typeset"},e))}function An(...e){return O("div",{class:"md-tooltip2",role:"tooltip"},O("div",{class:"md-tooltip2__inner md-typeset"},e))}function Cn(e,t){if(t=t?`${t}_annotation_${e}`:void 0,t){let r=t?`#${t}`:void 0;return O("aside",{class:"md-annotation",tabIndex:0},Dt(t),O("a",{href:r,class:"md-annotation__index",tabIndex:-1},O("span",{"data-md-annotation-id":e})))}else return O("aside",{class:"md-annotation",tabIndex:0},Dt(t),O("span",{class:"md-annotation__index",tabIndex:-1},O("span",{"data-md-annotation-id":e})))}function Hn(e){return O("button",{class:"md-code__button",title:Le("clipboard.copy"),"data-clipboard-target":`#${e} > code`,"data-md-type":"copy"})}function $n(){return O("button",{class:"md-code__button",title:"Toggle line selection","data-md-type":"select"})}function kn(){return O("nav",{class:"md-code__nav"})}function oo(e,t){let r=t&2,o=t&1,n=Object.keys(e.terms).filter(c=>!e.terms[c]).reduce((c,p)=>[...c,O("del",null,p)," "],[]).slice(0,-1),i=Te(),s=new URL(e.location,i.base);B("search.highlight")&&s.searchParams.set("h",Object.entries(e.terms).filter(([,c])=>c).reduce((c,[p])=>`${c} ${p}`.trim(),""));let{tags:a}=Te();return O("a",{href:`${s}`,class:"md-search-result__link",tabIndex:-1},O("article",{class:"md-search-result__article md-typeset","data-md-score":e.score.toFixed(2)},r>0&&O("div",{class:"md-search-result__icon md-icon"}),r>0&&O("h1",null,e.title),r<=0&&O("h2",null,e.title),o>0&&e.text.length>0&&e.text,e.tags&&e.tags.map(c=>{let p=a?c in a?`md-tag-icon md-tag--${a[c]}`:"md-tag-icon":"";return O("span",{class:`md-tag ${p}`},c)}),o>0&&n.length>0&&O("p",{class:"md-search-result__terms"},Le("search.result.term.missing"),": ",...n)))}function Rn(e){let t=e[0].score,r=[...e],o=Te(),n=r.findIndex(l=>!`${new URL(l.location,o.base)}`.includes("#")),[i]=r.splice(n,1),s=r.findIndex(l=>l.scoreoo(l,1)),...c.length?[O("details",{class:"md-search-result__more"},O("summary",{tabIndex:-1},O("div",null,c.length>0&&c.length===1?Le("search.result.more.one"):Le("search.result.more.other",c.length))),...c.map(l=>oo(l,1)))]:[]];return O("li",{class:"md-search-result__item"},p)}function Pn(e){return O("ul",{class:"md-source__facts"},Object.entries(e).map(([t,r])=>O("li",{class:`md-source__fact md-source__fact--${t}`},typeof r=="number"?br(r):r)))}function no(e){let t=`tabbed-control tabbed-control--${e}`;return O("div",{class:t,hidden:!0},O("button",{class:"tabbed-button",tabIndex:-1,"aria-hidden":"true"}))}function In(e){return O("div",{class:"md-typeset__scrollwrap"},O("div",{class:"md-typeset__table"},e))}function Da(e){let t=Te(),r=new URL(`../${e.version}/`,t.base);return O("li",{class:"md-version__item"},O("a",{href:`${r}`,class:"md-version__link"},e.title))}function Fn(e,t){return O("div",{class:"md-version"},O("button",{class:"md-version__current","aria-label":Le("select.version")},t.title),O("ul",{class:"md-version__list"},e.map(Da)))}var Na=0;function Va(e){let t=V([Ke(e),ot(e,250)]).pipe(m(([o,n])=>o||n),Q()),r=$(()=>cn(e)).pipe(J(Ye),vt(1),b(()=>ln(e)));return t.pipe(ke(o=>o),b(()=>V([t,r])),m(([o,n])=>({active:o,offset:n})),le())}function Nt(e,t){let{content$:r,viewport$:o}=t,n=`__tooltip2_${Na++}`;return $(()=>{let i=new w,s=new jr(!1);i.pipe(te(),ae(!1)).subscribe(s);let a=s.pipe(jt(p=>He(+!p*250,Dr)),Q(),b(p=>p?r:x),S(p=>p.id=n),le());V([i.pipe(m(({active:p})=>p)),a.pipe(b(p=>ot(p,250)),q(!1))]).pipe(m(p=>p.some(l=>l))).subscribe(s);let c=s.pipe(v(p=>p),oe(a,o),m(([p,l,{size:f}])=>{let u=e.getBoundingClientRect(),d=u.width/2;if(l.role==="tooltip")return{x:d,y:8+u.height};if(u.y>=f.height/2){let{height:g}=ue(l);return{x:d,y:-16-g}}else return{x:d,y:16+u.height}}));return V([a,i,c]).subscribe(([p,{offset:l},f])=>{p.style.setProperty("--md-tooltip-host-x",`${l.x}px`),p.style.setProperty("--md-tooltip-host-y",`${l.y}px`),p.style.setProperty("--md-tooltip-x",`${f.x}px`),p.style.setProperty("--md-tooltip-y",`${f.y}px`),p.classList.toggle("md-tooltip2--top",f.y<0),p.classList.toggle("md-tooltip2--bottom",f.y>=0)}),s.pipe(v(p=>p),oe(a,(p,l)=>l),v(p=>p.role==="tooltip")).subscribe(p=>{let l=ue(F(":scope > *",p));p.style.setProperty("--md-tooltip-width",`${l.width}px`),p.style.setProperty("--md-tooltip-tail","0px")}),s.pipe(Q(),xe(ge),oe(a)).subscribe(([p,l])=>{l.classList.toggle("md-tooltip2--active",p)}),V([s.pipe(v(p=>p)),a]).subscribe(([p,l])=>{l.role==="dialog"?(e.setAttribute("aria-controls",n),e.setAttribute("aria-haspopup","dialog")):e.setAttribute("aria-describedby",n)}),s.pipe(v(p=>!p)).subscribe(()=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-describedby"),e.removeAttribute("aria-haspopup")}),Va(e).pipe(S(p=>i.next(p)),_(()=>i.complete()),m(p=>k({ref:e},p)))})}function za(e,t){let r=$(()=>V([Zr(e),Ye(t)])).pipe(m(([{x:o,y:n},i])=>{let{width:s,height:a}=ue(e);return{x:o-i.x+s/2,y:n-i.y+a/2}}));return Ke(e).pipe(b(o=>r.pipe(m(n=>({active:o,offset:n})),ye(+!o||1/0))))}function jn(e,t,{target$:r}){let[o,n]=Array.from(e.children);return $(()=>{let i=new w,s=i.pipe(te(),ae(!0));return i.subscribe({next({offset:a}){e.style.setProperty("--md-tooltip-x",`${a.x}px`),e.style.setProperty("--md-tooltip-y",`${a.y}px`)},complete(){e.style.removeProperty("--md-tooltip-x"),e.style.removeProperty("--md-tooltip-y")}}),Ct(e).pipe(U(s)).subscribe(a=>{e.toggleAttribute("data-md-visible",a)}),T(i.pipe(v(({active:a})=>a)),i.pipe(Ae(250),v(({active:a})=>!a))).subscribe({next({active:a}){a?e.prepend(o):o.remove()},complete(){e.prepend(o)}}),i.pipe($e(16,ge)).subscribe(({active:a})=>{o.classList.toggle("md-tooltip--active",a)}),i.pipe(vt(125,ge),v(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:a})=>a)).subscribe({next(a){a?e.style.setProperty("--md-tooltip-0",`${-a}px`):e.style.removeProperty("--md-tooltip-0")},complete(){e.style.removeProperty("--md-tooltip-0")}}),h(n,"click").pipe(U(s),v(a=>!(a.metaKey||a.ctrlKey))).subscribe(a=>{a.stopPropagation(),a.preventDefault()}),h(n,"mousedown").pipe(U(s),oe(i)).subscribe(([a,{active:c}])=>{var p;if(a.button!==0||a.metaKey||a.ctrlKey)a.preventDefault();else if(c){a.preventDefault();let l=e.parentElement.closest(".md-annotation");l instanceof HTMLElement?l.focus():(p=Ve())==null||p.blur()}}),r.pipe(U(s),v(a=>a===o),rt(125)).subscribe(()=>e.focus()),za(e,t).pipe(S(a=>i.next(a)),_(()=>i.complete()),m(a=>k({ref:e},a)))})}function qa(e){let t=Te();if(e.tagName!=="CODE")return[e];let r=[".c",".c1",".cm"];if(typeof t.annotate!="undefined"){let o=e.closest("[class|=language]");if(o)for(let n of Array.from(o.classList)){if(!n.startsWith("language-"))continue;let[,i]=n.split("-");i in t.annotate&&r.push(...t.annotate[i])}}return C(r.join(", "),e)}function Ka(e){let t=[];for(let r of qa(e)){let o=[],n=document.createNodeIterator(r,NodeFilter.SHOW_TEXT);for(let i=n.nextNode();i;i=n.nextNode())o.push(i);for(let i of o){let s;for(;s=/(\(\d+\))(!)?/.exec(i.textContent);){let[,a,c]=s;if(typeof c=="undefined"){let p=i.splitText(s.index);i=p.splitText(a.length),t.push(p)}else{i.textContent=a,t.push(i);break}}}}return t}function Wn(e,t){t.append(...Array.from(e.childNodes))}function Tr(e,t,{target$:r,print$:o}){let n=t.closest("[id]"),i=n==null?void 0:n.id,s=new Map;for(let a of Ka(t)){let[,c]=a.textContent.match(/\((\d+)\)/);fe(`:scope > li:nth-child(${c})`,e)&&(s.set(c,Cn(c,i)),a.replaceWith(s.get(c)))}return s.size===0?x:$(()=>{let a=new w,c=a.pipe(te(),ae(!0)),p=[];for(let[l,f]of s)p.push([F(".md-typeset",f),F(`:scope > li:nth-child(${l})`,e)]);return o.pipe(U(c)).subscribe(l=>{e.hidden=!l,e.classList.toggle("md-annotation-list",l);for(let[f,u]of p)l?Wn(f,u):Wn(u,f)}),T(...[...s].map(([,l])=>jn(l,t,{target$:r}))).pipe(_(()=>a.complete()),le())})}function Un(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return Un(t)}}function Dn(e,t){return $(()=>{let r=Un(e);return typeof r!="undefined"?Tr(r,e,t):x})}var Vn=Gt(ao());var Qa=0;function Ya(e,t){document.body.append(e);let{width:r}=ue(e);e.style.setProperty("--md-tooltip-width",`${r}px`),e.remove();let o=vr(t),n=typeof o!="undefined"?Ye(o):R({x:0,y:0}),i=T(Ke(t),ot(t)).pipe(Q());return V([i,n]).pipe(m(([s,a])=>{let{x:c,y:p}=Qe(t),l=ue(t),f=t.closest("table");return f&&t.parentElement&&(c+=f.offsetLeft+t.parentElement.offsetLeft,p+=f.offsetTop+t.parentElement.offsetTop),{active:s,offset:{x:c-a.x+l.width/2-r/2,y:p-a.y+l.height+8}}}))}function pt(e){let t=e.title;if(!t.length)return x;let r=`__tooltip_${Qa++}`,o=Dt(r,"inline"),n=F(".md-typeset",o);return n.innerHTML=t,$(()=>{let i=new w;return i.subscribe({next({offset:s}){o.style.setProperty("--md-tooltip-x",`${s.x}px`),o.style.setProperty("--md-tooltip-y",`${s.y}px`)},complete(){o.style.removeProperty("--md-tooltip-x"),o.style.removeProperty("--md-tooltip-y")}}),T(i.pipe(v(({active:s})=>s)),i.pipe(Ae(250),v(({active:s})=>!s))).subscribe({next({active:s}){s?(e.insertAdjacentElement("afterend",o),e.setAttribute("aria-describedby",r),e.removeAttribute("title")):(o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t))},complete(){o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t)}}),i.pipe($e(16,ge)).subscribe(({active:s})=>{o.classList.toggle("md-tooltip--active",s)}),i.pipe(vt(125,ge),v(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:s})=>s)).subscribe({next(s){s?o.style.setProperty("--md-tooltip-0",`${-s}px`):o.style.removeProperty("--md-tooltip-0")},complete(){o.style.removeProperty("--md-tooltip-0")}}),Ya(o,e).pipe(S(s=>i.next(s)),_(()=>i.complete()),m(s=>k({ref:e},s)))}).pipe(Xe(pe))}var Ba=0,Nn=T(h(window,"keydown").pipe(m(()=>!0)),T(h(window,"keyup"),h(window,"contextmenu")).pipe(m(()=>!1))).pipe(q(!1),X(1));function zn(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return zn(t)}}function Ga(e){return we(e).pipe(m(({width:t})=>({scrollable:At(e).width>t})),re("scrollable"))}function qn(e,t){let{matches:r}=matchMedia("(hover)"),o=$(()=>{let n=new w,i=n.pipe(Yr(1));n.subscribe(({scrollable:d})=>{d&&r?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")});let s=[],a=e.closest("pre"),c=a.closest("[id]"),p=c?c.id:Ba++;a.id=`__code_${p}`;let l=[],f=e.closest(".highlight");if(f instanceof HTMLElement){let d=zn(f);if(typeof d!="undefined"&&(f.classList.contains("annotate")||B("content.code.annotate"))){let g=Tr(d,e,t);l.push(we(f).pipe(U(i),m(({width:M,height:ee})=>M&&ee),Q(),b(M=>M?g:x)))}}let u=C(":scope > span[id]",e);if(u.length&&(e.classList.add("md-code__content"),e.closest(".select")||B("content.code.select")&&!e.closest(".no-select"))){let d=+u[0].id.split("-").pop(),g=$n();s.push(g),B("content.tooltips")&&l.push(pt(g));let M=h(g,"click").pipe(Wt(P=>!P,!1),S(()=>g.blur()),le());M.subscribe(P=>{g.classList.toggle("md-code__button--active",P)});let ee=de(u).pipe(J(P=>ot(P).pipe(m(se=>[P,se]))));M.pipe(b(P=>P?ee:x)).subscribe(([P,se])=>{let ce=fe(".hll.select",P);if(ce&&!se)ce.replaceWith(...Array.from(ce.childNodes));else if(!ce&&se){let he=document.createElement("span");he.className="hll select",he.append(...Array.from(P.childNodes).slice(1)),P.append(he)}});let ne=de(u).pipe(J(P=>h(P,"mousedown").pipe(S(se=>se.preventDefault()),m(()=>P)))),Z=M.pipe(b(P=>P?ne:x),oe(Nn),m(([P,se])=>{var he;let ce=u.indexOf(P)+d;if(se===!1)return[ce,ce];{let Se=C(".hll",e).map(je=>u.indexOf(je.parentElement)+d);return(he=window.getSelection())==null||he.removeAllRanges(),[Math.min(ce,...Se),Math.max(ce,...Se)]}})),H=eo(x).pipe(v(P=>P.startsWith(`__codelineno-${p}-`)));H.subscribe(P=>{let[,,se]=P.split("-"),ce=se.split(":").map(Se=>+Se-d+1);ce.length===1&&ce.push(ce[0]);for(let Se of C(".hll:not(.select)",e))Se.replaceWith(...Array.from(Se.childNodes));let he=u.slice(ce[0]-1,ce[1]);for(let Se of he){let je=document.createElement("span");je.className="hll",je.append(...Array.from(Se.childNodes).slice(1)),Se.append(je)}}),H.pipe(ye(1),xe(pe)).subscribe(P=>{if(P.includes(":")){let se=document.getElementById(P.split(":")[0]);se&&setTimeout(()=>{let ce=se,he=-64;for(;ce!==document.body;)he+=ce.offsetTop,ce=ce.offsetParent;window.scrollTo({top:he})},1)}});let Fe=de(C('a[href^="#__codelineno"]',f)).pipe(J(P=>h(P,"click").pipe(S(se=>se.preventDefault()),m(()=>P)))).pipe(U(i),oe(Nn),m(([P,se])=>{let he=+F(`[id="${P.hash.slice(1)}"]`).parentElement.id.split("-").pop();if(se===!1)return[he,he];{let Se=C(".hll",e).map(je=>+je.parentElement.id.split("-").pop());return[Math.min(he,...Se),Math.max(he,...Se)]}}));T(Z,Fe).subscribe(P=>{let se=`#__codelineno-${p}-`;P[0]===P[1]?se+=P[0]:se+=`${P[0]}:${P[1]}`,history.replaceState({},"",se),window.dispatchEvent(new HashChangeEvent("hashchange",{newURL:window.location.origin+window.location.pathname+se,oldURL:window.location.href}))})}if(Vn.default.isSupported()&&(e.closest(".copy")||B("content.code.copy")&&!e.closest(".no-copy"))){let d=Hn(a.id);s.push(d),B("content.tooltips")&&l.push(pt(d))}if(s.length){let d=kn();d.append(...s),a.insertBefore(d,e)}return Ga(e).pipe(S(d=>n.next(d)),_(()=>n.complete()),m(d=>k({ref:e},d)),Ne(T(...l).pipe(U(i))))});return B("content.lazy")?Ct(e).pipe(v(n=>n),ye(1),b(()=>o)):o}function Ja(e,{target$:t,print$:r}){let o=!0;return T(t.pipe(m(n=>n.closest("details:not([open])")),v(n=>e===n),m(()=>({action:"open",reveal:!0}))),r.pipe(v(n=>n||!o),S(()=>o=e.open),m(n=>({action:n?"open":"close"}))))}function Kn(e,t){return $(()=>{let r=new w;return r.subscribe(({action:o,reveal:n})=>{e.toggleAttribute("open",o==="open"),n&&e.scrollIntoView()}),Ja(e,t).pipe(S(o=>r.next(o)),_(()=>r.complete()),m(o=>k({ref:e},o)))})}function Xa(e){let t=document.createElement("h3");t.innerHTML=e.innerHTML;let r=[t],o=e.nextElementSibling;for(;o&&!(o instanceof HTMLHeadingElement);)r.push(o),o=o.nextElementSibling;return r}function Qn(e,t){let{sitemap$:r}=t;if(!(e instanceof HTMLAnchorElement))return x;if(e.pathname===location.pathname)return x;if(!(B("navigation.instant.preview")||e.hasAttribute("data-preview")))return x;let o=V([Ke(e),ot(e)]).pipe(m(([i,s])=>i||s),Q(),v(i=>i));return ht([r,o]).pipe(b(([i])=>{let s=new URL(e.href);return s.search=s.hash="",i.has(`${s}`)?R(s):x}),b(i=>yr(i)),b(i=>{let s=e.hash?`article [id="${e.hash.slice(1)}"]`:"article h1",a=fe(s,i);return typeof a=="undefined"?x:R(Xa(a))})).pipe(b(i=>{let s=new j(a=>{let c=wr(...i);return a.next(c),document.body.append(c),()=>c.remove()});return Nt(e,k({content$:s},t))}))}var Yn=".node circle,.node ellipse,.node path,.node polygon,.node rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}marker{fill:var(--md-mermaid-edge-color)!important}.edgeLabel .label rect{fill:#0000}.label{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.label foreignObject{line-height:normal;overflow:visible}.label div .edgeLabel{color:var(--md-mermaid-label-fg-color)}.edgeLabel,.edgeLabel rect,.label div .edgeLabel{background-color:var(--md-mermaid-label-bg-color)}.edgeLabel,.edgeLabel rect{fill:var(--md-mermaid-label-bg-color);color:var(--md-mermaid-edge-color)}.edgePath .path,.flowchart-link{stroke:var(--md-mermaid-edge-color);stroke-width:.05rem}.edgePath .arrowheadPath{fill:var(--md-mermaid-edge-color);stroke:none}.cluster rect{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}.cluster span{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}g #flowchart-circleEnd,g #flowchart-circleStart,g #flowchart-crossEnd,g #flowchart-crossStart,g #flowchart-pointEnd,g #flowchart-pointStart{stroke:none}g.classGroup line,g.classGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.classGroup text{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.classLabel .box{fill:var(--md-mermaid-label-bg-color);background-color:var(--md-mermaid-label-bg-color);opacity:1}.classLabel .label{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node .divider{stroke:var(--md-mermaid-node-fg-color)}.relation{stroke:var(--md-mermaid-edge-color)}.cardinality{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.cardinality text{fill:inherit!important}defs #classDiagram-compositionEnd,defs #classDiagram-compositionStart,defs #classDiagram-dependencyEnd,defs #classDiagram-dependencyStart,defs #classDiagram-extensionEnd,defs #classDiagram-extensionStart{fill:var(--md-mermaid-edge-color)!important;stroke:var(--md-mermaid-edge-color)!important}defs #classDiagram-aggregationEnd,defs #classDiagram-aggregationStart{fill:var(--md-mermaid-label-bg-color)!important;stroke:var(--md-mermaid-edge-color)!important}g.stateGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.stateGroup .state-title{fill:var(--md-mermaid-label-fg-color)!important;font-family:var(--md-mermaid-font-family)}g.stateGroup .composit{fill:var(--md-mermaid-label-bg-color)}.nodeLabel,.nodeLabel p{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node circle.state-end,.node circle.state-start,.start-state{fill:var(--md-mermaid-edge-color);stroke:none}.end-state-inner,.end-state-outer{fill:var(--md-mermaid-edge-color)}.end-state-inner,.node circle.state-end{stroke:var(--md-mermaid-label-bg-color)}.transition{stroke:var(--md-mermaid-edge-color)}[id^=state-fork] rect,[id^=state-join] rect{fill:var(--md-mermaid-edge-color)!important;stroke:none!important}.statediagram-cluster.statediagram-cluster .inner{fill:var(--md-default-bg-color)}.statediagram-cluster rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.statediagram-state rect.divider{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}defs #statediagram-barbEnd{stroke:var(--md-mermaid-edge-color)}.attributeBoxEven,.attributeBoxOdd{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityBox{fill:var(--md-mermaid-label-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityLabel{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.relationshipLabelBox{fill:var(--md-mermaid-label-bg-color);fill-opacity:1;background-color:var(--md-mermaid-label-bg-color);opacity:1}.relationshipLabel{fill:var(--md-mermaid-label-fg-color)}.relationshipLine{stroke:var(--md-mermaid-edge-color)}defs #ONE_OR_MORE_END *,defs #ONE_OR_MORE_START *,defs #ONLY_ONE_END *,defs #ONLY_ONE_START *,defs #ZERO_OR_MORE_END *,defs #ZERO_OR_MORE_START *,defs #ZERO_OR_ONE_END *,defs #ZERO_OR_ONE_START *{stroke:var(--md-mermaid-edge-color)!important}defs #ZERO_OR_MORE_END circle,defs #ZERO_OR_MORE_START circle{fill:var(--md-mermaid-label-bg-color)}.actor{fill:var(--md-mermaid-sequence-actor-bg-color);stroke:var(--md-mermaid-sequence-actor-border-color)}text.actor>tspan{fill:var(--md-mermaid-sequence-actor-fg-color);font-family:var(--md-mermaid-font-family)}line{stroke:var(--md-mermaid-sequence-actor-line-color)}.actor-man circle,.actor-man line{fill:var(--md-mermaid-sequence-actorman-bg-color);stroke:var(--md-mermaid-sequence-actorman-line-color)}.messageLine0,.messageLine1{stroke:var(--md-mermaid-sequence-message-line-color)}.note{fill:var(--md-mermaid-sequence-note-bg-color);stroke:var(--md-mermaid-sequence-note-border-color)}.loopText,.loopText>tspan,.messageText,.noteText>tspan{stroke:none;font-family:var(--md-mermaid-font-family)!important}.messageText{fill:var(--md-mermaid-sequence-message-fg-color)}.loopText,.loopText>tspan{fill:var(--md-mermaid-sequence-loop-fg-color)}.noteText>tspan{fill:var(--md-mermaid-sequence-note-fg-color)}#arrowhead path{fill:var(--md-mermaid-sequence-message-line-color);stroke:none}.loopLine{fill:var(--md-mermaid-sequence-loop-bg-color);stroke:var(--md-mermaid-sequence-loop-border-color)}.labelBox{fill:var(--md-mermaid-sequence-label-bg-color);stroke:none}.labelText,.labelText>span{fill:var(--md-mermaid-sequence-label-fg-color);font-family:var(--md-mermaid-font-family)}.sequenceNumber{fill:var(--md-mermaid-sequence-number-fg-color)}rect.rect{fill:var(--md-mermaid-sequence-box-bg-color);stroke:none}rect.rect+text.text{fill:var(--md-mermaid-sequence-box-fg-color)}defs #sequencenumber{fill:var(--md-mermaid-sequence-number-bg-color)!important}";var so,es=0;function ts(){return typeof mermaid=="undefined"||mermaid instanceof Element?_t("https://unpkg.com/mermaid@10.7.0/dist/mermaid.min.js"):R(void 0)}function Bn(e){return e.classList.remove("mermaid"),so||(so=ts().pipe(S(()=>mermaid.initialize({startOnLoad:!1,themeCSS:Yn,sequence:{actorFontSize:"16px",messageFontSize:"16px",noteFontSize:"16px"}})),m(()=>{}),X(1))),so.subscribe(()=>vo(this,null,function*(){e.classList.add("mermaid");let t=`__mermaid_${es++}`,r=O("div",{class:"mermaid"}),o=e.textContent,{svg:n,fn:i}=yield mermaid.render(t,o),s=r.attachShadow({mode:"closed"});s.innerHTML=n,e.replaceWith(r),i==null||i(s)})),so.pipe(m(()=>({ref:e})))}var Gn=O("table");function Jn(e){return e.replaceWith(Gn),Gn.replaceWith(In(e)),R({ref:e})}function rs(e){let t=e.find(r=>r.checked)||e[0];return T(...e.map(r=>h(r,"change").pipe(m(()=>F(`label[for="${r.id}"]`))))).pipe(q(F(`label[for="${t.id}"]`)),m(r=>({active:r})))}function Xn(e,{viewport$:t,target$:r}){let o=F(".tabbed-labels",e),n=C(":scope > input",e),i=no("prev");e.append(i);let s=no("next");return e.append(s),$(()=>{let a=new w,c=a.pipe(te(),ae(!0));V([a,we(e)]).pipe(U(c),$e(1,ge)).subscribe({next([{active:p},l]){let f=Qe(p),{width:u}=ue(p);e.style.setProperty("--md-indicator-x",`${f.x}px`),e.style.setProperty("--md-indicator-width",`${u}px`);let d=gr(o);(f.xd.x+l.width)&&o.scrollTo({left:Math.max(0,f.x-16),behavior:"smooth"})},complete(){e.style.removeProperty("--md-indicator-x"),e.style.removeProperty("--md-indicator-width")}}),V([Ye(o),we(o)]).pipe(U(c)).subscribe(([p,l])=>{let f=At(o);i.hidden=p.x<16,s.hidden=p.x>f.width-l.width-16}),T(h(i,"click").pipe(m(()=>-1)),h(s,"click").pipe(m(()=>1))).pipe(U(c)).subscribe(p=>{let{width:l}=ue(o);o.scrollBy({left:l*p,behavior:"smooth"})}),r.pipe(U(c),v(p=>n.includes(p))).subscribe(p=>p.click()),o.classList.add("tabbed-labels--linked");for(let p of n){let l=F(`label[for="${p.id}"]`);l.replaceChildren(O("a",{href:`#${l.htmlFor}`,tabIndex:-1},...Array.from(l.childNodes))),h(l.firstElementChild,"click").pipe(U(c),v(f=>!(f.metaKey||f.ctrlKey)),S(f=>{f.preventDefault(),f.stopPropagation()})).subscribe(()=>{history.replaceState({},"",`#${l.htmlFor}`),l.click()})}return B("content.tabs.link")&&a.pipe(Re(1),oe(t)).subscribe(([{active:p},{offset:l}])=>{let f=p.innerText.trim();if(p.hasAttribute("data-md-switching"))p.removeAttribute("data-md-switching");else{let u=e.offsetTop-l.y;for(let g of C("[data-tabs]"))for(let M of C(":scope > input",g)){let ee=F(`label[for="${M.id}"]`);if(ee!==p&&ee.innerText.trim()===f){ee.setAttribute("data-md-switching",""),M.click();break}}window.scrollTo({top:e.offsetTop-u});let d=__md_get("__tabs")||[];__md_set("__tabs",[...new Set([f,...d])])}}),a.pipe(U(c)).subscribe(()=>{for(let p of C("audio, video",e))p.pause()}),rs(n).pipe(S(p=>a.next(p)),_(()=>a.complete()),m(p=>k({ref:e},p)))}).pipe(Xe(pe))}function Zn(e,t){let{viewport$:r,target$:o,print$:n}=t;return T(...C(".annotate:not(.highlight)",e).map(i=>Dn(i,{target$:o,print$:n})),...C("pre:not(.mermaid) > code",e).map(i=>qn(i,{target$:o,print$:n})),...C("a:not([title])",e).map(i=>Qn(i,t)),...C("pre.mermaid",e).map(i=>Bn(i)),...C("table:not([class])",e).map(i=>Jn(i)),...C("details",e).map(i=>Kn(i,{target$:o,print$:n})),...C("[data-tabs]",e).map(i=>Xn(i,{viewport$:r,target$:o})),...C("[title]",e).filter(()=>B("content.tooltips")).map(i=>Nt(i,k({content$:new j(s=>{let a=i.title,c=An(a);return s.next(c),i.removeAttribute("title"),document.body.append(c),()=>{c.remove(),i.setAttribute("title",a)}})},t))),...C(".footnote-ref",e).filter(()=>B("content.footnote.tooltips")).map(i=>Nt(i,k({content$:new j(s=>{let a=new URL(i.href).hash.slice(1),c=Array.from(document.getElementById(a).cloneNode(!0).children),p=wr(...c);return s.next(p),document.body.append(p),()=>p.remove()})},t))))}function os(e,{alert$:t}){return t.pipe(b(r=>T(R(!0),R(!1).pipe(rt(2e3))).pipe(m(o=>({message:r,active:o})))))}function ei(e,t){let r=F(".md-typeset",e);return $(()=>{let o=new w;return o.subscribe(({message:n,active:i})=>{e.classList.toggle("md-dialog--active",i),r.textContent=n}),os(e,t).pipe(S(n=>o.next(n)),_(()=>o.complete()),m(n=>k({ref:e},n)))})}function ns({viewport$:e}){if(!B("header.autohide"))return R(!1);let t=e.pipe(m(({offset:{y:n}})=>n),et(2,1),m(([n,i])=>[nMath.abs(i-n.y)>100),m(([,[n]])=>n),Q()),o=Be("search");return V([e,o]).pipe(m(([{offset:n},i])=>n.y>400&&!i),Q(),b(n=>n?r:R(!1)),q(!1))}function ti(e,t){return $(()=>V([we(e),ns(t)])).pipe(m(([{height:r},o])=>({height:r,hidden:o})),Q((r,o)=>r.height===o.height&&r.hidden===o.hidden),X(1))}function ri(e,{header$:t,main$:r}){return $(()=>{let o=new w,n=o.pipe(te(),ae(!0));o.pipe(re("active"),De(t)).subscribe(([{active:s},{hidden:a}])=>{e.classList.toggle("md-header--shadow",s&&!a),e.hidden=a});let i=de(C("[title]",e)).pipe(v(()=>B("content.tooltips")),J(s=>pt(s)));return r.subscribe(o),t.pipe(U(n),m(s=>k({ref:e},s)),Ne(i.pipe(U(n))))})}function is(e,{viewport$:t,header$:r}){return Er(e,{viewport$:t,header$:r}).pipe(m(({offset:{y:o}})=>{let{height:n}=ue(e);return{active:o>=n}}),re("active"))}function oi(e,t){return $(()=>{let r=new w;r.subscribe({next({active:n}){e.classList.toggle("md-header__title--active",n)},complete(){e.classList.remove("md-header__title--active")}});let o=fe(".md-content h1");return typeof o=="undefined"?x:is(o,t).pipe(S(n=>r.next(n)),_(()=>r.complete()),m(n=>k({ref:e},n)))})}function ni(e,{viewport$:t,header$:r}){let o=r.pipe(m(({height:i})=>i),Q()),n=o.pipe(b(()=>we(e).pipe(m(({height:i})=>({top:e.offsetTop,bottom:e.offsetTop+i})),re("bottom"))));return V([o,n,t]).pipe(m(([i,{top:s,bottom:a},{offset:{y:c},size:{height:p}}])=>(p=Math.max(0,p-Math.max(0,s-c,i)-Math.max(0,p+c-a)),{offset:s-i,height:p,active:s-i<=c})),Q((i,s)=>i.offset===s.offset&&i.height===s.height&&i.active===s.active))}function as(e){let t=__md_get("__palette")||{index:e.findIndex(o=>matchMedia(o.getAttribute("data-md-color-media")).matches)},r=Math.max(0,Math.min(t.index,e.length-1));return R(...e).pipe(J(o=>h(o,"change").pipe(m(()=>o))),q(e[r]),m(o=>({index:e.indexOf(o),color:{media:o.getAttribute("data-md-color-media"),scheme:o.getAttribute("data-md-color-scheme"),primary:o.getAttribute("data-md-color-primary"),accent:o.getAttribute("data-md-color-accent")}})),X(1))}function ii(e){let t=C("input",e),r=O("meta",{name:"theme-color"});document.head.appendChild(r);let o=O("meta",{name:"color-scheme"});document.head.appendChild(o);let n=Ut("(prefers-color-scheme: light)");return $(()=>{let i=new w;return i.subscribe(s=>{if(document.body.setAttribute("data-md-color-switching",""),s.color.media==="(prefers-color-scheme)"){let a=matchMedia("(prefers-color-scheme: light)"),c=document.querySelector(a.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");s.color.scheme=c.getAttribute("data-md-color-scheme"),s.color.primary=c.getAttribute("data-md-color-primary"),s.color.accent=c.getAttribute("data-md-color-accent")}for(let[a,c]of Object.entries(s.color))document.body.setAttribute(`data-md-color-${a}`,c);for(let a=0;a{let s=Ce("header"),a=window.getComputedStyle(s);return o.content=a.colorScheme,a.backgroundColor.match(/\d+/g).map(c=>(+c).toString(16).padStart(2,"0")).join("")})).subscribe(s=>r.content=`#${s}`),i.pipe(xe(pe)).subscribe(()=>{document.body.removeAttribute("data-md-color-switching")}),as(t).pipe(U(n.pipe(Re(1))),bt(),S(s=>i.next(s)),_(()=>i.complete()),m(s=>k({ref:e},s)))})}function ai(e,{progress$:t}){return $(()=>{let r=new w;return r.subscribe(({value:o})=>{e.style.setProperty("--md-progress-value",`${o}`)}),t.pipe(S(o=>r.next({value:o})),_(()=>r.complete()),m(o=>({ref:e,value:o})))})}function si(e,t){return e.protocol=t.protocol,e.hostname=t.hostname,e}function ss(e,t){let r=new Map;for(let o of C("url",e)){let n=F("loc",o),i=[si(new URL(n.textContent),t)];r.set(`${i[0]}`,i);for(let s of C("[rel=alternate]",o)){let a=s.getAttribute("href");a!=null&&i.push(si(new URL(a),t))}}return r}function $t(e){return yn(new URL("sitemap.xml",e)).pipe(m(t=>ss(t,new URL(e))),Me(()=>R(new Map)),le())}function ci({document$:e}){let t=new Map;e.pipe(b(()=>C("link[rel=alternate]")),m(r=>new URL(r.href)),v(r=>!t.has(r.toString())),J(r=>$t(r).pipe(m(o=>[r,o])))).subscribe(([r,o])=>{t.set(r.toString().replace(/\/$/,""),o)}),h(document.body,"click").pipe(v(r=>!r.metaKey&&!r.ctrlKey),b(r=>{if(r.target instanceof Element){let o=r.target.closest("a");if(o&&!o.target){let n=[...t].find(([f])=>o.href.startsWith(f));if(typeof n=="undefined")return x;let[i,s]=n,a=Ee();if(a.href.startsWith(i))return x;let c=Te(),p=a.href.replace(c.base,"");p=`${i}/${p}`;let l=s.has(p.split("#")[0])?new URL(p,c.base):new URL(i);return r.preventDefault(),R(l)}}return x})).subscribe(r=>it(r,!0))}var co=Gt(ao());function cs(e){e.setAttribute("data-md-copying","");let t=e.closest("[data-copy]"),r=t?t.getAttribute("data-copy"):e.innerText;return e.removeAttribute("data-md-copying"),r.trimEnd()}function pi({alert$:e}){co.default.isSupported()&&new j(t=>{new co.default("[data-clipboard-target], [data-clipboard-text]",{text:r=>r.getAttribute("data-clipboard-text")||cs(F(r.getAttribute("data-clipboard-target")))}).on("success",r=>t.next(r))}).pipe(S(t=>{t.trigger.focus()}),m(()=>Le("clipboard.copied"))).subscribe(e)}function li(e,t){if(!(e.target instanceof Element))return x;let r=e.target.closest("a");if(r===null)return x;if(r.target||e.metaKey||e.ctrlKey)return x;let o=new URL(r.href);return o.search=o.hash="",t.has(`${o}`)?(e.preventDefault(),R(r)):x}function mi(e){let t=new Map;for(let r of C(":scope > *",e.head))t.set(r.outerHTML,r);return t}function fi(e){for(let t of C("[href], [src]",e))for(let r of["href","src"]){let o=t.getAttribute(r);if(o&&!/^(?:[a-z]+:)?\/\//i.test(o)){t[r]=t[r];break}}return R(e)}function ps(e){for(let o of["[data-md-component=announce]","[data-md-component=container]","[data-md-component=header-topic]","[data-md-component=outdated]","[data-md-component=logo]","[data-md-component=skip]",...B("navigation.tabs.sticky")?["[data-md-component=tabs]"]:[]]){let n=fe(o),i=fe(o,e);typeof n!="undefined"&&typeof i!="undefined"&&n.replaceWith(i)}let t=mi(document);for(let[o,n]of mi(e))t.has(o)?t.delete(o):document.head.appendChild(n);for(let o of t.values())o.remove();let r=Ce("container");return qe(C("script",r)).pipe(b(o=>{let n=e.createElement("script");if(o.src){for(let i of o.getAttributeNames())n.setAttribute(i,o.getAttribute(i));return o.replaceWith(n),new j(i=>{n.onload=()=>i.complete()})}else return n.textContent=o.textContent,o.replaceWith(n),x}),te(),ae(e))}function ui({sitemap$:e,location$:t,viewport$:r,progress$:o}){if(location.protocol==="file:")return x;R(document).subscribe(fi);let n=h(document.body,"click").pipe(De(e),b(([a,c])=>li(a,c)),m(({href:a})=>new URL(a)),le()),i=h(window,"popstate").pipe(m(Ee),le());n.pipe(oe(r)).subscribe(([a,{offset:c}])=>{history.replaceState(c,""),history.pushState(null,"",a)}),T(n,i).subscribe(t);let s=t.pipe(re("pathname"),b(a=>yr(a,{progress$:o}).pipe(Me(()=>(it(a,!0),x)))),b(fi),b(ps),le());return T(s.pipe(oe(t,(a,c)=>c)),t.pipe(re("pathname"),b(()=>t),re("hash")),t.pipe(Q((a,c)=>a.pathname===c.pathname&&a.hash===c.hash),b(()=>n),S(()=>history.back()))).subscribe(a=>{var c,p;history.state!==null||!a.hash?window.scrollTo(0,(p=(c=history.state)==null?void 0:c.y)!=null?p:0):(history.scrollRestoration="auto",vn(a.hash),history.scrollRestoration="manual")}),t.subscribe(()=>{history.scrollRestoration="manual"}),h(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"}),r.pipe(re("offset"),Ae(100)).subscribe(({offset:a})=>{history.replaceState(a,"")}),B("navigation.instant.prefetch")&&T(h(document.body,"mousemove"),h(document.body,"focusin")).pipe(De(e),b(([a,c])=>li(a,c)),Ae(25),Qr(({href:a})=>a),hr(a=>{let c=document.createElement("link");return c.rel="prefetch",c.href=a.toString(),document.head.appendChild(c),h(c,"load").pipe(m(()=>c),ye(1))})).subscribe(a=>a.remove()),s}var bi=Gt(hi());function vi(e){let t=e.separator.split("|").map(n=>n.replace(/(\(\?[!=<][^)]+\))/g,"").length===0?"\uFFFD":n).join("|"),r=new RegExp(t,"img"),o=(n,i,s)=>`${i}${s}`;return n=>{n=n.replace(/[\s*+\-:~^]+/g," ").trim();let i=new RegExp(`(^|${e.separator}|)(${n.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return s=>(0,bi.default)(s).replace(i,o).replace(/<\/mark>(\s+)]*>/img,"$1")}}function zt(e){return e.type===1}function Sr(e){return e.type===3}function gi(e,t){let r=Mn(e);return T(R(location.protocol!=="file:"),Be("search")).pipe(ke(o=>o),b(()=>t)).subscribe(({config:o,docs:n})=>r.next({type:0,data:{config:o,docs:n,options:{suggest:B("search.suggest")}}})),r}function xi({document$:e}){let t=Te(),r=Ge(new URL("../versions.json",t.base)).pipe(Me(()=>x)),o=r.pipe(m(n=>{let[,i]=t.base.match(/([^/]+)\/?$/);return n.find(({version:s,aliases:a})=>s===i||a.includes(i))||n[0]}));r.pipe(m(n=>new Map(n.map(i=>[`${new URL(`../${i.version}/`,t.base)}`,i]))),b(n=>h(document.body,"click").pipe(v(i=>!i.metaKey&&!i.ctrlKey),oe(o),b(([i,s])=>{if(i.target instanceof Element){let a=i.target.closest("a");if(a&&!a.target&&n.has(a.href)){let c=a.href;return!i.target.closest(".md-version")&&n.get(c)===s?x:(i.preventDefault(),R(c))}}return x}),b(i=>{let{version:s}=n.get(i);return $t(new URL(i)).pipe(m(a=>{let p=Ee().href.replace(t.base,"");return a.has(p.split("#")[0])?new URL(`../${s}/${p}`,t.base):new URL(i)}))})))).subscribe(n=>it(n,!0)),V([r,o]).subscribe(([n,i])=>{F(".md-header__topic").appendChild(Fn(n,i))}),e.pipe(b(()=>o)).subscribe(n=>{var s;let i=__md_get("__outdated",sessionStorage);if(i===null){i=!0;let a=((s=t.version)==null?void 0:s.default)||"latest";Array.isArray(a)||(a=[a]);e:for(let c of a)for(let p of n.aliases.concat(n.version))if(new RegExp(c,"i").test(p)){i=!1;break e}__md_set("__outdated",i,sessionStorage)}if(i)for(let a of me("outdated"))a.hidden=!1})}function ds(e,{worker$:t}){let{searchParams:r}=Ee();r.has("q")&&(nt("search",!0),e.value=r.get("q"),e.focus(),Be("search").pipe(ke(i=>!i)).subscribe(()=>{let i=Ee();i.searchParams.delete("q"),history.replaceState({},"",`${i}`)}));let o=Ke(e),n=T(t.pipe(ke(zt)),h(e,"keyup"),o).pipe(m(()=>e.value),Q());return V([n,o]).pipe(m(([i,s])=>({value:i,focus:s})),X(1))}function yi(e,{worker$:t}){let r=new w,o=r.pipe(te(),ae(!0));V([t.pipe(ke(zt)),r],(i,s)=>s).pipe(re("value")).subscribe(({value:i})=>t.next({type:2,data:i})),r.pipe(re("focus")).subscribe(({focus:i})=>{i&&nt("search",i)}),h(e.form,"reset").pipe(U(o)).subscribe(()=>e.focus());let n=F("header [for=__search]");return h(n,"click").subscribe(()=>e.focus()),ds(e,{worker$:t}).pipe(S(i=>r.next(i)),_(()=>r.complete()),m(i=>k({ref:e},i)),X(1))}function Ei(e,{worker$:t,query$:r}){let o=new w,n=fn(e.parentElement).pipe(v(Boolean)),i=e.parentElement,s=F(":scope > :first-child",e),a=F(":scope > :last-child",e);Be("search").subscribe(l=>a.setAttribute("role",l?"list":"presentation")),o.pipe(oe(r),Gr(t.pipe(ke(zt)))).subscribe(([{items:l},{value:f}])=>{switch(l.length){case 0:s.textContent=f.length?Le("search.result.none"):Le("search.result.placeholder");break;case 1:s.textContent=Le("search.result.one");break;default:let u=br(l.length);s.textContent=Le("search.result.other",u)}});let c=o.pipe(S(()=>a.innerHTML=""),b(({items:l})=>T(R(...l.slice(0,10)),R(...l.slice(10)).pipe(et(4),Xr(n),b(([f])=>f)))),m(Rn),le());return c.subscribe(l=>a.appendChild(l)),c.pipe(J(l=>{let f=fe("details",l);return typeof f=="undefined"?x:h(f,"toggle").pipe(U(o),m(()=>f))})).subscribe(l=>{l.open===!1&&l.offsetTop<=i.scrollTop&&i.scrollTo({top:l.offsetTop})}),t.pipe(v(Sr),m(({data:l})=>l)).pipe(S(l=>o.next(l)),_(()=>o.complete()),m(l=>k({ref:e},l)))}function hs(e,{query$:t}){return t.pipe(m(({value:r})=>{let o=Ee();return o.hash="",r=r.replace(/\s+/g,"+").replace(/&/g,"%26").replace(/=/g,"%3D"),o.search=`q=${r}`,{url:o}}))}function wi(e,t){let r=new w,o=r.pipe(te(),ae(!0));return r.subscribe(({url:n})=>{e.setAttribute("data-clipboard-text",e.href),e.href=`${n}`}),h(e,"click").pipe(U(o)).subscribe(n=>n.preventDefault()),hs(e,t).pipe(S(n=>r.next(n)),_(()=>r.complete()),m(n=>k({ref:e},n)))}function Ti(e,{worker$:t,keyboard$:r}){let o=new w,n=Ce("search-query"),i=T(h(n,"keydown"),h(n,"focus")).pipe(xe(pe),m(()=>n.value),Q());return o.pipe(De(i),m(([{suggest:a},c])=>{let p=c.split(/([\s-]+)/);if(a!=null&&a.length&&p[p.length-1]){let l=a[a.length-1];l.startsWith(p[p.length-1])&&(p[p.length-1]=l)}else p.length=0;return p})).subscribe(a=>e.innerHTML=a.join("").replace(/\s/g," ")),r.pipe(v(({mode:a})=>a==="search")).subscribe(a=>{switch(a.type){case"ArrowRight":e.innerText.length&&n.selectionStart===n.value.length&&(n.value=e.innerText);break}}),t.pipe(v(Sr),m(({data:a})=>a)).pipe(S(a=>o.next(a)),_(()=>o.complete()),m(()=>({ref:e})))}function Si(e,{index$:t,keyboard$:r}){let o=Te();try{let n=gi(o.search,t),i=Ce("search-query",e),s=Ce("search-result",e);h(e,"click").pipe(v(({target:c})=>c instanceof Element&&!!c.closest("a"))).subscribe(()=>nt("search",!1)),r.pipe(v(({mode:c})=>c==="search")).subscribe(c=>{let p=Ve();switch(c.type){case"Enter":if(p===i){let l=new Map;for(let f of C(":first-child [href]",s)){let u=f.firstElementChild;l.set(f,parseFloat(u.getAttribute("data-md-score")))}if(l.size){let[[f]]=[...l].sort(([,u],[,d])=>d-u);f.click()}c.claim()}break;case"Escape":case"Tab":nt("search",!1),i.blur();break;case"ArrowUp":case"ArrowDown":if(typeof p=="undefined")i.focus();else{let l=[i,...C(":not(details) > [href], summary, details[open] [href]",s)],f=Math.max(0,(Math.max(0,l.indexOf(p))+l.length+(c.type==="ArrowUp"?-1:1))%l.length);l[f].focus()}c.claim();break;default:i!==Ve()&&i.focus()}}),r.pipe(v(({mode:c})=>c==="global")).subscribe(c=>{switch(c.type){case"f":case"s":case"/":i.focus(),i.select(),c.claim();break}});let a=yi(i,{worker$:n});return T(a,Ei(s,{worker$:n,query$:a})).pipe(Ne(...me("search-share",e).map(c=>wi(c,{query$:a})),...me("search-suggest",e).map(c=>Ti(c,{worker$:n,keyboard$:r}))))}catch(n){return e.hidden=!0,Ze}}function Oi(e,{index$:t,location$:r}){return V([t,r.pipe(q(Ee()),v(o=>!!o.searchParams.get("h")))]).pipe(m(([o,n])=>vi(o.config)(n.searchParams.get("h"))),m(o=>{var s;let n=new Map,i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT);for(let a=i.nextNode();a;a=i.nextNode())if((s=a.parentElement)!=null&&s.offsetHeight){let c=a.textContent,p=o(c);p.length>c.length&&n.set(a,p)}for(let[a,c]of n){let{childNodes:p}=O("span",null,c);a.replaceWith(...Array.from(p))}return{ref:e,nodes:n}}))}function bs(e,{viewport$:t,main$:r}){let o=e.closest(".md-grid"),n=o.offsetTop-o.parentElement.offsetTop;return V([r,t]).pipe(m(([{offset:i,height:s},{offset:{y:a}}])=>(s=s+Math.min(n,Math.max(0,a-i))-n,{height:s,locked:a>=i+n})),Q((i,s)=>i.height===s.height&&i.locked===s.locked))}function po(e,o){var n=o,{header$:t}=n,r=bo(n,["header$"]);let i=F(".md-sidebar__scrollwrap",e),{y:s}=Qe(i);return $(()=>{let a=new w,c=a.pipe(te(),ae(!0)),p=a.pipe($e(0,ge));return p.pipe(oe(t)).subscribe({next([{height:l},{height:f}]){i.style.height=`${l-2*s}px`,e.style.top=`${f}px`},complete(){i.style.height="",e.style.top=""}}),p.pipe(ke()).subscribe(()=>{for(let l of C(".md-nav__link--active[href]",e)){if(!l.clientHeight)continue;let f=l.closest(".md-sidebar__scrollwrap");if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=ue(f);f.scrollTo({top:u-d/2})}}}),de(C("label[tabindex]",e)).pipe(J(l=>h(l,"click").pipe(xe(pe),m(()=>l),U(c)))).subscribe(l=>{let f=F(`[id="${l.htmlFor}"]`);F(`[aria-labelledby="${l.id}"]`).setAttribute("aria-expanded",`${f.checked}`)}),bs(e,r).pipe(S(l=>a.next(l)),_(()=>a.complete()),m(l=>k({ref:e},l)))})}function Mi(e,t){if(typeof t!="undefined"){let r=`https://api.github.com/repos/${e}/${t}`;return ht(Ge(`${r}/releases/latest`).pipe(Me(()=>x),m(o=>({version:o.tag_name})),tt({})),Ge(r).pipe(Me(()=>x),m(o=>({stars:o.stargazers_count,forks:o.forks_count})),tt({}))).pipe(m(([o,n])=>k(k({},o),n)))}else{let r=`https://api.github.com/users/${e}`;return Ge(r).pipe(m(o=>({repositories:o.public_repos})),tt({}))}}function Li(e,t){let r=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Ge(r).pipe(Me(()=>x),m(({star_count:o,forks_count:n})=>({stars:o,forks:n})),tt({}))}function _i(e){let t=e.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i);if(t){let[,r,o]=t;return Mi(r,o)}if(t=e.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i),t){let[,r,o]=t;return Li(r,o)}return x}var vs;function gs(e){return vs||(vs=$(()=>{let t=__md_get("__source",sessionStorage);if(t)return R(t);if(me("consent").length){let o=__md_get("__consent");if(!(o&&o.github))return x}return _i(e.href).pipe(S(o=>__md_set("__source",o,sessionStorage)))}).pipe(Me(()=>x),v(t=>Object.keys(t).length>0),m(t=>({facts:t})),X(1)))}function Ai(e){let t=F(":scope > :last-child",e);return $(()=>{let r=new w;return r.subscribe(({facts:o})=>{t.appendChild(Pn(o)),t.classList.add("md-source__repository--active")}),gs(e).pipe(S(o=>r.next(o)),_(()=>r.complete()),m(o=>k({ref:e},o)))})}function xs(e,{viewport$:t,header$:r}){return we(document.body).pipe(b(()=>Er(e,{header$:r,viewport$:t})),m(({offset:{y:o}})=>({hidden:o>=10})),re("hidden"))}function Ci(e,t){return $(()=>{let r=new w;return r.subscribe({next({hidden:o}){e.hidden=o},complete(){e.hidden=!1}}),(B("navigation.tabs.sticky")?R({hidden:!1}):xs(e,t)).pipe(S(o=>r.next(o)),_(()=>r.complete()),m(o=>k({ref:e},o)))})}function ys(e,{viewport$:t,header$:r}){let o=new Map,n=C(".md-nav__link",e);for(let a of n){let c=decodeURIComponent(a.hash.substring(1)),p=fe(`[id="${c}"]`);typeof p!="undefined"&&o.set(a,p)}let i=r.pipe(re("height"),m(({height:a})=>{let c=Ce("main"),p=F(":scope > :first-child",c);return a+.8*(p.offsetTop-c.offsetTop)}),le());return we(document.body).pipe(re("height"),b(a=>$(()=>{let c=[];return R([...o].reduce((p,[l,f])=>{for(;c.length&&o.get(c[c.length-1]).tagName>=f.tagName;)c.pop();let u=f.offsetTop;for(;!u&&f.parentElement;)f=f.parentElement,u=f.offsetTop;let d=f.offsetParent;for(;d;d=d.offsetParent)u+=d.offsetTop;return p.set([...c=[...c,l]].reverse(),u)},new Map))}).pipe(m(c=>new Map([...c].sort(([,p],[,l])=>p-l))),De(i),b(([c,p])=>t.pipe(Wt(([l,f],{offset:{y:u},size:d})=>{let g=u+d.height>=Math.floor(a.height);for(;f.length;){let[,M]=f[0];if(M-p=u&&!g)f=[l.pop(),...f];else break}return[l,f]},[[],[...c]]),Q((l,f)=>l[0]===f[0]&&l[1]===f[1])))))).pipe(m(([a,c])=>({prev:a.map(([p])=>p),next:c.map(([p])=>p)})),q({prev:[],next:[]}),et(2,1),m(([a,c])=>a.prev.length{let i=new w,s=i.pipe(te(),ae(!0));if(i.subscribe(({prev:a,next:c})=>{for(let[p]of c)p.classList.remove("md-nav__link--passed"),p.classList.remove("md-nav__link--active");for(let[p,[l]]of a.entries())l.classList.add("md-nav__link--passed"),l.classList.toggle("md-nav__link--active",p===a.length-1)}),B("toc.follow")){let a=T(t.pipe(Ae(1),m(()=>{})),t.pipe(Ae(250),m(()=>"smooth")));i.pipe(v(({prev:c})=>c.length>0),De(o.pipe(xe(pe))),oe(a)).subscribe(([[{prev:c}],p])=>{let[l]=c[c.length-1];if(l.offsetHeight){let f=vr(l);if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=ue(f);f.scrollTo({top:u-d/2,behavior:p})}}})}return B("navigation.tracking")&&t.pipe(U(s),re("offset"),Ae(250),Re(1),U(n.pipe(Re(1))),bt({delay:250}),oe(i)).subscribe(([,{prev:a}])=>{let c=Ee(),p=a[a.length-1];if(p&&p.length){let[l]=p,{hash:f}=new URL(l.href);c.hash!==f&&(c.hash=f,history.replaceState({},"",`${c}`))}else c.hash="",history.replaceState({},"",`${c}`)}),ys(e,{viewport$:t,header$:r}).pipe(S(a=>i.next(a)),_(()=>i.complete()),m(a=>k({ref:e},a)))})}function Es(e,{viewport$:t,main$:r,target$:o}){let n=t.pipe(m(({offset:{y:s}})=>s),et(2,1),m(([s,a])=>s>a&&a>0),Q()),i=r.pipe(m(({active:s})=>s));return V([i,n]).pipe(m(([s,a])=>!(s&&a)),Q(),U(o.pipe(Re(1))),ae(!0),bt({delay:250}),m(s=>({hidden:s})))}function $i(e,{viewport$:t,header$:r,main$:o,target$:n}){let i=new w,s=i.pipe(te(),ae(!0));return i.subscribe({next({hidden:a}){e.hidden=a,a?(e.setAttribute("tabindex","-1"),e.blur()):e.removeAttribute("tabindex")},complete(){e.style.top="",e.hidden=!0,e.removeAttribute("tabindex")}}),r.pipe(U(s),re("height")).subscribe(({height:a})=>{e.style.top=`${a+16}px`}),h(e,"click").subscribe(a=>{a.preventDefault(),window.scrollTo({top:0})}),Es(e,{viewport$:t,main$:o,target$:n}).pipe(S(a=>i.next(a)),_(()=>i.complete()),m(a=>k({ref:e},a)))}function ki({document$:e}){e.pipe(b(()=>C(".md-ellipsis")),J(t=>Ct(t).pipe(U(e.pipe(Re(1))),v(r=>r),m(()=>t),ye(1))),v(t=>t.offsetWidth{let r=t.innerText,o=t.closest("a")||t;return o.title=r,pt(o).pipe(U(e.pipe(Re(1))),_(()=>o.removeAttribute("title")))})).subscribe(),e.pipe(b(()=>C(".md-status")),J(t=>pt(t))).subscribe()}function Ri({document$:e,tablet$:t}){e.pipe(b(()=>C(".md-toggle--indeterminate")),S(r=>{r.indeterminate=!0,r.checked=!1}),J(r=>h(r,"change").pipe(Jr(()=>r.classList.contains("md-toggle--indeterminate")),m(()=>r))),oe(t)).subscribe(([r,o])=>{r.classList.remove("md-toggle--indeterminate"),o&&(r.checked=!1)})}function ws(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function Pi({document$:e}){e.pipe(b(()=>C("[data-md-scrollfix]")),S(t=>t.removeAttribute("data-md-scrollfix")),v(ws),J(t=>h(t,"touchstart").pipe(m(()=>t)))).subscribe(t=>{let r=t.scrollTop;r===0?t.scrollTop=1:r+t.offsetHeight===t.scrollHeight&&(t.scrollTop=r-1)})}function Ii({viewport$:e,tablet$:t}){V([Be("search"),t]).pipe(m(([r,o])=>r&&!o),b(r=>R(r).pipe(rt(r?400:100))),oe(e)).subscribe(([r,{offset:{y:o}}])=>{if(r)document.body.setAttribute("data-md-scrolllock",""),document.body.style.top=`-${o}px`;else{let n=-1*parseInt(document.body.style.top,10);document.body.removeAttribute("data-md-scrolllock"),document.body.style.top="",n&&window.scrollTo(0,n)}})}Object.entries||(Object.entries=function(e){let t=[];for(let r of Object.keys(e))t.push([r,e[r]]);return t});Object.values||(Object.values=function(e){let t=[];for(let r of Object.keys(e))t.push(e[r]);return t});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(e,t){typeof e=="object"?(this.scrollLeft=e.left,this.scrollTop=e.top):(this.scrollLeft=e,this.scrollTop=t)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...e){let t=this.parentNode;if(t){e.length===0&&t.removeChild(this);for(let r=e.length-1;r>=0;r--){let o=e[r];typeof o=="string"?o=document.createTextNode(o):o.parentNode&&o.parentNode.removeChild(o),r?t.insertBefore(this.previousSibling,o):t.replaceChild(o,this)}}}));function Ts(){return location.protocol==="file:"?_t(`${new URL("search/search_index.js",Or.base)}`).pipe(m(()=>__index),X(1)):Ge(new URL("search/search_index.json",Or.base))}document.documentElement.classList.remove("no-js");document.documentElement.classList.add("js");var at=nn(),Kt=hn(),kt=gn(Kt),lo=dn(),Pe=On(),Mr=Ut("(min-width: 960px)"),ji=Ut("(min-width: 1220px)"),Wi=xn(),Or=Te(),Ui=document.forms.namedItem("search")?Ts():Ze,mo=new w;pi({alert$:mo});ci({document$:at});var fo=new w,Di=$t(Or.base);B("navigation.instant")&&ui({sitemap$:Di,location$:Kt,viewport$:Pe,progress$:fo}).subscribe(at);var Fi;((Fi=Or.version)==null?void 0:Fi.provider)==="mike"&&xi({document$:at});T(Kt,kt).pipe(rt(125)).subscribe(()=>{nt("drawer",!1),nt("search",!1)});lo.pipe(v(({mode:e})=>e==="global")).subscribe(e=>{switch(e.type){case"p":case",":let t=fe("link[rel=prev]");typeof t!="undefined"&&it(t);break;case"n":case".":let r=fe("link[rel=next]");typeof r!="undefined"&&it(r);break;case"Enter":let o=Ve();o instanceof HTMLLabelElement&&o.click()}});ki({document$:at});Ri({document$:at,tablet$:Mr});Pi({document$:at});Ii({viewport$:Pe,tablet$:Mr});var lt=ti(Ce("header"),{viewport$:Pe}),qt=at.pipe(m(()=>Ce("main")),b(e=>ni(e,{viewport$:Pe,header$:lt})),X(1)),Ss=T(...me("consent").map(e=>_n(e,{target$:kt})),...me("dialog").map(e=>ei(e,{alert$:mo})),...me("header").map(e=>ri(e,{viewport$:Pe,header$:lt,main$:qt})),...me("palette").map(e=>ii(e)),...me("progress").map(e=>ai(e,{progress$:fo})),...me("search").map(e=>Si(e,{index$:Ui,keyboard$:lo})),...me("source").map(e=>Ai(e))),Os=$(()=>T(...me("announce").map(e=>Ln(e)),...me("content").map(e=>Zn(e,{sitemap$:Di,viewport$:Pe,target$:kt,print$:Wi})),...me("content").map(e=>B("search.highlight")?Oi(e,{index$:Ui,location$:Kt}):x),...me("header-title").map(e=>oi(e,{viewport$:Pe,header$:lt})),...me("sidebar").map(e=>e.getAttribute("data-md-type")==="navigation"?to(ji,()=>po(e,{viewport$:Pe,header$:lt,main$:qt})):to(Mr,()=>po(e,{viewport$:Pe,header$:lt,main$:qt}))),...me("tabs").map(e=>Ci(e,{viewport$:Pe,header$:lt})),...me("toc").map(e=>Hi(e,{viewport$:Pe,header$:lt,main$:qt,target$:kt})),...me("top").map(e=>$i(e,{viewport$:Pe,header$:lt,main$:qt,target$:kt})))),Ni=at.pipe(b(()=>Os),Ne(Ss),X(1));Ni.subscribe();window.document$=at;window.location$=Kt;window.target$=kt;window.keyboard$=lo;window.viewport$=Pe;window.tablet$=Mr;window.screen$=ji;window.print$=Wi;window.alert$=mo;window.progress$=fo;window.component$=Ni;})(); diff --git a/assets/javascripts/bundle.7c5c0157.min.js b/assets/javascripts/bundle.7c5c0157.min.js deleted file mode 100644 index d5a524e..0000000 --- a/assets/javascripts/bundle.7c5c0157.min.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";(()=>{var Ni=Object.create;var Cr=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames,qt=Object.getOwnPropertySymbols,qi=Object.getPrototypeOf,kr=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable;var mn=(e,t,r)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))kr.call(t,r)&&mn(e,r,t[r]);if(qt)for(var r of qt(t))dn.call(t,r)&&mn(e,r,t[r]);return e};var hn=(e,t)=>{var r={};for(var n in e)kr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qt)for(var n of qt(e))t.indexOf(n)<0&&dn.call(e,n)&&(r[n]=e[n]);return r};var Kt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ki=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vi(t))!kr.call(e,o)&&o!==r&&Cr(e,o,{get:()=>t[o],enumerable:!(n=zi(t,o))||n.enumerable});return e};var Lt=(e,t,r)=>(r=e!=null?Ni(qi(e)):{},Ki(t||!e||!e.__esModule?Cr(r,"default",{value:e,enumerable:!0}):r,e));var vn=Kt((Rr,bn)=>{(function(e,t){typeof Rr=="object"&&typeof bn!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Rr,function(){"use strict";function e(r){var n=!0,o=!1,i=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(M){return!!(M&&M!==document&&M.nodeName!=="HTML"&&M.nodeName!=="BODY"&&"classList"in M&&"contains"in M.classList)}function p(M){var Ne=M.type,R=M.tagName;return!!(R==="INPUT"&&a[Ne]&&!M.readOnly||R==="TEXTAREA"&&!M.readOnly||M.isContentEditable)}function c(M){M.classList.contains("focus-visible")||(M.classList.add("focus-visible"),M.setAttribute("data-focus-visible-added",""))}function l(M){M.hasAttribute("data-focus-visible-added")&&(M.classList.remove("focus-visible"),M.removeAttribute("data-focus-visible-added"))}function f(M){M.metaKey||M.altKey||M.ctrlKey||(s(r.activeElement)&&c(r.activeElement),n=!0)}function m(M){n=!1}function d(M){s(M.target)&&(n||p(M.target))&&c(M.target)}function h(M){s(M.target)&&(M.target.classList.contains("focus-visible")||M.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1},100),l(M.target))}function v(M){document.visibilityState==="hidden"&&(o&&(n=!0),Y())}function Y(){document.addEventListener("mousemove",K),document.addEventListener("mousedown",K),document.addEventListener("mouseup",K),document.addEventListener("pointermove",K),document.addEventListener("pointerdown",K),document.addEventListener("pointerup",K),document.addEventListener("touchmove",K),document.addEventListener("touchstart",K),document.addEventListener("touchend",K)}function X(){document.removeEventListener("mousemove",K),document.removeEventListener("mousedown",K),document.removeEventListener("mouseup",K),document.removeEventListener("pointermove",K),document.removeEventListener("pointerdown",K),document.removeEventListener("pointerup",K),document.removeEventListener("touchmove",K),document.removeEventListener("touchstart",K),document.removeEventListener("touchend",K)}function K(M){M.target.nodeName&&M.target.nodeName.toLowerCase()==="html"||(n=!1,X())}document.addEventListener("keydown",f,!0),document.addEventListener("mousedown",m,!0),document.addEventListener("pointerdown",m,!0),document.addEventListener("touchstart",m,!0),document.addEventListener("visibilitychange",v,!0),Y(),r.addEventListener("focus",d,!0),r.addEventListener("blur",h,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var gn=Kt(Hr=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(c){return!1}},r=t(),n=function(c){var l={next:function(){var f=c.shift();return{done:f===void 0,value:f}}};return r&&(l[Symbol.iterator]=function(){return l}),l},o=function(c){return encodeURIComponent(c).replace(/%20/g,"+")},i=function(c){return decodeURIComponent(String(c).replace(/\+/g," "))},a=function(){var c=function(f){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var m=typeof f;if(m!=="undefined")if(m==="string")f!==""&&this._fromString(f);else if(f instanceof c){var d=this;f.forEach(function(X,K){d.append(K,X)})}else if(f!==null&&m==="object")if(Object.prototype.toString.call(f)==="[object Array]")for(var h=0;hd[0]?1:0}),c._entries&&(c._entries={});for(var f=0;f1?i(d[1]):"")}})})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Hr);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(i){return!1}},r=function(){var o=e.URL,i=function(p,c){typeof p!="string"&&(p=String(p)),c&&typeof c!="string"&&(c=String(c));var l=document,f;if(c&&(e.location===void 0||c!==e.location.href)){c=c.toLowerCase(),l=document.implementation.createHTMLDocument(""),f=l.createElement("base"),f.href=c,l.head.appendChild(f);try{if(f.href.indexOf(c)!==0)throw new Error(f.href)}catch(M){throw new Error("URL unable to set base "+c+" due to "+M)}}var m=l.createElement("a");m.href=p,f&&(l.body.appendChild(m),m.href=m.href);var d=l.createElement("input");if(d.type="url",d.value=p,m.protocol===":"||!/:/.test(m.href)||!d.checkValidity()&&!c)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:m});var h=new e.URLSearchParams(this.search),v=!0,Y=!0,X=this;["append","delete","set"].forEach(function(M){var Ne=h[M];h[M]=function(){Ne.apply(h,arguments),v&&(Y=!1,X.search=h.toString(),Y=!0)}}),Object.defineProperty(this,"searchParams",{value:h,enumerable:!0});var K=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==K&&(K=this.search,Y&&(v=!1,this.searchParams._fromString(this.search),v=!0))}})},a=i.prototype,s=function(p){Object.defineProperty(a,p,{get:function(){return this._anchorElement[p]},set:function(c){this._anchorElement[p]=c},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(p){s(p)}),Object.defineProperty(a,"search",{get:function(){return this._anchorElement.search},set:function(p){this._anchorElement.search=p,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(a,{toString:{get:function(){var p=this;return function(){return p.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(p){this._anchorElement.href=p,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(p){this._anchorElement.pathname=p},enumerable:!0},origin:{get:function(){var p={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],c=this._anchorElement.port!=p&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(c?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(p){},enumerable:!0},username:{get:function(){return""},set:function(p){},enumerable:!0}}),i.createObjectURL=function(p){return o.createObjectURL.apply(o,arguments)},i.revokeObjectURL=function(p){return o.revokeObjectURL.apply(o,arguments)},e.URL=i};if(t()||r(),e.location!==void 0&&!("origin"in e.location)){var n=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:n,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=n()},100)}}})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Hr)});var an=Kt((Ut,on)=>{(function(t,r){typeof Ut=="object"&&typeof on=="object"?on.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Ut=="object"?Ut.ClipboardJS=r():t.ClipboardJS=r()})(Ut,function(){return function(){var e={686:function(n,o,i){"use strict";i.d(o,{default:function(){return Di}});var a=i(279),s=i.n(a),p=i(370),c=i.n(p),l=i(817),f=i.n(l);function m(N){try{return document.execCommand(N)}catch(A){return!1}}var d=function(A){var L=f()(A);return m("cut"),L},h=d;function v(N){var A=document.documentElement.getAttribute("dir")==="rtl",L=document.createElement("textarea");L.style.fontSize="12pt",L.style.border="0",L.style.padding="0",L.style.margin="0",L.style.position="absolute",L.style[A?"right":"left"]="-9999px";var F=window.pageYOffset||document.documentElement.scrollTop;return L.style.top="".concat(F,"px"),L.setAttribute("readonly",""),L.value=N,L}var Y=function(A,L){var F=v(A);L.container.appendChild(F);var W=f()(F);return m("copy"),F.remove(),W},X=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},F="";return typeof A=="string"?F=Y(A,L):A instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(A==null?void 0:A.type)?F=Y(A.value,L):(F=f()(A),m("copy")),F},K=X;function M(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(L){return typeof L}:M=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},M(N)}var Ne=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=A.action,F=L===void 0?"copy":L,W=A.container,G=A.target,$e=A.text;if(F!=="copy"&&F!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(G!==void 0)if(G&&M(G)==="object"&&G.nodeType===1){if(F==="copy"&&G.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(F==="cut"&&(G.hasAttribute("readonly")||G.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if($e)return K($e,{container:W});if(G)return F==="cut"?h(G):K(G,{container:W})},R=Ne;function B(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?B=function(L){return typeof L}:B=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},B(N)}function se(N,A){if(!(N instanceof A))throw new TypeError("Cannot call a class as a function")}function me(N,A){for(var L=0;L0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof W.action=="function"?W.action:this.defaultAction,this.target=typeof W.target=="function"?W.target:this.defaultTarget,this.text=typeof W.text=="function"?W.text:this.defaultText,this.container=B(W.container)==="object"?W.container:document.body}},{key:"listenClick",value:function(W){var G=this;this.listener=c()(W,"click",function($e){return G.onClick($e)})}},{key:"onClick",value:function(W){var G=W.delegateTarget||W.currentTarget,$e=this.action(G)||"copy",Vt=R({action:$e,container:this.container,target:this.target(G),text:this.text(G)});this.emit(Vt?"success":"error",{action:$e,text:Vt,trigger:G,clearSelection:function(){G&&G.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(W){return Ar("action",W)}},{key:"defaultTarget",value:function(W){var G=Ar("target",W);if(G)return document.querySelector(G)}},{key:"defaultText",value:function(W){return Ar("text",W)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(W){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return K(W,G)}},{key:"cut",value:function(W){return h(W)}},{key:"isSupported",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],G=typeof W=="string"?[W]:W,$e=!!document.queryCommandSupported;return G.forEach(function(Vt){$e=$e&&!!document.queryCommandSupported(Vt)}),$e}}]),L}(s()),Di=Wi},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function a(s,p){for(;s&&s.nodeType!==o;){if(typeof s.matches=="function"&&s.matches(p))return s;s=s.parentNode}}n.exports=a},438:function(n,o,i){var a=i(828);function s(l,f,m,d,h){var v=c.apply(this,arguments);return l.addEventListener(m,v,h),{destroy:function(){l.removeEventListener(m,v,h)}}}function p(l,f,m,d,h){return typeof l.addEventListener=="function"?s.apply(null,arguments):typeof m=="function"?s.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(v){return s(v,f,m,d,h)}))}function c(l,f,m,d){return function(h){h.delegateTarget=a(h.target,f),h.delegateTarget&&d.call(l,h)}}n.exports=p},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var a=Object.prototype.toString.call(i);return i!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var a=Object.prototype.toString.call(i);return a==="[object Function]"}},370:function(n,o,i){var a=i(879),s=i(438);function p(m,d,h){if(!m&&!d&&!h)throw new Error("Missing required arguments");if(!a.string(d))throw new TypeError("Second argument must be a String");if(!a.fn(h))throw new TypeError("Third argument must be a Function");if(a.node(m))return c(m,d,h);if(a.nodeList(m))return l(m,d,h);if(a.string(m))return f(m,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function c(m,d,h){return m.addEventListener(d,h),{destroy:function(){m.removeEventListener(d,h)}}}function l(m,d,h){return Array.prototype.forEach.call(m,function(v){v.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(m,function(v){v.removeEventListener(d,h)})}}}function f(m,d,h){return s(document.body,m,d,h)}n.exports=p},817:function(n){function o(i){var a;if(i.nodeName==="SELECT")i.focus(),a=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var s=i.hasAttribute("readonly");s||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),s||i.removeAttribute("readonly"),a=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var p=window.getSelection(),c=document.createRange();c.selectNodeContents(i),p.removeAllRanges(),p.addRange(c),a=p.toString()}return a}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,a,s){var p=this.e||(this.e={});return(p[i]||(p[i]=[])).push({fn:a,ctx:s}),this},once:function(i,a,s){var p=this;function c(){p.off(i,c),a.apply(s,arguments)}return c._=a,this.on(i,c,s)},emit:function(i){var a=[].slice.call(arguments,1),s=((this.e||(this.e={}))[i]||[]).slice(),p=0,c=s.length;for(p;p{"use strict";var gs=/["'&<>]/;ci.exports=ys;function ys(e){var t=""+e,r=gs.exec(t);if(!r)return t;var n,o="",i=0,a=0;for(i=r.index;i{function e(n,o){parent.postMessage(n,o||"*")}function t(...n){return n.reduce((o,i)=>o.then(()=>new Promise(a=>{let s=document.createElement("script");s.src=i,s.onload=a,document.body.appendChild(s)})),Promise.resolve())}var r=class extends EventTarget{constructor(n){super(),this.url=n,this.m=i=>{i.source===this.w&&(this.dispatchEvent(new MessageEvent("message",{data:i.data})),this.onmessage&&this.onmessage(i))},this.e=(i,a,s,p,c)=>{if(a===`${this.url}`){let l=new ErrorEvent("error",{message:i,filename:a,lineno:s,colno:p,error:c});this.dispatchEvent(l),this.onerror&&this.onerror(l)}};let o=document.createElement("iframe");o.hidden=!0,document.body.appendChild(this.iframe=o),this.w.document.open(),this.w.document.write(`

Changelog¤

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.5.0 - 2023-08-02¤

Compare with 0.4.1

Breaking Changes¤

  • Drop support for Python 3.7

Build¤

  • Migrate to pdm-backend (48b92fb by Michał Górny).

Bug Fixes¤

  • Stop using deprecated warning_filter (7721103 by Kyle King). PR #30

Code Refactoring¤

  • Use new MkDocs plugin logger if available (ca8d758 by Timothée Mazzucotelli).

0.4.1 - 2022-03-07¤

Compare with 0.4.0

Bug Fixes¤

0.4.0 - 2022-03-07¤

Compare with 0.3.1

Features¤

  • Add HTML classes to references: autorefs always, and autorefs-internal or autorefs-external depending on the link (39db59d by Timothée Mazzucotelli). PR #16

Bug Fixes¤

  • Don't compute relative URLs of already relative ones (f6b861c by Timothée Mazzucotelli). PR #15

0.3.1 - 2021-12-27¤

Compare with 0.3.0

Code Refactoring¤

0.3.0 - 2021-07-24¤

Compare with 0.2.1

Features¤

  • Add optional-hover ref type (0288bdd by Brian Koropoff). PR #10

0.2.1 - 2021-05-07¤

Compare with 0.2.0

Bug Fixes¤

  • Prevent error during parallel installations (c90e399 by Timothée Mazzucotelli). PR #9

0.2.0 - 2021-05-03¤

Compare with 0.1.1

Features¤

  • Allow registering absolute URLs for autorefs (621686b by Oleh Prypin). PR #8
  • Allow external tools to insert references that are OK to skip (7619c28 by Oleh Prypin). PR #7
  • Allow [``identifier``][], understood as [``identifier``][identifier] (2d3182d by Oleh Prypin). PR #5

0.1.1 - 2021-02-28¤

Compare with 0.1.0

Packaging¤

  • Remove unused dependencies (9c6a8e6 by Oleh Prypin).

0.1.0 - 2021-02-17¤

Compare with first commit

Features¤

  • Split out "mkdocs-autorefs" plugin from "mkdocstrings" (fe6faa5 by Oleh Prypin).
\ No newline at end of file + Changelog - mkdocs-autorefs

Changelog¤

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

1.0.0 - 2024-02-27¤

Compare with 0.5.0

Features¤

Bug Fixes¤

0.5.0 - 2023-08-02¤

Compare with 0.4.1

Breaking Changes¤

  • Drop support for Python 3.7

Build¤

  • Migrate to pdm-backend (48b92fb by Michał Górny).

Bug Fixes¤

  • Stop using deprecated warning_filter (7721103 by Kyle King). PR #30

Code Refactoring¤

  • Use new MkDocs plugin logger if available (ca8d758 by Timothée Mazzucotelli).

0.4.1 - 2022-03-07¤

Compare with 0.4.0

Bug Fixes¤

0.4.0 - 2022-03-07¤

Compare with 0.3.1

Features¤

  • Add HTML classes to references: autorefs always, and autorefs-internal or autorefs-external depending on the link (39db59d by Timothée Mazzucotelli). PR #16

Bug Fixes¤

  • Don't compute relative URLs of already relative ones (f6b861c by Timothée Mazzucotelli). PR #15

0.3.1 - 2021-12-27¤

Compare with 0.3.0

Code Refactoring¤

0.3.0 - 2021-07-24¤

Compare with 0.2.1

Features¤

  • Add optional-hover ref type (0288bdd by Brian Koropoff). PR #10

0.2.1 - 2021-05-07¤

Compare with 0.2.0

Bug Fixes¤

  • Prevent error during parallel installations (c90e399 by Timothée Mazzucotelli). PR #9

0.2.0 - 2021-05-03¤

Compare with 0.1.1

Features¤

  • Allow registering absolute URLs for autorefs (621686b by Oleh Prypin). PR #8
  • Allow external tools to insert references that are OK to skip (7619c28 by Oleh Prypin). PR #7
  • Allow [``identifier``][], understood as [``identifier``][identifier] (2d3182d by Oleh Prypin). PR #5

0.1.1 - 2021-02-28¤

Compare with 0.1.0

Packaging¤

  • Remove unused dependencies (9c6a8e6 by Oleh Prypin).

0.1.0 - 2021-02-17¤

Compare with first commit

Features¤

  • Split out "mkdocs-autorefs" plugin from "mkdocstrings" (fe6faa5 by Oleh Prypin).
\ No newline at end of file diff --git a/code_of_conduct/index.html b/code_of_conduct/index.html index e59fd4a..e2d4037 100644 --- a/code_of_conduct/index.html +++ b/code_of_conduct/index.html @@ -1 +1 @@ - Code of Conduct - mkdocs-autorefs

Contributor Covenant Code of Conduct¤

Our Pledge¤

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Our Standards¤

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Enforcement Responsibilities¤

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

Scope¤

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Enforcement¤

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at pawamoy@pm.me. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

Enforcement Guidelines¤

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

1. Correction¤

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

2. Warning¤

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

3. Temporary Ban¤

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

4. Permanent Ban¤

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

Attribution¤

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

\ No newline at end of file + Code of Conduct - mkdocs-autorefs

Contributor Covenant Code of Conduct¤

Our Pledge¤

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Our Standards¤

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Enforcement Responsibilities¤

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

Scope¤

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Enforcement¤

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dev@pawamoy.fr. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

Enforcement Guidelines¤

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

1. Correction¤

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

2. Warning¤

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

3. Temporary Ban¤

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

4. Permanent Ban¤

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

Attribution¤

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

\ No newline at end of file diff --git a/contributing/index.html b/contributing/index.html index 13820df..640721e 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -1,8 +1,8 @@ - Contributing - mkdocs-autorefs

Contributing¤

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Environment setup¤

Nothing easier!

Fork and clone the repository, then:

cd mkdocs-autorefs
+ Contributing - mkdocs-autorefs      

Contributing¤

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Environment setup¤

Nothing easier!

Fork and clone the repository, then:

cd mkdocs-autorefs
 make setup
 

Note

If it fails for some reason, you'll need to install PDM manually.

You can install it with:

python3 -m pip install --user pipx
 pipx install pdm
-

Now you can try running make setup again, or simply pdm install.

You now have the dependencies installed.

Run make help to see all the available actions!

Tasks¤

This project uses duty to run tasks. A Makefile is also provided. The Makefile will try to run certain tasks on multiple Python versions. If for some reason you don't want to run the task on multiple Python versions, you run the task directly with pdm run duty TASK.

The Makefile detects if a virtual environment is activated, so make will work the same with the virtualenv activated or not.

If you work in VSCode, see examples of tasks and run configurations.

Development¤

As usual:

  1. create a new branch: git switch -c feature-or-bugfix-name
  2. edit the code and/or the documentation

Before committing:

  1. run make format to auto-format the code
  2. run make check to check everything (fix any warning)
  3. run make test to run the tests (fix any issue)
  4. if you updated the documentation or the project dependencies:
    1. run make docs
    2. go to http://localhost:8000 and check that everything looks good
  5. follow our commit message convention

If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.

Don't bother updating the changelog, we will take care of this.

Commit message convention¤

Commit messages must follow our convention based on the Angular style or the Karma convention:

<type>[(scope)]: Subject
+

Now you can try running make setup again, or simply pdm install.

You now have the dependencies installed.

Run make help to see all the available actions!

Tasks¤

This project uses duty to run tasks. A Makefile is also provided. The Makefile will try to run certain tasks on multiple Python versions. If for some reason you don't want to run the task on multiple Python versions, you run the task directly with pdm run duty TASK.

The Makefile detects if a virtual environment is activated, so make will work the same with the virtualenv activated or not.

If you work in VSCode, we provide an action to configure VSCode for the project.

Development¤

As usual:

  1. create a new branch: git switch -c feature-or-bugfix-name
  2. edit the code and/or the documentation

Before committing:

  1. run make format to auto-format the code
  2. run make check to check everything (fix any warning)
  3. run make test to run the tests (fix any issue)
  4. if you updated the documentation or the project dependencies:
    1. run make docs
    2. go to http://localhost:8000 and check that everything looks good
  5. follow our commit message convention

If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.

Don't bother updating the changelog, we will take care of this.

Commit message convention¤

Commit messages must follow our convention based on the Angular style or the Karma convention:

<type>[(scope)]: Subject
 
 [Body]
 

Subject and body must be valid Markdown. Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.

Scope and body are optional. Type can be:

  • build: About packaging, building wheels, etc.
  • chore: About packaging or repo/files management.
  • ci: About Continuous Integration.
  • deps: Dependencies update.
  • docs: About documentation.
  • feat: New feature.
  • fix: Bug fix.
  • perf: About performance.
  • refactor: Changes that are not features or bug fixes.
  • style: A change in code style/format.
  • tests: About tests.

If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:

Body.
@@ -13,4 +13,4 @@
 git commit --fixup=SHA
 

Once all the changes are approved, you can squash your commits:

git rebase -i --autosquash main
 

And force-push:

git push -f
-

If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.

\ No newline at end of file +

If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.

\ No newline at end of file diff --git a/coverage/index.html b/coverage/index.html index d71cb56..3ec03ea 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -1,4 +1,4 @@ - Coverage report - mkdocs-autorefs

Coverage report

Coverage report

Credits¤

These projects were used to build mkdocs-autorefs. Thank you!

python | pdm | copier-pdm

Runtime dependencies¤

Project Summary Version (accepted) Version (last resolved) License
click Composable command line interface toolkit >=7.0 8.1.6 BSD-3-Clause
colorama Cross-platform colored terminal text. >=0.4; platform_system == "Windows" 0.4.6 BSD License
ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License
importlib-metadata Read metadata from Python packages >=4.4; python_version < "3.10" 6.8.0 ?
jinja2 A very fast and expressive template engine. >=2.11.1 3.1.2 BSD-3-Clause
markdown Python implementation of John Gruber's Markdown. >=3.3 3.4.4 BSD License
markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0.1 2.1.3 BSD-3-Clause
mergedeep A deep merge function for 🐍. >=1.3.4 1.3.4 MIT License
mkdocs Project documentation with Markdown. >=1.1 1.5.2 BSD License
packaging Core utilities for Python packages >=20.5 23.1 BSD License
pathspec Utility library for gitignore style pattern matching of file paths. >=0.11.1 0.11.2 Mozilla Public License 2.0 (MPL 2.0)
platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir". >=2.2.0 3.10.0 MIT License
python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License
pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT
pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License
six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT
watchdog Filesystem events monitoring >=2.0 3.0.0 Apache License 2.0
zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.16.2 ?

Development dependencies¤

Project Summary Version (accepted) Version (last resolved) License
ansimarkup Produce colored terminal text with an xml-like markup ~=1.4 1.5.0 Revised BSD License
babel Internationalization utilities >=2.10.3 2.12.1 BSD
beautifulsoup4 Screen-scraping library 4.12.2 MIT License
black The uncompromising code formatter. >=23.1 23.7.0 MIT
blacken-docs Run Black on Python code blocks in documentation files. >=1.13 1.15.0 MIT
certifi Python package for providing Mozilla's CA Bundle. >=2017.4.17 2023.7.22 MPL-2.0
charset-normalizer The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. <4,>=2 3.2.0 MIT
click Composable command line interface toolkit >=8.0.0 8.1.6 BSD-3-Clause
colorama Cross-platform colored terminal text. ; platform_system == "Windows" 0.4.6 BSD License
coverage Code coverage measurement for Python [toml]>=5.2.1 7.2.7 Apache-2.0
csscompressor A python port of YUI CSS Compressor >=0.9.5 0.9.5 BSD
cssselect cssselect parses CSS3 Selectors and translates them to XPath 1.0 >=1.2.0 1.2.0 BSD
dparse A parser for Python dependency files >=0.6.2 0.6.3 MIT license
duty A simple task runner. >=0.10 1.0.0 ISC
exceptiongroup Backport of PEP 654 (exception groups) >=1.0.0rc8; python_version < "3.11" 1.1.2 ?
execnet execnet: rapid multi-Python deployment >=1.1 2.0.2 MIT License
failprint Run a command, print its output only if it fails. >=0.11 1.0.1 ISC
ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License
git-changelog Automatic Changelog generator using Jinja2 templates. >=1.0 2.0.0 ISC
gitdb Git Object Database <5,>=4.0.1 4.0.10 BSD License
gitpython GitPython is a Python library used to interact with Git repositories 3.1.32 BSD
griffe Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API. >=0.30 0.32.3 ISC
htmlmin2 An HTML Minifier >=0.1.13 0.1.13 BSD
idna Internationalized Domain Names in Applications (IDNA) <4,>=2.5 3.4 BSD License
importlib-metadata Read metadata from Python packages >=4.3; python_version < "3.10" 6.8.0 ?
iniconfig brain-dead simple config-ini parsing 2.0.0 MIT License
jinja2 A very fast and expressive template engine. <4,>=2.11 3.1.2 BSD-3-Clause
jsmin JavaScript minifier. >=3.0.1 3.0.1 MIT License
lxml Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. >=4.6 4.9.3 BSD-3-Clause
markdown Python implementation of John Gruber's Markdown. <4.0.0,>=3.3.3 3.4.4 BSD License
markdown-callouts Markdown extension: a classier syntax for admonitions >=0.2 0.3.0 MIT
markdown-exec Utilities to execute code blocks in Markdown files. >=0.5 1.6.0.1.0.1 ISC
markdown2 A fast and complete Python implementation of Markdown >=2.4.3 2.4.10 MIT
markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0 2.1.3 BSD-3-Clause
mergedeep A deep merge function for 🐍. >=1.3.4 1.3.4 MIT License
mkdocs Project documentation with Markdown. >=1.5 1.5.2 BSD License
mkdocs-coverage MkDocs plugin to integrate your coverage HTML report into your site. >=0.2 1.0.0 ISC
mkdocs-gen-files MkDocs plugin to programmatically generate documentation pages during the build >=0.3 0.5.0 MIT License
mkdocs-git-committers-plugin-2 An MkDocs plugin to create a list of contributors on the page >=1.1 1.1.2 MIT
mkdocs-literate-nav MkDocs plugin to specify the navigation in Markdown instead of YAML >=0.4 0.6.0 MIT License
mkdocs-material Documentation that simply works >=7.3 9.1.21+insiders.4.37.1 MIT License
mkdocs-material-extensions Extension pack for Python Markdown and MkDocs Material. >=1.1 1.1.1 MIT License
mkdocs-minify-plugin An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk >=0.6.4 0.7.1 MIT
mkdocstrings Automatic documentation from sources, for MkDocs. [python]>=0.18 0.22.0 ISC
mkdocstrings-python A Python handler for mkdocstrings. >=0.5.2 1.2.1.1.1.4 ISC
mypy Optional static typing for Python >=0.910 1.4.1 MIT License
mypy-extensions Type system extensions for programs checked with the mypy type checker. >=0.4.3 1.0.0 MIT License
packaging Core utilities for Python packages >=22.0 23.1 BSD License
paginate Divides large result sets into pages for easier browsing >=0.5.6 0.5.6 MIT
pathspec Utility library for gitignore style pattern matching of file paths. >=0.9.0 0.11.2 Mozilla Public License 2.0 (MPL 2.0)
pipdeptree Command line utility to show dependency tree of packages. >=2.3 2.12.0 MIT License
platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir". >=2 3.10.0 MIT License
pluggy plugin and hook calling mechanisms for python <2.0,>=0.12 1.2.0 MIT
ptyprocess Run a subprocess in a pseudo terminal ~=0.6; sys_platform != "win32" 0.7.0 ISC License (ISCL)
pygments Pygments is a syntax highlighting package written in Python. >=2.14 2.15.1 BSD-2-Clause
pymdown-extensions Extension pack for Python Markdown. >=9 10.1 MIT License
pyquery A jquery-like library for python >=1.2 2.0.0 BSD
pytest pytest: simple powerful testing with Python >=6.2 7.4.0 MIT
pytest-cov Pytest plugin for measuring coverage. >=3.0 4.1.0 MIT
pytest-randomly Pytest plugin to randomly order tests and control random.seed. >=3.10 3.13.0 MIT
pytest-xdist pytest xdist plugin for distributed testing, most importantly across multiple CPUs >=2.4 3.3.1 MIT
python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License
pytz World timezone definitions, modern and historical >=2015.7; python_version < "3.9" 2023.3 ?
pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT
pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License
readtime Calculates the time some text takes the average human to read, based on Medium's read time forumula >=2.0 3.0.0 BSD
regex Alternative regular expression module, to replace re. >=2022.4.24 2023.6.3 Apache Software License
requests Python HTTP for Humans. 2.31.0 Apache 2.0
ruamel-yaml ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order >=0.17.21 0.17.32 MIT license
ruamel-yaml-clib C version of reader, parser and emitter for ruamel.yaml derived from libyaml >=0.2.7; platform_python_implementation == "CPython" and python_version < "3.12" 0.2.7 MIT
ruff An extremely fast Python linter, written in Rust. >=0.0.246 0.0.282 MIT
safety Checks installed dependencies for known vulnerabilities and licenses. >=2 2.3.4 MIT license
semver Python helper for Semantic Versioning (https://semver.org) >=2.13 3.0.1 BSD
setuptools Easily download, build, install, upgrade, and uninstall Python packages >=19.3 68.0.0 MIT License
six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT
smmap A pure Python implementation of a sliding window memory map manager <6,>=3.0.1 5.0.0 BSD
soupsieve A modern CSS selector implementation for Beautiful Soup. >1.2 2.4.1 MIT License
toml Python Library for Tom's Obvious, Minimal Language >=0.10 0.10.2 MIT
tomli A lil' TOML parser >=1.1.0; python_version < "3.11" 2.0.1 ?
types-markdown Typing stubs for Markdown >=3.3 3.4.2.10 Apache-2.0 license
types-pyyaml Typing stubs for PyYAML >=6.0 6.0.12.11 Apache-2.0 license
types-toml Typing stubs for toml >=0.10 0.10.8.7 Apache-2.0 license
typing-extensions Backported and Experimental Type Hints for Python 3.7+ >=3.10.0.0; python_version < "3.10" 4.7.1 Python Software Foundation License
urllib3 HTTP library with thread-safe connection pooling, file post, and more. <3,>=1.21.1 2.0.4 MIT License
watchdog Filesystem events monitoring >=2.0 3.0.0 Apache License 2.0
zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.16.2 ?

More credits from the author

\ No newline at end of file + Credits - mkdocs-autorefs

Credits¤

These projects were used to build mkdocs-autorefs. Thank you!

python | pdm | copier-pdm

Runtime dependencies¤

Project Summary Version (accepted) Version (last resolved) License
click Composable command line interface toolkit >=7.0 8.1.7 BSD-3-Clause
colorama Cross-platform colored terminal text. >=0.4; platform_system == "Windows" 0.4.6 BSD License
ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License
importlib-metadata Read metadata from Python packages >=4.4; python_version < "3.10" 7.0.1 ?
jinja2 A very fast and expressive template engine. >=2.11.1 3.1.3 BSD-3-Clause
markdown Python implementation of John Gruber's Markdown. >=3.3 3.5.2 BSD License
markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0.1 2.1.5 BSD-3-Clause
mergedeep A deep merge function for 🐍. >=1.3.4 1.3.4 MIT License
mkdocs Project documentation with Markdown. >=1.1 1.5.3 BSD License
packaging Core utilities for Python packages >=20.5 23.2 BSD License
pathspec Utility library for gitignore style pattern matching of file paths. >=0.11.1 0.12.1 Mozilla Public License 2.0 (MPL 2.0)
platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir". >=2.2.0 4.2.0 MIT License
python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License
pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT
pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License
six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT
watchdog Filesystem events monitoring >=2.0 4.0.0 Apache-2.0
zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.17.0 ?

Development dependencies¤

Project Summary Version (accepted) Version (last resolved) License
ansimarkup Produce colored terminal text with an xml-like markup ~=1.4 1.5.0 Revised BSD License
appdirs A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". >=1.4 1.4.4 MIT
authlib The ultimate Python library in building OAuth and OpenID Connect servers and clients. >=1.2.0 1.3.0 BSD-3-Clause
babel Internationalization utilities ~=2.10 2.14.0 BSD-3-Clause
black The uncompromising code formatter. >=23.9 24.2.0 MIT
blacken-docs Run Black on Python code blocks in documentation files. >=1.16 1.16.0 MIT
certifi Python package for providing Mozilla's CA Bundle. >=2017.4.17 2024.2.2 MPL-2.0
cffi Foreign Function Interface for Python calling C code. >=1.12; platform_python_implementation != "PyPy" 1.16.0 MIT
charset-normalizer The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. <4,>=2 3.3.2 MIT
click Composable command line interface toolkit >=8.0.0 8.1.7 BSD-3-Clause
colorama Cross-platform colored terminal text. ; platform_system == "Windows" 0.4.6 BSD License
coverage Code coverage measurement for Python [toml]>=5.2.1 7.4.1 Apache-2.0
cryptography cryptography is a package which provides cryptographic recipes and primitives to Python developers. 42.0.2 Apache-2.0 OR BSD-3-Clause
csscompressor A python port of YUI CSS Compressor >=0.9.5 0.9.5 BSD
dparse A parser for Python dependency files >=0.6.4b0 0.6.4b0 MIT license
duty A simple task runner. >=0.10 1.2.0 ISC
exceptiongroup Backport of PEP 654 (exception groups) >=1.0.0rc8; python_version < "3.11" 1.2.0 ?
execnet execnet: rapid multi-Python deployment >=1.1 2.0.2 MIT License
failprint Run a command, print its output only if it fails. !=1.0.0,>=0.11 1.0.2 ISC
ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License
git-changelog Automatic Changelog generator using Jinja2 templates. >=2.3 2.4.0 ISC
gitdb Git Object Database <5,>=4.0.1 4.0.11 BSD License
gitpython GitPython is a Python library used to interact with Git repositories 3.1.41 BSD-3-Clause
griffe Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API. >=0.40 0.40.1.1.0.0 ISC
htmlmin2 An HTML Minifier >=0.1.13 0.1.13 BSD
idna Internationalized Domain Names in Applications (IDNA) <4,>=2.5 3.6 BSD License
importlib-metadata Read metadata from Python packages >=4.3; python_version < "3.10" 7.0.1 ?
iniconfig brain-dead simple config-ini parsing 2.0.0 MIT License
jinja2 A very fast and expressive template engine. <4,>=2.11 3.1.3 BSD-3-Clause
jsmin JavaScript minifier. >=3.0.1 3.0.1 MIT License
markdown Python implementation of John Gruber's Markdown. >=3.3.3 3.5.2 BSD License
markdown-callouts Markdown extension: a classier syntax for admonitions >=0.3 0.4.0 MIT License
markdown-exec Utilities to execute code blocks in Markdown files. >=1.7 1.8.0 ISC
markdown-it-py Python port of markdown-it. Markdown parsing, done right! >=2.2.0 3.0.0 MIT License
markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0 2.1.5 BSD-3-Clause
marshmallow A lightweight library for converting complex datatypes to and from native Python datatypes. >=3.15.0 3.20.2 MIT
mdurl Markdown URL utilities ~=0.1 0.1.2 MIT License
mergedeep A deep merge function for 🐍. >=1.3.4 1.3.4 MIT License
mkdocs Project documentation with Markdown. >=1.5 1.5.3 BSD License
mkdocs-coverage MkDocs plugin to integrate your coverage HTML report into your site. >=1.0 1.0.0 ISC
mkdocs-gen-files MkDocs plugin to programmatically generate documentation pages during the build >=0.5 0.5.0 MIT License
mkdocs-git-committers-plugin-2 An MkDocs plugin to create a list of contributors on the page. The git-committers plugin will seed the template context with a list of GitHub or GitLab committers and other useful GIT info such as last modified date >=1.2 2.2.3 MIT
mkdocs-literate-nav MkDocs plugin to specify the navigation in Markdown instead of YAML >=0.6 0.6.1 MIT License
mkdocs-material Documentation that simply works >=9.4 9.5.9 MIT License
mkdocs-material-extensions Extension pack for Python Markdown and MkDocs Material. ~=1.3 1.3.1 MIT License
mkdocs-minify-plugin An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk >=0.7 0.8.0 MIT
mkdocstrings Automatic documentation from sources, for MkDocs. [python]>=0.23 0.24.0 ISC
mkdocstrings-python A Python handler for mkdocstrings. >=0.5.2 1.8.0.1.6.0 ISC
mypy Optional static typing for Python >=1.5 1.8.0 MIT
mypy-extensions Type system extensions for programs checked with the mypy type checker. >=0.4.3 1.0.0 MIT License
packaging Core utilities for Python packages >=22.0 23.2 BSD License
paginate Divides large result sets into pages for easier browsing ~=0.5 0.5.6 MIT
pathspec Utility library for gitignore style pattern matching of file paths. >=0.9.0 0.12.1 Mozilla Public License 2.0 (MPL 2.0)
platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir". >=2 4.2.0 MIT License
pluggy plugin and hook calling mechanisms for python <2.0,>=1.3.0 1.4.0 MIT
ptyprocess Run a subprocess in a pseudo terminal ~=0.6; sys_platform != "win32" 0.7.0 ISC License (ISCL)
pycparser C parser in Python 2.21 BSD
pydantic Data validation and settings management using python type hints <2.0,>=1.10.12 1.10.14 MIT
pygments Pygments is a syntax highlighting package written in Python. >=2.16 2.17.2 BSD-2-Clause
pymdown-extensions Extension pack for Python Markdown. >=10.0 10.7 MIT License
pytest pytest: simple powerful testing with Python >=7.4 8.0.0 MIT
pytest-cov Pytest plugin for measuring coverage. >=4.1 4.1.0 MIT
pytest-randomly Pytest plugin to randomly order tests and control random.seed. >=3.15 3.15.0 MIT
pytest-xdist pytest xdist plugin for distributed testing, most importantly across multiple CPUs >=3.3 3.5.0 MIT
python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License
pytz World timezone definitions, modern and historical >=2015.7; python_version < "3.9" 2024.1 ?
pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT
pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License
regex Alternative regular expression module, to replace re. >=2022.4 2023.12.25 Apache Software License
requests Python HTTP for Humans. 2.31.0 Apache 2.0
rich Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal 13.7.0 MIT
ruamel-yaml ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order >=0.17.21 0.18.6 MIT license
ruamel-yaml-clib C version of reader, parser and emitter for ruamel.yaml derived from libyaml >=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13" 0.2.8 MIT
ruff An extremely fast Python linter and code formatter, written in Rust. >=0.0 0.2.1 MIT
safety Checks installed dependencies for known vulnerabilities and licenses. >=2.3 3.0.1 MIT license
safety-schemas Schemas for Safety tools >=0.0.1 0.0.2 MIT license
semver Python helper for Semantic Versioning (https://semver.org) >=2.13 3.0.2 BSD
setuptools Easily download, build, install, upgrade, and uninstall Python packages >=65.5.1 69.1.0 MIT License
six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT
smmap A pure Python implementation of a sliding window memory map manager <6,>=3.0.1 5.0.1 BSD
tomli A lil' TOML parser >=2.0; python_version < '3.11' 2.0.1 ?
typer Typer, build great CLIs. Easy to code. Based on Python type hints. 0.9.0 MIT License
types-markdown Typing stubs for Markdown >=3.5 3.5.0.20240129 Apache-2.0 license
types-pyyaml Typing stubs for PyYAML >=6.0 6.0.12.12 Apache-2.0 license
typing-extensions Backported and Experimental Type Hints for Python 3.8+ >=4.0.1; python_version < "3.11" 4.9.0 Python Software Foundation License
urllib3 HTTP library with thread-safe connection pooling, file post, and more. <3,>=1.21.1 2.2.0 MIT License
watchdog Filesystem events monitoring >=2.0 4.0.0 Apache-2.0
zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.17.0 ?

More credits from the author

\ No newline at end of file diff --git a/css/mkdocstrings.css b/css/mkdocstrings.css index fe191c8..727a614 100644 --- a/css/mkdocstrings.css +++ b/css/mkdocstrings.css @@ -9,6 +9,7 @@ a.external::after, a.autorefs-external::after { /* https://primer.style/octicons/arrow-up-right-24 */ mask-image: url('data:image/svg+xml,'); + -webkit-mask-image: url('data:image/svg+xml,'); content: ' '; display: inline-block; diff --git a/index.html b/index.html index d971a5c..c3da12f 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - Overview - mkdocs-autorefs

mkdocs-autorefs¤

ci documentation pypi version conda version gitpod gitter

Automatically link across pages in MkDocs.

Installation¤

With pip:

python3 -m pip install mkdocs-autorefs
-

Usage¤

# mkdocs.yml
+ Overview - mkdocs-autorefs      

mkdocs-autorefs¤

ci documentation pypi version conda version gitpod gitter

Automatically link across pages in MkDocs.

Installation¤

With pip:

python3 -m pip install mkdocs-autorefs
+

Usage¤

# mkdocs.yml
 plugins:
   - search
   - autorefs
@@ -11,4 +11,42 @@
 

This is a normal link to an anchor. MkDocs generates anchors for each heading, and they can always be used to link to something, either within the same page (as shown here) or by specifying the path of the other page.

But with this plugin, you can link to a heading from any other page on the site without needing to know the path of either of the pages, just the heading title itself.
Let's create another Markdown page to try this, subdir/doc2.md:

We can [link to that heading][hello-world] from another page too.
 
 This works the same as [a normal link to that heading](../doc1.md#hello-world).
-

Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that MkDocs supports only relative links between pages.

Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages.

\ No newline at end of file +

Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that MkDocs supports only relative links between pages.

Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages. In such cases, use Markdown anchors to add unique aliases to your headings.

Markdown anchors¤

The autorefs plugin offers a feature called "Markdown anchors". Such anchors can be added anywhere in a document, and linked to from any other place.

The syntax is:

[](){#id-of-the-anchor}
+

If you look closely, it starts with the usual syntax for a link, [](), except both the text value and URL of the link are empty. Then we see {#id-of-the-anchor}, which is the syntax supported by the attr_list extension. It sets an HTML id to the anchor element. The autorefs plugin simply gives a meaning to such anchors with ids. Note that raw HTML anchors like <a id="foo"></a> are not supported.

The attr_list extension must be enabled for the Markdown anchors feature to work:

# mkdocs.yml
+plugins:
+  - search
+  - autorefs
+
+markdown_extensions:
+  - attr_list
+

Now, you can add anchors to documents:

Somewhere in a document.
+
+[](){#foobar-paragraph}
+
+Paragraph about foobar.
+

...making it possible to link to this anchor with our automatic links:

In any document.
+
+Check out the [paragraph about foobar][foobar-pararaph].
+

If you add a Markdown anchor right above a heading, this anchor will redirect to the heading itself:

[](){#foobar}
+## A verbose title about foobar
+

Linking to the foobar anchor will bring you directly to the heading, not the anchor itself, so the URL will show #a-verbose-title-about-foobar instead of #foobar. These anchors therefore act as "aliases" for headings. It is possible to define multiple aliases per heading:

[](){#contributing}
+[](){#development-setup}
+## How to contribute to the project?
+

Such aliases are especially useful when the same headings appear in several different pages. Without aliases, linking to the heading is undefined behavior (it could lead to any one of the headings). With unique aliases above headings, you can make sure to link to the right heading.

For example, consider the following setup. You have one document per operating system describing how to install a project with the OS package manager or from sources:

📁 docs/
+└── 📁 install/
+    ├── 📄 arch.md
+    ├── 📄 debian.md
+    └── 📄 gentoo.md
+

Each page has:

## Install with package manager
+...
+
+## Install from sources
+...
+

You don't want to change headings and make them redundant, like ## Arch: Install with package manager and ## Debian: Install with package manager just to be able to reference the right one with autorefs. Instead you can do this:

[](){#arch-install-pkg}
+## Install with package manager
+...
+
+[](){#arch-install-src}
+## Install from sources
+...
+

...changing arch by debian, gentoo, etc. in the other pages.

\ No newline at end of file diff --git a/license/index.html b/license/index.html index d055a05..0690f85 100644 --- a/license/index.html +++ b/license/index.html @@ -1,4 +1,4 @@ - License - mkdocs-autorefs

License¤

ISC License
+ License - mkdocs-autorefs      

License¤

ISC License
 
 Copyright (c) 2019, Oleh Prypin
 Copyright (c) 2019, Timothée Mazzucotelli
@@ -14,4 +14,4 @@
 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/objects.inv b/objects.inv index 84039d4464c01fcea887d28d2c140b23867394b8..5a14e288f5e426b7369c5be1fa6aa899c9c475a2 100644 GIT binary patch delta 466 zcmV;@0WJQY1Iq-EgMXGgPs1<}fOmdHC0Gf9k&U5942X)?8Xe9hwXo08*$MFPv6D1B z+a|(hXq7sr@AKK$v-NXfgw3IGhOxAZ`t4ksqEWawUHAcHB!MUTYt+f%(c<{v+hA7U zQ&UX@bg?@y*^*kxhBT53NTI;mXv9pCL#`S9cTS)&D8M;RV}EFotuz#0QiFJg3T*ns_JihVgz<2V; zyI<&gC$bt7+<#xyGxF=P-9Af)I&WA_-j4Yi4RtWsgbG8sFjUGat)uphD~Q~12q!ja zU?2ZNiB-nB&X-WbSVrwkg&UH||9 delta 293 zcmV+=0owk{1fK(tgMXAkYr`NIhVT0of%Q7euD$ipK@Vl6bZ7a{FGi}LK~2~F`{_D5 z+QXXAn1i4%pU(p(y!IfS2pqcTJl3IVzZTZX&S3Rgr2svWz`4Dinm^B~m#3SMwWd>= zdJ@jV|AE-@_q@Gug@F*p#WIDF>xhm zgwfC`+hM&XqY1a(r7WBu{(h4@tYLTrvzEQz|8ZdhBn@sLie^Hqg#+$El``gRbxLIu rGPuO2yD~7$J07_i+ByTAwLbB5EQk&z*d7f;eZ)bfa?Ae)r41^Jj4PFT diff --git a/reference/SUMMARY.txt b/reference/SUMMARY.txt deleted file mode 100644 index cd96bc4..0000000 --- a/reference/SUMMARY.txt +++ /dev/null @@ -1,3 +0,0 @@ -* [ mkdocs_autorefs](mkdocs_autorefs/index.md) - * [ plugin](mkdocs_autorefs/plugin.md) - * [ references](mkdocs_autorefs/references.md) diff --git a/reference/SUMMARY/index.html b/reference/SUMMARY/index.html new file mode 100644 index 0000000..c323125 --- /dev/null +++ b/reference/SUMMARY/index.html @@ -0,0 +1 @@ + SUMMARY - mkdocs-autorefs
\ No newline at end of file diff --git a/reference/mkdocs_autorefs/debug/index.html b/reference/mkdocs_autorefs/debug/index.html new file mode 100644 index 0000000..ffebe4e --- /dev/null +++ b/reference/mkdocs_autorefs/debug/index.html @@ -0,0 +1,90 @@ + debug - mkdocs-autorefs

debug ¤

Debugging utilities.

Classes:

  • Environment

    Dataclass to store environment information.

  • Package

    Dataclass describing a Python package.

  • Variable

    Dataclass describing an environment variable.

Functions:

Environment dataclass ¤

Dataclass to store environment information.

Attributes:

interpreter_name instance-attribute ¤

interpreter_name: str
+

Python interpreter name.

interpreter_version instance-attribute ¤

interpreter_version: str
+

Python interpreter version.

packages instance-attribute ¤

packages: list[Package]
+

Installed packages.

platform instance-attribute ¤

platform: str
+

Operating System.

variables instance-attribute ¤

variables: list[Variable]
+

Environment variables.

Package dataclass ¤

Dataclass describing a Python package.

Attributes:

name instance-attribute ¤

name: str
+

Package name.

version instance-attribute ¤

version: str
+

Package version.

Variable dataclass ¤

Dataclass describing an environment variable.

Attributes:

name instance-attribute ¤

name: str
+

Variable name.

value instance-attribute ¤

value: str
+

Variable value.

get_debug_info ¤

get_debug_info() -> Environment
+

Get debug/environment information.

Returns:

Source code in src/mkdocs_autorefs/debug.py
74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
def get_debug_info() -> Environment:
+    """Get debug/environment information.
+
+    Returns:
+        Environment information.
+    """
+    py_name, py_version = _interpreter_name_version()
+    packages = ["mkdocs-autorefs"]
+    variables = ["PYTHONPATH", *[var for var in os.environ if var.startswith("MKDOCS_AUTOREFS")]]
+    return Environment(
+        interpreter_name=py_name,
+        interpreter_version=py_version,
+        platform=platform.platform(),
+        variables=[Variable(var, val) for var in variables if (val := os.getenv(var))],
+        packages=[Package(pkg, get_version(pkg)) for pkg in packages],
+    )
+

get_version ¤

get_version(dist: str = 'mkdocs-autorefs') -> str
+

Get version of the given distribution.

Parameters:

  • dist (str, default: 'mkdocs-autorefs' ) –

    A distribution name.

Returns:

  • str

    A version number.

Source code in src/mkdocs_autorefs/debug.py
59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
def get_version(dist: str = "mkdocs-autorefs") -> str:
+    """Get version of the given distribution.
+
+    Parameters:
+        dist: A distribution name.
+
+    Returns:
+        A version number.
+    """
+    try:
+        return metadata.version(dist)
+    except metadata.PackageNotFoundError:
+        return "0.0.0"
+

print_debug_info ¤

print_debug_info() -> None
+

Print debug/environment information.

Source code in src/mkdocs_autorefs/debug.py
 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
def print_debug_info() -> None:
+    """Print debug/environment information."""
+    info = get_debug_info()
+    print(f"- __System__: {info.platform}")
+    print(f"- __Python__: {info.interpreter_name} {info.interpreter_version}")
+    print("- __Environment variables__:")
+    for var in info.variables:
+        print(f"  - `{var.name}`: `{var.value}`")
+    print("- __Installed packages__:")
+    for pkg in info.packages:
+        print(f"  - `{pkg.name}` v{pkg.version}")
+
\ No newline at end of file diff --git a/reference/mkdocs_autorefs/index.html b/reference/mkdocs_autorefs/index.html index 817c542..6963dba 100644 --- a/reference/mkdocs_autorefs/index.html +++ b/reference/mkdocs_autorefs/index.html @@ -1 +1 @@ - Index - mkdocs-autorefs

mkdocs_autorefs ¤

mkdocs-autorefs package.

Automatically link across pages in MkDocs.

\ No newline at end of file + Index - mkdocs-autorefs

mkdocs_autorefs ¤

mkdocs-autorefs package.

Automatically link across pages in MkDocs.

Modules:

  • debug

    Debugging utilities.

  • plugin

    This module contains the "mkdocs-autorefs" plugin.

  • references

    Cross-references module.

\ No newline at end of file diff --git a/reference/mkdocs_autorefs/plugin/index.html b/reference/mkdocs_autorefs/plugin/index.html index cf36358..11baeb7 100644 --- a/reference/mkdocs_autorefs/plugin/index.html +++ b/reference/mkdocs_autorefs/plugin/index.html @@ -1,23 +1,21 @@ - plugin - mkdocs-autorefs

plugin ¤

This module contains the "mkdocs-autorefs" plugin.

After each page is processed by the Markdown converter, this plugin stores absolute URLs of every HTML anchors it finds to later be able to fix unresolved references. It stores them during the on_page_content event hook.

Just before writing the final HTML to the disc, during the on_post_page event hook, this plugin searches for references of the form [identifier][] or [title][identifier] that were not resolved, and fixes them using the previously stored identifier-URL mapping.

AutorefsPlugin ¤

AutorefsPlugin()
-

Bases: BasePlugin

An mkdocs plugin.

This plugin defines the following event hooks:

  • on_config
  • on_page_content
  • on_post_page

Check the Developing Plugins page of mkdocs for more information about its plugin system.

Source code in src/mkdocs_autorefs/plugin.py
55
-56
-57
+ plugin - mkdocs-autorefs      

plugin ¤

This module contains the "mkdocs-autorefs" plugin.

After each page is processed by the Markdown converter, this plugin stores absolute URLs of every HTML anchors it finds to later be able to fix unresolved references. It stores them during the on_page_content event hook.

Just before writing the final HTML to the disc, during the on_post_page event hook, this plugin searches for references of the form [identifier][] or [title][identifier] that were not resolved, and fixes them using the previously stored identifier-URL mapping.

Classes:

AutorefsPlugin ¤

AutorefsPlugin()
+

Bases: BasePlugin

An mkdocs plugin.

This plugin defines the following event hooks:

  • on_config
  • on_page_content
  • on_post_page

Check the Developing Plugins page of mkdocs for more information about its plugin system.

Methods:

  • get_item_url

    Return a site-relative URL with anchor to the identifier, if it's present anywhere.

  • map_urls

    Recurse on every anchor to map its ID to its absolute URL.

  • on_config

    Instantiate our Markdown extension.

  • on_page_content

    Map anchors to URLs.

  • on_page_markdown

    Remember which page is the current one.

  • on_post_page

    Fix cross-references.

  • register_anchor

    Register that an anchor corresponding to an identifier was encountered when rendering the page.

  • register_url

    Register that the identifier should be turned into a link to this URL.

Source code in src/mkdocs_autorefs/plugin.py
57
 58
 59
-60
def __init__(self) -> None:
+60
+61
+62
def __init__(self) -> None:
     """Initialize the object."""
     super().__init__()
     self._url_map: dict[str, str] = {}
     self._abs_url_map: dict[str, str] = {}
-    self.get_fallback_anchor: Callable[[str], str | None] | None = None
-

get_item_url ¤

get_item_url(
-    identifier: str,
-    from_url: str | None = None,
-    fallback: Callable[[str], Sequence[str]] | None = None,
-) -> str
-

Return a site-relative URL with anchor to the identifier, if it's present anywhere.

Parameters:

  • identifier (str) –

    The anchor (without '#').

  • from_url (str | None) –

    The URL of the base page, from which we link towards the targeted pages.

  • fallback (Callable[[str], Sequence[str]] | None) –

    An optional function to suggest alternative anchors to try on failure.

Returns:

  • str

    A site-relative URL.

Source code in src/mkdocs_autorefs/plugin.py
 99
-100
-101
+    self.get_fallback_anchor: Callable[[str], tuple[str, ...]] | None = None
+

get_item_url ¤

get_item_url(
+    identifier: str,
+    from_url: str | None = None,
+    fallback: Callable[[str], Sequence[str]] | None = None,
+) -> str
+

Return a site-relative URL with anchor to the identifier, if it's present anywhere.

Parameters:

  • identifier (str) –

    The anchor (without '#').

  • from_url (str | None, default: None ) –

    The URL of the base page, from which we link towards the targeted pages.

  • fallback (Callable[[str], Sequence[str]] | None, default: None ) –

    An optional function to suggest alternative anchors to try on failure.

Returns:

  • str

    A site-relative URL.

Source code in src/mkdocs_autorefs/plugin.py
101
 102
 103
 104
@@ -36,7 +34,9 @@
 117
 118
 119
-120
def get_item_url(
+120
+121
+122
def get_item_url(
     self,
     identifier: str,
     from_url: str | None = None,
@@ -58,11 +58,8 @@
         if not parsed.scheme and not parsed.netloc:
             return relative_url(from_url, url)
     return url
-

map_urls ¤

map_urls(base_url: str, anchor: AnchorLink) -> None
-

Recurse on every anchor to map its ID to its absolute URL.

This method populates self.url_map by side-effect.

Parameters:

  • base_url (str) –

    The base URL to use as a prefix for each anchor's relative URL.

  • anchor (AnchorLink) –

    The anchor to process and to recurse on.

Source code in src/mkdocs_autorefs/plugin.py
175
-176
-177
-178
+

map_urls ¤

map_urls(base_url: str, anchor: AnchorLink) -> None
+

Recurse on every anchor to map its ID to its absolute URL.

This method populates self.url_map by side-effect.

Parameters:

  • base_url (str) –

    The base URL to use as a prefix for each anchor's relative URL.

  • anchor (AnchorLink) –

    The anchor to process and to recurse on.

Source code in src/mkdocs_autorefs/plugin.py
178
 179
 180
 181
@@ -70,7 +67,10 @@
 183
 184
 185
-186
def map_urls(self, base_url: str, anchor: AnchorLink) -> None:
+186
+187
+188
+189
def map_urls(self, base_url: str, anchor: AnchorLink) -> None:
     """Recurse on every anchor to map its ID to its absolute URL.
 
     This method populates `self.url_map` by side-effect.
@@ -82,10 +82,8 @@
     self.register_anchor(base_url, anchor.id)
     for child in anchor.children:
         self.map_urls(base_url, child)
-

on_config ¤

on_config(config: MkDocsConfig) -> MkDocsConfig | None
-

Instantiate our Markdown extension.

Hook for the on_config event. In this hook, we instantiate our AutorefsExtension and add it to the list of Markdown extensions used by mkdocs.

Parameters:

  • config (MkDocsConfig) –

    The MkDocs config object.

Returns:

  • MkDocsConfig | None

    The modified config.

Source code in src/mkdocs_autorefs/plugin.py
122
-123
-124
+

on_config ¤

on_config(config: MkDocsConfig) -> MkDocsConfig | None
+

Instantiate our Markdown extension.

Hook for the on_config event. In this hook, we instantiate our AutorefsExtension and add it to the list of Markdown extensions used by mkdocs.

Parameters:

  • config (MkDocsConfig) –

    The MkDocs config object.

Returns:

  • MkDocsConfig | None

    The modified config.

Source code in src/mkdocs_autorefs/plugin.py
124
 125
 126
 127
@@ -98,7 +96,9 @@
 134
 135
 136
-137
def on_config(self, config: MkDocsConfig) -> MkDocsConfig | None:
+137
+138
+139
def on_config(self, config: MkDocsConfig) -> MkDocsConfig | None:
     """Instantiate our Markdown extension.
 
     Hook for the [`on_config` event](https://www.mkdocs.org/user-guide/plugins/#on_config).
@@ -112,15 +112,12 @@
         The modified config.
     """
     log.debug("Adding AutorefsExtension to the list")
-    config["markdown_extensions"].append(AutorefsExtension())
+    config["markdown_extensions"].append(AutorefsExtension(self))
     return config
-

on_page_content ¤

on_page_content(
-    html: str, page: Page, **kwargs: Any
-) -> str
-

Map anchors to URLs.

Hook for the on_page_content event. In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs. This mapping will be used later to fix unresolved reference of the form [title][identifier] or [identifier][].

Parameters:

  • html (str) –

    HTML converted from Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    The same HTML. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
153
-154
-155
-156
+

on_page_content ¤

on_page_content(
+    html: str, page: Page, **kwargs: Any
+) -> str
+

Map anchors to URLs.

Hook for the on_page_content event. In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs. This mapping will be used later to fix unresolved reference of the form [title][identifier] or [identifier][].

Parameters:

  • html (str) –

    HTML converted from Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    The same HTML. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
156
 157
 158
 159
@@ -137,7 +134,10 @@
 170
 171
 172
-173
def on_page_content(self, html: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
+173
+174
+175
+176
def on_page_content(self, html: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
     """Map anchors to URLs.
 
     Hook for the [`on_page_content` event](https://www.mkdocs.org/user-guide/plugins/#on_page_content).
@@ -158,12 +158,10 @@
         for item in page.toc.items:
             self.map_urls(page.url, item)
     return html
-

on_page_markdown ¤

on_page_markdown(
-    markdown: str, page: Page, **kwargs: Any
-) -> str
-

Remember which page is the current one.

Parameters:

  • markdown (str) –

    Input Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    The same Markdown. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
139
-140
-141
+

on_page_markdown ¤

on_page_markdown(
+    markdown: str, page: Page, **kwargs: Any
+) -> str
+

Remember which page is the current one.

Parameters:

  • markdown (str) –

    Input Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    The same Markdown. We only use this hook to keep a reference to the current page URL, used during Markdown conversion by the anchor scanner tree processor.

Source code in src/mkdocs_autorefs/plugin.py
141
 142
 143
 144
@@ -173,7 +171,10 @@
 148
 149
 150
-151
def on_page_markdown(self, markdown: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
+151
+152
+153
+154
def on_page_markdown(self, markdown: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
     """Remember which page is the current one.
 
     Arguments:
@@ -182,15 +183,13 @@
         kwargs: Additional arguments passed by MkDocs.
 
     Returns:
-        The same Markdown. We only use this hook to map anchors to URLs.
+        The same Markdown. We only use this hook to keep a reference to the current page URL,
+            used during Markdown conversion by the anchor scanner tree processor.
     """
     self.current_page = page.url
     return markdown
-

on_post_page ¤

on_post_page(output: str, page: Page, **kwargs: Any) -> str
-

Fix cross-references.

Hook for the on_post_page event. In this hook, we try to fix unresolved references of the form [title][identifier] or [identifier][]. Doing that allows the user of autorefs to cross-reference objects in their documentation strings. It uses the native Markdown syntax so it's easy to remember and use.

We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers that do not look legitimate (sometimes documentation can contain strings matching our AUTO_REF_RE regular expression that did not intend to reference anything). We currently ignore references when their identifier contains a space or a slash.

Parameters:

  • output (str) –

    HTML converted from Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    Modified HTML.

Source code in src/mkdocs_autorefs/plugin.py
188
-189
-190
-191
+

on_post_page ¤

on_post_page(output: str, page: Page, **kwargs: Any) -> str
+

Fix cross-references.

Hook for the on_post_page event. In this hook, we try to fix unresolved references of the form [title][identifier] or [identifier][]. Doing that allows the user of autorefs to cross-reference objects in their documentation strings. It uses the native Markdown syntax so it's easy to remember and use.

We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers that do not look legitimate (sometimes documentation can contain strings matching our AUTO_REF_RE regular expression that did not intend to reference anything). We currently ignore references when their identifier contains a space or a slash.

Parameters:

  • output (str) –

    HTML converted from Markdown.

  • page (Page) –

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) –

    Additional arguments passed by MkDocs.

Returns:

  • str

    Modified HTML.

Source code in src/mkdocs_autorefs/plugin.py
191
 192
 193
 194
@@ -217,7 +216,10 @@
 215
 216
 217
-218
def on_post_page(self, output: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
+218
+219
+220
+221
def on_post_page(self, output: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002
     """Fix cross-references.
 
     Hook for the [`on_post_page` event](https://www.mkdocs.org/user-guide/plugins/#on_post_page).
@@ -248,31 +250,33 @@
             log.warning(f"{page.file.src_path}: Could not find cross-reference target '[{ref}]'")
 
     return fixed_output
-

register_anchor ¤

register_anchor(page: str, identifier: str) -> None
-

Register that an anchor corresponding to an identifier was encountered when rendering the page.

Parameters:

  • page (str) –

    The relative URL of the current page. Examples: 'foo/bar/', 'foo/index.html'

  • identifier (str) –

    The HTML anchor (without '#') as a string.

Source code in src/mkdocs_autorefs/plugin.py
62
-63
-64
+

register_anchor ¤

register_anchor(
+    page: str, identifier: str, anchor: str | None = None
+) -> None
+

Register that an anchor corresponding to an identifier was encountered when rendering the page.

Parameters:

  • page (str) –

    The relative URL of the current page. Examples: 'foo/bar/', 'foo/index.html'

  • identifier (str) –

    The HTML anchor (without '#') as a string.

Source code in src/mkdocs_autorefs/plugin.py
64
 65
 66
 67
 68
-69
def register_anchor(self, page: str, identifier: str) -> None:
+69
+70
+71
def register_anchor(self, page: str, identifier: str, anchor: str | None = None) -> None:
     """Register that an anchor corresponding to an identifier was encountered when rendering the page.
 
     Arguments:
         page: The relative URL of the current page. Examples: `'foo/bar/'`, `'foo/index.html'`
         identifier: The HTML anchor (without '#') as a string.
     """
-    self._url_map[identifier] = f"{page}#{identifier}"
-

register_url ¤

register_url(identifier: str, url: str) -> None
-

Register that the identifier should be turned into a link to this URL.

Parameters:

  • identifier (str) –

    The new identifier.

  • url (str) –

    The absolute URL (including anchor, if needed) where this item can be found.

Source code in src/mkdocs_autorefs/plugin.py
71
-72
-73
+    self._url_map[identifier] = f"{page}#{anchor or identifier}"
+

register_url ¤

register_url(identifier: str, url: str) -> None
+

Register that the identifier should be turned into a link to this URL.

Parameters:

  • identifier (str) –

    The new identifier.

  • url (str) –

    The absolute URL (including anchor, if needed) where this item can be found.

Source code in src/mkdocs_autorefs/plugin.py
73
 74
 75
 76
 77
-78
def register_url(self, identifier: str, url: str) -> None:
+78
+79
+80
def register_url(self, identifier: str, url: str) -> None:
     """Register that the identifier should be turned into a link to this URL.
 
     Arguments:
@@ -280,4 +284,4 @@
         url: The absolute URL (including anchor, if needed) where this item can be found.
     """
     self._abs_url_map[identifier] = url
-
\ No newline at end of file +
\ No newline at end of file diff --git a/reference/mkdocs_autorefs/references/index.html b/reference/mkdocs_autorefs/references/index.html index 5ef98f7..339da90 100644 --- a/reference/mkdocs_autorefs/references/index.html +++ b/reference/mkdocs_autorefs/references/index.html @@ -1,39 +1,69 @@ - references - mkdocs-autorefs

references ¤

Cross-references module.

AUTO_REF_RE module-attribute ¤

AUTO_REF_RE = re.compile(
-    '<span data-(?P<kind>autorefs-identifier|autorefs-optional|autorefs-optional-hover)=("?)(?P<identifier>[^"<>]*)\\2>(?P<title>.*?)</span>'
+ references - mkdocs-autorefs      

references ¤

Cross-references module.

Classes:

Functions:

  • fix_ref

    Return a repl function for re.sub.

  • fix_refs

    Fix all references in the given HTML text.

  • relative_url

    Compute the relative path from URL A to URL B.

Attributes:

  • AUTO_REF_RE

    A regular expression to match mkdocs-autorefs' special reference markers

AUTO_REF_RE module-attribute ¤

AUTO_REF_RE = compile(
+    f"<span data-(?P<kind>autorefs-(?:identifier|optional|optional-hover))=(?P<identifier>{_ATTR_VALUE})(?: class=(?P<class>{_ATTR_VALUE}))?(?P<attrs> [^<>]+)?>(?P<title>.*?)</span>",
+    flags=DOTALL,
 )
-

A regular expression to match mkdocs-autorefs' special reference markers in the on_post_page hook.

AutoRefInlineProcessor ¤

AutoRefInlineProcessor(*args: Any, **kwargs: Any)
-

Bases: ReferenceInlineProcessor

A Markdown extension.

Source code in src/mkdocs_autorefs/references.py
32
-33
def __init__(self, *args: Any, **kwargs: Any) -> None:  # noqa: D107
+

A regular expression to match mkdocs-autorefs' special reference markers in the on_post_page hook.

AnchorScannerTreeProcessor ¤

AnchorScannerTreeProcessor(
+    plugin: AutorefsPlugin, md: Markdown | None = None
+)
+

Bases: Treeprocessor

Tree processor to scan and register HTML anchors.

Parameters:

  • plugin (AutorefsPlugin) –

    A reference to the autorefs plugin, to use its register_anchor method.

Source code in src/mkdocs_autorefs/references.py
229
+230
+231
+232
+233
+234
+235
+236
def __init__(self, plugin: AutorefsPlugin, md: Markdown | None = None) -> None:
+    """Initialize the tree processor.
+
+    Parameters:
+        plugin: A reference to the autorefs plugin, to use its `register_anchor` method.
+    """
+    super().__init__(md)
+    self.plugin = plugin
+

AutoRefInlineProcessor ¤

AutoRefInlineProcessor(*args: Any, **kwargs: Any)
+

Bases: ReferenceInlineProcessor

A Markdown extension.

Methods:

  • evalId

    Evaluate the id portion of [ref][id].

  • handleMatch

    Handle an element that matched.

Source code in src/mkdocs_autorefs/references.py
46
+47
def __init__(self, *args: Any, **kwargs: Any) -> None:  # noqa: D107
     super().__init__(REFERENCE_RE, *args, **kwargs)
-

evalId ¤

evalId(data: str, index: int, text: str) -> EvalIDType
-

Evaluate the id portion of [ref][id].

If [ref][] use [ref].

Parameters:

  • data (str) –

    The data to evaluate.

  • index (int) –

    The starting position.

  • text (str) –

    The text to use when no identifier.

Returns:

  • EvalIDType

    A tuple containing the identifier, its end position, and whether it matched.

Source code in src/mkdocs_autorefs/references.py
65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
def evalId(self, data: str, index: int, text: str) -> EvalIDType:  # noqa: N802 (parent's casing)
+

evalId ¤

evalId(
+    data: str, index: int, text: str
+) -> tuple[str | None, int, bool]
+

Evaluate the id portion of [ref][id].

If [ref][] use [ref].

Parameters:

  • data (str) –

    The data to evaluate.

  • index (int) –

    The starting position.

  • text (str) –

    The text to use when no identifier.

Returns:

  • tuple[str | None, int, bool]

    A tuple containing the identifier, its end position, and whether it matched.

Source code in src/mkdocs_autorefs/references.py
 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
def evalId(self, data: str, index: int, text: str) -> tuple[str | None, int, bool]:  # noqa: N802 (parent's casing)
     """Evaluate the id portion of `[ref][id]`.
 
     If `[ref][]` use `[ref]`.
@@ -56,29 +86,24 @@
         # Allow the entire content to be one placeholder, with the intent of catching things like [`Foo`][].
         # It doesn't catch [*Foo*][] though, just due to the priority order.
         # https://github.com/Python-Markdown/markdown/blob/1858c1b601ead62ed49646ae0d99298f41b1a271/markdown/inlinepatterns.py#L78
-        if INLINE_PLACEHOLDER_RE.fullmatch(identifier):
-            identifier = self.unescape(identifier)
+        if match := INLINE_PLACEHOLDER_RE.fullmatch(identifier):
+            stashed_nodes: dict[str, Element | str] = self.md.treeprocessors["inline"].stashed_nodes  # type: ignore[attr-defined]
+            el = stashed_nodes.get(match[1])
+            if isinstance(el, Element) and el.tag == "code":
+                identifier = "".join(el.itertext())
+                # Special case: allow pymdownx.inlinehilite raw <code> snippets but strip them back to unhighlighted.
+                if match := HTML_PLACEHOLDER_RE.fullmatch(identifier):
+                    stash_index = int(match.group(1))
+                    html = self.md.htmlStash.rawHtmlBlocks[stash_index]
+                    identifier = markupsafe.Markup(html).striptags()
+                    self.md.htmlStash.rawHtmlBlocks[stash_index] = escape(identifier)
 
     end = m.end(0)
     return identifier, end, True
-

handleMatch ¤

handleMatch(
-    m: Match[str], data: Any
-) -> Element | EvalIDType
-

Handle an element that matched.

Parameters:

  • m (Match[str]) –

    The match object.

  • data (Any) –

    The matched data.

Returns:

  • Element | EvalIDType

    A new element or a tuple.

Source code in src/mkdocs_autorefs/references.py
38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
+

handleMatch ¤

handleMatch(
+    m: Match[str], data: str
+) -> tuple[Element | None, int | None, int | None]
+

Handle an element that matched.

Parameters:

  • m (Match[str]) –

    The match object.

  • data (str) –

    The matched data.

Returns:

Source code in src/mkdocs_autorefs/references.py
52
 53
 54
 55
@@ -89,7 +114,21 @@
 60
 61
 62
-63
def handleMatch(self, m: Match[str], data: Any) -> Element | EvalIDType:  # type: ignore[override]  # noqa: N802
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
def handleMatch(self, m: Match[str], data: str) -> tuple[Element | None, int | None, int | None]:  # type: ignore[override]  # noqa: N802
     """Handle an element that matched.
 
     Arguments:
@@ -104,7 +143,7 @@
         return None, None, None
 
     identifier, end, handled = self.evalId(data, index, text)
-    if not handled:
+    if not handled or identifier is None:
         return None, None, None
 
     if re.search(r"[/ \x00-\x1f]", identifier):
@@ -114,52 +153,63 @@
         #   but references with Markdown formatting are not possible anyway.
         return None, m.start(0), end
 
-    return self.makeTag(identifier, text), m.start(0), end
-

makeTag ¤

makeTag(identifier: str, text: str) -> Element
-

Create a tag that can be matched by AUTO_REF_RE.

Parameters:

  • identifier (str) –

    The identifier to use in the HTML property.

  • text (str) –

    The text to use in the HTML tag.

Returns:

Source code in src/mkdocs_autorefs/references.py
 94
- 95
- 96
- 97
- 98
- 99
-100
-101
-102
-103
-104
-105
-106
-107
def makeTag(self, identifier: str, text: str) -> Element:  # type: ignore[override]  # noqa: N802
-    """Create a tag that can be matched by `AUTO_REF_RE`.
-
-    Arguments:
-        identifier: The identifier to use in the HTML property.
-        text: The text to use in the HTML tag.
+    return self._make_tag(identifier, text), m.start(0), end
+

AutorefsExtension ¤

AutorefsExtension(
+    plugin: AutorefsPlugin | None = None, **kwargs: Any
+)
+

Bases: Extension

Extension that inserts auto-references in Markdown.

Parameters:

  • plugin (AutorefsPlugin | None, default: None ) –

    An optional reference to the autorefs plugin (to pass it to the anchor scanner tree processor).

  • **kwargs (Any, default: {} ) –

    Keyword arguments passed to the base constructor.

Methods:

Source code in src/mkdocs_autorefs/references.py
294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
def __init__(
+    self,
+    plugin: AutorefsPlugin | None = None,
+    **kwargs: Any,
+) -> None:
+    """Initialize the Markdown extension.
 
-    Returns:
-        A new element.
+    Parameters:
+        plugin: An optional reference to the autorefs plugin (to pass it to the anchor scanner tree processor).
+        **kwargs: Keyword arguments passed to the [base constructor][markdown.extensions.Extension].
     """
-    el = Element("span")
-    el.set("data-autorefs-identifier", identifier)
-    el.text = text
-    return el
-

AutorefsExtension ¤

Bases: Extension

Extension that inserts auto-references in Markdown.

extendMarkdown ¤

extendMarkdown(md: Markdown) -> None
-

Register the extension.

Add an instance of our AutoRefInlineProcessor to the Markdown parser.

Parameters:

  • md (Markdown) –

    A markdown.Markdown instance.

Source code in src/mkdocs_autorefs/references.py
202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
def extendMarkdown(self, md: Markdown) -> None:  # noqa: N802 (casing: parent method's name)
+    super().__init__(**kwargs)
+    self.plugin = plugin
+

extendMarkdown ¤

extendMarkdown(md: Markdown) -> None
+

Register the extension.

Add an instance of our AutoRefInlineProcessor to the Markdown parser. Also optionally add an instance of our AnchorScannerTreeProcessor to the Markdown parser if a reference to the autorefs plugin was passed to this extension.

Parameters:

  • md (Markdown) –

    A markdown.Markdown instance.

Source code in src/mkdocs_autorefs/references.py
308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
def extendMarkdown(self, md: Markdown) -> None:  # noqa: N802 (casing: parent method's name)
     """Register the extension.
 
     Add an instance of our [`AutoRefInlineProcessor`][mkdocs_autorefs.references.AutoRefInlineProcessor] to the Markdown parser.
+    Also optionally add an instance of our [`AnchorScannerTreeProcessor`][mkdocs_autorefs.references.AnchorScannerTreeProcessor]
+    to the Markdown parser if a reference to the autorefs plugin was passed to this extension.
 
     Arguments:
         md: A `markdown.Markdown` instance.
@@ -169,33 +219,17 @@
         "mkdocs-autorefs",
         priority=168,  # Right after markdown.inlinepatterns.ReferenceInlineProcessor
     )
-

fix_ref ¤

fix_ref(
-    url_mapper: Callable[[str], str], unmapped: list[str]
-) -> Callable
-

Return a repl function for re.sub.

In our context, we match Markdown references and replace them with HTML links.

When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer unmapped list. It generally means the user is trying to cross-reference an object that was not collected and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.

Parameters:

Returns:

Source code in src/mkdocs_autorefs/references.py
136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
+    if self.plugin is not None and self.plugin.scan_toc and "attr_list" in md.treeprocessors:
+        log.debug("Enabling Markdown anchors feature")
+        md.treeprocessors.register(
+            AnchorScannerTreeProcessor(self.plugin, md),
+            "mkdocs-autorefs-anchors-scanner",
+            priority=0,
+        )
+

fix_ref ¤

fix_ref(
+    url_mapper: Callable[[str], str], unmapped: list[str]
+) -> Callable
+

Return a repl function for re.sub.

In our context, we match Markdown references and replace them with HTML links.

When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer unmapped list. It generally means the user is trying to cross-reference an object that was not collected and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.

Parameters:

Returns:

Source code in src/mkdocs_autorefs/references.py
159
 160
 161
 162
@@ -216,7 +250,32 @@
 177
 178
 179
-180
def fix_ref(url_mapper: Callable[[str], str], unmapped: list[str]) -> Callable:
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
def fix_ref(url_mapper: Callable[[str], str], unmapped: list[str]) -> Callable:
     """Return a `repl` function for [`re.sub`](https://docs.python.org/3/library/re.html#re.sub).
 
     In our context, we match Markdown references and replace them with HTML links.
@@ -236,9 +295,11 @@
     """
 
     def inner(match: Match) -> str:
-        identifier = match["identifier"]
+        identifier = match["identifier"].strip('"')
         title = match["title"]
         kind = match["kind"]
+        attrs = match["attrs"] or ""
+        classes = (match["class"] or "").strip('"').split()
 
         try:
             url = url_mapper(unescape(identifier))
@@ -254,30 +315,30 @@
 
         parsed = urlsplit(url)
         external = parsed.scheme or parsed.netloc
-        classes = ["autorefs", "autorefs-external" if external else "autorefs-internal"]
+        classes = ["autorefs", "autorefs-external" if external else "autorefs-internal", *classes]
         class_attr = " ".join(classes)
         if kind == "autorefs-optional-hover":
-            return f'<a class="{class_attr}" title="{identifier}" href="{escape(url)}">{title}</a>'
-        return f'<a class="{class_attr}" href="{escape(url)}">{title}</a>'
+            return f'<a class="{class_attr}" title="{identifier}" href="{escape(url)}"{attrs}>{title}</a>'
+        return f'<a class="{class_attr}" href="{escape(url)}"{attrs}>{title}</a>'
 
     return inner
-

fix_refs ¤

fix_refs(
-    html: str, url_mapper: Callable[[str], str]
-) -> tuple[str, list[str]]
-

Fix all references in the given HTML text.

Parameters:

Returns:

Source code in src/mkdocs_autorefs/references.py
183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
def fix_refs(html: str, url_mapper: Callable[[str], str]) -> tuple[str, list[str]]:
+

fix_refs ¤

fix_refs(
+    html: str, url_mapper: Callable[[str], str]
+) -> tuple[str, list[str]]
+

Fix all references in the given HTML text.

Parameters:

Returns:

Source code in src/mkdocs_autorefs/references.py
208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
def fix_refs(html: str, url_mapper: Callable[[str], str]) -> tuple[str, list[str]]:
     """Fix all references in the given HTML text.
 
     Arguments:
@@ -291,31 +352,31 @@
     unmapped: list[str] = []
     html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)
     return html, unmapped
-

relative_url ¤

relative_url(url_a: str, url_b: str) -> str
-

Compute the relative path from URL A to URL B.

Parameters:

  • url_a (str) –

    URL A.

  • url_b (str) –

    URL B.

Returns:

  • str

    The relative URL to go from A to B.

Source code in src/mkdocs_autorefs/references.py
110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
def relative_url(url_a: str, url_b: str) -> str:
+

relative_url ¤

relative_url(url_a: str, url_b: str) -> str
+

Compute the relative path from URL A to URL B.

Parameters:

  • url_a (str) –

    URL A.

  • url_b (str) –

    URL B.

Returns:

  • str

    The relative URL to go from A to B.

Source code in src/mkdocs_autorefs/references.py
133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
def relative_url(url_a: str, url_b: str) -> str:
     """Compute the relative path from URL A to URL B.
 
     Arguments:
@@ -339,4 +400,4 @@
     parts_relative = [".."] * levels + parts_b
     relative = "/".join(parts_relative)
     return f"{relative}#{anchor}"
-
\ No newline at end of file +
\ No newline at end of file diff --git a/search/search_index.json b/search/search_index.json index da8697f..b75b846 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"mkdocs-autorefs","text":"

Automatically link across pages in MkDocs.

"},{"location":"#installation","title":"Installation","text":"

With pip:

python3 -m pip install mkdocs-autorefs\n

"},{"location":"#usage","title":"Usage","text":"
# mkdocs.yml\nplugins:\n- search\n- autorefs\n

In one of your Markdown files (e.g. doc1.md) create some headings:

## Hello, world!\n\n## Another heading\n\nLink to [Hello, World!](#hello-world) on the same page.\n

This is a normal link to an anchor. MkDocs generates anchors for each heading, and they can always be used to link to something, either within the same page (as shown here) or by specifying the path of the other page.

But with this plugin, you can link to a heading from any other page on the site without needing to know the path of either of the pages, just the heading title itself. Let's create another Markdown page to try this, subdir/doc2.md:

We can [link to that heading][hello-world] from another page too.\n\nThis works the same as [a normal link to that heading](../doc1.md#hello-world).\n

Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that MkDocs supports only relative links between pages.

Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages.

"},{"location":"changelog/","title":"Changelog","text":"

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

"},{"location":"changelog/#050-2023-08-02","title":"0.5.0 - 2023-08-02","text":"

Compare with 0.4.1

"},{"location":"changelog/#breaking-changes","title":"Breaking Changes","text":"
  • Drop support for Python 3.7
"},{"location":"changelog/#build","title":"Build","text":"
  • Migrate to pdm-backend (48b92fb by Micha\u0142 G\u00f3rny).
"},{"location":"changelog/#bug-fixes","title":"Bug Fixes","text":"
  • Stop using deprecated warning_filter (7721103 by Kyle King). PR #30
"},{"location":"changelog/#code-refactoring","title":"Code Refactoring","text":"
  • Use new MkDocs plugin logger if available (ca8d758 by Timoth\u00e9e Mazzucotelli).
"},{"location":"changelog/#041-2022-03-07","title":"0.4.1 - 2022-03-07","text":"

Compare with 0.4.0

"},{"location":"changelog/#bug-fixes_1","title":"Bug Fixes","text":"
  • Fix packaging (missing __init__ module) (de0670b by Timoth\u00e9e Mazzucotelli). Issue #17, issue mkdocstrings/mkdocstrings#398, PR #18
"},{"location":"changelog/#040-2022-03-07","title":"0.4.0 - 2022-03-07","text":"

Compare with 0.3.1

"},{"location":"changelog/#features","title":"Features","text":"
  • Add HTML classes to references: autorefs always, and autorefs-internal or autorefs-external depending on the link (39db59d by Timoth\u00e9e Mazzucotelli). PR #16
"},{"location":"changelog/#bug-fixes_2","title":"Bug Fixes","text":"
  • Don't compute relative URLs of already relative ones (f6b861c by Timoth\u00e9e Mazzucotelli). PR #15
"},{"location":"changelog/#031-2021-12-27","title":"0.3.1 - 2021-12-27","text":"

Compare with 0.3.0

"},{"location":"changelog/#code-refactoring_1","title":"Code Refactoring","text":"
  • Support fallback method returning multiple identifiers (0d2b411 by Timoth\u00e9e Mazzucotelli). Issue #11, PR #12 and mkdocstrings#350
"},{"location":"changelog/#030-2021-07-24","title":"0.3.0 - 2021-07-24","text":"

Compare with 0.2.1

"},{"location":"changelog/#features_1","title":"Features","text":"
  • Add optional-hover ref type (0288bdd by Brian Koropoff). PR #10
"},{"location":"changelog/#021-2021-05-07","title":"0.2.1 - 2021-05-07","text":"

Compare with 0.2.0

"},{"location":"changelog/#bug-fixes_3","title":"Bug Fixes","text":"
  • Prevent error during parallel installations (c90e399 by Timoth\u00e9e Mazzucotelli). PR #9
"},{"location":"changelog/#020-2021-05-03","title":"0.2.0 - 2021-05-03","text":"

Compare with 0.1.1

"},{"location":"changelog/#features_2","title":"Features","text":"
  • Allow registering absolute URLs for autorefs (621686b by Oleh Prypin). PR #8
  • Allow external tools to insert references that are OK to skip (7619c28 by Oleh Prypin). PR #7
  • Allow [``identifier``][], understood as [``identifier``][identifier] (2d3182d by Oleh Prypin). PR #5
"},{"location":"changelog/#011-2021-02-28","title":"0.1.1 - 2021-02-28","text":"

Compare with 0.1.0

"},{"location":"changelog/#packaging","title":"Packaging","text":"
  • Remove unused dependencies (9c6a8e6 by Oleh Prypin).
"},{"location":"changelog/#010-2021-02-17","title":"0.1.0 - 2021-02-17","text":"

Compare with first commit

"},{"location":"changelog/#features_3","title":"Features","text":"
  • Split out \"mkdocs-autorefs\" plugin from \"mkdocstrings\" (fe6faa5 by Oleh Prypin).
"},{"location":"code_of_conduct/","title":"Contributor Covenant Code of Conduct","text":""},{"location":"code_of_conduct/#our-pledge","title":"Our Pledge","text":"

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

"},{"location":"code_of_conduct/#our-standards","title":"Our Standards","text":"

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting
"},{"location":"code_of_conduct/#enforcement-responsibilities","title":"Enforcement Responsibilities","text":"

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

"},{"location":"code_of_conduct/#scope","title":"Scope","text":"

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

"},{"location":"code_of_conduct/#enforcement","title":"Enforcement","text":"

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at pawamoy@pm.me. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

"},{"location":"code_of_conduct/#enforcement-guidelines","title":"Enforcement Guidelines","text":"

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

"},{"location":"code_of_conduct/#1-correction","title":"1. Correction","text":"

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

"},{"location":"code_of_conduct/#2-warning","title":"2. Warning","text":"

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

"},{"location":"code_of_conduct/#3-temporary-ban","title":"3. Temporary Ban","text":"

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

"},{"location":"code_of_conduct/#4-permanent-ban","title":"4. Permanent Ban","text":"

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

"},{"location":"code_of_conduct/#attribution","title":"Attribution","text":"

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

"},{"location":"contributing/","title":"Contributing","text":"

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

"},{"location":"contributing/#environment-setup","title":"Environment setup","text":"

Nothing easier!

Fork and clone the repository, then:

cd mkdocs-autorefs\nmake setup\n

Note

If it fails for some reason, you'll need to install PDM manually.

You can install it with:

python3 -m pip install --user pipx\npipx install pdm\n

Now you can try running make setup again, or simply pdm install.

You now have the dependencies installed.

Run make help to see all the available actions!

"},{"location":"contributing/#tasks","title":"Tasks","text":"

This project uses duty to run tasks. A Makefile is also provided. The Makefile will try to run certain tasks on multiple Python versions. If for some reason you don't want to run the task on multiple Python versions, you run the task directly with pdm run duty TASK.

The Makefile detects if a virtual environment is activated, so make will work the same with the virtualenv activated or not.

If you work in VSCode, see examples of tasks and run configurations.

"},{"location":"contributing/#development","title":"Development","text":"

As usual:

  1. create a new branch: git switch -c feature-or-bugfix-name
  2. edit the code and/or the documentation

Before committing:

  1. run make format to auto-format the code
  2. run make check to check everything (fix any warning)
  3. run make test to run the tests (fix any issue)
  4. if you updated the documentation or the project dependencies:
    1. run make docs
    2. go to http://localhost:8000 and check that everything looks good
  5. follow our commit message convention

If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.

Don't bother updating the changelog, we will take care of this.

"},{"location":"contributing/#commit-message-convention","title":"Commit message convention","text":"

Commit messages must follow our convention based on the Angular style or the Karma convention:

<type>[(scope)]: Subject\n\n[Body]\n

Subject and body must be valid Markdown. Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.

Scope and body are optional. Type can be:

  • build: About packaging, building wheels, etc.
  • chore: About packaging or repo/files management.
  • ci: About Continuous Integration.
  • deps: Dependencies update.
  • docs: About documentation.
  • feat: New feature.
  • fix: Bug fix.
  • perf: About performance.
  • refactor: Changes that are not features or bug fixes.
  • style: A change in code style/format.
  • tests: About tests.

If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:

Body.\n\nIssue #10: https://github.com/namespace/project/issues/10\nRelated to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15\n

These \"trailers\" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons :. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).

We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.

"},{"location":"contributing/#pull-requests-guidelines","title":"Pull requests guidelines","text":"

Link to any related issue in the Pull Request message.

During the review, we recommend using fixups:

# SHA is the SHA of the commit you want to fix\ngit commit --fixup=SHA\n

Once all the changes are approved, you can squash your commits:

git rebase -i --autosquash main\n

And force-push:

git push -f\n

If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.

"},{"location":"credits/","title":"Credits","text":""},{"location":"credits/#exec-1--credits","title":"Credits","text":"

These projects were used to build mkdocs-autorefs. Thank you!

python | pdm | copier-pdm

"},{"location":"credits/#exec-1--runtime-dependencies","title":"Runtime dependencies","text":"Project Summary Version (accepted) Version (last resolved) License click Composable command line interface toolkit >=7.0 8.1.6 BSD-3-Clause colorama Cross-platform colored terminal text. >=0.4; platform_system == \"Windows\" 0.4.6 BSD License ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License importlib-metadata Read metadata from Python packages >=4.4; python_version < \"3.10\" 6.8.0 ? jinja2 A very fast and expressive template engine. >=2.11.1 3.1.2 BSD-3-Clause markdown Python implementation of John Gruber's Markdown. >=3.3 3.4.4 BSD License markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0.1 2.1.3 BSD-3-Clause mergedeep A deep merge function for \ud83d\udc0d. >=1.3.4 1.3.4 MIT License mkdocs Project documentation with Markdown. >=1.1 1.5.2 BSD License packaging Core utilities for Python packages >=20.5 23.1 BSD License pathspec Utility library for gitignore style pattern matching of file paths. >=0.11.1 0.11.2 Mozilla Public License 2.0 (MPL 2.0) platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\". >=2.2.0 3.10.0 MIT License python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT watchdog Filesystem events monitoring >=2.0 3.0.0 Apache License 2.0 zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.16.2 ?"},{"location":"credits/#exec-1--development-dependencies","title":"Development dependencies","text":"Project Summary Version (accepted) Version (last resolved) License ansimarkup Produce colored terminal text with an xml-like markup ~=1.4 1.5.0 Revised BSD License babel Internationalization utilities >=2.10.3 2.12.1 BSD beautifulsoup4 Screen-scraping library 4.12.2 MIT License black The uncompromising code formatter. >=23.1 23.7.0 MIT blacken-docs Run Black on Python code blocks in documentation files. >=1.13 1.15.0 MIT certifi Python package for providing Mozilla's CA Bundle. >=2017.4.17 2023.7.22 MPL-2.0 charset-normalizer The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. <4,>=2 3.2.0 MIT click Composable command line interface toolkit >=8.0.0 8.1.6 BSD-3-Clause colorama Cross-platform colored terminal text. ; platform_system == \"Windows\" 0.4.6 BSD License coverage Code coverage measurement for Python [toml]>=5.2.1 7.2.7 Apache-2.0 csscompressor A python port of YUI CSS Compressor >=0.9.5 0.9.5 BSD cssselect cssselect parses CSS3 Selectors and translates them to XPath 1.0 >=1.2.0 1.2.0 BSD dparse A parser for Python dependency files >=0.6.2 0.6.3 MIT license duty A simple task runner. >=0.10 1.0.0 ISC exceptiongroup Backport of PEP 654 (exception groups) >=1.0.0rc8; python_version < \"3.11\" 1.1.2 ? execnet execnet: rapid multi-Python deployment >=1.1 2.0.2 MIT License failprint Run a command, print its output only if it fails. >=0.11 1.0.1 ISC ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License git-changelog Automatic Changelog generator using Jinja2 templates. >=1.0 2.0.0 ISC gitdb Git Object Database <5,>=4.0.1 4.0.10 BSD License gitpython GitPython is a Python library used to interact with Git repositories 3.1.32 BSD griffe Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API. >=0.30 0.32.3 ISC htmlmin2 An HTML Minifier >=0.1.13 0.1.13 BSD idna Internationalized Domain Names in Applications (IDNA) <4,>=2.5 3.4 BSD License importlib-metadata Read metadata from Python packages >=4.3; python_version < \"3.10\" 6.8.0 ? iniconfig brain-dead simple config-ini parsing 2.0.0 MIT License jinja2 A very fast and expressive template engine. <4,>=2.11 3.1.2 BSD-3-Clause jsmin JavaScript minifier. >=3.0.1 3.0.1 MIT License lxml Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. >=4.6 4.9.3 BSD-3-Clause markdown Python implementation of John Gruber's Markdown. <4.0.0,>=3.3.3 3.4.4 BSD License markdown-callouts Markdown extension: a classier syntax for admonitions >=0.2 0.3.0 MIT markdown-exec Utilities to execute code blocks in Markdown files. >=0.5 1.6.0.1.0.1 ISC markdown2 A fast and complete Python implementation of Markdown >=2.4.3 2.4.10 MIT markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0 2.1.3 BSD-3-Clause mergedeep A deep merge function for \ud83d\udc0d. >=1.3.4 1.3.4 MIT License mkdocs Project documentation with Markdown. >=1.5 1.5.2 BSD License mkdocs-coverage MkDocs plugin to integrate your coverage HTML report into your site. >=0.2 1.0.0 ISC mkdocs-gen-files MkDocs plugin to programmatically generate documentation pages during the build >=0.3 0.5.0 MIT License mkdocs-git-committers-plugin-2 An MkDocs plugin to create a list of contributors on the page >=1.1 1.1.2 MIT mkdocs-literate-nav MkDocs plugin to specify the navigation in Markdown instead of YAML >=0.4 0.6.0 MIT License mkdocs-material Documentation that simply works >=7.3 9.1.21+insiders.4.37.1 MIT License mkdocs-material-extensions Extension pack for Python Markdown and MkDocs Material. >=1.1 1.1.1 MIT License mkdocs-minify-plugin An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk >=0.6.4 0.7.1 MIT mkdocstrings Automatic documentation from sources, for MkDocs. [python]>=0.18 0.22.0 ISC mkdocstrings-python A Python handler for mkdocstrings. >=0.5.2 1.2.1.1.1.4 ISC mypy Optional static typing for Python >=0.910 1.4.1 MIT License mypy-extensions Type system extensions for programs checked with the mypy type checker. >=0.4.3 1.0.0 MIT License packaging Core utilities for Python packages >=22.0 23.1 BSD License paginate Divides large result sets into pages for easier browsing >=0.5.6 0.5.6 MIT pathspec Utility library for gitignore style pattern matching of file paths. >=0.9.0 0.11.2 Mozilla Public License 2.0 (MPL 2.0) pipdeptree Command line utility to show dependency tree of packages. >=2.3 2.12.0 MIT License platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\". >=2 3.10.0 MIT License pluggy plugin and hook calling mechanisms for python <2.0,>=0.12 1.2.0 MIT ptyprocess Run a subprocess in a pseudo terminal ~=0.6; sys_platform != \"win32\" 0.7.0 ISC License (ISCL) pygments Pygments is a syntax highlighting package written in Python. >=2.14 2.15.1 BSD-2-Clause pymdown-extensions Extension pack for Python Markdown. >=9 10.1 MIT License pyquery A jquery-like library for python >=1.2 2.0.0 BSD pytest pytest: simple powerful testing with Python >=6.2 7.4.0 MIT pytest-cov Pytest plugin for measuring coverage. >=3.0 4.1.0 MIT pytest-randomly Pytest plugin to randomly order tests and control random.seed. >=3.10 3.13.0 MIT pytest-xdist pytest xdist plugin for distributed testing, most importantly across multiple CPUs >=2.4 3.3.1 MIT python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License pytz World timezone definitions, modern and historical >=2015.7; python_version < \"3.9\" 2023.3 ? pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License readtime Calculates the time some text takes the average human to read, based on Medium's read time forumula >=2.0 3.0.0 BSD regex Alternative regular expression module, to replace re. >=2022.4.24 2023.6.3 Apache Software License requests Python HTTP for Humans. 2.31.0 Apache 2.0 ruamel-yaml ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order >=0.17.21 0.17.32 MIT license ruamel-yaml-clib C version of reader, parser and emitter for ruamel.yaml derived from libyaml >=0.2.7; platform_python_implementation == \"CPython\" and python_version < \"3.12\" 0.2.7 MIT ruff An extremely fast Python linter, written in Rust. >=0.0.246 0.0.282 MIT safety Checks installed dependencies for known vulnerabilities and licenses. >=2 2.3.4 MIT license semver Python helper for Semantic Versioning (https://semver.org) >=2.13 3.0.1 BSD setuptools Easily download, build, install, upgrade, and uninstall Python packages >=19.3 68.0.0 MIT License six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT smmap A pure Python implementation of a sliding window memory map manager <6,>=3.0.1 5.0.0 BSD soupsieve A modern CSS selector implementation for Beautiful Soup. >1.2 2.4.1 MIT License toml Python Library for Tom's Obvious, Minimal Language >=0.10 0.10.2 MIT tomli A lil' TOML parser >=1.1.0; python_version < \"3.11\" 2.0.1 ? types-markdown Typing stubs for Markdown >=3.3 3.4.2.10 Apache-2.0 license types-pyyaml Typing stubs for PyYAML >=6.0 6.0.12.11 Apache-2.0 license types-toml Typing stubs for toml >=0.10 0.10.8.7 Apache-2.0 license typing-extensions Backported and Experimental Type Hints for Python 3.7+ >=3.10.0.0; python_version < \"3.10\" 4.7.1 Python Software Foundation License urllib3 HTTP library with thread-safe connection pooling, file post, and more. <3,>=1.21.1 2.0.4 MIT License watchdog Filesystem events monitoring >=2.0 3.0.0 Apache License 2.0 zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.16.2 ?

More credits from the author

"},{"location":"license/","title":"License","text":"
ISC License\n\nCopyright (c) 2019, Oleh Prypin\nCopyright (c) 2019, Timoth\u00e9e Mazzucotelli\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n
"},{"location":"reference/mkdocs_autorefs/","title":"Index","text":""},{"location":"reference/mkdocs_autorefs/#mkdocs_autorefs","title":"mkdocs_autorefs","text":"

mkdocs-autorefs package.

Automatically link across pages in MkDocs.

"},{"location":"reference/mkdocs_autorefs/plugin/","title":" plugin","text":""},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin","title":"plugin","text":"

This module contains the \"mkdocs-autorefs\" plugin.

After each page is processed by the Markdown converter, this plugin stores absolute URLs of every HTML anchors it finds to later be able to fix unresolved references. It stores them during the on_page_content event hook.

Just before writing the final HTML to the disc, during the on_post_page event hook, this plugin searches for references of the form [identifier][] or [title][identifier] that were not resolved, and fixes them using the previously stored identifier-URL mapping.

"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin","title":"AutorefsPlugin","text":"
AutorefsPlugin()\n

Bases: BasePlugin

An mkdocs plugin.

This plugin defines the following event hooks:

  • on_config
  • on_page_content
  • on_post_page

Check the Developing Plugins page of mkdocs for more information about its plugin system.

Source code in src/mkdocs_autorefs/plugin.py
def __init__(self) -> None:\n\"\"\"Initialize the object.\"\"\"\n    super().__init__()\n    self._url_map: dict[str, str] = {}\n    self._abs_url_map: dict[str, str] = {}\n    self.get_fallback_anchor: Callable[[str], str | None] | None = None\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url","title":"get_item_url","text":"
get_item_url(\n    identifier: str,\n    from_url: str | None = None,\n    fallback: Callable[[str], Sequence[str]] | None = None,\n) -> str\n

Return a site-relative URL with anchor to the identifier, if it's present anywhere.

Parameters:

  • identifier (str) \u2013

    The anchor (without '#').

  • from_url (str | None) \u2013

    The URL of the base page, from which we link towards the targeted pages.

  • fallback (Callable[[str], Sequence[str]] | None) \u2013

    An optional function to suggest alternative anchors to try on failure.

Returns:

  • str \u2013

    A site-relative URL.

Source code in src/mkdocs_autorefs/plugin.py
def get_item_url(\n    self,\n    identifier: str,\n    from_url: str | None = None,\n    fallback: Callable[[str], Sequence[str]] | None = None,\n) -> str:\n\"\"\"Return a site-relative URL with anchor to the identifier, if it's present anywhere.\n\n    Arguments:\n        identifier: The anchor (without '#').\n        from_url: The URL of the base page, from which we link towards the targeted pages.\n        fallback: An optional function to suggest alternative anchors to try on failure.\n\n    Returns:\n        A site-relative URL.\n    \"\"\"\n    url = self._get_item_url(identifier, fallback)\n    if from_url is not None:\n        parsed = urlsplit(url)\n        if not parsed.scheme and not parsed.netloc:\n            return relative_url(from_url, url)\n    return url\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.map_urls","title":"map_urls","text":"
map_urls(base_url: str, anchor: AnchorLink) -> None\n

Recurse on every anchor to map its ID to its absolute URL.

This method populates self.url_map by side-effect.

Parameters:

  • base_url (str) \u2013

    The base URL to use as a prefix for each anchor's relative URL.

  • anchor (AnchorLink) \u2013

    The anchor to process and to recurse on.

Source code in src/mkdocs_autorefs/plugin.py
def map_urls(self, base_url: str, anchor: AnchorLink) -> None:\n\"\"\"Recurse on every anchor to map its ID to its absolute URL.\n\n    This method populates `self.url_map` by side-effect.\n\n    Arguments:\n        base_url: The base URL to use as a prefix for each anchor's relative URL.\n        anchor: The anchor to process and to recurse on.\n    \"\"\"\n    self.register_anchor(base_url, anchor.id)\n    for child in anchor.children:\n        self.map_urls(base_url, child)\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_config","title":"on_config","text":"
on_config(config: MkDocsConfig) -> MkDocsConfig | None\n

Instantiate our Markdown extension.

Hook for the on_config event. In this hook, we instantiate our AutorefsExtension and add it to the list of Markdown extensions used by mkdocs.

Parameters:

  • config (MkDocsConfig) \u2013

    The MkDocs config object.

Returns:

  • MkDocsConfig | None \u2013

    The modified config.

Source code in src/mkdocs_autorefs/plugin.py
def on_config(self, config: MkDocsConfig) -> MkDocsConfig | None:\n\"\"\"Instantiate our Markdown extension.\n\n    Hook for the [`on_config` event](https://www.mkdocs.org/user-guide/plugins/#on_config).\n    In this hook, we instantiate our [`AutorefsExtension`][mkdocs_autorefs.references.AutorefsExtension]\n    and add it to the list of Markdown extensions used by `mkdocs`.\n\n    Arguments:\n        config: The MkDocs config object.\n\n    Returns:\n        The modified config.\n    \"\"\"\n    log.debug(\"Adding AutorefsExtension to the list\")\n    config[\"markdown_extensions\"].append(AutorefsExtension())\n    return config\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_page_content","title":"on_page_content","text":"
on_page_content(\n    html: str, page: Page, **kwargs: Any\n) -> str\n

Map anchors to URLs.

Hook for the on_page_content event. In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs. This mapping will be used later to fix unresolved reference of the form [title][identifier] or [identifier][].

Parameters:

  • html (str) \u2013

    HTML converted from Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    The same HTML. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
def on_page_content(self, html: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n\"\"\"Map anchors to URLs.\n\n    Hook for the [`on_page_content` event](https://www.mkdocs.org/user-guide/plugins/#on_page_content).\n    In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs.\n    This mapping will be used later to fix unresolved reference of the form `[title][identifier]` or\n    `[identifier][]`.\n\n    Arguments:\n        html: HTML converted from Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        The same HTML. We only use this hook to map anchors to URLs.\n    \"\"\"\n    if self.scan_toc:\n        log.debug(f\"Mapping identifiers to URLs for page {page.file.src_path}\")\n        for item in page.toc.items:\n            self.map_urls(page.url, item)\n    return html\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_page_markdown","title":"on_page_markdown","text":"
on_page_markdown(\n    markdown: str, page: Page, **kwargs: Any\n) -> str\n

Remember which page is the current one.

Parameters:

  • markdown (str) \u2013

    Input Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    The same Markdown. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
def on_page_markdown(self, markdown: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n\"\"\"Remember which page is the current one.\n\n    Arguments:\n        markdown: Input Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        The same Markdown. We only use this hook to map anchors to URLs.\n    \"\"\"\n    self.current_page = page.url\n    return markdown\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_post_page","title":"on_post_page","text":"
on_post_page(output: str, page: Page, **kwargs: Any) -> str\n

Fix cross-references.

Hook for the on_post_page event. In this hook, we try to fix unresolved references of the form [title][identifier] or [identifier][]. Doing that allows the user of autorefs to cross-reference objects in their documentation strings. It uses the native Markdown syntax so it's easy to remember and use.

We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers that do not look legitimate (sometimes documentation can contain strings matching our AUTO_REF_RE regular expression that did not intend to reference anything). We currently ignore references when their identifier contains a space or a slash.

Parameters:

  • output (str) \u2013

    HTML converted from Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    Modified HTML.

Source code in src/mkdocs_autorefs/plugin.py
def on_post_page(self, output: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n\"\"\"Fix cross-references.\n\n    Hook for the [`on_post_page` event](https://www.mkdocs.org/user-guide/plugins/#on_post_page).\n    In this hook, we try to fix unresolved references of the form `[title][identifier]` or `[identifier][]`.\n    Doing that allows the user of `autorefs` to cross-reference objects in their documentation strings.\n    It uses the native Markdown syntax so it's easy to remember and use.\n\n    We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers\n    that do not look legitimate (sometimes documentation can contain strings matching\n    our [`AUTO_REF_RE`][mkdocs_autorefs.references.AUTO_REF_RE] regular expression that did not intend to reference anything).\n    We currently ignore references when their identifier contains a space or a slash.\n\n    Arguments:\n        output: HTML converted from Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        Modified HTML.\n    \"\"\"\n    log.debug(f\"Fixing references in page {page.file.src_path}\")\n\n    url_mapper = functools.partial(self.get_item_url, from_url=page.url, fallback=self.get_fallback_anchor)\n    fixed_output, unmapped = fix_refs(output, url_mapper)\n\n    if unmapped and log.isEnabledFor(logging.WARNING):\n        for ref in unmapped:\n            log.warning(f\"{page.file.src_path}: Could not find cross-reference target '[{ref}]'\")\n\n    return fixed_output\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.register_anchor","title":"register_anchor","text":"
register_anchor(page: str, identifier: str) -> None\n

Register that an anchor corresponding to an identifier was encountered when rendering the page.

Parameters:

  • page (str) \u2013

    The relative URL of the current page. Examples: 'foo/bar/', 'foo/index.html'

  • identifier (str) \u2013

    The HTML anchor (without '#') as a string.

Source code in src/mkdocs_autorefs/plugin.py
def register_anchor(self, page: str, identifier: str) -> None:\n\"\"\"Register that an anchor corresponding to an identifier was encountered when rendering the page.\n\n    Arguments:\n        page: The relative URL of the current page. Examples: `'foo/bar/'`, `'foo/index.html'`\n        identifier: The HTML anchor (without '#') as a string.\n    \"\"\"\n    self._url_map[identifier] = f\"{page}#{identifier}\"\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.register_url","title":"register_url","text":"
register_url(identifier: str, url: str) -> None\n

Register that the identifier should be turned into a link to this URL.

Parameters:

  • identifier (str) \u2013

    The new identifier.

  • url (str) \u2013

    The absolute URL (including anchor, if needed) where this item can be found.

Source code in src/mkdocs_autorefs/plugin.py
def register_url(self, identifier: str, url: str) -> None:\n\"\"\"Register that the identifier should be turned into a link to this URL.\n\n    Arguments:\n        identifier: The new identifier.\n        url: The absolute URL (including anchor, if needed) where this item can be found.\n    \"\"\"\n    self._abs_url_map[identifier] = url\n
"},{"location":"reference/mkdocs_autorefs/references/","title":" references","text":""},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references","title":"references","text":"

Cross-references module.

"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AUTO_REF_RE","title":"AUTO_REF_RE module-attribute","text":"
AUTO_REF_RE = re.compile(\n    '<span data-(?P<kind>autorefs-identifier|autorefs-optional|autorefs-optional-hover)=(\"?)(?P<identifier>[^\"<>]*)\\\\2>(?P<title>.*?)</span>'\n)\n

A regular expression to match mkdocs-autorefs' special reference markers in the on_post_page hook.

"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor","title":"AutoRefInlineProcessor","text":"
AutoRefInlineProcessor(*args: Any, **kwargs: Any)\n

Bases: ReferenceInlineProcessor

A Markdown extension.

Source code in src/mkdocs_autorefs/references.py
def __init__(self, *args: Any, **kwargs: Any) -> None:  # noqa: D107\n    super().__init__(REFERENCE_RE, *args, **kwargs)\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor.evalId","title":"evalId","text":"
evalId(data: str, index: int, text: str) -> EvalIDType\n

Evaluate the id portion of [ref][id].

If [ref][] use [ref].

Parameters:

  • data (str) \u2013

    The data to evaluate.

  • index (int) \u2013

    The starting position.

  • text (str) \u2013

    The text to use when no identifier.

Returns:

  • EvalIDType \u2013

    A tuple containing the identifier, its end position, and whether it matched.

Source code in src/mkdocs_autorefs/references.py
def evalId(self, data: str, index: int, text: str) -> EvalIDType:  # noqa: N802 (parent's casing)\n\"\"\"Evaluate the id portion of `[ref][id]`.\n\n    If `[ref][]` use `[ref]`.\n\n    Arguments:\n        data: The data to evaluate.\n        index: The starting position.\n        text: The text to use when no identifier.\n\n    Returns:\n        A tuple containing the identifier, its end position, and whether it matched.\n    \"\"\"\n    m = self.RE_LINK.match(data, pos=index)\n    if not m:\n        return None, index, False\n\n    identifier = m.group(1)\n    if not identifier:\n        identifier = text\n        # Allow the entire content to be one placeholder, with the intent of catching things like [`Foo`][].\n        # It doesn't catch [*Foo*][] though, just due to the priority order.\n        # https://github.com/Python-Markdown/markdown/blob/1858c1b601ead62ed49646ae0d99298f41b1a271/markdown/inlinepatterns.py#L78\n        if INLINE_PLACEHOLDER_RE.fullmatch(identifier):\n            identifier = self.unescape(identifier)\n\n    end = m.end(0)\n    return identifier, end, True\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor.handleMatch","title":"handleMatch","text":"
handleMatch(\n    m: Match[str], data: Any\n) -> Element | EvalIDType\n

Handle an element that matched.

Parameters:

  • m (Match[str]) \u2013

    The match object.

  • data (Any) \u2013

    The matched data.

Returns:

  • Element | EvalIDType \u2013

    A new element or a tuple.

Source code in src/mkdocs_autorefs/references.py
def handleMatch(self, m: Match[str], data: Any) -> Element | EvalIDType:  # type: ignore[override]  # noqa: N802\n\"\"\"Handle an element that matched.\n\n    Arguments:\n        m: The match object.\n        data: The matched data.\n\n    Returns:\n        A new element or a tuple.\n    \"\"\"\n    text, index, handled = self.getText(data, m.end(0))\n    if not handled:\n        return None, None, None\n\n    identifier, end, handled = self.evalId(data, index, text)\n    if not handled:\n        return None, None, None\n\n    if re.search(r\"[/ \\x00-\\x1f]\", identifier):\n        # Do nothing if the matched reference contains:\n        # - a space, slash or control character (considered unintended);\n        # - specifically \\x01 is used by Python-Markdown HTML stash when there's inline formatting,\n        #   but references with Markdown formatting are not possible anyway.\n        return None, m.start(0), end\n\n    return self.makeTag(identifier, text), m.start(0), end\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor.makeTag","title":"makeTag","text":"
makeTag(identifier: str, text: str) -> Element\n

Create a tag that can be matched by AUTO_REF_RE.

Parameters:

  • identifier (str) \u2013

    The identifier to use in the HTML property.

  • text (str) \u2013

    The text to use in the HTML tag.

Returns:

  • Element \u2013

    A new element.

Source code in src/mkdocs_autorefs/references.py
def makeTag(self, identifier: str, text: str) -> Element:  # type: ignore[override]  # noqa: N802\n\"\"\"Create a tag that can be matched by `AUTO_REF_RE`.\n\n    Arguments:\n        identifier: The identifier to use in the HTML property.\n        text: The text to use in the HTML tag.\n\n    Returns:\n        A new element.\n    \"\"\"\n    el = Element(\"span\")\n    el.set(\"data-autorefs-identifier\", identifier)\n    el.text = text\n    return el\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutorefsExtension","title":"AutorefsExtension","text":"

Bases: Extension

Extension that inserts auto-references in Markdown.

"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutorefsExtension.extendMarkdown","title":"extendMarkdown","text":"
extendMarkdown(md: Markdown) -> None\n

Register the extension.

Add an instance of our AutoRefInlineProcessor to the Markdown parser.

Parameters:

  • md (Markdown) \u2013

    A markdown.Markdown instance.

Source code in src/mkdocs_autorefs/references.py
def extendMarkdown(self, md: Markdown) -> None:  # noqa: N802 (casing: parent method's name)\n\"\"\"Register the extension.\n\n    Add an instance of our [`AutoRefInlineProcessor`][mkdocs_autorefs.references.AutoRefInlineProcessor] to the Markdown parser.\n\n    Arguments:\n        md: A `markdown.Markdown` instance.\n    \"\"\"\n    md.inlinePatterns.register(\n        AutoRefInlineProcessor(md),\n        \"mkdocs-autorefs\",\n        priority=168,  # Right after markdown.inlinepatterns.ReferenceInlineProcessor\n    )\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.fix_ref","title":"fix_ref","text":"
fix_ref(\n    url_mapper: Callable[[str], str], unmapped: list[str]\n) -> Callable\n

Return a repl function for re.sub.

In our context, we match Markdown references and replace them with HTML links.

When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer unmapped list. It generally means the user is trying to cross-reference an object that was not collected and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.

Parameters:

  • url_mapper (Callable[[str], str]) \u2013

    A callable that gets an object's site URL by its identifier, such as mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url.

  • unmapped (list[str]) \u2013

    A list to store unmapped identifiers.

Returns:

  • Callable \u2013

    The actual function accepting a Match object

  • Callable \u2013

    and returning the replacement strings.

Source code in src/mkdocs_autorefs/references.py
def fix_ref(url_mapper: Callable[[str], str], unmapped: list[str]) -> Callable:\n\"\"\"Return a `repl` function for [`re.sub`](https://docs.python.org/3/library/re.html#re.sub).\n\n    In our context, we match Markdown references and replace them with HTML links.\n\n    When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer\n    `unmapped` list. It generally means the user is trying to cross-reference an object that was not collected\n    and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.\n\n    Arguments:\n        url_mapper: A callable that gets an object's site URL by its identifier,\n            such as [mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url][].\n        unmapped: A list to store unmapped identifiers.\n\n    Returns:\n        The actual function accepting a [`Match` object](https://docs.python.org/3/library/re.html#match-objects)\n        and returning the replacement strings.\n    \"\"\"\n\n    def inner(match: Match) -> str:\n        identifier = match[\"identifier\"]\n        title = match[\"title\"]\n        kind = match[\"kind\"]\n\n        try:\n            url = url_mapper(unescape(identifier))\n        except KeyError:\n            if kind == \"autorefs-optional\":\n                return title\n            if kind == \"autorefs-optional-hover\":\n                return f'<span title=\"{identifier}\">{title}</span>'\n            unmapped.append(identifier)\n            if title == identifier:\n                return f\"[{identifier}][]\"\n            return f\"[{title}][{identifier}]\"\n\n        parsed = urlsplit(url)\n        external = parsed.scheme or parsed.netloc\n        classes = [\"autorefs\", \"autorefs-external\" if external else \"autorefs-internal\"]\n        class_attr = \" \".join(classes)\n        if kind == \"autorefs-optional-hover\":\n            return f'<a class=\"{class_attr}\" title=\"{identifier}\" href=\"{escape(url)}\">{title}</a>'\n        return f'<a class=\"{class_attr}\" href=\"{escape(url)}\">{title}</a>'\n\n    return inner\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.fix_refs","title":"fix_refs","text":"
fix_refs(\n    html: str, url_mapper: Callable[[str], str]\n) -> tuple[str, list[str]]\n

Fix all references in the given HTML text.

Parameters:

  • html (str) \u2013

    The text to fix.

  • url_mapper (Callable[[str], str]) \u2013

    A callable that gets an object's site URL by its identifier, such as mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url.

Returns:

  • tuple[str, list[str]] \u2013

    The fixed HTML.

Source code in src/mkdocs_autorefs/references.py
def fix_refs(html: str, url_mapper: Callable[[str], str]) -> tuple[str, list[str]]:\n\"\"\"Fix all references in the given HTML text.\n\n    Arguments:\n        html: The text to fix.\n        url_mapper: A callable that gets an object's site URL by its identifier,\n            such as [mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url][].\n\n    Returns:\n        The fixed HTML.\n    \"\"\"\n    unmapped: list[str] = []\n    html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)\n    return html, unmapped\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.relative_url","title":"relative_url","text":"
relative_url(url_a: str, url_b: str) -> str\n

Compute the relative path from URL A to URL B.

Parameters:

  • url_a (str) \u2013

    URL A.

  • url_b (str) \u2013

    URL B.

Returns:

  • str \u2013

    The relative URL to go from A to B.

Source code in src/mkdocs_autorefs/references.py
def relative_url(url_a: str, url_b: str) -> str:\n\"\"\"Compute the relative path from URL A to URL B.\n\n    Arguments:\n        url_a: URL A.\n        url_b: URL B.\n\n    Returns:\n        The relative URL to go from A to B.\n    \"\"\"\n    parts_a = url_a.split(\"/\")\n    url_b, anchor = url_b.split(\"#\", 1)\n    parts_b = url_b.split(\"/\")\n\n    # remove common left parts\n    while parts_a and parts_b and parts_a[0] == parts_b[0]:\n        parts_a.pop(0)\n        parts_b.pop(0)\n\n    # go up as many times as remaining a parts' depth\n    levels = len(parts_a) - 1\n    parts_relative = [\"..\"] * levels + parts_b\n    relative = \"/\".join(parts_relative)\n    return f\"{relative}#{anchor}\"\n
"},{"location":"coverage/","title":"Coverage report","text":""}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"mkdocs-autorefs","text":"

Automatically link across pages in MkDocs.

"},{"location":"#installation","title":"Installation","text":"

With pip:

python3 -m pip install mkdocs-autorefs\n
"},{"location":"#usage","title":"Usage","text":"
# mkdocs.yml\nplugins:\n  - search\n  - autorefs\n

In one of your Markdown files (e.g. doc1.md) create some headings:

## Hello, world!\n\n## Another heading\n\nLink to [Hello, World!](#hello-world) on the same page.\n

This is a normal link to an anchor. MkDocs generates anchors for each heading, and they can always be used to link to something, either within the same page (as shown here) or by specifying the path of the other page.

But with this plugin, you can link to a heading from any other page on the site without needing to know the path of either of the pages, just the heading title itself. Let's create another Markdown page to try this, subdir/doc2.md:

We can [link to that heading][hello-world] from another page too.\n\nThis works the same as [a normal link to that heading](../doc1.md#hello-world).\n

Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that MkDocs supports only relative links between pages.

Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages. In such cases, use Markdown anchors to add unique aliases to your headings.

"},{"location":"#markdown-anchors","title":"Markdown anchors","text":"

The autorefs plugin offers a feature called \"Markdown anchors\". Such anchors can be added anywhere in a document, and linked to from any other place.

The syntax is:

[](){#id-of-the-anchor}\n

If you look closely, it starts with the usual syntax for a link, [](), except both the text value and URL of the link are empty. Then we see {#id-of-the-anchor}, which is the syntax supported by the attr_list extension. It sets an HTML id to the anchor element. The autorefs plugin simply gives a meaning to such anchors with ids. Note that raw HTML anchors like <a id=\"foo\"></a> are not supported.

The attr_list extension must be enabled for the Markdown anchors feature to work:

# mkdocs.yml\nplugins:\n  - search\n  - autorefs\n\nmarkdown_extensions:\n  - attr_list\n

Now, you can add anchors to documents:

Somewhere in a document.\n\n[](){#foobar-paragraph}\n\nParagraph about foobar.\n

...making it possible to link to this anchor with our automatic links:

In any document.\n\nCheck out the [paragraph about foobar][foobar-pararaph].\n

If you add a Markdown anchor right above a heading, this anchor will redirect to the heading itself:

[](){#foobar}\n## A verbose title about foobar\n

Linking to the foobar anchor will bring you directly to the heading, not the anchor itself, so the URL will show #a-verbose-title-about-foobar instead of #foobar. These anchors therefore act as \"aliases\" for headings. It is possible to define multiple aliases per heading:

[](){#contributing}\n[](){#development-setup}\n## How to contribute to the project?\n

Such aliases are especially useful when the same headings appear in several different pages. Without aliases, linking to the heading is undefined behavior (it could lead to any one of the headings). With unique aliases above headings, you can make sure to link to the right heading.

For example, consider the following setup. You have one document per operating system describing how to install a project with the OS package manager or from sources:

\ud83d\udcc1 docs/\n\u2514\u2500\u2500 \ud83d\udcc1 install/\n    \u251c\u2500\u2500 \ud83d\udcc4 arch.md\n    \u251c\u2500\u2500 \ud83d\udcc4 debian.md\n    \u2514\u2500\u2500 \ud83d\udcc4 gentoo.md\n

Each page has:

## Install with package manager\n...\n\n## Install from sources\n...\n

You don't want to change headings and make them redundant, like ## Arch: Install with package manager and ## Debian: Install with package manager just to be able to reference the right one with autorefs. Instead you can do this:

[](){#arch-install-pkg}\n## Install with package manager\n...\n\n[](){#arch-install-src}\n## Install from sources\n...\n

...changing arch by debian, gentoo, etc. in the other pages.

"},{"location":"changelog/","title":"Changelog","text":"

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

"},{"location":"changelog/#100-2024-02-27","title":"1.0.0 - 2024-02-27","text":"

Compare with 0.5.0

"},{"location":"changelog/#features","title":"Features","text":"
  • Add Markdown anchors and aliases (a215a97 by Timoth\u00e9e Mazzucotelli). Replaces-PR-#20, Related-to-PR-#25, Related-to-issue-#35, Co-authored-by: Oleh Prypin oleh@pryp.in, Co-authored-by: tvdboom m.524687@gmail.com
  • Preserve HTML data attributes (from spans to anchors) (0c1781d by Timoth\u00e9e Mazzucotelli). Issue-#41, PR-#42, Co-authored-by: Oleh Prypin oleh@pryp.in
  • Support [`identifier`][] with pymdownx.inlinehilite enabled (e7f2228 by Oleh Prypin). Issue-#34, PR-#40, Co-authored-by: Timoth\u00e9e Mazzucotelli dev@pawamoy.fr
"},{"location":"changelog/#bug-fixes","title":"Bug Fixes","text":"
  • Recognize links with multi-line text (225a6f2 by Oleh Prypin). Issue #31, PR #32
"},{"location":"changelog/#050-2023-08-02","title":"0.5.0 - 2023-08-02","text":"

Compare with 0.4.1

"},{"location":"changelog/#breaking-changes","title":"Breaking Changes","text":"
  • Drop support for Python 3.7
"},{"location":"changelog/#build","title":"Build","text":"
  • Migrate to pdm-backend (48b92fb by Micha\u0142 G\u00f3rny).
"},{"location":"changelog/#bug-fixes_1","title":"Bug Fixes","text":"
  • Stop using deprecated warning_filter (7721103 by Kyle King). PR #30
"},{"location":"changelog/#code-refactoring","title":"Code Refactoring","text":"
  • Use new MkDocs plugin logger if available (ca8d758 by Timoth\u00e9e Mazzucotelli).
"},{"location":"changelog/#041-2022-03-07","title":"0.4.1 - 2022-03-07","text":"

Compare with 0.4.0

"},{"location":"changelog/#bug-fixes_2","title":"Bug Fixes","text":"
  • Fix packaging (missing __init__ module) (de0670b by Timoth\u00e9e Mazzucotelli). Issue #17, issue mkdocstrings/mkdocstrings#398, PR #18
"},{"location":"changelog/#040-2022-03-07","title":"0.4.0 - 2022-03-07","text":"

Compare with 0.3.1

"},{"location":"changelog/#features_1","title":"Features","text":"
  • Add HTML classes to references: autorefs always, and autorefs-internal or autorefs-external depending on the link (39db59d by Timoth\u00e9e Mazzucotelli). PR #16
"},{"location":"changelog/#bug-fixes_3","title":"Bug Fixes","text":"
  • Don't compute relative URLs of already relative ones (f6b861c by Timoth\u00e9e Mazzucotelli). PR #15
"},{"location":"changelog/#031-2021-12-27","title":"0.3.1 - 2021-12-27","text":"

Compare with 0.3.0

"},{"location":"changelog/#code-refactoring_1","title":"Code Refactoring","text":"
  • Support fallback method returning multiple identifiers (0d2b411 by Timoth\u00e9e Mazzucotelli). Issue #11, PR #12 and mkdocstrings#350
"},{"location":"changelog/#030-2021-07-24","title":"0.3.0 - 2021-07-24","text":"

Compare with 0.2.1

"},{"location":"changelog/#features_2","title":"Features","text":"
  • Add optional-hover ref type (0288bdd by Brian Koropoff). PR #10
"},{"location":"changelog/#021-2021-05-07","title":"0.2.1 - 2021-05-07","text":"

Compare with 0.2.0

"},{"location":"changelog/#bug-fixes_4","title":"Bug Fixes","text":"
  • Prevent error during parallel installations (c90e399 by Timoth\u00e9e Mazzucotelli). PR #9
"},{"location":"changelog/#020-2021-05-03","title":"0.2.0 - 2021-05-03","text":"

Compare with 0.1.1

"},{"location":"changelog/#features_3","title":"Features","text":"
  • Allow registering absolute URLs for autorefs (621686b by Oleh Prypin). PR #8
  • Allow external tools to insert references that are OK to skip (7619c28 by Oleh Prypin). PR #7
  • Allow [``identifier``][], understood as [``identifier``][identifier] (2d3182d by Oleh Prypin). PR #5
"},{"location":"changelog/#011-2021-02-28","title":"0.1.1 - 2021-02-28","text":"

Compare with 0.1.0

"},{"location":"changelog/#packaging","title":"Packaging","text":"
  • Remove unused dependencies (9c6a8e6 by Oleh Prypin).
"},{"location":"changelog/#010-2021-02-17","title":"0.1.0 - 2021-02-17","text":"

Compare with first commit

"},{"location":"changelog/#features_4","title":"Features","text":"
  • Split out \"mkdocs-autorefs\" plugin from \"mkdocstrings\" (fe6faa5 by Oleh Prypin).
"},{"location":"code_of_conduct/","title":"Contributor Covenant Code of Conduct","text":""},{"location":"code_of_conduct/#our-pledge","title":"Our Pledge","text":"

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

"},{"location":"code_of_conduct/#our-standards","title":"Our Standards","text":"

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting
"},{"location":"code_of_conduct/#enforcement-responsibilities","title":"Enforcement Responsibilities","text":"

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

"},{"location":"code_of_conduct/#scope","title":"Scope","text":"

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

"},{"location":"code_of_conduct/#enforcement","title":"Enforcement","text":"

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dev@pawamoy.fr. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

"},{"location":"code_of_conduct/#enforcement-guidelines","title":"Enforcement Guidelines","text":"

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

"},{"location":"code_of_conduct/#1-correction","title":"1. Correction","text":"

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

"},{"location":"code_of_conduct/#2-warning","title":"2. Warning","text":"

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

"},{"location":"code_of_conduct/#3-temporary-ban","title":"3. Temporary Ban","text":"

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

"},{"location":"code_of_conduct/#4-permanent-ban","title":"4. Permanent Ban","text":"

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

"},{"location":"code_of_conduct/#attribution","title":"Attribution","text":"

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

"},{"location":"contributing/","title":"Contributing","text":"

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

"},{"location":"contributing/#environment-setup","title":"Environment setup","text":"

Nothing easier!

Fork and clone the repository, then:

cd mkdocs-autorefs\nmake setup\n

Note

If it fails for some reason, you'll need to install PDM manually.

You can install it with:

python3 -m pip install --user pipx\npipx install pdm\n

Now you can try running make setup again, or simply pdm install.

You now have the dependencies installed.

Run make help to see all the available actions!

"},{"location":"contributing/#tasks","title":"Tasks","text":"

This project uses duty to run tasks. A Makefile is also provided. The Makefile will try to run certain tasks on multiple Python versions. If for some reason you don't want to run the task on multiple Python versions, you run the task directly with pdm run duty TASK.

The Makefile detects if a virtual environment is activated, so make will work the same with the virtualenv activated or not.

If you work in VSCode, we provide an action to configure VSCode for the project.

"},{"location":"contributing/#development","title":"Development","text":"

As usual:

  1. create a new branch: git switch -c feature-or-bugfix-name
  2. edit the code and/or the documentation

Before committing:

  1. run make format to auto-format the code
  2. run make check to check everything (fix any warning)
  3. run make test to run the tests (fix any issue)
  4. if you updated the documentation or the project dependencies:
    1. run make docs
    2. go to http://localhost:8000 and check that everything looks good
  5. follow our commit message convention

If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.

Don't bother updating the changelog, we will take care of this.

"},{"location":"contributing/#commit-message-convention","title":"Commit message convention","text":"

Commit messages must follow our convention based on the Angular style or the Karma convention:

<type>[(scope)]: Subject\n\n[Body]\n

Subject and body must be valid Markdown. Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.

Scope and body are optional. Type can be:

  • build: About packaging, building wheels, etc.
  • chore: About packaging or repo/files management.
  • ci: About Continuous Integration.
  • deps: Dependencies update.
  • docs: About documentation.
  • feat: New feature.
  • fix: Bug fix.
  • perf: About performance.
  • refactor: Changes that are not features or bug fixes.
  • style: A change in code style/format.
  • tests: About tests.

If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:

Body.\n\nIssue #10: https://github.com/namespace/project/issues/10\nRelated to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15\n

These \"trailers\" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons :. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).

We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.

"},{"location":"contributing/#pull-requests-guidelines","title":"Pull requests guidelines","text":"

Link to any related issue in the Pull Request message.

During the review, we recommend using fixups:

# SHA is the SHA of the commit you want to fix\ngit commit --fixup=SHA\n

Once all the changes are approved, you can squash your commits:

git rebase -i --autosquash main\n

And force-push:

git push -f\n

If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.

"},{"location":"credits/","title":"Credits","text":""},{"location":"credits/#exec-2--credits","title":"Credits","text":"

These projects were used to build mkdocs-autorefs. Thank you!

python | pdm | copier-pdm

"},{"location":"credits/#exec-2--runtime-dependencies","title":"Runtime dependencies","text":"Project Summary Version (accepted) Version (last resolved) License click Composable command line interface toolkit >=7.0 8.1.7 BSD-3-Clause colorama Cross-platform colored terminal text. >=0.4; platform_system == \"Windows\" 0.4.6 BSD License ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License importlib-metadata Read metadata from Python packages >=4.4; python_version < \"3.10\" 7.0.1 ? jinja2 A very fast and expressive template engine. >=2.11.1 3.1.3 BSD-3-Clause markdown Python implementation of John Gruber's Markdown. >=3.3 3.5.2 BSD License markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0.1 2.1.5 BSD-3-Clause mergedeep A deep merge function for \ud83d\udc0d. >=1.3.4 1.3.4 MIT License mkdocs Project documentation with Markdown. >=1.1 1.5.3 BSD License packaging Core utilities for Python packages >=20.5 23.2 BSD License pathspec Utility library for gitignore style pattern matching of file paths. >=0.11.1 0.12.1 Mozilla Public License 2.0 (MPL 2.0) platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\". >=2.2.0 4.2.0 MIT License python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT watchdog Filesystem events monitoring >=2.0 4.0.0 Apache-2.0 zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.17.0 ?"},{"location":"credits/#exec-2--development-dependencies","title":"Development dependencies","text":"Project Summary Version (accepted) Version (last resolved) License ansimarkup Produce colored terminal text with an xml-like markup ~=1.4 1.5.0 Revised BSD License appdirs A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\". >=1.4 1.4.4 MIT authlib The ultimate Python library in building OAuth and OpenID Connect servers and clients. >=1.2.0 1.3.0 BSD-3-Clause babel Internationalization utilities ~=2.10 2.14.0 BSD-3-Clause black The uncompromising code formatter. >=23.9 24.2.0 MIT blacken-docs Run Black on Python code blocks in documentation files. >=1.16 1.16.0 MIT certifi Python package for providing Mozilla's CA Bundle. >=2017.4.17 2024.2.2 MPL-2.0 cffi Foreign Function Interface for Python calling C code. >=1.12; platform_python_implementation != \"PyPy\" 1.16.0 MIT charset-normalizer The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. <4,>=2 3.3.2 MIT click Composable command line interface toolkit >=8.0.0 8.1.7 BSD-3-Clause colorama Cross-platform colored terminal text. ; platform_system == \"Windows\" 0.4.6 BSD License coverage Code coverage measurement for Python [toml]>=5.2.1 7.4.1 Apache-2.0 cryptography cryptography is a package which provides cryptographic recipes and primitives to Python developers. 42.0.2 Apache-2.0 OR BSD-3-Clause csscompressor A python port of YUI CSS Compressor >=0.9.5 0.9.5 BSD dparse A parser for Python dependency files >=0.6.4b0 0.6.4b0 MIT license duty A simple task runner. >=0.10 1.2.0 ISC exceptiongroup Backport of PEP 654 (exception groups) >=1.0.0rc8; python_version < \"3.11\" 1.2.0 ? execnet execnet: rapid multi-Python deployment >=1.1 2.0.2 MIT License failprint Run a command, print its output only if it fails. !=1.0.0,>=0.11 1.0.2 ISC ghp-import Copy your docs directly to the gh-pages branch. >=1.0 2.1.0 Apache Software License git-changelog Automatic Changelog generator using Jinja2 templates. >=2.3 2.4.0 ISC gitdb Git Object Database <5,>=4.0.1 4.0.11 BSD License gitpython GitPython is a Python library used to interact with Git repositories 3.1.41 BSD-3-Clause griffe Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API. >=0.40 0.40.1.1.0.0 ISC htmlmin2 An HTML Minifier >=0.1.13 0.1.13 BSD idna Internationalized Domain Names in Applications (IDNA) <4,>=2.5 3.6 BSD License importlib-metadata Read metadata from Python packages >=4.3; python_version < \"3.10\" 7.0.1 ? iniconfig brain-dead simple config-ini parsing 2.0.0 MIT License jinja2 A very fast and expressive template engine. <4,>=2.11 3.1.3 BSD-3-Clause jsmin JavaScript minifier. >=3.0.1 3.0.1 MIT License markdown Python implementation of John Gruber's Markdown. >=3.3.3 3.5.2 BSD License markdown-callouts Markdown extension: a classier syntax for admonitions >=0.3 0.4.0 MIT License markdown-exec Utilities to execute code blocks in Markdown files. >=1.7 1.8.0 ISC markdown-it-py Python port of markdown-it. Markdown parsing, done right! >=2.2.0 3.0.0 MIT License markupsafe Safely add untrusted strings to HTML/XML markup. >=2.0 2.1.5 BSD-3-Clause marshmallow A lightweight library for converting complex datatypes to and from native Python datatypes. >=3.15.0 3.20.2 MIT mdurl Markdown URL utilities ~=0.1 0.1.2 MIT License mergedeep A deep merge function for \ud83d\udc0d. >=1.3.4 1.3.4 MIT License mkdocs Project documentation with Markdown. >=1.5 1.5.3 BSD License mkdocs-coverage MkDocs plugin to integrate your coverage HTML report into your site. >=1.0 1.0.0 ISC mkdocs-gen-files MkDocs plugin to programmatically generate documentation pages during the build >=0.5 0.5.0 MIT License mkdocs-git-committers-plugin-2 An MkDocs plugin to create a list of contributors on the page. The git-committers plugin will seed the template context with a list of GitHub or GitLab committers and other useful GIT info such as last modified date >=1.2 2.2.3 MIT mkdocs-literate-nav MkDocs plugin to specify the navigation in Markdown instead of YAML >=0.6 0.6.1 MIT License mkdocs-material Documentation that simply works >=9.4 9.5.9 MIT License mkdocs-material-extensions Extension pack for Python Markdown and MkDocs Material. ~=1.3 1.3.1 MIT License mkdocs-minify-plugin An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk >=0.7 0.8.0 MIT mkdocstrings Automatic documentation from sources, for MkDocs. [python]>=0.23 0.24.0 ISC mkdocstrings-python A Python handler for mkdocstrings. >=0.5.2 1.8.0.1.6.0 ISC mypy Optional static typing for Python >=1.5 1.8.0 MIT mypy-extensions Type system extensions for programs checked with the mypy type checker. >=0.4.3 1.0.0 MIT License packaging Core utilities for Python packages >=22.0 23.2 BSD License paginate Divides large result sets into pages for easier browsing ~=0.5 0.5.6 MIT pathspec Utility library for gitignore style pattern matching of file paths. >=0.9.0 0.12.1 Mozilla Public License 2.0 (MPL 2.0) platformdirs A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\". >=2 4.2.0 MIT License pluggy plugin and hook calling mechanisms for python <2.0,>=1.3.0 1.4.0 MIT ptyprocess Run a subprocess in a pseudo terminal ~=0.6; sys_platform != \"win32\" 0.7.0 ISC License (ISCL) pycparser C parser in Python 2.21 BSD pydantic Data validation and settings management using python type hints <2.0,>=1.10.12 1.10.14 MIT pygments Pygments is a syntax highlighting package written in Python. >=2.16 2.17.2 BSD-2-Clause pymdown-extensions Extension pack for Python Markdown. >=10.0 10.7 MIT License pytest pytest: simple powerful testing with Python >=7.4 8.0.0 MIT pytest-cov Pytest plugin for measuring coverage. >=4.1 4.1.0 MIT pytest-randomly Pytest plugin to randomly order tests and control random.seed. >=3.15 3.15.0 MIT pytest-xdist pytest xdist plugin for distributed testing, most importantly across multiple CPUs >=3.3 3.5.0 MIT python-dateutil Extensions to the standard Python datetime module >=2.8.1 2.8.2 Dual License pytz World timezone definitions, modern and historical >=2015.7; python_version < \"3.9\" 2024.1 ? pyyaml YAML parser and emitter for Python >=5.1 6.0.1 MIT pyyaml-env-tag A custom YAML tag for referencing environment variables in YAML files. >=0.1 0.1 MIT License regex Alternative regular expression module, to replace re. >=2022.4 2023.12.25 Apache Software License requests Python HTTP for Humans. 2.31.0 Apache 2.0 rich Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal 13.7.0 MIT ruamel-yaml ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order >=0.17.21 0.18.6 MIT license ruamel-yaml-clib C version of reader, parser and emitter for ruamel.yaml derived from libyaml >=0.2.7; platform_python_implementation == \"CPython\" and python_version < \"3.13\" 0.2.8 MIT ruff An extremely fast Python linter and code formatter, written in Rust. >=0.0 0.2.1 MIT safety Checks installed dependencies for known vulnerabilities and licenses. >=2.3 3.0.1 MIT license safety-schemas Schemas for Safety tools >=0.0.1 0.0.2 MIT license semver Python helper for Semantic Versioning (https://semver.org) >=2.13 3.0.2 BSD setuptools Easily download, build, install, upgrade, and uninstall Python packages >=65.5.1 69.1.0 MIT License six Python 2 and 3 compatibility utilities >=1.5 1.16.0 MIT smmap A pure Python implementation of a sliding window memory map manager <6,>=3.0.1 5.0.1 BSD tomli A lil' TOML parser >=2.0; python_version < '3.11' 2.0.1 ? typer Typer, build great CLIs. Easy to code. Based on Python type hints. 0.9.0 MIT License types-markdown Typing stubs for Markdown >=3.5 3.5.0.20240129 Apache-2.0 license types-pyyaml Typing stubs for PyYAML >=6.0 6.0.12.12 Apache-2.0 license typing-extensions Backported and Experimental Type Hints for Python 3.8+ >=4.0.1; python_version < \"3.11\" 4.9.0 Python Software Foundation License urllib3 HTTP library with thread-safe connection pooling, file post, and more. <3,>=1.21.1 2.2.0 MIT License watchdog Filesystem events monitoring >=2.0 4.0.0 Apache-2.0 zipp Backport of pathlib-compatible object wrapper for zip files >=0.5 3.17.0 ?

More credits from the author

"},{"location":"license/","title":"License","text":"
ISC License\n\nCopyright (c) 2019, Oleh Prypin\nCopyright (c) 2019, Timoth\u00e9e Mazzucotelli\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n
"},{"location":"reference/SUMMARY/","title":"SUMMARY","text":"
  • mkdocs_autorefs
    • debug
    • plugin
    • references
"},{"location":"reference/mkdocs_autorefs/","title":"Index","text":""},{"location":"reference/mkdocs_autorefs/#mkdocs_autorefs","title":"mkdocs_autorefs","text":"

mkdocs-autorefs package.

Automatically link across pages in MkDocs.

Modules:

  • debug \u2013

    Debugging utilities.

  • plugin \u2013

    This module contains the \"mkdocs-autorefs\" plugin.

  • references \u2013

    Cross-references module.

"},{"location":"reference/mkdocs_autorefs/debug/","title":" debug","text":""},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug","title":"debug","text":"

Debugging utilities.

Classes:

  • Environment \u2013

    Dataclass to store environment information.

  • Package \u2013

    Dataclass describing a Python package.

  • Variable \u2013

    Dataclass describing an environment variable.

Functions:

  • get_debug_info \u2013

    Get debug/environment information.

  • get_version \u2013

    Get version of the given distribution.

  • print_debug_info \u2013

    Print debug/environment information.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment","title":"Environment dataclass","text":"

Dataclass to store environment information.

Attributes:

  • interpreter_name (str) \u2013

    Python interpreter name.

  • interpreter_version (str) \u2013

    Python interpreter version.

  • packages (list[Package]) \u2013

    Installed packages.

  • platform (str) \u2013

    Operating System.

  • variables (list[Variable]) \u2013

    Environment variables.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment.interpreter_name","title":"interpreter_name instance-attribute","text":"
interpreter_name: str\n

Python interpreter name.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment.interpreter_version","title":"interpreter_version instance-attribute","text":"
interpreter_version: str\n

Python interpreter version.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment.packages","title":"packages instance-attribute","text":"
packages: list[Package]\n

Installed packages.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment.platform","title":"platform instance-attribute","text":"
platform: str\n

Operating System.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Environment.variables","title":"variables instance-attribute","text":"
variables: list[Variable]\n

Environment variables.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Package","title":"Package dataclass","text":"

Dataclass describing a Python package.

Attributes:

  • name (str) \u2013

    Package name.

  • version (str) \u2013

    Package version.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Package.name","title":"name instance-attribute","text":"
name: str\n

Package name.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Package.version","title":"version instance-attribute","text":"
version: str\n

Package version.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Variable","title":"Variable dataclass","text":"

Dataclass describing an environment variable.

Attributes:

  • name (str) \u2013

    Variable name.

  • value (str) \u2013

    Variable value.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Variable.name","title":"name instance-attribute","text":"
name: str\n

Variable name.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.Variable.value","title":"value instance-attribute","text":"
value: str\n

Variable value.

"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.get_debug_info","title":"get_debug_info","text":"
get_debug_info() -> Environment\n

Get debug/environment information.

Returns:

  • Environment \u2013

    Environment information.

Source code in src/mkdocs_autorefs/debug.py
def get_debug_info() -> Environment:\n    \"\"\"Get debug/environment information.\n\n    Returns:\n        Environment information.\n    \"\"\"\n    py_name, py_version = _interpreter_name_version()\n    packages = [\"mkdocs-autorefs\"]\n    variables = [\"PYTHONPATH\", *[var for var in os.environ if var.startswith(\"MKDOCS_AUTOREFS\")]]\n    return Environment(\n        interpreter_name=py_name,\n        interpreter_version=py_version,\n        platform=platform.platform(),\n        variables=[Variable(var, val) for var in variables if (val := os.getenv(var))],\n        packages=[Package(pkg, get_version(pkg)) for pkg in packages],\n    )\n
"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.get_version","title":"get_version","text":"
get_version(dist: str = 'mkdocs-autorefs') -> str\n

Get version of the given distribution.

Parameters:

  • dist (str, default: 'mkdocs-autorefs' ) \u2013

    A distribution name.

Returns:

  • str \u2013

    A version number.

Source code in src/mkdocs_autorefs/debug.py
def get_version(dist: str = \"mkdocs-autorefs\") -> str:\n    \"\"\"Get version of the given distribution.\n\n    Parameters:\n        dist: A distribution name.\n\n    Returns:\n        A version number.\n    \"\"\"\n    try:\n        return metadata.version(dist)\n    except metadata.PackageNotFoundError:\n        return \"0.0.0\"\n
"},{"location":"reference/mkdocs_autorefs/debug/#mkdocs_autorefs.debug.print_debug_info","title":"print_debug_info","text":"
print_debug_info() -> None\n

Print debug/environment information.

Source code in src/mkdocs_autorefs/debug.py
def print_debug_info() -> None:\n    \"\"\"Print debug/environment information.\"\"\"\n    info = get_debug_info()\n    print(f\"- __System__: {info.platform}\")\n    print(f\"- __Python__: {info.interpreter_name} {info.interpreter_version}\")\n    print(\"- __Environment variables__:\")\n    for var in info.variables:\n        print(f\"  - `{var.name}`: `{var.value}`\")\n    print(\"- __Installed packages__:\")\n    for pkg in info.packages:\n        print(f\"  - `{pkg.name}` v{pkg.version}\")\n
"},{"location":"reference/mkdocs_autorefs/plugin/","title":" plugin","text":""},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin","title":"plugin","text":"

This module contains the \"mkdocs-autorefs\" plugin.

After each page is processed by the Markdown converter, this plugin stores absolute URLs of every HTML anchors it finds to later be able to fix unresolved references. It stores them during the on_page_content event hook.

Just before writing the final HTML to the disc, during the on_post_page event hook, this plugin searches for references of the form [identifier][] or [title][identifier] that were not resolved, and fixes them using the previously stored identifier-URL mapping.

Classes:

  • AutorefsPlugin \u2013

    An mkdocs plugin.

"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin","title":"AutorefsPlugin","text":"
AutorefsPlugin()\n

Bases: BasePlugin

An mkdocs plugin.

This plugin defines the following event hooks:

  • on_config
  • on_page_content
  • on_post_page

Check the Developing Plugins page of mkdocs for more information about its plugin system.

Methods:

  • get_item_url \u2013

    Return a site-relative URL with anchor to the identifier, if it's present anywhere.

  • map_urls \u2013

    Recurse on every anchor to map its ID to its absolute URL.

  • on_config \u2013

    Instantiate our Markdown extension.

  • on_page_content \u2013

    Map anchors to URLs.

  • on_page_markdown \u2013

    Remember which page is the current one.

  • on_post_page \u2013

    Fix cross-references.

  • register_anchor \u2013

    Register that an anchor corresponding to an identifier was encountered when rendering the page.

  • register_url \u2013

    Register that the identifier should be turned into a link to this URL.

Source code in src/mkdocs_autorefs/plugin.py
def __init__(self) -> None:\n    \"\"\"Initialize the object.\"\"\"\n    super().__init__()\n    self._url_map: dict[str, str] = {}\n    self._abs_url_map: dict[str, str] = {}\n    self.get_fallback_anchor: Callable[[str], tuple[str, ...]] | None = None\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url","title":"get_item_url","text":"
get_item_url(\n    identifier: str,\n    from_url: str | None = None,\n    fallback: Callable[[str], Sequence[str]] | None = None,\n) -> str\n

Return a site-relative URL with anchor to the identifier, if it's present anywhere.

Parameters:

  • identifier (str) \u2013

    The anchor (without '#').

  • from_url (str | None, default: None ) \u2013

    The URL of the base page, from which we link towards the targeted pages.

  • fallback (Callable[[str], Sequence[str]] | None, default: None ) \u2013

    An optional function to suggest alternative anchors to try on failure.

Returns:

  • str \u2013

    A site-relative URL.

Source code in src/mkdocs_autorefs/plugin.py
def get_item_url(\n    self,\n    identifier: str,\n    from_url: str | None = None,\n    fallback: Callable[[str], Sequence[str]] | None = None,\n) -> str:\n    \"\"\"Return a site-relative URL with anchor to the identifier, if it's present anywhere.\n\n    Arguments:\n        identifier: The anchor (without '#').\n        from_url: The URL of the base page, from which we link towards the targeted pages.\n        fallback: An optional function to suggest alternative anchors to try on failure.\n\n    Returns:\n        A site-relative URL.\n    \"\"\"\n    url = self._get_item_url(identifier, fallback)\n    if from_url is not None:\n        parsed = urlsplit(url)\n        if not parsed.scheme and not parsed.netloc:\n            return relative_url(from_url, url)\n    return url\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.map_urls","title":"map_urls","text":"
map_urls(base_url: str, anchor: AnchorLink) -> None\n

Recurse on every anchor to map its ID to its absolute URL.

This method populates self.url_map by side-effect.

Parameters:

  • base_url (str) \u2013

    The base URL to use as a prefix for each anchor's relative URL.

  • anchor (AnchorLink) \u2013

    The anchor to process and to recurse on.

Source code in src/mkdocs_autorefs/plugin.py
def map_urls(self, base_url: str, anchor: AnchorLink) -> None:\n    \"\"\"Recurse on every anchor to map its ID to its absolute URL.\n\n    This method populates `self.url_map` by side-effect.\n\n    Arguments:\n        base_url: The base URL to use as a prefix for each anchor's relative URL.\n        anchor: The anchor to process and to recurse on.\n    \"\"\"\n    self.register_anchor(base_url, anchor.id)\n    for child in anchor.children:\n        self.map_urls(base_url, child)\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_config","title":"on_config","text":"
on_config(config: MkDocsConfig) -> MkDocsConfig | None\n

Instantiate our Markdown extension.

Hook for the on_config event. In this hook, we instantiate our AutorefsExtension and add it to the list of Markdown extensions used by mkdocs.

Parameters:

  • config (MkDocsConfig) \u2013

    The MkDocs config object.

Returns:

  • MkDocsConfig | None \u2013

    The modified config.

Source code in src/mkdocs_autorefs/plugin.py
def on_config(self, config: MkDocsConfig) -> MkDocsConfig | None:\n    \"\"\"Instantiate our Markdown extension.\n\n    Hook for the [`on_config` event](https://www.mkdocs.org/user-guide/plugins/#on_config).\n    In this hook, we instantiate our [`AutorefsExtension`][mkdocs_autorefs.references.AutorefsExtension]\n    and add it to the list of Markdown extensions used by `mkdocs`.\n\n    Arguments:\n        config: The MkDocs config object.\n\n    Returns:\n        The modified config.\n    \"\"\"\n    log.debug(\"Adding AutorefsExtension to the list\")\n    config[\"markdown_extensions\"].append(AutorefsExtension(self))\n    return config\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_page_content","title":"on_page_content","text":"
on_page_content(\n    html: str, page: Page, **kwargs: Any\n) -> str\n

Map anchors to URLs.

Hook for the on_page_content event. In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs. This mapping will be used later to fix unresolved reference of the form [title][identifier] or [identifier][].

Parameters:

  • html (str) \u2013

    HTML converted from Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    The same HTML. We only use this hook to map anchors to URLs.

Source code in src/mkdocs_autorefs/plugin.py
def on_page_content(self, html: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n    \"\"\"Map anchors to URLs.\n\n    Hook for the [`on_page_content` event](https://www.mkdocs.org/user-guide/plugins/#on_page_content).\n    In this hook, we map the IDs of every anchor found in the table of contents to the anchors absolute URLs.\n    This mapping will be used later to fix unresolved reference of the form `[title][identifier]` or\n    `[identifier][]`.\n\n    Arguments:\n        html: HTML converted from Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        The same HTML. We only use this hook to map anchors to URLs.\n    \"\"\"\n    if self.scan_toc:\n        log.debug(f\"Mapping identifiers to URLs for page {page.file.src_path}\")\n        for item in page.toc.items:\n            self.map_urls(page.url, item)\n    return html\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_page_markdown","title":"on_page_markdown","text":"
on_page_markdown(\n    markdown: str, page: Page, **kwargs: Any\n) -> str\n

Remember which page is the current one.

Parameters:

  • markdown (str) \u2013

    Input Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    The same Markdown. We only use this hook to keep a reference to the current page URL, used during Markdown conversion by the anchor scanner tree processor.

Source code in src/mkdocs_autorefs/plugin.py
def on_page_markdown(self, markdown: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n    \"\"\"Remember which page is the current one.\n\n    Arguments:\n        markdown: Input Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        The same Markdown. We only use this hook to keep a reference to the current page URL,\n            used during Markdown conversion by the anchor scanner tree processor.\n    \"\"\"\n    self.current_page = page.url\n    return markdown\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.on_post_page","title":"on_post_page","text":"
on_post_page(output: str, page: Page, **kwargs: Any) -> str\n

Fix cross-references.

Hook for the on_post_page event. In this hook, we try to fix unresolved references of the form [title][identifier] or [identifier][]. Doing that allows the user of autorefs to cross-reference objects in their documentation strings. It uses the native Markdown syntax so it's easy to remember and use.

We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers that do not look legitimate (sometimes documentation can contain strings matching our AUTO_REF_RE regular expression that did not intend to reference anything). We currently ignore references when their identifier contains a space or a slash.

Parameters:

  • output (str) \u2013

    HTML converted from Markdown.

  • page (Page) \u2013

    The related MkDocs page instance.

  • kwargs (Any, default: {} ) \u2013

    Additional arguments passed by MkDocs.

Returns:

  • str \u2013

    Modified HTML.

Source code in src/mkdocs_autorefs/plugin.py
def on_post_page(self, output: str, page: Page, **kwargs: Any) -> str:  # noqa: ARG002\n    \"\"\"Fix cross-references.\n\n    Hook for the [`on_post_page` event](https://www.mkdocs.org/user-guide/plugins/#on_post_page).\n    In this hook, we try to fix unresolved references of the form `[title][identifier]` or `[identifier][]`.\n    Doing that allows the user of `autorefs` to cross-reference objects in their documentation strings.\n    It uses the native Markdown syntax so it's easy to remember and use.\n\n    We log a warning for each reference that we couldn't map to an URL, but try to be smart and ignore identifiers\n    that do not look legitimate (sometimes documentation can contain strings matching\n    our [`AUTO_REF_RE`][mkdocs_autorefs.references.AUTO_REF_RE] regular expression that did not intend to reference anything).\n    We currently ignore references when their identifier contains a space or a slash.\n\n    Arguments:\n        output: HTML converted from Markdown.\n        page: The related MkDocs page instance.\n        kwargs: Additional arguments passed by MkDocs.\n\n    Returns:\n        Modified HTML.\n    \"\"\"\n    log.debug(f\"Fixing references in page {page.file.src_path}\")\n\n    url_mapper = functools.partial(self.get_item_url, from_url=page.url, fallback=self.get_fallback_anchor)\n    fixed_output, unmapped = fix_refs(output, url_mapper)\n\n    if unmapped and log.isEnabledFor(logging.WARNING):\n        for ref in unmapped:\n            log.warning(f\"{page.file.src_path}: Could not find cross-reference target '[{ref}]'\")\n\n    return fixed_output\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.register_anchor","title":"register_anchor","text":"
register_anchor(\n    page: str, identifier: str, anchor: str | None = None\n) -> None\n

Register that an anchor corresponding to an identifier was encountered when rendering the page.

Parameters:

  • page (str) \u2013

    The relative URL of the current page. Examples: 'foo/bar/', 'foo/index.html'

  • identifier (str) \u2013

    The HTML anchor (without '#') as a string.

Source code in src/mkdocs_autorefs/plugin.py
def register_anchor(self, page: str, identifier: str, anchor: str | None = None) -> None:\n    \"\"\"Register that an anchor corresponding to an identifier was encountered when rendering the page.\n\n    Arguments:\n        page: The relative URL of the current page. Examples: `'foo/bar/'`, `'foo/index.html'`\n        identifier: The HTML anchor (without '#') as a string.\n    \"\"\"\n    self._url_map[identifier] = f\"{page}#{anchor or identifier}\"\n
"},{"location":"reference/mkdocs_autorefs/plugin/#mkdocs_autorefs.plugin.AutorefsPlugin.register_url","title":"register_url","text":"
register_url(identifier: str, url: str) -> None\n

Register that the identifier should be turned into a link to this URL.

Parameters:

  • identifier (str) \u2013

    The new identifier.

  • url (str) \u2013

    The absolute URL (including anchor, if needed) where this item can be found.

Source code in src/mkdocs_autorefs/plugin.py
def register_url(self, identifier: str, url: str) -> None:\n    \"\"\"Register that the identifier should be turned into a link to this URL.\n\n    Arguments:\n        identifier: The new identifier.\n        url: The absolute URL (including anchor, if needed) where this item can be found.\n    \"\"\"\n    self._abs_url_map[identifier] = url\n
"},{"location":"reference/mkdocs_autorefs/references/","title":" references","text":""},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references","title":"references","text":"

Cross-references module.

Classes:

  • AnchorScannerTreeProcessor \u2013

    Tree processor to scan and register HTML anchors.

  • AutoRefInlineProcessor \u2013

    A Markdown extension.

  • AutorefsExtension \u2013

    Extension that inserts auto-references in Markdown.

Functions:

  • fix_ref \u2013

    Return a repl function for re.sub.

  • fix_refs \u2013

    Fix all references in the given HTML text.

  • relative_url \u2013

    Compute the relative path from URL A to URL B.

Attributes:

  • AUTO_REF_RE \u2013

    A regular expression to match mkdocs-autorefs' special reference markers

"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AUTO_REF_RE","title":"AUTO_REF_RE module-attribute","text":"
AUTO_REF_RE = compile(\n    f\"<span data-(?P<kind>autorefs-(?:identifier|optional|optional-hover))=(?P<identifier>{_ATTR_VALUE})(?: class=(?P<class>{_ATTR_VALUE}))?(?P<attrs> [^<>]+)?>(?P<title>.*?)</span>\",\n    flags=DOTALL,\n)\n

A regular expression to match mkdocs-autorefs' special reference markers in the on_post_page hook.

"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AnchorScannerTreeProcessor","title":"AnchorScannerTreeProcessor","text":"
AnchorScannerTreeProcessor(\n    plugin: AutorefsPlugin, md: Markdown | None = None\n)\n

Bases: Treeprocessor

Tree processor to scan and register HTML anchors.

Parameters:

  • plugin (AutorefsPlugin) \u2013

    A reference to the autorefs plugin, to use its register_anchor method.

Source code in src/mkdocs_autorefs/references.py
def __init__(self, plugin: AutorefsPlugin, md: Markdown | None = None) -> None:\n    \"\"\"Initialize the tree processor.\n\n    Parameters:\n        plugin: A reference to the autorefs plugin, to use its `register_anchor` method.\n    \"\"\"\n    super().__init__(md)\n    self.plugin = plugin\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor","title":"AutoRefInlineProcessor","text":"
AutoRefInlineProcessor(*args: Any, **kwargs: Any)\n

Bases: ReferenceInlineProcessor

A Markdown extension.

Methods:

  • evalId \u2013

    Evaluate the id portion of [ref][id].

  • handleMatch \u2013

    Handle an element that matched.

Source code in src/mkdocs_autorefs/references.py
def __init__(self, *args: Any, **kwargs: Any) -> None:  # noqa: D107\n    super().__init__(REFERENCE_RE, *args, **kwargs)\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor.evalId","title":"evalId","text":"
evalId(\n    data: str, index: int, text: str\n) -> tuple[str | None, int, bool]\n

Evaluate the id portion of [ref][id].

If [ref][] use [ref].

Parameters:

  • data (str) \u2013

    The data to evaluate.

  • index (int) \u2013

    The starting position.

  • text (str) \u2013

    The text to use when no identifier.

Returns:

  • tuple[str | None, int, bool] \u2013

    A tuple containing the identifier, its end position, and whether it matched.

Source code in src/mkdocs_autorefs/references.py
def evalId(self, data: str, index: int, text: str) -> tuple[str | None, int, bool]:  # noqa: N802 (parent's casing)\n    \"\"\"Evaluate the id portion of `[ref][id]`.\n\n    If `[ref][]` use `[ref]`.\n\n    Arguments:\n        data: The data to evaluate.\n        index: The starting position.\n        text: The text to use when no identifier.\n\n    Returns:\n        A tuple containing the identifier, its end position, and whether it matched.\n    \"\"\"\n    m = self.RE_LINK.match(data, pos=index)\n    if not m:\n        return None, index, False\n\n    identifier = m.group(1)\n    if not identifier:\n        identifier = text\n        # Allow the entire content to be one placeholder, with the intent of catching things like [`Foo`][].\n        # It doesn't catch [*Foo*][] though, just due to the priority order.\n        # https://github.com/Python-Markdown/markdown/blob/1858c1b601ead62ed49646ae0d99298f41b1a271/markdown/inlinepatterns.py#L78\n        if match := INLINE_PLACEHOLDER_RE.fullmatch(identifier):\n            stashed_nodes: dict[str, Element | str] = self.md.treeprocessors[\"inline\"].stashed_nodes  # type: ignore[attr-defined]\n            el = stashed_nodes.get(match[1])\n            if isinstance(el, Element) and el.tag == \"code\":\n                identifier = \"\".join(el.itertext())\n                # Special case: allow pymdownx.inlinehilite raw <code> snippets but strip them back to unhighlighted.\n                if match := HTML_PLACEHOLDER_RE.fullmatch(identifier):\n                    stash_index = int(match.group(1))\n                    html = self.md.htmlStash.rawHtmlBlocks[stash_index]\n                    identifier = markupsafe.Markup(html).striptags()\n                    self.md.htmlStash.rawHtmlBlocks[stash_index] = escape(identifier)\n\n    end = m.end(0)\n    return identifier, end, True\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutoRefInlineProcessor.handleMatch","title":"handleMatch","text":"
handleMatch(\n    m: Match[str], data: str\n) -> tuple[Element | None, int | None, int | None]\n

Handle an element that matched.

Parameters:

  • m (Match[str]) \u2013

    The match object.

  • data (str) \u2013

    The matched data.

Returns:

  • tuple[Element | None, int | None, int | None] \u2013

    A new element or a tuple.

Source code in src/mkdocs_autorefs/references.py
def handleMatch(self, m: Match[str], data: str) -> tuple[Element | None, int | None, int | None]:  # type: ignore[override]  # noqa: N802\n    \"\"\"Handle an element that matched.\n\n    Arguments:\n        m: The match object.\n        data: The matched data.\n\n    Returns:\n        A new element or a tuple.\n    \"\"\"\n    text, index, handled = self.getText(data, m.end(0))\n    if not handled:\n        return None, None, None\n\n    identifier, end, handled = self.evalId(data, index, text)\n    if not handled or identifier is None:\n        return None, None, None\n\n    if re.search(r\"[/ \\x00-\\x1f]\", identifier):\n        # Do nothing if the matched reference contains:\n        # - a space, slash or control character (considered unintended);\n        # - specifically \\x01 is used by Python-Markdown HTML stash when there's inline formatting,\n        #   but references with Markdown formatting are not possible anyway.\n        return None, m.start(0), end\n\n    return self._make_tag(identifier, text), m.start(0), end\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutorefsExtension","title":"AutorefsExtension","text":"
AutorefsExtension(\n    plugin: AutorefsPlugin | None = None, **kwargs: Any\n)\n

Bases: Extension

Extension that inserts auto-references in Markdown.

Parameters:

  • plugin (AutorefsPlugin | None, default: None ) \u2013

    An optional reference to the autorefs plugin (to pass it to the anchor scanner tree processor).

  • **kwargs (Any, default: {} ) \u2013

    Keyword arguments passed to the base constructor.

Methods:

  • extendMarkdown \u2013

    Register the extension.

Source code in src/mkdocs_autorefs/references.py
def __init__(\n    self,\n    plugin: AutorefsPlugin | None = None,\n    **kwargs: Any,\n) -> None:\n    \"\"\"Initialize the Markdown extension.\n\n    Parameters:\n        plugin: An optional reference to the autorefs plugin (to pass it to the anchor scanner tree processor).\n        **kwargs: Keyword arguments passed to the [base constructor][markdown.extensions.Extension].\n    \"\"\"\n    super().__init__(**kwargs)\n    self.plugin = plugin\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.AutorefsExtension.extendMarkdown","title":"extendMarkdown","text":"
extendMarkdown(md: Markdown) -> None\n

Register the extension.

Add an instance of our AutoRefInlineProcessor to the Markdown parser. Also optionally add an instance of our AnchorScannerTreeProcessor to the Markdown parser if a reference to the autorefs plugin was passed to this extension.

Parameters:

  • md (Markdown) \u2013

    A markdown.Markdown instance.

Source code in src/mkdocs_autorefs/references.py
def extendMarkdown(self, md: Markdown) -> None:  # noqa: N802 (casing: parent method's name)\n    \"\"\"Register the extension.\n\n    Add an instance of our [`AutoRefInlineProcessor`][mkdocs_autorefs.references.AutoRefInlineProcessor] to the Markdown parser.\n    Also optionally add an instance of our [`AnchorScannerTreeProcessor`][mkdocs_autorefs.references.AnchorScannerTreeProcessor]\n    to the Markdown parser if a reference to the autorefs plugin was passed to this extension.\n\n    Arguments:\n        md: A `markdown.Markdown` instance.\n    \"\"\"\n    md.inlinePatterns.register(\n        AutoRefInlineProcessor(md),\n        \"mkdocs-autorefs\",\n        priority=168,  # Right after markdown.inlinepatterns.ReferenceInlineProcessor\n    )\n    if self.plugin is not None and self.plugin.scan_toc and \"attr_list\" in md.treeprocessors:\n        log.debug(\"Enabling Markdown anchors feature\")\n        md.treeprocessors.register(\n            AnchorScannerTreeProcessor(self.plugin, md),\n            \"mkdocs-autorefs-anchors-scanner\",\n            priority=0,\n        )\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.fix_ref","title":"fix_ref","text":"
fix_ref(\n    url_mapper: Callable[[str], str], unmapped: list[str]\n) -> Callable\n

Return a repl function for re.sub.

In our context, we match Markdown references and replace them with HTML links.

When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer unmapped list. It generally means the user is trying to cross-reference an object that was not collected and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.

Parameters:

  • url_mapper (Callable[[str], str]) \u2013

    A callable that gets an object's site URL by its identifier, such as mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url.

  • unmapped (list[str]) \u2013

    A list to store unmapped identifiers.

Returns:

  • Callable \u2013

    The actual function accepting a Match object

  • Callable \u2013

    and returning the replacement strings.

Source code in src/mkdocs_autorefs/references.py
def fix_ref(url_mapper: Callable[[str], str], unmapped: list[str]) -> Callable:\n    \"\"\"Return a `repl` function for [`re.sub`](https://docs.python.org/3/library/re.html#re.sub).\n\n    In our context, we match Markdown references and replace them with HTML links.\n\n    When the matched reference's identifier was not mapped to an URL, we append the identifier to the outer\n    `unmapped` list. It generally means the user is trying to cross-reference an object that was not collected\n    and rendered, making it impossible to link to it. We catch this exception in the caller to issue a warning.\n\n    Arguments:\n        url_mapper: A callable that gets an object's site URL by its identifier,\n            such as [mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url][].\n        unmapped: A list to store unmapped identifiers.\n\n    Returns:\n        The actual function accepting a [`Match` object](https://docs.python.org/3/library/re.html#match-objects)\n        and returning the replacement strings.\n    \"\"\"\n\n    def inner(match: Match) -> str:\n        identifier = match[\"identifier\"].strip('\"')\n        title = match[\"title\"]\n        kind = match[\"kind\"]\n        attrs = match[\"attrs\"] or \"\"\n        classes = (match[\"class\"] or \"\").strip('\"').split()\n\n        try:\n            url = url_mapper(unescape(identifier))\n        except KeyError:\n            if kind == \"autorefs-optional\":\n                return title\n            if kind == \"autorefs-optional-hover\":\n                return f'<span title=\"{identifier}\">{title}</span>'\n            unmapped.append(identifier)\n            if title == identifier:\n                return f\"[{identifier}][]\"\n            return f\"[{title}][{identifier}]\"\n\n        parsed = urlsplit(url)\n        external = parsed.scheme or parsed.netloc\n        classes = [\"autorefs\", \"autorefs-external\" if external else \"autorefs-internal\", *classes]\n        class_attr = \" \".join(classes)\n        if kind == \"autorefs-optional-hover\":\n            return f'<a class=\"{class_attr}\" title=\"{identifier}\" href=\"{escape(url)}\"{attrs}>{title}</a>'\n        return f'<a class=\"{class_attr}\" href=\"{escape(url)}\"{attrs}>{title}</a>'\n\n    return inner\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.fix_refs","title":"fix_refs","text":"
fix_refs(\n    html: str, url_mapper: Callable[[str], str]\n) -> tuple[str, list[str]]\n

Fix all references in the given HTML text.

Parameters:

  • html (str) \u2013

    The text to fix.

  • url_mapper (Callable[[str], str]) \u2013

    A callable that gets an object's site URL by its identifier, such as mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url.

Returns:

  • tuple[str, list[str]] \u2013

    The fixed HTML.

Source code in src/mkdocs_autorefs/references.py
def fix_refs(html: str, url_mapper: Callable[[str], str]) -> tuple[str, list[str]]:\n    \"\"\"Fix all references in the given HTML text.\n\n    Arguments:\n        html: The text to fix.\n        url_mapper: A callable that gets an object's site URL by its identifier,\n            such as [mkdocs_autorefs.plugin.AutorefsPlugin.get_item_url][].\n\n    Returns:\n        The fixed HTML.\n    \"\"\"\n    unmapped: list[str] = []\n    html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)\n    return html, unmapped\n
"},{"location":"reference/mkdocs_autorefs/references/#mkdocs_autorefs.references.relative_url","title":"relative_url","text":"
relative_url(url_a: str, url_b: str) -> str\n

Compute the relative path from URL A to URL B.

Parameters:

  • url_a (str) \u2013

    URL A.

  • url_b (str) \u2013

    URL B.

Returns:

  • str \u2013

    The relative URL to go from A to B.

Source code in src/mkdocs_autorefs/references.py
def relative_url(url_a: str, url_b: str) -> str:\n    \"\"\"Compute the relative path from URL A to URL B.\n\n    Arguments:\n        url_a: URL A.\n        url_b: URL B.\n\n    Returns:\n        The relative URL to go from A to B.\n    \"\"\"\n    parts_a = url_a.split(\"/\")\n    url_b, anchor = url_b.split(\"#\", 1)\n    parts_b = url_b.split(\"/\")\n\n    # remove common left parts\n    while parts_a and parts_b and parts_a[0] == parts_b[0]:\n        parts_a.pop(0)\n        parts_b.pop(0)\n\n    # go up as many times as remaining a parts' depth\n    levels = len(parts_a) - 1\n    parts_relative = [\"..\"] * levels + parts_b\n    relative = \"/\".join(parts_relative)\n    return f\"{relative}#{anchor}\"\n
"},{"location":"coverage/","title":"Coverage report","text":""}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index ba434a1..bb441a5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,52 +2,62 @@ https://mkdocstrings.github.io/autorefs/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/changelog/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/code_of_conduct/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/contributing/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/credits/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/license/ - 2023-08-02 + 2024-02-27 + daily + + + https://mkdocstrings.github.io/autorefs/reference/SUMMARY/ + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/reference/mkdocs_autorefs/ - 2023-08-02 + 2024-02-27 + daily + + + https://mkdocstrings.github.io/autorefs/reference/mkdocs_autorefs/debug/ + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/reference/mkdocs_autorefs/plugin/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/reference/mkdocs_autorefs/references/ - 2023-08-02 + 2024-02-27 daily https://mkdocstrings.github.io/autorefs/coverage/ - 2023-08-02 + 2024-02-27 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 31aae8103a0d3a52030739d49c82ef0ac6f3e816..6217944e01c6accc46a58e2d9a0b90918469ae37 100644 GIT binary patch literal 319 zcmV-F0l@wriwFpM?cHSp|8r?{Wo=<_E_iKh0M(W~Z^IxEhWGpm%X^G#RqBTvqAuOC zw9U}Ta^Q?nG3Rp7wEw<1jv_CeDpiGnkGq%SISC!q+t0ydAK*x%-Q-tAnP*@HN^R99 z-@iPrZ}Tl*)xjA8pGC2yP2PJy-ZOSQ9t+YQhIXU^onj>VxFB{mva-0#`6`QT3NX)3 ztu`q56oq1#;Z33-@8XeEDDC@jC^WJ*cy!PatJ$PpZf?mBD0x*@*Xy!cS2s~|wk>3$ zZ>@sP!8@0&HeWScSY|4A!TJs09M+&p02L)P*fj#J48o@XY@_oKd=w-=>p*Isz?C&x zfF=03hIFQ0?WKERVfcg~Nj%rkHjm2vuC40=pA&a&ISXVczElROO zp%`X(Qz$9;_#`oHLO)%ZLEcUQJ#@rtzNq(?TM7dzQI*w0QJ#vjijvK@lgYky8afZ} zLbb+z)qLk!srVi1H-Kwci#h>RRM248NOWqFAq8L;53f^*f&^$iC=(J$S!*OXg8vU1 w2k@~X!KQ4|DGNWNk9N|=rTl~YNebl|V}EP)A0+#2ihWXi11H<|*;fYu01dp1k^lez