@observablehq/runtime
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -1,2 +0,2 @@ | ||
// @observablehq/runtime v3.0.0 Copyright 2018 Observable, Inc. | ||
// @observablehq/runtime v3.0.1 Copyright 2018 Observable, Inc. | ||
function e(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 t(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 n(e){return e===(0|e)+""}function r(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}const o=Symbol.prototype.toString;function i(e){return o.call(e)}const{getOwnPropertySymbols:a,prototype:{hasOwnProperty:u}}=Object,{toStringTag:l}=Symbol,s={},c=a;function d(e,t){return u.call(e,t)}function f(e){return e[l]||e.constructor&&e.constructor.name||"Object"}function p(e,t){try{const n=e[t];return n&&n.constructor,n}catch(e){return s}}function h(n,o,i){const a=t(n);let u,l,s;n instanceof Map?(u=`Map(${n.size})`,l=m):n instanceof Set?(u=`Set(${n.size})`,l=v):a?(u=`${n.constructor.name}(${n.length})`,l=b):(u=f(n),l=w);const c=document.createElement("span");c.className="observablehq--expanded",i&&c.appendChild(r(i));const d=c.appendChild(document.createElement("a"));d.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M4 7L0 1h8z' fill='currentColor' />\n </svg>",d.appendChild(document.createTextNode(`${u}${a?" [":" {"}`)),d.addEventListener("mouseup",function(e){e.stopPropagation(),B(c,x(n,null,i))}),l=l(n);for(let e=0;!(s=l.next()).done&&e<20;++e)c.appendChild(s.value);if(!s.done){const t=c.appendChild(document.createElement("a"));t.className="observablehq--field",t.style.display="block",t.appendChild(document.createTextNode(" … more")),t.addEventListener("mouseup",function(t){t.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let e=0;!(s=l.next()).done&&e<19;++e)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),e(c,"load")})}return c.appendChild(document.createTextNode(a?"]":"}")),c}function*m(e){for(const[t,n]of e)yield g(t,n);yield*w(e)}function*v(e){for(const t of e)yield y(t);yield*w(e)}function*b(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield _(t,p(e,t),"observablehq--index"));for(const t in e)!n(t)&&d(e,t)&&(yield _(t,p(e,t),"observablehq--key"));for(const t of c(e))yield _(i(t),p(e,t),"observablehq--symbol")}function*w(e){for(const t in e)d(e,t)&&(yield _(t,p(e,t),"observablehq--key"));for(const t of c(e))yield _(i(t),p(e,t),"observablehq--symbol")}function _(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(W(t)),r}function g(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode(" ")),n.appendChild(W(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(W(t)),n}function y(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(W(e)),t}function x(e,n,o){const i=t(e);let a,u,l;if(e instanceof Map?(a=`Map(${e.size})`,u=E):e instanceof Set?(a=`Set(${e.size})`,u=C):i?(a=`${e.constructor.name}(${e.length})`,u=N):(a=f(e),u=P),n){const t=document.createElement("span");return t.className="observablehq--shallow",o&&t.appendChild(r(o)),t.appendChild(document.createTextNode(a)),t.addEventListener("mouseup",function(n){n.stopPropagation(),B(t,x(e))}),t}const s=document.createElement("span");s.className="observablehq--collapsed",o&&s.appendChild(r(o));const c=s.appendChild(document.createElement("a"));c.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M7 4L1 8V0z' fill='currentColor' />\n </svg>",c.appendChild(document.createTextNode(`${a}${i?" [":" {"}`)),s.addEventListener("mouseup",function(t){t.stopPropagation(),B(s,h(e,0,o))},!0),u=u(e);for(let e=0;!(l=u.next()).done&&e<20;++e)e>0&&s.appendChild(document.createTextNode(", ")),s.appendChild(l.value);return l.done||s.appendChild(document.createTextNode(", …")),s.appendChild(document.createTextNode(i?"]":"}")),s}function*E(e){for(const[t,n]of e)yield k(t,n);yield*P(e)}function*C(e){for(const t of e)yield W(t,!0);yield*P(e)}function*N(e){for(let t=-1,n=0,r=e.length;n<r;++n)if(n in e){let r=n-t-1;if(r>0){const e=document.createElement("span");e.className="observablehq--empty",e.textContent=1===r?"empty":`empty × ${n-t-1}`,yield e}yield W(p(e,n),!0),t=n}for(const t in e)!n(t)&&d(e,t)&&(yield S(t,p(e,t),"observablehq--key"));for(const t of c(e))yield S(i(t),p(e,t),"observablehq--symbol")}function*P(e){for(const t in e)d(e,t)&&(yield S(t,p(e,t),"observablehq--key"));for(const t of c(e))yield S(i(t),p(e,t),"observablehq--symbol")}function S(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(W(t,!0)),r}function k(e,t){const n=document.createDocumentFragment();return n.appendChild(W(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(W(t,!0)),n}function q(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}var j=Error.prototype.toString;var $=RegExp.prototype.toString;const L=20;function M(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,O)}function O(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 A(e,t){for(var n=0;t.exec(e);)++n;return n}var T=Function.prototype.toString,R={prefix:"async ƒ"},D={prefix:"async ƒ*"},F={prefix:"class"},U={prefix:"ƒ"},z={prefix:"ƒ*"};function H(e,t,n){var o=document.createElement("span");o.className="observablehq--function",n&&o.appendChild(r(n));var i=o.appendChild(document.createElement("span"));return i.className="observablehq--keyword",i.textContent=e.prefix,o.appendChild(document.createTextNode(t)),o}const{prototype:{toString:I}}=Object;function W(e,t,n,o){let a=typeof e;switch(a){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=i(e);break;case"function":return function(e,t){var n,r,o=T.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=R;break;case"AsyncGeneratorFunction":n=D;break;case"GeneratorFunction":n=z;break;default:n=/^class\b/.test(o)?F:U}return n===F?H(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(o))?H(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(o))?H(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))?H(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):H(n,"(…)",t)}(e,o);case"string":return function(e,t,n,o){if(!1===t){if(A(e,/["\n]/g)<=A(e,/`|\${/g)){const t=document.createElement("span");o&&t.appendChild(r(o));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>L&&!n){const n=document.createElement("div");o&&n.appendChild(r(o));const a=n.appendChild(document.createElement("span"));a.className="observablehq--string",a.textContent="`"+M(i.slice(0,L).join("\n"));const u=n.appendChild(document.createElement("span")),l=i.length-L;return u.textContent=`Show ${l} truncated line${l>1?"s":""}`,u.className="observablehq--string-expand",u.addEventListener("mouseup",function(r){r.stopPropagation(),B(n,W(e,t,!0,o))}),n}const a=document.createElement("span");o&&a.appendChild(r(o));const u=a.appendChild(document.createElement("span"));return u.className=`observablehq--string${n?" observablehq--expanded":""}`,u.textContent="`"+M(e)+"`",a}const i=document.createElement("span");o&&i.appendChild(r(o));const a=i.appendChild(document.createElement("span"));return a.className="observablehq--string",a.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),i}(e,t,n,o);default:if(null===e){a=null,e="null";break}if(e instanceof Date){a="date",u=e,e=isNaN(u)?"Invalid Date":q(u.getFullYear(),4)+"-"+q(u.getMonth()+1,2)+"-"+q(u.getDate(),2)+(u.getMilliseconds()?"T"+q(u.getHours(),2)+":"+q(u.getMinutes(),2)+":"+q(u.getSeconds(),2)+"."+q(u.getMilliseconds(),3):u.getSeconds()?"T"+q(u.getHours(),2)+":"+q(u.getMinutes(),2)+":"+q(u.getSeconds(),2):u.getMinutes()||u.getHours()?"T"+q(u.getHours(),2)+":"+q(u.getMinutes(),2):"");break}if(e===s){a="forbidden",e="[forbidden]";break}switch(I.call(e)){case"[object RegExp]":a="regexp",e=function(e){return $.call(e)}(e);break;case"[object Error]":case"[object DOMException]":a="error",e=function(e){return e.stack||j.call(e)}(e);break;default:return(n?h:x)(e,t,o)}}var u;const l=document.createElement("span");o&&l.appendChild(r(o));const c=l.appendChild(document.createElement("span"));return c.className=`observablehq--${a}`,c.textContent=e,l}function B(t,n){t.classList.contains("observablehq--inspect")&&n.classList.add("observablehq--inspect"),t.parentNode.replaceChild(n,t),e(n,"load")}const V=/\s+\(\d+:\d+\)$/m;class G{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(t,n){const{_node:r}=this;if((!(t instanceof Element||t instanceof Text)||t.parentNode&&t.parentNode!==r)&&(t=W(t,!1,r.firstChild&&r.firstChild.classList&&r.firstChild.classList.contains("observablehq--expanded"),n)).classList.add("observablehq--inspect"),r.classList.remove("observablehq--running","observablehq--error"),r.firstChild!==t)if(r.firstChild){for(;r.lastChild!==r.firstChild;)r.removeChild(r.lastChild);r.replaceChild(t,r.firstChild)}else r.appendChild(t);e(r,"update")}rejected(t,n){const{_node:o}=this;for(o.classList.remove("observablehq--running"),o.classList.add("observablehq--error");o.lastChild;)o.removeChild(o.lastChild);var i=document.createElement("div");i.className="observablehq--inspect",n&&i.appendChild(r(n)),i.appendChild(document.createTextNode((t+"").replace(V,""))),o.appendChild(i),e(o,"error",{error:t})}}function J(e){return function(){return e}}G.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new G(e.appendChild(document.createElement("div")))}};var X={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/"};var Y=0;function K(e){this.id=e,this.href=window.location.href+"#"+e}K.prototype.toString=function(){return"url("+this.href+")"};var Q={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,n){var r=document.createElement("a");return r.appendChild(document.createElement("button")).textContent=null==n?"Download":n,r.download=null==t?"untitled":t,r.onclick=function(){var t=r.href=URL.createObjectURL(e);setTimeout(function(){URL.revokeObjectURL(t)},50)},r},element:function(e,t){var n,r=e+="",o=r.indexOf(":");o>=0&&"xmlns"!==(r=e.slice(0,o))&&(e=e.slice(o+1));var i=X.hasOwnProperty(r)?document.createElementNS(X[r],e):document.createElement(e);if(t)for(var a in t)o=(r=a).indexOf(":"),n=t[a],o>=0&&"xmlns"!==(r=a.slice(0,o))&&(a=a.slice(o+1)),X.hasOwnProperty(r)?i.setAttributeNS(X[r],a,n):i.setAttribute(a,n);return i},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 K("O-"+(null==e?"":e+"-")+ ++Y)}};var Z={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 ee(){return this}function te(e,t){let n=!1;return{[Symbol.iterator]:ee,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}function ne(e){let t,n,r=!1;const o=e(function(e){n?(n(e),n=null):r=!0;return t=e});return{[Symbol.iterator]:ee,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 re(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 oe={disposable:te,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return ne(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=re(e);function o(){t(re(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:ne,queue:function(e){let t;const n=[],r=e(function(e){return n.push(e),t&&(t(n.shift()),t=null),e});return{[Symbol.iterator]:ee,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 te(n,()=>{n.terminate(),URL.revokeObjectURL(t)})}};function ie(e,t){return function(n){var r,o,i,a,u,l,s,c,d=n[0],f=[],p=null,h=-1;for(u=1,l=arguments.length;u<l;++u){if((r=arguments[u])instanceof Node)f[++h]=r,d+="\x3c!--o:"+h+"--\x3e";else if(Array.isArray(r)){for(s=0,c=r.length;s<c;++s)(o=r[s])instanceof Node?(null===p&&(f[++h]=p=document.createDocumentFragment(),d+="\x3c!--o:"+h+"--\x3e"),p.appendChild(o)):(p=null,d+=o);p=null}else d+=r;d+=n[u]}if(p=e(d),++h>0){for(i=new Array(h),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<h;++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 ae=ie(function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)},function(){return document.createElement("span")});function ue(e){return function(){return e("marked@0.3.12/marked.min.js").then(function(t){return ie(function(n){var r=document.createElement("span");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("span")})})}}function le(e){let t;Object.defineProperties(this,{generator:{value:ne(e=>void(t=e))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}function*se(){for(;;)yield Date.now()}var ce=new Map;function de(e,t){var n;return(n=ce.get(e=+e))?n.then(J(t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise(function(n){ce.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 ce.set(t,n),n}(n,e).then(J(t))}var fe={delay:function(e,t){return new Promise(function(n){setTimeout(function(){n(t)},e)})},tick:function(e,t){return de(Math.ceil((Date.now()+1)/e)*e,t)},when:de};function pe(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 he=new Map,me=[],ve=me.map,be=me.some,we=me.hasOwnProperty,_e="https://unpkg.com/",ge=/^((?:@[^\/@]+\/)?[^\/@]+)(?:@([^\/]+))?(?:\/(.*))?$/,ye=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/;class RequireError extends Error{constructor(e){super(e)}}function xe(e){return"string"==typeof e?e:""}function Ee(e){const t=ge.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function Ce(e){const t=`${_e}${e.name}${e.version?`@${e.version}`:""}/package.json`;let n=he.get(t);return n||he.set(t,n=fetch(t).then(e=>{if(!e.ok)throw new RequireError("unable to load package.json");return e.redirected&&!he.has(e.url)&&he.set(e.url,n),e.json()})),n}RequireError.prototype.name=RequireError.name;const Ne=Pe(async function(e,t){if(e.startsWith(_e)&&(e=e.substring(_e.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 RequireError("illegal name");const n=Ee(e);if(!n)return`${_e}${e}`;if(!n.version&&null!=t&&t.startsWith(_e)){const e=await Ce(Ee(t.substring(_e.length)));n.version=e.dependencies&&e.dependencies[n.name]||e.peerDependencies&&e.peerDependencies[n.name]}if(n.path&&n.version&&ye.test(n.version))return`${_e}${n.name}@${n.version}/${n.path}`;const r=await Ce(n);return`${_e}${r.name}@${r.version}/${n.path||xe(r.unpkg)||xe(r.browser)||xe(r.main)||"index.js"}`});function Pe(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(me.pop()(o(e)))}catch(e){n(new RequireError("invalid module"))}r.remove()}),r.onerror=(()=>{n(new RequireError("unable to load module")),r.remove()}),r.async=!0,r.src=e,window.define=je,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(ve.call(arguments,n)).then(Se):n(e)}return i.alias=function(t){return Pe((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r))},i.resolve=e,i}function Se(e){const t={};for(const n of e)for(const e in n)we.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:ke(n,e)}):t[e]=n[e]);return t}function ke(e,t){return()=>e[t]}function qe(e){return e+""=="exports"}function je(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),me.push(be.call(t,qe)?e=>{const r={};return Promise.all(ve.call(t,t=>qe(t+="")?r:e(t))).then(e=>(n.apply(null,e),r))}:e=>Promise.all(ve.call(t,e)).then(e=>"function"==typeof n?n.apply(null,e):n))}function $e(e){return null==e?Ne:Pe(e)}je.amd={};var Le=ie(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")}),Me=String.raw;function Oe(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)})}function Ae(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(Oe)]).then(function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(Me.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n})}}function Te(){return ne(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 Re(e){const t=$e(e);Object.defineProperties(this,{DOM:{value:Q,writable:!0,enumerable:!0},Files:{value:Z,writable:!0,enumerable:!0},Generators:{value:oe,writable:!0,enumerable:!0},html:{value:J(ae),writable:!0,enumerable:!0},md:{value:ue(t),writable:!0,enumerable:!0},Mutable:{value:J(le),writable:!0,enumerable:!0},now:{value:se,writable:!0,enumerable:!0},Promises:{value:fe,writable:!0,enumerable:!0},require:{value:J(t),writable:!0,enumerable:!0},resolve:{value:J(pe),writable:!0,enumerable:!0},svg:{value:J(Le),writable:!0,enumerable:!0},tex:{value:Ae(t),writable:!0,enumerable:!0},width:{value:Te,writable:!0,enumerable:!0}})}function De(e,t){this.message=e+"",this.input=t}De.prototype=Object.create(Error.prototype),De.prototype.name="RuntimeError",De.prototype.constructor=De;var Fe=Array.prototype,Ue=Fe.map,ze=Fe.forEach;function He(e){return function(){return e}}function Ie(e){return e}function We(){}var Be=1,Ve=2,Ge=3,Je={};function Xe(e,t,n){var r;null==n&&(n=Je),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:Qe,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:We,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!==Je,writable:!0},_rejector:{value:(r=this,function(e){if(e===Qe)throw new De(r._name+" is not defined",r._name);throw new De(r._name+" could not be resolved",r._name)})},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}function Ye(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function Ke(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function Qe(){throw Qe}function Ze(e){return function(){throw new De(e+" is defined more than once")}}function et(e,t,n){var r=this._module._scope,o=this._module._runtime;if(this._inputs.forEach(Ke,this),t.forEach(Ye,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!==Ge)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===Ge?(this._definition=Ze(e),this._duplicate=n,a._duplicates.add(this)):a._type===Ve?(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 Xe(Ge,this._module))._name=e,i._definition=this._definition=a._definition=Ze(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(Xe.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 et.call(this,null==e?null:e+"",null==t?[]:Ue.call(t,this._module._resolve,this._module),"function"==typeof n?n:He(n))},writable:!0,configurable:!0},delete:{value:function(){return et.call(this,null,[],We)},writable:!0,configurable:!0},import:{value:function(e,t,n){arguments.length<3&&(n=t,t=e);return et.call(this,t+"",[n._resolve(e+"")],Ie)},writable:!0,configurable:!0}});var tt=new Map;function nt(e){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map}})}function rt(e){return e._name}Object.defineProperties(nt.prototype,{_copy:{value:function(e,t,n){var r=new nt(this._runtime);return n.set(this,r),this._scope.forEach(function(o,i){var a,u=new Xe(o._type,r);if(a=e.get(i))u.import(a.name,a.alias,t);else if(o._definition===Ie){var l=o._inputs[0],s=l._module,c=n.get(s)||s._copy(tt,null,n);u.import(l._name,i,c)}else u.define(i,o._inputs.map(rt),o._definition)}),r},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);n||(n=new Xe(Ve,this),this._runtime._builtin._scope.has(e)?n.import(e,this._runtime._builtin):void 0!==(t=this._runtime._global(e))?n.define(e,He(t)):"invalidation"===e?n.define(e,ot):"visibility"===e?n.define(e,it):this._scope.set(n._name=e,n));return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new De(e+" is not defined");if(t._type===Ge)throw new De(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new Xe(Be,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=new Map;return ze.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 Xe(Be,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},variable:{value:function(e){return new Xe(Be,this,e)},writable:!0,configurable:!0}});var ot={},it={};function at(e=new Re,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 r in e)new Xe(Ve,n).define(r,[],e[r])}function ut(e){++e._indegree}function lt(e){return e._promise.catch(e._rejector)}function st(e){return new Promise(function(t){e._invalidate=t})}function ct(e,t){let n,r,o="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,i=!o,a=We,u=We;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 dt(e){e._invalidate(),e._invalidate=We,e._pending();var t=e._value,n=++e._version,r=null,o=e._promise=Promise.all(e._inputs.map(lt)).then(function(o){if(e._version===n){for(var i=0,a=o.length;i<a;++i)switch(o[i]){case ot:o[i]=r=st(e);break;case it:r||(r=st(e)),o[i]=ct(r,e)}return e._definition.apply(t,o)}}).then(function(t){return function(e){return e&&"function"==typeof e.next&&"function"==typeof e.return}(t)?((r||st(e)).then((i=t,function(){i.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 ft(e,r,n).then(o),e._fulfilled(r),r})});n.catch(function(r){e._version===t&&(ft(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 i});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 ft(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(at,{load:{value:function(e,t,n){if("function"==typeof t&&(n=t,t=null),"function"!=typeof n)throw new Error("invalid observer");null==t&&(t=new Re);const{modules:r,id:o}=e,i=new Map,a=new at(t),u=l(o);function l(e){let t=i.get(e);return t||i.set(e,t=a.module()),t}for(const e of r){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===u?t.variable(n(o,r,e.variables)).define(o.name,o.inputs,o.value):t.define(o.name,o.inputs,o.value),++r}return a},writable:!0,configurable:!0}}),Object.defineProperties(at.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){requestAnimationFrame(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!==Je)return!0;var t=new Set(e._outputs);for(const e of t){if(e._observer!==Je)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(ut)}),e.forEach(function(e){0===e._indegree&&n.push(e)});for(;t=n.pop();)dt(t),t._outputs.forEach(r),e.delete(t);function r(e){0==--e._indegree&&n.push(e)}e.forEach(function(e){var t=new De("circular definition");e._value=void 0,(e._promise=Promise.reject(t)).catch(We),e._rejected(t)})},writable:!0,configurable:!0},module:{value:function(e,t=We){if(void 0===e)return new nt(this);let n=this._modules.get(e);return n||(this._modules.set(e,n=e(this,t)),n)},writable:!0,configurable:!0}});export{G as Inspector,Re as Library,at as Runtime,De as RuntimeError}; |
@@ -1,2 +0,2 @@ | ||
// @observablehq/runtime v3.0.0 Copyright 2018 Observable, Inc. | ||
// @observablehq/runtime v3.0.1 Copyright 2018 Observable, Inc. | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.observablehq=e.observablehq||{})}(this,function(e){"use strict";function t(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 n(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 r(e){return e===(0|e)+""}function o(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}const i=Symbol.prototype.toString;function a(e){return i.call(e)}const{getOwnPropertySymbols:u,prototype:{hasOwnProperty:l}}=Object,{toStringTag:s}=Symbol,c={},d=u;function f(e,t){return l.call(e,t)}function p(e){return e[s]||e.constructor&&e.constructor.name||"Object"}function h(e,t){try{const n=e[t];return n&&n.constructor,n}catch(e){return c}}function m(e,r,i){const a=n(e);let u,l,s;e instanceof Map?(u=`Map(${e.size})`,l=v):e instanceof Set?(u=`Set(${e.size})`,l=b):a?(u=`${e.constructor.name}(${e.length})`,l=w):(u=p(e),l=_);const c=document.createElement("span");c.className="observablehq--expanded",i&&c.appendChild(o(i));const d=c.appendChild(document.createElement("a"));d.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M4 7L0 1h8z' fill='currentColor' />\n </svg>",d.appendChild(document.createTextNode(`${u}${a?" [":" {"}`)),d.addEventListener("mouseup",function(t){t.stopPropagation(),V(c,E(e,null,i))}),l=l(e);for(let e=0;!(s=l.next()).done&&e<20;++e)c.appendChild(s.value);if(!s.done){const e=c.appendChild(document.createElement("a"));e.className="observablehq--field",e.style.display="block",e.appendChild(document.createTextNode(" … more")),e.addEventListener("mouseup",function(e){e.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let e=0;!(s=l.next()).done&&e<19;++e)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),t(c,"load")})}return c.appendChild(document.createTextNode(a?"]":"}")),c}function*v(e){for(const[t,n]of e)yield y(t,n);yield*_(e)}function*b(e){for(const t of e)yield x(t);yield*_(e)}function*w(e){for(let t=0,n=e.length;t<n;++t)t in e&&(yield g(t,h(e,t),"observablehq--index"));for(const t in e)!r(t)&&f(e,t)&&(yield g(t,h(e,t),"observablehq--key"));for(const t of d(e))yield g(a(t),h(e,t),"observablehq--symbol")}function*_(e){for(const t in e)f(e,t)&&(yield g(t,h(e,t),"observablehq--key"));for(const t of d(e))yield g(a(t),h(e,t),"observablehq--symbol")}function g(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(B(t)),r}function y(e,t){const n=document.createElement("div");return n.className="observablehq--field",n.appendChild(document.createTextNode(" ")),n.appendChild(B(e)),n.appendChild(document.createTextNode(" => ")),n.appendChild(B(t)),n}function x(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(B(e)),t}function E(e,t,r){const i=n(e);let a,u,l;if(e instanceof Map?(a=`Map(${e.size})`,u=C):e instanceof Set?(a=`Set(${e.size})`,u=N):i?(a=`${e.constructor.name}(${e.length})`,u=q):(a=p(e),u=P),t){const t=document.createElement("span");return t.className="observablehq--shallow",r&&t.appendChild(o(r)),t.appendChild(document.createTextNode(a)),t.addEventListener("mouseup",function(n){n.stopPropagation(),V(t,E(e))}),t}const s=document.createElement("span");s.className="observablehq--collapsed",r&&s.appendChild(o(r));const c=s.appendChild(document.createElement("a"));c.innerHTML="<svg width=8 height=8 class='observablehq--caret'>\n <path d='M7 4L1 8V0z' fill='currentColor' />\n </svg>",c.appendChild(document.createTextNode(`${a}${i?" [":" {"}`)),s.addEventListener("mouseup",function(t){t.stopPropagation(),V(s,m(e,0,r))},!0),u=u(e);for(let e=0;!(l=u.next()).done&&e<20;++e)e>0&&s.appendChild(document.createTextNode(", ")),s.appendChild(l.value);return l.done||s.appendChild(document.createTextNode(", …")),s.appendChild(document.createTextNode(i?"]":"}")),s}function*C(e){for(const[t,n]of e)yield k(t,n);yield*P(e)}function*N(e){for(const t of e)yield B(t,!0);yield*P(e)}function*q(e){for(let t=-1,n=0,r=e.length;n<r;++n)if(n in e){let r=n-t-1;if(r>0){const e=document.createElement("span");e.className="observablehq--empty",e.textContent=1===r?"empty":`empty × ${n-t-1}`,yield e}yield B(h(e,n),!0),t=n}for(const t in e)!r(t)&&f(e,t)&&(yield S(t,h(e,t),"observablehq--key"));for(const t of d(e))yield S(a(t),h(e,t),"observablehq--symbol")}function*P(e){for(const t in e)f(e,t)&&(yield S(t,h(e,t),"observablehq--key"));for(const t of d(e))yield S(a(t),h(e,t),"observablehq--symbol")}function S(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(B(t,!0)),r}function k(e,t){const n=document.createDocumentFragment();return n.appendChild(B(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(B(t,!0)),n}function j(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}var L=Error.prototype.toString;var $=RegExp.prototype.toString;const M=20;function O(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,A)}function A(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 T(e,t){for(var n=0;t.exec(e);)++n;return n}var R=Function.prototype.toString,D={prefix:"async ƒ"},F={prefix:"async ƒ*"},U={prefix:"class"},z={prefix:"ƒ"},H={prefix:"ƒ*"};function I(e,t,n){var r=document.createElement("span");r.className="observablehq--function",n&&r.appendChild(o(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:W}}=Object;function B(e,t,n,r){let i=typeof e;switch(i){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=a(e);break;case"function":return function(e,t){var n,r,o=R.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=D;break;case"AsyncGeneratorFunction":n=F;break;case"GeneratorFunction":n=H;break;default:n=/^class\b/.test(o)?U:z}return n===U?I(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(o))?I(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(o))?I(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))?I(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):I(n,"(…)",t)}(e,r);case"string":return function(e,t,n,r){if(!1===t){if(T(e,/["\n]/g)<=T(e,/`|\${/g)){const t=document.createElement("span");r&&t.appendChild(o(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>M&&!n){const n=document.createElement("div");r&&n.appendChild(o(r));const a=n.appendChild(document.createElement("span"));a.className="observablehq--string",a.textContent="`"+O(i.slice(0,M).join("\n"));const u=n.appendChild(document.createElement("span")),l=i.length-M;return u.textContent=`Show ${l} truncated line${l>1?"s":""}`,u.className="observablehq--string-expand",u.addEventListener("mouseup",function(o){o.stopPropagation(),V(n,B(e,t,!0,r))}),n}const a=document.createElement("span");r&&a.appendChild(o(r));const u=a.appendChild(document.createElement("span"));return u.className=`observablehq--string${n?" observablehq--expanded":""}`,u.textContent="`"+O(e)+"`",a}const i=document.createElement("span");r&&i.appendChild(o(r));const a=i.appendChild(document.createElement("span"));return a.className="observablehq--string",a.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),i}(e,t,n,r);default:if(null===e){i=null,e="null";break}if(e instanceof Date){i="date",u=e,e=isNaN(u)?"Invalid Date":j(u.getFullYear(),4)+"-"+j(u.getMonth()+1,2)+"-"+j(u.getDate(),2)+(u.getMilliseconds()?"T"+j(u.getHours(),2)+":"+j(u.getMinutes(),2)+":"+j(u.getSeconds(),2)+"."+j(u.getMilliseconds(),3):u.getSeconds()?"T"+j(u.getHours(),2)+":"+j(u.getMinutes(),2)+":"+j(u.getSeconds(),2):u.getMinutes()||u.getHours()?"T"+j(u.getHours(),2)+":"+j(u.getMinutes(),2):"");break}if(e===c){i="forbidden",e="[forbidden]";break}switch(W.call(e)){case"[object RegExp]":i="regexp",e=function(e){return $.call(e)}(e);break;case"[object Error]":case"[object DOMException]":i="error",e=function(e){return e.stack||L.call(e)}(e);break;default:return(n?m:E)(e,t,r)}}var u;const l=document.createElement("span");r&&l.appendChild(o(r));const s=l.appendChild(document.createElement("span"));return s.className=`observablehq--${i}`,s.textContent=e,l}function V(e,n){e.classList.contains("observablehq--inspect")&&n.classList.add("observablehq--inspect"),e.parentNode.replaceChild(n,e),t(n,"load")}const G=/\s+\(\d+:\d+\)$/m;class J{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,n){const{_node:r}=this;if((!(e instanceof Element||e instanceof Text)||e.parentNode&&e.parentNode!==r)&&(e=B(e,!1,r.firstChild&&r.firstChild.classList&&r.firstChild.classList.contains("observablehq--expanded"),n)).classList.add("observablehq--inspect"),r.classList.remove("observablehq--running","observablehq--error"),r.firstChild!==e)if(r.firstChild){for(;r.lastChild!==r.firstChild;)r.removeChild(r.lastChild);r.replaceChild(e,r.firstChild)}else r.appendChild(e);t(r,"update")}rejected(e,n){const{_node:r}=this;for(r.classList.remove("observablehq--running"),r.classList.add("observablehq--error");r.lastChild;)r.removeChild(r.lastChild);var i=document.createElement("div");i.className="observablehq--inspect",n&&i.appendChild(o(n)),i.appendChild(document.createTextNode((e+"").replace(G,""))),r.appendChild(i),t(r,"error",{error:e})}}function X(e){return function(){return e}}J.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new J(e.appendChild(document.createElement("div")))}};var Y={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/"};var K=0;function Q(e){this.id=e,this.href=window.location.href+"#"+e}Q.prototype.toString=function(){return"url("+this.href+")"};var Z={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,n){var r=document.createElement("a");return r.appendChild(document.createElement("button")).textContent=null==n?"Download":n,r.download=null==t?"untitled":t,r.onclick=function(){var t=r.href=URL.createObjectURL(e);setTimeout(function(){URL.revokeObjectURL(t)},50)},r},element:function(e,t){var n,r=e+="",o=r.indexOf(":");o>=0&&"xmlns"!==(r=e.slice(0,o))&&(e=e.slice(o+1));var i=Y.hasOwnProperty(r)?document.createElementNS(Y[r],e):document.createElement(e);if(t)for(var a in t)o=(r=a).indexOf(":"),n=t[a],o>=0&&"xmlns"!==(r=a.slice(0,o))&&(a=a.slice(o+1)),Y.hasOwnProperty(r)?i.setAttributeNS(Y[r],a,n):i.setAttribute(a,n);return i},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 Q("O-"+(null==e?"":e+"-")+ ++K)}};var ee={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 te(){return this}function ne(e,t){let n=!1;return{[Symbol.iterator]:te,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}function re(e){let t,n,r=!1;const o=e(function(e){n?(n(e),n=null):r=!0;return t=e});return{[Symbol.iterator]:te,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 oe(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 ie={disposable:ne,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return re(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=oe(e);function o(){t(oe(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:re,queue:function(e){let t;const n=[],r=e(function(e){return n.push(e),t&&(t(n.shift()),t=null),e});return{[Symbol.iterator]:te,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 ne(n,()=>{n.terminate(),URL.revokeObjectURL(t)})}};function ae(e,t){return function(n){var r,o,i,a,u,l,s,c,d=n[0],f=[],p=null,h=-1;for(u=1,l=arguments.length;u<l;++u){if((r=arguments[u])instanceof Node)f[++h]=r,d+="\x3c!--o:"+h+"--\x3e";else if(Array.isArray(r)){for(s=0,c=r.length;s<c;++s)(o=r[s])instanceof Node?(null===p&&(f[++h]=p=document.createDocumentFragment(),d+="\x3c!--o:"+h+"--\x3e"),p.appendChild(o)):(p=null,d+=o);p=null}else d+=r;d+=n[u]}if(p=e(d),++h>0){for(i=new Array(h),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<h;++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 ue=ae(function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),document.importNode(t.content,!0)},function(){return document.createElement("span")});function le(e){return function(){return e("marked@0.3.12/marked.min.js").then(function(t){return ae(function(n){var r=document.createElement("span");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("span")})})}}function se(e){let t;Object.defineProperties(this,{generator:{value:re(e=>void(t=e))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}function*ce(){for(;;)yield Date.now()}var de=new Map;function fe(e,t){var n;return(n=de.get(e=+e))?n.then(X(t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise(function(n){de.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 de.set(t,n),n}(n,e).then(X(t))}var pe={delay:function(e,t){return new Promise(function(n){setTimeout(function(){n(t)},e)})},tick:function(e,t){return fe(Math.ceil((Date.now()+1)/e)*e,t)},when:fe};function he(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 me=new Map,ve=[],be=ve.map,we=ve.some,_e=ve.hasOwnProperty,ge="https://unpkg.com/",ye=/^((?:@[^\/@]+\/)?[^\/@]+)(?:@([^\/]+))?(?:\/(.*))?$/,xe=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/;class RequireError extends Error{constructor(e){super(e)}}function Ee(e){return"string"==typeof e?e:""}function Ce(e){const t=ye.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function Ne(e){const t=`${ge}${e.name}${e.version?`@${e.version}`:""}/package.json`;let n=me.get(t);return n||me.set(t,n=fetch(t).then(e=>{if(!e.ok)throw new RequireError("unable to load package.json");return e.redirected&&!me.has(e.url)&&me.set(e.url,n),e.json()})),n}RequireError.prototype.name=RequireError.name;const qe=Pe(async function(e,t){if(e.startsWith(ge)&&(e=e.substring(ge.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 RequireError("illegal name");const n=Ce(e);if(!n)return`${ge}${e}`;if(!n.version&&null!=t&&t.startsWith(ge)){const e=await Ne(Ce(t.substring(ge.length)));n.version=e.dependencies&&e.dependencies[n.name]||e.peerDependencies&&e.peerDependencies[n.name]}if(n.path&&n.version&&xe.test(n.version))return`${ge}${n.name}@${n.version}/${n.path}`;const r=await Ne(n);return`${ge}${r.name}@${r.version}/${n.path||Ee(r.unpkg)||Ee(r.browser)||Ee(r.main)||"index.js"}`});function Pe(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(ve.pop()(o(e)))}catch(e){n(new RequireError("invalid module"))}r.remove()}),r.onerror=(()=>{n(new RequireError("unable to load module")),r.remove()}),r.async=!0,r.src=e,window.define=Le,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(be.call(arguments,n)).then(Se):n(e)}return i.alias=function(t){return Pe((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r))},i.resolve=e,i}function Se(e){const t={};for(const n of e)for(const e in n)_e.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:ke(n,e)}):t[e]=n[e]);return t}function ke(e,t){return()=>e[t]}function je(e){return e+""=="exports"}function Le(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),ve.push(we.call(t,je)?e=>{const r={};return Promise.all(be.call(t,t=>je(t+="")?r:e(t))).then(e=>(n.apply(null,e),r))}:e=>Promise.all(be.call(t,e)).then(e=>"function"==typeof n?n.apply(null,e):n))}function $e(e){return null==e?qe:Pe(e)}Le.amd={};var Me=ae(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")}),Oe=String.raw;function Ae(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)})}function Te(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(Ae)]).then(function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(Oe.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n})}}function Re(){return re(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 De(e){const t=$e(e);Object.defineProperties(this,{DOM:{value:Z,writable:!0,enumerable:!0},Files:{value:ee,writable:!0,enumerable:!0},Generators:{value:ie,writable:!0,enumerable:!0},html:{value:X(ue),writable:!0,enumerable:!0},md:{value:le(t),writable:!0,enumerable:!0},Mutable:{value:X(se),writable:!0,enumerable:!0},now:{value:ce,writable:!0,enumerable:!0},Promises:{value:pe,writable:!0,enumerable:!0},require:{value:X(t),writable:!0,enumerable:!0},resolve:{value:X(he),writable:!0,enumerable:!0},svg:{value:X(Me),writable:!0,enumerable:!0},tex:{value:Te(t),writable:!0,enumerable:!0},width:{value:Re,writable:!0,enumerable:!0}})}function Fe(e,t){this.message=e+"",this.input=t}Fe.prototype=Object.create(Error.prototype),Fe.prototype.name="RuntimeError",Fe.prototype.constructor=Fe;var Ue=Array.prototype,ze=Ue.map,He=Ue.forEach;function Ie(e){return function(){return e}}function We(e){return e}function Be(){}var Ve=1,Ge=2,Je=3,Xe={};function Ye(e,t,n){var r;null==n&&(n=Xe),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:Ze,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:Be,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!==Xe,writable:!0},_rejector:{value:(r=this,function(e){if(e===Ze)throw new Fe(r._name+" is not defined",r._name);throw new Fe(r._name+" could not be resolved",r._name)})},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}function Ke(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}function Qe(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}function Ze(){throw Ze}function et(e){return function(){throw new Fe(e+" is defined more than once")}}function tt(e,t,n){var r=this._module._scope,o=this._module._runtime;if(this._inputs.forEach(Qe,this),t.forEach(Ke,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!==Je)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===Je?(this._definition=et(e),this._duplicate=n,a._duplicates.add(this)):a._type===Ge?(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 Ye(Je,this._module))._name=e,i._definition=this._definition=a._definition=et(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(Ye.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 tt.call(this,null==e?null:e+"",null==t?[]:ze.call(t,this._module._resolve,this._module),"function"==typeof n?n:Ie(n))},writable:!0,configurable:!0},delete:{value:function(){return tt.call(this,null,[],Be)},writable:!0,configurable:!0},import:{value:function(e,t,n){arguments.length<3&&(n=t,t=e);return tt.call(this,t+"",[n._resolve(e+"")],We)},writable:!0,configurable:!0}});var nt=new Map;function rt(e){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map}})}function ot(e){return e._name}Object.defineProperties(rt.prototype,{_copy:{value:function(e,t,n){var r=new rt(this._runtime);return n.set(this,r),this._scope.forEach(function(o,i){var a,u=new Ye(o._type,r);if(a=e.get(i))u.import(a.name,a.alias,t);else if(o._definition===We){var l=o._inputs[0],s=l._module,c=n.get(s)||s._copy(nt,null,n);u.import(l._name,i,c)}else u.define(i,o._inputs.map(ot),o._definition)}),r},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);n||(n=new Ye(Ge,this),this._runtime._builtin._scope.has(e)?n.import(e,this._runtime._builtin):void 0!==(t=this._runtime._global(e))?n.define(e,Ie(t)):"invalidation"===e?n.define(e,it):"visibility"===e?n.define(e,at):this._scope.set(n._name=e,n));return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new Fe(e+" is not defined");if(t._type===Je)throw new Fe(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new Ye(Ve,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=new Map;return He.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 Ye(Ve,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},variable:{value:function(e){return new Ye(Ve,this,e)},writable:!0,configurable:!0}});var it={},at={};function ut(e=new De,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 r in e)new Ye(Ge,n).define(r,[],e[r])}function lt(e){++e._indegree}function st(e){return e._promise.catch(e._rejector)}function ct(e){return new Promise(function(t){e._invalidate=t})}function dt(e,t){let n,r,o="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,i=!o,a=Be,u=Be;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 ft(e){e._invalidate(),e._invalidate=Be,e._pending();var t=e._value,n=++e._version,r=null,o=e._promise=Promise.all(e._inputs.map(st)).then(function(o){if(e._version===n){for(var i=0,a=o.length;i<a;++i)switch(o[i]){case it:o[i]=r=ct(e);break;case at:r||(r=ct(e)),o[i]=dt(r,e)}return e._definition.apply(t,o)}}).then(function(t){return function(e){return e&&"function"==typeof e.next&&"function"==typeof e.return}(t)?((r||ct(e)).then((i=t,function(){i.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 pt(e,r,n).then(o),e._fulfilled(r),r})});n.catch(function(r){e._version===t&&(pt(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 i});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 pt(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(ut,{load:{value:function(e,t,n){if("function"==typeof t&&(n=t,t=null),"function"!=typeof n)throw new Error("invalid observer");null==t&&(t=new De);const{modules:r,id:o}=e,i=new Map,a=new ut(t),u=l(o);function l(e){let t=i.get(e);return t||i.set(e,t=a.module()),t}for(const e of r){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===u?t.variable(n(o,r,e.variables)).define(o.name,o.inputs,o.value):t.define(o.name,o.inputs,o.value),++r}return a},writable:!0,configurable:!0}}),Object.defineProperties(ut.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){requestAnimationFrame(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!==Xe)return!0;var t=new Set(e._outputs);for(const e of t){if(e._observer!==Xe)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(lt)}),e.forEach(function(e){0===e._indegree&&n.push(e)});for(;t=n.pop();)ft(t),t._outputs.forEach(r),e.delete(t);function r(e){0==--e._indegree&&n.push(e)}e.forEach(function(e){var t=new Fe("circular definition");e._value=void 0,(e._promise=Promise.reject(t)).catch(Be),e._rejected(t)})},writable:!0,configurable:!0},module:{value:function(e,t=Be){if(void 0===e)return new rt(this);let n=this._modules.get(e);return n||(this._modules.set(e,n=e(this,t)),n)},writable:!0,configurable:!0}}),e.Inspector=J,e.Library=De,e.Runtime=ut,e.RuntimeError=Fe,Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "@observablehq/runtime", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "main": "dist/runtime.umd.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
101298
16
784