Changeset 118422 in spip-zone


Ignore:
Timestamp:
Nov 4, 2019, 7:25:00 PM (11 months ago)
Author:
fil@…
Message:

fix for https://github.com/zzzev/observable-press/issues/2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/ressource/js/observable-press.js

    r116248 r118422  
    1 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.observablePress=t():e.observablePress=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";n.d(t,"c",function(){return s}),n.d(t,"b",function(){return c}),n.d(t,"a",function(){return l}),n.d(t,"e",function(){return d}),n.d(t,"d",function(){return f});var r=n(5),o=n(6),i=n(1),a=n(7),u=n(2),s=1,c=2,l=3,d={};function f(e,t,n){var r;null==n&&(n=d),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:h,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:-1,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:u.a,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:n!==d,writable:!0},_rejector:{value:(r=this,function(e){if(e===h)throw new i.a(r._name+" is not defined",r._name);throw new i.a(r._name+" could not be resolved",r._name)})},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}function p(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function m(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function h(){throw h}function v(e){return function(){throw new i.a(e+" is defined more than once")}}function b(e,t,n){var r=this._module._scope,o=this._module._runtime;if(this._inputs.forEach(m,this),t.forEach(p,this),this._inputs=t,this._definition=n,this._value=void 0,e==this._name&&r.get(e)===this)this._outputs.forEach(o._updates.add,o._updates);else{var i,a;if(this._name)if(this._outputs.size)r.delete(this._name),(a=this._module._resolve(this._name))._outputs=this._outputs,this._outputs=new Set,a._outputs.forEach(function(e){e._inputs[e._inputs.indexOf(this)]=a},this),a._outputs.forEach(o._updates.add,o._updates),o._dirty.add(a).add(this),r.set(this._name,a);else if((a=r.get(this._name))===this)r.delete(this._name);else{if(a._type!==l)throw new Error;a._duplicates.delete(this),this._duplicate=void 0,1===a._duplicates.size&&(a=a._duplicates.keys().next().value,i=r.get(this._name),a._outputs=i._outputs,i._outputs=new Set,a._outputs.forEach(function(e){e._inputs[e._inputs.indexOf(i)]=a}),a._definition=a._duplicate,a._duplicate=void 0,o._dirty.add(i).add(a),o._updates.add(a),r.set(this._name,a))}if(this._outputs.size)throw new Error;e&&((a=r.get(e))?a._type===l?(this._definition=v(e),this._duplicate=n,a._duplicates.add(this)):a._type===c?(this._outputs=a._outputs,a._outputs=new Set,this._outputs.forEach(function(e){e._inputs[e._inputs.indexOf(a)]=this},this),o._dirty.add(a).add(this),r.set(e,this)):(a._duplicate=a._definition,this._duplicate=n,(i=new f(l,this._module))._name=e,i._definition=this._definition=a._definition=v(e),i._outputs=a._outputs,a._outputs=new Set,i._outputs.forEach(function(e){e._inputs[e._inputs.indexOf(a)]=i}),i._duplicates=new Set([this,a]),o._dirty.add(a).add(i),o._updates.add(a).add(i),r.set(e,i)):r.set(e,this)),this._name=e}return o._updates.add(this),o._compute(),this}Object.defineProperties(f.prototype,{_pending:{value:function(){this._observer.pending&&this._observer.pending()},writable:!0,configurable:!0},_fulfilled:{value:function(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)},writable:!0,configurable:!0},_rejected:{value:function(e){this._observer.rejected&&this._observer.rejected(e,this._name)},writable:!0,configurable:!0},define:{value:function(e,t,n){switch(arguments.length){case 1:n=e,e=t=null;break;case 2:n=t,"string"==typeof e?t=null:(t=e,e=null)}return b.call(this,null==e?null:e+"",null==t?[]:r.b.call(t,this._module._resolve,this._module),"function"==typeof n?n:Object(o.a)(n))},writable:!0,configurable:!0},delete:{value:function(){return b.call(this,null,[],u.a)},writable:!0,configurable:!0},import:{value:function(e,t,n){arguments.length<3&&(n=t,t=e);return b.call(this,t+"",[n._resolve(e+"")],a.a)},writable:!0,configurable:!0}})},function(e,t,n){"use strict";function r(e,t){this.message=e+"",this.input=t}n.d(t,"a",function(){return r}),r.prototype=Object.create(Error.prototype),r.prototype.name="RuntimeError",r.prototype.constructor=r},function(e,t,n){"use strict";t.a=function(){}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return d}),n.d(t,"c",function(){return f}),n.d(t,"a",function(){return p});var r=n(4),o=n(1),i=n(9),a=n(10),u=n(11),s=n(2),c=n(0);const l="function"==typeof requestAnimationFrame?requestAnimationFrame:e;var d={},f={};function p(e=new r.a,t=function(e){return window[e]}){var n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_computing:{value:null,writable:!0},_modules:{value:new Map},_builtin:{value:n},_global:{value:t}}),e)for(var o in e)new c.d(c.b,n).define(o,[],e[o])}function m(e){++e._indegree}function h(e){return e._promise.catch(e._rejector)}function v(e){return new Promise(function(t){e._invalidate=t})}function b(e,t){let n,r,o="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,i=!o,a=s.a,u=s.a;return o&&((r=new IntersectionObserver(([e])=>(i=e.isIntersecting)&&(n=null,a()))).observe(o),e.then(()=>(r.disconnect(),r=null,u()))),function(e){return i?Promise.resolve(e):r?(n||(n=new Promise((e,t)=>(a=e,u=t))),n.then(()=>e)):Promise.reject()}}function _(e){e._invalidate(),e._invalidate=s.a,e._pending();var t=e._value,n=++e._version,r=null,o=e._promise=Promise.all(e._inputs.map(h)).then(function(o){if(e._version===n){for(var i=0,a=o.length;i<a;++i)switch(o[i]){case d:o[i]=r=v(e);break;case f:r||(r=v(e)),o[i]=b(r,e)}return e._definition.apply(t,o)}}).then(function(t){return Object(i.a)(t)?((r||v(e)).then((a=t,function(){a.return()})),function(e,t,n,r){function o(){var n=new Promise(function(e){e(r.next())}).then(function(r){return r.done?void 0:Promise.resolve(r.value).then(function(r){if(e._version===t)return w(e,r,n).then(o),e._fulfilled(r),r})});n.catch(function(r){e._version===t&&(w(e,void 0,n),e._rejected(r))})}return new Promise(function(e){e(r.next())}).then(function(e){if(!e.done)return n.then(o),e.value})}(e,n,o,t)):t;var a});o.then(function(t){e._version===n&&(e._value=t,e._fulfilled(t))},function(t){e._version===n&&(e._value=void 0,e._rejected(t))})}function w(e,t,n){var r=e._module._runtime;return e._value=t,e._promise=n,e._outputs.forEach(r._updates.add,r._updates),r._compute()}Object.defineProperties(p,{load:{value:a.a,writable:!0,configurable:!0}}),Object.defineProperties(p.prototype,{_compute:{value:function(){return this._computing||(this._computing=this._computeSoon())},writable:!0,configurable:!0},_computeSoon:{value:function(){var e=this;return new Promise(function(t){l(function(){t(),e._computeNow()})})},writable:!0,configurable:!0},_computeNow:{value:function(){var e,t,n=[];(e=new Set(this._dirty)).forEach(function(t){t._inputs.forEach(e.add,e);const n=function(e){if(e._observer!==c.e)return!0;var t=new Set(e._outputs);for(const e of t){if(e._observer!==c.e)return!0;e._outputs.forEach(t.add,t)}return!1}(t);n>t._reachable?this._updates.add(t):n<t._reachable&&t._invalidate(),t._reachable=n},this),(e=new Set(this._updates)).forEach(function(t){t._reachable?(t._indegree=0,t._outputs.forEach(e.add,e)):(t._indegree=-1,e.delete(t))}),this._computing=null,this._updates.clear(),this._dirty.clear(),e.forEach(function(e){e._outputs.forEach(m)}),e.forEach(function(e){0===e._indegree&&n.push(e)});for(;t=n.pop();)_(t),t._outputs.forEach(r),e.delete(t);function r(e){0==--e._indegree&&n.push(e)}e.forEach(function(e){var t=new o.a("circular definition");e._value=void 0,(e._promise=Promise.reject(t)).catch(s.a),e._rejected(t)})},writable:!0,configurable:!0},module:{value:function(e,t=s.a){if(void 0===e)return new u.a(this);let n=this._modules.get(e);return n||(this._modules.set(e,n=e(this,t)),n)},writable:!0,configurable:!0}})}).call(this,n(12).setImmediate)},function(e,t,n){"use strict";var r=function(e){return function(){return e}},o={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},i=0;function a(e){this.id=e,this.href=window.location.href+"#"+e}a.prototype.toString=function(){return"url("+this.href+")"};var u={canvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},context2d:function(e,t,n){null==n&&(n=devicePixelRatio);var r=document.createElement("canvas");r.width=e*n,r.height=t*n,r.style.width=e+"px";var o=r.getContext("2d");return o.scale(n,n),o},download:function(e,t="untitled",n="Save"){const r=document.createElement("a"),o=r.appendChild(document.createElement("button"));async function i(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(r.href),r.removeAttribute("href"),o.textContent=n,o.disabled=!1}return o.textContent=n,r.download=t,r.onclick=async t=>{if(o.disabled=!0,r.href)return i();o.textContent="Saving…";try{const t=await("function"==typeof e?e():e);o.textContent="Download",r.href=URL.createObjectURL(t)}catch(e){o.textContent=n}if(t.eventPhase)return i();o.disabled=!1},r},element:function(e,t){var n,r=e+="",i=r.indexOf(":");i>=0&&"xmlns"!==(r=e.slice(0,i))&&(e=e.slice(i+1));var a=o.hasOwnProperty(r)?document.createElementNS(o[r],e):document.createElement(e);if(t)for(var u in t)i=(r=u).indexOf(":"),n=t[u],i>=0&&"xmlns"!==(r=u.slice(0,i))&&(u=u.slice(i+1)),o.hasOwnProperty(r)?a.setAttributeNS(o[r],u,n):a.setAttribute(u,n);return a},input:function(e){var t=document.createElement("input");return null!=e&&(t.type=e),t},range:function(e,t,n){1===arguments.length&&(t=e,e=null);var r=document.createElement("input");return r.min=e=null==e?0:+e,r.max=t=null==t?1:+t,r.step=null==n?"any":n=+n,r.type="range",r},select:function(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,function(e){var n=document.createElement("option");n.value=n.textContent=e,t.appendChild(n)}),t},svg:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("viewBox",[0,0,e,t]),n.setAttribute("width",e),n.setAttribute("height",t),n},text:function(e){return document.createTextNode(e)},uid:function(e){return new a("O-"+(null==e?"":e+"-")+ ++i)}},s={buffer:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsArrayBuffer(e)})},text:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e)})},url:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsDataURL(e)})}};function c(){return this}function l(e,t){let n=!1;return{[Symbol.iterator]:c,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}var d=function(e){let t,n,r=!1;const o=e(function(e){n?(n(e),n=null):r=!0;return t=e});return{[Symbol.iterator]:c,throw:()=>({done:!0}),return:()=>(null!=o&&o(),{done:!0}),next:function(){return{done:!1,value:r?(r=!1,Promise.resolve(t)):new Promise(e=>n=e)}}}};function f(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];default:return e.value}}var p={disposable:l,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return d(function(t){var n=function(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}(e),r=f(e);function o(){t(f(e))}return e.addEventListener(n,o),void 0!==r&&t(r),function(){e.removeEventListener(n,o)}})},map:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)yield t(n.value,++r)},observe:d,queue:function(e){let t;const n=[],r=e(function(e){n.push(e),t&&(t(n.shift()),t=null);return e});return{[Symbol.iterator]:c,throw:()=>({done:!0}),return:()=>(null!=r&&r(),{done:!0}),next:function(){return{done:!1,value:n.length?Promise.resolve(n.shift()):new Promise(e=>t=e)}}}},range:function*(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n));++r<o;)yield e+r*n},valueAt:function(e,t){if(!(!isFinite(t=+t)||t<0||t!=t|0))for(var n,r=-1;!(n=e.next()).done;)if(++r===t)return n.value},worker:function(e){const t=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),n=new Worker(t);return l(n,()=>{n.terminate(),URL.revokeObjectURL(t)})}};function m(e,t){return function(n){var r,o,i,a,u,s,c,l,d=n[0],f=[],p=null,m=-1;for(u=1,s=arguments.length;u<s;++u){if((r=arguments[u])instanceof Node)f[++m]=r,d+="\x3c!--o:"+m+"--\x3e";else if(Array.isArray(r)){for(c=0,l=r.length;c<l;++c)(o=r[c])instanceof Node?(null===p&&(f[++m]=p=document.createDocumentFragment(),d+="\x3c!--o:"+m+"--\x3e"),p.appendChild(o)):(p=null,d+=o);p=null}else d+=r;d+=n[u]}if(p=e(d),++m>0){for(i=new Array(m),a=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT,null,!1);a.nextNode();)o=a.currentNode,/^o:/.test(o.nodeValue)&&(i[+o.nodeValue.slice(2)]=o);for(u=0;u<m;++u)(o=i[u])&&o.parentNode.replaceChild(f[u],o)}return 1===p.childNodes.length?p.removeChild(p.firstChild):11===p.nodeType?((o=t()).appendChild(p),o):p}}var h=m(function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)},function(){return document.createElement("span")}),v=function(e){return function(){return e("marked@0.3.12/marked.min.js").then(function(t){return m(function(n){var r=document.createElement("div");r.innerHTML=t(n,{langPrefix:""}).trim();var o=r.querySelectorAll("pre code[class]");return o.length>0&&e("@observablehq/highlight.js@1.1.1/highlight.min.js").then(function(e){o.forEach(function(t){e.highlightBlock(t),t.parentNode.classList.add("observablehq--md-pre")})}),r},function(){return document.createElement("div")})})}};function b(e){let t;Object.defineProperties(this,{generator:{value:d(e=>void(t=e))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}var _=function*(){for(;;)yield Date.now()},w=new Map;function g(e,t){var n;return(n=w.get(e=+e))?n.then(r(t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise(function(n){w.delete(t);var r=t-e;if(!(r>0))throw new Error("invalid time");if(r>2147483647)throw new Error("too long to wait");setTimeout(n,r)});return w.set(t,n),n}(n,e).then(r(t))}var y={delay:function(e,t){return new Promise(function(n){setTimeout(function(){n(t)},e)})},tick:function(e,t){return g(Math.ceil((Date.now()+1)/e)*e,t)},when:g};function E(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}const x=new Map,C=[],T=C.map,S=C.some,M=C.hasOwnProperty,j="https://cdn.jsdelivr.net/npm/",L=/^((?:@[^\/@]+\/)?[^\/@]+)(?:@([^\/]+))?(?:\/(.*))?$/,N=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,P=/\.[^\/]*$/,k=["unpkg","jsdelivr","browser","main"];class q extends Error{constructor(e){super(e)}}function O(e){const t=L.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function $(e){const t=`${j}${e.name}${e.version?`@${e.version}`:""}/package.json`;let n=x.get(t);return n||x.set(t,n=fetch(t).then(e=>{if(!e.ok)throw new q("unable to load package.json");return e.redirected&&!x.has(e.url)&&x.set(e.url,n),e.json()})),n}q.prototype.name=q.name;const A=I(async function(e,t){if(e.startsWith(j)&&(e=e.substring(j.length)),/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new q("illegal name");const n=O(e);if(!n)return`${j}${e}`;if(!n.version&&null!=t&&t.startsWith(j)){const e=await $(O(t.substring(j.length)));n.version=e.dependencies&&e.dependencies[n.name]||e.peerDependencies&&e.peerDependencies[n.name]}if(n.path&&!P.test(n.path)&&(n.path+=".js"),n.path&&n.version&&N.test(n.version))return`${j}${n.name}@${n.version}/${n.path}`;const r=await $(n);return`${j}${r.name}@${r.version}/${n.path||function(e){for(const t of k){const n=e[t];if("string"==typeof n)return P.test(n)?n:`${n}.js`}}(r)||"index.js"}`});function I(e){const t=new Map,n=o(null);function r(e){if("string"!=typeof e)return e;let n=t.get(e);return n||t.set(e,n=new Promise((t,n)=>{const r=document.createElement("script");r.onload=()=>{try{t(C.pop()(o(e)))}catch(e){n(new q("invalid module"))}r.remove()},r.onerror=()=>{n(new q("unable to load module")),r.remove()},r.async=!0,r.src=e,window.define=F,document.head.appendChild(r)})),n}function o(t){return n=>Promise.resolve(e(n,t)).then(r)}function i(e){return arguments.length>1?Promise.all(T.call(arguments,n)).then(U):n(e)}return i.alias=function(t){return I((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r))},i.resolve=e,i}function U(e){const t={};for(const n of e)for(const e in n)M.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:D(n,e)}):t[e]=n[e]);return t}function D(e,t){return()=>e[t]}function R(e){return e+""=="exports"}function F(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),C.push(S.call(t,R)?e=>{const r={};return Promise.all(T.call(t,t=>R(t+="")?r:e(t))).then(e=>(n.apply(null,e),r))}:e=>Promise.all(T.call(t,e)).then(e=>"function"==typeof n?n.apply(null,e):n))}F.amd={};var z=function(e){return null==e?A:I(e)},H=m(function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t},function(){return document.createElementNS("http://www.w3.org/2000/svg","g")}),B=String.raw;function W(e){return new Promise(function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onerror=n,r.onload=t,document.head.appendChild(r)})}var G=function(e){return function(){return Promise.all([e("@observablehq/katex@0.10.1/dist/katex.min.js"),e.resolve("@observablehq/katex@0.10.1/dist/katex.min.css").then(W)]).then(function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(B.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n})}},V=function(){return d(function(e){var t=e(document.body.clientWidth);function n(){var n=document.body.clientWidth;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}})};function J(e){const t=z(e);Object.defineProperties(this,{DOM:{value:u,writable:!0,enumerable:!0},Files:{value:s,writable:!0,enumerable:!0},Generators:{value:p,writable:!0,enumerable:!0},html:{value:r(h),writable:!0,enumerable:!0},md:{value:v(t),writable:!0,enumerable:!0},Mutable:{value:r(b),writable:!0,enumerable:!0},now:{value:_,writable:!0,enumerable:!0},Promises:{value:y,writable:!0,enumerable:!0},require:{value:r(t),writable:!0,enumerable:!0},resolve:{value:r(E),writable:!0,enumerable:!0},svg:{value:r(H),writable:!0,enumerable:!0},tex:{value:G(t),writable:!0,enumerable:!0},width:{value:V,writable:!0,enumerable:!0}})}n.d(t,"a",function(){return J})},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=Array.prototype,o=r.map,i=r.forEach},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";t.a=function(e){return e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&"function"==typeof e.next&&"function"==typeof e.return}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(4),o=n(3);function i(e,t,n){if("function"==typeof t&&(n=t,t=null),"function"!=typeof n)throw new Error("invalid observer");null==t&&(t=new r.a);const{modules:i,id:a}=e,u=new Map,s=new o.a(t),c=l(a);function l(e){let t=u.get(e);return t||u.set(e,t=s.module()),t}for(const e of i){const t=l(e.id);let r=0;for(const o of e.variables)o.from?t.import(o.remote,o.name,l(o.from)):t===c?t.variable(n(o,r,e.variables)).define(o.name,o.inputs,o.value):t.define(o.name,o.inputs,o.value),++r}return s}},function(e,t,n){"use strict";var r=n(5),o=n(6),i=n(1),a=n(7),u=function(e){return function(){throw e}},s=n(3),c=n(0);n.d(t,"a",function(){return d});var l=new Map;function d(e){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map}})}function f(e){return e._name}Object.defineProperties(d.prototype,{_copy:{value:function(e,t,n){var r=new d(this._runtime);return n.set(this,r),this._scope.forEach(function(o,i){var u,s=new c.d(o._type,r);if(u=e.get(i))s.import(u.name,u.alias,t);else if(o._definition===a.a){var d=o._inputs[0],p=d._module,m=n.get(p)||p._copy(l,null,n);s.import(d._name,i,m)}else s.define(i,o._inputs.map(f),o._definition)}),r},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);if(!n)if(n=new c.d(c.b,this),this._runtime._builtin._scope.has(e))n.import(e,this._runtime._builtin);else if("invalidation"===e)n.define(e,s.b);else if("visibility"===e)n.define(e,s.c);else{try{t=this._runtime._global(e)}catch(t){return n.define(e,u(t))}void 0===t?this._scope.set(n._name=e,n):n.define(e,Object(o.a)(t))}return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new i.a(e+" is not defined");if(t._type===c.a)throw new i.a(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new c.d(c.c,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=new Map;return r.a.call(e,function(e){"object"!=typeof e&&(e={name:e+""}),null==e.alias&&(e.alias=e.name),n.set(e.alias,e)}),this._copy(n,t,new Map)},writable:!0,configurable:!0},import:{value:function(){var e=new c.d(c.c,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},variable:{value:function(e){return new c.d(c.c,this,e)},writable:!0,configurable:!0}})},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(13),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(8))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,u,s=1,c={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){m(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&m(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return c[s]=o,r(s),s++},f.clearImmediate=p}function p(e){delete c[e]}function m(e){if(l)setTimeout(m,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(14))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,d=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):d=-1,c.length&&p())}function p(){if(!l){var e=u(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++d<t;)s&&s[d].run();d=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||l||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t,n){n=n||{};var r=e.ownerDocument,o=r.defaultView.CustomEvent;"function"==typeof o?o=new o(t,{detail:n}):((o=r.createEvent("Event")).initEvent(t,!1,!1),o.detail=n),e.dispatchEvent(o)}function o(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function i(e){return e===(0|e)+""}function a(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}n.r(t);const u=Symbol.prototype.toString;function s(e){return u.call(e)}const{getOwnPropertySymbols:c,prototype:{hasOwnProperty:l}}=Object,{toStringTag:d}=Symbol,f={},p=c;function m(e,t){return l.call(e,t)}function h(e){return e[d]||e.constructor&&e.constructor.name||"Object"}function v(e,t){try{const n=e[t];return n&&n.constructor,n}catch(e){return f}}const b=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function _(e){try{let t=b.filter(({symbol:t})=>!0===e[t]);if(!t.length)return;const n=t.find(e=>!e.modifier),r="Map"===n.name&&t.find(e=>e.modifier&&e.prefix),o=t.some(e=>e.arrayish),i=t.some(e=>e.setish);return{name:`${r?r.name:""}${n.name}`,symbols:t,arrayish:o&&!i,setish:i}}catch(e){return null}}function w(e,t,n){let i,u,s,c,l=o(e);e instanceof Map?(i=`Map(${e.size})`,u=g):e instanceof Set?(i=`Set(${e.size})`,u=y):l?(i=`${e.constructor.name}(${e.length})`,u=x):(c=_(e))?(i=`Immutable.${c.name}${"Record"===c.name?"":`(${e.size})`}`,l=c.arrayish,u=c.arrayish?C:c.setish?E:S):(i=h(e),u=T);const d=document.createElement("span");d.className="observablehq--expanded",n&&d.appendChild(a(n));const f=d.appendChild(document.createElement("a"));f.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n    <path d='M4 7L0 1h8z' fill='currentColor' />\n  </svg>",f.appendChild(document.createTextNode(`${i}${l?" [":" {"}`)),f.addEventListener("mouseup",function(t){t.stopPropagation(),ie(d,P(e,null,n))}),u=u(e);for(let e=0;!(s=u.next()).done&&e<20;++e)d.appendChild(s.value);if(!s.done){const e=d.appendChild(document.createElement("a"));e.className="observablehq--field",e.style.display="block",e.appendChild(document.createTextNode("  … more")),e.addEventListener("mouseup",function(e){e.stopPropagation(),d.insertBefore(s.value,d.lastChild.previousSibling);for(let e=0;!(s=u.next()).done&&e<19;++e)d.insertBefore(s.value,d.lastChild.previousSibling);s.done&&d.removeChild(d.lastChild.previousSibling),r(d,"load")})}return d.appendChild(document.createTextNode(l?"]":"}")),d}function*g(e){for(const[t,n]of e)yield j(t,n);yield*T(e)}function*y(e){for(const t of e)yield L(t);yield*T(e)}function*E(e){for(const t of e)yield L(t)}function*x(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield M(t,v(e,t),"observablehq--index"));for(const t in e)!i(t)&&m(e,t)&&(yield M(t,v(e,t),"observablehq--key"));for(const t of p(e))yield M(s(t),v(e,t),"observablehq--symbol")}function*C(e){let t=0;for(const n=e.size;t<n;++t)yield M(t,e.get(t),!0)}function*T(e){for(const t in e)m(e,t)&&(yield M(t,v(e,t),"observablehq--key"));for(const t of p(e))yield M(s(t),v(e,t),"observablehq--symbol")}function*S(e){for(const[t,n]of e)yield M(t,n,"observablehq--key")}function M(e,t,n){const r=document.createElement("div"),o=r.appendChild(document.createElement("span"));return r.className="observablehq--field",o.className=n,o.textContent=`  ${e}`,r.appendChild(document.createTextNode(": ")),r.appendChild(oe(t)),r}function j(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode("  ")),n.appendChild(oe(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(oe(t)),n}function L(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode("  ")),t.appendChild(oe(e)),t}function N(e){const t=window.getSelection();return"Range"===t.type&&(t.containsNode(e,!0)||t.anchorNode.isSelfOrDescendant(e)||t.focusNode.isSelfOrDescendant(e))}function P(e,t,n){let r,i,u,s,c=o(e);if(e instanceof Map?(r=`Map(${e.size})`,i=k):e instanceof Set?(r=`Set(${e.size})`,i=q):c?(r=`${e.constructor.name}(${e.length})`,i=A):(s=_(e))?(r=`Immutable.${s.name}${"Record"===s.name?"":`(${e.size})`}`,c=s.arrayish,i=s.arrayish?$:s.setish?O:U):(r=h(e),i=I),t){const t=document.createElement("span");return t.className="observablehq--shallow",n&&t.appendChild(a(n)),t.appendChild(document.createTextNode(r)),t.addEventListener("mouseup",function(n){N(t)||(n.stopPropagation(),ie(t,P(e)))}),t}const l=document.createElement("span");l.className="observablehq--collapsed",n&&l.appendChild(a(n));const d=l.appendChild(document.createElement("a"));d.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n    <path d='M7 4L1 8V0z' fill='currentColor' />\n  </svg>",d.appendChild(document.createTextNode(`${r}${c?" [":" {"}`)),l.addEventListener("mouseup",function(t){N(l)||(t.stopPropagation(),ie(l,w(e,0,n)))},!0),i=i(e);for(let e=0;!(u=i.next()).done&&e<20;++e)e>0&&l.appendChild(document.createTextNode(", ")),l.appendChild(u.value);return u.done||l.appendChild(document.createTextNode(", …")),l.appendChild(document.createTextNode(c?"]":"}")),l}function*k(e){for(const[t,n]of e)yield F(t,n);yield*I(e)}function*q(e){for(const t of e)yield oe(t,!0);yield*I(e)}function*O(e){for(const t of e)yield oe(t,!0)}function*$(e){let t=-1,n=0;for(const r=e.size;n<r;++n)n>t+1&&(yield D(n-t-1)),yield oe(e.get(n),!0),t=n;n>t+1&&(yield D(n-t-1))}function*A(e){let t=-1,n=0;for(const r=e.length;n<r;++n)n in e&&(n>t+1&&(yield D(n-t-1)),yield oe(v(e,n),!0),t=n);n>t+1&&(yield D(n-t-1));for(const t in e)!i(t)&&m(e,t)&&(yield R(t,v(e,t),"observablehq--key"));for(const t of p(e))yield R(s(t),v(e,t),"observablehq--symbol")}function*I(e){for(const t in e)m(e,t)&&(yield R(t,v(e,t),"observablehq--key"));for(const t of p(e))yield R(s(t),v(e,t),"observablehq--symbol")}function*U(e){for(const[t,n]of e)yield R(t,n,"observablehq--key")}function D(e){const t=document.createElement("span");return t.className="observablehq--empty",t.textContent=1===e?"empty":`empty × ${e}`,t}function R(e,t,n){const r=document.createDocumentFragment(),o=r.appendChild(document.createElement("span"));return o.className=n,o.textContent=e,r.appendChild(document.createTextNode(": ")),r.appendChild(oe(t,!0)),r}function F(e,t){const n=document.createDocumentFragment();return n.appendChild(oe(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(oe(t,!0)),n}function z(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function H(e){return e<0?"-"+z(-e,6):e>9999?"+"+z(e,6):z(e,4)}var B=Error.prototype.toString;var W=RegExp.prototype.toString;const G=20;function V(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,J)}function J(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function K(e,t){for(var n=0;t.exec(e);)++n;return n}var Y=Function.prototype.toString,X={prefix:"async ƒ"},Q={prefix:"async ƒ*"},Z={prefix:"class"},ee={prefix:"ƒ"},te={prefix:"ƒ*"};function ne(e,t,n){var r=document.createElement("span");r.className="observablehq--function",n&&r.appendChild(a(n));var o=r.appendChild(document.createElement("span"));return o.className="observablehq--keyword",o.textContent=e.prefix,r.appendChild(document.createTextNode(t)),r}const{prototype:{toString:re}}=Object;function oe(e,t,n,r){let o=typeof e;switch(o){case"boolean":case"undefined":e+="";break;case"number":e=0===e&&1/e<0?"-0":e+"";break;case"bigint":e+="n";break;case"symbol":e=s(e);break;case"function":return function(e,t){var n,r,o=Y.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=X;break;case"AsyncGeneratorFunction":n=Q;break;case"GeneratorFunction":n=te;break;default:n=/^class\b/.test(o)?Z:ee}return n===Z?ne(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(o))?ne(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(o))?ne(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):(r=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(o))?ne(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):ne(n,"(…)",t)}(e,r);case"string":return function(e,t,n,r){if(!1===t){if(K(e,/["\n]/g)<=K(e,/`|\${/g)){const t=document.createElement("span");r&&t.appendChild(a(r));const n=t.appendChild(document.createElement("span"));return n.className="observablehq--string",n.textContent=JSON.stringify(e),t}const o=e.split("\n");if(o.length>G&&!n){const n=document.createElement("div");r&&n.appendChild(a(r));const i=n.appendChild(document.createElement("span"));i.className="observablehq--string",i.textContent="`"+V(o.slice(0,G).join("\n"));const u=n.appendChild(document.createElement("span")),s=o.length-G;return u.textContent=`Show ${s} truncated line${s>1?"s":""}`,u.className="observablehq--string-expand",u.addEventListener("mouseup",function(o){o.stopPropagation(),ie(n,oe(e,t,!0,r))}),n}const i=document.createElement("span");r&&i.appendChild(a(r));const u=i.appendChild(document.createElement("span"));return u.className=`observablehq--string${n?" observablehq--expanded":""}`,u.textContent="`"+V(e)+"`",i}const o=document.createElement("span");r&&o.appendChild(a(r));const i=o.appendChild(document.createElement("span"));return i.className="observablehq--string",i.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),o}(e,t,n,r);default:if(null===e){o=null,e="null";break}if(e instanceof Date){o="date",i=e,e=isNaN(i)?"Invalid Date":function(e){return 0===e.getUTCMilliseconds()&&0===e.getUTCSeconds()&&0===e.getUTCMinutes()&&0===e.getUTCHours()}(i)?H(i.getUTCFullYear())+"-"+z(i.getUTCMonth()+1,2)+"-"+z(i.getUTCDate(),2):H(i.getFullYear())+"-"+z(i.getMonth()+1,2)+"-"+z(i.getDate(),2)+"T"+z(i.getHours(),2)+":"+z(i.getMinutes(),2)+(i.getMilliseconds()?":"+z(i.getSeconds(),2)+"."+z(i.getMilliseconds(),3):i.getSeconds()?":"+z(i.getSeconds(),2):"");break}if(e===f){o="forbidden",e="[forbidden]";break}switch(re.call(e)){case"[object RegExp]":o="regexp",e=function(e){return W.call(e)}(e);break;case"[object Error]":case"[object DOMException]":o="error",e=function(e){return e.stack||B.call(e)}(e);break;default:return(n?w:P)(e,t,r)}}var i;const u=document.createElement("span");r&&u.appendChild(a(r));const c=u.appendChild(document.createElement("span"));return c.className=`observablehq--${o}`,c.textContent=e,u}function ie(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),r(t,"load")}const ae=/\s+\(\d+:\d+\)$/m;class ue{constructor(e){if(!e)throw new Error("invalid node");this._node=e,e.classList.add("observablehq")}pending(){const{_node:e}=this;e.classList.remove("observablehq--error"),e.classList.add("observablehq--running")}fulfilled(e,t){const{_node:n}=this;if((!(e instanceof Element||e instanceof Text)||e.parentNode&&e.parentNode!==n)&&(e=oe(e,!1,n.firstChild&&n.firstChild.classList&&n.firstChild.classList.contains("observablehq--expanded"),t)).classList.add("observablehq--inspect"),n.classList.remove("observablehq--running","observablehq--error"),n.firstChild!==e)if(n.firstChild){for(;n.lastChild!==n.firstChild;)n.removeChild(n.lastChild);n.replaceChild(e,n.firstChild)}else n.appendChild(e);r(n,"update")}rejected(e,t){const{_node:n}=this;for(n.classList.remove("observablehq--running"),n.classList.add("observablehq--error");n.lastChild;)n.removeChild(n.lastChild);var o=document.createElement("div");o.className="observablehq--inspect",t&&o.appendChild(a(t)),o.appendChild(document.createTextNode((e+"").replace(ae,""))),n.appendChild(o),r(n,"error",{error:e})}}ue.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new ue(e.appendChild(document.createElement("div")))}};var se=n(4),ce=(n(1),n(3));const le=()=>{const e=new se.a;return Object.defineProperty(e,"height",{value:de(e.Generators.observe),writable:!0,enumerable:!0}),e},de=e=>(function(){return e(function(e){var t=e(window.innerHeight);function n(){var n=window.innerHeight;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}})}),fe=()=>{let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e},pe=(e,t)=>({pending:()=>{e.classList.add("pending")},fulfilled:n=>{t.resolve(n),e.classList.remove("pending"),e.innerHTML="",n instanceof Node?e.appendChild(n):e.innerText=JSON.stringify(n)},rejected:n=>{t.reject(n),e.classList.remove("pending"),e.classList.add("error"),e.innerText=n.message}});new Set(["canvas","svg","content","chart","map"]);var me=async function(e,{loadAll:t,overrideHeight:n}){document.querySelector("title")||(document.title="Loading notebook...");const r=e.id;let o=[];const i=0!==document.querySelectorAll("[data-cell]").length,a=(le(),new ce.a(le()));let u;if(i)u=a.module(e,e=>{let n;if(e&&(n=document.querySelector(`[data-cell="${e}"]`))){let e=fe();return o.push(e.promise),pe(n,e)}return t});else{const t=fe();o.push(t.promise);const r=document.createElement("div");r.classList.add("content"),document.body.appendChild(r),u=a.module(e,()=>{const e=fe(),o=document.createElement("div");n&&o.classList.add("override-height");const i=pe(o,e);return{pending:()=>{i.pending()},fulfilled:e=>{e instanceof HTMLCanvasElement||e instanceof SVGElement?(t.resolve(),i.fulfilled(e),r.innerHTML="",r.appendChild(o)):i.fulfilled(e)},rejected:e=>{i.rejected(e)}}})}n&&u.redefine("height",()=>null).delete();try{await Promise.all(o),document.querySelectorAll(".loading").forEach(e=>e.remove()),document.querySelector("title")||(document.title=`Observable Press Notebook: ${r}`)}catch(e){console.error(e)}};n.d(t,"initialize",function(){return me});const he=document.querySelector("[data-notebook]").getAttribute("data-notebook"),ve=null!==document.querySelector("[data-load-all]"),be=null!==document.querySelector("[data-override-height]"),_e=`\nimport notebook from '${`https://api.observablehq.com/${he}.js?v=3`}';\n\nobservablePress.initialize(notebook, ${JSON.stringify({loadAll:ve,overrideHeight:be})});\n`,we=document.createElement("script");we.innerHTML=_e,we.setAttribute("type","module"),document.head.appendChild(we)}])});
     1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.observablePress=t():e.observablePress=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"d",(function(){return h}));var r=n(7),i=n(5),o=n(1),s=n(6),a=n(2),l=1,u=2,c=3,d={};function h(e,t,n){var r;null==n&&(n=d),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:m,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:a.a,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:n!==d,writable:!0},_rejector:{value:(r=this,function(e){if(e===m)throw new o.a(r._name+" is not defined",r._name);throw new o.a(r._name+" could not be resolved",r._name)})},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}function f(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function p(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function m(){throw m}function g(e){return function(){throw new o.a(e+" is defined more than once")}}function b(e,t,n){var r=this._module._scope,i=this._module._runtime;if(this._inputs.forEach(p,this),t.forEach(f,this),this._inputs=t,this._definition=n,this._value=void 0,n===a.a?i._variables.delete(this):i._variables.add(this),e==this._name&&r.get(e)===this)this._outputs.forEach(i._updates.add,i._updates);else{var o,s;if(this._name)if(this._outputs.size)r.delete(this._name),(s=this._module._resolve(this._name))._outputs=this._outputs,this._outputs=new Set,s._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(this)]=s}),this),s._outputs.forEach(i._updates.add,i._updates),i._dirty.add(s).add(this),r.set(this._name,s);else if((s=r.get(this._name))===this)r.delete(this._name);else{if(s._type!==c)throw new Error;s._duplicates.delete(this),this._duplicate=void 0,1===s._duplicates.size&&(s=s._duplicates.keys().next().value,o=r.get(this._name),s._outputs=o._outputs,o._outputs=new Set,s._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(o)]=s})),s._definition=s._duplicate,s._duplicate=void 0,i._dirty.add(o).add(s),i._updates.add(s),r.set(this._name,s))}if(this._outputs.size)throw new Error;e&&((s=r.get(e))?s._type===c?(this._definition=g(e),this._duplicate=n,s._duplicates.add(this)):s._type===u?(this._outputs=s._outputs,s._outputs=new Set,this._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(s)]=this}),this),i._dirty.add(s).add(this),r.set(e,this)):(s._duplicate=s._definition,this._duplicate=n,(o=new h(c,this._module))._name=e,o._definition=this._definition=s._definition=g(e),o._outputs=s._outputs,s._outputs=new Set,o._outputs.forEach((function(e){e._inputs[e._inputs.indexOf(s)]=o})),o._duplicates=new Set([this,s]),i._dirty.add(s).add(o),i._updates.add(s).add(o),r.set(e,o)):r.set(e,this)),this._name=e}return i._updates.add(this),i._compute(),this}Object.defineProperties(h.prototype,{_pending:{value:function(){this._observer.pending&&this._observer.pending()},writable:!0,configurable:!0},_fulfilled:{value:function(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)},writable:!0,configurable:!0},_rejected:{value:function(e){this._observer.rejected&&this._observer.rejected(e,this._name)},writable:!0,configurable:!0},define:{value:function(e,t,n){switch(arguments.length){case 1:n=e,e=t=null;break;case 2:n=t,"string"==typeof e?t=null:(t=e,e=null)}return b.call(this,null==e?null:e+"",null==t?[]:r.b.call(t,this._module._resolve,this._module),"function"==typeof n?n:Object(i.a)(n))},writable:!0,configurable:!0},delete:{value:function(){return b.call(this,null,[],a.a)},writable:!0,configurable:!0},import:{value:function(e,t,n){arguments.length<3&&(n=t,t=e);return b.call(this,t+"",[n._resolve(e+"")],s.a)},writable:!0,configurable:!0}})},function(e,t,n){"use strict";function r(e,t){this.message=e+"",this.input=t}n.d(t,"a",(function(){return r})),r.prototype=Object.create(Error.prototype),r.prototype.name="RuntimeError",r.prototype.constructor=r},function(e,t,n){"use strict";t.a=function(){}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return f}));var r=n(4),i=n(1),o=n(10),s=n(11),a=n(8),l=n(2),u=n(0);const c="function"==typeof requestAnimationFrame?requestAnimationFrame:e;var d={},h={};function f(e=new r.b,t=k){var n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:n},_global:{value:t}}),e)for(var i in e)new u.d(u.b,n).define(i,[],e[i])}function p(e){const t=new Set(e._inputs);for(const n of t){if(n===e)return!0;n._inputs.forEach(t.add,t)}return!1}function m(e){++e._indegree}function g(e){--e._indegree}function b(e){return e._promise.catch(e._rejector)}function v(e){return new Promise((function(t){e._invalidate=t}))}function _(e,t){let n,r,i="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,o=!i,s=l.a,a=l.a;return i&&((r=new IntersectionObserver(([e])=>(o=e.isIntersecting)&&(n=null,s()))).observe(i),e.then(()=>(r.disconnect(),r=null,a()))),function(e){return o?Promise.resolve(e):r?(n||(n=new Promise((e,t)=>(s=e,a=t))),n.then(()=>e)):Promise.reject()}}function y(e){e._invalidate(),e._invalidate=l.a,e._pending();var t=e._value,n=++e._version,r=null,i=e._promise=Promise.all(e._inputs.map(b)).then((function(i){if(e._version===n){for(var o=0,s=i.length;o<s;++o)switch(i[o]){case d:i[o]=r=v(e);break;case h:r||(r=v(e)),i[o]=_(r,e)}return e._definition.apply(t,i)}})).then((function(t){return Object(o.a)(t)?((r||v(e)).then((s=t,function(){s.return()})),function(e,t,n,r){function i(){var n=new Promise((function(e){e(r.next())})).then((function(r){return r.done?void 0:Promise.resolve(r.value).then((function(r){if(e._version===t)return w(e,r,n).then(i),e._fulfilled(r),r}))}));n.catch((function(r){e._version===t&&(w(e,void 0,n),e._rejected(r))}))}return new Promise((function(e){e(r.next())})).then((function(e){if(!e.done)return n.then(i),e.value}))}(e,n,i,t)):t;var s}));i.then((function(t){e._version===n&&(e._value=t,e._fulfilled(t))}),(function(t){e._version===n&&(e._value=void 0,e._rejected(t))}))}function w(e,t,n){var r=e._module._runtime;return e._value=t,e._promise=n,e._outputs.forEach(r._updates.add,r._updates),r._compute()}function x(e,t){e._invalidate(),e._invalidate=l.a,e._pending(),++e._version,e._indegree=NaN,(e._promise=Promise.reject(t)).catch(l.a),e._value=void 0,e._rejected(t)}function k(e){return window[e]}Object.defineProperties(f,{load:{value:s.a,writable:!0,configurable:!0}}),Object.defineProperties(f.prototype,{_compute:{value:function(){return this._computing||(this._computing=this._computeSoon())},writable:!0,configurable:!0},_computeSoon:{value:function(){var e=this;return new Promise((function(t){c((function(){t(),e._disposed||e._computeNow()}))}))},writable:!0,configurable:!0},_computeNow:{value:function(){var e,t,n=[];(e=new Set(this._dirty)).forEach((function(t){t._inputs.forEach(e.add,e);const n=function(e){if(e._observer!==u.e)return!0;var t=new Set(e._outputs);for(const e of t){if(e._observer!==u.e)return!0;e._outputs.forEach(t.add,t)}return!1}(t);n>t._reachable?this._updates.add(t):n<t._reachable&&t._invalidate(),t._reachable=n}),this),(e=new Set(this._updates)).forEach((function(t){t._reachable?(t._indegree=0,t._outputs.forEach(e.add,e)):(t._indegree=NaN,e.delete(t))})),this._computing=null,this._updates.clear(),this._dirty.clear(),e.forEach((function(e){e._outputs.forEach(m)}));do{for(e.forEach((function(e){0===e._indegree&&n.push(e)}));t=n.pop();)y(t),t._outputs.forEach(r),e.delete(t);e.forEach((function(t){p(t)&&(x(t,new i.a("circular definition")),t._outputs.forEach(g),e.delete(t))}))}while(e.size);function r(e){0==--e._indegree&&n.push(e)}},writable:!0,configurable:!0},dispose:{value:function(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach(e=>{e._invalidate(),e._version=NaN})},writable:!0,configurable:!0},module:{value:function(e,t=l.a){let n;if(void 0===e)return(n=this._init)?(this._init=null,n):new a.a(this);if(n=this._modules.get(e))return n;this._init=n=new a.a(this),this._modules.set(e,n);try{e(this,t)}finally{this._init=null}return n},writable:!0,configurable:!0},fileAttachments:{value:r.a,writable:!0,configurable:!0}})}).call(this,n(12).setImmediate)},function(e,t,n){"use strict";async function r(e){const t=await fetch(await e.url());if(!t.ok)throw new Error(`Unable to load file: ${e.name}`);return t}class i{constructor(e,t){Object.defineProperties(this,{_url:{value:e},name:{value:t,enumerable:!0}})}async url(){return this._url}async blob(){return(await r(this)).blob()}async arrayBuffer(){return(await r(this)).arrayBuffer()}async text(){return(await r(this)).text()}async json(){return(await r(this)).json()}async stream(){return(await r(this)).body}async image(){const e=await this.url();return new Promise((t,n)=>{const r=new Image;new URL(e,document.baseURI).origin!==new URL(location).origin&&(r.crossOrigin="anonymous"),r.onload=()=>t(r),r.onerror=()=>n(new Error(`Unable to load file: ${this.name}`)),r.src=e})}}function o(e){throw new Error(`File not found: ${e}`)}function s(e){return t=>{const n=e(t+="");if(null==n)throw new Error(`File not found: ${t}`);return new i(n,t)}}var a=function(e){return function(){return e}},l={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},u=0;function c(e){this.id=e,this.href=new URL(`#${e}`,location)+""}c.prototype.toString=function(){return"url("+this.href+")"};var d={canvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},context2d:function(e,t,n){null==n&&(n=devicePixelRatio);var r=document.createElement("canvas");r.width=e*n,r.height=t*n,r.style.width=e+"px";var i=r.getContext("2d");return i.scale(n,n),i},download:function(e,t="untitled",n="Save"){const r=document.createElement("a"),i=r.appendChild(document.createElement("button"));async function o(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(r.href),r.removeAttribute("href"),i.textContent=n,i.disabled=!1}return i.textContent=n,r.download=t,r.onclick=async t=>{if(i.disabled=!0,r.href)return o();i.textContent="Saving…";try{const t=await("function"==typeof e?e():e);i.textContent="Download",r.href=URL.createObjectURL(t)}catch(e){i.textContent=n}if(t.eventPhase)return o();i.disabled=!1},r},element:function(e,t){var n,r=e+="",i=r.indexOf(":");i>=0&&"xmlns"!==(r=e.slice(0,i))&&(e=e.slice(i+1));var o=l.hasOwnProperty(r)?document.createElementNS(l[r],e):document.createElement(e);if(t)for(var s in t)i=(r=s).indexOf(":"),n=t[s],i>=0&&"xmlns"!==(r=s.slice(0,i))&&(s=s.slice(i+1)),l.hasOwnProperty(r)?o.setAttributeNS(l[r],s,n):o.setAttribute(s,n);return o},input:function(e){var t=document.createElement("input");return null!=e&&(t.type=e),t},range:function(e,t,n){1===arguments.length&&(t=e,e=null);var r=document.createElement("input");return r.min=e=null==e?0:+e,r.max=t=null==t?1:+t,r.step=null==n?"any":n=+n,r.type="range",r},select:function(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,(function(e){var n=document.createElement("option");n.value=n.textContent=e,t.appendChild(n)})),t},svg:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("viewBox",[0,0,e,t]),n.setAttribute("width",e),n.setAttribute("height",t),n},text:function(e){return document.createTextNode(e)},uid:function(e){return new c("O-"+(null==e?"":e+"-")+ ++u)}},h={buffer:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsArrayBuffer(e)}))},text:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e)}))},url:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsDataURL(e)}))}};function f(){return this}function p(e,t){let n=!1;return{[Symbol.iterator]:f,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}var m=function(e){let t,n,r=!1;const i=e((function(e){n?(n(e),n=null):r=!0;return t=e}));return{[Symbol.iterator]:f,throw:()=>({done:!0}),return:()=>(null!=i&&i(),{done:!0}),next:function(){return{done:!1,value:r?(r=!1,Promise.resolve(t)):new Promise(e=>n=e)}}}};function g(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];default:return e.value}}var b={disposable:p,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return m((function(t){var n=function(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}(e),r=g(e);function i(){t(g(e))}return e.addEventListener(n,i),void 0!==r&&t(r),function(){e.removeEventListener(n,i)}}))},map:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)yield t(n.value,++r)},observe:m,queue:function(e){let t;const n=[],r=e((function(e){n.push(e),t&&(t(n.shift()),t=null);return e}));return{[Symbol.iterator]:f,throw:()=>({done:!0}),return:()=>(null!=r&&r(),{done:!0}),next:function(){return{done:!1,value:n.length?Promise.resolve(n.shift()):new Promise(e=>t=e)}}}},range:function*(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n));++r<i;)yield e+r*n},valueAt:function(e,t){if(!(!isFinite(t=+t)||t<0||t!=t|0))for(var n,r=-1;!(n=e.next()).done;)if(++r===t)return n.value},worker:function(e){const t=URL.createObjectURL(new Blob([e],{type:"text/javascript"})),n=new Worker(t);return p(n,()=>{n.terminate(),URL.revokeObjectURL(t)})}};function v(e,t){return function(n){var r,i,o,s,a,l,u,c,d=n[0],h=[],f=null,p=-1;for(a=1,l=arguments.length;a<l;++a){if((r=arguments[a])instanceof Node)h[++p]=r,d+="\x3c!--o:"+p+"--\x3e";else if(Array.isArray(r)){for(u=0,c=r.length;u<c;++u)(i=r[u])instanceof Node?(null===f&&(h[++p]=f=document.createDocumentFragment(),d+="\x3c!--o:"+p+"--\x3e"),f.appendChild(i)):(f=null,d+=i);f=null}else d+=r;d+=n[a]}if(f=e(d),++p>0){for(o=new Array(p),s=document.createTreeWalker(f,NodeFilter.SHOW_COMMENT,null,!1);s.nextNode();)i=s.currentNode,/^o:/.test(i.nodeValue)&&(o[+i.nodeValue.slice(2)]=i);for(a=0;a<p;++a)(i=o[a])&&i.parentNode.replaceChild(h[a],i)}return 1===f.childNodes.length?f.removeChild(f.firstChild):11===f.nodeType?((i=t()).appendChild(f),i):f}}var _=v((function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)}),(function(){return document.createElement("span")})),y={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:N,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:N,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:N,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function w(e){this.tokens=[],this.tokens.links={},this.options=e||P.defaults,this.rules=y.normal,this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}y.bullet=/(?:[*+-]|\d+\.)/,y.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,y.item=$(y.item,"gm")(/bull/g,y.bullet)(),y.list=$(y.list)(/bull/g,y.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+y.def.source+")")(),y.blockquote=$(y.blockquote)("def",y.def)(),y._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",y.html=$(y.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,y._tag)(),y.paragraph=$(y.paragraph)("hr",y.hr)("heading",y.heading)("lheading",y.lheading)("blockquote",y.blockquote)("tag","<"+y._tag)("def",y.def)(),y.normal=j({},y),y.gfm=j({},y.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=$(y.paragraph)("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|")(),y.tables=j({},y.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),w.rules=y,w.lex=function(e,t){return new w(t).lex(e)},w.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},w.prototype.token=function(e,t,n){var r,i,o,s,a,l,u,c,d;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].split(/ *\| */);this.tokens.push(l)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:s.length>1}),r=!1,d=(o=o[0].match(this.rules.item)).length,c=0;c<d;c++)u=(l=o[c]).length,~(l=l.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&c!==d-1&&(s===(a=y.bullet.exec(o[c+1])[0])||s.length>1&&a.length>1||(e=o.slice(c+1).join("\n")+e,c=d-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==d-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(l)}else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var x={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:N,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:N,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};function k(e,t){if(this.options=t||P.defaults,this.links=e,this.rules=x.normal,this.renderer=this.options.renderer||new E,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=x.breaks:this.rules=x.gfm:this.options.pedantic&&(this.rules=x.pedantic)}function E(e){this.options=e||{}}function C(e){this.tokens=[],this.token=null,this.options=e||P.defaults,this.options.renderer=this.options.renderer||new E,this.renderer=this.options.renderer,this.renderer.options=this.options}function S(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function $(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=(i=i.source||i).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function T(e,t){return L[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?L[" "+e]=e+"/":L[" "+e]=e.replace(/[^/]*$/,"")),e=L[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}x._inside=/(?:\[[^\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,x._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,x.link=$(x.link)("inside",x._inside)("href",x._href)(),x.reflink=$(x.reflink)("inside",x._inside)(),x.normal=j({},x),x.pedantic=j({},x.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),x.gfm=j({},x.normal,{escape:$(x.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:$(x.text)("]|","~]|")("|","|https?://|")()}),x.breaks=j({},x.gfm,{br:$(x.br)("{2,}","*")(),text:$(x.gfm.text)("{2,}","*")()}),k.rules=x,k.output=function(e,t,n){return new k(t,n).output(e)},k.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=S(":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1])),r=this.mangle("mailto:")+n):r=n=S(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):S(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(S(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(S(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),r=n=S(i[1]),o+=this.renderer.link(r,null,n);return o},k.prototype.outputLink=function(e,t){var n=S(t.href),r=t.title?S(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,S(e[1]))},k.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},k.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},E.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+S(t,!0)+'">'+(n?e:S(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:S(e,!0))+"\n</code></pre>"},E.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},E.prototype.html=function(e){return e},E.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},E.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},E.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},E.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},E.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},E.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},E.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},E.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},E.prototype.strong=function(e){return"<strong>"+e+"</strong>"},E.prototype.em=function(e){return"<em>"+e+"</em>"},E.prototype.codespan=function(e){return"<code>"+e+"</code>"},E.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},E.prototype.del=function(e){return"<del>"+e+"</del>"},E.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(function(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!q.test(e)&&(e=T(this.options.baseUrl,e));var i='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},E.prototype.image=function(e,t,n){this.options.baseUrl&&!q.test(e)&&(e=T(this.options.baseUrl,e));var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},E.prototype.text=function(e){return e},C.parse=function(e,t,n){return new C(t,n).parse(e)},C.prototype.parse=function(e){this.inline=new k(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},C.prototype.next=function(){return this.token=this.tokens.pop()},C.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},C.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},C.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e<this.token.header.length;e++)({header:!0,align:this.token.align[e]}),n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});o+=this.renderer.tablerow(n)}return this.renderer.table(i,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,s);case"list_item_start":for(o="";"list_item_end"!==this.next().type;)o+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(o);case"loose_item_start":for(o="";"list_item_end"!==this.next().type;)o+=this.tok();return this.renderer.listitem(o);case"html":var a=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(a);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}};var L={},q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function N(){}function j(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function P(e,t,n){if(n||"function"==typeof t){n||(n=t,t=null);var r,i,o=(t=j({},P.defaults,t||{})).highlight,s=0;try{r=w.lex(e,t)}catch(e){return n(e)}i=r.length;var a=function(e){if(e)return t.highlight=o,n(e);var i;try{i=C.parse(r,t)}catch(t){e=t}return t.highlight=o,e?n(e):n(null,i)};if(!o||o.length<3)return a();if(delete t.highlight,!i)return a();for(;s<r.length;s++)!function(e){"code"!==e.type?--i||a():o(e.text,e.lang,(function(t,n){return t?a(t):null==n||n===e.text?--i||a():(e.text=n,e.escaped=!0,void(--i||a()))}))}(r[s])}else try{return t&&(t=j({},P.defaults,t)),C.parse(w.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(t||P.defaults).silent)return"<p>An error occurred:</p><pre>"+S(e.message+"",!0)+"</pre>";throw e}}N.exec=N,P.options=P.setOptions=function(e){return j(P.defaults,e),P},P.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new E,xhtml:!1,baseUrl:null},P.Parser=C,P.parser=C.parse,P.Renderer=E,P.Lexer=w,P.lexer=w.lex,P.InlineLexer=k,P.inlineLexer=k.output,P.parse=P;var O=P;const M="https://cdn.jsdelivr.net/npm/@observablehq/highlight.js@2.0.0/";var A=function(e){return function(){return v((function(t){var n=document.createElement("div");n.innerHTML=O(t,{langPrefix:""}).trim();var r=n.querySelectorAll("pre code[class]");return r.length>0&&e(M+"highlight.min.js").then((function(t){r.forEach((function(n){function r(){t.highlightBlock(n),n.parentNode.classList.add("observablehq--md-pre")}t.getLanguage(n.className)?r():e(M+"async-languages/index.js").then(r=>{if(r.has(n.className))return e(M+"async-languages/"+r.get(n.className)).then(e=>{t.registerLanguage(n.className,e)})}).then(r,r)}))})),n}),(function(){return document.createElement("div")}))}};function I(e){let t;Object.defineProperties(this,{generator:{value:m(e=>void(t=e))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}var U=function*(){for(;;)yield Date.now()},R=new Map;function z(e,t){var n;return(n=R.get(e=+e))?n.then(a(t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise((function(n){R.delete(t);var r=t-e;if(!(r>0))throw new Error("invalid time");if(r>2147483647)throw new Error("too long to wait");setTimeout(n,r)}));return R.set(t,n),n}(n,e).then(a(t))}var F={delay:function(e,t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))},tick:function(e,t){return z(Math.ceil((Date.now()+1)/e)*e,t)},when:z};function D(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}const B=new Map,H=[],W=H.map,G=H.some,V=H.hasOwnProperty,J="https://cdn.jsdelivr.net/npm/",K=/^((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(.*))?$/,Y=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,X=/\.[^/]*$/,Q=["unpkg","jsdelivr","browser","main"];class Z extends Error{constructor(e){super(e)}}function ee(e){const t=K.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function te(e){const t=`${J}${e.name}${e.version?`@${e.version}`:""}/package.json`;let n=B.get(t);return n||B.set(t,n=fetch(t).then(e=>{if(!e.ok)throw new Z("unable to load package.json");return e.redirected&&!B.has(e.url)&&B.set(e.url,n),e.json()})),n}Z.prototype.name=Z.name;var ne=re((async function(e,t){if(e.startsWith(J)&&(e=e.substring(J.length)),/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Z("illegal name");const n=ee(e);if(!n)return`${J}${e}`;if(!n.version&&null!=t&&t.startsWith(J)){const e=await te(ee(t.substring(J.length)));n.version=e.dependencies&&e.dependencies[n.name]||e.peerDependencies&&e.peerDependencies[n.name]}if(n.path&&!X.test(n.path)&&(n.path+=".js"),n.path&&n.version&&Y.test(n.version))return`${J}${n.name}@${n.version}/${n.path}`;const r=await te(n);return`${J}${r.name}@${r.version}/${n.path||function(e){for(const t of Q){const n=e[t];if("string"==typeof n)return X.test(n)?n:`${n}.js`}}(r)||"index.js"}`}));function re(e){const t=new Map,n=i(null);function r(e){if("string"!=typeof e)return e;let n=t.get(e);return n||t.set(e,n=new Promise((t,n)=>{const r=document.createElement("script");r.onload=()=>{try{t(H.pop()(i(e)))}catch(e){n(new Z("invalid module"))}r.remove()},r.onerror=()=>{n(new Z("unable to load module")),r.remove()},r.async=!0,r.src=e,window.define=ae,document.head.appendChild(r)})),n}function i(t){return n=>Promise.resolve(e(n,t)).then(r)}function o(e){return arguments.length>1?Promise.all(W.call(arguments,n)).then(ie):n(e)}return o.alias=function(t){return re((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r))},o.resolve=e,o}function ie(e){const t={};for(const n of e)for(const e in n)V.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:oe(n,e)}):t[e]=n[e]);return t}function oe(e,t){return()=>e[t]}function se(e){return"exports"===(e+="")||"module"===e}function ae(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),H.push(G.call(t,se)?e=>{const r={},i={exports:r};return Promise.all(W.call(t,t=>"exports"===(t+="")?r:"module"===t?i:e(t))).then(e=>(n.apply(null,e),i.exports))}:e=>Promise.all(W.call(t,e)).then(e=>"function"==typeof n?n.apply(null,e):n))}ae.amd={};var le=function(e){return null==e?ne:re(e)},ue=v((function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t}),(function(){return document.createElementNS("http://www.w3.org/2000/svg","g")})),ce=String.raw;function de(e){return new Promise((function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onerror=n,r.onload=t,document.head.appendChild(r)}))}var he=function(e){return function(){return Promise.all([e("@observablehq/katex@0.11.1/dist/katex.min.js"),e.resolve("@observablehq/katex@0.11.1/dist/katex.min.css").then(de)]).then((function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(ce.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n}))}},fe=function(){return m((function(e){var t=e(document.body.clientWidth);function n(){var n=document.body.clientWidth;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}}))};function pe(e){const t=le(e);Object.defineProperties(this,{DOM:{value:d,writable:!0,enumerable:!0},FileAttachment:{value:a(o),writable:!0,enumerable:!0},Files:{value:h,writable:!0,enumerable:!0},Generators:{value:b,writable:!0,enumerable:!0},html:{value:a(_),writable:!0,enumerable:!0},md:{value:A(t),writable:!0,enumerable:!0},Mutable:{value:a(I),writable:!0,enumerable:!0},now:{value:U,writable:!0,enumerable:!0},Promises:{value:F,writable:!0,enumerable:!0},require:{value:a(t),writable:!0,enumerable:!0},resolve:{value:a(D),writable:!0,enumerable:!0},svg:{value:a(ue),writable:!0,enumerable:!0},tex:{value:he(t),writable:!0,enumerable:!0},width:{value:fe,writable:!0,enumerable:!0}})}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return pe}))},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";t.a=function(e){return e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=Array.prototype,i=r.map,o=r.forEach},function(e,t,n){"use strict";var r=n(7),i=n(5),o=n(1),s=n(6),a=function(e){return function(){throw e}},l=n(3),u=n(0);function c(e,t=[]){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["invalidation",l.b],["visibility",l.c],...t])},_source:{value:null,writable:!0}})}function d(e){return e._name}n.d(t,"a",(function(){return c})),Object.defineProperties(c.prototype,{_copy:{value:function(e,t){e._source=this,t.set(this,e);for(const[o,a]of this._scope){var n=e._scope.get(o);if(!n||n._type!==u.c)if(a._definition===s.a){var r=a._inputs[0],i=r._module;e.import(r._name,o,t.get(i)||(i._source?i._copy(new c(e._runtime,e._builtins),t):i))}else e.define(o,a._inputs.map(d),a._definition)}return e},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);if(!n)if(n=new u.d(u.b,this),this._builtins.has(e))n.define(e,Object(i.a)(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))n.import(e,this._runtime._builtin);else{try{t=this._runtime._global(e)}catch(t){return n.define(e,a(t))}void 0===t?this._scope.set(n._name=e,n):n.define(e,Object(i.a)(t))}return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new o.a(e+" is not defined");if(t._type===u.a)throw new o.a(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new u.d(u.c,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=new c(this._runtime,this._builtins);return n._source=this,r.a.call(e,(function(e){"object"!=typeof e&&(e={name:e+""}),null==e.alias&&(e.alias=e.name),n.import(e.name,e.alias,t)})),Promise.resolve().then(()=>{const e=new Set([this]);for(const t of e)for(const n of t._scope.values())if(n._definition===s.a){const t=n._inputs[0]._module,r=t._source||t;if(r===this)return void console.warn("circular module definition; ignoring");e.add(r)}this._copy(n,new Map)}),n},writable:!0,configurable:!0},import:{value:function(){var e=new u.d(u.c,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},value:{value:async function(e){var t=this._scope.get(e);if(!t)throw new o.a(e+" is not defined");t._observer===u.e&&(t._observer=!0,this._runtime._dirty.add(t));return await this._runtime._compute(),t._promise},writable:!0,configurable:!0},variable:{value:function(e){return new u.d(u.c,this,e)},writable:!0,configurable:!0},builtin:{value:function(e,t){this._builtins.set(e,t)},writable:!0,configurable:!0}})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&"function"==typeof e.next&&"function"==typeof e.return}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(4),i=n(3);function o(e,t,n){if("function"==typeof t&&(n=t,t=null),"function"!=typeof n)throw new Error("invalid observer");null==t&&(t=new r.b);const{modules:o,id:s}=e,a=new Map,l=new i.a(t),u=c(s);function c(e){let t=a.get(e);return t||a.set(e,t=l.module()),t}for(const e of o){const t=c(e.id);let r=0;for(const i of e.variables)i.from?t.import(i.remote,i.name,c(i.from)):t===u?t.variable(n(i,r,e.variables)).define(i.name,i.inputs,i.value):t.define(i.name,i.inputs,i.value),++r}return l}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(13),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,s,a,l=1,u={},c=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[l]=i,r(l),l++},h.clearImmediate=f}function f(e){delete u[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{f(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(14))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t,n){n=n||{};var r=e.ownerDocument,i=r.defaultView.CustomEvent;"function"==typeof i?i=new i(t,{detail:n}):((i=r.createEvent("Event")).initEvent(t,!1,!1),i.detail=n),e.dispatchEvent(i)}function i(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return e===(0|e)+""}function s(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}n.r(t);const a=Symbol.prototype.toString;function l(e){return a.call(e)}const{getOwnPropertySymbols:u,prototype:{hasOwnProperty:c}}=Object,{toStringTag:d}=Symbol,h={},f=u;function p(e,t){return c.call(e,t)}function m(e){return e[d]||e.constructor&&e.constructor.name||"Object"}function g(e,t){try{const n=e[t];return n&&n.constructor,n}catch(e){return h}}const b=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function v(e){try{let t=b.filter(({symbol:t})=>!0===e[t]);if(!t.length)return;const n=t.find(e=>!e.modifier),r="Map"===n.name&&t.find(e=>e.modifier&&e.prefix),i=t.some(e=>e.arrayish),o=t.some(e=>e.setish);return{name:`${r?r.name:""}${n.name}`,symbols:t,arrayish:i&&!o,setish:o}}catch(e){return null}}const{getPrototypeOf:_,getOwnPropertyDescriptors:y}=Object,w=_({});function x(e,t,n,o){let a,l,u,c,d=i(e);e instanceof Map?(a=`Map(${e.size})`,l=k):e instanceof Set?(a=`Set(${e.size})`,l=E):d?(a=`${e.constructor.name}(${e.length})`,l=S):(c=v(e))?(a=`Immutable.${c.name}${"Record"===c.name?"":`(${e.size})`}`,d=c.arrayish,l=c.arrayish?$:c.setish?C:q):o?(a=m(e),l=T):(a=m(e),l=L);const h=document.createElement("span");h.className="observablehq--expanded",n&&h.appendChild(s(n));const f=h.appendChild(document.createElement("a"));f.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n    <path d='M4 7L0 1h8z' fill='currentColor' />\n  </svg>",f.appendChild(document.createTextNode(`${a}${d?" [":" {"}`)),f.addEventListener("mouseup",(function(t){t.stopPropagation(),ce(h,A(e,null,n,o))})),l=l(e);for(let e=0;!(u=l.next()).done&&e<20;++e)h.appendChild(u.value);if(!u.done){const e=h.appendChild(document.createElement("a"));e.className="observablehq--field",e.style.display="block",e.appendChild(document.createTextNode("  … more")),e.addEventListener("mouseup",(function(e){e.stopPropagation(),h.insertBefore(u.value,h.lastChild.previousSibling);for(let e=0;!(u=l.next()).done&&e<19;++e)h.insertBefore(u.value,h.lastChild.previousSibling);u.done&&h.removeChild(h.lastChild.previousSibling),r(h,"load")}))}return h.appendChild(document.createTextNode(d?"]":"}")),h}function*k(e){for(const[t,n]of e)yield P(t,n);yield*L(e)}function*E(e){for(const t of e)yield O(t);yield*L(e)}function*C(e){for(const t of e)yield O(t)}function*S(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield j(t,g(e,t),"observablehq--index"));for(const t in e)!o(t)&&p(e,t)&&(yield j(t,g(e,t),"observablehq--key"));for(const t of f(e))yield j(l(t),g(e,t),"observablehq--symbol")}function*$(e){let t=0;for(const n=e.size;t<n;++t)yield j(t,e.get(t),!0)}function*T(e){for(const t in y(e))yield j(t,g(e,t),"observablehq--key");for(const t of f(e))yield j(l(t),g(e,t),"observablehq--symbol");const t=_(e);t&&t!==w&&(yield N(t))}function*L(e){for(const t in e)p(e,t)&&(yield j(t,g(e,t),"observablehq--key"));for(const t of f(e))yield j(l(t),g(e,t),"observablehq--symbol");const t=_(e);t&&t!==w&&(yield N(t))}function*q(e){for(const[t,n]of e)yield j(t,n,"observablehq--key")}function N(e){const t=document.createElement("div"),n=t.appendChild(document.createElement("span"));return t.className="observablehq--field",n.className="observablehq--prototype-key",n.textContent="  <prototype>",t.appendChild(document.createTextNode(": ")),t.appendChild(ue(e,void 0,void 0,void 0,!0)),t}function j(e,t,n){const r=document.createElement("div"),i=r.appendChild(document.createElement("span"));return r.className="observablehq--field",i.className=n,i.textContent=`  ${e}`,r.appendChild(document.createTextNode(": ")),r.appendChild(ue(t)),r}function P(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode("  ")),n.appendChild(ue(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(ue(t)),n}function O(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode("  ")),t.appendChild(ue(e)),t}function M(e){const t=window.getSelection();return"Range"===t.type&&(t.containsNode(e,!0)||t.anchorNode.isSelfOrDescendant(e)||t.focusNode.isSelfOrDescendant(e))}function A(e,t,n,r){let o,a,l,u,c=i(e);if(e instanceof Map?(o=`Map(${e.size})`,a=I):e instanceof Set?(o=`Set(${e.size})`,a=U):c?(o=`${e.constructor.name}(${e.length})`,a=F):(u=v(e))?(o=`Immutable.${u.name}${"Record"===u.name?"":`(${e.size})`}`,c=u.arrayish,a=u.arrayish?z:u.setish?R:B):(o=m(e),a=D),t){const t=document.createElement("span");return t.className="observablehq--shallow",n&&t.appendChild(s(n)),t.appendChild(document.createTextNode(o)),t.addEventListener("mouseup",(function(n){M(t)||(n.stopPropagation(),ce(t,A(e)))})),t}const d=document.createElement("span");d.className="observablehq--collapsed",n&&d.appendChild(s(n));const h=d.appendChild(document.createElement("a"));h.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n    <path d='M7 4L1 8V0z' fill='currentColor' />\n  </svg>",h.appendChild(document.createTextNode(`${o}${c?" [":" {"}`)),d.addEventListener("mouseup",(function(t){M(d)||(t.stopPropagation(),ce(d,x(e,0,n,r)))}),!0),a=a(e);for(let e=0;!(l=a.next()).done&&e<20;++e)e>0&&d.appendChild(document.createTextNode(", ")),d.appendChild(l.value);return l.done||d.appendChild(document.createTextNode(", …")),d.appendChild(document.createTextNode(c?"]":"}")),d}function*I(e){for(const[t,n]of e)yield G(t,n);yield*D(e)}function*U(e){for(const t of e)yield ue(t,!0);yield*D(e)}function*R(e){for(const t of e)yield ue(t,!0)}function*z(e){let t=-1,n=0;for(const r=e.size;n<r;++n)n>t+1&&(yield H(n-t-1)),yield ue(e.get(n),!0),t=n;n>t+1&&(yield H(n-t-1))}function*F(e){let t=-1,n=0;for(const r=e.length;n<r;++n)n in e&&(n>t+1&&(yield H(n-t-1)),yield ue(g(e,n),!0),t=n);n>t+1&&(yield H(n-t-1));for(const t in e)!o(t)&&p(e,t)&&(yield W(t,g(e,t),"observablehq--key"));for(const t of f(e))yield W(l(t),g(e,t),"observablehq--symbol")}function*D(e){for(const t in e)p(e,t)&&(yield W(t,g(e,t),"observablehq--key"));for(const t of f(e))yield W(l(t),g(e,t),"observablehq--symbol")}function*B(e){for(const[t,n]of e)yield W(t,n,"observablehq--key")}function H(e){const t=document.createElement("span");return t.className="observablehq--empty",t.textContent=1===e?"empty":`empty × ${e}`,t}function W(e,t,n){const r=document.createDocumentFragment(),i=r.appendChild(document.createElement("span"));return i.className=n,i.textContent=e,r.appendChild(document.createTextNode(": ")),r.appendChild(ue(t,!0)),r}function G(e,t){const n=document.createDocumentFragment();return n.appendChild(ue(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(ue(t,!0)),n}function V(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function J(e){return e<0?"-"+V(-e,6):e>9999?"+"+V(e,6):V(e,4)}var K=Error.prototype.toString;var Y=RegExp.prototype.toString;const X=20;function Q(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,Z)}function Z(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function ee(e,t){for(var n=0;t.exec(e);)++n;return n}var te=Function.prototype.toString,ne={prefix:"async ƒ"},re={prefix:"async ƒ*"},ie={prefix:"class"},oe={prefix:"ƒ"},se={prefix:"ƒ*"};function ae(e,t,n){var r=document.createElement("span");r.className="observablehq--function",n&&r.appendChild(s(n));var i=r.appendChild(document.createElement("span"));return i.className="observablehq--keyword",i.textContent=e.prefix,r.appendChild(document.createTextNode(t)),r}const{prototype:{toString:le}}=Object;function ue(e,t,n,r,i){let o=typeof e;switch(o){case"boolean":case"undefined":e+="";break;case"number":e=0===e&&1/e<0?"-0":e+"";break;case"bigint":e+="n";break;case"symbol":e=l(e);break;case"function":return function(e,t){var n,r,i=te.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=ne;break;case"AsyncGeneratorFunction":n=re;break;case"GeneratorFunction":n=se;break;default:n=/^class\b/.test(i)?ie:oe}return n===ie?ae(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(i))?ae(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))?ae(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):(r=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))?ae(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):ae(n,"(…)",t)}(e,r);case"string":return function(e,t,n,r){if(!1===t){if(ee(e,/["\n]/g)<=ee(e,/`|\${/g)){const t=document.createElement("span");r&&t.appendChild(s(r));const n=t.appendChild(document.createElement("span"));return n.className="observablehq--string",n.textContent=JSON.stringify(e),t}const i=e.split("\n");if(i.length>X&&!n){const n=document.createElement("div");r&&n.appendChild(s(r));const o=n.appendChild(document.createElement("span"));o.className="observablehq--string",o.textContent="`"+Q(i.slice(0,X).join("\n"));const a=n.appendChild(document.createElement("span")),l=i.length-X;return a.textContent=`Show ${l} truncated line${l>1?"s":""}`,a.className="observablehq--string-expand",a.addEventListener("mouseup",(function(i){i.stopPropagation(),ce(n,ue(e,t,!0,r))})),n}const o=document.createElement("span");r&&o.appendChild(s(r));const a=o.appendChild(document.createElement("span"));return a.className=`observablehq--string${n?" observablehq--expanded":""}`,a.textContent="`"+Q(e)+"`",o}const i=document.createElement("span");r&&i.appendChild(s(r));const o=i.appendChild(document.createElement("span"));return o.className="observablehq--string",o.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),i}(e,t,n,r);default:if(null===e){o=null,e="null";break}if(e instanceof Date){o="date",a=e,e=isNaN(a)?"Invalid Date":function(e){return 0===e.getUTCMilliseconds()&&0===e.getUTCSeconds()&&0===e.getUTCMinutes()&&0===e.getUTCHours()}(a)?J(a.getUTCFullYear())+"-"+V(a.getUTCMonth()+1,2)+"-"+V(a.getUTCDate(),2):J(a.getFullYear())+"-"+V(a.getMonth()+1,2)+"-"+V(a.getDate(),2)+"T"+V(a.getHours(),2)+":"+V(a.getMinutes(),2)+(a.getMilliseconds()?":"+V(a.getSeconds(),2)+"."+V(a.getMilliseconds(),3):a.getSeconds()?":"+V(a.getSeconds(),2):"");break}if(e===h){o="forbidden",e="[forbidden]";break}switch(le.call(e)){case"[object RegExp]":o="regexp",e=function(e){return Y.call(e)}(e);break;case"[object Error]":case"[object DOMException]":o="error",e=function(e){return e.stack||K.call(e)}(e);break;default:return(n?x:A)(e,t,r,i)}}var a;const u=document.createElement("span");r&&u.appendChild(s(r));const c=u.appendChild(document.createElement("span"));return c.className=`observablehq--${o}`,c.textContent=e,u}function ce(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),r(t,"load")}const de=/\s+\(\d+:\d+\)$/m;class he{constructor(e){if(!e)throw new Error("invalid node");this._node=e,e.classList.add("observablehq")}pending(){const{_node:e}=this;e.classList.remove("observablehq--error"),e.classList.add("observablehq--running")}fulfilled(e,t){const{_node:n}=this;if((!(e instanceof Element||e instanceof Text)||e.parentNode&&e.parentNode!==n)&&(e=ue(e,!1,n.firstChild&&n.firstChild.classList&&n.firstChild.classList.contains("observablehq--expanded"),t)).classList.add("observablehq--inspect"),n.classList.remove("observablehq--running","observablehq--error"),n.firstChild!==e)if(n.firstChild){for(;n.lastChild!==n.firstChild;)n.removeChild(n.lastChild);n.replaceChild(e,n.firstChild)}else n.appendChild(e);r(n,"update")}rejected(e,t){const{_node:n}=this;for(n.classList.remove("observablehq--running"),n.classList.add("observablehq--error");n.lastChild;)n.removeChild(n.lastChild);var i=document.createElement("div");i.className="observablehq--inspect",t&&i.appendChild(s(t)),i.appendChild(document.createTextNode((e+"").replace(de,""))),n.appendChild(i),r(n,"error",{error:e})}}he.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new he(e.appendChild(document.createElement("div")))}};var fe=n(4),pe=(n(1),n(3));const me=()=>{const e=new fe.b;return Object.defineProperty(e,"height",{value:ge(e.Generators.observe),writable:!0,enumerable:!0}),e},ge=e=>(function(){return e((function(e){var t=e(window.innerHeight);function n(){var n=window.innerHeight;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}}))}),be=()=>{let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e},ve=(e,t)=>({pending:()=>{e.classList.add("pending")},fulfilled:n=>{t.resolve(n),e.classList.remove("pending"),e.innerHTML="",n instanceof Node?e.appendChild(n):e.innerText=JSON.stringify(n)},rejected:n=>{t.reject(n),e.classList.remove("pending"),e.classList.add("error"),e.innerText=n.message}});new Set(["canvas","svg","content","chart","map"]);var _e=async function(e,{loadAll:t,overrideHeight:n}){document.querySelector("title")||(document.title="Loading notebook...");const r=e.id;let i=[];const o=0!==document.querySelectorAll("[data-cell]").length,s=(me(),new pe.a(me()));let a;if(o)a=s.module(e,e=>{let n;if(e&&(n=document.querySelector(`[data-cell="${e}"]`))){let e=be();return i.push(e.promise),ve(n,e)}return t});else{const t=be();i.push(t.promise);const r=document.createElement("div");r.classList.add("content"),document.body.appendChild(r),a=s.module(e,()=>{const e=be(),i=document.createElement("div");n&&i.classList.add("override-height");const o=ve(i,e);return{pending:()=>{o.pending()},fulfilled:e=>{e instanceof HTMLCanvasElement||e instanceof SVGElement?(t.resolve(),o.fulfilled(e),r.innerHTML="",r.appendChild(i)):o.fulfilled(e)},rejected:e=>{o.rejected(e)}}})}n&&a.redefine("height",()=>null).delete();try{await Promise.all(i),document.querySelectorAll(".loading").forEach(e=>e.remove()),document.querySelector("title")||(document.title=`Observable Press Notebook: ${r}`)}catch(e){console.error(e)}};n.d(t,"initialize",(function(){return _e}));const ye=document.querySelector("[data-notebook]").getAttribute("data-notebook"),we=null!==document.querySelector("[data-load-all]"),xe=null!==document.querySelector("[data-override-height]"),ke=`\nimport notebook from '${`https://api.observablehq.com/${ye}.js?v=3`}';\n\nobservablePress.initialize(notebook, ${JSON.stringify({loadAll:we,overrideHeight:xe})});\n`,Ee=document.createElement("script");Ee.innerHTML=ke,Ee.setAttribute("type","module"),document.head.appendChild(Ee)}])}));
Note: See TracChangeset for help on using the changeset viewer.