pdit 0.1.0__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pdit/_demo.py +100 -0
- pdit/_static/assets/index-C5r-TK5N.css +1 -0
- pdit/_static/assets/{index-BkEyY6gm.js → index-CANjXEqm.js} +37 -37
- pdit/_static/export.html +1 -1
- pdit/_static/index.html +2 -2
- pdit/cli.py +62 -3
- pdit/ipython_executor.py +51 -0
- pdit-0.3.0.dist-info/METADATA +62 -0
- pdit-0.3.0.dist-info/RECORD +17 -0
- pdit-0.3.0.dist-info/licenses/LICENSE +21 -0
- pdit/_static/assets/index-DxOOJTA1.css +0 -1
- pdit-0.1.0.dist-info/METADATA +0 -155
- pdit-0.1.0.dist-info/RECORD +0 -15
- {pdit-0.1.0.dist-info → pdit-0.3.0.dist-info}/WHEEL +0 -0
- {pdit-0.1.0.dist-info → pdit-0.3.0.dist-info}/entry_points.txt +0 -0
- {pdit-0.1.0.dist-info → pdit-0.3.0.dist-info}/top_level.txt +0 -0
pdit/_static/export.html
CHANGED
|
@@ -66,7 +66,7 @@ Error generating stack: `+n.message+`
|
|
|
66
66
|
`}),n.push(t[l]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
67
67
|
`}),n}function dh(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function ph(t,e){const n=yx(t,e),l=n.one(t,void 0),u=ax(n),i=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return u&&i.children.push({type:"text",value:`
|
|
68
68
|
`},u),i}function Ex(t,e){return t&&"run"in t?async function(n,l){const u=ph(n,{file:l,...e});await t.run(u,l)}:function(n,l){return ph(n,{file:l,...t||e})}}function mh(t){if(t)throw t}var Vi=Object.prototype.hasOwnProperty,lg=Object.prototype.toString,gh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,vh=function(e){return typeof Array.isArray=="function"?Array.isArray(e):lg.call(e)==="[object Array]"},bh=function(e){if(!e||lg.call(e)!=="[object Object]")return!1;var n=Vi.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&Vi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!l)return!1;var u;for(u in e);return typeof u>"u"||Vi.call(e,u)},Sh=function(e,n){gh&&n.name==="__proto__"?gh(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},xh=function(e,n){if(n==="__proto__")if(Vi.call(e,n)){if(yh)return yh(e,n).value}else return;return e[n]},Tx=function t(){var e,n,l,u,i,a,r=arguments[0],c=1,o=arguments.length,f=!1;for(typeof r=="boolean"&&(f=r,r=arguments[1]||{},c=2),(r==null||typeof r!="object"&&typeof r!="function")&&(r={});c<o;++c)if(e=arguments[c],e!=null)for(n in e)l=xh(r,n),u=xh(e,n),r!==u&&(f&&u&&(bh(u)||(i=vh(u)))?(i?(i=!1,a=l&&vh(l)?l:[]):a=l&&bh(l)?l:{},Sh(r,{name:n,newValue:t(f,a,u)})):typeof u<"u"&&Sh(r,{name:n,newValue:u}));return r};const Cr=Vc(Tx);function Yc(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ax(){const t=[],e={run:n,use:l};return e;function n(...u){let i=-1;const a=u.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);r(null,...u);function r(c,...o){const f=t[++i];let h=-1;if(c){a(c);return}for(;++h<u.length;)(o[h]===null||o[h]===void 0)&&(o[h]=u[h]);u=o,f?zx(f,r)(...o):a(null,...o)}}function l(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return t.push(u),e}}function zx(t,e){let n;return l;function l(...a){const r=t.length>a.length;let c;r&&a.push(u);try{c=t.apply(this,a)}catch(o){const f=o;if(r&&n)throw f;return u(f)}r||(c&&c.then&&typeof c.then=="function"?c.then(i,u):c instanceof Error?u(c):i(c))}function u(a,...r){n||(n=!0,e(a,...r))}function i(a){u(null,a)}}const ze={basename:Ox,dirname:_x,extname:Dx,join:Mx,sep:"/"};function Ox(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');oi(t);let n=0,l=-1,u=t.length,i;if(e===void 0||e.length===0||e.length>t.length){for(;u--;)if(t.codePointAt(u)===47){if(i){n=u+1;break}}else l<0&&(i=!0,l=u+1);return l<0?"":t.slice(n,l)}if(e===t)return"";let a=-1,r=e.length-1;for(;u--;)if(t.codePointAt(u)===47){if(i){n=u+1;break}}else a<0&&(i=!0,a=u+1),r>-1&&(t.codePointAt(u)===e.codePointAt(r--)?r<0&&(l=u):(r=-1,l=a));return n===l?l=a:l<0&&(l=t.length),t.slice(n,l)}function _x(t){if(oi(t),t.length===0)return".";let e=-1,n=t.length,l;for(;--n;)if(t.codePointAt(n)===47){if(l){e=n;break}}else l||(l=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Dx(t){oi(t);let e=t.length,n=-1,l=0,u=-1,i=0,a;for(;e--;){const r=t.codePointAt(e);if(r===47){if(a){l=e+1;break}continue}n<0&&(a=!0,n=e+1),r===46?u<0?u=e:i!==1&&(i=1):u>-1&&(i=-1)}return u<0||n<0||i===0||i===1&&u===n-1&&u===l+1?"":t.slice(u,n)}function Mx(...t){let e=-1,n;for(;++e<t.length;)oi(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":Cx(n)}function Cx(t){oi(t);const e=t.codePointAt(0)===47;let n=Nx(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Nx(t,e){let n="",l=0,u=-1,i=0,a=-1,r,c;for(;++a<=t.length;){if(a<t.length)r=t.codePointAt(a);else{if(r===47)break;r=47}if(r===47){if(!(u===a-1||i===1))if(u!==a-1&&i===2){if(n.length<2||l!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",l=0):(n=n.slice(0,c),l=n.length-1-n.lastIndexOf("/")),u=a,i=0;continue}}else if(n.length>0){n="",l=0,u=a,i=0;continue}}e&&(n=n.length>0?n+"/..":"..",l=2)}else n.length>0?n+="/"+t.slice(u+1,a):n=t.slice(u+1,a),l=a-u-1;u=a,i=0}else r===46&&i>-1?i++:i=-1}return n}function oi(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Rx={cwd:kx};function kx(){return"/"}function Xc(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function wx(t){if(typeof t=="string")t=new URL(t);else if(!Xc(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Ux(t)}function Ux(t){if(t.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const l=e.codePointAt(n+2);if(l===70||l===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(e)}const Nr=["history","path","basename","stem","extname","dirname"];class ug{constructor(e){let n;e?Xc(e)?n={path:e}:typeof e=="string"||Bx(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Rx.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Nr.length;){const i=Nr[l];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let u;for(u in n)Nr.includes(u)||(this[u]=n[u])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(e){kr(e,"basename"),Rr(e,"basename"),this.path=ze.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(e){Eh(this.basename,"dirname"),this.path=ze.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(e){if(Rr(e,"extname"),Eh(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ze.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Xc(e)&&(e=wx(e)),kr(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(e){kr(e,"stem"),Rr(e,"stem"),this.path=ze.join(this.dirname||"",e+(this.extname||""))}fail(e,n,l){const u=this.message(e,n,l);throw u.fatal=!0,u}info(e,n,l){const u=this.message(e,n,l);return u.fatal=void 0,u}message(e,n,l){const u=new Lt(e,n,l);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Rr(t,e){if(t&&t.includes(ze.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ze.sep+"`")}function kr(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function Eh(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Bx(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Hx=function(t){const l=this.constructor.prototype,u=l[t],i=function(){return u.apply(i,arguments)};return Object.setPrototypeOf(i,l),i},Lx={}.hasOwnProperty;class uf extends Hx{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ax()}copy(){const e=new uf;let n=-1;for(;++n<this.attachers.length;){const l=this.attachers[n];e.use(...l)}return e.data(Cr(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Br("data",this.frozen),this.namespace[e]=n,this):Lx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Br("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const u=n.call(e,...l);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Di(e),l=this.parser||this.Parser;return wr("parse",l),l(String(n),n)}process(e,n){const l=this;return this.freeze(),wr("process",this.parser||this.Parser),Ur("process",this.compiler||this.Compiler),n?u(void 0,n):new Promise(u);function u(i,a){const r=Di(e),c=l.parse(r);l.run(c,r,function(f,h,d){if(f||!h||!d)return o(f);const s=h,b=l.stringify(s,d);Yx(b)?d.value=b:d.result=b,o(f,d)});function o(f,h){f||!h?a(f):i?i(h):n(void 0,h)}}}processSync(e){let n=!1,l;return this.freeze(),wr("processSync",this.parser||this.Parser),Ur("processSync",this.compiler||this.Compiler),this.process(e,u),Ah("processSync","process",n),l;function u(i,a){n=!0,mh(i),l=a}}run(e,n,l){Th(e),this.freeze();const u=this.transformers;return!l&&typeof n=="function"&&(l=n,n=void 0),l?i(void 0,l):new Promise(i);function i(a,r){const c=Di(n);u.run(e,c,o);function o(f,h,d){const s=h||e;f?r(f):a?a(s):l(void 0,s,d)}}}runSync(e,n){let l=!1,u;return this.run(e,n,i),Ah("runSync","run",l),u;function i(a,r){mh(a),u=r,l=!0}}stringify(e,n){this.freeze();const l=Di(n),u=this.compiler||this.Compiler;return Ur("stringify",u),Th(e),u(e,l)}use(e,...n){const l=this.attachers,u=this.namespace;if(Br("use",this.frozen),e!=null)if(typeof e=="function")c(e,n);else if(typeof e=="object")Array.isArray(e)?r(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function i(o){if(typeof o=="function")c(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[f,...h]=o;c(f,h)}else a(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function a(o){if(!("plugins"in o)&&!("settings"in o))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");r(o.plugins),o.settings&&(u.settings=Cr(!0,u.settings,o.settings))}function r(o){let f=-1;if(o!=null)if(Array.isArray(o))for(;++f<o.length;){const h=o[f];i(h)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function c(o,f){let h=-1,d=-1;for(;++h<l.length;)if(l[h][0]===o){d=h;break}if(d===-1)l.push([o,...f]);else if(f.length>0){let[s,...b]=f;const S=l[d][1];Yc(S)&&Yc(s)&&(s=Cr(!0,S,s)),l[d]=[o,s,...b]}}}}const qx=new uf().freeze();function wr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ur(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Br(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Th(t){if(!Yc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Ah(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Di(t){return jx(t)?t:new ug(t)}function jx(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Yx(t){return typeof t=="string"||Xx(t)}function Xx(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Vx="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zh=[],Oh={allowDangerousHtml:!0},Qx=/^(https?|ircs?|mailto|xmpp)$/i,Gx=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Zx(t){const e=Kx(t),n=Jx(t);return Fx(e.runSync(e.parse(n),n),t)}function Kx(t){const e=t.rehypePlugins||zh,n=t.remarkPlugins||zh,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Oh}:Oh;return qx().use(_S).use(n).use(Ex,l).use(e)}function Jx(t){const e=t.children||"",n=new ug;return typeof e=="string"&&(n.value=e),n}function Fx(t,e){const n=e.allowedElements,l=e.allowElement,u=e.components,i=e.disallowedElements,a=e.skipHtml,r=e.unwrapDisallowed,c=e.urlTransform||Ix;for(const f of Gx)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Vx+f.id,void 0);return ng(t,o),av(t,{Fragment:st.Fragment,components:u,ignoreInvalidStyle:!0,jsx:st.jsx,jsxs:st.jsxs,passKeys:!0,passNode:!0});function o(f,h,d){if(f.type==="raw"&&d&&typeof h=="number")return a?d.children.splice(h,1):d.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let s;for(s in _r)if(Object.hasOwn(_r,s)&&Object.hasOwn(f.properties,s)){const b=f.properties[s],S=_r[s];(S===null||S.includes(f.tagName))&&(f.properties[s]=c(String(b||""),s,f))}}if(f.type==="element"){let s=n?!n.includes(f.tagName):i?i.includes(f.tagName):!1;if(!s&&l&&typeof h=="number"&&(s=!l(f,h,d)),s&&d&&typeof h=="number")return r&&f.children?d.children.splice(h,1,...f.children):d.children.splice(h,1),h}}}function Ix(t){const e=t.indexOf(":"),n=t.indexOf("?"),l=t.indexOf("#"),u=t.indexOf("/");return e===-1||u!==-1&&e>u||n!==-1&&e>n||l!==-1&&e>l||Qx.test(t.slice(0,e))?t:""}const $x=({content:t,mimeType:e})=>{const n=`data:${e};base64,${t}`;return st.jsx("img",{src:n,className:"output-image",alt:"Plot output"})},Wx=({html:t})=>{const e=gf.useRef(null);return gf.useEffect(()=>{if(!e.current)return;e.current.innerHTML=t,e.current.querySelectorAll("script").forEach(l=>{var i;const u=document.createElement("script");Array.from(l.attributes).forEach(a=>{u.setAttribute(a.name,a.value)}),u.textContent=l.textContent,(i=l.parentNode)==null||i.replaceChild(u,l)})},[t]),st.jsx("div",{ref:e,className:"output-html"})},Px=t=>t.replace(/\//g,"-"),t2=({expression:t,ref:e,allInvisible:n})=>{var i;const l=Oe.useRef(null);Oe.useImperativeHandle(e,()=>l.current,[]);const u=n?"output-container output-container-invisible":"output-container";return st.jsx("div",{ref:l,className:u,children:st.jsx("div",{className:"output-line",children:(i=t.result)==null?void 0:i.output.map((a,r)=>st.jsx("div",{className:`output-item output-${Px(a.type)}`,children:st.jsx("div",{className:"output-content-wrapper",children:a.type==="text/markdown"?st.jsx(Zx,{children:a.content}):a.type.startsWith("image/")?st.jsx($x,{content:a.content,mimeType:a.type}):a.type==="text/html"?st.jsx(Wx,{html:a.content}):st.jsx("pre",{children:a.content})})},r))})})},e2=({onLineGroupHeightChange:t,expressions:e,lineGroups:n,lineGroupLayouts:l,lineGroupHeights:u,readerMode:i})=>{const a=Oe.useRef(null),r=Oe.useRef(new Map),c=Oe.useMemo(()=>{if(i||!l||!u||n.length===0)return;const f=n[n.length-1],h=l.get(f.id),d=u.get(f.id);return h&&d!==void 0?h.top+d:void 0},[i,n,l,u]),o=Oe.useCallback(()=>{const f=new Map;for(const[h,d]of r.current.entries())d&&f.set(h,Math.max(0,d.getBoundingClientRect().height));return f},[]);return Oe.useEffect(()=>{if(!a.current||!t)return;const f=setTimeout(()=>{t(o())},0),h=new MutationObserver(()=>{t(o())}),d=new ResizeObserver(()=>{t(o())});return a.current&&(h.observe(a.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]}),d.observe(a.current)),()=>{clearTimeout(f),h.disconnect(),d.disconnect()}},[t,o,n]),st.jsx("div",{id:"output",ref:a,children:st.jsx("div",{className:`output-content ${i?"reader-mode":""}`,style:c?{minHeight:`${c}px`}:void 0,children:n.map(f=>{if(!f.resultIds.some(S=>{const z=e.find(p=>p.id===S);return(z==null?void 0:z.result)&&z.result.output.length>0}))return null;const d=l==null?void 0:l.get(f.id),s=["output-group",f.allInvisible?"output-group-invisible":"",f.hasError?"output-group-error":""].filter(Boolean).join(" "),b={};return d&&!i&&(b.position="absolute",b.top=d.top,b.left=8,b.right=8,b.minHeight=`${d.naturalHeight}px`),st.jsx("div",{className:s,ref:S=>{S?r.current.set(f.id,S):r.current.delete(f.id)},style:Object.keys(b).length>0?b:void 0,children:f.resultIds.map(S=>{const z=e.findIndex(m=>m.id===S);if(z===-1)return null;const p=e[z];return st.jsx(t2,{expression:p,index:z,allInvisible:f.allInvisible},p.id)})},f.id)})})})};let n2=0;function l2(t){if(t.length===0)return[];const e=c=>{var o,f;return((f=(o=c.result)==null?void 0:o.output)==null?void 0:f.some(h=>h.type==="error"||h.type==="stderr"))??!1},n=new Map;for(const c of t)for(let o=c.lineStart;o<=c.lineEnd;o++)n.has(o)||n.set(o,new Set),n.get(o).add(c.id);const l=new Map,u=c=>{l.has(c)||l.set(c,c);const o=l.get(c);if(o!==c){const f=u(o);return l.set(c,f),f}return o},i=(c,o)=>{const f=u(c),h=u(o);f!==h&&l.set(h,f)};for(const c of n.values()){const o=Array.from(c);for(let f=1;f<o.length;f++)i(o[0],o[f])}const a=new Map;for(const c of t){const o=u(c.id);a.has(o)||a.set(o,[]),a.get(o).push(c.id)}const r=[];for(const c of a.values()){let o=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;const h=[];for(const d of c){const s=t.find(b=>b.id===d);s&&(h.push(s),o=Math.min(o,s.lineStart),f=Math.max(f,s.lineEnd))}if(o!==Number.POSITIVE_INFINITY&&f!==Number.NEGATIVE_INFINITY){const d=h.every(S=>{var z;return((z=S.result)==null?void 0:z.isInvisible)===!0}),s=h.some(e);let b="done";for(const S of h){if(S.state==="executing"){b="executing";break}S.state==="cancelled"&&(b="cancelled"),S.state==="pending"&&b!=="cancelled"&&(b="pending")}r.push({id:`lg-${n2++}`,resultIds:[...c].sort((S,z)=>S-z),lineStart:o,lineEnd:f,allInvisible:d,hasError:s,state:b})}}return r.sort((c,o)=>c.lineStart-o.lineStart)}function u2(){const t=window.__pdit_response__;if(!t)return st.jsx("div",{style:{padding:"20px",fontFamily:"monospace"},children:"Error: No execution data found. This page should be generated by `pdit export`."});const{expressions:e}=t,n=l2(e);return st.jsx("div",{id:"app",children:st.jsxs("div",{className:"split-container reader-mode",children:[st.jsx("div",{className:"editor-half editor-hidden"}),st.jsx("div",{className:"output-half output-full",children:st.jsx(e2,{expressions:e,lineGroups:n,readerMode:!0})})]})})}const i2=document.getElementById("app"),a2=o0.createRoot(i2);a2.render(st.jsx(u2,{}));</script>
|
|
69
|
-
<style rel="stylesheet" crossorigin>@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap";:root{--color-yellow: #FFD700;--color-red: #E63946;--color-blue: #457B9D;--color-teal: #2A9D8F;--color-orange: #F4A261;--color-black: #1a1a1a;--color-cream: #FFFEF5;--color-warm-hover: #FFF8DC;--color-gray: #555;--color-gray-light: #888;--color-link: var(--color-red);--color-link-hover: var(--color-blue);--color-code-bg: var(--color-black);--color-code-text: var(--color-yellow);--border-thick: 3px solid var(--color-black);--border-thin: 1px solid #ddd;--gradient-rainbow: linear-gradient(90deg, var(--color-red) 25%, var(--color-yellow) 25%, var(--color-yellow) 50%, var(--color-blue) 50%, var(--color-blue) 75%, var(--color-teal) 75% );--bg-primary: #fff;--bg-secondary: #f8f8f8;--bg-tertiary: #f5f5f5;--border: #ddd;--accent: var(--color-red);--accent-alt: var(--color-blue);--text-primary: var(--color-black);--text-secondary: var(--color-gray);--text-dim: var(--color-gray-light);--error: #cc0000;--error-soft: #d97a7a;--warning: var(--color-orange);font-family:system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:var(--color-black);background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;width:100vw;height:100vh;overflow:hidden;background:#fff}#app{width:100%;height:100%;display:flex;flex-direction:column}#app.loading{cursor:wait}#app.loading .top-bar,#app.loading .split-container{opacity:.5;pointer-events:none}.top-bar{background:#fafafa;padding:.5rem 1rem;display:flex;align-items:center;flex-shrink:0;font-family:Fira Code,ui-monospace,monospace;border-bottom:1px solid #e0e0e0}.top-bar-content{display:flex;gap:.75rem;align-items:center;width:100%}.top-bar-button-wrapper{position:relative}.top-bar-button{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-button:hover:not(:disabled){background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-button:disabled{cursor:not-allowed;color:#bbb;border-color:#ddd}.top-bar-tooltip{position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%);background:var(--color-black);color:var(--color-cream);padding:.4rem .6rem;border-radius:0;font-size:.7rem;font-weight:500;font-family:ui-monospace,monospace;white-space:nowrap;border:none;z-index:1000;pointer-events:none;box-shadow:0 2px 4px #0003}.top-bar-status{display:flex;align-items:center;gap:.5rem;margin-left:.75rem}.top-bar-status-dot{width:8px;height:8px;border-radius:50%}.top-bar-status-dot.ready{background:var(--color-teal)}.top-bar-status-dot.initializing{background:var(--color-orange)}.top-bar-status-dot.connected{background:var(--color-teal)}.top-bar-status-dot.connecting{background:var(--color-orange)}.top-bar-status-dot.disconnected{background:var(--color-red)}.top-bar-conflict-compact{display:flex;align-items:center;gap:.375rem;background:transparent;border:1px solid var(--color-orange);border-radius:0;padding:.25rem .375rem;font-size:.7rem;margin-left:.75rem}.top-bar-conflict-compact-message{color:var(--color-orange);font-family:ui-monospace,monospace;white-space:nowrap;font-size:.75rem;font-weight:500}.top-bar-conflict-button-primary{position:relative;background:var(--color-orange);color:#fff;border:none;border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:600}.top-bar-conflict-button-primary:hover{background:var(--color-red)}.top-bar-conflict-button-primary:disabled{cursor:not-allowed;background:#ccc}.top-bar-conflict-button-secondary{position:relative;background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:500}.top-bar-conflict-button-secondary:hover{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-conflict-button-secondary:disabled{cursor:not-allowed;color:#ccc;border-color:#ddd}.top-bar-status-text{font-size:.7rem;font-weight:500;color:var(--color-gray-light)}.top-bar-status-text.ready{color:var(--color-teal)}.top-bar-status-text.initializing{color:var(--color-orange)}.top-bar-status-text.connected{color:var(--color-teal)}.top-bar-status-text.connecting{color:var(--color-orange)}.top-bar-status-text.disconnected{color:var(--color-red)}.top-bar-toggle-wrapper{position:relative}.top-bar-toggle-icon{display:flex;align-items:center}.top-bar-toggle{display:flex;align-items:center;gap:.5rem;background:transparent;border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;cursor:pointer;font-size:.75rem;font-family:inherit;transition:all .1s;font-weight:500;color:var(--color-gray);height:32px}.top-bar-toggle:hover{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-toggle:disabled{cursor:not-allowed;color:var(--color-gray-light);border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-switch{background:#ddd;border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-knob{background:var(--color-gray-light);border-color:var(--color-gray-light)}.top-bar-toggle.enabled{border-color:var(--color-teal);background:transparent;color:var(--color-teal)}.top-bar-toggle-label{font-size:.75rem;color:currentColor}.top-bar-toggle.enabled .top-bar-toggle-label{color:var(--color-teal)}.top-bar-toggle-switch{width:24px;height:12px;background:#ddd;border:1px solid var(--color-gray-light);border-radius:0;position:relative;transition:all .1s}.top-bar-toggle.enabled .top-bar-toggle-switch{background:var(--color-teal);border-color:var(--color-teal)}.top-bar-toggle-knob{position:absolute;top:1px;left:1px;width:8px;height:8px;background:#fff;border:none;border-radius:0;transition:transform .1s}.top-bar-toggle.enabled .top-bar-toggle-knob{transform:translate(12px);background:#fff}.split-container{display:grid;grid-template-columns:1fr 1fr;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;border-top:none;transition:opacity .15s ease-out;background:#fff}.editor-half{display:flex;flex-direction:column;flex:0 0 50%;min-width:0;border-right:1px solid #e5e5e5}.output-half{display:flex;flex:0 0 50%;min-width:0}.split-container.reader-mode{grid-template-columns:0fr 1fr}.editor-hidden{visibility:hidden;width:0;overflow:hidden}.output-full{flex:1}h1{font-size:2.5em;line-height:1.1;margin-bottom:1em;text-align:center;font-weight:800;letter-spacing:-.02em}.editor-container{display:flex;flex-direction:row;width:100%;border:none;border-radius:0;overflow:hidden;box-shadow:none;background:#fff}#editor{flex:1;width:100%;min-width:0}#editor-preview{flex:1;border-left:1px solid #e5e5e5;padding-left:.5rem}.cm-editor{font-size:14px;min-width:0;background:#fff;color:var(--color-black);font-family:ui-monospace,monospace}.cm-focused{outline:none}#output{font-size:13px;font-family:ui-monospace,monospace;width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;background:#fff;border-left:none;padding-right:12px;scrollbar-gutter:stable}.output-content{display:flex;flex-direction:column;position:relative;padding:6px;gap:4px}.output-group{background:transparent;border:none;border-left:3px solid #e5e5e5;margin:0;padding:0 6px 0 8px;border-radius:0}.output-group-error{border-left-color:var(--color-red)}.output-content.reader-mode .output-group{margin:0;border:none;padding-left:8px;padding-right:8px;border-left:2px solid #ddd}.output-group-invisible{background:transparent;border:none;height:0;overflow:hidden;margin:0;padding:0;border-radius:0;box-shadow:none}.output-container,.output-container-invisible{padding:0}.output-line{position:relative}.output-line:not(.empty-line){padding:0}.output-line pre{margin:0;padding:0;font-size:13px;line-height:1.4;color:var(--color-black);font-family:ui-monospace,monospace}.output-item{color:var(--color-black);display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0}.output-content-wrapper{flex:1;min-width:0;overflow-x:auto;width:100%}.output-debug{margin-top:6px;padding-top:6px;border-top:2px solid var(--color-black)}.output-debug-button{font-size:10px;padding:2px 6px;background:transparent;border:2px solid var(--color-black);border-radius:0;cursor:pointer;font-family:ui-monospace,monospace;color:var(--color-black);transition:all .1s;font-weight:600}.output-debug-button:hover{background:var(--color-black);color:var(--color-yellow)}.output-debug-info{margin-top:6px;padding:6px;background:var(--color-black);border:2px solid var(--color-black);border-radius:0;max-height:400px;overflow:auto;position:relative}.output-debug-info:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-debug-info pre{margin:4px 0 0;font-size:11px;line-height:1.4;color:var(--color-cream);font-family:ui-monospace,monospace}.output-item.output-stdout .output-content-wrapper{color:var(--color-black);font-family:ui-monospace,monospace}.output-item.output-stderr .output-content-wrapper,.output-item.output-error .output-content-wrapper{color:var(--color-red);font-weight:600}.output-item.output-warning .output-content-wrapper{color:var(--color-orange);font-weight:600}.output-item pre{color:var(--color-black);font-family:ui-monospace,monospace;background:transparent;margin:0;padding:0;border:none;white-space:pre-wrap;overflow-wrap:anywhere}.output-item code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-family:ui-monospace,monospace}.output-text-markdown code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-weight:600}.output-text-markdown pre{background:var(--color-black);border:none;padding:1.25rem;overflow-x:auto;margin:.5em 0;position:relative;border-radius:0}.output-text-markdown pre:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-text-markdown pre code{background:none;padding:0;color:var(--color-cream);border-radius:0}.output-text-markdown blockquote{border-left:4px solid var(--color-yellow);margin:.5em 0;padding-left:1em;color:var(--color-gray)}.output-text-markdown h1,.output-text-markdown h2,.output-text-markdown h3,.output-text-markdown h4,.output-text-markdown h5,.output-text-markdown h6{font-weight:700;letter-spacing:-.02em;color:var(--color-black);margin:1em 0 .5em}.output-text-markdown ul{list-style:none;padding-left:0;margin:.5em 0}.output-text-markdown ul li{padding-left:1.5rem;position:relative;margin:.25em 0}.output-text-markdown ul li:before{content:"";position:absolute;left:0;top:.55em;width:6px;height:6px;background:var(--color-yellow);border:none}.output-text-markdown ul li:nth-child(5n+1):before{background:var(--color-yellow)}.output-text-markdown ul li:nth-child(5n+2):before{background:var(--color-red)}.output-text-markdown ul li:nth-child(5n+3):before{background:var(--color-blue)}.output-text-markdown ul li:nth-child(5n+4):before{background:var(--color-teal)}.output-text-markdown ul li:nth-child(5n+5):before{background:var(--color-orange)}.output-text-markdown ol{padding-left:1.5rem;margin:.5em 0}.output-text-markdown ol li{margin:.25em 0}.output-text-markdown a{color:var(--color-red);text-decoration:none;font-weight:600}.output-text-markdown a:hover{color:var(--color-blue)}.output-text-markdown strong{font-weight:700;color:var(--color-black)}.output-text-markdown em{font-style:italic}.output-text-markdown .output-content-wrapper>*:first-child{margin-top:0;padding-top:0}.output-text-markdown .output-content-wrapper>*:last-child{margin-bottom:0;padding-bottom:0}.output-item.output-plot{margin-top:.25rem}.output-plot canvas{display:block;background:var(--color-cream);width:400px;height:300px;border:2px solid var(--color-black)}.output-image{max-width:100%;max-width:min(100%,1200px);height:auto;display:block;background:var(--color-cream);border:2px solid var(--color-black)}.output-html{width:100%;background:transparent;display:block;overflow-x:auto}.output-table{width:100%;border-collapse:collapse;color:var(--color-gray);border:2px solid var(--color-black)}.output-table td{padding:.25rem .5rem;border:1px solid var(--color-gray);color:var(--color-gray)}.output-table .header-row td{font-weight:700;color:var(--color-black);background:var(--color-warm-hover);border-bottom:3px solid var(--color-black)}.output-table td:last-child{text-align:right;font-family:ui-monospace,monospace}.output-table tr:hover td{background:var(--color-warm-hover)}.empty-line{height:16px}.plot-chart{display:flex;align-items:end;gap:1px;height:30px}.plot-bar{min-width:6px;background-color:var(--color-red);opacity:.8}.array-items{display:flex;flex-wrap:wrap;gap:3px}.array-item{background:var(--color-black);color:var(--color-yellow);padding:2px 4px;border:2px solid var(--color-black);border-radius:0;font-family:ui-monospace,monospace}.output-spacer-container{display:block;background:transparent}.output-spacer{width:100%}.debug-panel{position:fixed;bottom:0;left:0;right:0;background:var(--color-cream);border-top:var(--border-thick);padding:1rem;max-height:300px;overflow-y:auto;font-size:.8rem}.debug-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.debug-header h3{margin:0;color:var(--color-black);text-transform:uppercase;letter-spacing:.5px;font-weight:700}.debug-status{color:var(--color-gray-light);font-size:.75rem}.debug-table{width:100%;border-collapse:collapse;background:var(--color-cream);border-radius:0;overflow:hidden;border:2px solid var(--color-black)}.debug-table th{background:var(--color-yellow);color:var(--color-black);padding:.5rem 1rem;text-align:right;font-weight:700;font-size:.75rem;border-bottom:3px solid var(--color-black)}.debug-table td{padding:.5rem 1rem;border-bottom:1px solid #ddd;font-size:.75rem;color:var(--color-gray)}.debug-table tbody tr:hover{background:var(--color-warm-hover)}.line-number{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.height-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.debug-tabs{display:flex;gap:0;margin-bottom:1rem;border-bottom:3px solid var(--color-black)}.debug-tab{background:none;border:none;border-bottom:3px solid transparent;padding:.5rem 1rem;cursor:pointer;font-size:.75rem;font-weight:600;color:var(--color-gray);transition:all .1s;text-transform:uppercase;letter-spacing:.5px;margin-bottom:-3px}.debug-tab:hover{color:var(--color-black);background:var(--color-warm-hover)}.debug-tab.active{color:var(--color-black);border-bottom-color:var(--color-red);background:var(--color-yellow)}.debug-empty{text-align:center;color:var(--color-gray-light);padding:2rem;font-style:italic}.range-id{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.range-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.top-bar-split-button-wrapper{position:relative;display:flex;align-items:stretch}.top-bar-split-button-main{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-right:none;border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-run-label{display:inline-grid}.top-bar-run-label>span{grid-area:1 / 1}.top-bar-run-label-measure{visibility:hidden}.top-bar-split-button-arrow{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-left:1px solid #ddd;border-radius:0;padding:0 .4rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;display:flex;align-items:center;justify-content:center;min-width:24px;height:32px}.top-bar-split-button-main:hover:not(:disabled),.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-split-button-main:hover:not(:disabled){border-right:none}.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{border-left-color:#ddd}.top-bar-split-button-main:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd}.top-bar-split-button-arrow:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd;border-left-color:#ddd}.top-bar-dropdown-menu{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;min-width:100%;width:max-content;display:flex;flex-direction:column;z-index:1000}.top-bar-dropdown-menu:before{content:"";display:block;position:absolute;top:-4px;left:0;width:100%;height:4px;background:transparent}.top-bar-dropdown-item{padding:8px 12px;cursor:pointer;color:var(--color-gray);font-size:.75rem;font-family:inherit;border:none;background:transparent;text-align:left;font-weight:500;transition:all .1s;display:flex;align-items:center;justify-content:space-between;gap:1rem}.top-bar-dropdown-item:hover,.top-bar-dropdown-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-dropdown-item.disabled{cursor:not-allowed;color:var(--color-gray)}.top-bar-dropdown-item.disabled:hover,.top-bar-dropdown-item.disabled.selected{background:transparent;color:var(--color-gray)}.top-bar-dropdown-item-shortcut{font-size:.65rem;opacity:.7}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.fuzzy-finder-dropdown{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;width:320px;max-height:300px;display:flex;flex-direction:column;overflow:hidden;z-index:1000}.fuzzy-finder-input{background:#fff;color:var(--color-black);border:none;border-bottom:1px solid #ddd;padding:8px 10px;font-size:12px;font-family:inherit;outline:none;width:100%;box-sizing:border-box}.fuzzy-finder-input:focus{background:var(--color-warm-hover)}.fuzzy-finder-input::placeholder{color:var(--color-gray-light)}.fuzzy-finder-list{overflow-y:auto;flex:1}.fuzzy-finder-item{padding:6px 10px;cursor:pointer;display:flex;align-items:baseline;gap:8px;border-bottom:1px solid #ddd;min-width:0}.fuzzy-finder-item:hover{background:var(--color-warm-hover)}.fuzzy-finder-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.fuzzy-finder-filename{color:var(--color-black);font-size:12px;font-family:ui-monospace,monospace;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;font-weight:600}.fuzzy-finder-path{color:var(--color-gray-light);font-size:10px;font-family:ui-monospace,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.fuzzy-match-highlight{color:var(--color-red);font-weight:700}.fuzzy-finder-item.selected .fuzzy-match-highlight{color:var(--color-red)}.fuzzy-finder-empty{padding:12px 10px;text-align:center;color:var(--color-gray-light);font-size:11px;font-family:ui-monospace,monospace;white-space:nowrap}table.dataTable{border-collapse:collapse;font-size:13px;font-family:ui-monospace,monospace;border:1px solid #ddd;background:#fff;width:100%}table.dataTable thead th{background:#f5f5f5;font-weight:600;color:var(--color-black);border-right:1px solid #ddd;border-bottom:1px solid #ddd;padding:8px;font-size:12px;text-align:left}table.dataTable thead th:last-child{border-right:none}table.dataTable tbody td{padding:6px 8px;border-right:1px solid #eee;border-bottom:1px solid #eee;color:var(--color-gray);background:#fff}table.dataTable tbody td:last-child{border-right:none}table.dataTable tbody tr:last-child td{border-bottom:none}table.dataTable tbody tr:hover td{background:#f9f9f9}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background:#fff}table.dataTable.stripe tbody tr.odd:hover,table.dataTable.display tbody tr.odd:hover{background:#f9f9f9}div.dt-container{font-family:ui-monospace,monospace;font-size:11px}div.dt-layout-row{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:4px 0!important}div.dt-layout-cell{padding:2px!important}div.dt-search input{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-search input:hover{border-color:#bbb}div.dt-search input:focus{outline:none;border-color:#999;background:#fff}div.dt-length select{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-length select:hover{border-color:#bbb}div.dt-length select:focus{outline:none;border-color:#999;background:#fff}div.dt-paging button{background:transparent;border:1px solid #ddd;border-radius:0;padding:2px 8px;font-size:11px;cursor:pointer;color:var(--color-gray);font-family:ui-monospace,monospace;transition:all .1s;height:22px;margin:0 1px;font-weight:500}div.dt-paging button:hover:not(.disabled){background:#f5f5f5;border-color:#bbb;color:var(--color-black)}div.dt-paging button.disabled{cursor:not-allowed;color:#ccc;border-color:#eee;opacity:.5}div.dt-paging button.current{background:#333;border-color:#333;color:#fff;font-weight:600}div.dt-info{color:var(--color-gray);font-size:11px;font-family:ui-monospace,monospace}table.dataTable.no-footer{border-bottom:1px solid #ddd}table.dataTable thead th.dt-orderable-asc,table.dataTable thead th.dt-orderable-desc,table.dataTable thead th.dt-ordering-asc,table.dataTable thead th.dt-ordering-desc{background:#f0f0f0}small.itables-dtype{color:var(--color-gray-light);font-size:10px}table tbody td{vertical-align:middle}table tbody td a{color:#06c;text-decoration:none}table tbody td a:hover{color:#049;text-decoration:underline}@media (max-width: 900px){.top-bar-label,.top-bar-toggle-label{display:none}}</style>
|
|
69
|
+
<style rel="stylesheet" crossorigin>@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap";:root{--color-yellow: #FFD700;--color-red: #E63946;--color-blue: #457B9D;--color-teal: #2A9D8F;--color-orange: #F4A261;--color-black: #1a1a1a;--color-cream: #FFFEF5;--color-warm-hover: #FFF8DC;--color-gray: #555;--color-gray-light: #888;--color-link: var(--color-red);--color-link-hover: var(--color-blue);--color-code-bg: var(--color-black);--color-code-text: var(--color-yellow);--border-thick: 3px solid var(--color-black);--border-thin: 1px solid #ddd;--top-bar-height: calc(32px + 1rem) ;--gradient-rainbow: linear-gradient(90deg, var(--color-red) 25%, var(--color-yellow) 25%, var(--color-yellow) 50%, var(--color-blue) 50%, var(--color-blue) 75%, var(--color-teal) 75% );--bg-primary: #fff;--bg-secondary: #f8f8f8;--bg-tertiary: #f5f5f5;--border: #ddd;--accent: var(--color-red);--accent-alt: var(--color-blue);--text-primary: var(--color-black);--text-secondary: var(--color-gray);--text-dim: var(--color-gray-light);--error: #cc0000;--error-soft: #d97a7a;--warning: var(--color-orange);font-family:system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:var(--color-black);background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;width:100%;min-height:100vh;overflow-x:hidden;overflow-y:auto;background:#fff}#app{width:100%;height:auto;min-height:100vh;display:flex;flex-direction:column}#app.loading{cursor:wait}#app.loading .top-bar,#app.loading .split-container{opacity:.5;pointer-events:none}.top-bar{background:#fafafa;padding:.5rem 1rem;display:flex;align-items:center;flex-shrink:0;position:fixed;top:0;left:0;right:0;z-index:20;height:var(--top-bar-height);box-sizing:border-box;font-family:Fira Code,ui-monospace,monospace;border-bottom:1px solid #e0e0e0}.top-bar-content{display:flex;gap:.75rem;align-items:center;width:100%}.top-bar-button-wrapper{position:relative}.top-bar-button{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-button:hover:not(:disabled){background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-button:disabled{cursor:not-allowed;color:#bbb;border-color:#ddd}.top-bar-tooltip{position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%);background:var(--color-black);color:var(--color-cream);padding:.4rem .6rem;border-radius:0;font-size:.7rem;font-weight:500;font-family:ui-monospace,monospace;white-space:nowrap;border:none;z-index:1000;pointer-events:none;box-shadow:0 2px 4px #0003}.top-bar-status{display:flex;align-items:center;gap:.5rem;margin-left:.75rem}.top-bar-status-dot{width:8px;height:8px;border-radius:50%}.top-bar-status-dot.ready{background:var(--color-teal)}.top-bar-status-dot.initializing{background:var(--color-orange)}.top-bar-status-dot.connected{background:var(--color-teal)}.top-bar-status-dot.connecting{background:var(--color-orange)}.top-bar-status-dot.disconnected{background:var(--color-red)}.top-bar-conflict-compact{display:flex;align-items:center;gap:.375rem;background:transparent;border:1px solid var(--color-orange);border-radius:0;padding:.25rem .375rem;font-size:.7rem;margin-left:.75rem}.top-bar-conflict-compact-message{color:var(--color-orange);font-family:ui-monospace,monospace;white-space:nowrap;font-size:.75rem;font-weight:500}.top-bar-conflict-button-primary{position:relative;background:var(--color-orange);color:#fff;border:none;border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:600}.top-bar-conflict-button-primary:hover{background:var(--color-red)}.top-bar-conflict-button-primary:disabled{cursor:not-allowed;background:#ccc}.top-bar-conflict-button-secondary{position:relative;background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:500}.top-bar-conflict-button-secondary:hover{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-conflict-button-secondary:disabled{cursor:not-allowed;color:#ccc;border-color:#ddd}.top-bar-status-text{font-size:.7rem;font-weight:500;color:var(--color-gray-light)}.top-bar-status-text.ready{color:var(--color-teal)}.top-bar-status-text.initializing{color:var(--color-orange)}.top-bar-status-text.connected{color:var(--color-teal)}.top-bar-status-text.connecting{color:var(--color-orange)}.top-bar-status-text.disconnected{color:var(--color-red)}.top-bar-toggle-wrapper{position:relative}.top-bar-toggle-icon{display:flex;align-items:center}.top-bar-toggle{display:flex;align-items:center;gap:.5rem;background:transparent;border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;cursor:pointer;font-size:.75rem;font-family:inherit;transition:all .1s;font-weight:500;color:var(--color-gray);height:32px}.top-bar-toggle:hover{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-toggle:disabled{cursor:not-allowed;color:var(--color-gray-light);border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-switch{background:#ddd;border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-knob{background:var(--color-gray-light);border-color:var(--color-gray-light)}.top-bar-toggle.enabled{border-color:var(--color-teal);background:transparent;color:var(--color-teal)}.top-bar-toggle-label{font-size:.75rem;color:currentColor}.top-bar-toggle.enabled .top-bar-toggle-label{color:var(--color-teal)}.top-bar-toggle-switch{width:24px;height:12px;background:#ddd;border:1px solid var(--color-gray-light);border-radius:0;position:relative;transition:all .1s}.top-bar-toggle.enabled .top-bar-toggle-switch{background:var(--color-teal);border-color:var(--color-teal)}.top-bar-toggle-knob{position:absolute;top:1px;left:1px;width:8px;height:8px;background:#fff;border:none;border-radius:0;transition:transform .1s}.top-bar-toggle.enabled .top-bar-toggle-knob{transform:translate(12px);background:#fff}.split-container{display:grid;grid-template-columns:1fr 1fr;flex:0 0 auto;min-height:100vh;box-sizing:border-box;overflow:visible;border-top:none;transition:opacity .15s ease-out;background:#fff}#app.has-topbar .split-container{padding-top:var(--top-bar-height);min-height:calc(100vh - var(--top-bar-height))}.editor-half{display:flex;flex-direction:column;flex:0 0 50%;min-width:0;border-right:1px solid #e5e5e5}.output-half{display:flex;flex:0 0 50%;min-width:0}.split-container.reader-mode{grid-template-columns:0fr 1fr}.editor-hidden{visibility:hidden;width:0;overflow:hidden}.output-full{flex:1}h1{font-size:2.5em;line-height:1.1;margin-bottom:1em;text-align:center;font-weight:800;letter-spacing:-.02em}.editor-container{display:flex;flex-direction:row;width:100%;border:none;border-radius:0;overflow:hidden;box-shadow:none;background:#fff}#editor{flex:1;width:100%;min-width:0}#editor-preview{flex:1;border-left:1px solid #e5e5e5;padding-left:.5rem}.cm-editor{font-size:14px;min-width:0;background:#fff;color:var(--color-black);font-family:ui-monospace,monospace}.cm-focused{outline:none}#output{font-size:13px;font-family:ui-monospace,monospace;width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;background:#fff;border-left:none;padding-right:12px;scrollbar-gutter:stable}.output-content{display:flex;flex-direction:column;position:relative;padding:6px;gap:4px}.output-group{background:transparent;border:none;border-left:3px solid #e5e5e5;margin:0;padding:0 6px 0 8px;border-radius:0}.output-group-error{border-left-color:var(--color-red)}.output-content.reader-mode .output-group{margin:0;border:none;padding-left:8px;padding-right:8px;border-left:2px solid #ddd}.output-group-invisible{background:transparent;border:none;height:0;overflow:hidden;margin:0;padding:0;border-radius:0;box-shadow:none}.output-container,.output-container-invisible{padding:0}.output-line{position:relative}.output-line:not(.empty-line){padding:0}.output-line pre{margin:0;padding:0;font-size:13px;line-height:1.4;color:var(--color-black);font-family:ui-monospace,monospace}.output-item{color:var(--color-black);display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0}.output-content-wrapper{flex:1;min-width:0;overflow-x:auto;width:100%}.output-debug{margin-top:6px;padding-top:6px;border-top:2px solid var(--color-black)}.output-debug-button{font-size:10px;padding:2px 6px;background:transparent;border:2px solid var(--color-black);border-radius:0;cursor:pointer;font-family:ui-monospace,monospace;color:var(--color-black);transition:all .1s;font-weight:600}.output-debug-button:hover{background:var(--color-black);color:var(--color-yellow)}.output-debug-info{margin-top:6px;padding:6px;background:var(--color-black);border:2px solid var(--color-black);border-radius:0;max-height:400px;overflow:auto;position:relative}.output-debug-info:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-debug-info pre{margin:4px 0 0;font-size:11px;line-height:1.4;color:var(--color-cream);font-family:ui-monospace,monospace}.output-item.output-stdout .output-content-wrapper{color:var(--color-black);font-family:ui-monospace,monospace}.output-item.output-stderr .output-content-wrapper,.output-item.output-error .output-content-wrapper{color:var(--color-red);font-weight:600}.output-item.output-warning .output-content-wrapper{color:var(--color-orange);font-weight:600}.output-item pre{color:var(--color-black);font-family:ui-monospace,monospace;background:transparent;margin:0;padding:0;border:none;white-space:pre-wrap;overflow-wrap:anywhere}.output-item code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-family:ui-monospace,monospace}.output-text-markdown code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-weight:600}.output-text-markdown pre{background:var(--color-black);border:none;padding:1.25rem;overflow-x:auto;margin:.5em 0;position:relative;border-radius:0}.output-text-markdown pre:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-text-markdown pre code{background:none;padding:0;color:var(--color-cream);border-radius:0}.output-text-markdown blockquote{border-left:4px solid var(--color-yellow);margin:.5em 0;padding-left:1em;color:var(--color-gray)}.output-text-markdown h1,.output-text-markdown h2,.output-text-markdown h3,.output-text-markdown h4,.output-text-markdown h5,.output-text-markdown h6{font-weight:700;letter-spacing:-.02em;color:var(--color-black);margin:1em 0 .5em;text-align:left}.output-text-markdown table{margin-left:0;margin-right:auto}.output-text-markdown ul{list-style:none;padding-left:0;margin:.5em 0}.output-text-markdown ul li{padding-left:1.5rem;position:relative;margin:.25em 0}.output-text-markdown ul li:before{content:"";position:absolute;left:0;top:.55em;width:6px;height:6px;background:var(--color-yellow);border:none}.output-text-markdown ul li:nth-child(5n+1):before{background:var(--color-yellow)}.output-text-markdown ul li:nth-child(5n+2):before{background:var(--color-red)}.output-text-markdown ul li:nth-child(5n+3):before{background:var(--color-blue)}.output-text-markdown ul li:nth-child(5n+4):before{background:var(--color-teal)}.output-text-markdown ul li:nth-child(5n+5):before{background:var(--color-orange)}.output-text-markdown ol{padding-left:1.5rem;margin:.5em 0}.output-text-markdown ol li{margin:.25em 0}.output-text-markdown a{color:var(--color-red);text-decoration:none;font-weight:600}.output-text-markdown a:hover{color:var(--color-blue)}.output-text-markdown strong{font-weight:700;color:var(--color-black)}.output-text-markdown em{font-style:italic}.output-text-markdown .output-content-wrapper>*:first-child{margin-top:0;padding-top:0}.output-text-markdown .output-content-wrapper>*:last-child{margin-bottom:0;padding-bottom:0}.output-item.output-plot{margin-top:.25rem}.output-plot canvas{display:block;background:var(--color-cream);width:400px;height:300px;border:2px solid var(--color-black)}.output-image{max-width:100%;max-width:min(100%,1200px);height:auto;display:block;background:var(--color-cream);border:2px solid var(--color-black)}.output-html{width:100%;background:transparent;display:block;overflow-x:auto}.output-html table,.output-html .dt-container{margin-left:0!important;margin-right:auto!important}.output-html .dt-layout-cell{justify-content:flex-start!important;text-align:left!important}.output-table{width:100%;border-collapse:collapse;color:var(--color-gray);border:2px solid var(--color-black)}.output-table td{padding:.25rem .5rem;border:1px solid var(--color-gray);color:var(--color-gray)}.output-table .header-row td{font-weight:700;color:var(--color-black);background:var(--color-warm-hover);border-bottom:3px solid var(--color-black)}.output-table td:last-child{text-align:right;font-family:ui-monospace,monospace}.output-table tr:hover td{background:var(--color-warm-hover)}.empty-line{height:16px}.plot-chart{display:flex;align-items:end;gap:1px;height:30px}.plot-bar{min-width:6px;background-color:var(--color-red);opacity:.8}.array-items{display:flex;flex-wrap:wrap;gap:3px}.array-item{background:var(--color-black);color:var(--color-yellow);padding:2px 4px;border:2px solid var(--color-black);border-radius:0;font-family:ui-monospace,monospace}.output-spacer-container{display:block;background:transparent}.output-spacer{width:100%}.debug-panel{position:fixed;bottom:0;left:0;right:0;background:var(--color-cream);border-top:var(--border-thick);padding:1rem;max-height:300px;overflow-y:auto;font-size:.8rem}.debug-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.debug-header h3{margin:0;color:var(--color-black);text-transform:uppercase;letter-spacing:.5px;font-weight:700}.debug-status{color:var(--color-gray-light);font-size:.75rem}.debug-table{width:100%;border-collapse:collapse;background:var(--color-cream);border-radius:0;overflow:hidden;border:2px solid var(--color-black)}.debug-table th{background:var(--color-yellow);color:var(--color-black);padding:.5rem 1rem;text-align:right;font-weight:700;font-size:.75rem;border-bottom:3px solid var(--color-black)}.debug-table td{padding:.5rem 1rem;border-bottom:1px solid #ddd;font-size:.75rem;color:var(--color-gray)}.debug-table tbody tr:hover{background:var(--color-warm-hover)}.line-number{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.height-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.debug-tabs{display:flex;gap:0;margin-bottom:1rem;border-bottom:3px solid var(--color-black)}.debug-tab{background:none;border:none;border-bottom:3px solid transparent;padding:.5rem 1rem;cursor:pointer;font-size:.75rem;font-weight:600;color:var(--color-gray);transition:all .1s;text-transform:uppercase;letter-spacing:.5px;margin-bottom:-3px}.debug-tab:hover{color:var(--color-black);background:var(--color-warm-hover)}.debug-tab.active{color:var(--color-black);border-bottom-color:var(--color-red);background:var(--color-yellow)}.debug-empty{text-align:center;color:var(--color-gray-light);padding:2rem;font-style:italic}.range-id{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.range-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.top-bar-split-button-wrapper{position:relative;display:flex;align-items:stretch}.top-bar-split-button-main{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-right:none;border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-run-label{display:inline-grid}.top-bar-run-label>span{grid-area:1 / 1}.top-bar-run-label-measure{visibility:hidden}.top-bar-split-button-arrow{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-left:1px solid #ddd;border-radius:0;padding:0 .4rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;display:flex;align-items:center;justify-content:center;min-width:24px;height:32px}.top-bar-split-button-main:hover:not(:disabled),.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-split-button-main:hover:not(:disabled){border-right:none}.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{border-left-color:#ddd}.top-bar-split-button-main:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd}.top-bar-split-button-arrow:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd;border-left-color:#ddd}.top-bar-dropdown-menu{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;min-width:100%;width:max-content;display:flex;flex-direction:column;z-index:1000}.top-bar-dropdown-menu:before{content:"";display:block;position:absolute;top:-4px;left:0;width:100%;height:4px;background:transparent}.top-bar-dropdown-item{padding:8px 12px;cursor:pointer;color:var(--color-gray);font-size:.75rem;font-family:inherit;border:none;background:transparent;text-align:left;font-weight:500;transition:all .1s;display:flex;align-items:center;justify-content:space-between;gap:1rem}.top-bar-dropdown-item:hover,.top-bar-dropdown-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-dropdown-item.disabled{cursor:not-allowed;color:var(--color-gray)}.top-bar-dropdown-item.disabled:hover,.top-bar-dropdown-item.disabled.selected{background:transparent;color:var(--color-gray)}.top-bar-dropdown-item-shortcut{font-size:.65rem;opacity:.7}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.fuzzy-finder-dropdown{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;width:320px;max-height:300px;display:flex;flex-direction:column;overflow:hidden;z-index:1000}.fuzzy-finder-input{background:#fff;color:var(--color-black);border:none;border-bottom:1px solid #ddd;padding:8px 10px;font-size:12px;font-family:inherit;outline:none;width:100%;box-sizing:border-box}.fuzzy-finder-input:focus{background:var(--color-warm-hover)}.fuzzy-finder-input::placeholder{color:var(--color-gray-light)}.fuzzy-finder-list{overflow-y:auto;flex:1}.fuzzy-finder-item{padding:6px 10px;cursor:pointer;display:flex;align-items:baseline;gap:8px;border-bottom:1px solid #ddd;min-width:0}.fuzzy-finder-item:hover{background:var(--color-warm-hover)}.fuzzy-finder-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.fuzzy-finder-filename{color:var(--color-black);font-size:12px;font-family:ui-monospace,monospace;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;font-weight:600}.fuzzy-finder-path{color:var(--color-gray-light);font-size:10px;font-family:ui-monospace,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.fuzzy-match-highlight{color:var(--color-red);font-weight:700}.fuzzy-finder-item.selected .fuzzy-match-highlight{color:var(--color-red)}.fuzzy-finder-empty{padding:12px 10px;text-align:center;color:var(--color-gray-light);font-size:11px;font-family:ui-monospace,monospace;white-space:nowrap}table.dataTable{border-collapse:collapse;font-size:13px;font-family:ui-monospace,monospace;border:1px solid #ddd;background:#fff;width:100%}table.dataTable thead th{background:#f5f5f5;font-weight:600;color:var(--color-black);border-right:1px solid #ddd;border-bottom:1px solid #ddd;padding:8px;font-size:12px;text-align:left}table.dataTable thead th:last-child{border-right:none}table.dataTable tbody td{padding:6px 8px;border-right:1px solid #eee;border-bottom:1px solid #eee;color:var(--color-gray);background:#fff}table.dataTable tbody td:last-child{border-right:none}table.dataTable tbody tr:last-child td{border-bottom:none}table.dataTable tbody tr:hover td{background:#f9f9f9}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background:#fff}table.dataTable.stripe tbody tr.odd:hover,table.dataTable.display tbody tr.odd:hover{background:#f9f9f9}div.dt-container{font-family:ui-monospace,monospace;font-size:11px}div.dt-layout-row{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:4px 0!important}div.dt-layout-cell{padding:2px!important}div.dt-search input{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-search input:hover{border-color:#bbb}div.dt-search input:focus{outline:none;border-color:#999;background:#fff}div.dt-length select{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-length select:hover{border-color:#bbb}div.dt-length select:focus{outline:none;border-color:#999;background:#fff}div.dt-paging button{background:transparent;border:1px solid #ddd;border-radius:0;padding:2px 8px;font-size:11px;cursor:pointer;color:var(--color-gray);font-family:ui-monospace,monospace;transition:all .1s;height:22px;margin:0 1px;font-weight:500}div.dt-paging button:hover:not(.disabled){background:#f5f5f5;border-color:#bbb;color:var(--color-black)}div.dt-paging button.disabled{cursor:not-allowed;color:#ccc;border-color:#eee;opacity:.5}div.dt-paging button.current{background:#333;border-color:#333;color:#fff;font-weight:600}div.dt-info{color:var(--color-gray);font-size:11px;font-family:ui-monospace,monospace}table.dataTable.no-footer{border-bottom:1px solid #ddd}table.dataTable thead th.dt-orderable-asc,table.dataTable thead th.dt-orderable-desc,table.dataTable thead th.dt-ordering-asc,table.dataTable thead th.dt-ordering-desc{background:#f0f0f0}small.itables-dtype{color:var(--color-gray-light);font-size:10px}table tbody td{vertical-align:middle}table tbody td a{color:#06c;text-decoration:none}table tbody td a:hover{color:#049;text-decoration:underline}@media (max-width: 900px){.top-bar-label,.top-bar-toggle-label{display:none}}</style>
|
|
70
70
|
</head>
|
|
71
71
|
<body>
|
|
72
72
|
<div id="app"></div>
|
pdit/_static/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>pdit</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CANjXEqm.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C5r-TK5N.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="app"></div>
|
pdit/cli.py
CHANGED
|
@@ -17,14 +17,18 @@ from pathlib import Path
|
|
|
17
17
|
from typing import Optional
|
|
18
18
|
|
|
19
19
|
import typer
|
|
20
|
-
from typing_extensions import Annotated
|
|
21
20
|
import uvicorn
|
|
21
|
+
from rich import box
|
|
22
|
+
from rich.console import Console
|
|
23
|
+
from rich.panel import Panel
|
|
24
|
+
from typing_extensions import Annotated
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
# Flag for graceful shutdown on SIGTERM
|
|
25
28
|
_shutdown_requested = False
|
|
26
29
|
|
|
27
30
|
app = typer.Typer(add_completion=False)
|
|
31
|
+
_console = Console()
|
|
28
32
|
|
|
29
33
|
|
|
30
34
|
def find_available_port(start_port=8888, max_tries=100):
|
|
@@ -52,6 +56,33 @@ def find_available_port(start_port=8888, max_tries=100):
|
|
|
52
56
|
raise RuntimeError(f"Could not find available port in range {start_port}-{start_port + max_tries}")
|
|
53
57
|
|
|
54
58
|
|
|
59
|
+
def resolve_demo_script_path() -> Path:
|
|
60
|
+
"""Resolve the bundled demo script path."""
|
|
61
|
+
package_demo_path = Path(__file__).resolve().parent / "_demo.py"
|
|
62
|
+
if not package_demo_path.exists():
|
|
63
|
+
raise FileNotFoundError("Demo script not found")
|
|
64
|
+
return package_demo_path
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def ensure_script_exists(script: Path) -> None:
|
|
68
|
+
"""Create a script file if it does not exist."""
|
|
69
|
+
if script.exists():
|
|
70
|
+
if script.is_dir():
|
|
71
|
+
typer.echo(f"Error: {script} is a directory", err=True)
|
|
72
|
+
raise typer.Exit(1)
|
|
73
|
+
return
|
|
74
|
+
|
|
75
|
+
if not script.parent.exists():
|
|
76
|
+
typer.echo(f"Error: parent directory does not exist for {script}", err=True)
|
|
77
|
+
raise typer.Exit(1)
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
script.touch()
|
|
81
|
+
except OSError as exc:
|
|
82
|
+
typer.echo(f"Error: could not create script {script}: {exc}", err=True)
|
|
83
|
+
raise typer.Exit(1)
|
|
84
|
+
|
|
85
|
+
|
|
55
86
|
class Server(uvicorn.Server):
|
|
56
87
|
"""Custom Server class that can run in a background thread."""
|
|
57
88
|
|
|
@@ -162,9 +193,15 @@ def start(
|
|
|
162
193
|
# Run server in thread, open browser when ready
|
|
163
194
|
with server.run_in_thread():
|
|
164
195
|
# Server is guaranteed to be ready here
|
|
196
|
+
panel = Panel.fit(
|
|
197
|
+
f"[bold]Open in browser[/bold]\n{url}",
|
|
198
|
+
box=box.ROUNDED,
|
|
199
|
+
padding=(1, 2),
|
|
200
|
+
)
|
|
201
|
+
_console.print(panel)
|
|
165
202
|
if not no_browser:
|
|
166
203
|
webbrowser.open(url)
|
|
167
|
-
typer.echo(
|
|
204
|
+
typer.echo("Opening browser...")
|
|
168
205
|
|
|
169
206
|
# Set up SIGTERM handler for graceful shutdown
|
|
170
207
|
def handle_sigterm(signum, frame):
|
|
@@ -186,8 +223,12 @@ def start(
|
|
|
186
223
|
def main_command(
|
|
187
224
|
script: Annotated[
|
|
188
225
|
Optional[Path],
|
|
189
|
-
typer.Argument(help="Python script file to open",
|
|
226
|
+
typer.Argument(help="Python script file to open (created if missing)", dir_okay=False)
|
|
190
227
|
] = None,
|
|
228
|
+
demo: Annotated[
|
|
229
|
+
bool,
|
|
230
|
+
typer.Option("--demo", help="Open the bundled demo script")
|
|
231
|
+
] = False,
|
|
191
232
|
export: Annotated[
|
|
192
233
|
bool,
|
|
193
234
|
typer.Option("--export", "-e", help="Export script to self-contained HTML file")
|
|
@@ -218,10 +259,26 @@ def main_command(
|
|
|
218
259
|
] = False,
|
|
219
260
|
):
|
|
220
261
|
"""Start the pdit server, or export a script to HTML with --export."""
|
|
262
|
+
if demo:
|
|
263
|
+
if script:
|
|
264
|
+
typer.echo("Error: --demo cannot be used with a script argument", err=True)
|
|
265
|
+
raise typer.Exit(1)
|
|
266
|
+
try:
|
|
267
|
+
script = resolve_demo_script_path()
|
|
268
|
+
except FileNotFoundError as e:
|
|
269
|
+
typer.echo(f"Error: {e}", err=True)
|
|
270
|
+
raise typer.Exit(1)
|
|
271
|
+
|
|
221
272
|
if export:
|
|
222
273
|
if not script:
|
|
223
274
|
typer.echo("Error: script is required for --export", err=True)
|
|
224
275
|
raise typer.Exit(1)
|
|
276
|
+
if not script.exists():
|
|
277
|
+
typer.echo(f"Error: script not found: {script}", err=True)
|
|
278
|
+
raise typer.Exit(1)
|
|
279
|
+
if script.is_dir():
|
|
280
|
+
typer.echo(f"Error: {script} is a directory", err=True)
|
|
281
|
+
raise typer.Exit(1)
|
|
225
282
|
|
|
226
283
|
from .exporter import export_script
|
|
227
284
|
|
|
@@ -238,6 +295,8 @@ def main_command(
|
|
|
238
295
|
output_path.write_text(html_output)
|
|
239
296
|
typer.echo(f"Exported to {output_path}")
|
|
240
297
|
else:
|
|
298
|
+
if script:
|
|
299
|
+
ensure_script_exists(script)
|
|
241
300
|
start(script, port, host, no_browser, no_token_auth)
|
|
242
301
|
|
|
243
302
|
|
pdit/ipython_executor.py
CHANGED
|
@@ -28,6 +28,7 @@ class IPythonExecutor:
|
|
|
28
28
|
self.km: Optional[AsyncKernelManager] = None
|
|
29
29
|
self.kc = None # AsyncKernelClient
|
|
30
30
|
self._startup_task: Optional[asyncio.Task] = None
|
|
31
|
+
self._runtime_hooks_registered = False
|
|
31
32
|
|
|
32
33
|
def start(self) -> None:
|
|
33
34
|
"""Start IPython kernel in the background.
|
|
@@ -111,6 +112,53 @@ del _register_pdit_formatter
|
|
|
111
112
|
"""
|
|
112
113
|
await self._execute_silent(formatter_code)
|
|
113
114
|
|
|
115
|
+
async def _register_runtime_hooks(self) -> None:
|
|
116
|
+
"""Register runtime hooks for kernel behavior."""
|
|
117
|
+
if self._runtime_hooks_registered:
|
|
118
|
+
return
|
|
119
|
+
hook_code = """
|
|
120
|
+
def _register_pdit_runtime_hooks():
|
|
121
|
+
import sys
|
|
122
|
+
import IPython
|
|
123
|
+
|
|
124
|
+
def _pdit_disable_matplotlib_interactive():
|
|
125
|
+
mpl = sys.modules.get("matplotlib")
|
|
126
|
+
if mpl is None:
|
|
127
|
+
return
|
|
128
|
+
try:
|
|
129
|
+
mpl.interactive(False)
|
|
130
|
+
except Exception:
|
|
131
|
+
pass
|
|
132
|
+
plt = sys.modules.get("matplotlib.pyplot")
|
|
133
|
+
if plt is not None:
|
|
134
|
+
try:
|
|
135
|
+
plt.ioff()
|
|
136
|
+
except Exception:
|
|
137
|
+
pass
|
|
138
|
+
|
|
139
|
+
ip = IPython.get_ipython()
|
|
140
|
+
if not ip:
|
|
141
|
+
_pdit_disable_matplotlib_interactive()
|
|
142
|
+
return
|
|
143
|
+
|
|
144
|
+
if not getattr(ip, "_pdit_mpl_guard_installed", False):
|
|
145
|
+
def _pdit_post_run_cell(result):
|
|
146
|
+
_pdit_disable_matplotlib_interactive()
|
|
147
|
+
|
|
148
|
+
try:
|
|
149
|
+
ip.events.register("post_run_cell", _pdit_post_run_cell)
|
|
150
|
+
ip._pdit_mpl_guard_installed = True
|
|
151
|
+
except Exception:
|
|
152
|
+
_pdit_disable_matplotlib_interactive()
|
|
153
|
+
return
|
|
154
|
+
_pdit_disable_matplotlib_interactive()
|
|
155
|
+
|
|
156
|
+
_register_pdit_runtime_hooks()
|
|
157
|
+
del _register_pdit_runtime_hooks
|
|
158
|
+
"""
|
|
159
|
+
await self._execute_silent(hook_code)
|
|
160
|
+
self._runtime_hooks_registered = True
|
|
161
|
+
|
|
114
162
|
def _parse_script(self, script: str) -> list[dict]:
|
|
115
163
|
"""Parse Python script into statement dicts using AST."""
|
|
116
164
|
tree = ast.parse(script)
|
|
@@ -233,6 +281,7 @@ del _register_pdit_formatter
|
|
|
233
281
|
"""
|
|
234
282
|
# Wait for kernel to be ready
|
|
235
283
|
await self.wait_ready()
|
|
284
|
+
await self._register_runtime_hooks()
|
|
236
285
|
|
|
237
286
|
# Parse script
|
|
238
287
|
try:
|
|
@@ -307,6 +356,7 @@ del _register_pdit_formatter
|
|
|
307
356
|
await self.kc.wait_for_ready(timeout=30)
|
|
308
357
|
await self._drain_iopub()
|
|
309
358
|
await self._register_display_formatters()
|
|
359
|
+
self._runtime_hooks_registered = False
|
|
310
360
|
|
|
311
361
|
async def _drain_iopub(self) -> None:
|
|
312
362
|
"""Drain any pending messages from iopub channel."""
|
|
@@ -333,6 +383,7 @@ del _register_pdit_formatter
|
|
|
333
383
|
except asyncio.CancelledError:
|
|
334
384
|
pass
|
|
335
385
|
self._startup_task = None
|
|
386
|
+
self._runtime_hooks_registered = False
|
|
336
387
|
|
|
337
388
|
if self.kc:
|
|
338
389
|
self.kc.stop_channels()
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pdit
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Interactive Python code editor with inline execution results
|
|
5
|
+
Author: Harry Vangberg
|
|
6
|
+
License: Private
|
|
7
|
+
Project-URL: Homepage, https://github.com/vangberg/pdit
|
|
8
|
+
Project-URL: Repository, https://github.com/vangberg/pdit
|
|
9
|
+
Project-URL: Issues, https://github.com/vangberg/pdit/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: <3.14,>=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: fastapi>=0.104.0
|
|
22
|
+
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
23
|
+
Requires-Dist: typer>=0.9.0
|
|
24
|
+
Requires-Dist: aiofiles>=23.0.0
|
|
25
|
+
Requires-Dist: watchfiles>=0.20.0
|
|
26
|
+
Requires-Dist: jupyter_client>=8.0.0
|
|
27
|
+
Requires-Dist: ipykernel>=6.29.0
|
|
28
|
+
Requires-Dist: itables>=2.6.1
|
|
29
|
+
Requires-Dist: ipython>=8.18.1
|
|
30
|
+
Provides-Extra: demo
|
|
31
|
+
Requires-Dist: great-tables>=0.20.0; extra == "demo"
|
|
32
|
+
Requires-Dist: matplotlib>=3.7.5; extra == "demo"
|
|
33
|
+
Requires-Dist: polars>=1.8.2; extra == "demo"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# pdit: output-focused Python editor.
|
|
37
|
+
|
|
38
|
+
pdit lets you write regular Python files and see execution results inline, right next to the code that produced them. Edit in your browser or your favorite editor.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install "pdit[demo]"
|
|
46
|
+
pdit --demo
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With [uv](https://docs.astral.sh/uv/):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uvx --with "pdit[demo]" pdit --demo
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Manual
|
|
57
|
+
|
|
58
|
+
See the [website](https://pdit.dev/manual/).
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for development setup and testing.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
pdit/__init__.py,sha256=QpiMnN_x5G3QaeWMXQlCRUtCo35IEYZLPj-cz87WG_g,185
|
|
2
|
+
pdit/_demo.py,sha256=7nCI2QEcFcwIxk7aN5bSWJTfnG9wL6cqa9iBG3nvL4c,2009
|
|
3
|
+
pdit/cli.py,sha256=3YkWz2Sg3-OszRssWkXbPEu3dDQAXMS8Z0c07bZ7gx8,9634
|
|
4
|
+
pdit/exporter.py,sha256=i2emLqRQNPW92vFBTamLZyOhUTDU45_0QnOWG7PcIu8,2811
|
|
5
|
+
pdit/file_watcher.py,sha256=1WlqKWjLCdgMZLdN836MEeWTisGCtZmvgRdOFN-jns8,5200
|
|
6
|
+
pdit/ipython_executor.py,sha256=Fl7nkRD7i7H9cRPAhHdLvVcDNZe8h26Kxwzm-BvfYY0,14873
|
|
7
|
+
pdit/server.py,sha256=URabdsLxiLUipkl8PTc5jgDjMlQV0v8QJTMnNNy0XKs,13941
|
|
8
|
+
pdit/_static/export.html,sha256=Efw5ZLh1bZG21AFwj9v79ziflEzlS-14uIRl_GcaS7Y,332078
|
|
9
|
+
pdit/_static/index.html,sha256=lpilmHy0ASsduLdhEFF3-ylRiWdGpsFIzIJSuNSDXXk,450
|
|
10
|
+
pdit/_static/assets/index-C5r-TK5N.css,sha256=dTTtvarVC4aX8DwxMhGuLWOZy2CQQ_kS56n73gd848M,22719
|
|
11
|
+
pdit/_static/assets/index-CANjXEqm.js,sha256=YQQ3hlzIsqT8WDY5M6MznEUr2BHb6Sn6hHHdpzHQ8fQ,814786
|
|
12
|
+
pdit-0.3.0.dist-info/licenses/LICENSE,sha256=Y9tvBURRu-1aHUHY-tnbsDpPBTRYKWpIInVmaoOUkME,1071
|
|
13
|
+
pdit-0.3.0.dist-info/METADATA,sha256=_7KM6uvXESfYYXviYJD9hQ_Y03iqeucqz42oXtoxELM,1863
|
|
14
|
+
pdit-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
pdit-0.3.0.dist-info/entry_points.txt,sha256=n9I4wGD7M0NQrPWJcTWOsJAzeS6bQJbTnUP8C3Sl-iY,39
|
|
16
|
+
pdit-0.3.0.dist-info/top_level.txt,sha256=wk6vel1ecJS4EZZ3U6Xue9OwDq-Tw8Pbvq_TRQz9eIQ,5
|
|
17
|
+
pdit-0.3.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Harry Vangberg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap";:root{--color-yellow: #FFD700;--color-red: #E63946;--color-blue: #457B9D;--color-teal: #2A9D8F;--color-orange: #F4A261;--color-black: #1a1a1a;--color-cream: #FFFEF5;--color-warm-hover: #FFF8DC;--color-gray: #555;--color-gray-light: #888;--color-link: var(--color-red);--color-link-hover: var(--color-blue);--color-code-bg: var(--color-black);--color-code-text: var(--color-yellow);--border-thick: 3px solid var(--color-black);--border-thin: 1px solid #ddd;--gradient-rainbow: linear-gradient(90deg, var(--color-red) 25%, var(--color-yellow) 25%, var(--color-yellow) 50%, var(--color-blue) 50%, var(--color-blue) 75%, var(--color-teal) 75% );--bg-primary: #fff;--bg-secondary: #f8f8f8;--bg-tertiary: #f5f5f5;--border: #ddd;--accent: var(--color-red);--accent-alt: var(--color-blue);--text-primary: var(--color-black);--text-secondary: var(--color-gray);--text-dim: var(--color-gray-light);--error: #cc0000;--error-soft: #d97a7a;--warning: var(--color-orange);font-family:system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:var(--color-black);background-color:#fff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;width:100vw;height:100vh;overflow:hidden;background:#fff}#app{width:100%;height:100%;display:flex;flex-direction:column}#app.loading{cursor:wait}#app.loading .top-bar,#app.loading .split-container{opacity:.5;pointer-events:none}.top-bar{background:#fafafa;padding:.5rem 1rem;display:flex;align-items:center;flex-shrink:0;font-family:Fira Code,ui-monospace,monospace;border-bottom:1px solid #e0e0e0}.top-bar-content{display:flex;gap:.75rem;align-items:center;width:100%}.top-bar-button-wrapper{position:relative}.top-bar-button{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-button:hover:not(:disabled){background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-button:disabled{cursor:not-allowed;color:#bbb;border-color:#ddd}.top-bar-tooltip{position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%);background:var(--color-black);color:var(--color-cream);padding:.4rem .6rem;border-radius:0;font-size:.7rem;font-weight:500;font-family:ui-monospace,monospace;white-space:nowrap;border:none;z-index:1000;pointer-events:none;box-shadow:0 2px 4px #0003}.top-bar-status{display:flex;align-items:center;gap:.5rem;margin-left:.75rem}.top-bar-status-dot{width:8px;height:8px;border-radius:50%}.top-bar-status-dot.ready{background:var(--color-teal)}.top-bar-status-dot.initializing{background:var(--color-orange)}.top-bar-status-dot.connected{background:var(--color-teal)}.top-bar-status-dot.connecting{background:var(--color-orange)}.top-bar-status-dot.disconnected{background:var(--color-red)}.top-bar-conflict-compact{display:flex;align-items:center;gap:.375rem;background:transparent;border:1px solid var(--color-orange);border-radius:0;padding:.25rem .375rem;font-size:.7rem;margin-left:.75rem}.top-bar-conflict-compact-message{color:var(--color-orange);font-family:ui-monospace,monospace;white-space:nowrap;font-size:.75rem;font-weight:500}.top-bar-conflict-button-primary{position:relative;background:var(--color-orange);color:#fff;border:none;border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:600}.top-bar-conflict-button-primary:hover{background:var(--color-red)}.top-bar-conflict-button-primary:disabled{cursor:not-allowed;background:#ccc}.top-bar-conflict-button-secondary{position:relative;background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-radius:0;padding:.25rem .5rem;font-size:.7rem;cursor:pointer;font-family:ui-monospace,monospace;transition:all .1s;font-weight:500}.top-bar-conflict-button-secondary:hover{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-conflict-button-secondary:disabled{cursor:not-allowed;color:#ccc;border-color:#ddd}.top-bar-status-text{font-size:.7rem;font-weight:500;color:var(--color-gray-light)}.top-bar-status-text.ready{color:var(--color-teal)}.top-bar-status-text.initializing{color:var(--color-orange)}.top-bar-status-text.connected{color:var(--color-teal)}.top-bar-status-text.connecting{color:var(--color-orange)}.top-bar-status-text.disconnected{color:var(--color-red)}.top-bar-toggle-wrapper{position:relative}.top-bar-toggle-icon{display:flex;align-items:center}.top-bar-toggle{display:flex;align-items:center;gap:.5rem;background:transparent;border:1px solid var(--color-gray-light);border-radius:0;padding:0 .8rem;cursor:pointer;font-size:.75rem;font-family:inherit;transition:all .1s;font-weight:500;color:var(--color-gray);height:32px}.top-bar-toggle:hover{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-toggle:disabled{cursor:not-allowed;color:var(--color-gray-light);border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-switch{background:#ddd;border-color:#ddd}.top-bar-toggle:disabled .top-bar-toggle-knob{background:var(--color-gray-light);border-color:var(--color-gray-light)}.top-bar-toggle.enabled{border-color:var(--color-teal);background:transparent;color:var(--color-teal)}.top-bar-toggle-label{font-size:.75rem;color:currentColor}.top-bar-toggle.enabled .top-bar-toggle-label{color:var(--color-teal)}.top-bar-toggle-switch{width:24px;height:12px;background:#ddd;border:1px solid var(--color-gray-light);border-radius:0;position:relative;transition:all .1s}.top-bar-toggle.enabled .top-bar-toggle-switch{background:var(--color-teal);border-color:var(--color-teal)}.top-bar-toggle-knob{position:absolute;top:1px;left:1px;width:8px;height:8px;background:#fff;border:none;border-radius:0;transition:transform .1s}.top-bar-toggle.enabled .top-bar-toggle-knob{transform:translate(12px);background:#fff}.split-container{display:grid;grid-template-columns:1fr 1fr;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;border-top:none;transition:opacity .15s ease-out;background:#fff}.editor-half{display:flex;flex-direction:column;flex:0 0 50%;min-width:0;border-right:1px solid #e5e5e5}.output-half{display:flex;flex:0 0 50%;min-width:0}.split-container.reader-mode{grid-template-columns:0fr 1fr}.editor-hidden{visibility:hidden;width:0;overflow:hidden}.output-full{flex:1}h1{font-size:2.5em;line-height:1.1;margin-bottom:1em;text-align:center;font-weight:800;letter-spacing:-.02em}.editor-container{display:flex;flex-direction:row;width:100%;border:none;border-radius:0;overflow:hidden;box-shadow:none;background:#fff}#editor{flex:1;width:100%;min-width:0}#editor-preview{flex:1;border-left:1px solid #e5e5e5;padding-left:.5rem}.cm-editor{font-size:14px;min-width:0;background:#fff;color:var(--color-black);font-family:ui-monospace,monospace}.cm-focused{outline:none}#output{font-size:13px;font-family:ui-monospace,monospace;width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;background:#fff;border-left:none;padding-right:12px;scrollbar-gutter:stable}.output-content{display:flex;flex-direction:column;position:relative;padding:6px;gap:4px}.output-group{background:transparent;border:none;border-left:3px solid #e5e5e5;margin:0;padding:0 6px 0 8px;border-radius:0}.output-group-error{border-left-color:var(--color-red)}.output-content.reader-mode .output-group{margin:0;border:none;padding-left:8px;padding-right:8px;border-left:2px solid #ddd}.output-group-invisible{background:transparent;border:none;height:0;overflow:hidden;margin:0;padding:0;border-radius:0;box-shadow:none}.output-container,.output-container-invisible{padding:0}.output-line{position:relative}.output-line:not(.empty-line){padding:0}.output-line pre{margin:0;padding:0;font-size:13px;line-height:1.4;color:var(--color-black);font-family:ui-monospace,monospace}.output-item{color:var(--color-black);display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0}.output-content-wrapper{flex:1;min-width:0;overflow-x:auto;width:100%}.output-debug{margin-top:6px;padding-top:6px;border-top:2px solid var(--color-black)}.output-debug-button{font-size:10px;padding:2px 6px;background:transparent;border:2px solid var(--color-black);border-radius:0;cursor:pointer;font-family:ui-monospace,monospace;color:var(--color-black);transition:all .1s;font-weight:600}.output-debug-button:hover{background:var(--color-black);color:var(--color-yellow)}.output-debug-info{margin-top:6px;padding:6px;background:var(--color-black);border:2px solid var(--color-black);border-radius:0;max-height:400px;overflow:auto;position:relative}.output-debug-info:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-debug-info pre{margin:4px 0 0;font-size:11px;line-height:1.4;color:var(--color-cream);font-family:ui-monospace,monospace}.output-item.output-stdout .output-content-wrapper{color:var(--color-black);font-family:ui-monospace,monospace}.output-item.output-stderr .output-content-wrapper,.output-item.output-error .output-content-wrapper{color:var(--color-red);font-weight:600}.output-item.output-warning .output-content-wrapper{color:var(--color-orange);font-weight:600}.output-item pre{color:var(--color-black);font-family:ui-monospace,monospace;background:transparent;margin:0;padding:0;border:none;white-space:pre-wrap;overflow-wrap:anywhere}.output-item code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-family:ui-monospace,monospace}.output-text-markdown code{color:var(--color-yellow);background:var(--color-black);padding:.2em .4em;border-radius:3px;font-weight:600}.output-text-markdown pre{background:var(--color-black);border:none;padding:1.25rem;overflow-x:auto;margin:.5em 0;position:relative;border-radius:0}.output-text-markdown pre:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-rainbow)}.output-text-markdown pre code{background:none;padding:0;color:var(--color-cream);border-radius:0}.output-text-markdown blockquote{border-left:4px solid var(--color-yellow);margin:.5em 0;padding-left:1em;color:var(--color-gray)}.output-text-markdown h1,.output-text-markdown h2,.output-text-markdown h3,.output-text-markdown h4,.output-text-markdown h5,.output-text-markdown h6{font-weight:700;letter-spacing:-.02em;color:var(--color-black);margin:1em 0 .5em}.output-text-markdown ul{list-style:none;padding-left:0;margin:.5em 0}.output-text-markdown ul li{padding-left:1.5rem;position:relative;margin:.25em 0}.output-text-markdown ul li:before{content:"";position:absolute;left:0;top:.55em;width:6px;height:6px;background:var(--color-yellow);border:none}.output-text-markdown ul li:nth-child(5n+1):before{background:var(--color-yellow)}.output-text-markdown ul li:nth-child(5n+2):before{background:var(--color-red)}.output-text-markdown ul li:nth-child(5n+3):before{background:var(--color-blue)}.output-text-markdown ul li:nth-child(5n+4):before{background:var(--color-teal)}.output-text-markdown ul li:nth-child(5n+5):before{background:var(--color-orange)}.output-text-markdown ol{padding-left:1.5rem;margin:.5em 0}.output-text-markdown ol li{margin:.25em 0}.output-text-markdown a{color:var(--color-red);text-decoration:none;font-weight:600}.output-text-markdown a:hover{color:var(--color-blue)}.output-text-markdown strong{font-weight:700;color:var(--color-black)}.output-text-markdown em{font-style:italic}.output-text-markdown .output-content-wrapper>*:first-child{margin-top:0;padding-top:0}.output-text-markdown .output-content-wrapper>*:last-child{margin-bottom:0;padding-bottom:0}.output-item.output-plot{margin-top:.25rem}.output-plot canvas{display:block;background:var(--color-cream);width:400px;height:300px;border:2px solid var(--color-black)}.output-image{max-width:100%;max-width:min(100%,1200px);height:auto;display:block;background:var(--color-cream);border:2px solid var(--color-black)}.output-html{width:100%;background:transparent;display:block;overflow-x:auto}.output-table{width:100%;border-collapse:collapse;color:var(--color-gray);border:2px solid var(--color-black)}.output-table td{padding:.25rem .5rem;border:1px solid var(--color-gray);color:var(--color-gray)}.output-table .header-row td{font-weight:700;color:var(--color-black);background:var(--color-warm-hover);border-bottom:3px solid var(--color-black)}.output-table td:last-child{text-align:right;font-family:ui-monospace,monospace}.output-table tr:hover td{background:var(--color-warm-hover)}.empty-line{height:16px}.plot-chart{display:flex;align-items:end;gap:1px;height:30px}.plot-bar{min-width:6px;background-color:var(--color-red);opacity:.8}.array-items{display:flex;flex-wrap:wrap;gap:3px}.array-item{background:var(--color-black);color:var(--color-yellow);padding:2px 4px;border:2px solid var(--color-black);border-radius:0;font-family:ui-monospace,monospace}.output-spacer-container{display:block;background:transparent}.output-spacer{width:100%}.debug-panel{position:fixed;bottom:0;left:0;right:0;background:var(--color-cream);border-top:var(--border-thick);padding:1rem;max-height:300px;overflow-y:auto;font-size:.8rem}.debug-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.debug-header h3{margin:0;color:var(--color-black);text-transform:uppercase;letter-spacing:.5px;font-weight:700}.debug-status{color:var(--color-gray-light);font-size:.75rem}.debug-table{width:100%;border-collapse:collapse;background:var(--color-cream);border-radius:0;overflow:hidden;border:2px solid var(--color-black)}.debug-table th{background:var(--color-yellow);color:var(--color-black);padding:.5rem 1rem;text-align:right;font-weight:700;font-size:.75rem;border-bottom:3px solid var(--color-black)}.debug-table td{padding:.5rem 1rem;border-bottom:1px solid #ddd;font-size:.75rem;color:var(--color-gray)}.debug-table tbody tr:hover{background:var(--color-warm-hover)}.line-number{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.height-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.debug-tabs{display:flex;gap:0;margin-bottom:1rem;border-bottom:3px solid var(--color-black)}.debug-tab{background:none;border:none;border-bottom:3px solid transparent;padding:.5rem 1rem;cursor:pointer;font-size:.75rem;font-weight:600;color:var(--color-gray);transition:all .1s;text-transform:uppercase;letter-spacing:.5px;margin-bottom:-3px}.debug-tab:hover{color:var(--color-black);background:var(--color-warm-hover)}.debug-tab.active{color:var(--color-black);border-bottom-color:var(--color-red);background:var(--color-yellow)}.debug-empty{text-align:center;color:var(--color-gray-light);padding:2rem;font-style:italic}.range-id{font-weight:600;color:var(--color-gray-light);text-align:center;width:60px}.range-value{font-family:ui-monospace,monospace;text-align:right;color:var(--color-black)}.top-bar-split-button-wrapper{position:relative;display:flex;align-items:stretch}.top-bar-split-button-main{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-right:none;border-radius:0;padding:0 .8rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;font-weight:500;display:flex;align-items:center;gap:.5rem;height:32px}.top-bar-run-label{display:inline-grid}.top-bar-run-label>span{grid-area:1 / 1}.top-bar-run-label-measure{visibility:hidden}.top-bar-split-button-arrow{background:transparent;color:var(--color-gray);border:1px solid var(--color-gray-light);border-left:1px solid #ddd;border-radius:0;padding:0 .4rem;font-size:.75rem;cursor:pointer;font-family:inherit;transition:all .1s;display:flex;align-items:center;justify-content:center;min-width:24px;height:32px}.top-bar-split-button-main:hover:not(:disabled),.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{background:var(--color-warm-hover);color:var(--color-black);border-color:var(--color-gray)}.top-bar-split-button-main:hover:not(:disabled){border-right:none}.top-bar-split-button-arrow:hover:not(:disabled),.top-bar-split-button-arrow.active{border-left-color:#ddd}.top-bar-split-button-main:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd}.top-bar-split-button-arrow:disabled{cursor:not-allowed;background:transparent;color:#ccc;border-color:#ddd;border-left-color:#ddd}.top-bar-dropdown-menu{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;min-width:100%;width:max-content;display:flex;flex-direction:column;z-index:1000}.top-bar-dropdown-menu:before{content:"";display:block;position:absolute;top:-4px;left:0;width:100%;height:4px;background:transparent}.top-bar-dropdown-item{padding:8px 12px;cursor:pointer;color:var(--color-gray);font-size:.75rem;font-family:inherit;border:none;background:transparent;text-align:left;font-weight:500;transition:all .1s;display:flex;align-items:center;justify-content:space-between;gap:1rem}.top-bar-dropdown-item:hover,.top-bar-dropdown-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.top-bar-dropdown-item.disabled{cursor:not-allowed;color:var(--color-gray)}.top-bar-dropdown-item.disabled:hover,.top-bar-dropdown-item.disabled.selected{background:transparent;color:var(--color-gray)}.top-bar-dropdown-item-shortcut{font-size:.65rem;opacity:.7}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.fuzzy-finder-dropdown{position:absolute;top:100%;left:0;margin-top:4px;background:#fff;border:1px solid #ddd;border-radius:0;box-shadow:0 2px 8px #0000001a;width:320px;max-height:300px;display:flex;flex-direction:column;overflow:hidden;z-index:1000}.fuzzy-finder-input{background:#fff;color:var(--color-black);border:none;border-bottom:1px solid #ddd;padding:8px 10px;font-size:12px;font-family:inherit;outline:none;width:100%;box-sizing:border-box}.fuzzy-finder-input:focus{background:var(--color-warm-hover)}.fuzzy-finder-input::placeholder{color:var(--color-gray-light)}.fuzzy-finder-list{overflow-y:auto;flex:1}.fuzzy-finder-item{padding:6px 10px;cursor:pointer;display:flex;align-items:baseline;gap:8px;border-bottom:1px solid #ddd;min-width:0}.fuzzy-finder-item:hover{background:var(--color-warm-hover)}.fuzzy-finder-item.selected{background:var(--color-warm-hover);color:var(--color-black)}.fuzzy-finder-filename{color:var(--color-black);font-size:12px;font-family:ui-monospace,monospace;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px;font-weight:600}.fuzzy-finder-path{color:var(--color-gray-light);font-size:10px;font-family:ui-monospace,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.fuzzy-match-highlight{color:var(--color-red);font-weight:700}.fuzzy-finder-item.selected .fuzzy-match-highlight{color:var(--color-red)}.fuzzy-finder-empty{padding:12px 10px;text-align:center;color:var(--color-gray-light);font-size:11px;font-family:ui-monospace,monospace;white-space:nowrap}table.dataTable{border-collapse:collapse;font-size:13px;font-family:ui-monospace,monospace;border:1px solid #ddd;background:#fff;width:100%}table.dataTable thead th{background:#f5f5f5;font-weight:600;color:var(--color-black);border-right:1px solid #ddd;border-bottom:1px solid #ddd;padding:8px;font-size:12px;text-align:left}table.dataTable thead th:last-child{border-right:none}table.dataTable tbody td{padding:6px 8px;border-right:1px solid #eee;border-bottom:1px solid #eee;color:var(--color-gray);background:#fff}table.dataTable tbody td:last-child{border-right:none}table.dataTable tbody tr:last-child td{border-bottom:none}table.dataTable tbody tr:hover td{background:#f9f9f9}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background:#fff}table.dataTable.stripe tbody tr.odd:hover,table.dataTable.display tbody tr.odd:hover{background:#f9f9f9}div.dt-container{font-family:ui-monospace,monospace;font-size:11px}div.dt-layout-row{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:4px 0!important}div.dt-layout-cell{padding:2px!important}div.dt-search input{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-search input:hover{border-color:#bbb}div.dt-search input:focus{outline:none;border-color:#999;background:#fff}div.dt-length select{background:#fff;border:1px solid #ddd;border-radius:0;padding:2px 6px;font-size:11px;font-family:ui-monospace,monospace;color:var(--color-black);height:22px}div.dt-length select:hover{border-color:#bbb}div.dt-length select:focus{outline:none;border-color:#999;background:#fff}div.dt-paging button{background:transparent;border:1px solid #ddd;border-radius:0;padding:2px 8px;font-size:11px;cursor:pointer;color:var(--color-gray);font-family:ui-monospace,monospace;transition:all .1s;height:22px;margin:0 1px;font-weight:500}div.dt-paging button:hover:not(.disabled){background:#f5f5f5;border-color:#bbb;color:var(--color-black)}div.dt-paging button.disabled{cursor:not-allowed;color:#ccc;border-color:#eee;opacity:.5}div.dt-paging button.current{background:#333;border-color:#333;color:#fff;font-weight:600}div.dt-info{color:var(--color-gray);font-size:11px;font-family:ui-monospace,monospace}table.dataTable.no-footer{border-bottom:1px solid #ddd}table.dataTable thead th.dt-orderable-asc,table.dataTable thead th.dt-orderable-desc,table.dataTable thead th.dt-ordering-asc,table.dataTable thead th.dt-ordering-desc{background:#f0f0f0}small.itables-dtype{color:var(--color-gray-light);font-size:10px}table tbody td{vertical-align:middle}table tbody td a{color:#06c;text-decoration:none}table tbody td a:hover{color:#049;text-decoration:underline}@media (max-width: 900px){.top-bar-label,.top-bar-toggle-label{display:none}}
|