From 1a5a3c9da1c3a8065b15259113db8e9adbb80956 Mon Sep 17 00:00:00 2001 From: josevalim Date: Thu, 31 Oct 2024 18:42:03 +0000 Subject: [PATCH] Update assets --- formatters/html/dist/{html-7JWBSJEW.js => html-PVRIOB7F.js} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename formatters/html/dist/{html-7JWBSJEW.js => html-PVRIOB7F.js} (80%) diff --git a/formatters/html/dist/html-7JWBSJEW.js b/formatters/html/dist/html-PVRIOB7F.js similarity index 80% rename from formatters/html/dist/html-7JWBSJEW.js rename to formatters/html/dist/html-PVRIOB7F.js index 66ab9c077..178fef279 100644 --- a/formatters/html/dist/html-7JWBSJEW.js +++ b/formatters/html/dist/html-PVRIOB7F.js @@ -1,5 +1,5 @@ (()=>{var ri=Object.create;var pt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var oi=Object.getOwnPropertyNames;var ai=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var li=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of oi(t))!ci.call(e,r)&&r!==n&&pt(e,r,{get:()=>t[r],enumerable:!(i=si(t,r))||i.enumerable});return e};var mt=(e,t,n)=>(n=e!=null?ri(ai(e)):{},li(t||!e||!e.__esModule?pt(n,"default",{value:e,enumerable:!0}):n,e));var At=ht((uo,Ct)=>{var It="Expected a function",_t=NaN,Ii="[object Symbol]",Ci=/^\s+|\s+$/g,Ai=/^[-+]0x[0-9a-f]+$/i,Pi=/^0b[01]+$/i,Ri=/^0o[0-7]+$/i,Ni=parseInt,Qi=typeof global=="object"&&global&&global.Object===Object&&global,Hi=typeof self=="object"&&self&&self.Object===Object&&self,Fi=Qi||Hi||Function("return this")(),Di=Object.prototype,Mi=Di.toString,Bi=Math.max,zi=Math.min,Fe=function(){return Fi.Date.now()};function $i(e,t,n){var i,r,s,o,a,l,u=0,f=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(It);t=Ot(t)||0,ve(n)&&(f=!!n.leading,y="maxWait"in n,s=y?Bi(Ot(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g);function L(S){var C=i,D=r;return i=r=void 0,u=S,o=e.apply(D,C),o}function b(S){return u=S,a=setTimeout(h,t),f?L(S):o}function T(S){var C=S-l,D=S-u,q=t-C;return y?zi(q,s-D):q}function m(S){var C=S-l,D=S-u;return l===void 0||C>=t||C<0||y&&D>=s}function h(){var S=Fe();if(m(S))return k(S);a=setTimeout(h,T(S))}function k(S){return a=void 0,g&&i?L(S):(i=r=void 0,o)}function w(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function Q(){return a===void 0?o:k(Fe())}function F(){var S=Fe(),C=m(S);if(i=arguments,r=this,l=S,C){if(a===void 0)return b(l);if(y)return a=setTimeout(h,t),L(l)}return a===void 0&&(a=setTimeout(h,t)),o}return F.cancel=w,F.flush=Q,F}function Vi(e,t,n){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(It);return ve(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),$i(e,t,{leading:i,maxWait:t,trailing:r})}function ve(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qi(e){return!!e&&typeof e=="object"}function ji(e){return typeof e=="symbol"||qi(e)&&Mi.call(e)==Ii}function Ot(e){if(typeof e=="number")return e;if(ji(e))return _t;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ci,"");var n=Pi.test(e);return n||Ri.test(e)?Ni(e.slice(2),n?2:8):Ai.test(e)?_t:+e}Ct.exports=Vi});var mn=ht((pn,hn)=>{(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),i=Object.keys(t),r=0;r0){var f=e.utils.clone(n)||{};f.position=[a,u],f.index=s.length,s.push(new e.Token(i.slice(a,o),f))}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(i){var r=e.Pipeline.registeredFunctions[i];if(r)n.add(r);else throw new Error("Cannot load unregistered function: "+i)}),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 i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i=i+1,this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,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,i=0;i1&&(ot&&(i=s),o!=t);)r=i-n,s=n+Math.floor(r/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=i[u+1]*r[f+1],u+=2,f+=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,i=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),r.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),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.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),r.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),y=s.str.charAt(1),g;y in s.node.edges?g=s.node.edges[y]:(g=new e.TokenSet,s.node.edges[y]=g),s.str.length==1&&(g.final=!0),r.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,i=n,r=0,s=t.length;r=t;n--){var i=this.uncheckedNodes[n],r=i.child.toString();r in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[r]:(i.child._str=r,this.minimizedNodes[r]=i.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 i=new e.QueryParser(t,n);i.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),i=Object.create(null),r=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 i=t[this._ref],r=Object.keys(this._fields);this._documents[i]=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 i="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(i+=" with value '"+n.str+"'"),new e.QueryParseError(i,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 i="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(i,n.start,n.end)}var r=t.peekLexeme();if(r==null){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var i=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),r="unrecognised field '"+n.str+"', possible fields: "+i;throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var r="expecting term, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term, found '"+s.type+"'";throw new e.QueryParseError(r,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 i=t.peekLexeme();if(i==null){t.nextClause();return}switch(i.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 r="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="edit distance must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.editDistance=i;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 r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="boost must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.boost=i;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 r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof pn=="object"?hn.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let i=t||"";if(e.group!==i)return delete e.nestedContext,e.group=i,n.fn(this)});Handlebars.registerHelper("nestingChanged",function(e,t,n){if(t.nested_context&&t.nested_context!==e.nestedContext){if(e.nestedContext=t.nested_context,e.lastModuleSeenInGroup!==t.nested_context)return n.fn(this)}else e.lastModuleSeenInGroup=t.title});Handlebars.registerHelper("showSections",function(e,t){if(e.sections.length>0)return t.fn(this)});Handlebars.registerHelper("showSummary",function(e,t){if(e.nodeGroups)return t.fn(this)});Handlebars.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isEmptyArray",function(e,t){return Array.isArray(e)&&e.length===0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isLocal",function(e,t){let n=window.location.pathname.split("/").pop();return n===e+".html"||n===e?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),_=document.querySelectorAll.bind(document);function gt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function me(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function $(){return document.body.dataset.type}function yt(e,t){if(e){for(let n of e){let i=n.nodeGroups&&n.nodeGroups.find(r=>r.nodes.some(s=>s.anchor===t));if(i)return i.key}return null}}function ge(e,t=!1){if(!e)return t?document.getElementById("top-content"):null;let n=document.getElementById(e);return n?n.matches(".detail")?n:["h1","h2","h3","h4","h5","h6"].includes(n.tagName.toLowerCase())?ui(n):null:null}function ui(e){let t=[e],n=e.nextElementSibling,i=e.tagName.toLowerCase();for(;n;){let s=n.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6"].includes(s)&&s<=i?n=null:(t.push(n),n=n.nextElementSibling)}let r=document.createElement("div");return r.append(...t),r}function te(){return window.location.hash.replace(/^#/,"")}function vt(e){return new URLSearchParams(window.location.search).get(e)}function bt(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function St(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function ne(e){return!e||e.trim()===""}function xt(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function ye(){return document.head.querySelector("meta[name=project][content]").content}function ie(){return/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)}var di="content",fi="tabs-open",pi="tabs-close",hi="H3",mi="tabset";function Lt(){gi().map(yi).forEach(n=>Si(n))}function gi(){let e=document.createNodeIterator(document.getElementById(di),NodeFilter.SHOW_COMMENT,{acceptNode(i){return i.nodeValue.trim()===fi?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function yi(e,t,n){let i=[],r=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(vi(e)){Et(s,r,t);break}i.push(e),e.nodeName===hi?(Et(s,r,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=mi,bi(i,o),o.innerHTML=Handlebars.templates.tabset({tabs:r}),o}function vi(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===pi}function Et(e,t,n){if(e.label===""&&!e.content.length)return!1;let i=e.label,r=e.content;t.push({label:i,content:r,setIndex:n})}function bi(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Si(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,i)=>{n.addEventListener("click",r=>{G(i,t)}),n.addEventListener("keydown",r=>{let s=t.tabs.length-1;r.code==="ArrowLeft"?(r.preventDefault(),t.activeIndex===0?G(s,t):G(t.activeIndex-1,t)):r.code==="ArrowRight"?(r.preventDefault(),t.activeIndex===s?G(0,t):G(t.activeIndex+1,t)):r.code==="Home"?(r.preventDefault(),G(0,t)):r.code==="End"&&(r.preventDefault(),G(s,t))})})}function G(e,t){t.tabs[t.activeIndex].setAttribute("aria-selected","false"),t.tabs[t.activeIndex].tabIndex=-1,t.tabs[e].setAttribute("aria-selected","true"),t.tabs[e].tabIndex=0,t.tabs[e].focus(),t.panels[t.activeIndex].setAttribute("hidden",""),t.panels[t.activeIndex].tabIndex=-1,t.panels[e].removeAttribute("hidden"),t.panels[e].tabIndex=0,t.activeIndex=e}var Tt="ex_doc:settings",xi={tooltips:!0,theme:null,livebookUrl:null},He=class{constructor(){this._subscribers=[],this._settings=xi,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(i=>i(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(Tt);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(Tt,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"))}},O=new He;var Ei=".content",wt=".content-inner",Li=".livebook-badge";function kt(e){e||wi(),ki(),Ti()}function Ti(){c(Ei).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function wi(){c(wt).setAttribute("tabindex",-1),c(wt).focus()}function ki(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(i=>{let r=i.livebookUrl?Oi(i.livebookUrl,n):_i(n);for(let s of _(Li))s.href=r})}function _i(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function Oi(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}var Rt=mt(At());var Ui=768,De=300,re=".sidebar-toggle",Wi=".content",M={CLOSED:"closed",OPEN:"open",NO_PREF:"no_pref"},N={opened:"sidebar-opened",openingStart:"sidebar-opening-start",opening:"sidebar-opening",closed:"sidebar-closed",closingStart:"sidebar-closing-start",closing:"sidebar-closing"},Gi=Object.values(N),A={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:M.NO_PREF};function Nt(){Qt(),Ki(),Yi()}function Ki(){let e=sessionStorage.getItem("sidebar_width");e&&Pt(e),new ResizeObserver(n=>{for(let i of n)Pt(i.contentRect.width)}).observe(document.getElementById("sidebar"))}function Pt(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function Qt(){sessionStorage.getItem("sidebar_state")==="closed"||Ht()?(V(N.closed),c(re).setAttribute("aria-expanded","false")):(V(N.opened),c(re).setAttribute("aria-expanded","true")),setTimeout(()=>c(re).classList.add("sidebar-toggle--animated"),De)}function Ht(){return window.matchMedia(`screen and (max-width: ${Ui}px)`).matches}function V(...e){document.body.classList.remove(...Gi),document.body.classList.add(...e)}function Yi(){c(re).addEventListener("click",e=>{Me(),Zi()}),c(Wi).addEventListener("click",e=>{Xi()}),window.addEventListener("resize",(0,Rt.default)(e=>{Ji()},100))}function Me(){return Be()?Dt():ze()}function Be(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function Ft(){return document.body.classList.contains(N.opened)}function ze(){return Mt(),sessionStorage.setItem("sidebar_state","opened"),c(re).setAttribute("aria-expanded","true"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.openingStart),requestAnimationFrame(()=>{V(N.opening),A.togglingTimeout=setTimeout(()=>{V(N.opened),e()},De)})})})}function Dt(){return Mt(),sessionStorage.setItem("sidebar_state","closed"),c(re).setAttribute("aria-expanded","false"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.closingStart),requestAnimationFrame(()=>{V(N.closing),A.togglingTimeout=setTimeout(()=>{V(N.closed),e()},De)})})})}function Mt(){A.togglingTimeout&&(clearTimeout(A.togglingTimeout),A.togglingTimeout=null)}function Ji(){A.lastWindowWidth!==window.innerWidth&&(A.lastWindowWidth=window.innerWidth,(A.sidebarPreference===M.OPEN||A.sidebarPreference===M.NO_PREF)&&Qt())}function Xi(){Ht()&&Be()&&Dt()}function Zi(){switch(A.sidebarPreference){case M.OPEN:A.sidebarPreference=M.CLOSED;break;case M.CLOSED:A.sidebarPreference=M.OPEN;break;case M.NO_PREF:Be()?A.sidebarPreference=M.OPEN:A.sidebarPreference=M.CLOSED}}function le(){return window.sidebarNodes||{}}function Bt(){return window.versionNodes||[]}var $e={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Ve=[$e.extras,$e.modules,$e.tasks],Se=e=>`#${e}-full-list`;function zt(){Ve.forEach(e=>{er(le(),e)}),be($()),Vt(),$t(),ar()}function er(e,t){let n=e[t]||[],i=c(Se(t));if(!i)return;let r=Handlebars.templates["sidebar-items"]({nodes:n,group:""});i.innerHTML=r,i.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),i.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");nr(l)})}),i.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=i.querySelector(".current-section");u&&rr(u),s.matches(".expand")&&(s.pathname===window.location.pathname||s.pathname===window.location.pathname+".html")&&qe(l)})})}function qe(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function tr(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function nr(e){e.classList.contains("open")?tr(e):qe(e)}function ir(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function rr(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function sr(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function or(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function be(e){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let i=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),i.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),i.setAttribute("hidden","hidden"))}})}function $t(){let e=c(Se($()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function Vt(){let e=te()||"content",n=le()[$()]||[],i=yt(n,e),r=c(Se($()));if(!r)return;let s=r.querySelector(`li.current-page a.expand[href$="#${i}"]`);s&&qe(s.closest("li"));let o=r.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&ir(a.closest("li")),sr(o.closest("li"))}}function ar(){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",i=>{be(t),$t()})});let e=c("#sidebar-listNav");e.addEventListener("keydown",t=>{if(t.key!=="ArrowRight"&&t.key!=="ArrowLeft")return;let n=Array.from(e.querySelectorAll('[role="tab"]')).map(r=>r.dataset.type),i=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let r=n.indexOf(i)+1;r>=n.length&&(r=0);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let r=n.indexOf(i)-1;r<0&&(r=n.length-1);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(Se($()));if(!n)return;let i=n.querySelector("li.current-page li.current-hash");i&&or(i),Vt()})}var B={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function jt(e,t=8){if(ne(e))return[];let n=le(),i=[...je(n.modules,e,B.module,"module"),...cr(n.modules,e,B.moduleChild),...je(n.tasks,e,B.mixTask,"mix task"),...je(n.extras,e,B.extra,"page"),...Ue(n.modules,e,B.section,"module"),...Ue(n.tasks,e,B.section,"mix task"),...Ue(n.extras,e,B.section,"page")].filter(r=>r!==null);return mr(i).slice(0,t)}function je(e,t,n,i){return e.map(r=>ur(r,t,n,i))}function cr(e,t,n){return e.filter(i=>i.nodeGroups).flatMap(i=>i.nodeGroups.flatMap(({key:r,nodes:s})=>{let o=hr(r);return s.map(a=>dr(a,i.id,t,n,o)||pr(a,i.id,t,n,o))}))}function Ue(e,t,n,i){return e.flatMap(r=>lr(r).map(s=>fr(r,s,t,n,i)))}function lr(e){return(e.sections||[]).concat(e.headers||[])}function ur(e,t,n,i){return Ee(e.title,t)?{link:`${e.id}.html`,title:we(e.title,t),description:null,matchQuality:Le(e.title,t),deprecated:e.deprecated,labels:[i],category:n}:null}function dr(e,t,n,i,r){return Ee(e.id,n)?{link:`${t}.html#${e.anchor}`,title:we(e.id,n),labels:[r],description:t,matchQuality:Le(e.id,n),deprecated:e.deprecated,category:i}:null}function fr(e,t,n,i,r){return Ut(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:we(t.id,n),description:e.title,matchQuality:Le(t.id,n),labels:[r,"section"],category:i}:null}function pr(e,t,n,i,r){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Ee(s,n))a=s,l=/\./g;else if(Ee(o,n))a=o,l=/:/g;else return null;let u=n.replace(l," ");return Ut(e.id,u)?{link:`${t}.html#${e.anchor}`,title:we(e.id,u),label:r,description:t,matchQuality:Le(a,n),deprecated:e.deprecated,category:i}:null}function hr(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function mr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:qt(t.category)-qt(n.category))}function qt(e){switch(e){case B.module:return 1;case B.moduleChild:return 2;case B.mixTask:return 3;default:return 4}}function Ut(e,t){return Te(t).some(i=>Wt(e,i))}function Ee(e,t){return Te(t).every(i=>Wt(e,i))}function Wt(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Le(e,t){let n=Te(t),r=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=gr(e,n[0])?1:0;return r+s}function gr(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Te(e){return e.trim().split(/\s+/)}function we(e,t){let n=Te(t).sort((i,r)=>r.length-i.length);return xe(e,n)}function xe(e,t){if(t.length===0)return e;let[n,...i]=t,r=e.match(new RegExp(`(.*)(${gt(n)})(.*)`,"i"));if(r){let[,s,o,a]=r;return xe(s,t)+""+me(o)+""+xe(a,t)}else return xe(e,i)}var ke=null,K=null;function Gt(){K=document.getElementById("toast"),K.addEventListener("click",e=>{clearTimeout(ke),e.target.classList.remove("show")})}function We(e){K&&(clearTimeout(ke),K.innerText=e,K.classList.add("show"),ke=setTimeout(()=>{K.classList.remove("show"),ke=setTimeout(function(){K.innerText=""},1e3)},5e3))}var Kt="dark",Ge=["system","dark","light"];function Yt(e){O.getAndSubscribe(t=>{document.body.classList.toggle(Kt,Xt(e||t.theme))}),vr()}function Jt(){let e=Ge[Ge.indexOf(Ke())+1]||Ge[0];O.update({theme:e}),We(`Set theme to "${e}"`)}function Ke(){return O.get().theme||"system"}function Xt(e){return e==="dark"||yr()&&(e==null||e==="system")}function yr(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function vr(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get().theme,n=Xt(t);(t==null||t==="system")&&(document.body.classList.toggle(Kt,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var se=".autocomplete",Oe=".autocomplete-suggestions",_e=".autocomplete-suggestion",I={autocompleteSuggestions:[],previewOpen:!1,selectedIdx:-1};function br(){c(se).classList.add("shown")}function Ye(){c(se).classList.remove("shown")}function Zt(){return c(se).classList.contains("shown")}function Je(e){I.autocompleteSuggestions=jt(e),I.selectedIdx=-1,ne(e)?Ye():(Sr({term:e,suggestions:I.autocompleteSuggestions}),Ie(0),br())}function Sr({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),i=c(se);i.innerHTML=n}function en(){return I.selectedIdx===-1?null:I.autocompleteSuggestions[I.selectedIdx]}function Ie(e){nn(xr(e))}function tn(e){if(e.data.type==="preview"){let{contentHeight:t}=e.data,n=c(".autocomplete-preview");n&&(n.style.height=`${t+32}px`,n.classList.remove("loading"))}}function nn(e){I.selectedIdx=e;let t=c(Oe),n=c(`${_e}.selected`),i=c(`${_e}[data-index="${I.selectedIdx}"]`);if(n&&n.classList.remove("selected"),i){if(I.previewOpen){sn(),window.addEventListener("message",tn),t.classList.add("previewing");let r=document.createElement("div");r.classList.add("autocomplete-preview"),r.classList.add("loading");let s=i.href.replace(".html",`.html?preview=true&theme=${Ke()}`),o=document.createElement("iframe");o.setAttribute("src",s),r.appendChild(document.createElement("div")),r.appendChild(document.createElement("span")),r.appendChild(o),i.parentNode.insertBefore(r,i.nextSibling)}i.classList.add("selected"),i.scrollIntoView({block:"nearest"})}else t&&(t.scrollTop=0)}function rn(){I.previewOpen?Ce():Xe()}function Ce(){I.previewOpen=!1;let e=c(Oe);e&&e.classList.remove("previewing"),sn()}function Xe(e){I.previewOpen=!0,e?e=e.closest(_e):e=c(`${_e}[data-index="${I.selectedIdx}"]`),e&&nn(parseInt(e.dataset.index))}function sn(){let e=c(".autocomplete-preview");e&&(e.remove(),window.removeEventListener("message",tn))}function xr(e){let t=I.autocompleteSuggestions.length+1;return(I.selectedIdx+e+1+t)%t-1}var ue="form.search-bar input",Er="form.search-bar .search-close-button";function cn(){Lr(),window.onTogglePreviewClick=function(e,t){e.preventDefault(),e.stopImmediatePropagation(),et(),t?Xe(e.target):Ce()}}function ln(e){let t=c(ue);t.value=e}function et(){let e=c(ue);document.body.classList.add("search-focused"),e.focus()}function Lr(){let e=c(ue);if(document.querySelector('meta[name="exdoc:autocomplete"][content="off"]'))return e.addEventListener("keydown",t=>{t.key==="Enter"&&on(t)}),!0;e.addEventListener("keydown",t=>{let n=ie();t.key==="Escape"?(Ae(),e.blur()):t.key==="Enter"?on(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(Ie(-1),t.preventDefault()):t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n"?(Ie(1),t.preventDefault()):t.key==="Tab"&&(rn(),t.preventDefault())}),e.addEventListener("input",t=>{Je(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.contains("search-focused")||(document.body.classList.add("search-focused"),Je(t.target.value))}),e.addEventListener("blur",t=>{let n=t.relatedTarget,i=c(Oe);if(n&&i&&i.contains(n))return setTimeout(()=>{Zt()&&e.focus()},1e3),null;Pe()}),c(se).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ae(),Pe())}),c(Er).addEventListener("click",t=>{Ae(),Pe()})}function on(e){let t=c(ue),n=e.shiftKey||e.ctrlKey,i=en();e.preventDefault();let r=n?"_blank":"_self",s=document.createElement("a");if(s.setAttribute("target",r),i)s.setAttribute("href",i.link);else{let o=document.querySelector('meta[name="exdoc:full-text-search-url"]'),a=o?o.getAttribute("content"):"search.html?q=";s.setAttribute("href",`${a}${encodeURIComponent(t.value)}`)}s.click(),n||(Ae(),Pe())}function Ae(){let e=c(ue);e.value=""}function Pe(){Ce(),document.body.classList.remove("search-focused"),Ye()}var Ze=window.scrollY,Tr=70,an=-2;window.addEventListener("scroll",function(){let e=window.scrollY;e===0||Ze-eTr?document.body.classList.remove("scroll-sticky"):Ze-e>Math.abs(an)&&document.body.classList.add("scroll-sticky"),Ze=e<=0?0:e},!1);var un=".sidebar-projectVersion",dn=".sidebar-projectVersionsDropdown";function fn(){let e=Bt();if(e.length>0){let n=c(un).textContent.trim(),i=kr(e,n);wr({nodes:i})}}function wr({nodes:e}){let t=c(un),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(dn).addEventListener("change",Or)}function kr(e,t){return _r(e,t).map(i=>({...i,isCurrentVersion:i.version===t}))}function _r(e,t){return e.some(i=>i.version===t)?e:[{version:t,url:"#"},...e]}function Or(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,i=`${t}/${n}`;bt(i).then(r=>{r?window.location.href=i:window.location.href=t})}function tt(){let e=c(dn);e&&(e.focus(),e.addEventListener("keydown",t=>{(t.key==="Escape"||t.key==="v")&&(t.preventDefault(),e.blur())}),navigator.userActivation.isActive&&"showPicker"in HTMLSelectElement.prototype&&e.showPicker())}var H=mt(mn());var Re=80,Ir="#search";function yn(){let e=window.location.pathname;if(e.endsWith("/search.html")||e.endsWith("/search")){let t=vt("q");Cr(t)}}async function Cr(e){if(ne(e))nt({value:e});else{ln(e);let t=await Ar();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),i=zr(t.search(n));nt({value:e,results:i})}catch(n){nt({value:e,errorMessage:n.message})}}}function nt({value:e,results:t,errorMessage:n}){let i=c(Ir),r=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});i.innerHTML=r}async function Ar(){H.default.tokenizer.separator=/\s+/,H.default.QueryLexer.termSeparator=/\s+/,H.default.Pipeline.registerFunction(bn,"docTokenSplitter"),H.default.Pipeline.registerFunction(Sn,"docTrimmer");let e=await Pr();if(e)return e;let t=Dr();return Rr(t),t}async function Pr(){try{let e=sessionStorage.getItem(vn());if(e){let t=await Qr(e);return H.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function Rr(e){try{let t=await Nr(e);sessionStorage.setItem(vn(),t)}catch(t){console.error("Failed to save index: ",t)}}async function Nr(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),i=await(await new Response(t).blob()).arrayBuffer();return Hr(i)}async function Qr(e){let t=new Blob([Fr(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function Hr(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let r=0;r{this.add(e)})})}function Mr(e){e.pipeline.before(H.default.stemmer,bn)}function bn(e){let t=[e],n=/\/\d+$/,i=/\:|\./,r=e.toString();if(n.test(r)){let o=e.toString().replace(n,"");t.push(e.clone().update(()=>o));let a=o.split(i);if(a.length>1){for(let u of a)t.push(e.clone().update(()=>u));let l=e.toString().split(i);t.push(e.clone().update(()=>l[l.length-1]))}r=a[a.length-1]}else r.startsWith("@")&&(r=r.substring(1),t.push(e.clone().update(()=>r)));let s=r.split(/\_|\-/);if(s.length>1)for(let o of s)t.push(e.clone().update(()=>o));return t}function Br(e){e.pipeline.before(H.default.stemmer,Sn)}function Sn(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function zr(e){return e.filter(t=>gn(t.ref)).map(t=>{let n=gn(t.ref),i=t.matchData.metadata;return{...n,metadata:i,excerpts:$r(n,i)}})}function gn(e){return searchData.items.find(t=>t.ref===e)||null}function $r(e,t){let{doc:n}=e,r=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Vr(n,o,a))).reduce((s,o)=>s.concat(o),[]);return r.length===0?[n.slice(0,Re*2)+(Re*20?"...":"",e.slice(i,t),""+me(e.slice(t,t+n))+"",e.slice(t+n,r),r{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",i=>{xn(n,!0)}),t.addEventListener("mouseleave",i=>{xn(n,!1)})})}function xn(e,t){_(`[data-group-id="${e}"]`).forEach(i=>{i.classList.toggle(qr,t)})}var J=".modal",Ur=".modal .modal-close",Wr=".modal .modal-title",Gr=".modal .modal-body",Ln='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',z={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function Tn(){Kr()}function Kr(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(J).addEventListener("keydown",t=>{t.key==="Escape"&&Y()}),c(Ur).addEventListener("click",t=>{Y()}),c(J).addEventListener("click",t=>{t.target.classList.contains("modal")&&Y()})}function wn(e){if(z.ignoreFocusChanges)return;let t=c(J);if(t.contains(e.target))z.lastFocus=e.target;else{z.ignoreFocusChanges=!0;let n=Yr(t);z.lastFocus===n?Jr(t).focus():n.focus(),z.ignoreFocusChanges=!1,z.lastFocus=document.activeElement}}function Yr(e){return e.querySelector(Ln)}function Jr(e){let t=e.querySelectorAll(Ln);return t[t.length-1]}function Ne({title:e,body:t}){z.prevFocus=document.activeElement,document.addEventListener("focus",wn,!0),c(Wr).innerHTML=e,c(Gr).innerHTML=t,c(J).classList.add("shown"),c(J).focus()}function Y(){c(J).classList.remove("shown"),document.addEventListener("focus",wn,!0),z.prevFocus&&z.prevFocus.focus(),z.prevFocus=null}function kn(){return c(J).classList.contains("shown")}var Xr="https://hexdocs.pm/%%",Zr="https://www.erlang.org/doc/apps/%%",es="https://hex.pm/api/packages?search=name:%%*",ts=".display-quick-switch",it="#quick-switch-input",On="#quick-switch-results",ns=".quick-switch-result",is=300,rs=9,In=["erts","asn1","common_test","compiler","crypto","debugger","dialyzer","diameter","edoc","eldap","erl_interface","et","eunit","ftp","inets","jinterface","kernel","megaco","mnesia","observer","odbc","os_mon","parsetools","public_key","reltool","runtime_tools","sasl","snmp","ssh","ssl","stdlib","syntax_tools","tftp","tools","wx","xmerl"],ss=["elixir","eex","ex_unit","hex","iex","logger","mix"].concat(In).map(e=>({name:e})),Cn=2,P={autocompleteResults:[],selectedIdx:null};function An(){os()}function os(){_(ts).forEach(e=>{e.addEventListener("click",t=>{st()})})}function as(e){if(e.key==="Enter"){let t=e.target.value;ls(t),e.preventDefault()}else e.key==="ArrowUp"?(_n(-1),e.preventDefault()):e.key==="ArrowDown"&&(_n(1),e.preventDefault())}function cs(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(P.autocompleteResults=ps(e,n),P.selectedIdx=null,c(it).value.length>=Cn&&fs({results:P.autocompleteResults}))})}function fs({results:e}){let t=c(On),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,_(ns).forEach(i=>{i.addEventListener("click",r=>{let s=i.getAttribute("data-index"),o=P.autocompleteResults[s];rt(o.name)})})}function ps(e,t){return ss.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,rs)}function _n(e){P.selectedIdx=hs(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${P.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function hs(e){let t=P.autocompleteResults.length;if(P.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(P.selectedIdx+e+t)%t}var ms=".display-settings",gs="#settings-modal-content",ot="#modal-settings-tab",at="#modal-keyboard-shortcuts-tab",Rn="#settings-content",Nn="#keyboard-shortcuts-content",ys=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function Qn(){vs()}function vs(){_(ms).forEach(e=>{e.addEventListener("click",t=>{ct()})})}function Pn(){c(at).classList.remove("active"),c(ot).classList.add("active"),c(Rn).classList.remove("hidden"),c(Nn).classList.add("hidden")}function bs(){c(at).classList.add("active"),c(ot).classList.remove("active"),c(Nn).classList.remove("hidden"),c(Rn).classList.add("hidden")}function ct(){Ne({title:ys.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:lt})});let e=c(gs),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),i=e.querySelector('[name="direct_livebook_url"]'),r=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(i.checked=!1,r.classList.add("hidden"),r.tabIndex=-1):(i.checked=!0,r.classList.remove("hidden"),r.tabIndex=0,r.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),i.addEventListener("change",s=>{let o=s.target.checked?r.value:null;O.update({livebookUrl:o})}),r.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(ot).addEventListener("click",s=>{Pn()}),c(at).addEventListener("click",s=>{bs()}),Pn()}var Ss="#settings-modal-content",lt=[{key:"c",description:"Toggle sidebar",action:Me},{key:"n",description:"Cycle themes",action:Jt},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:ut},{key:"/",action:ut},{key:"k",hasModifier:!0,action:ut},{key:"v",description:"Open/focus version select",action:Ts},{key:"g",description:"Go to package docs",displayAs:"g",action:st},{key:"?",displayAs:"?",description:"Bring up this modal",action:ws}],dt={shortcutBeingPressed:null};function Hn(){xs()}function xs(){document.addEventListener("keydown",Es),document.addEventListener("keyup",Ls)}function Es(e){if(dt.shortcutBeingPressed||e.target.matches("input, select, textarea"))return;let t=lt.find(n=>n.hasModifier?ie()&&e.metaKey||e.ctrlKey?n.key===e.key:!1:e.ctrlKey||e.metaKey||e.altKey?!1:n.key===e.key);t&&(dt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function Ls(e){dt.shortcutBeingPressed=null}function ut(e){Y(),et()}function Ts(){Y(),Ft()?tt():ze().then(tt)}function ws(){ks()?Y():ct()}function ks(){return kn()&&c(Ss)}var X={plain:"plain",function:"function",module:"module"},_s=[{href:"typespecs.html#basic-types",hint:{kind:X.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:X.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:X.plain,description:"Built-in type"}}],Qe={cancelHintFetching:null};function Fn(e){if(Mn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Dn(e){let t=Mn(e);return t?Promise.resolve(t):Os(e)}function Mn(e){let t=_s.find(n=>e.includes(n.href));return t?t.hint:null}function Os(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,i)=>{let r=document.createElement("iframe");r.setAttribute("src",t),r.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Qe.cancelHintFetching=()=>{o(),i(new Error("cancelled"))};function o(){r.remove(),window.removeEventListener("message",s),Qe.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(r)})}function Bn(){Qe.cancelHintFetching&&Qe.cancelHintFetching()}function zn(e){let n=e.querySelector("h1").textContent,i=e.querySelector(".docstring > p"),r=i?i.innerHTML:"";return{kind:X.function,title:n.trim(),description:r.trim()}}function $n(e){let n=e.querySelector("h1 > span").textContent,i=e.querySelector("#moduledoc p"),r=i?i.innerHTML:"";return{kind:X.module,title:n.trim(),description:r.trim()}}var Is=".content a",ft=".tooltip",Cs=".tooltip .tooltip-body",qn="body .content-inner",As="#content",jn="tooltip-shown",de=10,Ps=de*4,Vn={height:450,width:768},Rs=100,oe={currentLinkElement:null,hoverDelayTimeout:null};function Un(){Ns(),Qs()}function Ns(){let e=Handlebars.templates["tooltip-layout"]();c(qn).insertAdjacentHTML("beforeend",e)}function Qs(){_(Is).forEach(e=>{Hs(e)&&(e.addEventListener("mouseenter",t=>{Ds(e)}),e.addEventListener("mouseleave",t=>{$s(e)}))})}function Hs(e){return!(e.getAttribute("data-no-tooltip")!==null||Fs(e.href)||!Fn(e.href))}function Fs(e){let t=e.replace(As,"");return window.location.href.split("#")[0]===t}function Ds(e){Ms()&&(oe.currentLinkElement=e,oe.hoverDelayTimeout=setTimeout(()=>{Dn(e.href).then(t=>{Bs(t),zs()}).catch(()=>{})},Rs))}function Ms(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",Js)),Array.from(_(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let i=Array.from(e.parentElement.querySelector("code").childNodes).filter(r=>!(r.tagName==="SPAN"&&r.classList.contains("unselectable"))).map(r=>r.textContent).join("");navigator.clipboard.writeText(i),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Jn(){let e=ie()?"apple-os":"non-apple-os";document.documentElement.classList.add(e)}function Zn(){let e=ge(te(),!0);e&&Zs(e)}function Zs(e){no(e),eo(),to(),Xn(),window.addEventListener("resize",t=>{Xn()})}function Xn(){let e=document.body.scrollHeight,t=document.getElementById("content").parentElement.offsetHeight,n={type:"preview",maxHeight:e,contentHeight:t};window.parent.postMessage(n,"*")}function eo(){let e=document.getElementsByTagName("a");for(let t of e)t.getAttribute("target")!=="_blank"&&t.setAttribute("target","_parent")}function to(){window.scrollTo(0,0)}function no(e){document.body.classList.add("preview");let t=document.getElementById("content");t.innerHTML=e.innerHTML}St(()=>{let e=new URLSearchParams(window.location.search),t=e.has("preview");Lt(),Yt(e.get("theme")),kt(t),En(),Un(),Kn(),Yn(),Jn(),t?Zn():(fn(),Nt(),zt(),cn(),Tn(),Hn(),An(),Gt(),yn(),Qn())});})(); +`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(i){var r=e.Pipeline.registeredFunctions[i];if(r)n.add(r);else throw new Error("Cannot load unregistered function: "+i)}),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 i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i=i+1,this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,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,i=0;i1&&(ot&&(i=s),o!=t);)r=i-n,s=n+Math.floor(r/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=i[u+1]*r[f+1],u+=2,f+=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,i=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),r.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),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.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),r.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),y=s.str.charAt(1),g;y in s.node.edges?g=s.node.edges[y]:(g=new e.TokenSet,s.node.edges[y]=g),s.str.length==1&&(g.final=!0),r.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,i=n,r=0,s=t.length;r=t;n--){var i=this.uncheckedNodes[n],r=i.child.toString();r in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[r]:(i.child._str=r,this.minimizedNodes[r]=i.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 i=new e.QueryParser(t,n);i.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),i=Object.create(null),r=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 i=t[this._ref],r=Object.keys(this._fields);this._documents[i]=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 i="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(i+=" with value '"+n.str+"'"),new e.QueryParseError(i,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 i="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(i,n.start,n.end)}var r=t.peekLexeme();if(r==null){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var i=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),r="unrecognised field '"+n.str+"', possible fields: "+i;throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var r="expecting term, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term, found '"+s.type+"'";throw new e.QueryParseError(r,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 i=t.peekLexeme();if(i==null){t.nextClause();return}switch(i.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 r="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="edit distance must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.editDistance=i;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 r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="boost must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.boost=i;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 r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof pn=="object"?hn.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let i=t||"";if(e.group!==i)return delete e.nestedContext,e.group=i,n.fn(this)});Handlebars.registerHelper("nestingChanged",function(e,t,n){if(t.nested_context&&t.nested_context!==e.nestedContext){if(e.nestedContext=t.nested_context,e.lastModuleSeenInGroup!==t.nested_context)return n.fn(this)}else e.lastModuleSeenInGroup=t.title});Handlebars.registerHelper("showSections",function(e,t){if(e.sections.length>0)return t.fn(this)});Handlebars.registerHelper("showSummary",function(e,t){if(e.nodeGroups)return t.fn(this)});Handlebars.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isEmptyArray",function(e,t){return Array.isArray(e)&&e.length===0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isLocal",function(e,t){let n=window.location.pathname.split("/").pop();return n===e+".html"||n===e?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),_=document.querySelectorAll.bind(document);function gt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function me(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function $(){return document.body.dataset.type}function yt(e,t){if(e){for(let n of e){let i=n.nodeGroups&&n.nodeGroups.find(r=>r.nodes.some(s=>s.anchor===t));if(i)return i.key}return null}}function ge(e,t=!1){if(!e)return t?document.getElementById("top-content"):null;let n=document.getElementById(e);return n?n.matches(".detail")?n:["h1","h2","h3","h4","h5","h6"].includes(n.tagName.toLowerCase())?ui(n):null:null}function ui(e){let t=[e],n=e.nextElementSibling,i=e.tagName.toLowerCase();for(;n;){let s=n.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6"].includes(s)&&s<=i?n=null:(t.push(n),n=n.nextElementSibling)}let r=document.createElement("div");return r.append(...t),r}function te(){return window.location.hash.replace(/^#/,"")}function vt(e){return new URLSearchParams(window.location.search).get(e)}function bt(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function St(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function ne(e){return!e||e.trim()===""}function xt(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function ye(){return document.head.querySelector("meta[name=project][content]").content}function ie(){return/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)}var di="content",fi="tabs-open",pi="tabs-close",hi="H3",mi="tabset";function Lt(){gi().map(yi).forEach(n=>Si(n))}function gi(){let e=document.createNodeIterator(document.getElementById(di),NodeFilter.SHOW_COMMENT,{acceptNode(i){return i.nodeValue.trim()===fi?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function yi(e,t,n){let i=[],r=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(vi(e)){Et(s,r,t);break}i.push(e),e.nodeName===hi?(Et(s,r,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=mi,bi(i,o),o.innerHTML=Handlebars.templates.tabset({tabs:r}),o}function vi(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===pi}function Et(e,t,n){if(e.label===""&&!e.content.length)return!1;let i=e.label,r=e.content;t.push({label:i,content:r,setIndex:n})}function bi(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Si(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,i)=>{n.addEventListener("click",r=>{G(i,t)}),n.addEventListener("keydown",r=>{let s=t.tabs.length-1;r.code==="ArrowLeft"?(r.preventDefault(),t.activeIndex===0?G(s,t):G(t.activeIndex-1,t)):r.code==="ArrowRight"?(r.preventDefault(),t.activeIndex===s?G(0,t):G(t.activeIndex+1,t)):r.code==="Home"?(r.preventDefault(),G(0,t)):r.code==="End"&&(r.preventDefault(),G(s,t))})})}function G(e,t){t.tabs[t.activeIndex].setAttribute("aria-selected","false"),t.tabs[t.activeIndex].tabIndex=-1,t.tabs[e].setAttribute("aria-selected","true"),t.tabs[e].tabIndex=0,t.tabs[e].focus(),t.panels[t.activeIndex].setAttribute("hidden",""),t.panels[t.activeIndex].tabIndex=-1,t.panels[e].removeAttribute("hidden"),t.panels[e].tabIndex=0,t.activeIndex=e}var Tt="ex_doc:settings",xi={tooltips:!0,theme:null,livebookUrl:null},He=class{constructor(){this._subscribers=[],this._settings=xi,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(i=>i(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(Tt);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(Tt,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"))}},O=new He;var Ei=".content",wt=".content-inner",Li=".livebook-badge";function kt(e){e||wi(),ki(),Ti()}function Ti(){c(Ei).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function wi(){c(wt).setAttribute("tabindex",-1),c(wt).focus()}function ki(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(i=>{let r=i.livebookUrl?Oi(i.livebookUrl,n):_i(n);for(let s of _(Li))s.href=r})}function _i(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function Oi(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}var Rt=mt(At());var Ui=768,De=300,re=".sidebar-toggle",Wi=".content",M={CLOSED:"closed",OPEN:"open",NO_PREF:"no_pref"},N={opened:"sidebar-opened",openingStart:"sidebar-opening-start",opening:"sidebar-opening",closed:"sidebar-closed",closingStart:"sidebar-closing-start",closing:"sidebar-closing"},Gi=Object.values(N),A={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:M.NO_PREF};function Nt(){Qt(),Ki(),Yi()}function Ki(){let e=sessionStorage.getItem("sidebar_width");e&&Pt(e),new ResizeObserver(n=>{for(let i of n)Pt(i.contentRect.width)}).observe(document.getElementById("sidebar"))}function Pt(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function Qt(){sessionStorage.getItem("sidebar_state")==="closed"||Ht()?(V(N.closed),c(re).setAttribute("aria-expanded","false")):(V(N.opened),c(re).setAttribute("aria-expanded","true")),setTimeout(()=>c(re).classList.add("sidebar-toggle--animated"),De)}function Ht(){return window.matchMedia(`screen and (max-width: ${Ui}px)`).matches}function V(...e){document.body.classList.remove(...Gi),document.body.classList.add(...e)}function Yi(){c(re).addEventListener("click",e=>{Me(),Zi()}),c(Wi).addEventListener("click",e=>{Xi()}),window.addEventListener("resize",(0,Rt.default)(e=>{Ji()},100))}function Me(){return Be()?Dt():ze()}function Be(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function Ft(){return document.body.classList.contains(N.opened)}function ze(){return Mt(),sessionStorage.setItem("sidebar_state","opened"),c(re).setAttribute("aria-expanded","true"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.openingStart),requestAnimationFrame(()=>{V(N.opening),A.togglingTimeout=setTimeout(()=>{V(N.opened),e()},De)})})})}function Dt(){return Mt(),sessionStorage.setItem("sidebar_state","closed"),c(re).setAttribute("aria-expanded","false"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.closingStart),requestAnimationFrame(()=>{V(N.closing),A.togglingTimeout=setTimeout(()=>{V(N.closed),e()},De)})})})}function Mt(){A.togglingTimeout&&(clearTimeout(A.togglingTimeout),A.togglingTimeout=null)}function Ji(){A.lastWindowWidth!==window.innerWidth&&(A.lastWindowWidth=window.innerWidth,(A.sidebarPreference===M.OPEN||A.sidebarPreference===M.NO_PREF)&&Qt())}function Xi(){Ht()&&Be()&&Dt()}function Zi(){switch(A.sidebarPreference){case M.OPEN:A.sidebarPreference=M.CLOSED;break;case M.CLOSED:A.sidebarPreference=M.OPEN;break;case M.NO_PREF:Be()?A.sidebarPreference=M.OPEN:A.sidebarPreference=M.CLOSED}}function le(){return window.sidebarNodes||{}}function Bt(){return window.versionNodes||[]}var $e={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Ve=[$e.extras,$e.modules,$e.tasks],Se=e=>`#${e}-full-list`;function zt(){Ve.forEach(e=>{er(le(),e)}),be($()),Vt(),$t(),ar()}function er(e,t){let n=e[t]||[],i=c(Se(t));if(!i)return;let r=Handlebars.templates["sidebar-items"]({nodes:n,group:""});i.innerHTML=r,i.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),i.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");nr(l)})}),i.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=i.querySelector(".current-section");u&&rr(u),s.matches(".expand")&&(s.pathname===window.location.pathname||s.pathname===window.location.pathname+".html")&&qe(l)})})}function qe(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function tr(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function nr(e){e.classList.contains("open")?tr(e):qe(e)}function ir(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function rr(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function sr(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function or(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function be(e){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let i=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),i.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),i.setAttribute("hidden","hidden"))}})}function $t(){let e=c(Se($()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function Vt(){let e=te()||"content",n=le()[$()]||[],i=yt(n,e),r=c(Se($()));if(!r)return;let s=r.querySelector(`li.current-page a.expand[href$="#${i}"]`);s&&qe(s.closest("li"));let o=r.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&ir(a.closest("li")),sr(o.closest("li"))}}function ar(){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",i=>{be(t),$t()})});let e=c("#sidebar-listNav");e.addEventListener("keydown",t=>{if(t.key!=="ArrowRight"&&t.key!=="ArrowLeft")return;let n=Array.from(e.querySelectorAll('[role="tab"]')).map(r=>r.dataset.type),i=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let r=n.indexOf(i)+1;r>=n.length&&(r=0);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let r=n.indexOf(i)-1;r<0&&(r=n.length-1);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(Se($()));if(!n)return;let i=n.querySelector("li.current-page li.current-hash");i&&or(i),Vt()})}var B={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function jt(e,t=8){if(ne(e))return[];let n=le(),i=[...je(n.modules,e,B.module,"module"),...cr(n.modules,e,B.moduleChild),...je(n.tasks,e,B.mixTask,"mix task"),...je(n.extras,e,B.extra,"page"),...Ue(n.modules,e,B.section,"module"),...Ue(n.tasks,e,B.section,"mix task"),...Ue(n.extras,e,B.section,"page")].filter(r=>r!==null);return mr(i).slice(0,t)}function je(e,t,n,i){return e.map(r=>ur(r,t,n,i))}function cr(e,t,n){return e.filter(i=>i.nodeGroups).flatMap(i=>i.nodeGroups.flatMap(({key:r,nodes:s})=>{let o=hr(r);return s.map(a=>dr(a,i.id,t,n,o)||pr(a,i.id,t,n,o))}))}function Ue(e,t,n,i){return e.flatMap(r=>lr(r).map(s=>fr(r,s,t,n,i)))}function lr(e){return(e.sections||[]).concat(e.headers||[])}function ur(e,t,n,i){return Ee(e.title,t)?{link:`${e.id}.html`,title:we(e.title,t),description:null,matchQuality:Le(e.title,t),deprecated:e.deprecated,labels:[i],category:n}:null}function dr(e,t,n,i,r){return Ee(e.id,n)?{link:`${t}.html#${e.anchor}`,title:we(e.id,n),labels:[r],description:t,matchQuality:Le(e.id,n),deprecated:e.deprecated,category:i}:null}function fr(e,t,n,i,r){return Ut(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:we(t.id,n),description:e.title,matchQuality:Le(t.id,n),labels:[r,"section"],category:i}:null}function pr(e,t,n,i,r){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Ee(s,n))a=s,l=/\./g;else if(Ee(o,n))a=o,l=/:/g;else return null;let u=n.replace(l," ");return Ut(e.id,u)?{link:`${t}.html#${e.anchor}`,title:we(e.id,u),label:r,description:t,matchQuality:Le(a,n),deprecated:e.deprecated,category:i}:null}function hr(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function mr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:qt(t.category)-qt(n.category))}function qt(e){switch(e){case B.module:return 1;case B.moduleChild:return 2;case B.mixTask:return 3;default:return 4}}function Ut(e,t){return Te(t).some(i=>Wt(e,i))}function Ee(e,t){return Te(t).every(i=>Wt(e,i))}function Wt(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Le(e,t){let n=Te(t),r=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=gr(e,n[0])?1:0;return r+s}function gr(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Te(e){return e.trim().split(/\s+/)}function we(e,t){let n=Te(t).sort((i,r)=>r.length-i.length);return xe(e,n)}function xe(e,t){if(t.length===0)return e;let[n,...i]=t,r=e.match(new RegExp(`(.*)(${gt(n)})(.*)`,"i"));if(r){let[,s,o,a]=r;return xe(s,t)+""+me(o)+""+xe(a,t)}else return xe(e,i)}var ke=null,K=null;function Gt(){K=document.getElementById("toast"),K.addEventListener("click",e=>{clearTimeout(ke),e.target.classList.remove("show")})}function We(e){K&&(clearTimeout(ke),K.innerText=e,K.classList.add("show"),ke=setTimeout(()=>{K.classList.remove("show"),ke=setTimeout(function(){K.innerText=""},1e3)},5e3))}var Kt="dark",Ge=["system","dark","light"];function Yt(e){O.getAndSubscribe(t=>{document.body.classList.toggle(Kt,Xt(e||t.theme))}),vr()}function Jt(){let e=Ge[Ge.indexOf(Ke())+1]||Ge[0];O.update({theme:e}),We(`Set theme to "${e}"`)}function Ke(){return O.get().theme||"system"}function Xt(e){return e==="dark"||yr()&&(e==null||e==="system")}function yr(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function vr(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get().theme,n=Xt(t);(t==null||t==="system")&&(document.body.classList.toggle(Kt,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var se=".autocomplete",Oe=".autocomplete-suggestions",_e=".autocomplete-suggestion",I={autocompleteSuggestions:[],previewOpen:!1,selectedIdx:-1};function br(){c(se).classList.add("shown")}function Ye(){c(se).classList.remove("shown")}function Zt(){return c(se).classList.contains("shown")}function Je(e){I.autocompleteSuggestions=jt(e),I.selectedIdx=-1,ne(e)?Ye():(Sr({term:e,suggestions:I.autocompleteSuggestions}),Ie(0),br())}function Sr({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),i=c(se);i.innerHTML=n}function en(){return I.selectedIdx===-1?null:I.autocompleteSuggestions[I.selectedIdx]}function Ie(e){nn(xr(e))}function tn(e){if(e.data.type==="preview"){let{contentHeight:t}=e.data,n=c(".autocomplete-preview");n&&(n.style.height=`${t+32}px`,n.classList.remove("loading"))}}function nn(e){I.selectedIdx=e;let t=c(Oe),n=c(`${_e}.selected`),i=c(`${_e}[data-index="${I.selectedIdx}"]`);if(n&&n.classList.remove("selected"),i){if(I.previewOpen){sn(),window.addEventListener("message",tn),t.classList.add("previewing");let r=document.createElement("div");r.classList.add("autocomplete-preview"),r.classList.add("loading");let s=i.href.replace(".html",`.html?preview=true&theme=${Ke()}`),o=document.createElement("iframe");o.setAttribute("src",s),r.appendChild(document.createElement("div")),r.appendChild(document.createElement("span")),r.appendChild(o),i.parentNode.insertBefore(r,i.nextSibling)}i.classList.add("selected"),i.scrollIntoView({block:"nearest"})}else t&&(t.scrollTop=0)}function rn(){I.previewOpen?Ce():Xe()}function Ce(){I.previewOpen=!1;let e=c(Oe);e&&e.classList.remove("previewing"),sn()}function Xe(e){I.previewOpen=!0,e?e=e.closest(_e):e=c(`${_e}[data-index="${I.selectedIdx}"]`),e&&nn(parseInt(e.dataset.index))}function sn(){let e=c(".autocomplete-preview");e&&(e.remove(),window.removeEventListener("message",tn))}function xr(e){let t=I.autocompleteSuggestions.length+1;return(I.selectedIdx+e+1+t)%t-1}var ue="form.search-bar input",Er="form.search-bar .search-close-button";function cn(){Lr(),window.onTogglePreviewClick=function(e,t){e.preventDefault(),e.stopImmediatePropagation(),et(),t?Xe(e.target):Ce()}}function ln(e){let t=c(ue);t.value=e}function et(){let e=c(ue);document.body.classList.add("search-focused"),e.focus()}function Lr(){let e=c(ue);if(document.querySelector('meta[name="exdoc:autocomplete"][content="off"]'))return e.addEventListener("keydown",t=>{t.key==="Enter"&&on(t)}),!0;e.addEventListener("keydown",t=>{let n=ie();t.key==="Escape"?(Ae(),e.blur()):t.key==="Enter"?on(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(Ie(-1),t.preventDefault()):t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n"?(Ie(1),t.preventDefault()):t.key==="Tab"&&(rn(),t.preventDefault())}),e.addEventListener("input",t=>{Je(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.contains("search-focused")||(document.body.classList.add("search-focused"),Je(t.target.value))}),e.addEventListener("blur",t=>{let n=t.relatedTarget,i=c(Oe);if(n&&i&&i.contains(n))return setTimeout(()=>{Zt()&&e.focus()},1e3),null;Pe()}),c(se).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ae(),Pe())}),c(Er).addEventListener("click",t=>{Ae(),Pe()})}function on(e){let t=c(ue),n=e.shiftKey||e.ctrlKey,i=en();e.preventDefault();let r=n?"_blank":"_self",s=document.createElement("a");if(s.setAttribute("target",r),i)s.setAttribute("href",i.link);else{let o=document.querySelector('meta[name="exdoc:full-text-search-url"]'),a=o?o.getAttribute("content"):"search.html?q=";s.setAttribute("href",`${a}${encodeURIComponent(t.value)}`)}s.click(),n||(Ae(),Pe())}function Ae(){let e=c(ue);e.value=""}function Pe(){Ce(),document.body.classList.remove("search-focused"),Ye()}var Ze=window.scrollY,Tr=70,an=-2;window.addEventListener("scroll",function(){let e=window.scrollY;e===0||Ze-eTr?document.body.classList.remove("scroll-sticky"):Ze-e>Math.abs(an)&&document.body.classList.add("scroll-sticky"),Ze=e<=0?0:e},!1);var un=".sidebar-projectVersion",dn=".sidebar-projectVersionsDropdown";function fn(){let e=Bt();if(e.length>0){let n=c(un).textContent.trim(),i=kr(e,n);wr({nodes:i})}}function wr({nodes:e}){let t=c(un),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(dn).addEventListener("change",Or)}function kr(e,t){return _r(e,t).map(i=>({...i,isCurrentVersion:i.version===t}))}function _r(e,t){return e.some(i=>i.version===t)?e:[{version:t,url:"#"},...e]}function Or(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,i=`${t}/${n}`;bt(i).then(r=>{r?window.location.href=i:window.location.href=t})}function tt(){let e=c(dn);e&&(e.focus(),e.addEventListener("keydown",t=>{(t.key==="Escape"||t.key==="v")&&(t.preventDefault(),e.blur())}),navigator.userActivation.isActive&&"showPicker"in HTMLSelectElement.prototype&&e.showPicker())}var H=mt(mn());var Re=80,Ir="#search";function yn(){let e=window.location.pathname;if(e.endsWith("/search.html")||e.endsWith("/search")){let t=vt("q");Cr(t)}}async function Cr(e){if(ne(e))nt({value:e});else{ln(e);let t=await Ar();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),i=zr(t.search(n));nt({value:e,results:i})}catch(n){nt({value:e,errorMessage:n.message})}}}function nt({value:e,results:t,errorMessage:n}){let i=c(Ir),r=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});i.innerHTML=r}async function Ar(){H.default.tokenizer.separator=/\s+/,H.default.QueryLexer.termSeparator=/\s+/,H.default.Pipeline.registerFunction(bn,"docTokenSplitter"),H.default.Pipeline.registerFunction(Sn,"docTrimmer");let e=await Pr();if(e)return e;let t=Dr();return Rr(t),t}async function Pr(){try{let e=sessionStorage.getItem(vn());if(e){let t=await Qr(e);return H.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function Rr(e){try{let t=await Nr(e);sessionStorage.setItem(vn(),t)}catch(t){console.error("Failed to save index: ",t)}}async function Nr(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),i=await(await new Response(t).blob()).arrayBuffer();return Hr(i)}async function Qr(e){let t=new Blob([Fr(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function Hr(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let r=0;r{this.add(e)})})}function Mr(e){e.pipeline.before(H.default.stemmer,bn)}function bn(e){let t=[e],n=/\/\d+$/,i=/\:|\./,r=e.toString();if(r.startsWith("`")&&r.endsWith("`")&&(r=r.slice(1,-1),t.push(e.clone().update(()=>r))),n.test(r)){let o=e.toString().replace(n,"");t.push(e.clone().update(()=>o));let a=o.split(i);if(a.length>1){for(let u of a)t.push(e.clone().update(()=>u));let l=e.toString().split(i);t.push(e.clone().update(()=>l[l.length-1]))}r=a[a.length-1]}else r.startsWith("@")?(r=r.substring(1),t.push(e.clone().update(()=>r))):r.startsWith(":")&&(r=r.substring(1),t.push(e.clone().update(()=>r)));let s=r.split(/\_|\-/);if(s.length>1)for(let o of s)t.push(e.clone().update(()=>o));return t}function Br(e){e.pipeline.before(H.default.stemmer,Sn)}function Sn(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function zr(e){return e.filter(t=>gn(t.ref)).map(t=>{let n=gn(t.ref),i=t.matchData.metadata;return{...n,metadata:i,excerpts:$r(n,i)}})}function gn(e){return searchData.items.find(t=>t.ref===e)||null}function $r(e,t){let{doc:n}=e,r=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Vr(n,o,a))).reduce((s,o)=>s.concat(o),[]);return r.length===0?[n.slice(0,Re*2)+(Re*20?"...":"",e.slice(i,t),""+me(e.slice(t,t+n))+"",e.slice(t+n,r),r{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",i=>{xn(n,!0)}),t.addEventListener("mouseleave",i=>{xn(n,!1)})})}function xn(e,t){_(`[data-group-id="${e}"]`).forEach(i=>{i.classList.toggle(qr,t)})}var J=".modal",Ur=".modal .modal-close",Wr=".modal .modal-title",Gr=".modal .modal-body",Ln='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',z={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function Tn(){Kr()}function Kr(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(J).addEventListener("keydown",t=>{t.key==="Escape"&&Y()}),c(Ur).addEventListener("click",t=>{Y()}),c(J).addEventListener("click",t=>{t.target.classList.contains("modal")&&Y()})}function wn(e){if(z.ignoreFocusChanges)return;let t=c(J);if(t.contains(e.target))z.lastFocus=e.target;else{z.ignoreFocusChanges=!0;let n=Yr(t);z.lastFocus===n?Jr(t).focus():n.focus(),z.ignoreFocusChanges=!1,z.lastFocus=document.activeElement}}function Yr(e){return e.querySelector(Ln)}function Jr(e){let t=e.querySelectorAll(Ln);return t[t.length-1]}function Ne({title:e,body:t}){z.prevFocus=document.activeElement,document.addEventListener("focus",wn,!0),c(Wr).innerHTML=e,c(Gr).innerHTML=t,c(J).classList.add("shown"),c(J).focus()}function Y(){c(J).classList.remove("shown"),document.addEventListener("focus",wn,!0),z.prevFocus&&z.prevFocus.focus(),z.prevFocus=null}function kn(){return c(J).classList.contains("shown")}var Xr="https://hexdocs.pm/%%",Zr="https://www.erlang.org/doc/apps/%%",es="https://hex.pm/api/packages?search=name:%%*",ts=".display-quick-switch",it="#quick-switch-input",On="#quick-switch-results",ns=".quick-switch-result",is=300,rs=9,In=["erts","asn1","common_test","compiler","crypto","debugger","dialyzer","diameter","edoc","eldap","erl_interface","et","eunit","ftp","inets","jinterface","kernel","megaco","mnesia","observer","odbc","os_mon","parsetools","public_key","reltool","runtime_tools","sasl","snmp","ssh","ssl","stdlib","syntax_tools","tftp","tools","wx","xmerl"],ss=["elixir","eex","ex_unit","hex","iex","logger","mix"].concat(In).map(e=>({name:e})),Cn=2,P={autocompleteResults:[],selectedIdx:null};function An(){os()}function os(){_(ts).forEach(e=>{e.addEventListener("click",t=>{st()})})}function as(e){if(e.key==="Enter"){let t=e.target.value;ls(t),e.preventDefault()}else e.key==="ArrowUp"?(_n(-1),e.preventDefault()):e.key==="ArrowDown"&&(_n(1),e.preventDefault())}function cs(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(P.autocompleteResults=ps(e,n),P.selectedIdx=null,c(it).value.length>=Cn&&fs({results:P.autocompleteResults}))})}function fs({results:e}){let t=c(On),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,_(ns).forEach(i=>{i.addEventListener("click",r=>{let s=i.getAttribute("data-index"),o=P.autocompleteResults[s];rt(o.name)})})}function ps(e,t){return ss.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,rs)}function _n(e){P.selectedIdx=hs(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${P.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function hs(e){let t=P.autocompleteResults.length;if(P.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(P.selectedIdx+e+t)%t}var ms=".display-settings",gs="#settings-modal-content",ot="#modal-settings-tab",at="#modal-keyboard-shortcuts-tab",Rn="#settings-content",Nn="#keyboard-shortcuts-content",ys=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function Qn(){vs()}function vs(){_(ms).forEach(e=>{e.addEventListener("click",t=>{ct()})})}function Pn(){c(at).classList.remove("active"),c(ot).classList.add("active"),c(Rn).classList.remove("hidden"),c(Nn).classList.add("hidden")}function bs(){c(at).classList.add("active"),c(ot).classList.remove("active"),c(Nn).classList.remove("hidden"),c(Rn).classList.add("hidden")}function ct(){Ne({title:ys.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:lt})});let e=c(gs),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),i=e.querySelector('[name="direct_livebook_url"]'),r=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(i.checked=!1,r.classList.add("hidden"),r.tabIndex=-1):(i.checked=!0,r.classList.remove("hidden"),r.tabIndex=0,r.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),i.addEventListener("change",s=>{let o=s.target.checked?r.value:null;O.update({livebookUrl:o})}),r.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(ot).addEventListener("click",s=>{Pn()}),c(at).addEventListener("click",s=>{bs()}),Pn()}var Ss="#settings-modal-content",lt=[{key:"c",description:"Toggle sidebar",action:Me},{key:"n",description:"Cycle themes",action:Jt},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:ut},{key:"/",action:ut},{key:"k",hasModifier:!0,action:ut},{key:"v",description:"Open/focus version select",action:Ts},{key:"g",description:"Go to package docs",displayAs:"g",action:st},{key:"?",displayAs:"?",description:"Bring up this modal",action:ws}],dt={shortcutBeingPressed:null};function Hn(){xs()}function xs(){document.addEventListener("keydown",Es),document.addEventListener("keyup",Ls)}function Es(e){if(dt.shortcutBeingPressed||e.target.matches("input, select, textarea"))return;let t=lt.find(n=>n.hasModifier?ie()&&e.metaKey||e.ctrlKey?n.key===e.key:!1:e.ctrlKey||e.metaKey||e.altKey?!1:n.key===e.key);t&&(dt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function Ls(e){dt.shortcutBeingPressed=null}function ut(e){Y(),et()}function Ts(){Y(),Ft()?tt():ze().then(tt)}function ws(){ks()?Y():ct()}function ks(){return kn()&&c(Ss)}var X={plain:"plain",function:"function",module:"module"},_s=[{href:"typespecs.html#basic-types",hint:{kind:X.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:X.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:X.plain,description:"Built-in type"}}],Qe={cancelHintFetching:null};function Fn(e){if(Mn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Dn(e){let t=Mn(e);return t?Promise.resolve(t):Os(e)}function Mn(e){let t=_s.find(n=>e.includes(n.href));return t?t.hint:null}function Os(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,i)=>{let r=document.createElement("iframe");r.setAttribute("src",t),r.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Qe.cancelHintFetching=()=>{o(),i(new Error("cancelled"))};function o(){r.remove(),window.removeEventListener("message",s),Qe.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(r)})}function Bn(){Qe.cancelHintFetching&&Qe.cancelHintFetching()}function zn(e){let n=e.querySelector("h1").textContent,i=e.querySelector(".docstring > p"),r=i?i.innerHTML:"";return{kind:X.function,title:n.trim(),description:r.trim()}}function $n(e){let n=e.querySelector("h1 > span").textContent,i=e.querySelector("#moduledoc p"),r=i?i.innerHTML:"";return{kind:X.module,title:n.trim(),description:r.trim()}}var Is=".content a",ft=".tooltip",Cs=".tooltip .tooltip-body",qn="body .content-inner",As="#content",jn="tooltip-shown",de=10,Ps=de*4,Vn={height:450,width:768},Rs=100,oe={currentLinkElement:null,hoverDelayTimeout:null};function Un(){Ns(),Qs()}function Ns(){let e=Handlebars.templates["tooltip-layout"]();c(qn).insertAdjacentHTML("beforeend",e)}function Qs(){_(Is).forEach(e=>{Hs(e)&&(e.addEventListener("mouseenter",t=>{Ds(e)}),e.addEventListener("mouseleave",t=>{$s(e)}))})}function Hs(e){return!(e.getAttribute("data-no-tooltip")!==null||Fs(e.href)||!Fn(e.href))}function Fs(e){let t=e.replace(As,"");return window.location.href.split("#")[0]===t}function Ds(e){Ms()&&(oe.currentLinkElement=e,oe.hoverDelayTimeout=setTimeout(()=>{Dn(e.href).then(t=>{Bs(t),zs()}).catch(()=>{})},Rs))}function Ms(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",Js)),Array.from(_(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let i=Array.from(e.parentElement.querySelector("code").childNodes).filter(r=>!(r.tagName==="SPAN"&&r.classList.contains("unselectable"))).map(r=>r.textContent).join("");navigator.clipboard.writeText(i),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Jn(){let e=ie()?"apple-os":"non-apple-os";document.documentElement.classList.add(e)}function Zn(){let e=ge(te(),!0);e&&Zs(e)}function Zs(e){no(e),eo(),to(),Xn(),window.addEventListener("resize",t=>{Xn()})}function Xn(){let e=document.body.scrollHeight,t=document.getElementById("content").parentElement.offsetHeight,n={type:"preview",maxHeight:e,contentHeight:t};window.parent.postMessage(n,"*")}function eo(){let e=document.getElementsByTagName("a");for(let t of e)t.getAttribute("target")!=="_blank"&&t.setAttribute("target","_parent")}function to(){window.scrollTo(0,0)}function no(e){document.body.classList.add("preview");let t=document.getElementById("content");t.innerHTML=e.innerHTML}St(()=>{let e=new URLSearchParams(window.location.search),t=e.has("preview");Lt(),Yt(e.get("theme")),kt(t),En(),Un(),Kn(),Yn(),Jn(),t?Zn():(fn(),Nt(),zt(),cn(),Tn(),Hn(),An(),Gt(),yn(),Qn())});})(); /*! Bundled license information: lunr/lunr.js: