diff --git a/assets/js/swup.js b/assets/js/swup.js index f31556140..38c53e8c0 100644 --- a/assets/js/swup.js +++ b/assets/js/swup.js @@ -21,16 +21,32 @@ const maybeMetaRedirect = (visit, {page}) => { window.addEventListener('DOMContentLoaded', emitExdocLoaded) +// Match links to local .html documentation pages, with or without a fragment. +// Routing non-HTML files (downloads such as .mmd) through SWUP breaks the page +// swap (#2182); the `.html#` branch keeps in-doc anchored links (function +// references like file.html#list_dir/1, sidebar entries) on the SWUP path. +export const LINK_SELECTOR = 'a[href]:not([href^="/"]):not([href^="http"]):is([href$=".html"], [href*=".html#"])' + +// SWUP only swaps `#main`, so it must stay within a single ExDoc build: the +// sidebar (navigation + version) is built from per-build scripts SWUP +// does not re-run. ExDoc writes every page of a build as a flat file in one +// folder, so an in-build link is a bare filename and a slash in its path means +// another folder/build (the Erlang/OTP docs flatten one build per application). +// We test the path -- the part before the fragment -- not the whole href, since +// anchors carry slashes too (the arity in file.html#list_dir/1). +export const isWithinBuild = (href) => !href.split('#')[0].includes('/') + if (!isEmbedded && window.location.protocol !== 'file:') { new Swup({ animationSelector: false, containers: ['#main'], - ignoreVisit: (url) => { + ignoreVisit: (url, {el} = {}) => { const path = url.split('#')[0] return path === window.location.pathname || - path === window.location.pathname + '.html' + path === window.location.pathname + '.html' || + !isWithinBuild(el?.getAttribute('href') ?? '') }, - linkSelector: 'a[href]:not([href^="/"]):not([href^="http"])[href$=".html"]', + linkSelector: LINK_SELECTOR, hooks: { 'page:load': maybeMetaRedirect, 'page:view': emitExdocLoaded diff --git a/assets/test/swup.spec.js b/assets/test/swup.spec.js new file mode 100644 index 000000000..22d041e99 --- /dev/null +++ b/assets/test/swup.spec.js @@ -0,0 +1,42 @@ +import { el } from '../js/helpers' +import { LINK_SELECTOR, isWithinBuild } from '../js/swup' + +const linkMatches = (href) => el('a', {href}).matches(LINK_SELECTOR) + +describe('swup', () => { + describe('LINK_SELECTOR', () => { + it('matches local .html pages, with or without an anchor', () => { + expect(linkMatches('Foo.html')).toBe(true) + expect(linkMatches('Foo.Bar.html')).toBe(true) + expect(linkMatches('file.html#section')).toBe(true) + // Anchors carry slashes (name/arity); the selector must still match them. + expect(linkMatches('file.html#list_dir/1')).toBe(true) + }) + + it('ignores non-HTML files (#2182), absolute and external links', () => { + expect(linkMatches('ecto_erd.mmd')).toBe(false) + expect(linkMatches('image.png')).toBe(false) + expect(linkMatches('/Foo.html')).toBe(false) + expect(linkMatches('http://example.com/Foo.html')).toBe(false) + expect(linkMatches('https://example.com/Foo.html')).toBe(false) + }) + + it('does not match bare same-page anchors (scrolled natively, no SWUP)', () => { + expect(linkMatches('#section')).toBe(false) + }) + }) + + describe('isWithinBuild', () => { + it('is true for a same-folder link (bare filename)', () => { + expect(isWithinBuild('Foo.html')).toBe(true) + expect(isWithinBuild('file.html#section')).toBe(true) + // A slash in the fragment (name/arity) does not leave the build. + expect(isWithinBuild('file.html#list_dir/1')).toBe(true) + }) + + it('is false for a link into another folder/build', () => { + expect(isWithinBuild('apps/kernel/file.html')).toBe(false) + expect(isWithinBuild('../stdlib/lists.html#foo/1')).toBe(false) + }) + }) +}) diff --git a/formatters/html/dist/html-LPAJHUKL.js b/formatters/html/dist/html-7UTFL6NI.js similarity index 96% rename from formatters/html/dist/html-LPAJHUKL.js rename to formatters/html/dist/html-7UTFL6NI.js index 2a94d6024..630ff503e 100644 --- a/formatters/html/dist/html-LPAJHUKL.js +++ b/formatters/html/dist/html-7UTFL6NI.js @@ -1,9 +1,9 @@ -(()=>{var _s=Object.create;var jn=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Ts=Object.getOwnPropertyNames;var Ps=Object.getPrototypeOf,Os=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var As=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ts(t))!Os.call(e,i)&&i!==n&&jn(e,i,{get:()=>t[i],enumerable:!(r=Ls(t,i))||r.enumerable});return e};var Y=(e,t,n)=>(n=e!=null?_s(Ps(e)):{},As(t||!e||!e.__esModule?jn(n,"default",{value:e,enumerable:!0}):n,e));var fr=_((mc,hr)=>{var dr="Expected a function",ur=NaN,Ds="[object Symbol]",Bs=/^\s+|\s+$/g,Qs=/^[-+]0x[0-9a-f]+$/i,qs=/^0b[01]+$/i,Fs=/^0o[0-7]+$/i,Vs=parseInt,$s=typeof global=="object"&&global&&global.Object===Object&&global,Us=typeof self=="object"&&self&&self.Object===Object&&self,js=$s||Us||Function("return this")(),Ws=Object.prototype,zs=Ws.toString,Gs=Math.max,Ks=Math.min,Ht=function(){return js.Date.now()};function Ys(e,t,n){var r,i,s,o,a,l,u=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(dr);t=cr(t)||0,$e(n)&&(c=!!n.leading,d="maxWait"in n,s=d?Gs(cr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function p(S){var I=r,$=i;return r=i=void 0,u=S,o=e.apply($,I),o}function g(S){return u=S,a=setTimeout(w,t),c?p(S):o}function m(S){var I=S-l,$=S-u,ee=t-I;return d?Ks(ee,s-$):ee}function v(S){var I=S-l,$=S-u;return l===void 0||I>=t||I<0||d&&$>=s}function w(){var S=Ht();if(v(S))return x(S);a=setTimeout(w,m(S))}function x(S){return a=void 0,h&&r?p(S):(r=i=void 0,o)}function P(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function Q(){return a===void 0?o:x(Ht())}function V(){var S=Ht(),I=v(S);if(r=arguments,i=this,l=S,I){if(a===void 0)return g(l);if(d)return a=setTimeout(w,t),p(l)}return a===void 0&&(a=setTimeout(w,t)),o}return V.cancel=P,V.flush=Q,V}function Js(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(dr);return $e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ys(e,t,{leading:r,maxWait:t,trailing:i})}function $e(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Xs(e){return!!e&&typeof e=="object"}function Zs(e){return typeof e=="symbol"||Xs(e)&&zs.call(e)==Ds}function cr(e){if(typeof e=="number")return e;if(Zs(e))return ur;if($e(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$e(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Bs,"");var n=qs.test(e);return n||Fs.test(e)?Vs(e.slice(2),n?2:8):Qs.test(e)?ur:+e}hr.exports=Js});var q=_(H=>{"use strict";H.__esModule=!0;H.extend=Lr;H.indexOf=fo;H.escapeExpression=po;H.isEmpty=mo;H.createFrame=go;H.blockParams=vo;H.appendContextPath=yo;var lo={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},uo=/[&<>"'`=]/g,co=/[&<>"'`=]/;function ho(e){return lo[e]}function Lr(e){for(var t=1;t{"use strict";ze.__esModule=!0;var zt=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Gt(e,t){var n=t&&t.loc,r=void 0,i=void 0,s=void 0,o=void 0;n&&(r=n.start.line,i=n.end.line,s=n.start.column,o=n.end.column,e+=" - "+r+":"+s);for(var a=Error.prototype.constructor.call(this,e),l=0;l{"use strict";Ge.__esModule=!0;var Kt=q();Ge.default=function(e){e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse,i=n.fn;if(t===!0)return i(this);if(t===!1||t==null)return r(this);if(Kt.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):r(this);if(n.data&&n.ids){var s=Kt.createFrame(n.data);s.contextPath=Kt.appendContextPath(n.data.contextPath,n.name),n={data:s}}return i(t,n)})};Or.exports=Ge.default});var Cr=_((Ke,Ir)=>{"use strict";Ke.__esModule=!0;function wo(e){return e&&e.__esModule?e:{default:e}}var be=q(),bo=X(),Eo=wo(bo);Ke.default=function(e){e.registerHelper("each",function(t,n){if(!n)throw new Eo.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,s=0,o="",a=void 0,l=void 0;n.data&&n.ids&&(l=be.appendContextPath(n.data.contextPath,n.ids[0])+"."),be.isFunction(t)&&(t=t.call(this)),n.data&&(a=be.createFrame(n.data));function u(g,m,v){a&&(a.key=g,a.index=m,a.first=m===0,a.last=!!v,l&&(a.contextPath=l+g)),o=o+r(t[g],{data:a,blockParams:be.blockParams([t[g],g],[l+g,null])})}if(t&&typeof t=="object")if(be.isArray(t))for(var c=t.length;s{"use strict";Ye.__esModule=!0;function xo(e){return e&&e.__esModule?e:{default:e}}var ko=X(),So=xo(ko);Ye.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new So.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Rr.exports=Ye.default});var Br=_((Je,Dr)=>{"use strict";Je.__esModule=!0;function _o(e){return e&&e.__esModule?e:{default:e}}var Nr=q(),Lo=X(),Hr=_o(Lo);Je.default=function(e){e.registerHelper("if",function(t,n){if(arguments.length!=2)throw new Hr.default("#if requires exactly one argument");return Nr.isFunction(t)&&(t=t.call(this)),!n.hash.includeZero&&!t||Nr.isEmpty(t)?n.inverse(this):n.fn(this)}),e.registerHelper("unless",function(t,n){if(arguments.length!=2)throw new Hr.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};Dr.exports=Je.default});var qr=_((Xe,Qr)=>{"use strict";Xe.__esModule=!0;Xe.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r{"use strict";Ze.__esModule=!0;Ze.default=function(e){e.registerHelper("lookup",function(t,n,r){return t&&r.lookupProperty(t,n)})};Fr.exports=Ze.default});var Ur=_((et,$r)=>{"use strict";et.__esModule=!0;function To(e){return e&&e.__esModule?e:{default:e}}var Ee=q(),Po=X(),Oo=To(Po);et.default=function(e){e.registerHelper("with",function(t,n){if(arguments.length!=2)throw new Oo.default("#with requires exactly one argument");Ee.isFunction(t)&&(t=t.call(this));var r=n.fn;if(Ee.isEmpty(t))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=Ee.createFrame(n.data),i.contextPath=Ee.appendContextPath(n.data.contextPath,n.ids[0])),r(t,{data:i,blockParams:Ee.blockParams([t],[i&&i.contextPath])})})};$r.exports=et.default});var Yt=_(tt=>{"use strict";tt.__esModule=!0;tt.registerDefaultHelpers=Uo;tt.moveHelperToHooks=jo;function se(e){return e&&e.__esModule?e:{default:e}}var Ao=Ar(),Io=se(Ao),Co=Cr(),Ro=se(Co),Mo=Mr(),No=se(Mo),Ho=Br(),Do=se(Ho),Bo=qr(),Qo=se(Bo),qo=Vr(),Fo=se(qo),Vo=Ur(),$o=se(Vo);function Uo(e){Io.default(e),Ro.default(e),No.default(e),Do.default(e),Qo.default(e),Fo.default(e),$o.default(e)}function jo(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])}});var Wr=_((nt,jr)=>{"use strict";nt.__esModule=!0;var Wo=q();nt.default=function(e){e.registerDecorator("inline",function(t,n,r,i){var s=t;return n.partials||(n.partials={},s=function(o,a){var l=r.partials;r.partials=Wo.extend({},l,n.partials);var u=t(o,a);return r.partials=l,u}),n.partials[i.args[0]]=i.fn,s})};jr.exports=nt.default});var zr=_(Jt=>{"use strict";Jt.__esModule=!0;Jt.registerDefaultDecorators=Yo;function zo(e){return e&&e.__esModule?e:{default:e}}var Go=Wr(),Ko=zo(Go);function Yo(e){Ko.default(e)}});var Xt=_((rt,Gr)=>{"use strict";rt.__esModule=!0;var Jo=q(),fe={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var n=Jo.indexOf(fe.methodMap,t.toLowerCase());n>=0?t=n:t=parseInt(t,10)}return t},log:function(t){if(t=fe.lookupLevel(t),typeof console<"u"&&fe.lookupLevel(fe.level)<=t){var n=fe.methodMap[t];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s{"use strict";Zt.__esModule=!0;Zt.createNewLookupObject=Zo;var Xo=q();function Zo(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";xe.__esModule=!0;xe.createProtoAccessControl=ra;xe.resultIsAllowed=ia;xe.resetLoggedProperties=oa;function ea(e){return e&&e.__esModule?e:{default:e}}var Yr=Kr(),ta=Xt(),na=ea(ta),it=Object.create(null);function ra(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=Object.create(null);return n.__proto__=!1,{properties:{whitelist:Yr.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Yr.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function ia(e,t,n){return Jr(typeof e=="function"?t.methods:t.properties,n)}function Jr(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(sa(t),!1)}function sa(e){it[e]!==!0&&(it[e]=!0,na.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent. +(()=>{var _s=Object.create;var jn=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Ts=Object.getOwnPropertyNames;var Ps=Object.getPrototypeOf,Os=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var As=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ts(t))!Os.call(e,i)&&i!==n&&jn(e,i,{get:()=>t[i],enumerable:!(r=Ls(t,i))||r.enumerable});return e};var Y=(e,t,n)=>(n=e!=null?_s(Ps(e)):{},As(t||!e||!e.__esModule?jn(n,"default",{value:e,enumerable:!0}):n,e));var fr=_((vc,hr)=>{var dr="Expected a function",ur=NaN,Ds="[object Symbol]",Bs=/^\s+|\s+$/g,Qs=/^[-+]0x[0-9a-f]+$/i,qs=/^0b[01]+$/i,Fs=/^0o[0-7]+$/i,Vs=parseInt,$s=typeof global=="object"&&global&&global.Object===Object&&global,Us=typeof self=="object"&&self&&self.Object===Object&&self,js=$s||Us||Function("return this")(),Ws=Object.prototype,zs=Ws.toString,Gs=Math.max,Ks=Math.min,Ht=function(){return js.Date.now()};function Ys(e,t,n){var r,i,s,o,a,l,u=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(dr);t=cr(t)||0,$e(n)&&(c=!!n.leading,d="maxWait"in n,s=d?Gs(cr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function p(k){var I=r,$=i;return r=i=void 0,u=k,o=e.apply($,I),o}function g(k){return u=k,a=setTimeout(w,t),c?p(k):o}function m(k){var I=k-l,$=k-u,ee=t-I;return d?Ks(ee,s-$):ee}function v(k){var I=k-l,$=k-u;return l===void 0||I>=t||I<0||d&&$>=s}function w(){var k=Ht();if(v(k))return x(k);a=setTimeout(w,m(k))}function x(k){return a=void 0,h&&r?p(k):(r=i=void 0,o)}function P(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function Q(){return a===void 0?o:x(Ht())}function V(){var k=Ht(),I=v(k);if(r=arguments,i=this,l=k,I){if(a===void 0)return g(l);if(d)return a=setTimeout(w,t),p(l)}return a===void 0&&(a=setTimeout(w,t)),o}return V.cancel=P,V.flush=Q,V}function Js(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(dr);return $e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ys(e,t,{leading:r,maxWait:t,trailing:i})}function $e(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Xs(e){return!!e&&typeof e=="object"}function Zs(e){return typeof e=="symbol"||Xs(e)&&zs.call(e)==Ds}function cr(e){if(typeof e=="number")return e;if(Zs(e))return ur;if($e(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$e(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Bs,"");var n=qs.test(e);return n||Fs.test(e)?Vs(e.slice(2),n?2:8):Qs.test(e)?ur:+e}hr.exports=Js});var q=_(H=>{"use strict";H.__esModule=!0;H.extend=Lr;H.indexOf=fo;H.escapeExpression=po;H.isEmpty=mo;H.createFrame=go;H.blockParams=vo;H.appendContextPath=yo;var lo={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},uo=/[&<>"'`=]/g,co=/[&<>"'`=]/;function ho(e){return lo[e]}function Lr(e){for(var t=1;t{"use strict";ze.__esModule=!0;var zt=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Gt(e,t){var n=t&&t.loc,r=void 0,i=void 0,s=void 0,o=void 0;n&&(r=n.start.line,i=n.end.line,s=n.start.column,o=n.end.column,e+=" - "+r+":"+s);for(var a=Error.prototype.constructor.call(this,e),l=0;l{"use strict";Ge.__esModule=!0;var Kt=q();Ge.default=function(e){e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse,i=n.fn;if(t===!0)return i(this);if(t===!1||t==null)return r(this);if(Kt.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):r(this);if(n.data&&n.ids){var s=Kt.createFrame(n.data);s.contextPath=Kt.appendContextPath(n.data.contextPath,n.name),n={data:s}}return i(t,n)})};Or.exports=Ge.default});var Cr=_((Ke,Ir)=>{"use strict";Ke.__esModule=!0;function wo(e){return e&&e.__esModule?e:{default:e}}var be=q(),bo=X(),Eo=wo(bo);Ke.default=function(e){e.registerHelper("each",function(t,n){if(!n)throw new Eo.default("Must pass iterator to #each");var r=n.fn,i=n.inverse,s=0,o="",a=void 0,l=void 0;n.data&&n.ids&&(l=be.appendContextPath(n.data.contextPath,n.ids[0])+"."),be.isFunction(t)&&(t=t.call(this)),n.data&&(a=be.createFrame(n.data));function u(g,m,v){a&&(a.key=g,a.index=m,a.first=m===0,a.last=!!v,l&&(a.contextPath=l+g)),o=o+r(t[g],{data:a,blockParams:be.blockParams([t[g],g],[l+g,null])})}if(t&&typeof t=="object")if(be.isArray(t))for(var c=t.length;s{"use strict";Ye.__esModule=!0;function xo(e){return e&&e.__esModule?e:{default:e}}var So=X(),ko=xo(So);Ye.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new ko.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Rr.exports=Ye.default});var Br=_((Je,Dr)=>{"use strict";Je.__esModule=!0;function _o(e){return e&&e.__esModule?e:{default:e}}var Nr=q(),Lo=X(),Hr=_o(Lo);Je.default=function(e){e.registerHelper("if",function(t,n){if(arguments.length!=2)throw new Hr.default("#if requires exactly one argument");return Nr.isFunction(t)&&(t=t.call(this)),!n.hash.includeZero&&!t||Nr.isEmpty(t)?n.inverse(this):n.fn(this)}),e.registerHelper("unless",function(t,n){if(arguments.length!=2)throw new Hr.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})};Dr.exports=Je.default});var qr=_((Xe,Qr)=>{"use strict";Xe.__esModule=!0;Xe.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r{"use strict";Ze.__esModule=!0;Ze.default=function(e){e.registerHelper("lookup",function(t,n,r){return t&&r.lookupProperty(t,n)})};Fr.exports=Ze.default});var Ur=_((et,$r)=>{"use strict";et.__esModule=!0;function To(e){return e&&e.__esModule?e:{default:e}}var Ee=q(),Po=X(),Oo=To(Po);et.default=function(e){e.registerHelper("with",function(t,n){if(arguments.length!=2)throw new Oo.default("#with requires exactly one argument");Ee.isFunction(t)&&(t=t.call(this));var r=n.fn;if(Ee.isEmpty(t))return n.inverse(this);var i=n.data;return n.data&&n.ids&&(i=Ee.createFrame(n.data),i.contextPath=Ee.appendContextPath(n.data.contextPath,n.ids[0])),r(t,{data:i,blockParams:Ee.blockParams([t],[i&&i.contextPath])})})};$r.exports=et.default});var Yt=_(tt=>{"use strict";tt.__esModule=!0;tt.registerDefaultHelpers=Uo;tt.moveHelperToHooks=jo;function se(e){return e&&e.__esModule?e:{default:e}}var Ao=Ar(),Io=se(Ao),Co=Cr(),Ro=se(Co),Mo=Mr(),No=se(Mo),Ho=Br(),Do=se(Ho),Bo=qr(),Qo=se(Bo),qo=Vr(),Fo=se(qo),Vo=Ur(),$o=se(Vo);function Uo(e){Io.default(e),Ro.default(e),No.default(e),Do.default(e),Qo.default(e),Fo.default(e),$o.default(e)}function jo(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])}});var Wr=_((nt,jr)=>{"use strict";nt.__esModule=!0;var Wo=q();nt.default=function(e){e.registerDecorator("inline",function(t,n,r,i){var s=t;return n.partials||(n.partials={},s=function(o,a){var l=r.partials;r.partials=Wo.extend({},l,n.partials);var u=t(o,a);return r.partials=l,u}),n.partials[i.args[0]]=i.fn,s})};jr.exports=nt.default});var zr=_(Jt=>{"use strict";Jt.__esModule=!0;Jt.registerDefaultDecorators=Yo;function zo(e){return e&&e.__esModule?e:{default:e}}var Go=Wr(),Ko=zo(Go);function Yo(e){Ko.default(e)}});var Xt=_((rt,Gr)=>{"use strict";rt.__esModule=!0;var Jo=q(),fe={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var n=Jo.indexOf(fe.methodMap,t.toLowerCase());n>=0?t=n:t=parseInt(t,10)}return t},log:function(t){if(t=fe.lookupLevel(t),typeof console<"u"&&fe.lookupLevel(fe.level)<=t){var n=fe.methodMap[t];console[n]||(n="log");for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s{"use strict";Zt.__esModule=!0;Zt.createNewLookupObject=Zo;var Xo=q();function Zo(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";xe.__esModule=!0;xe.createProtoAccessControl=ra;xe.resultIsAllowed=ia;xe.resetLoggedProperties=oa;function ea(e){return e&&e.__esModule?e:{default:e}}var Yr=Kr(),ta=Xt(),na=ea(ta),it=Object.create(null);function ra(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=Object.create(null);return n.__proto__=!1,{properties:{whitelist:Yr.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Yr.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function ia(e,t,n){return Jr(typeof e=="function"?t.methods:t.properties,n)}function Jr(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(sa(t),!1)}function sa(e){it[e]!==!0&&(it[e]=!0,na.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: -See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function oa(){Object.keys(it).forEach(function(e){delete it[e]})}});var sn=_(U=>{"use strict";U.__esModule=!0;U.HandlebarsEnvironment=rn;function Xr(e){return e&&e.__esModule?e:{default:e}}var oe=q(),aa=X(),tn=Xr(aa),la=Yt(),ua=zr(),ca=Xt(),st=Xr(ca),da=en(),ha="4.7.8";U.VERSION=ha;var fa=8;U.COMPILER_REVISION=fa;var pa=7;U.LAST_COMPATIBLE_COMPILER_REVISION=pa;var ma={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};U.REVISION_CHANGES=ma;var nn="[object Object]";function rn(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},la.registerDefaultHelpers(this),ua.registerDefaultDecorators(this)}rn.prototype={constructor:rn,logger:st.default,log:st.default.log,registerHelper:function(t,n){if(oe.toString.call(t)===nn){if(n)throw new tn.default("Arg not supported with multiple helpers");oe.extend(this.helpers,t)}else this.helpers[t]=n},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,n){if(oe.toString.call(t)===nn)oe.extend(this.partials,t);else{if(typeof n>"u")throw new tn.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=n}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,n){if(oe.toString.call(t)===nn){if(n)throw new tn.default("Arg not supported with multiple decorators");oe.extend(this.decorators,t)}else this.decorators[t]=n},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){da.resetLoggedProperties()}};var ga=st.default.log;U.log=ga;U.createFrame=oe.createFrame;U.logger=st.default});var ei=_((ot,Zr)=>{"use strict";ot.__esModule=!0;function on(e){this.string=e}on.prototype.toString=on.prototype.toHTML=function(){return""+this.string};ot.default=on;Zr.exports=ot.default});var ti=_(an=>{"use strict";an.__esModule=!0;an.wrapHelper=va;function va(e,t){if(typeof e!="function")return e;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return n}});var oi=_(Z=>{"use strict";Z.__esModule=!0;Z.checkRevision=ka;Z.template=Sa;Z.wrapProgram=at;Z.resolvePartial=_a;Z.invokePartial=La;Z.noop=ii;function ya(e){return e&&e.__esModule?e:{default:e}}function wa(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var ba=q(),z=wa(ba),Ea=X(),G=ya(Ea),K=sn(),ni=Yt(),xa=ti(),ri=en();function ka(e){var t=e&&e[0]||1,n=K.COMPILER_REVISION;if(!(t>=K.LAST_COMPATIBLE_COMPILER_REVISION&&t<=K.COMPILER_REVISION))if(t{"use strict";U.__esModule=!0;U.HandlebarsEnvironment=rn;function Xr(e){return e&&e.__esModule?e:{default:e}}var oe=q(),aa=X(),tn=Xr(aa),la=Yt(),ua=zr(),ca=Xt(),st=Xr(ca),da=en(),ha="4.7.8";U.VERSION=ha;var fa=8;U.COMPILER_REVISION=fa;var pa=7;U.LAST_COMPATIBLE_COMPILER_REVISION=pa;var ma={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};U.REVISION_CHANGES=ma;var nn="[object Object]";function rn(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},la.registerDefaultHelpers(this),ua.registerDefaultDecorators(this)}rn.prototype={constructor:rn,logger:st.default,log:st.default.log,registerHelper:function(t,n){if(oe.toString.call(t)===nn){if(n)throw new tn.default("Arg not supported with multiple helpers");oe.extend(this.helpers,t)}else this.helpers[t]=n},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,n){if(oe.toString.call(t)===nn)oe.extend(this.partials,t);else{if(typeof n>"u")throw new tn.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=n}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,n){if(oe.toString.call(t)===nn){if(n)throw new tn.default("Arg not supported with multiple decorators");oe.extend(this.decorators,t)}else this.decorators[t]=n},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){da.resetLoggedProperties()}};var ga=st.default.log;U.log=ga;U.createFrame=oe.createFrame;U.logger=st.default});var ei=_((ot,Zr)=>{"use strict";ot.__esModule=!0;function on(e){this.string=e}on.prototype.toString=on.prototype.toHTML=function(){return""+this.string};ot.default=on;Zr.exports=ot.default});var ti=_(an=>{"use strict";an.__esModule=!0;an.wrapHelper=va;function va(e,t){if(typeof e!="function")return e;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return n}});var oi=_(Z=>{"use strict";Z.__esModule=!0;Z.checkRevision=Sa;Z.template=ka;Z.wrapProgram=at;Z.resolvePartial=_a;Z.invokePartial=La;Z.noop=ii;function ya(e){return e&&e.__esModule?e:{default:e}}function wa(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var ba=q(),z=wa(ba),Ea=X(),G=ya(Ea),K=sn(),ni=Yt(),xa=ti(),ri=en();function Sa(e){var t=e&&e[0]||1,n=K.COMPILER_REVISION;if(!(t>=K.LAST_COMPATIBLE_COMPILER_REVISION&&t<=K.COMPILER_REVISION))if(t{"use strict";lt.__esModule=!0;lt.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};ai.exports=lt.default});var fi=_((ut,hi)=>{"use strict";ut.__esModule=!0;function un(e){return e&&e.__esModule?e:{default:e}}function cn(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var Aa=sn(),ui=cn(Aa),Ia=ei(),Ca=un(Ia),Ra=X(),Ma=un(Ra),Na=q(),ln=cn(Na),Ha=oi(),ci=cn(Ha),Da=li(),Ba=un(Da);function di(){var e=new ui.HandlebarsEnvironment;return ln.extend(e,ui),e.SafeString=Ca.default,e.Exception=Ma.default,e.Utils=ln,e.escapeExpression=ln.escapeExpression,e.VM=ci,e.template=function(t){return ci.template(t,e)},e}var ke=di();ke.create=di;Ba.default(ke);ke.default=ke;ut.default=ke;hi.exports=ut.default});var ae=_((Rc,pi)=>{pi.exports=fi().default});var Ui=_((Vi,$i)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=(function(t){return function(n){t.console&&console.warn&&console.warn(n)}})(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),r=Object.keys(t),i=0;i0){var c=e.utils.clone(n)||{};c.position=[a,u],c.index=s.length,s.push(new e.Token(r.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(r){var i=e.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,r=0;r1&&(ot&&(r=s),o!=t);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?c+=2:a==l&&(n+=r[u+1]*i[c+1],u+=2,c+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new e.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c=s.str.charAt(0),d=s.str.charAt(1),h;d in s.node.edges?h=s.node.edges[d]:(h=new e.TokenSet,s.node.edges[d]=h),s.str.length==1&&(h.final=!0),i.push({node:h,editsRemaining:s.editsRemaining-1,str:c+s.str.slice(2)})}}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,s=t.length;i=t;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var r=new e.QueryParser(t,n);r.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var r=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}if(s.type===e.QueryLexer.TERM)return e.QueryParser.parseTerm;var i="expecting term, found '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var r=t.peekLexeme();if(r==null){t.nextClause();return}switch(r.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},(function(t,n){typeof define=="function"&&define.amd?define(n):typeof Vi=="object"?$i.exports=n():t.lunr=n()})(this,function(){return e})})()});var ie={plain:"plain",function:"function",module:"module"},Is=[{href:"typespecs.html#basic-types",hint:{kind:ie.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:ie.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:ie.plain,description:"Built-in type"}}],Me={cancelHintFetching:null};function Wn(e){if(Gn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function zn(e){let t=Gn(e);return t?Promise.resolve(t):Cs(e)}function Gn(e){let t=Is.find(n=>e.includes(n.href));return t?t.hint:null}function Cs(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,r)=>{let i=document.createElement("iframe");i.setAttribute("src",t),i.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Me.cancelHintFetching=()=>{o(),r(new Error("cancelled"))};function o(){i.remove(),window.removeEventListener("message",s),Me.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(i)})}function Kn(){Me.cancelHintFetching&&Me.cancelHintFetching()}function Yn(e){let n=e.querySelector("h1").textContent,r=e.querySelector(".docstring > p"),i=r?r.innerHTML:"";return{kind:ie.function,title:n.trim(),description:i.trim()}}function Jn(e){let n=e.querySelector("h1 > span").textContent,r=e.querySelector("#moduledoc p"),i=r?r.innerHTML:"";return{kind:ie.module,title:n.trim(),description:i.trim()}}var f=document.querySelector.bind(document),A=document.querySelectorAll.bind(document);function Xn(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function He(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function De(){return document.getElementById("main").dataset.type}var Ne=["H1","H2","H3","H4","H5","H6"];function Zn(e=!1){let t=window.location.hash.replace(/^#/,"");if(!t)return e?document.getElementById("top-content"):null;let n=document.getElementById(t);if(!n)return null;if(n.matches(".detail"))return n;if(Ne.includes(n.tagName))return Tt(n);let r=Rs(n);return r||document.getElementById("top-content")}function Rs(e){let t=e.previousElementSibling;for(;t;){if(Ne.includes(t.tagName))return Tt(t);t=t.previousElementSibling}let n=e.parentNode;for(;n;){for(t=n.previousElementSibling;t;){if(Ne.includes(t.tagName))return Tt(t);t=t.previousElementSibling}n=n.parentNode}return null}function Tt(e){let t=document.createElement("div"),n=[e],r=e;for(;(r=r.nextSibling)&&!(Ne.includes(r.tagName)&&r.tagName<=e.tagName);)n.push(r);return t.append(...n),t}function er(e){return new URLSearchParams(window.location.search).get(e)}function Pt(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function he(e){return!e||e.trim()===""}function tr(e,t){let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{n=null,e(...i)},t)}}function Be(){return document.head.querySelector("meta[name=project][content]").content}function Qe(){return document.documentElement.classList.contains("apple-os")}function E(e,t,n){let r=document.createElement(e);for(let i in t)t[i]!=null&&r.setAttribute(i,t[i]);return n&&r.replaceChildren(...n),r}var Ms=new URLSearchParams(window.location.search),Ns=window.self!==window.parent,Ot=Ns&&Ms.has("hint"),C=Ot;function qe(){return window.sidebarNodes||{}}function nr(){return window.versionNodes||[]}if(Ot&&C){let e=Zn(),t=e?Yn(e):["modules","tasks"].includes(De())?Jn(f(".content-inner")):null;if(t){let n={hint:{...t,version:Be()},href:window.location.href};window.parent.postMessage(n,"*")}f(".content-inner")?.replaceChildren()}var At="ex_doc:settings",rr="dark",It="system",Ct="dark",Rt="light";var Hs={tooltips:!0,theme:null,livebookUrl:null},Mt=class{constructor(){this._subscribers=[],this._settings=Hs,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(r=>r(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(At);if(t){let n=JSON.parse(t);this._settings={...this._settings,...n}}this._loadSettingsLegacy()}catch(t){console.error(`Failed to load settings: ${t}`)}}_storeSettings(){try{this._storeSettingsLegacy(),localStorage.setItem(At,JSON.stringify(this._settings))}catch(t){console.error(`Failed to persist settings: ${t}`)}}_loadSettingsLegacy(){localStorage.getItem("tooltipsDisabled")!==null&&(this._settings={...this._settings,tooltips:!1}),localStorage.getItem("night-mode")==="true"&&(this._settings={...this._settings,nightMode:!0}),this._settings.nightMode===!0&&(this._settings={...this._settings,theme:"dark"})}_storeSettingsLegacy(){this._settings.tooltips?localStorage.removeItem("tooltipsDisabled"):localStorage.setItem("tooltipsDisabled","true"),this._settings.nightMode!==null?localStorage.setItem("night-mode",this._settings.nightMode===!0?"true":"false"):localStorage.removeItem("night-mode"),this._settings.theme!==null?(localStorage.setItem("night-mode",this._settings.theme==="dark"?"true":"false"),this._settings.nightMode=this._settings.theme==="dark"):(delete this._settings.nightMode,localStorage.removeItem("night-mode"))}},R=new Mt;var ir=!1,Fe=null,J=null;function Ve(e){ir||(ir=!0,J=document.getElementById("toast"),J?.addEventListener("click",()=>{clearTimeout(Fe),J.classList.remove("show")})),J&&(clearTimeout(Fe),J.innerText=e,J.classList.add("show"),Fe=setTimeout(()=>{J.classList.remove("show"),Fe=setTimeout(function(){J.innerText=""},1e3)},5e3))}var Nt=[It,Ct,Rt],sr=window.matchMedia("(prefers-color-scheme: dark)");R.getAndSubscribe(or);sr.addEventListener("change",or);function or(){let e=lr(),t=e===Ct||e!==Rt&&sr.matches;document.body.classList.toggle(rr,t)}function ar(){let e=Nt[Nt.indexOf(lr())+1]||Nt[0];R.update({theme:e}),Ve(`Set theme to "${e}"`)}function lr(){return new URLSearchParams(window.location.search).get("theme")||R.get().theme||It}var Er=Y(fr());var Dt="sidebar_state",Bt="closed",pr="open",mr="sidebar_width";var Ue="sidebar-open",je="sidebar-transition";var gr=!1;function vr(){if(gr)return;gr=!0;let e=document.getElementById("sidebar-list-nav");if(!e)return;let t=De(),n={extras:e.dataset.extras,modules:"Modules",tasks:'Mix Tasks'};Object.entries(n).forEach(([r,i])=>{let s=qe()[r];if(!s?.length)return;let o=`${r}-list-tab-button`,a=`${r}-tab-panel`,l=r===t,u=E("button",{id:o,role:"tab",tabindex:l?0:-1,"aria-selected":l||void 0,"aria-controls":a});u.innerHTML=i,u.addEventListener("keydown",no),u.addEventListener("click",ro),e.appendChild(E("li",{},[u]));let c=E("ul",{class:"full-list"});c.addEventListener("click",io);let d=E("div",{id:a,class:"sidebar-tabpanel",role:"tabpanel","aria-labelledby":o,hidden:l?void 0:""},[c]);document.getElementById("sidebar").appendChild(d);let h="",p,g;c.replaceChildren(...s.flatMap(m=>{let v=[],w=Array.isArray(m.headers),x=w?void 0:"no",P=m?.url||`${m.id}.html`;return m.group!==h&&(v.push(E("li",{class:"group",translate:x},[m.group])),h=m.group,p=void 0),m.nested_context&&m.nested_context!==p?(p=m.nested_context,g!==p&&v.push(E("li",{class:"nesting-context",translate:"no","aria-hidden":!0},[p]))):g=m.title,v.push(E("li",{},[E("a",{href:P,translate:x,...m.url?{rel:"nofollow"}:{}},[m.nested_title||m.title,m.url?E("i",{class:"external-link ri-external-link-line"}):null].filter(Boolean)),...qt(`node-${m.id}-headers`,w?eo(m):to(m))])),v}))}),Qt(),requestAnimationFrame(yr),window.addEventListener("hashchange",Qt),window.addEventListener("exdoc:loaded",Qt)}function qt(e,t){return t.length?[E("button",{"aria-label":"expand","aria-expanded":!1,"aria-controls":e}),E("ul",{id:e},t)]:[]}function eo(e){return e.headers.map(({id:t,anchor:n})=>E("li",{},[E("a",{href:`${e.id}.html#${n}`},[t])]))}function to(e){let t=[];return e.sections?.length&&t.push(E("li",{},[E("a",{href:`${e.id}.html#content`},["Sections"]),...qt(`${e.id}-sections-list`,e.sections.map(({id:n,anchor:r})=>E("li",{},[E("a",{href:`${e.id}.html#${r}`},[n])])))])),e.nodeGroups&&(t.push(E("li",{},[E("a",{href:`${e.id}.html#summary`},["Summary"])])),t.push(...e.nodeGroups.map(({key:n,name:r,nodes:i})=>E("li",{},[E("a",{href:`${e.id}.html#${n}`},[r]),...qt(`node-${e.id}-group-${n}-list`,i.map(({anchor:s,title:o,id:a})=>E("li",{},[E("a",{href:`${e.id}.html#${s}`,title:o,translate:"no"},[a])])))])))),t}function Ft(e){let t=document.getElementById("sidebar-list-nav").querySelector("[aria-selected]");t!==e&&(t&&(t.removeAttribute("aria-selected"),t.setAttribute("tabindex","-1"),document.getElementById(t.getAttribute("aria-controls")).setAttribute("hidden","hidden")),e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0"),document.getElementById(e.getAttribute("aria-controls")).removeAttribute("hidden"))}function yr(){f("#sidebar [role=tabpanel]:not([hidden]) a[aria-selected]")?.scrollIntoView()}function Qt(){let e=document.getElementById("sidebar"),{pathname:t,hash:n}=window.location,r=t.split("/").pop().replace(/\.html$/,"")+".html",i=e.querySelector(`li a[href="${r+n}"]`)||e.querySelector(`li a[href="${r}"]`);if(!i)return;e.querySelectorAll(".full-list a[aria-selected]").forEach(o=>{o.removeAttribute("aria-selected")}),e.querySelectorAll(".full-list button[aria-expanded=true]").forEach(o=>{o.setAttribute("aria-expanded",!1)});let s=i.parentElement;for(;s;){if(s.tagName==="LI"){let o=s.firstChild;o.setAttribute("aria-selected",o.getAttribute("href")===r?"page":"true");let a=o.nextSibling;a?.tagName==="BUTTON"&&a.setAttribute("aria-expanded",!0)}else if(s.role==="tabpanel"){s.hasAttribute("hidden")&&Ft(document.getElementById(s.getAttribute("aria-labelledby")));break}s=s.parentElement}}function no(e){if(!["ArrowRight","ArrowLeft"].includes(e.key))return;let t=Array.from(A('#sidebar-list-nav [role="tab"]')),r=t.indexOf(e.currentTarget)+(e.key==="ArrowRight"?1:-1),i=t.at(r%t.length);Ft(i),i.focus()}function ro(e){Ft(e.currentTarget),yr()}function io(e){let t=e.target;t.tagName==="BUTTON"&&t.setAttribute("aria-expanded",t.getAttribute("aria-expanded")==="false")}var oo=300,xr=".sidebar-toggle",Vt=window.matchMedia(`screen and (max-width: ${768}px)`);if(!C){window.addEventListener("exdoc:loaded",wr);let e=document.getElementById("sidebar"),t=f(xr);t.addEventListener("click",We),document.body.addEventListener("click",i=>{Vt.matches&&$t()&&!e.contains(i.target)&&!t.contains(i.target)&&We()});let n=window.innerWidth;window.addEventListener("resize",(0,Er.default)(()=>{n!==window.innerWidth&&(n=window.innerWidth,wr())},100));let r=new ResizeObserver(([i])=>{if(!i)return;let s=i.contentRect.width;sessionStorage.setItem(mr,s),document.body.style.setProperty("--sidebarWidth",`${s}px`)});e.addEventListener("mousedown",()=>r.observe(e)),e.addEventListener("mouseup",()=>r.unobserve(e)),window.addEventListener("hashchange",ao)}function wr(){let t=sessionStorage.getItem(Dt)!==Bt&&!Vt.matches;Sr(t)}function We(){let e=!$t();return sessionStorage.setItem(Dt,e?pr:Bt),Ut(e)}function $t(){return document.body.classList.contains(Ue)}function kr(){return document.body.classList.contains(Ue)&&!document.body.classList.contains(je)}function Sr(e){e&&vr(),document.body.classList.toggle(Ue,e),f(xr).setAttribute("aria-expanded",e?"true":"false")}var br;function Ut(e){return new Promise(t=>{document.body.classList.add(je),document.body.scrollTop,Sr(e),clearTimeout(br),br=setTimeout(()=>{document.body.classList.remove(je),t()},oo)})}function _r(){return Ut(!0)}function ao(){Vt.matches&&$t()&&Ut(!1)}var mi=Y(ae());var dn=Y(ae());dn.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});dn.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});var gi=mi.template({1:function(e,t,n,r,i){var s,o,a=t??(e.nullContext||{}),l=e.hooks.helperMissing,u="function",c=e.escapeExpression,d=e.lookupProperty||function(h,p){if(Object.prototype.hasOwnProperty.call(h,p))return h[p]};return'