From 56280f20a27f57c7725f762c10c2d0b3d9184b2c Mon Sep 17 00:00:00 2001 From: greggman Date: Sat, 17 Aug 2024 01:56:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20b1ba9?= =?UTF-8?q?102515037f7c19007da2f4b96168c11fc04=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asset-manifest.json | 14 +++++++------- index.html | 2 +- jsgist-runner.js | 1 - ...he-manifest.7421bc38a2dcefed16128421b6b8bbcc.js | 10 +++++----- service-worker.js | 2 +- static/css/main.3b498017.chunk.css | 2 -- static/css/main.3b498017.chunk.css.map | 1 - static/css/main.7da83b7e.chunk.css | 2 ++ static/css/main.7da83b7e.chunk.css.map | 1 + static/js/main.18d61dac.chunk.js | 2 -- static/js/main.18d61dac.chunk.js.map | 1 - static/js/main.ba9b3771.chunk.js | 2 ++ static/js/main.ba9b3771.chunk.js.map | 1 + 13 files changed, 20 insertions(+), 21 deletions(-) rename precache-manifest.21de5076975a5e99923c9185cad0a0d8.js => precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js (81%) delete mode 100644 static/css/main.3b498017.chunk.css delete mode 100644 static/css/main.3b498017.chunk.css.map create mode 100644 static/css/main.7da83b7e.chunk.css create mode 100644 static/css/main.7da83b7e.chunk.css.map delete mode 100644 static/js/main.18d61dac.chunk.js delete mode 100644 static/js/main.18d61dac.chunk.js.map create mode 100644 static/js/main.ba9b3771.chunk.js create mode 100644 static/js/main.ba9b3771.chunk.js.map diff --git a/asset-manifest.json b/asset-manifest.json index 95a5d47..86ebf2c 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,18 +1,18 @@ { "files": { - "main.css": "/static/css/main.3b498017.chunk.css", - "main.js": "/static/js/main.18d61dac.chunk.js", - "main.js.map": "/static/js/main.18d61dac.chunk.js.map", + "main.css": "/static/css/main.7da83b7e.chunk.css", + "main.js": "/static/js/main.ba9b3771.chunk.js", + "main.js.map": "/static/js/main.ba9b3771.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.a136100e.js", "runtime-main.js.map": "/static/js/runtime-main.a136100e.js.map", "static/css/2.6b709c6b.chunk.css": "/static/css/2.6b709c6b.chunk.css", "static/js/2.1942bc72.chunk.js": "/static/js/2.1942bc72.chunk.js", "static/js/2.1942bc72.chunk.js.map": "/static/js/2.1942bc72.chunk.js.map", "index.html": "/index.html", - "precache-manifest.21de5076975a5e99923c9185cad0a0d8.js": "/precache-manifest.21de5076975a5e99923c9185cad0a0d8.js", + "precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js": "/precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js", "service-worker.js": "/service-worker.js", "static/css/2.6b709c6b.chunk.css.map": "/static/css/2.6b709c6b.chunk.css.map", - "static/css/main.3b498017.chunk.css.map": "/static/css/main.3b498017.chunk.css.map", + "static/css/main.7da83b7e.chunk.css.map": "/static/css/main.7da83b7e.chunk.css.map", "static/js/2.1942bc72.chunk.js.LICENSE.txt": "/static/js/2.1942bc72.chunk.js.LICENSE.txt", "static/media/horizontal-layout.svg": "/static/media/horizontal-layout.e3f3298b.svg", "static/media/tabbed-layout.svg": "/static/media/tabbed-layout.8a8b9bc8.svg", @@ -23,7 +23,7 @@ "static/js/runtime-main.a136100e.js", "static/css/2.6b709c6b.chunk.css", "static/js/2.1942bc72.chunk.js", - "static/css/main.3b498017.chunk.css", - "static/js/main.18d61dac.chunk.js" + "static/css/main.7da83b7e.chunk.css", + "static/js/main.ba9b3771.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 2e90a27..52a757c 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -jsGist
\ No newline at end of file +jsGist
\ No newline at end of file diff --git a/jsgist-runner.js b/jsgist-runner.js index 59d65a7..0f48b52 100644 --- a/jsgist-runner.js +++ b/jsgist-runner.js @@ -16,7 +16,6 @@ 'midi', 'clipboard-read', 'clipboard-write', - 'web-share', 'serial', 'xr-spatial-tracking', ].map(v => `${v} *`).join('; '); diff --git a/precache-manifest.21de5076975a5e99923c9185cad0a0d8.js b/precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js similarity index 81% rename from precache-manifest.21de5076975a5e99923c9185cad0a0d8.js rename to precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js index 23241ba..1f6af6d 100644 --- a/precache-manifest.21de5076975a5e99923c9185cad0a0d8.js +++ b/precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "2b16b5220979dd266d64d46f5e319059", + "revision": "6e6661b3aebd1e2abb0776a6b282b5e2", "url": "/index.html" }, { @@ -8,8 +8,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/css/2.6b709c6b.chunk.css" }, { - "revision": "d485b95548296f800d82", - "url": "/static/css/main.3b498017.chunk.css" + "revision": "e7e4cdd8691b90af30b4", + "url": "/static/css/main.7da83b7e.chunk.css" }, { "revision": "0bcca7f6ebb7727dc794", @@ -20,8 +20,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/js/2.1942bc72.chunk.js.LICENSE.txt" }, { - "revision": "d485b95548296f800d82", - "url": "/static/js/main.18d61dac.chunk.js" + "revision": "e7e4cdd8691b90af30b4", + "url": "/static/js/main.ba9b3771.chunk.js" }, { "revision": "21d734a13edf31307f64", diff --git a/service-worker.js b/service-worker.js index 16935b1..01a24f1 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/precache-manifest.21de5076975a5e99923c9185cad0a0d8.js" + "/precache-manifest.7421bc38a2dcefed16128421b6b8bbcc.js" ); self.addEventListener('message', (event) => { diff --git a/static/css/main.3b498017.chunk.css b/static/css/main.3b498017.chunk.css deleted file mode 100644 index 319e0a4..0000000 --- a/static/css/main.3b498017.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0}.charts{display:flex}.selected{background:red}.collapsed>*{display:none}:root{--scrollbar-size:.375rem;--scrollbar-minlength:1.5rem;--scrollbar-ff-width:thin;--scrollbar-track-color:transparent;--scrollbar-color:rgba(0,0,0,0.2);--scrollbar-color-hover:rgba(0,0,0,0.3);--scrollbar-color-active:#000}.layout-cell,.scrollbar-test{-ms-scroll-chaining:none;overscroll-behavior:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:thin;scrollbar-width:var(--scrollbar-ff-width)}.layout-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.layout-scrollbar-obtrusive .layout-scrollbar::-webkit-scrollbar{height:.375rem;height:var(--scrollbar-size);width:.375rem;width:var(--scrollbar-size)}.layout-scrollbar::-webkit-scrollbar-track{background-color:transparent;background-color:var(--scrollbar-track-color)}.layout-scrollbar::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2);background-color:var(--scrollbar-color);border-radius:3px}.layout-scrollbar::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.3);background-color:var(--scrollbar-color-hover)}.layout-scrollbar::-webkit-scrollbar-thumb:active{background-color:#000;background-color:var(--scrollbar-color-active)}.layout-scrollbar::-webkit-scrollbar-thumb:vertical,.scrollbar-test::-webkit-scrollbar-thumb:vertical{min-height:1.5rem;min-height:var(--scrollbar-minlength)}.layout-scrollbar::-webkit-scrollbar-thumb:horizontal,.scrollbar-test::-webkit-scrollbar-thumb:horizontal{min-width:1.5rem;min-width:var(--scrollbar-minlength)}@media (prefers-color-scheme:dark){:root{--scrollbar-color:#555;--scrollbar-color-hover:#555;--scrollbar-color-active:#555}}:root{color-scheme:light dark;--main-bg-color:#eee;--main-fg-color:#000;--title-bg-color:#ccc;--unselected-color:#ccc;--table-head-bg-color:#ddd;--button-color:#48f;--link-color:#36c;--code-area-bg-color:#ccc;--pre-area-bg-color:#fff;--un-run-bg-color:#8af;--aborted-bg-color:#ddd;--error-fg-color:#8b0000;--warn-fg-color:brown;--editor-bg-color:#fff}html{box-sizing:border-box;font-family:sans-serif;line-height:1.2;background:#eee;background:var(--main-bg-color);color:#000;color:var(--main-fg-color)}body,html{height:100%}*,:after,:before{box-sizing:inherit}#root{overflow:auto}#root,.App{height:100%}.error-msg{color:#8b0000;color:var(--error-fg-color)}.content{height:100%;display:flex;flex-direction:column}.head{flex:0 0 auto;font-weight:700;justify-content:space-between;margin:0;font-size:larger}.head,.head a{display:flex;align-items:center}.head a{text-decoration:none;color:#000;color:var(--main-fg-color)}.head img{height:1em;vertical-align:middle;margin:5px}.head .beta{font-size:x-small;vertical-align:top;position:relative;right:1em}.fix-help-contribute{display:flex;align-items:center}.fix-help-contribute a{text-decoration:none;color:#000;color:var(--main-fg-color)}.fix-help-contribute .three-words{font-size:x-small;text-align:right}.fix-help-contribute .octocat{display:flex;flex-direction:column;justify-content:top}.top{flex:0 0 auto;display:flex;margin:10px 10px 0}.bottom{margin:10px;position:relative;flex:1 1 auto;min-height:0;height:100%}.bottom>div,.top>div{flex:1 1 50%;display:flex}.top .right{margin-left:10px;justify-content:space-between;align-items:center;overflow:hidden}.toolbar{display:flex}.top .left{position:relative;min-height:0;min-width:0}.bottom .left,.top .left{height:100%}.codes,.codes>div{height:100%;min-height:0}.codes>div{display:flex;flex-direction:column}.right{min-height:0;min-width:0;height:100%}.bottom{display:flex}.layout-3-horizontal-top{height:100%}.layout-3-horizontal-top .codes>div{flex-direction:row}.layout-3-horizontal-bottom{height:100%}.layout-tabbed{width:100%;height:100%;flex-direction:column}.layout-tabbed>.split{flex:1 1 auto;min-height:0}.layout-tabbed-log,.layout-tabbed-result{height:100%}.layout-tabbed-top .tab-tabs{display:flex;flex:0 0 auto}.layout-tabbed .tab-content,.layout-tabbed .tab-content>div{height:100%}.layout-tabbed-top .hidee{flex:1 1 auto}.layout-tabbed-top .code-area,.layout-tabbed-top .hidee,.react-codemirror2{display:flex;flex-direction:column;min-height:0}.layout-tabbed-top .tab-tabs input{position:absolute;opacity:0;padding:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layout-tabbed-top .tab-tabs label{cursor:pointer;padding:.5em 1em;margin-right:3px;background:rgba(0,0,0,.2);-webkit-user-select:none;-ms-user-select:none;user-select:none}.layout-tabbed-top .tab-tabs input:checked+label{background-color:#fff;background-color:var(--editor-bg-color)}.layout-tabbed .expander{display:none}.logger{background:#ccc;background:var(--title-bg-color);font-family:monospace;white-space:pre-wrap;height:100%;width:100%}.log-messages{overflow:auto;height:100%}.log-messages>*{overflow-wrap:anywhere;display:flex}.logger .msg{flex:1 1 auto}.logger .file{float:right;position:relative}.tooltip{position:relative;border-bottom:1px dashed #888}.tooltip:before{content:attr(data-tooltip);position:absolute;top:100%;transform:translateY(0);right:0;background:#eee;background:var(--main-bg-color);display:none;white-space:pre;left:auto;margin:initial;z-index:2}.tooltip:hover:before{display:block}.logger .file-link{text-decoration:underline}.logger .file-link:hover{background:hsla(0,0%,100%,.3);cursor:pointer}.logger .error .count,.logger .error .no-count,.logger .info .count,.logger .info .no-count,.logger .log .count,.logger .log .no-count,.logger .warn .count,.logger .warn .no-count{width:1em;height:1em;margin:0 .25em;background-position:50%;background-repeat:no-repeat;text-align:center;flex:0 0 auto}.logger .error .count,.logger .info .count,.logger .log .count,.logger .warn .count{border-radius:.5em;vertical-align:middle;line-height:1em}.logger .info .count{background:#666;color:#ddd}.logger .warn{color:brown;color:var(--warn-fg-color);background:rgba(255,255,0,.2)}.logger .warn .count{background:#ff0;color:brown}.logger .warn .no-count{background-image:url(/resources/images/warn-icon.svg)}.logger .error{color:#8b0000;color:var(--error-fg-color);background:rgba(255,0,0,.2)}.logger .error .count{background:red;color:#fff}.logger .error .no-count{background-image:url(/resources/images/error-icon.svg)}.split{display:flex;width:100%;height:100%}.split-vertical{flex-direction:column}.split .pane{flex-shrink:1;flex-grow:1;position:relative;min-width:0;min-height:0}.editor-codemirror .pane,.split .pane-dragging{overflow:hidden}.gutter{background-color:#eee;background-color:var(--main-bg-color);flex:0 0 auto}.gutter.gutter-horizontal,.gutter.gutter-horizontal:hover{cursor:ew-resize}.gutter.gutter-vertical,.gutter.gutter-vertical:hover{cursor:ns-resize}.gutter.gutter-vertical{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=")}.gutter.gutter-horizontal,.gutter.gutter-vertical{background-repeat:no-repeat;background-position:50%}.gutter.gutter-horizontal{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==")}a{color:#36c;color:var(--link-color)}.blocked{position:absolute}.blocked,.dialog{left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.8);z-index:100;display:flex;justify-content:center;align-items:center}.dialog{position:fixed;max-width:100%}.dialog>*{background:#eee;background:var(--main-bg-color);border-radius:5px;padding:1em;max-width:90%;max-height:90%;overflow:auto;width:800px;outline:none}.fixed-size-dialog>*{min-height:90%}.dialog-heading{display:flex;justify-content:space-between;font-size:xx-large;font-weight:700;margin:10px;position:relative;-webkit-user-select:none;-ms-user-select:none;user-select:none}.dialog-content{margin:10px}.dialog-close{position:absolute;right:0;top:0;vertical-align:top}.dialog pre{width:100%;overflow:auto;background:#fff;background:var(--pre-area-bg-color);padding:1em}.section{margin-bottom:10px;border:1px solid #888;border-radius:5px;padding:1em}.section-heading{font-size:large;border-bottom:1px solid #888;margin-bottom:1em;-webkit-user-select:none;-ms-user-select:none;user-select:none}.save-as-gist-pat{display:flex;align-items:center}.save-as-gist-pat>*{vertical-align:middle}.save-as-gist-pat>div:first-child{flex:0 0 auto}.save-as-gist-pat>div:nth-child(2){flex:1 1 auto}.bookmark{max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}.disabled{opacity:.2;pointer-events:none;cursor:not-allowed}.messages{position:fixed;bottom:0;z-index:1000}.messages>div{background:#888;color:#fff;padding:.5em;margin:.25em;border-radius:.25em}.messages .error{background:#c00}.messages .info{background:#00f}.radio{display:flex}.radio-selected{background-color:red;border-radius:.25em}.radio img{display:block}.layout .radio>*{width:3.5em;padding:.5em}.settings .radio>*{margin:.2em;padding:.2em}input{border:none;padding:.25em;background:#ccc;background:var(--title-bg-color);color:#000;color:var(--main-fg-color)}.name{display:flex;justify-content:space-between;align-items:center;width:100%}.name>*+*{margin-left:10px}.name>:first-child{flex:1 1 auto}.avatar{height:2em;border-radius:100%}input[type=password],input[type=text]{outline:none;width:100%;font-size:large}.named{padding:.25em}.runner,.runner>iframe{width:100%;height:100%}.runner>iframe{background:#fff;border:none}.code-area{display:flex;flex-direction:column;flex:1 1 auto;background:#ccc;background:var(--code-area-bg-color);min-height:0;height:100%}.code-area button{margin-right:0}.code-area input{background:#ccc;background:var(--code-area-bg-color);font-size:medium}.expander{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}.hider{width:1em;color:#888}.hidee{position:relative;display:flex;flex-direction:column;height:100%;min-height:0}.hidee>*{flex:1 1 auto}.hidee-hide{height:0;overflow:hidden}button{background:none;border:2px solid #48f;border:2px solid var(--button-color);color:#000;color:var(--main-fg-color);border-radius:.25em;padding:.25em;margin-right:.25em;min-width:2.5em;font-weight:700;-webkit-user-select:none;-ms-user-select:none;user-select:none;height:2.25em;line-height:calc(1em - 12px)}button img{height:1em}button:hover{background:#48f;background:var(--button-color)}.react-codemirror2{position:relative;height:100%}.CodeMirror{width:100%;height:100%}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{opacity:.6}.markdown code{background:#ccc;background:var(--title-bg-color);padding:.25em;border-radius:.5em;line-height:2}.gists{background-color:rgba(0,0,255,.1);border:none;display:block;min-height:20vh;max-height:40vh;overflow-y:scroll;position:relative}.gists table{width:100%}.gists thead{border:none}.gists th,.gists thead{background-color:#ccc;background-color:var(--title-bg-color)}.gists th{position:-webkit-sticky;position:sticky;top:0}.gists thead span{cursor:pointer;color:#ccc;color:var(--unselected-color)}.gists thead .current-sort-key{color:#000;color:var(--main-fg-color)}.gists td>div{transition:max-height .3s;max-height:100%}.gists .hide td>div{max-height:0}.gists tr:nth-child(2n){background-color:rgba(128,160,255,.2)}.gists td:nth-child(3n){text-align:right;white-space:nowrap}.comment-notes{padding:1em;margin:1em;background:hsla(0,0%,100%,.5);color:red}.comment-sep,.comments{margin:0 auto 1em;max-width:700px;width:calc(100% - 40px)}.comments iframe{width:100%;border:none}.comments .links{text-align:center}hr{border:none;background:#ccc;background:var(--title-bg-color);height:2px}.logout{display:flex;align-items:center}.new-comment{border-radius:.5em;border:1px solid #ccc;border:1px solid var(--code-area-bg-color);margin-left:calc(.5em + 42px);margin-right:.5em;margin-bottom:15em;position:relative}.new-comment .new-comment-head{background:#ccc;background:var(--code-area-bg-color);padding:.5em}.new-comment .new-comment-head .user-avatar{position:absolute;left:0;top:0;transform:translateX(-42px)}.new-comment .react-codemirror2{padding:0 .5em .5em;height:10em;resize:vertical;overflow:auto}.new-comment .new-comment-write{min-height:10em;height:10em}.new-comment .new-comment-preview{min-height:10em;padding:.5em}.new-comment .new-comment-tabs{margin-top:1em}.new-comment input[type=radio]{opacity:0;width:0}.new-comment input+label{padding:.5em .5em 0;margin-right:.125em;background:rgba(0,0,0,.1)}.new-comment input:checked+label{background:#fff;background:var(--editor-bg-color)}.new-comment-submit{display:flex;justify-content:flex-end;padding-top:1em}.copy-text{position:relative}.copy-text .copy-buttons{position:absolute;right:0;top:0}@media (max-width:740px){.head{font-size:medium;padding:2px}.head .beta{font-size:xx-small}.bottom,.top{flex-direction:column;margin-top:5px}.top{flex-direction:column-reverse}.right{margin-left:0;padding-bottom:5px;margin-bottom:5px}.top .right{margin-left:0;margin-top:5px}.fix-help-contribute .three-words{display:none}}@media (max-width:540px){html{font-size:xx-small}input[type=password],input[type=text]{outline:none;width:100%;font-size:small}button{font-size:small}}@media (prefers-color-scheme:dark){:root{--main-bg-color:#444;--main-fg-color:#fff;--unselected-color:#666;--title-bg-color:#222;--button-bg-color:#fff;--link-color:#6cf;--table-head-bg-color:#555;--code-area-bg-color:#555;--pre-area-bg-color:#222;--un-run-bg-color:#00f;--aborted-bg-color:#000;--error-fg-color:red;--warn-fg-color:#ff0;--editor-bg-color:#263238}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{opacity:.3}.comment-notes{background:rgba(0,0,0,.5)}.gists{background-color:rgba(0,0,0,.3)}.gists tr:nth-child(2n){background-color:rgba(0,0,0,.2)}} -/*# sourceMappingURL=main.3b498017.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.3b498017.chunk.css.map b/static/css/main.3b498017.chunk.css.map deleted file mode 100644 index 97b8596..0000000 --- a/static/css/main.3b498017.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.css","scrollbars.css","App.css"],"names":[],"mappings":"AAAA,KACE,QACF,CAEA,QACE,YACF,CAEA,UACE,cACF,CAEA,aACE,YACF,CCbA,MACE,wBAAyB,CACzB,4BAA6B,CAC7B,yBAA0B,CAC1B,mCAAoC,CACpC,iCAAiC,CACjC,uCAAuC,CACvC,6BACF,CAGA,6BAEE,wBAA4B,CAA5B,2BAA4B,CAC5B,eAAgB,CAChB,gCAAiC,CACjC,2CAA4C,CAC5C,oBAA0C,CAA1C,yCACF,CAGA,kBACE,0CAAoE,CAApE,mEACF,CAEA,iEACE,cAA6B,CAA7B,4BAA6B,CAC7B,aAA4B,CAA5B,2BACF,CACA,2CACE,4BAA8C,CAA9C,6CACF,CACA,2CACE,+BAAwC,CAAxC,uCAAwC,CACxC,iBACF,CACA,iDACE,+BAA8C,CAA9C,6CACF,CACA,kDACE,qBAA+C,CAA/C,8CACF,CACA,sGAEE,iBAAsC,CAAtC,qCACF,CACA,0GAEE,gBAAqC,CAArC,oCACF,CAGA,mCACE,MACE,sBAAsB,CACtB,4BAA6B,CAC7B,6BACF,CACF,CC3DA,MACE,uBAAwB,CACxB,oBAAqB,CACrB,oBAAqB,CACrB,qBAAsB,CACtB,uBAAwB,CACxB,0BAA2B,CAC3B,mBAAoB,CACpB,iBAAkB,CAClB,yBAA0B,CAC1B,wBAAyB,CACzB,sBAAuB,CACvB,uBAAwB,CACxB,wBAAyB,CACzB,qBAAsB,CACtB,sBACF,CAEA,KACE,qBAAsB,CACtB,sBAAuB,CACvB,eAAgB,CAChB,eAAgC,CAAhC,+BAAgC,CAChC,UAA2B,CAA3B,0BACF,CACA,UACE,WACF,CACA,iBACE,kBACF,CAIA,MAEE,aACF,CACA,WAHE,WAKF,CACA,WACE,aAA4B,CAA5B,2BACF,CACA,SACE,WAAY,CACZ,YAAa,CACb,qBACF,CACA,MACE,aAAc,CAEd,eAAiB,CACjB,6BAA8B,CAE9B,QAAS,CACT,gBACF,CACA,cAPE,YAAa,CAGb,kBASF,CALA,QACE,oBAAqB,CACrB,UAA2B,CAA3B,0BAGF,CACA,UACE,UAAW,CACX,qBAAsB,CACtB,UACF,CACA,YACE,iBAAkB,CAClB,kBAAmB,CACnB,iBAAkB,CAClB,SACF,CACA,qBACE,YAAa,CACb,kBACF,CACA,uBACE,oBAAqB,CACrB,UAA2B,CAA3B,0BACF,CACA,kCACE,iBAAkB,CAClB,gBACF,CACA,8BACE,YAAa,CACb,qBAAsB,CACtB,mBACF,CACA,KACE,aAAc,CACd,YAAa,CACb,kBACF,CACA,QAEE,WAAY,CACZ,iBAAkB,CAClB,aAAc,CACd,YAAa,CACb,WACF,CACA,qBAEE,YAAa,CACb,YACF,CACA,YACE,gBAAiB,CACjB,6BAA8B,CAC9B,kBAAmB,CACnB,eACF,CACA,SACE,YACF,CACA,WACE,iBAAkB,CAClB,YAAa,CACb,WAEF,CACA,yBAFE,WAIF,CAKA,kBAHE,WAAY,CACZ,YAOF,CALA,WAGE,YAAa,CACb,qBACF,CACA,OACE,YAAa,CACb,WAAY,CACZ,WACF,CACA,QACE,YACF,CAEA,yBACE,WACF,CACA,oCACE,kBACF,CACA,4BACE,WACF,CAEA,eACE,UAAW,CACX,WAAY,CACZ,qBACF,CACA,sBACE,aAAc,CACd,YACF,CAIA,yCACE,WACF,CACA,6BACE,YAAa,CACb,aACF,CAIA,4DACE,WACF,CAGA,0BACE,aACF,CAEA,2EAGE,YAAa,CACb,qBAAsB,CACtB,YACF,CAEA,mCACE,iBAAkB,CAClB,SAAU,CACV,SAAU,CACV,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,mCACE,cAAe,CACf,gBAA4B,CAC5B,gBAAiB,CACjB,yBAA2B,CAC3B,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,iDACE,qBAAwC,CAAxC,uCACF,CACA,yBACE,YACF,CAGA,QACE,eAAiC,CAAjC,gCAAiC,CACjC,qBAAsB,CACtB,oBAAqB,CACrB,WAAY,CACZ,UACF,CACA,cACE,aAAc,CACd,WACF,CACA,gBACE,sBAAuB,CACvB,YACF,CACA,aACE,aACF,CACA,cACE,WAAY,CACZ,iBACF,CACA,SACE,iBAAkB,CAClB,6BACF,CACA,gBACE,0BAA2B,CAC3B,iBAAkB,CAClB,QAAS,CACT,uBAAyB,CACzB,OAAQ,CACR,eAAgC,CAAhC,+BAAgC,CAChC,YAAa,CACb,eAAgB,CAChB,SAAa,CACb,cAAe,CACf,SACF,CACA,sBACE,aACF,CACA,mBACE,yBACF,CACA,yBACE,6BAAoC,CACpC,cACF,CACA,oLAQE,SAAY,CACZ,UAAW,CACX,cAAyB,CACzB,uBAAkC,CAClC,2BAA4B,CAC5B,iBAAkB,CAClB,aACF,CACA,oFAIE,kBAAoB,CACpB,qBAAsB,CACtB,eACF,CAEA,qBACE,eAAgB,CAChB,UACF,CACA,cACE,WAA2B,CAA3B,0BAA2B,CAC3B,6BACF,CACA,qBACE,eAAkB,CAClB,WACF,CACA,wBACE,qDACF,CACA,eACE,aAA4B,CAA5B,2BAA4B,CAC5B,2BACF,CACA,sBACE,cAAe,CACf,UACF,CACA,yBACE,sDACF,CAEA,OACE,YAAa,CACb,UAAW,CACX,WACF,CACA,gBACE,qBACF,CACA,aACE,aAAc,CACd,WAAY,CACZ,iBAAkB,CAClB,WAAY,CACZ,YACF,CAQA,+CACE,eACF,CACA,QACE,qBAAsC,CAAtC,qCAAsC,CACtC,aACF,CACA,0DAEI,gBACJ,CACA,sDAEI,gBACJ,CACA,wBACI,0LAGJ,CAEA,kDAJI,2BAAsC,CACtC,uBAOJ,CAJA,0BACI,0KAGJ,CAEA,EACE,UAAwB,CAAxB,uBACF,CACA,SACE,iBAUF,CAEA,iBAXE,MAAO,CACP,KAAM,CACN,UAAW,CACX,WAAY,CACZ,yBAA8B,CAC9B,WAAY,CACZ,YAAa,CACb,sBAAuB,CACvB,kBAeF,CAZA,QACE,cAAe,CAOf,cAIF,CACA,UACE,eAAgC,CAAhC,+BAAgC,CAChC,iBAAkB,CAClB,WAAY,CACZ,aAAc,CACd,cAAe,CACf,aAAc,CACd,WAAY,CACZ,YACF,CACA,qBACE,cACF,CACA,gBACE,YAAa,CACb,6BAA8B,CAC9B,kBAAmB,CACnB,eAAiB,CACjB,WAAY,CACZ,iBAAkB,CAClB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,gBACE,WACF,CACA,cACE,iBAAkB,CAClB,OAAQ,CACR,KAAM,CACN,kBACF,CACA,YACE,UAAW,CACX,aAAc,CACd,eAAoC,CAApC,mCAAoC,CACpC,WACF,CACA,SACE,kBAAmB,CACnB,qBAAsB,CACtB,iBAAkB,CAClB,WACF,CACA,iBACE,eAAgB,CAChB,4BAA6B,CAC7B,iBAAkB,CAClB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,kBACE,YAAa,CACb,kBACF,CACA,oBACE,qBACF,CACA,kCACE,aACF,CACA,mCACE,aACF,CACA,UACE,cAAe,CACf,sBAAuB,CACvB,eAAgB,CAChB,kBAAmB,CACnB,aACF,CACA,UACE,UAAY,CACZ,mBAAoB,CACpB,kBACF,CAEA,UACE,cAAe,CACf,QAAS,CACT,YACF,CACA,cACE,eAAgB,CAChB,UAAY,CACZ,YAAc,CACd,YAAc,CACd,mBACF,CACA,iBACE,eACF,CACA,gBACE,eACF,CAEA,OACE,YACF,CACA,gBACE,oBAAqB,CACrB,mBACF,CACA,WACE,aACF,CAEA,iBACE,WAAY,CACZ,YACF,CAEA,mBACE,WAAa,CACb,YACF,CAEA,MACE,WAAY,CACZ,aAAe,CACf,eAAiC,CAAjC,gCAAiC,CACjC,UAA2B,CAA3B,0BACF,CACA,MACE,YAAa,CACb,6BAA8B,CAC9B,kBAAmB,CACnB,UACF,CACA,UACE,gBACF,CACA,mBACE,aACF,CACA,QACE,UAAW,CACX,kBACF,CACA,sCAEE,YAAa,CACb,UAAW,CACX,eACF,CACA,OACE,aACF,CAKA,uBAHE,UAAW,CACX,WAOF,CALA,eAGE,eAAiB,CACjB,WACF,CACA,WACE,YAAa,CACb,qBAAsB,CACtB,aAAc,CACd,eAAqC,CAArC,oCAAqC,CACrC,YAAa,CACb,WACF,CACA,kBACE,cACF,CACA,iBACE,eAAqC,CAArC,oCAAqC,CACrC,gBACF,CACA,UACE,YAAa,CACb,0BAA2B,CAC3B,6BAA8B,CAC9B,kBACF,CACA,OACE,SAAU,CACV,UACF,CACA,OACE,iBAAkB,CAClB,YAAa,CACb,qBAAsB,CACtB,WAAY,CACZ,YACF,CACA,SACE,aACF,CACA,YACE,QAAS,CACT,eACF,CACA,OACE,eAAgB,CAChB,qBAAqC,CAArC,oCAAqC,CACrC,UAA2B,CAA3B,0BAA2B,CAC3B,mBAAqB,CACrB,aAAe,CACf,kBAAoB,CACpB,eAAgB,CAChB,eAAiB,CACjB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,aAAc,CACd,4BACF,CACA,WACE,UACF,CACA,aACE,eAA+B,CAA/B,8BACF,CAEA,mBACE,iBAAkB,CAClB,WACF,CACA,YACE,UAAW,CACX,WACF,CACA,gFAEE,UACF,CACA,eACE,eAAiC,CAAjC,gCAAiC,CACjC,aAAe,CACf,kBAAoB,CACpB,aACF,CACA,OACE,iCAAsC,CACtC,WAAY,CACZ,aAAc,CACd,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,iBACF,CACA,aACE,UACF,CACA,aAEE,WACF,CACA,uBAHE,qBAAuC,CAAvC,sCAOF,CAJA,UACE,uBAAgB,CAAhB,eAAgB,CAChB,KAEF,CACA,kBACE,cAAe,CACf,UAA8B,CAA9B,6BACF,CACA,+BACE,UAA2B,CAA3B,0BACF,CACA,cACE,yBAA2B,CAC3B,eACF,CACA,oBACE,YACF,CACA,wBACE,qCACF,CACA,wBACE,gBAAiB,CACjB,kBACF,CAEA,eACE,WAAY,CACZ,UAAW,CACX,6BAAoC,CACpC,SACF,CACA,uBAEI,iBAAkB,CAClB,eAAgB,CAChB,uBACJ,CACA,iBACE,UAAW,CACX,WACF,CACA,iBACE,iBACF,CACA,GACE,WAAY,CACZ,eAAiC,CAAjC,gCAAiC,CACjC,UACF,CAEA,QACE,YAAa,CACb,kBACF,CAEA,aACE,kBAAoB,CACpB,qBAA2C,CAA3C,0CAA2C,CAC3C,6BAA+B,CAC/B,iBAAmB,CACnB,kBAAmB,CACnB,iBACF,CACA,+BACE,eAAqC,CAArC,oCAAqC,CACrC,YACF,CACA,4CACE,iBAAkB,CAClB,MAAO,CACP,KAAM,CACN,2BACF,CACA,gCACE,mBAA4B,CAC5B,WAAY,CACZ,eAAgB,CAChB,aACF,CACA,gCACE,eAAgB,CAChB,WACF,CACA,kCACE,eAAgB,CAChB,YACF,CACA,+BACE,cACF,CACA,+BACE,SAAU,CACV,OACF,CACA,yBACE,mBAA4B,CAC5B,mBAAqB,CACrB,yBACF,CACA,iCACE,eAAkC,CAAlC,iCACF,CACA,oBACI,YAAa,CACb,wBAAyB,CACzB,eACJ,CACA,WACE,iBACF,CACA,yBACE,iBAAkB,CAClB,OAAQ,CACR,KACF,CAEA,yBACE,MACE,gBAAiB,CACjB,WACF,CACA,YACE,kBACF,CACA,aAEE,qBAAsB,CAGtB,cAFF,CAIA,KACE,6BACF,CACA,OACE,aAAc,CACd,kBAAmB,CACnB,iBACF,CACA,YACE,aAAc,CACd,cACF,CACA,kCACE,YACF,CACF,CAEA,yBACE,KACE,kBACF,CACA,sCACI,YAAa,CACb,UAAW,CACX,eACJ,CACA,OACE,eACF,CACF,CAEA,mCACE,MACE,oBAAqB,CACrB,oBAAqB,CACrB,uBAAwB,CACxB,qBAAsB,CACtB,sBAAuB,CACvB,iBAAkB,CAClB,0BAA2B,CAC3B,yBAA0B,CAC1B,wBAAyB,CACzB,sBAAuB,CACvB,uBAAwB,CACxB,oBAAqB,CACrB,oBAAuB,CACvB,yBACF,CACA,gFAEE,UACF,CACA,eACE,yBACF,CACA,OACE,+BACF,CACA,wBACE,+BACF,CACF","file":"main.3b498017.chunk.css","sourcesContent":["body {\n margin: 0;\n}\n\n.charts {\n display: flex;\n}\n\n.selected {\n background: red;\n}\n\n.collapsed>* {\n display:none;\n}","/* Variables */\n:root {\n --scrollbar-size: .375rem;\n --scrollbar-minlength: 1.5rem; /* Minimum length of scrollbar thumb (width of horizontal, height of vertical) */\n --scrollbar-ff-width: thin; /* FF-only accepts auto, thin, none */\n --scrollbar-track-color: transparent;\n --scrollbar-color: rgba(0,0,0,.2);\n --scrollbar-color-hover: rgba(0,0,0,.3);\n --scrollbar-color-active: rgb(0,0,0);\n}\n\n/* Use .layout-scrollbar-obtrusive to only use overflow if scrollbars don’t overlay */\n.scrollbar-test,\n.layout-cell {\n overscroll-behavior: contain;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n scrollbar-width: var(--scrollbar-ff-width);\n}\n\n/* This class controls what elements have the new fancy scrollbar CSS */\n.layout-scrollbar {\n scrollbar-color: var(--scrollbar-color) var(--scrollbar-track-color);\n}\n/* Only apply height/width to ::-webkit-scrollbar if is obtrusive */\n.layout-scrollbar-obtrusive .layout-scrollbar::-webkit-scrollbar {\n height: var(--scrollbar-size);\n width: var(--scrollbar-size);\n}\n.layout-scrollbar::-webkit-scrollbar-track {\n background-color: var(--scrollbar-track-color);\n}\n.layout-scrollbar::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-color);\n border-radius: 3px;\n}\n.layout-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: var(--scrollbar-color-hover);\n}\n.layout-scrollbar::-webkit-scrollbar-thumb:active {\n background-color: var(--scrollbar-color-active);\n}\n.scrollbar-test::-webkit-scrollbar-thumb:vertical,\n.layout-scrollbar::-webkit-scrollbar-thumb:vertical {\n min-height: var(--scrollbar-minlength);\n}\n.scrollbar-test::-webkit-scrollbar-thumb:horizontal,\n.layout-scrollbar::-webkit-scrollbar-thumb:horizontal {\n min-width: var(--scrollbar-minlength);\n}\n\n\n@media (prefers-color-scheme: dark) {\n :root {\n --scrollbar-color:#555;\n --scrollbar-color-hover: #555;\n --scrollbar-color-active: #555;\n }\n}\n\n",":root {\n color-scheme: light dark;\n --main-bg-color: #eee;\n --main-fg-color: #000;\n --title-bg-color: #CCC;\n --unselected-color: #ccc;\n --table-head-bg-color: #DDD;\n --button-color: #48F;\n --link-color: #36C;\n --code-area-bg-color: #CCC;\n --pre-area-bg-color: #FFF;\n --un-run-bg-color: #8AF;\n --aborted-bg-color: #DDD;\n --error-fg-color: darkred;\n --warn-fg-color: brown;\n --editor-bg-color: #fff;\n}\n\nhtml {\n box-sizing: border-box;\n font-family: sans-serif;\n line-height: 1.2;\n background: var(--main-bg-color);\n color: var(--main-fg-color);\n}\nhtml, body {\n height: 100%;\n}\n*, *:before, *:after {\n box-sizing: inherit;\n}\n/* ---------------- */\n\n/* ---------------- */\n#root {\n height: 100%;\n overflow: auto;\n}\n.App {\n height: 100%;\n}\n.error-msg {\n color: var(--error-fg-color);\n}\n.content {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.head {\n flex: 0 0 auto;\n display: flex;\n font-weight: bold;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n font-size: larger;\n}\n.head a {\n text-decoration: none;\n color: var(--main-fg-color);\n display: flex;\n align-items: center;\n}\n.head img {\n height: 1em;\n vertical-align: middle;\n margin: 5px;\n}\n.head .beta {\n font-size: x-small;\n vertical-align: top;\n position: relative;\n right: 1em;\n}\n.fix-help-contribute {\n display: flex;\n align-items: center;\n}\n.fix-help-contribute a {\n text-decoration: none;\n color: var(--main-fg-color);\n}\n.fix-help-contribute .three-words {\n font-size: x-small;\n text-align: right;\n}\n.fix-help-contribute .octocat {\n display: flex;\n flex-direction: column;\n justify-content: top;\n}\n.top {\n flex: 0 0 auto;\n display: flex;\n margin: 10px 10px 0 10px;\n}\n.bottom {\n display: flex;\n margin: 10px;\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n height: 100%;\n}\n.top>div,\n.bottom>div {\n flex: 1 1 50%;\n display: flex;\n}\n.top .right {\n margin-left: 10px;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n}\n.toolbar {\n display: flex;\n}\n.top .left {\n position: relative;\n min-height: 0;\n min-width: 0;\n height: 100%;\n}\n.bottom .left {\n height: 100%;\n}\n.codes {\n height: 100%;\n min-height: 0;\n}\n.codes>div {\n height: 100%;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n.right {\n min-height: 0;\n min-width: 0;\n height: 100%;\n}\n.bottom {\n display: flex;\n}\n/* ---------------------- */\n.layout-3-horizontal-top {\n height: 100%;\n}\n.layout-3-horizontal-top .codes>div {\n flex-direction: row;\n}\n.layout-3-horizontal-bottom {\n height: 100%;\n}\n/* ---------------------- */\n.layout-tabbed {\n width: 100%;\n height: 100%;\n flex-direction: column; \n}\n.layout-tabbed>.split {\n flex: 1 1 auto;\n min-height: 0;\n}\n.layout-tabbed-result {\n height: 100%;\n}\n.layout-tabbed-log {\n height: 100%;\n}\n.layout-tabbed-top .tab-tabs {\n display: flex;\n flex: 0 0 auto;\n}\n.layout-tabbed .tab-content {\n height: 100%;\n}\n.layout-tabbed .tab-content>div {\n height: 100%;\n}\n\n/* add this below? */\n.layout-tabbed-top .hidee {\n flex: 1 1 auto;\n}\n\n.layout-tabbed-top .code-area,\n.layout-tabbed-top .hidee,\n.react-codemirror2 {\n display: flex;\n flex-direction: column;\n min-height: 0;\n}\n\n.layout-tabbed-top .tab-tabs input {\n position: absolute;\n opacity: 0;\n padding: 0;\n user-select: none;\n}\n.layout-tabbed-top .tab-tabs label {\n cursor: pointer;\n padding: 0.5em 1em 0.5em 1em;\n margin-right: 3px;\n background: rgba(0,0,0,0.2);\n user-select: none;\n}\n.layout-tabbed-top .tab-tabs input:checked + label {\n background-color: var(--editor-bg-color);\n}\n.layout-tabbed .expander {\n display: none;\n}\n\n/* ---------------------- */\n.logger {\n background: var(--title-bg-color);\n font-family: monospace;\n white-space: pre-wrap;\n height: 100%;\n width: 100%;\n}\n.log-messages {\n overflow: auto;\n height: 100%;\n}\n.log-messages>* {\n overflow-wrap: anywhere;\n display: flex;\n}\n.logger .msg {\n flex: 1 1 auto;\n}\n.logger .file {\n float: right;\n position: relative;\n}\n.tooltip {\n position: relative;\n border-bottom: 1px dashed #888;\n}\n.tooltip:before {\n content: attr(data-tooltip);\n position: absolute;\n top: 100%;\n transform: translateY(0%);\n right: 0;\n background: var(--main-bg-color);\n display: none;\n white-space: pre;\n left: initial;\n margin: initial;\n z-index: 2;\n}\n.tooltip:hover:before {\n display:block;\n}\n.logger .file-link {\n text-decoration: underline;\n}\n.logger .file-link:hover {\n background: rgba(255, 255, 255, 0.3);\n cursor: pointer;\n}\n.logger .log .count,\n.logger .info .count,\n.logger .warn .count,\n.logger .error .count,\n.logger .log .no-count,\n.logger .info .no-count,\n.logger .warn .no-count,\n.logger .error .no-count {\n width: 1.0em;\n height: 1em;\n margin: 0 0.25em 0 0.25em;\n background-position: center center;\n background-repeat: no-repeat;\n text-align: center;\n flex: 0 0 auto;\n}\n.logger .log .count,\n.logger .info .count,\n.logger .warn .count,\n.logger .error .count {\n border-radius: 0.5em;\n vertical-align: middle;\n line-height: 1em;\n}\n\n.logger .info .count {\n background: #666;\n color: #DDD;\n}\n.logger .warn {\n color: var(--warn-fg-color);\n background: rgba(255, 255, 0, 0.2);\n}\n.logger .warn .count {\n background: yellow;\n color: brown;\n}\n.logger .warn .no-count {\n background-image: url(/resources/images/warn-icon.svg);\n}\n.logger .error {\n color: var(--error-fg-color);\n background: rgba(255, 0, 0, 0.2);\n}\n.logger .error .count {\n background: red;\n color: white;\n}\n.logger .error .no-count {\n background-image: url(/resources/images/error-icon.svg);\n}\n/* ---------------------- */\n.split {\n display: flex;\n width: 100%;\n height: 100%;\n}\n.split-vertical {\n flex-direction: column;\n}\n.split .pane {\n flex-shrink: 1;\n flex-grow: 1;\n position: relative;\n min-width: 0;\n min-height: 0;\n}\n.editor-codemirror .pane {\n /*\n I don't understand why codemirror needs this\n and monaco fails with it. >:(\n */\n overflow: hidden;\n}\n.split .pane-dragging {\n overflow: hidden;\n}\n.gutter {\n background-color: var(--main-bg-color);\n flex: 0 0 auto;\n}\n.gutter.gutter-horizontal,\n.gutter.gutter-horizontal:hover {\n cursor: ew-resize;\n}\n.gutter.gutter-vertical,\n.gutter.gutter-vertical:hover {\n cursor: ns-resize;\n}\n.gutter.gutter-vertical {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');\n background-repeat: no-repeat no-repeat;\n background-position: center center;\n}\n\n.gutter.gutter-horizontal {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');\n background-repeat: no-repeat no-repeat;\n background-position: center center;\n}\n/* ---------------------- */\na {\n color: var(--link-color);\n}\n.blocked {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.8);\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n/* ---------------------- */\n.dialog {\n position: fixed;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0.8);\n z-index: 100;\n width: 100%;\n height: 100%;\n max-width: 100%;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n.dialog>* {\n background: var(--main-bg-color);\n border-radius: 5px;\n padding: 1em;\n max-width: 90%;\n max-height: 90%;\n overflow: auto;\n width: 800px;\n outline: none;\n}\n.fixed-size-dialog>* {\n min-height: 90%;\n}\n.dialog-heading {\n display: flex;\n justify-content: space-between;\n font-size: xx-large;\n font-weight: bold;\n margin: 10px;\n position: relative;\n user-select: none;\n}\n.dialog-content {\n margin: 10px;\n}\n.dialog-close {\n position: absolute;\n right: 0;\n top: 0;\n vertical-align: top;\n}\n.dialog pre {\n width: 100%;\n overflow: auto;\n background: var(--pre-area-bg-color);\n padding: 1em;\n}\n.section {\n margin-bottom: 10px;\n border: 1px solid #888;\n border-radius: 5px;\n padding: 1em;\n}\n.section-heading {\n font-size: large;\n border-bottom: 1px solid #888;\n margin-bottom: 1em;\n user-select: none;\n}\n.save-as-gist-pat {\n display: flex;\n align-items: center;\n}\n.save-as-gist-pat>* {\n vertical-align: middle;\n}\n.save-as-gist-pat>div:nth-child(1) {\n flex: 0 0 auto;\n}\n.save-as-gist-pat>div:nth-child(2) {\n flex: 1 1 auto;\n}\n.bookmark {\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n display: block;\n}\n.disabled {\n opacity: 0.2;\n pointer-events: none;\n cursor: not-allowed;\n}\n/* ------------------ */\n.messages {\n position: fixed;\n bottom: 0;\n z-index: 1000;\n}\n.messages>div {\n background: #888;\n color: white;\n padding: 0.5em;\n margin: 0.25em;\n border-radius: 0.25em;\n}\n.messages .error {\n background: #C00;\n}\n.messages .info {\n background: #00F;\n}\n/* -------------------- */\n.radio {\n display: flex;\n}\n.radio-selected {\n background-color: red;\n border-radius: 0.25em;\n}\n.radio img {\n display: block;\n}\n/* -------------------- */\n.layout .radio>* {\n width: 3.5em;\n padding: 0.5em;\n}\n/* -------------------- */\n.settings .radio>* {\n margin: 0.2em;\n padding: 0.2em;\n}\n/* -------------------- */\ninput {\n border: none;\n padding: 0.25em;\n background: var(--title-bg-color);\n color: var(--main-fg-color);\n}\n.name {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n}\n.name > * + * {\n margin-left: 10px;\n}\n.name>*:nth-child(1) {\n flex: 1 1 auto;\n}\n.avatar {\n height: 2em;\n border-radius: 100%;;\n}\ninput[type=\"text\"],\ninput[type=\"password\"] {\n outline: none;\n width: 100%;\n font-size: large;\n}\n.named {\n padding: 0.25em;\n}\n.runner {\n width: 100%;\n height: 100%;\n}\n.runner>iframe {\n width: 100%;\n height: 100%;\n background: white;\n border: none;\n}\n.code-area {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n background: var(--code-area-bg-color);\n min-height: 0;\n height: 100%;\n}\n.code-area button {\n margin-right: 0;\n}\n.code-area input {\n background: var(--code-area-bg-color);\n font-size: medium;\n}\n.expander {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n align-items: center;\n}\n.hider {\n width: 1em;\n color: #888;\n}\n.hidee {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n}\n.hidee>* {\n flex: 1 1 auto;\n}\n.hidee-hide {\n height: 0;\n overflow: hidden;\n}\nbutton {\n background: none;\n border: 2px solid var(--button-color);\n color: var(--main-fg-color);\n border-radius: 0.25em;\n padding: 0.25em;\n margin-right: 0.25em;\n min-width: 2.5em;\n font-weight: bold;\n user-select: none;\n height: 2.25em;\n line-height: calc(1em - 12px);\n}\nbutton img {\n height: 1em;\n}\nbutton:hover {\n background: var(--button-color);\n}\n\n.react-codemirror2 {\n position: relative;\n height: 100%;\n}\n.CodeMirror {\n width: 100%;\n height: 100%;\n}\n.CodeMirror-overlayscroll-horizontal div,\n.CodeMirror-overlayscroll-vertical div {\n opacity: 0.6;\n}\n.markdown code {\n background: var(--title-bg-color);\n padding: 0.25em;\n border-radius: 0.5em;\n line-height: 2;\n}\n.gists {\n background-color: rgba(0, 0, 255, 0.1);\n border: none;\n display: block;\n min-height: 20vh;\n max-height: 40vh;\n overflow-y: scroll;\n position: relative;\n}\n.gists table {\n width: 100%; \n}\n.gists thead {\n background-color: var(--title-bg-color);\n border: none;\n}\n.gists th {\n position: sticky; \n top: 0;\n background-color: var(--title-bg-color);\n}\n.gists thead span {\n cursor: pointer;\n color: var(--unselected-color);\n}\n.gists thead .current-sort-key {\n color: var(--main-fg-color);\n}\n.gists td>div {\n transition: max-height 0.3s;\n max-height: 100%;\n}\n.gists .hide td>div {\n max-height: 0;\n}\n.gists tr:nth-child(2n) {\n background-color: rgba(128, 160, 255, 0.2);\n}\n.gists td:nth-child(3n) {\n text-align: right;\n white-space: nowrap;\n}\n\n.comment-notes {\n padding: 1em;\n margin: 1em;\n background: rgba(255, 255, 255, 0.5);\n color: red;\n}\n.comments,\n.comment-sep {\n margin: 0 auto 1em;\n max-width: 700px;\n width: calc(100% - 40px);\n}\n.comments iframe {\n width: 100%;\n border: none;\n}\n.comments .links {\n text-align: center;\n}\nhr {\n border: none;\n background: var(--title-bg-color);\n height: 2px;\n}\n/*-------------*/\n.logout {\n display: flex;\n align-items: center;\n}\n/*-------------*/\n.new-comment {\n border-radius: 0.5em;\n border: 1px solid var(--code-area-bg-color);\n margin-left: calc(0.5em + 42px);\n margin-right: 0.5em;\n margin-bottom: 15em;\n position: relative;\n}\n.new-comment .new-comment-head {\n background: var(--code-area-bg-color);\n padding: 0.5em;\n}\n.new-comment .new-comment-head .user-avatar {\n position: absolute;\n left: 0;\n top: 0;\n transform: translateX(-42px);\n}\n.new-comment .react-codemirror2 {\n padding: 0 0.5em 0.5em 0.5em;\n height: 10em;\n resize: vertical;\n overflow: auto;\n}\n.new-comment .new-comment-write {\n min-height: 10em;\n height: 10em;\n}\n.new-comment .new-comment-preview {\n min-height: 10em;\n padding: 0.5em;\n}\n.new-comment .new-comment-tabs {\n margin-top: 1em;\n}\n.new-comment input[type=\"radio\"] {\n opacity: 0;\n width: 0;\n}\n.new-comment input + label {\n padding: 0.5em 0.5em 0 0.5em;\n margin-right: 0.125em;\n background: rgba(0,0,0,0.1);\n}\n.new-comment input:checked + label {\n background: var(--editor-bg-color);\n}\n.new-comment-submit {\n display: flex;\n justify-content: flex-end;\n padding-top: 1em;\n}\n.copy-text {\n position: relative;\n}\n.copy-text .copy-buttons {\n position: absolute;\n right: 0;\n top: 0;\n}\n\n@media (max-width: 740px) {\n .head {\n font-size: medium;\n padding: 2px;\n }\n .head .beta {\n font-size: xx-small;\n }\n .top,\n .bottom {\n flex-direction: column;\n }\n .top, .bottom {\n margin-top: 5px;\n }\n .top {\n flex-direction: column-reverse;\n }\n .right {\n margin-left: 0;\n padding-bottom: 5px;\n margin-bottom: 5px;\n }\n .top .right {\n margin-left: 0;\n margin-top: 5px;\n }\n .fix-help-contribute .three-words {\n display: none;\n }\n}\n\n@media (max-width: 540px) {\n html {\n font-size: xx-small;\n }\n input[type=\"text\"], input[type=\"password\"] {\n outline: none;\n width: 100%;\n font-size: small;\n }\n button {\n font-size: small;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --main-bg-color: #444;\n --main-fg-color: #fff;\n --unselected-color: #666;\n --title-bg-color: #222;\n --button-bg-color: #fff;\n --link-color: #6CF;\n --table-head-bg-color: #555;\n --code-area-bg-color: #555;\n --pre-area-bg-color: #222;\n --un-run-bg-color: blue;\n --aborted-bg-color: #000;\n --error-fg-color: red;\n --warn-fg-color: yellow;\n --editor-bg-color: #263238;\n }\n .CodeMirror-overlayscroll-horizontal div,\n .CodeMirror-overlayscroll-vertical div {\n opacity: 0.3;\n }\n .comment-notes {\n background: rgba(0, 0, 0, 0.5);\n }\n .gists {\n background-color: rgba(0, 0, 0, 0.3);\n }\n .gists tr:nth-child(2n) {\n background-color: rgba(0, 0, 0, 0.2);\n }\n}\n"]} \ No newline at end of file diff --git a/static/css/main.7da83b7e.chunk.css b/static/css/main.7da83b7e.chunk.css new file mode 100644 index 0000000..f4542c0 --- /dev/null +++ b/static/css/main.7da83b7e.chunk.css @@ -0,0 +1,2 @@ +body{margin:0}.charts{display:flex}.selected{background:red}.collapsed>*{display:none}:root{--scrollbar-size:.375rem;--scrollbar-minlength:1.5rem;--scrollbar-ff-width:thin;--scrollbar-track-color:transparent;--scrollbar-color:rgba(0,0,0,0.2);--scrollbar-color-hover:rgba(0,0,0,0.3);--scrollbar-color-active:#000}.layout-cell,.scrollbar-test{-ms-scroll-chaining:none;overscroll-behavior:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:thin;scrollbar-width:var(--scrollbar-ff-width)}.layout-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.layout-scrollbar-obtrusive .layout-scrollbar::-webkit-scrollbar{height:.375rem;height:var(--scrollbar-size);width:.375rem;width:var(--scrollbar-size)}.layout-scrollbar::-webkit-scrollbar-track{background-color:transparent;background-color:var(--scrollbar-track-color)}.layout-scrollbar::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2);background-color:var(--scrollbar-color);border-radius:3px}.layout-scrollbar::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.3);background-color:var(--scrollbar-color-hover)}.layout-scrollbar::-webkit-scrollbar-thumb:active{background-color:#000;background-color:var(--scrollbar-color-active)}.layout-scrollbar::-webkit-scrollbar-thumb:vertical,.scrollbar-test::-webkit-scrollbar-thumb:vertical{min-height:1.5rem;min-height:var(--scrollbar-minlength)}.layout-scrollbar::-webkit-scrollbar-thumb:horizontal,.scrollbar-test::-webkit-scrollbar-thumb:horizontal{min-width:1.5rem;min-width:var(--scrollbar-minlength)}@media (prefers-color-scheme:dark){:root{--scrollbar-color:#555;--scrollbar-color-hover:#555;--scrollbar-color-active:#555}}:root{color-scheme:light dark;--main-bg-color:#eee;--main-fg-color:#000;--title-bg-color:#ccc;--unselected-color:#ccc;--table-head-bg-color:#ddd;--button-color:#48f;--link-color:#36c;--code-area-bg-color:#ccc;--pre-area-bg-color:#fff;--un-run-bg-color:#8af;--aborted-bg-color:#ddd;--error-fg-color:#8b0000;--warn-fg-color:brown;--editor-bg-color:#fff}html{box-sizing:border-box;font-family:sans-serif;line-height:1.2;background:#eee;background:var(--main-bg-color);color:#000;color:var(--main-fg-color)}body,html{height:100%}*,:after,:before{box-sizing:inherit}#root{overflow:auto}#root,.App{height:100%}.error-msg{color:#8b0000;color:var(--error-fg-color)}.content{height:100%;display:flex;flex-direction:column}.head{flex:0 0 auto;font-weight:700;justify-content:space-between;margin:0;font-size:larger}.head,.head a{display:flex;align-items:center}.head a{text-decoration:none;color:#000;color:var(--main-fg-color)}.head img{height:1em;vertical-align:middle;margin:5px}.head .beta{font-size:x-small;vertical-align:top;position:relative;right:1em}.fix-help-contribute{display:flex;align-items:center}.fix-help-contribute a{text-decoration:none;color:#000;color:var(--main-fg-color)}.fix-help-contribute .three-words{font-size:x-small;text-align:right}.fix-help-contribute .octocat{display:flex;flex-direction:column;justify-content:top}.top{flex:0 0 auto;display:flex;margin:10px 10px 0}.bottom{margin:10px;position:relative;flex:1 1 auto;min-height:0;height:100%}.bottom>div,.top>div{flex:1 1 50%;display:flex}.top .right{margin-left:10px;justify-content:space-between;align-items:center;overflow:hidden}.toolbar{display:flex}.top .left{position:relative;min-height:0;min-width:0}.bottom .left,.top .left{height:100%}.codes,.codes>div{height:100%;min-height:0}.codes>div{display:flex;flex-direction:column}.right{min-height:0;min-width:0;height:100%}.bottom{display:flex}.layout-3-horizontal-top{height:100%}.layout-3-horizontal-top .codes>div{flex-direction:row}.layout-3-horizontal-bottom{height:100%}.layout-tabbed{width:100%;height:100%;flex-direction:column}.layout-tabbed>.split{flex:1 1 auto;min-height:0}.layout-tabbed-log,.layout-tabbed-result{height:100%}.layout-tabbed-top .tab-tabs{display:flex;flex:0 0 auto}.layout-tabbed .tab-content,.layout-tabbed .tab-content>div{height:100%}.layout-tabbed-top .hidee{flex:1 1 auto}.layout-tabbed-top .code-area,.layout-tabbed-top .hidee,.react-codemirror2{display:flex;flex-direction:column;min-height:0}.layout-tabbed-top .tab-tabs input{position:absolute;opacity:0;padding:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.layout-tabbed-top .tab-tabs label{cursor:pointer;padding:.5em 1em;margin-right:3px;background:rgba(0,0,0,.2);-webkit-user-select:none;-ms-user-select:none;user-select:none}.layout-tabbed-top .tab-tabs input:checked+label{background-color:#fff;background-color:var(--editor-bg-color)}.layout-tabbed .expander{display:none}.logger{background:#ccc;background:var(--title-bg-color);font-family:monospace;white-space:pre-wrap;height:100%;width:100%}.log-messages{overflow:auto;height:100%}.log-messages>*{overflow-wrap:anywhere;display:flex}.logger .msg{flex:1 1 auto}.logger .file{float:right;position:relative;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tooltip{position:relative;border-bottom:1px dashed #888}.tooltip:before{content:attr(data-tooltip);position:absolute;top:100%;transform:translateY(0);right:0;background:#eee;background:var(--main-bg-color);display:none;white-space:pre;left:auto;margin:initial;z-index:2}.tooltip:hover:before{display:block}.logger .file-link{text-decoration:underline}.logger .file-link:hover{background:hsla(0,0%,100%,.3);cursor:pointer}.logger .error .count,.logger .error .no-count,.logger .info .count,.logger .info .no-count,.logger .log .count,.logger .log .no-count,.logger .warn .count,.logger .warn .no-count{width:1em;height:1em;margin:0 .25em;background-position:50%;background-repeat:no-repeat;text-align:center;flex:0 0 auto}.logger .error .count,.logger .info .count,.logger .log .count,.logger .warn .count{border-radius:.5em;vertical-align:middle;line-height:1em}.logger .info .count{background:#666;color:#ddd}.logger .warn{color:brown;color:var(--warn-fg-color);background:rgba(255,255,0,.2)}.logger .warn .count{background:#ff0;color:brown}.logger .warn .no-count{background-image:url(/resources/images/warn-icon.svg)}.logger .error{color:#8b0000;color:var(--error-fg-color);background:rgba(255,0,0,.2)}.logger .error .count{background:red;color:#fff}.logger .error .no-count{background-image:url(/resources/images/error-icon.svg)}.split{display:flex;width:100%;height:100%}.split-vertical{flex-direction:column}.split .pane{flex-shrink:1;flex-grow:1;position:relative;min-width:0;min-height:0}.editor-codemirror .pane,.split .pane-dragging{overflow:hidden}.gutter{background-color:#eee;background-color:var(--main-bg-color);flex:0 0 auto}.gutter.gutter-horizontal,.gutter.gutter-horizontal:hover{cursor:ew-resize}.gutter.gutter-vertical,.gutter.gutter-vertical:hover{cursor:ns-resize}.gutter.gutter-vertical{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=")}.gutter.gutter-horizontal,.gutter.gutter-vertical{background-repeat:no-repeat;background-position:50%}.gutter.gutter-horizontal{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==")}a{color:#36c;color:var(--link-color)}.blocked{position:absolute}.blocked,.dialog{left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.8);z-index:100;display:flex;justify-content:center;align-items:center}.dialog{position:fixed;max-width:100%}.dialog>*{background:#eee;background:var(--main-bg-color);border-radius:5px;padding:1em;max-width:90%;max-height:90%;overflow:auto;width:800px;outline:none}.fixed-size-dialog>*{min-height:90%}.dialog-heading{display:flex;justify-content:space-between;font-size:xx-large;font-weight:700;margin:10px;position:relative;-webkit-user-select:none;-ms-user-select:none;user-select:none}.dialog-content{margin:10px}.dialog-close{position:absolute;right:0;top:0;vertical-align:top}.dialog pre{width:100%;overflow:auto;background:#fff;background:var(--pre-area-bg-color);padding:1em}.section{margin-bottom:10px;border:1px solid #888;border-radius:5px;padding:1em}.section-heading{font-size:large;border-bottom:1px solid #888;margin-bottom:1em;-webkit-user-select:none;-ms-user-select:none;user-select:none}.save-as-gist-pat{display:flex;align-items:center}.save-as-gist-pat>*{vertical-align:middle}.save-as-gist-pat>div:first-child{flex:0 0 auto}.save-as-gist-pat>div:nth-child(2){flex:1 1 auto}.bookmark{max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}.disabled{opacity:.2;pointer-events:none;cursor:not-allowed}.messages{position:fixed;bottom:0;z-index:1000}.messages>div{background:#888;color:#fff;padding:.5em;margin:.25em;border-radius:.25em}.messages .error{background:#c00}.messages .info{background:#00f}.radio{display:flex}.radio-selected{background-color:red;border-radius:.25em}.radio img{display:block}.layout .radio>*{width:3.5em;padding:.5em}.settings .radio>*{margin:.2em;padding:.2em}input{border:none;padding:.25em;background:#ccc;background:var(--title-bg-color);color:#000;color:var(--main-fg-color)}.name{display:flex;justify-content:space-between;align-items:center;width:100%}.name>*+*{margin-left:10px}.name>:first-child{flex:1 1 auto}.avatar{height:2em;border-radius:100%}input[type=password],input[type=text]{outline:none;width:100%;font-size:large}.named{padding:.25em}.runner,.runner>iframe{width:100%;height:100%}.runner>iframe{background:#fff;border:none}.code-area{display:flex;flex-direction:column;flex:1 1 auto;background:#ccc;background:var(--code-area-bg-color);min-height:0;height:100%}.code-area button{margin-right:0}.code-area input{background:#ccc;background:var(--code-area-bg-color);font-size:medium}.expander{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}.hider{width:1em;color:#888}.hidee{position:relative;display:flex;flex-direction:column;height:100%;min-height:0}.hidee>*{flex:1 1 auto}.hidee-hide{height:0;overflow:hidden}button{background:none;border:2px solid #48f;border:2px solid var(--button-color);color:#000;color:var(--main-fg-color);border-radius:.25em;padding:.25em;margin-right:.25em;min-width:2.5em;font-weight:700;-webkit-user-select:none;-ms-user-select:none;user-select:none;height:2.25em;line-height:calc(1em - 12px)}button img{height:1em}button:hover{background:#48f;background:var(--button-color)}.react-codemirror2{position:relative;height:100%}.CodeMirror{width:100%;height:100%}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{opacity:.6}.markdown code{background:#ccc;background:var(--title-bg-color);padding:.25em;border-radius:.5em;line-height:2}.gists{background-color:rgba(0,0,255,.1);border:none;display:block;min-height:20vh;max-height:40vh;overflow-y:scroll;position:relative}.gists table{width:100%}.gists thead{border:none}.gists th,.gists thead{background-color:#ccc;background-color:var(--title-bg-color)}.gists th{position:-webkit-sticky;position:sticky;top:0}.gists thead span{cursor:pointer;color:#ccc;color:var(--unselected-color)}.gists thead .current-sort-key{color:#000;color:var(--main-fg-color)}.gists td>div{transition:max-height .3s;max-height:100%}.gists .hide td>div{max-height:0}.gists tr:nth-child(2n){background-color:rgba(128,160,255,.2)}.gists td:nth-child(3n){text-align:right;white-space:nowrap}.comment-notes{padding:1em;margin:1em;background:hsla(0,0%,100%,.5);color:red}.comment-sep,.comments{margin:0 auto 1em;max-width:700px;width:calc(100% - 40px)}.comments iframe{width:100%;border:none}.comments .links{text-align:center}hr{border:none;background:#ccc;background:var(--title-bg-color);height:2px}.logout{display:flex;align-items:center}.new-comment{border-radius:.5em;border:1px solid #ccc;border:1px solid var(--code-area-bg-color);margin-left:calc(.5em + 42px);margin-right:.5em;margin-bottom:15em;position:relative}.new-comment .new-comment-head{background:#ccc;background:var(--code-area-bg-color);padding:.5em}.new-comment .new-comment-head .user-avatar{position:absolute;left:0;top:0;transform:translateX(-42px)}.new-comment .react-codemirror2{padding:0 .5em .5em;height:10em;resize:vertical;overflow:auto}.new-comment .new-comment-write{min-height:10em;height:10em}.new-comment .new-comment-preview{min-height:10em;padding:.5em}.new-comment .new-comment-tabs{margin-top:1em}.new-comment input[type=radio]{opacity:0;width:0}.new-comment input+label{padding:.5em .5em 0;margin-right:.125em;background:rgba(0,0,0,.1)}.new-comment input:checked+label{background:#fff;background:var(--editor-bg-color)}.new-comment-submit{display:flex;justify-content:flex-end;padding-top:1em}.copy-text{position:relative}.copy-text .copy-buttons{position:absolute;right:0;top:0}@media (max-width:740px){.head{font-size:medium;padding:2px}.head .beta{font-size:xx-small}.bottom,.top{flex-direction:column;margin-top:5px}.top{flex-direction:column-reverse}.right{margin-left:0;padding-bottom:5px;margin-bottom:5px}.top .right{margin-left:0;margin-top:5px}.fix-help-contribute .three-words{display:none}}@media (max-width:540px){html{font-size:xx-small}input[type=password],input[type=text]{outline:none;width:100%;font-size:small}button{font-size:small}}@media (prefers-color-scheme:dark){:root{--main-bg-color:#444;--main-fg-color:#fff;--unselected-color:#666;--title-bg-color:#222;--button-bg-color:#fff;--link-color:#6cf;--table-head-bg-color:#555;--code-area-bg-color:#555;--pre-area-bg-color:#222;--un-run-bg-color:#00f;--aborted-bg-color:#000;--error-fg-color:red;--warn-fg-color:#ff0;--editor-bg-color:#263238}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{opacity:.3}.comment-notes{background:rgba(0,0,0,.5)}.gists{background-color:rgba(0,0,0,.3)}.gists tr:nth-child(2n){background-color:rgba(0,0,0,.2)}} +/*# sourceMappingURL=main.7da83b7e.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.7da83b7e.chunk.css.map b/static/css/main.7da83b7e.chunk.css.map new file mode 100644 index 0000000..c3f6858 --- /dev/null +++ b/static/css/main.7da83b7e.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["index.css","scrollbars.css","App.css"],"names":[],"mappings":"AAAA,KACE,QACF,CAEA,QACE,YACF,CAEA,UACE,cACF,CAEA,aACE,YACF,CCbA,MACE,wBAAyB,CACzB,4BAA6B,CAC7B,yBAA0B,CAC1B,mCAAoC,CACpC,iCAAiC,CACjC,uCAAuC,CACvC,6BACF,CAGA,6BAEE,wBAA4B,CAA5B,2BAA4B,CAC5B,eAAgB,CAChB,gCAAiC,CACjC,2CAA4C,CAC5C,oBAA0C,CAA1C,yCACF,CAGA,kBACE,0CAAoE,CAApE,mEACF,CAEA,iEACE,cAA6B,CAA7B,4BAA6B,CAC7B,aAA4B,CAA5B,2BACF,CACA,2CACE,4BAA8C,CAA9C,6CACF,CACA,2CACE,+BAAwC,CAAxC,uCAAwC,CACxC,iBACF,CACA,iDACE,+BAA8C,CAA9C,6CACF,CACA,kDACE,qBAA+C,CAA/C,8CACF,CACA,sGAEE,iBAAsC,CAAtC,qCACF,CACA,0GAEE,gBAAqC,CAArC,oCACF,CAGA,mCACE,MACE,sBAAsB,CACtB,4BAA6B,CAC7B,6BACF,CACF,CC3DA,MACE,uBAAwB,CACxB,oBAAqB,CACrB,oBAAqB,CACrB,qBAAsB,CACtB,uBAAwB,CACxB,0BAA2B,CAC3B,mBAAoB,CACpB,iBAAkB,CAClB,yBAA0B,CAC1B,wBAAyB,CACzB,sBAAuB,CACvB,uBAAwB,CACxB,wBAAyB,CACzB,qBAAsB,CACtB,sBACF,CAEA,KACE,qBAAsB,CACtB,sBAAuB,CACvB,eAAgB,CAChB,eAAgC,CAAhC,+BAAgC,CAChC,UAA2B,CAA3B,0BACF,CACA,UACE,WACF,CACA,iBACE,kBACF,CAIA,MAEE,aACF,CACA,WAHE,WAKF,CACA,WACE,aAA4B,CAA5B,2BACF,CACA,SACE,WAAY,CACZ,YAAa,CACb,qBACF,CACA,MACE,aAAc,CAEd,eAAiB,CACjB,6BAA8B,CAE9B,QAAS,CACT,gBACF,CACA,cAPE,YAAa,CAGb,kBASF,CALA,QACE,oBAAqB,CACrB,UAA2B,CAA3B,0BAGF,CACA,UACE,UAAW,CACX,qBAAsB,CACtB,UACF,CACA,YACE,iBAAkB,CAClB,kBAAmB,CACnB,iBAAkB,CAClB,SACF,CACA,qBACE,YAAa,CACb,kBACF,CACA,uBACE,oBAAqB,CACrB,UAA2B,CAA3B,0BACF,CACA,kCACE,iBAAkB,CAClB,gBACF,CACA,8BACE,YAAa,CACb,qBAAsB,CACtB,mBACF,CACA,KACE,aAAc,CACd,YAAa,CACb,kBACF,CACA,QAEE,WAAY,CACZ,iBAAkB,CAClB,aAAc,CACd,YAAa,CACb,WACF,CACA,qBAEE,YAAa,CACb,YACF,CACA,YACE,gBAAiB,CACjB,6BAA8B,CAC9B,kBAAmB,CACnB,eACF,CACA,SACE,YACF,CACA,WACE,iBAAkB,CAClB,YAAa,CACb,WAEF,CACA,yBAFE,WAIF,CAKA,kBAHE,WAAY,CACZ,YAOF,CALA,WAGE,YAAa,CACb,qBACF,CACA,OACE,YAAa,CACb,WAAY,CACZ,WACF,CACA,QACE,YACF,CAEA,yBACE,WACF,CACA,oCACE,kBACF,CACA,4BACE,WACF,CAEA,eACE,UAAW,CACX,WAAY,CACZ,qBACF,CACA,sBACE,aAAc,CACd,YACF,CAIA,yCACE,WACF,CACA,6BACE,YAAa,CACb,aACF,CAIA,4DACE,WACF,CAGA,0BACE,aACF,CAEA,2EAGE,YAAa,CACb,qBAAsB,CACtB,YACF,CAEA,mCACE,iBAAkB,CAClB,SAAU,CACV,SAAU,CACV,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,mCACE,cAAe,CACf,gBAA4B,CAC5B,gBAAiB,CACjB,yBAA2B,CAC3B,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,iDACE,qBAAwC,CAAxC,uCACF,CACA,yBACE,YACF,CAGA,QACE,eAAiC,CAAjC,gCAAiC,CACjC,qBAAsB,CACtB,oBAAqB,CACrB,WAAY,CACZ,UACF,CACA,cACE,aAAc,CACd,WACF,CACA,gBACE,sBAAuB,CACvB,YACF,CACA,aACE,aACF,CACA,cACE,WAAY,CACZ,iBAAkB,CAClB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,SACE,iBAAkB,CAClB,6BACF,CACA,gBACE,0BAA2B,CAC3B,iBAAkB,CAClB,QAAS,CACT,uBAAyB,CACzB,OAAQ,CACR,eAAgC,CAAhC,+BAAgC,CAChC,YAAa,CACb,eAAgB,CAChB,SAAa,CACb,cAAe,CACf,SACF,CACA,sBACE,aACF,CACA,mBACE,yBACF,CACA,yBACE,6BAAoC,CACpC,cACF,CACA,oLAQE,SAAY,CACZ,UAAW,CACX,cAAyB,CACzB,uBAAkC,CAClC,2BAA4B,CAC5B,iBAAkB,CAClB,aACF,CACA,oFAIE,kBAAoB,CACpB,qBAAsB,CACtB,eACF,CAEA,qBACE,eAAgB,CAChB,UACF,CACA,cACE,WAA2B,CAA3B,0BAA2B,CAC3B,6BACF,CACA,qBACE,eAAkB,CAClB,WACF,CACA,wBACE,qDACF,CACA,eACE,aAA4B,CAA5B,2BAA4B,CAC5B,2BACF,CACA,sBACE,cAAe,CACf,UACF,CACA,yBACE,sDACF,CAEA,OACE,YAAa,CACb,UAAW,CACX,WACF,CACA,gBACE,qBACF,CACA,aACE,aAAc,CACd,WAAY,CACZ,iBAAkB,CAClB,WAAY,CACZ,YACF,CAQA,+CACE,eACF,CACA,QACE,qBAAsC,CAAtC,qCAAsC,CACtC,aACF,CACA,0DAEI,gBACJ,CACA,sDAEI,gBACJ,CACA,wBACI,0LAGJ,CAEA,kDAJI,2BAAsC,CACtC,uBAOJ,CAJA,0BACI,0KAGJ,CAEA,EACE,UAAwB,CAAxB,uBACF,CACA,SACE,iBAUF,CAEA,iBAXE,MAAO,CACP,KAAM,CACN,UAAW,CACX,WAAY,CACZ,yBAA8B,CAC9B,WAAY,CACZ,YAAa,CACb,sBAAuB,CACvB,kBAeF,CAZA,QACE,cAAe,CAOf,cAIF,CACA,UACE,eAAgC,CAAhC,+BAAgC,CAChC,iBAAkB,CAClB,WAAY,CACZ,aAAc,CACd,cAAe,CACf,aAAc,CACd,WAAY,CACZ,YACF,CACA,qBACE,cACF,CACA,gBACE,YAAa,CACb,6BAA8B,CAC9B,kBAAmB,CACnB,eAAiB,CACjB,WAAY,CACZ,iBAAkB,CAClB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,gBACE,WACF,CACA,cACE,iBAAkB,CAClB,OAAQ,CACR,KAAM,CACN,kBACF,CACA,YACE,UAAW,CACX,aAAc,CACd,eAAoC,CAApC,mCAAoC,CACpC,WACF,CACA,SACE,kBAAmB,CACnB,qBAAsB,CACtB,iBAAkB,CAClB,WACF,CACA,iBACE,eAAgB,CAChB,4BAA6B,CAC7B,iBAAkB,CAClB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CACA,kBACE,YAAa,CACb,kBACF,CACA,oBACE,qBACF,CACA,kCACE,aACF,CACA,mCACE,aACF,CACA,UACE,cAAe,CACf,sBAAuB,CACvB,eAAgB,CAChB,kBAAmB,CACnB,aACF,CACA,UACE,UAAY,CACZ,mBAAoB,CACpB,kBACF,CAEA,UACE,cAAe,CACf,QAAS,CACT,YACF,CACA,cACE,eAAgB,CAChB,UAAY,CACZ,YAAc,CACd,YAAc,CACd,mBACF,CACA,iBACE,eACF,CACA,gBACE,eACF,CAEA,OACE,YACF,CACA,gBACE,oBAAqB,CACrB,mBACF,CACA,WACE,aACF,CAEA,iBACE,WAAY,CACZ,YACF,CAEA,mBACE,WAAa,CACb,YACF,CAEA,MACE,WAAY,CACZ,aAAe,CACf,eAAiC,CAAjC,gCAAiC,CACjC,UAA2B,CAA3B,0BACF,CACA,MACE,YAAa,CACb,6BAA8B,CAC9B,kBAAmB,CACnB,UACF,CACA,UACE,gBACF,CACA,mBACE,aACF,CACA,QACE,UAAW,CACX,kBACF,CACA,sCAEE,YAAa,CACb,UAAW,CACX,eACF,CACA,OACE,aACF,CAKA,uBAHE,UAAW,CACX,WAOF,CALA,eAGE,eAAiB,CACjB,WACF,CACA,WACE,YAAa,CACb,qBAAsB,CACtB,aAAc,CACd,eAAqC,CAArC,oCAAqC,CACrC,YAAa,CACb,WACF,CACA,kBACE,cACF,CACA,iBACE,eAAqC,CAArC,oCAAqC,CACrC,gBACF,CACA,UACE,YAAa,CACb,0BAA2B,CAC3B,6BAA8B,CAC9B,kBACF,CACA,OACE,SAAU,CACV,UACF,CACA,OACE,iBAAkB,CAClB,YAAa,CACb,qBAAsB,CACtB,WAAY,CACZ,YACF,CACA,SACE,aACF,CACA,YACE,QAAS,CACT,eACF,CACA,OACE,eAAgB,CAChB,qBAAqC,CAArC,oCAAqC,CACrC,UAA2B,CAA3B,0BAA2B,CAC3B,mBAAqB,CACrB,aAAe,CACf,kBAAoB,CACpB,eAAgB,CAChB,eAAiB,CACjB,wBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,aAAc,CACd,4BACF,CACA,WACE,UACF,CACA,aACE,eAA+B,CAA/B,8BACF,CAEA,mBACE,iBAAkB,CAClB,WACF,CACA,YACE,UAAW,CACX,WACF,CACA,gFAEE,UACF,CACA,eACE,eAAiC,CAAjC,gCAAiC,CACjC,aAAe,CACf,kBAAoB,CACpB,aACF,CACA,OACE,iCAAsC,CACtC,WAAY,CACZ,aAAc,CACd,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,iBACF,CACA,aACE,UACF,CACA,aAEE,WACF,CACA,uBAHE,qBAAuC,CAAvC,sCAOF,CAJA,UACE,uBAAgB,CAAhB,eAAgB,CAChB,KAEF,CACA,kBACE,cAAe,CACf,UAA8B,CAA9B,6BACF,CACA,+BACE,UAA2B,CAA3B,0BACF,CACA,cACE,yBAA2B,CAC3B,eACF,CACA,oBACE,YACF,CACA,wBACE,qCACF,CACA,wBACE,gBAAiB,CACjB,kBACF,CAEA,eACE,WAAY,CACZ,UAAW,CACX,6BAAoC,CACpC,SACF,CACA,uBAEI,iBAAkB,CAClB,eAAgB,CAChB,uBACJ,CACA,iBACE,UAAW,CACX,WACF,CACA,iBACE,iBACF,CACA,GACE,WAAY,CACZ,eAAiC,CAAjC,gCAAiC,CACjC,UACF,CAEA,QACE,YAAa,CACb,kBACF,CAEA,aACE,kBAAoB,CACpB,qBAA2C,CAA3C,0CAA2C,CAC3C,6BAA+B,CAC/B,iBAAmB,CACnB,kBAAmB,CACnB,iBACF,CACA,+BACE,eAAqC,CAArC,oCAAqC,CACrC,YACF,CACA,4CACE,iBAAkB,CAClB,MAAO,CACP,KAAM,CACN,2BACF,CACA,gCACE,mBAA4B,CAC5B,WAAY,CACZ,eAAgB,CAChB,aACF,CACA,gCACE,eAAgB,CAChB,WACF,CACA,kCACE,eAAgB,CAChB,YACF,CACA,+BACE,cACF,CACA,+BACE,SAAU,CACV,OACF,CACA,yBACE,mBAA4B,CAC5B,mBAAqB,CACrB,yBACF,CACA,iCACE,eAAkC,CAAlC,iCACF,CACA,oBACI,YAAa,CACb,wBAAyB,CACzB,eACJ,CACA,WACE,iBACF,CACA,yBACE,iBAAkB,CAClB,OAAQ,CACR,KACF,CAEA,yBACE,MACE,gBAAiB,CACjB,WACF,CACA,YACE,kBACF,CACA,aAEE,qBAAsB,CAGtB,cAFF,CAIA,KACE,6BACF,CACA,OACE,aAAc,CACd,kBAAmB,CACnB,iBACF,CACA,YACE,aAAc,CACd,cACF,CACA,kCACE,YACF,CACF,CAEA,yBACE,KACE,kBACF,CACA,sCACI,YAAa,CACb,UAAW,CACX,eACJ,CACA,OACE,eACF,CACF,CAEA,mCACE,MACE,oBAAqB,CACrB,oBAAqB,CACrB,uBAAwB,CACxB,qBAAsB,CACtB,sBAAuB,CACvB,iBAAkB,CAClB,0BAA2B,CAC3B,yBAA0B,CAC1B,wBAAyB,CACzB,sBAAuB,CACvB,uBAAwB,CACxB,oBAAqB,CACrB,oBAAuB,CACvB,yBACF,CACA,gFAEE,UACF,CACA,eACE,yBACF,CACA,OACE,+BACF,CACA,wBACE,+BACF,CACF","file":"main.7da83b7e.chunk.css","sourcesContent":["body {\n margin: 0;\n}\n\n.charts {\n display: flex;\n}\n\n.selected {\n background: red;\n}\n\n.collapsed>* {\n display:none;\n}","/* Variables */\n:root {\n --scrollbar-size: .375rem;\n --scrollbar-minlength: 1.5rem; /* Minimum length of scrollbar thumb (width of horizontal, height of vertical) */\n --scrollbar-ff-width: thin; /* FF-only accepts auto, thin, none */\n --scrollbar-track-color: transparent;\n --scrollbar-color: rgba(0,0,0,.2);\n --scrollbar-color-hover: rgba(0,0,0,.3);\n --scrollbar-color-active: rgb(0,0,0);\n}\n\n/* Use .layout-scrollbar-obtrusive to only use overflow if scrollbars don’t overlay */\n.scrollbar-test,\n.layout-cell {\n overscroll-behavior: contain;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n scrollbar-width: var(--scrollbar-ff-width);\n}\n\n/* This class controls what elements have the new fancy scrollbar CSS */\n.layout-scrollbar {\n scrollbar-color: var(--scrollbar-color) var(--scrollbar-track-color);\n}\n/* Only apply height/width to ::-webkit-scrollbar if is obtrusive */\n.layout-scrollbar-obtrusive .layout-scrollbar::-webkit-scrollbar {\n height: var(--scrollbar-size);\n width: var(--scrollbar-size);\n}\n.layout-scrollbar::-webkit-scrollbar-track {\n background-color: var(--scrollbar-track-color);\n}\n.layout-scrollbar::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-color);\n border-radius: 3px;\n}\n.layout-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: var(--scrollbar-color-hover);\n}\n.layout-scrollbar::-webkit-scrollbar-thumb:active {\n background-color: var(--scrollbar-color-active);\n}\n.scrollbar-test::-webkit-scrollbar-thumb:vertical,\n.layout-scrollbar::-webkit-scrollbar-thumb:vertical {\n min-height: var(--scrollbar-minlength);\n}\n.scrollbar-test::-webkit-scrollbar-thumb:horizontal,\n.layout-scrollbar::-webkit-scrollbar-thumb:horizontal {\n min-width: var(--scrollbar-minlength);\n}\n\n\n@media (prefers-color-scheme: dark) {\n :root {\n --scrollbar-color:#555;\n --scrollbar-color-hover: #555;\n --scrollbar-color-active: #555;\n }\n}\n\n",":root {\n color-scheme: light dark;\n --main-bg-color: #eee;\n --main-fg-color: #000;\n --title-bg-color: #CCC;\n --unselected-color: #ccc;\n --table-head-bg-color: #DDD;\n --button-color: #48F;\n --link-color: #36C;\n --code-area-bg-color: #CCC;\n --pre-area-bg-color: #FFF;\n --un-run-bg-color: #8AF;\n --aborted-bg-color: #DDD;\n --error-fg-color: darkred;\n --warn-fg-color: brown;\n --editor-bg-color: #fff;\n}\n\nhtml {\n box-sizing: border-box;\n font-family: sans-serif;\n line-height: 1.2;\n background: var(--main-bg-color);\n color: var(--main-fg-color);\n}\nhtml, body {\n height: 100%;\n}\n*, *:before, *:after {\n box-sizing: inherit;\n}\n/* ---------------- */\n\n/* ---------------- */\n#root {\n height: 100%;\n overflow: auto;\n}\n.App {\n height: 100%;\n}\n.error-msg {\n color: var(--error-fg-color);\n}\n.content {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.head {\n flex: 0 0 auto;\n display: flex;\n font-weight: bold;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n font-size: larger;\n}\n.head a {\n text-decoration: none;\n color: var(--main-fg-color);\n display: flex;\n align-items: center;\n}\n.head img {\n height: 1em;\n vertical-align: middle;\n margin: 5px;\n}\n.head .beta {\n font-size: x-small;\n vertical-align: top;\n position: relative;\n right: 1em;\n}\n.fix-help-contribute {\n display: flex;\n align-items: center;\n}\n.fix-help-contribute a {\n text-decoration: none;\n color: var(--main-fg-color);\n}\n.fix-help-contribute .three-words {\n font-size: x-small;\n text-align: right;\n}\n.fix-help-contribute .octocat {\n display: flex;\n flex-direction: column;\n justify-content: top;\n}\n.top {\n flex: 0 0 auto;\n display: flex;\n margin: 10px 10px 0 10px;\n}\n.bottom {\n display: flex;\n margin: 10px;\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n height: 100%;\n}\n.top>div,\n.bottom>div {\n flex: 1 1 50%;\n display: flex;\n}\n.top .right {\n margin-left: 10px;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n}\n.toolbar {\n display: flex;\n}\n.top .left {\n position: relative;\n min-height: 0;\n min-width: 0;\n height: 100%;\n}\n.bottom .left {\n height: 100%;\n}\n.codes {\n height: 100%;\n min-height: 0;\n}\n.codes>div {\n height: 100%;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n.right {\n min-height: 0;\n min-width: 0;\n height: 100%;\n}\n.bottom {\n display: flex;\n}\n/* ---------------------- */\n.layout-3-horizontal-top {\n height: 100%;\n}\n.layout-3-horizontal-top .codes>div {\n flex-direction: row;\n}\n.layout-3-horizontal-bottom {\n height: 100%;\n}\n/* ---------------------- */\n.layout-tabbed {\n width: 100%;\n height: 100%;\n flex-direction: column; \n}\n.layout-tabbed>.split {\n flex: 1 1 auto;\n min-height: 0;\n}\n.layout-tabbed-result {\n height: 100%;\n}\n.layout-tabbed-log {\n height: 100%;\n}\n.layout-tabbed-top .tab-tabs {\n display: flex;\n flex: 0 0 auto;\n}\n.layout-tabbed .tab-content {\n height: 100%;\n}\n.layout-tabbed .tab-content>div {\n height: 100%;\n}\n\n/* add this below? */\n.layout-tabbed-top .hidee {\n flex: 1 1 auto;\n}\n\n.layout-tabbed-top .code-area,\n.layout-tabbed-top .hidee,\n.react-codemirror2 {\n display: flex;\n flex-direction: column;\n min-height: 0;\n}\n\n.layout-tabbed-top .tab-tabs input {\n position: absolute;\n opacity: 0;\n padding: 0;\n user-select: none;\n}\n.layout-tabbed-top .tab-tabs label {\n cursor: pointer;\n padding: 0.5em 1em 0.5em 1em;\n margin-right: 3px;\n background: rgba(0,0,0,0.2);\n user-select: none;\n}\n.layout-tabbed-top .tab-tabs input:checked + label {\n background-color: var(--editor-bg-color);\n}\n.layout-tabbed .expander {\n display: none;\n}\n\n/* ---------------------- */\n.logger {\n background: var(--title-bg-color);\n font-family: monospace;\n white-space: pre-wrap;\n height: 100%;\n width: 100%;\n}\n.log-messages {\n overflow: auto;\n height: 100%;\n}\n.log-messages>* {\n overflow-wrap: anywhere;\n display: flex;\n}\n.logger .msg {\n flex: 1 1 auto;\n}\n.logger .file {\n float: right;\n position: relative;\n user-select: none;\n}\n.tooltip {\n position: relative;\n border-bottom: 1px dashed #888;\n}\n.tooltip:before {\n content: attr(data-tooltip);\n position: absolute;\n top: 100%;\n transform: translateY(0%);\n right: 0;\n background: var(--main-bg-color);\n display: none;\n white-space: pre;\n left: initial;\n margin: initial;\n z-index: 2;\n}\n.tooltip:hover:before {\n display:block;\n}\n.logger .file-link {\n text-decoration: underline;\n}\n.logger .file-link:hover {\n background: rgba(255, 255, 255, 0.3);\n cursor: pointer;\n}\n.logger .log .count,\n.logger .info .count,\n.logger .warn .count,\n.logger .error .count,\n.logger .log .no-count,\n.logger .info .no-count,\n.logger .warn .no-count,\n.logger .error .no-count {\n width: 1.0em;\n height: 1em;\n margin: 0 0.25em 0 0.25em;\n background-position: center center;\n background-repeat: no-repeat;\n text-align: center;\n flex: 0 0 auto;\n}\n.logger .log .count,\n.logger .info .count,\n.logger .warn .count,\n.logger .error .count {\n border-radius: 0.5em;\n vertical-align: middle;\n line-height: 1em;\n}\n\n.logger .info .count {\n background: #666;\n color: #DDD;\n}\n.logger .warn {\n color: var(--warn-fg-color);\n background: rgba(255, 255, 0, 0.2);\n}\n.logger .warn .count {\n background: yellow;\n color: brown;\n}\n.logger .warn .no-count {\n background-image: url(/resources/images/warn-icon.svg);\n}\n.logger .error {\n color: var(--error-fg-color);\n background: rgba(255, 0, 0, 0.2);\n}\n.logger .error .count {\n background: red;\n color: white;\n}\n.logger .error .no-count {\n background-image: url(/resources/images/error-icon.svg);\n}\n/* ---------------------- */\n.split {\n display: flex;\n width: 100%;\n height: 100%;\n}\n.split-vertical {\n flex-direction: column;\n}\n.split .pane {\n flex-shrink: 1;\n flex-grow: 1;\n position: relative;\n min-width: 0;\n min-height: 0;\n}\n.editor-codemirror .pane {\n /*\n I don't understand why codemirror needs this\n and monaco fails with it. >:(\n */\n overflow: hidden;\n}\n.split .pane-dragging {\n overflow: hidden;\n}\n.gutter {\n background-color: var(--main-bg-color);\n flex: 0 0 auto;\n}\n.gutter.gutter-horizontal,\n.gutter.gutter-horizontal:hover {\n cursor: ew-resize;\n}\n.gutter.gutter-vertical,\n.gutter.gutter-vertical:hover {\n cursor: ns-resize;\n}\n.gutter.gutter-vertical {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');\n background-repeat: no-repeat no-repeat;\n background-position: center center;\n}\n\n.gutter.gutter-horizontal {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');\n background-repeat: no-repeat no-repeat;\n background-position: center center;\n}\n/* ---------------------- */\na {\n color: var(--link-color);\n}\n.blocked {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.8);\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n/* ---------------------- */\n.dialog {\n position: fixed;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0.8);\n z-index: 100;\n width: 100%;\n height: 100%;\n max-width: 100%;\n justify-content: center;\n align-items: center;\n display: flex;\n}\n.dialog>* {\n background: var(--main-bg-color);\n border-radius: 5px;\n padding: 1em;\n max-width: 90%;\n max-height: 90%;\n overflow: auto;\n width: 800px;\n outline: none;\n}\n.fixed-size-dialog>* {\n min-height: 90%;\n}\n.dialog-heading {\n display: flex;\n justify-content: space-between;\n font-size: xx-large;\n font-weight: bold;\n margin: 10px;\n position: relative;\n user-select: none;\n}\n.dialog-content {\n margin: 10px;\n}\n.dialog-close {\n position: absolute;\n right: 0;\n top: 0;\n vertical-align: top;\n}\n.dialog pre {\n width: 100%;\n overflow: auto;\n background: var(--pre-area-bg-color);\n padding: 1em;\n}\n.section {\n margin-bottom: 10px;\n border: 1px solid #888;\n border-radius: 5px;\n padding: 1em;\n}\n.section-heading {\n font-size: large;\n border-bottom: 1px solid #888;\n margin-bottom: 1em;\n user-select: none;\n}\n.save-as-gist-pat {\n display: flex;\n align-items: center;\n}\n.save-as-gist-pat>* {\n vertical-align: middle;\n}\n.save-as-gist-pat>div:nth-child(1) {\n flex: 0 0 auto;\n}\n.save-as-gist-pat>div:nth-child(2) {\n flex: 1 1 auto;\n}\n.bookmark {\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n display: block;\n}\n.disabled {\n opacity: 0.2;\n pointer-events: none;\n cursor: not-allowed;\n}\n/* ------------------ */\n.messages {\n position: fixed;\n bottom: 0;\n z-index: 1000;\n}\n.messages>div {\n background: #888;\n color: white;\n padding: 0.5em;\n margin: 0.25em;\n border-radius: 0.25em;\n}\n.messages .error {\n background: #C00;\n}\n.messages .info {\n background: #00F;\n}\n/* -------------------- */\n.radio {\n display: flex;\n}\n.radio-selected {\n background-color: red;\n border-radius: 0.25em;\n}\n.radio img {\n display: block;\n}\n/* -------------------- */\n.layout .radio>* {\n width: 3.5em;\n padding: 0.5em;\n}\n/* -------------------- */\n.settings .radio>* {\n margin: 0.2em;\n padding: 0.2em;\n}\n/* -------------------- */\ninput {\n border: none;\n padding: 0.25em;\n background: var(--title-bg-color);\n color: var(--main-fg-color);\n}\n.name {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n}\n.name > * + * {\n margin-left: 10px;\n}\n.name>*:nth-child(1) {\n flex: 1 1 auto;\n}\n.avatar {\n height: 2em;\n border-radius: 100%;;\n}\ninput[type=\"text\"],\ninput[type=\"password\"] {\n outline: none;\n width: 100%;\n font-size: large;\n}\n.named {\n padding: 0.25em;\n}\n.runner {\n width: 100%;\n height: 100%;\n}\n.runner>iframe {\n width: 100%;\n height: 100%;\n background: white;\n border: none;\n}\n.code-area {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n background: var(--code-area-bg-color);\n min-height: 0;\n height: 100%;\n}\n.code-area button {\n margin-right: 0;\n}\n.code-area input {\n background: var(--code-area-bg-color);\n font-size: medium;\n}\n.expander {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n align-items: center;\n}\n.hider {\n width: 1em;\n color: #888;\n}\n.hidee {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n}\n.hidee>* {\n flex: 1 1 auto;\n}\n.hidee-hide {\n height: 0;\n overflow: hidden;\n}\nbutton {\n background: none;\n border: 2px solid var(--button-color);\n color: var(--main-fg-color);\n border-radius: 0.25em;\n padding: 0.25em;\n margin-right: 0.25em;\n min-width: 2.5em;\n font-weight: bold;\n user-select: none;\n height: 2.25em;\n line-height: calc(1em - 12px);\n}\nbutton img {\n height: 1em;\n}\nbutton:hover {\n background: var(--button-color);\n}\n\n.react-codemirror2 {\n position: relative;\n height: 100%;\n}\n.CodeMirror {\n width: 100%;\n height: 100%;\n}\n.CodeMirror-overlayscroll-horizontal div,\n.CodeMirror-overlayscroll-vertical div {\n opacity: 0.6;\n}\n.markdown code {\n background: var(--title-bg-color);\n padding: 0.25em;\n border-radius: 0.5em;\n line-height: 2;\n}\n.gists {\n background-color: rgba(0, 0, 255, 0.1);\n border: none;\n display: block;\n min-height: 20vh;\n max-height: 40vh;\n overflow-y: scroll;\n position: relative;\n}\n.gists table {\n width: 100%; \n}\n.gists thead {\n background-color: var(--title-bg-color);\n border: none;\n}\n.gists th {\n position: sticky; \n top: 0;\n background-color: var(--title-bg-color);\n}\n.gists thead span {\n cursor: pointer;\n color: var(--unselected-color);\n}\n.gists thead .current-sort-key {\n color: var(--main-fg-color);\n}\n.gists td>div {\n transition: max-height 0.3s;\n max-height: 100%;\n}\n.gists .hide td>div {\n max-height: 0;\n}\n.gists tr:nth-child(2n) {\n background-color: rgba(128, 160, 255, 0.2);\n}\n.gists td:nth-child(3n) {\n text-align: right;\n white-space: nowrap;\n}\n\n.comment-notes {\n padding: 1em;\n margin: 1em;\n background: rgba(255, 255, 255, 0.5);\n color: red;\n}\n.comments,\n.comment-sep {\n margin: 0 auto 1em;\n max-width: 700px;\n width: calc(100% - 40px);\n}\n.comments iframe {\n width: 100%;\n border: none;\n}\n.comments .links {\n text-align: center;\n}\nhr {\n border: none;\n background: var(--title-bg-color);\n height: 2px;\n}\n/*-------------*/\n.logout {\n display: flex;\n align-items: center;\n}\n/*-------------*/\n.new-comment {\n border-radius: 0.5em;\n border: 1px solid var(--code-area-bg-color);\n margin-left: calc(0.5em + 42px);\n margin-right: 0.5em;\n margin-bottom: 15em;\n position: relative;\n}\n.new-comment .new-comment-head {\n background: var(--code-area-bg-color);\n padding: 0.5em;\n}\n.new-comment .new-comment-head .user-avatar {\n position: absolute;\n left: 0;\n top: 0;\n transform: translateX(-42px);\n}\n.new-comment .react-codemirror2 {\n padding: 0 0.5em 0.5em 0.5em;\n height: 10em;\n resize: vertical;\n overflow: auto;\n}\n.new-comment .new-comment-write {\n min-height: 10em;\n height: 10em;\n}\n.new-comment .new-comment-preview {\n min-height: 10em;\n padding: 0.5em;\n}\n.new-comment .new-comment-tabs {\n margin-top: 1em;\n}\n.new-comment input[type=\"radio\"] {\n opacity: 0;\n width: 0;\n}\n.new-comment input + label {\n padding: 0.5em 0.5em 0 0.5em;\n margin-right: 0.125em;\n background: rgba(0,0,0,0.1);\n}\n.new-comment input:checked + label {\n background: var(--editor-bg-color);\n}\n.new-comment-submit {\n display: flex;\n justify-content: flex-end;\n padding-top: 1em;\n}\n.copy-text {\n position: relative;\n}\n.copy-text .copy-buttons {\n position: absolute;\n right: 0;\n top: 0;\n}\n\n@media (max-width: 740px) {\n .head {\n font-size: medium;\n padding: 2px;\n }\n .head .beta {\n font-size: xx-small;\n }\n .top,\n .bottom {\n flex-direction: column;\n }\n .top, .bottom {\n margin-top: 5px;\n }\n .top {\n flex-direction: column-reverse;\n }\n .right {\n margin-left: 0;\n padding-bottom: 5px;\n margin-bottom: 5px;\n }\n .top .right {\n margin-left: 0;\n margin-top: 5px;\n }\n .fix-help-contribute .three-words {\n display: none;\n }\n}\n\n@media (max-width: 540px) {\n html {\n font-size: xx-small;\n }\n input[type=\"text\"], input[type=\"password\"] {\n outline: none;\n width: 100%;\n font-size: small;\n }\n button {\n font-size: small;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --main-bg-color: #444;\n --main-fg-color: #fff;\n --unselected-color: #666;\n --title-bg-color: #222;\n --button-bg-color: #fff;\n --link-color: #6CF;\n --table-head-bg-color: #555;\n --code-area-bg-color: #555;\n --pre-area-bg-color: #222;\n --un-run-bg-color: blue;\n --aborted-bg-color: #000;\n --error-fg-color: red;\n --warn-fg-color: yellow;\n --editor-bg-color: #263238;\n }\n .CodeMirror-overlayscroll-horizontal div,\n .CodeMirror-overlayscroll-vertical div {\n opacity: 0.3;\n }\n .comment-notes {\n background: rgba(0, 0, 0, 0.5);\n }\n .gists {\n background-color: rgba(0, 0, 0, 0.3);\n }\n .gists tr:nth-child(2n) {\n background-color: rgba(0, 0, 0, 0.2);\n }\n}\n"]} \ No newline at end of file diff --git a/static/js/main.18d61dac.chunk.js b/static/js/main.18d61dac.chunk.js deleted file mode 100644 index c37acd4..0000000 --- a/static/js/main.18d61dac.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this.webpackJsonpjsgist=this.webpackJsonpjsgist||[]).push([[0],{178:function(e,t,n){},179:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),i=n(76),o=n.n(i),s=n(3),c=n(5),l=n(16),u=function(){function e(){Object(s.a)(this,e),this.itemToSubscriptionMap=void 0,this.itemToSubscriptionMap=new Map}return Object(c.a)(e,[{key:"subscribe",value:function(e,t){this.unsubscribe(e,t);var n=this.itemToSubscriptionMap.get(e);n||(n=[],this.itemToSubscriptionMap.set(e,n)),n.push(t)}},{key:"unsubscribe",value:function(e,t){var n=this.itemToSubscriptionMap.get(e);if(n){var a=n.indexOf(t);a>=0&&(n.splice(a,1),0===n.length&&this.itemToSubscriptionMap.delete(e))}}},{key:"notify",value:function(e){var t=this.itemToSubscriptionMap.get(e);if(t){var n,a=Object(l.a)(t.slice());try{for(a.s();!(n=a.n()).done;){(0,n.value)()}}catch(r){a.e(r)}finally{a.f()}}}}]),e}();var d=new(function(){function e(t){var n=this;Object(s.a)(this,e),this.prefix=void 0,this.subscriptionManager=void 0,this._handleNewValue=function(e){var t=e.key;if(t&&t.startsWith(n.prefix)){var a=t.substr(n.prefix.length);n.subscriptionManager.notify(a)}},this.prefix="".concat(t,"-"),this.subscriptionManager=new u,window.addEventListener("storage",this._handleNewValue)}return Object(c.a)(e,[{key:"_addPrefix",value:function(e){return"".concat(this.prefix).concat(e)}},{key:"subscribe",value:function(e,t){this.subscriptionManager.subscribe(e,t)}},{key:"unsubscribe",value:function(e,t){this.subscriptionManager.unsubscribe(e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._addPrefix(e);if(t){var a=sessionStorage.getItem(n);if(a)return a}return localStorage.getItem(n)}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this._addPrefix(e);n&&sessionStorage.setItem(a,t),localStorage.setItem(a,t),this.subscriptionManager.notify(e)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._addPrefix(e);t&&sessionStorage.removeItem(n),localStorage.removeItem(n),this.subscriptionManager.notify(e)}},{key:"cleanup",value:function(){window.removeEventListener("storage",this._handleNewValue)}}]),e}())("jsgist"),h=(n(94),n(95),document.createElement("div"));h.setAttribute("style","width:30px;height:30px;"),h.classList.add("scrollbar-test");var m=document.createElement("div");m.setAttribute("style","width:100%;height:40px"),h.appendChild(m),document.body.appendChild(h),30-h.firstChild.clientWidth&&document.body.classList.add("layout-scrollbar-obtrusive"),document.body.removeChild(h);var p=n(1),f=n.n(p),g=n(8),v=n(42),b=n(6),y=n(7);function E(e){return r.a.createElement("input",{type:"text",onChange:function(t){e.onChange(t.target.value)},placeholder:e.placeholder,value:e.value})}var w=n(20),k=n(4),S=n(9),j=n(53),O="/*bug-in-github-api-content-can-not-be-empty*/";function x(e){return e.content.startsWith(O)?e.content.substr(O.length):e.content}function C(e){var t=JSON.parse(e.files["jsGist.json"].content);return t.filenames?t.files=t.filenames.map((function(t){return{name:t,content:x(e.files[t])}})):t.files=Object.entries(e.files).filter((function(e){return"jsGist.json"!==Object(S.a)(e,1)[0]})).map((function(e){var t=Object(S.a)(e,2);return{name:t[0],content:x(t[1])}})).concat(t.files||[]),t}function M(e,t,n){var a=e.files.reduce((function(e,t){return e[t.name]={content:t.content.trim()?t.content:"".concat(O).concat(t.content)},e}),{}),r=Object(k.a)({},e),i={};if(a["jsGist.json"]=i,Object.keys(a).length===e.files.length+1?(delete r.files,r.filenames=e.files.map((function(e){return e.name}))):a={"jsGist.json":i},i.content=JSON.stringify(r),n){var o=Object.keys(a).map((function(e){return e.toLowerCase()}));if(!(o.includes("readme.md")||o.includes("readme.txt")||o.includes("readme"))){var s="## ".concat(e.name,"\n\n[view on jsgist](").concat(window.location.origin,"?src=").concat(n,")");a["README.md"]={content:s}}for(var c=0,l=Object.entries(a);c1&&void 0!==i[1]&&i[1],a=M(t,n),e.next=4,this.authorizedOctokit.gists.create(a);case 4:return r=e.sent,this._updateUserData(r.data),e.next=8,this.updateGist(r.data.id,t);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t,n){var a,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=M(n,!1,t),e.next=3,this.authorizedOctokit.gists.update(a);case 3:return r=e.sent,e.abrupt("return",{id:r.data.id,name:r.data.description,date:r.data.updated_at,public:r.data.public});case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"forkGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.fork({gist_id:t});case 2:return n=e.sent,e.abrupt("return",{id:n.data.id});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.delete({gist_id:t});case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createGistComment",value:function(){var e=Object(g.a)(f.a.mark((function e(t,n){var a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.createComment({gist_id:t,body:n});case 2:if(!((a=e.sent).status<200||a.status>=300)){e.next=5;break}throw new Error(a.message);case 5:return e.abrupt("return",a.data);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"octokit",get:function(){return this.authorizedOctokit||this.unAuthorizedOctokit}}]),n}(Object(w.a)(EventTarget));function N(){return r.a.createElement("div",{className:"head"},r.a.createElement("div",null,r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:window.location.origin},r.a.createElement("img",{src:"/resources/images/logo-small.svg",alt:"logo"}),window.location.hostname)),r.a.createElement("div",{className:"fix-help-contribute"},r.a.createElement("div",{className:"octocat"},r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/greggman/jsgist/"},r.a.createElement("img",{alt:"github",src:"/resources/images/octocat-icon.svg"})))))}var L=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;i--"),"."),r.a.createElement("p",null,"Example: ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/?src=f793cb359f2571409983351a6099d5d1"},"https://jsgist.org/?src=f793cb359f2571409983351a6099d5d1"))),r.a.createElement("li",null,"Save it manually somewhere else.",r.a.createElement("p",null,"If there's some other service that will provide a string via http get then copy and save the JSON there then create a URL in the form of ",r.a.createElement("code",null,"https://jsgist.org/?src="),". Note: you may have to escape the URL.")),r.a.createElement("li",null,"Save it as a bookmark or link",r.a.createElement("p",null,"In the SaveAs dialog there's a link that contains all the data for your benchmark.")))))}var U=n(15),T=n.n(U),_=n(14),A=n.n(_),D=n(18),P=/([a-z])([A-Z])/g,R=function(e,t,n){return"".concat(t,"-").concat(n)},G=function(e){return e.replace(P,R).toLowerCase()};function K(){for(var e=[],t=arguments.length,n=new Array(t),a=0;a=0?e.substr(t+1):e}(t.url||""),":",t.lineNo)))}))))}}]),n}(r.a.Component);function W(e,t){for(var n=new URL(e),a=new URLSearchParams(n.search),r=0,i=Object.entries(t);r=0&&r.splice(i,1),0===r.length&&(a.delete(e),0===a.size&&t&&q.delete(t))}}}function $(e,t,n){var a=e.get(t);if(a){var r,i=Object(l.a)(a);try{for(i.s();!(r=i.n()).done;){(0,r.value)(n)}}catch(o){i.e(o)}finally{i.f()}return!0}return!1}window.addEventListener("message",(function(e){var t=e.data,n=t.type,a=t.data,r=q.get(e.source);r&&$(r,n,a)||$(H,n,a)}));var X=["accelerometer","bluetooth","camera","encrypted-media","display-capture","geolocation","gyroscope","microphone","midi","clipboard-read","clipboard-write","web-share","serial","xr-spatial-tracking"].map((function(e){return"".concat(e," *")})).join("; "),Z=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).handleJSLog=function(e){a.context.logManager.addMsg(e)},a.handleJSError=function(e){a.context.logManager.addMsg(Object(k.a)(Object(k.a)({},e),{},{type:"error",showStack:!0}))},a.handleJSUnhandledRejection=function(e){a.context.logManager.addMsg(Object(k.a)(Object(k.a)({},e),{},{type:"error",showStack:!0}))},a.handleInfoMessages=function(e){a.context.logManager.addMsgs(e)},a.handleGimmeDaCodez=function(){a.iframe.contentWindow.postMessage({type:"run",data:a.data},"*")},a.handleMessage=function(e){var t=e.data,n=t.type,r=t.data,i=a.handlers[n];i&&i(r)},a.runnerRef=r.a.createRef(),a}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.registerAPI,n=Object.fromEntries(new URLSearchParams(window.location.search).entries()).debug,a=Object(k.a)({},n&&{debug:n});t({run:function(t,n){e.data=t,e.removeIFrame();var r=document.createElement("iframe");r.allow=X,e.iframe=r,r.src=W("https://jsgistrunner.devcomments.org/runner-03.html",Object(k.a)({url:"https://jsgist.org/jsgist-runner.js"},a)),n&&(r.style.background="none"),e.runnerRef.current.appendChild(r)}}),B("gimmeDaCodez",null,this.handleGimmeDaCodez),B("jsLog",null,this.handleJSLog),B("jsError",null,this.handleJSError),B("jsUnhandledRejection",null,this.handleJSUnhandledRejection),B("infoMessages",null,this.handleInfoMessages)}},{key:"removeIFrame",value:function(){this.iframe&&(this.iframe.remove(),this.iframe.src="about:blank",this.iframe=void 0)}},{key:"componentWillUnmount",value:function(){this.removeIFrame(),Y("gimmeDaCodez",null,this.handleGimmeDaCodez),Y("jsLog",null,this.handleJSLog),Y("jsError",null,this.handleJSError),Y("jsUnhandledRejection",null,this.handleJSUnhandledRejection),Y("infoMessages",null,this.handleInfoMessages)}},{key:"render",value:function(){return r.a.createElement("div",{className:"runner",ref:this.runnerRef})}}]),n}(r.a.Component);Z.contextType=F;var Q=n(79),ee=(new T.a).compile(Q),te={};function ne(e){var t=te[e]||{subscriptions:new Set};return te[e]=t,t}function ae(e,t){var n=ne(e);return void 0!==t&&(n.value=t),n}function re(e){return te[e].value}function ie(e,t){var n=te[e];if(!n)throw new Error("no such track value: ".concat(e));n.value=t;var a,r=Object(v.a)(n.subscriptions.keys()),i=Object(l.a)(r);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t,e)}}catch(o){i.e(o)}finally{i.f()}}function oe(e,t){ne(e).subscriptions.add(t)}function se(e,t){ne(e).subscriptions.delete(t)}var ce,le={name:"My jsGist",settings:{},files:[{name:"index.html",content:""},{name:"index.css",content:""},{name:"index.js",content:""}]};function ue(){var e="".concat(window.location.origin,"/resources/images/logo.svg");return JSON.parse(JSON.stringify({name:"jsGist",settings:{},files:[{name:"index.html",content:""},{name:"index.css",content:"\n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n background-image: url(".concat(e,");\n background-size: contain contain;\n background-position: center center;\n background-repeat: no-repeat no-repeat;\n }\n @media (prefers-color-scheme: dark) {\n html {\n background: #222;\n }\n }\n ")},{name:"index.js",content:""}]}))}function de(){return ce}ae("dataVersion",0),ae("updateVersion",0),ae("filesVersion",0);var he=function(e){return ie(e,re(e)+1)},me=function(e){return he("dataVersion")},pe=function(e){return he("filesVersion")};function fe(e,t){ce.files[e].name=t,me()}function ge(e,t){ce.files[e].content=t,me()}function ve(e){!function(e){if(!ee(e))throw new Error("data not valid:\n".concat(ee.errors.map((function(e){return"".concat(e.message,": ").concat(e.dataPath)}))))}(e),ce=e,he("updateVersion"),me(),pe()}ve(JSON.parse(JSON.stringify(le)));var be,ye=Object.fromEntries(new URLSearchParams(window.location.search).entries()),Ee=!ye.codeMirror&&!/webOS|iPhone|iPad|Android/.test(navigator.userAgent),we=!1,ke={layout:window.screen.width<540||window.screen.height<540?3:0,editor:Ee?"monaco":"codemirror",lineNumbers:!0,tabs:!1,showWhitespace:!1};function Se(e,t){be[e]=t;var n=JSON.stringify(be);d.set("ui-settings",n,!0),ie("settings",be)}function je(){return function(){if(!we){we=!0;try{if(!(be=JSON.parse(d.get("ui-settings",!0))))throw new Error("no settings")}catch(i){be=Object(k.a)({},ke)}for(var e=0,t=Object.entries(ke);e=0&&(u.matchTags=!0),r.a.createElement(Le.Controlled,{value:c,options:u,onBeforeChange:function(t,n,a){e.setState({value:a})},onChange:function(e,t,n){o(n)},editorDidMount:this.registerEditor})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.hackKey!==e.hackKey?{hackKey:e.hackKey,value:e.value}:null}}]),n}(r.a.Component),_e=n(88);function Ae(e,t){var n,a=Object(l.a)(t);try{var r=function(){var t=n.value,a=e.findIndex((function(e){return e.name.toLowerCase().endsWith(t.toLowerCase())}));if(a>=0)return{v:a}};for(a.s();!(n=a.n()).done;){var i=r();if("object"===typeof i)return i.v}}catch(o){a.e(o)}finally{a.f()}return-1}function De(e,t){var n=e.findIndex((function(e){return e.name.toLowerCase()===t.toLowerCase}));if(n>=0)return n;for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i1?t-1:0),a=1;a=0?e[r]:""}var Re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return Object.entries(e).map((function(e){var t=Object(S.a)(e,2),n=t[0],a=t[1];return"".concat(n,"=").concat(a)})).join(t)};var Ge=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):{},Ke=function(){};function Fe(e){return Je.apply(this,arguments)}function Je(){return(Je=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return n=e.sent,e.next=5,n.text();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ve,We=(Ve=function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Fe("/types/webgpu/dist/index.d.ts");case 3:n=e.sent,t.languages.typescript.javascriptDefaults.addExtraLib(n,"");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(){var e=!1;e||(e=!0,Ve.apply(void 0,arguments))});var He=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(s.a)(this,n),(a=t.call(this,e)).handleEditorDidMount=function(e,t){a.editor=e,We(t),e.getModel().updateOptions({tabSize:2});var n=a.props.registerAPI;n&&n({goToLine:function(e,t){a.editor.focus(),a.editor.setPosition({lineNumber:e,column:t}),a.editor.revealPosition({lineNumber:e,column:t})},refresh:function(e){},focus:function(e){a.editor.focus()}})},a.registerEditor=function(e){a.editor=e};var r=e.value,i=e.hackKey;return a.state={value:r,hackKey:i},a}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=void 0===t?{}:t,a=e.onValueChange,i=void 0===a?Ke:a,o=e.ui,s=this.state.value,c=Ge.matches,l=function(e){var t=((null===e||void 0===e?void 0:e.mode)||"javascript").split("/").pop();return"gfm"===t?"markdown":t}(n.editor).split("/").pop();return r.a.createElement(_e.a,{theme:c?"vs-dark":"light",language:l,value:s,onChange:i,onMount:this.handleEditorDidMount,options:{minimap:{enabled:!1},lineNumbers:o.lineNumbers?"on":"off",glyphMargin:!1,folding:!1,insertSpaces:!o.tabs,renderWhitespace:o.showWhitespace}})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.hackKey!==e.hackKey?{hackKey:e.hackKey,value:e.value}:null}}]),n}(r.a.Component),qe=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;i=0&&(t[0]=e[0]),a.state.showResult&&(t[1]=e[1]),a.state.showLow&&(t[2]=e[2]),a.setState({sizes:e,lastSizes:t}),Se("layoutTabbed",a.state)},a.handleGoToLine=function(e){a.files.forEach((function(t,n){if(t.goToLine(e)){var r=a.props.data.files.findIndex((function(t){return t.name===e.section}));r!==a.state.currentNdx&&a.handleOnChange(r)}}))},a.handleOnChange=function(e){var t=a.state.currentNdx===e?-1:e;a.setState({currentNdx:t,sizes:ot(a.state.sizes,a.state.lastSizes,0,t>=0)}),Se("layoutTabbed",a.state)},a.toggleShowLog=function(){var e=!a.state.showLog;a.setState({showLog:e,sizes:ot(a.state.sizes,a.state.lastSizes,2,e)}),Se("layoutTabbed",a.state)},a.toggleShowResult=function(){var e=!a.state.showResult;a.setState({showResult:e,sizes:ot(a.state.sizes,a.state.lastSizes,1,e)}),Se("layoutTabbed",a.state)};var r=je().layoutTabbed;return a.state=it(r)?r:{showResult:!0,showLog:!0,currentNdx:2,sizes:[.45,.45,.1],lastSizes:[.45,.45,.1]},a.files=new Map,a.fileToKeyMap=new Map,a}return Object(c.a)(n,[{key:"getFileKey",value:function(e){var t=this.fileToKeyMap.get(e);return t||(t="".concat(Date.now(),"-").concat(Math.random()),this.fileToKeyMap.set(e,t)),t}},{key:"componentDidUpdate",value:function(){this.previousNdx!==this.state.currentNdx&&(this.previousNdx=this.state.currentNdx,this.files.forEach((function(e){e.refresh(),e.focus()})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.hackKey,a=t.data,i=t.registerRunnerAPI,o=this.state,s=o.showResult,c=o.showLog,l=o.sizes,u=o.currentNdx,d=Object(k.a)({},!s&&{display:"none"}),h=Object(k.a)({},!c&&{display:"none"});return r.a.createElement("div",{className:"layout-tabbed"},r.a.createElement("div",{className:"layout-tabbed-top"},r.a.createElement("div",{className:"tab-tabs"},a.files.map((function(t,n){var a="ca".concat(e.getFileKey(t));return r.a.createElement(r.a.Fragment,{key:a},r.a.createElement("input",{type:"radio",name:"tabbed-files",id:a,checked:n===u,onClick:function(t){return e.handleOnChange(n)},onChange:function(e){return e}}),r.a.createElement("label",{htmlFor:a},t.name))})),r.a.createElement("input",{type:"checkbox",checked:s,onChange:this.toggleShowResult,id:"result"}),r.a.createElement("label",{htmlFor:"result"},"result"),r.a.createElement("input",{type:"checkbox",checked:c,onChange:this.toggleShowLog,id:"log"}),r.a.createElement("label",{htmlFor:"log"},"log"))),r.a.createElement(A.a,{direction:"vertical",minSize:0,sizes:l,onSetSizes:this.setSizes},r.a.createElement("div",{className:"tab-content"},a.files.map((function(t,a){var i="ca".concat(e.getFileKey(t));return r.a.createElement("div",{key:i,style:Object(k.a)({},a!==u&&{display:"none"})},r.a.createElement(Ye,{hackKey:n,desc:"filename",title:t.name,value:t.content,onTitleChange:function(e){return fe(a,e)},onValueChange:function(e){return ge(a,e)},register:e.handleRegister,unregister:e.handleUnregister}))}))),r.a.createElement("div",{className:"layout-tabbed-result",style:d},r.a.createElement(Z,{registerAPI:i})),r.a.createElement("div",{className:"layout-tabbed-log",style:h},r.a.createElement(V,{onGoToLine:this.handleGoToLine}))))}}]),n}(r.a.Component)],ct=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;it.name.toLowerCase()?1:0};case"date":return function(e,t){return e.datet.date?1:0};case"public":return function(e,t){var n=e.public?1:0,a=t.public?1:0;return Math.sign(n-a)};case"check":return function(e,n){var a=t.has(e.id)?1:0,r=t.has(n.id)?1:0;return Math.sign(a-r)};default:throw new Error("unknown sortKey")}}(n,t);return e.slice().sort((function(e,t){return i(t,e)*r}))}function wt(e){var t=new lt.a({fields:["name"]});return t.addAll(Object.entries(e).map((function(e){var t=Object(S.a)(e,2);return{id:t[0],name:t[1].name}}))),t}function kt(e){var t=e.sortDir,n=e.selected,a=e.update;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{onClick:function(){return a(n?"up"===t?"down":"up":t)},className:n?"current-sort-key":""},"up"===t?"\u25b2":"\u25bc"))}function St(e){for(var t,n=0,a=Object.values(e);nt)&&(t=i)}return t}ae("gists",ft()),d.subscribe("gists",(function(){ie("gists",ft())}));var jt=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(s.a)(this,n),(a=t.call(this,e)).handleNewGists=function(e){a.setState({gists:e,index:wt(e)})},a.toggleCheck=function(e){var t=new Set(a.state.checks);t.has(e)?t.delete(e):t.add(e),a.setState({checks:t})},a.onUserStatusChange=function(){a.forceUpdate(),a.context.userManager.getUserData()&&a.loadGists()},a.updateSort=function(e,t){a.setState({sortDir:t,sortKey:e,newFilter:!1})},a.handleKeyDown=function(e){a.setState({shift:e.shiftKey})},a.handleKeyUp=function(e){a.setState({shift:e.shiftKey})},a.loadGists=Object(g.a)(f.a.mark((function e(){var t,n,r,i,o,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.context,n=t.addError,r=t.github,a.setState({loading:!0}),e.prev=2,i=a.state.shift?{}:a.state.gists,o=St(i),e.next=7,r.getUserGists(o);case 7:s=e.sent,yt(s.reduce((function(e,t){return e[t.id]={name:t.description,date:t.updated_at,public:t.public},e}),Object(k.a)({},i))),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n("could not load gists: ".concat(e.t0));case 15:a.setState({loading:!1});case 16:case"end":return e.stop()}}),e,null,[[2,12]])}))),a.deleteSelected=Object(g.a)(f.a.mark((function e(){var t,n,r,i,o,s,c,l,u,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a.state,n=t.checks,r=t.gists,i=[],n.forEach((function(e,t){r[e]&&i.push(e)})),o=a.context,s=o.addError,c=o.github,a.setState({loading:!0}),l=0,u=i;case 6:if(!(l=0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement(E,{className:"foobar",placeholder:"search:",value:c,onChange:function(t){e.setState({filter:t,newFilter:""!==t.trim()})}})),r.a.createElement("div",{className:"gists"},r.a.createElement("table",null,r.a.createElement("thead",null,r.a.createElement("tr",null,r.a.createElement("th",null,r.a.createElement(kt,{selected:"check"===p,sortDir:u,update:function(t){return e.updateSort("check",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"name"===p,sortDir:u,update:function(t){return e.updateSort("name",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"date"===p,sortDir:u,update:function(t){return e.updateSort("date",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"public"===p,sortDir:u,update:function(t){return e.updateSort("public",t)}})))),r.a.createElement("tbody",null,g.map((function(t,n){return r.a.createElement("tr",{key:"g".concat(n)},r.a.createElement("td",null,r.a.createElement("input",{type:"checkbox",id:"gc".concat(n),checked:i.has(t.id),onChange:function(){return e.toggleCheck(t.id)}}),r.a.createElement("label",{htmlFor:"gc".concat(n)})),r.a.createElement("td",null,r.a.createElement("a",{onClick:e.clearBackup,href:"".concat(window.location.origin,"?src=").concat(encodeURIComponent(t.id))},t.name)),r.a.createElement("td",null,t.date.substring(0,10)),r.a.createElement("td",null,t.public?"":"\ud83d\udd12"))}))))),r.a.createElement("div",null,r.a.createElement("button",{onClick:this.deleteSelected},"Delete Selected Gists"))))}},{key:"render",value:function(){return this.context.userManager.getUserData()?this.renderLoad():this.renderLogin()}}]),n}(r.a.Component);function Ot(e){var t=Object(a.useState)(""),n=Object(S.a)(t,2),i=n[0],o=n[1],s=Object(a.useContext)(F).addError;return r.a.createElement("div",null,r.a.createElement("div",{style:{height:"100px"}},r.a.createElement(qe,{value:i,onValueChange:o})),r.a.createElement("p",null,r.a.createElement("button",{onClick:function(){var t=e.onLoad;try{ve(JSON.parse(i)),t()}catch(n){s("bad json: ".concat(n))}}},"Load JSON")))}function xt(e){var t=Object(a.useState)(""),n=Object(S.a)(t,2),i=n[0],o=n[1],s=Object(a.useContext)(F).addError;function c(){return(c=Object(g.a)(f.a.mark((function t(){var n,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.onLoad,t.prev=1,t.next=4,fetch(i);case 4:return a=t.sent,t.next=7,a.json();case 7:ve(t.sent),n(),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),s("could not load url: ".concat(t.t0));case 15:case"end":return t.stop()}}),t,null,[[1,12]])})))).apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(E,{value:i,onChange:o,placeholder:"url-to-json"}),r.a.createElement("p",null,r.a.createElement("button",{onClick:function(){return c.apply(this,arguments)}},"Load URL")))}function Ct(e){var t=e.heading,n=e.children;return r.a.createElement("div",{className:"section"},r.a.createElement("div",{className:"section-heading"},t),r.a.createElement("div",{className:"section-content"},n))}function Mt(e){var t=e.data,n=e.onLoad,a=e.onClose;return r.a.createElement(L,{title:"Load",className:"fixed-size-dialog",onClose:a},r.a.createElement(Ct,{heading:"Load Gist"},r.a.createElement(jt,{data:t,onLoad:n})),r.a.createElement(Ct,{heading:"Load URL"},r.a.createElement(xt,{data:t,onLoad:n})),r.a.createElement(Ct,{heading:"Load JSON"},r.a.createElement(Ot,{data:t,onLoad:n})))}jt.contextType=F;var zt=n(52),Nt=n(54),Lt=new TextEncoder,It=new TextDecoder,Ut=function(e){return e.startsWith("cb64,")||e.startsWith("b64,")};function Tt(e){var t=e.startsWith("cb64,"),n=t?"cb64,":"b64,",a=e.substr(n.length).replace(/-/g,"+").replace(/_/g,"/"),r=new Uint8Array(Object(zt.a)(a)),i=t?Object(Nt.b)(r):r,o=It.decode(i);return JSON.parse(o)}var _t=/^[a-z0-9]+$/i,At=function(e){return _t.test(e)};function Dt(e,t){return Pt.apply(this,arguments)}function Pt(){return(Pt=Object(g.a)(f.a.mark((function e(t,n){var a,r,i,o,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!At(t)){e.next=9;break}return e.next=3,n.getGist(t);case 3:return a=e.sent,r=a.data,i=a.rawData,e.abrupt("return",{data:r,id:t,rawData:i});case 9:if(!Ut(t)){e.next=13;break}return e.abrupt("return",{data:Tt(t)});case 13:return e.next=15,fetch(t);case 15:return o=e.sent,e.next=18,o.json();case 18:return s=e.sent,e.abrupt("return",{data:s});case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rt(e){var t=e.gistId,n=t||"f793cb359f2571409983351a6099d5d1";return r.a.createElement("div",null,r.a.createElement("div",{className:"markdown"},r.a.createElement("p",null,"You can embed a jsGist by creating an iframe pointing to"," ",r.a.createElement("code",null,"https://jsgist.org/embed.html?src=")," "," where"," ",r.a.createElement("code",null,"")," "," is one of the forms above. Either"," ",r.a.createElement("code",null,"?src=")," ","or"," ",r.a.createElement("code",null,"?src=")," ","or"," ",r.a.createElement("code",null,"?src=")," ",". You can also add "," ",r.a.createElement("code",null,"noheader=true")," "," if you don't want the header to appear. You can also just run them directly rather than put in an iframe. ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/embed.html?src=".concat(n)},"[example]")," ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/embed.html?src=".concat(n,"&noheader=true")},"[example no header]")),!!t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"For example to embed the current gist:"),r.a.createElement("pre",null,r.a.createElement("code",{style:{userSelect:"all"}},''))),r.a.createElement("p",null)))}var Gt=function(){var e=document.createElement("a");return e.style.display="none",document.body.appendChild(e),function(t,n){var a=window.URL.createObjectURL(t);e.href=a,e.download=n,e.click()}}();function Kt(e){return e.split("\n").map((function(e){return" ".concat(e)})).join("\n")}function Ft(e,t){var n=e.files,a=Pe(n,"index.html","html"),r=Pe(n,"index.js","js","js","javascript"),i=Pe(n,"index.css","css");return t?"\n\x3c!-- begin snippet: js hide: false console: true babel: false --\x3e\n\n\x3c!-- language: lang-js --\x3e\n\n\x3c!-- language: lang-css --\x3e\n\n".concat(Kt(i.content),"\n\n\x3c!-- language: lang-html --\x3e\n\n").concat(Kt(a.content),'\n \n\n\n`\n : `\n\n\n\n\n${indent4(mainJS.content)}\n\n\n\n${indent4(mainCSS.content)}\n\n\n\n${indent4(mainHTML.content)}\n\n\n`;\n\n}\n\nfunction openInCodepen(data) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n\n const pen = {\n title : data.name,\n description : data.name,\n editors : '101',\n html : mainHTML.content,\n css : mainCSS.content,\n js : mainJS.content,\n };\n\n const elem = document.createElement('div');\n elem.innerHTML = `\n
'\n \n \n \"
\"\n `;\n elem.querySelector('input[name=data]').value = JSON.stringify(pen);\n document.body.appendChild(elem);\n elem.querySelector('form').submit();\n document.body.removeChild(elem);\n}\n\nfunction openInJSFiddle(data) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n\n const elem = document.createElement('div');\n elem.innerHTML = `\n
\n \n \n \n \n \n \n
\n `;\n elem.querySelector('input[name=html]').value = mainHTML.content;\n elem.querySelector('input[name=css]').value = mainCSS.content;\n elem.querySelector('input[name=js]').value = mainJS.content;\n elem.querySelector('input[name=title]').value = data.name;\n document.body.appendChild(elem);\n elem.querySelector('form').submit();\n document.body.removeChild(elem);\n}\n\nfunction makeHTML(data, asModule) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n const isModule = asModule !== undefined ? asModule : /\\b(import|async|await)\\b/.test(mainJS.content);\n const module = isModule\n ? ' type=\"module\"'\n : '';\n return `\n\n \n \n \n ${escapeTextForHTMLContent(data.name)}\n \n \n \n${mainHTML.content}\n \n <${'script'}${module}>\n${mainJS.content}\n \n\n`;\n}\n\nexport default class Export extends React.Component {\n constructor(props) {\n super(props);\n const mainJS = getOrFind(props.data.files, 'index.js', 'js', 'js', 'javascript');\n this.state = {\n asModule: /\\bimport\\b/.test(mainJS.content), // random guess\n }\n }\n onChange = (asModule) => {\n this.setState({asModule});\n }\n exportToCodepen = () => {\n openInCodepen(this.props.data);\n }\n exportToJSFiddle = () => {\n openInJSFiddle(this.props.data);\n }\n saveToFile = () => {\n const {data} = this.props;\n const {asModule} = this.state;\n const html = makeHTML(data, asModule);\n const blob = new Blob([html], {type: 'text/html'});\n const filename = `jsgist-${data.name}.html`;\n saveData(blob, filename);\n }\n render() {\n const {data} = this.props;\n const {asModule} = this.state;\n return (\n
\n \n \n

StackOverflow Snippet (copy the code below paste into S.O.)

\n
\n
this.onChange(true)}/>
\n
this.onChange(false)}/>
\n

S.O. does not support es6 modules yet so picking \"As Module\" puts the code in a <script> in the HTML area.

\n
\n
\n
{makeSnippet(data, asModule)}
\n
\n \n
\n
\n

HTML (copy the code below paste into a file)

\n
\n
this.onChange(true)}/>
\n
this.onChange(false)}/>
\n
\n
\n
{makeHTML(data, asModule)}
\n
\n \n \n
\n
\n
\n );\n }\n}","import React from 'react';\nimport {classNames} from '../libs/css-utils.js';\nimport * as gists from '../libs/gists.js';\nimport ServiceContext from '../ServiceContext.js';\n\nexport default class SaveAsGist extends React.Component {\n constructor () {\n super();\n this.state = {\n saving: false,\n secret: false,\n };\n }\n componentDidMount() {\n const {userManager} = this.context;\n userManager.subscribe(this.onPatChange);\n }\n componentWillUnmount() {\n const {userManager} = this.context;\n userManager.unsubscribe(this.onPatChange);\n }\n onPatChange = () => {\n this.forceUpdate();\n }\n toggleSecret = () => {\n this.setState({secret: !this.state.secret});\n }\n saveNew = async() => {\n const {github, addError} = this.context;\n const {secret} = this.state;\n this.setState({saving: true});\n const {data, onSave, onClose} = this.props;\n let success = false;\n try {\n const {id, name, date, public: _public} = await github.createGist(data, secret);\n gists.addGist(id, name, date, _public);\n onSave(id);\n success = true;\n } catch (e) {\n addError(`could not create gist: ${e}`)\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n saveOverExisting = async() => {\n const {github, addError} = this.context;\n this.setState({saving: true});\n const {data, gistId, onClose} = this.props;\n let success = false;\n try {\n const {id, name, date, public: _public} = await github.updateGist(gistId, data);\n gists.addGist(id, name, date, _public);\n success = true;\n } catch (e) {\n addError(`could not update gist: ${e}`)\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n forkAndSave = async() => {\n const {github, addError} = this.context;\n const {data, gistId, onSave, onClose} = this.props;\n const {secret} = this.state;\n this.setState({saving: true});\n let success = false;\n try {\n const {id: newId} = await github.forkGist(gistId, secret);\n const {id, name, date, public: _public} = await github.updateGist(newId, data);\n gists.addGist(id, name, date, _public);\n onSave(id);\n success = true\n } catch (e) {\n addError(`could not fork and update gist: ${e}`);\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n renderLogin() {\n const {userManager} = this.context;\n return (\n
\n Login with github\n
\n );\n }\n renderSave() {\n const {saving, secret} = this.state;\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n const {gistId, gistOwnerId} = this.props;\n const canUpdate = userData && gistId && userData.id === gistOwnerId;\n const canFork = userData && gistId && userData.id !== gistOwnerId;\n return (\n
\n
\n Save to New Gist\n Update Current Gist\n Fork and Save Gist\n
\n
\n
\n \n \n
Warning:\n
    \n
  • You can not change a gist from public to secret
  • \n
  • Secret gists are still publicly accessible they're just unlisted
  • \n
\n (see docs)\n
\n
\n
\n );\n }\n render() {\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return userData ? this.renderSave() : this.renderLogin();\n }\n}\n\nSaveAsGist.contextType = ServiceContext;","import React from 'react';\n\nexport default function SaveAsJSON(props) {\n const {data} = props;\n return (\n
\n
\n Copy the text below, paste into the load ui or put somewhere on the net\n and make your own URL with {window.location.origin}?src=url-to-json.\n
\n
{JSON.stringify(data)}
\n \n
\n );\n}","import React from 'react';\n\nimport {jsonToCompressedBase64} from '../libs/compression.js';\n\nexport default function SaveAsURL(props) {\n const {data} = props;\n const src = jsonToCompressedBase64(data);\n const url = `${window.location.origin}?src=${encodeURIComponent(src)}`;\n return url.length < 8000\n ? (\n
\n
Copy / bookmark the link below
\n {url}\n
\n )\n : (\n
\n Too large to save as URL\n
\n )\n ;\n}\n","import React from 'react';\nimport Dialog from './Dialog.js';\nimport Embed from './Embed.js';\nimport Export from './Export.js';\nimport SaveAsGist from './SaveAsGist.js';\nimport SaveAsJSON from './SaveAsJSON.js';\nimport SaveAsURL from './SaveAsURL.js';\nimport Section from './Section.js';\n\nexport default function Save(props) {\n const {data, gistId, gistOwnerId, onSave, onClose} = props;\n return (\n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n )\n}\n","import React from 'react';\n\nimport Dialog from './Dialog.js';\nimport Section from './Section.js';\nimport ServiceContext from '../ServiceContext.js';\n\nimport verticalIcon from '../icons/vertical-layout.svg';\nimport horizontalIcon from '../icons/horizontal-layout.svg';\nimport twoByTwoIcon from '../icons/two-by-two-layout.svg';\nimport tabbedIcon from '../icons/tabbed-layout.svg';\n\nimport {classNames} from '../libs/css-utils.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nfunction RadioOption(props) {\n const {children, onChange, selected} = props;\n return (\n
\n {children}\n
\n );\n}\n\nfunction Radio(props) {\n const {selected, onChange, children} = props;\n\n const newChildren = React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n const {result} = child.props;\n const isSelected = result === selected;\n\n //const id = childNdx;\n //childNdx += 1;\n return React.cloneElement(child, {\n //...child.props,\n selected: isSelected,\n onChange: () => onChange(result),\n });\n });\n\n return (\n
\n {newChildren}\n
\n );\n}\n\nfunction Checkbox(props) {\n const {id, label, checked, onChange} = props;\n const elemId = `checkbox-${id}`;\n return (\n
\n onChange(e.target.checked)}\n />\n \n
\n );\n}\n\nclass Logout extends React.Component {\n componentDidMount() {\n const {userManager} = this.context;\n userManager.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n const {userManager} = this.context;\n userManager.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n handleLogout = () => {\n const {userManager} = this.context;\n userManager.logout();\n }\n render() {\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return (!!userData &&\n
\n
Logged in as: \n {!!userData.login && }\n {!!userData.avatar_url && \"avatar\"/}\n
\n \n
\n );\n }\n}\n\nLogout.contextType = ServiceContext;\n\nexport default class Settings extends React.Component {\n //constructor(props) {\n // super(props);\n //}\n componentDidMount() {\n uiModel.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n handleLayoutChange = (v) => {\n uiModel.set('layout', v);\n }\n handleEditorChange = (v) => {\n uiModel.set('editor', v);\n }\n handleLineNumbersChange = (v) => {\n uiModel.set('lineNumbers', v);\n }\n handleTabsChange = (v) => {\n uiModel.set('tabs', v);\n }\n handleShowWhitespaceChange = (v) => {\n uiModel.set('showWhitespace', v);\n }\n render() {\n const {onClose} = this.props;\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return (\n \n { !!userData && }\n
\n
\n \n \"vertical\"/\n \"horizontal\"/\n \"2x2\"\n \"tabbed\"\n \n
\n
\n
\n
\n \n
Monaco
\n
CodeMirror
\n
\n \n \n \n
\n
\n
\n );\n }\n}\n\nSettings.contextType = ServiceContext;\n","import React from 'react';\n\nexport default function Toolbar(props) {\n const {\n toolbarFns,\n fullscreen,\n } = props;\n const {\n handleRun,\n handleStop,\n handleSave,\n handleNew,\n handleLoad,\n handleFullscreen,\n handleSettings,\n handleHelp,\n } = toolbarFns;\n return (\n
\n \n \n \n \n \n \n \n \n
\n );\n}","import SubscriptionManager from './SubscriptionManager.ts';\n\nconst kUserManagerKey = 'foobar'; // not important\n\nexport default class UserManager {\n constructor({\n oauthManager,\n github,\n addError,\n }) {\n this.oauthManager = oauthManager;\n this.github = github;\n this.subscriptionManager = new SubscriptionManager();\n this.addError = addError;\n oauthManager.subscribe(this._handleNewAuth);\n this._handleNewAuth();\n this.userData = undefined;\n }\n /*\n {\n \"login\": \"greggman\",\n \"id\": 234804,\n \"node_id\": \"MDQ6VXNlcjIzNDgwNA==\",\n \"avatar_url\": \"https://avatars2.githubusercontent.com/u/234804?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/greggman\",\n \"html_url\": \"https://github.com/greggman\",\n \"followers_url\": \"https://api.github.com/users/greggman/followers\",\n \"following_url\": \"https://api.github.com/users/greggman/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/greggman/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/greggman/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/greggman/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/greggman/orgs\",\n \"repos_url\": \"https://api.github.com/users/greggman/repos\",\n \"events_url\": \"https://api.github.com/users/greggman/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/greggman/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"Greggman\",\n \"company\": null,\n \"blog\": \"http://games.greggman.com\",\n \"location\": \"Earth\",\n \"email\": \"github@greggman.com\",\n \"hireable\": null,\n \"bio\": \"30 years of games\\r\\n5 years of Chrome\",\n \"twitter_username\": null,\n \"public_repos\": 283,\n \"public_gists\": 80,\n \"followers\": 1037,\n \"following\": 3,\n \"created_at\": \"2010-04-01T08:48:05Z\",\n \"updated_at\": \"2020-10-24T06:05:24Z\"\n }\n */\n getUserData() {\n return this.userData;\n }\n _handleNewAuth = async() => {\n this.userData = undefined;\n const pat = this.oauthManager.pat();\n this.github.setPat(pat);\n if (pat) {\n try {\n const data = await this.github.getAuthenticatedUser();\n this.userData = data;\n } catch (e) {\n this.addError(e);\n }\n }\n this.subscriptionManager.notify(kUserManagerKey);\n }\n login = () => {\n this.oauthManager.login();\n }\n logout = () => {\n this.oauthManager.logout();\n this.github.setPat()\n }\n subscribe(fn) {\n this.subscriptionManager.subscribe(kUserManagerKey, fn);\n }\n unsubscribe(fn) {\n this.subscriptionManager.unsubscribe(kUserManagerKey, fn);\n }\n cleanup() {\n this.oauthManager.unsubscribe(this._handleNewAuth);\n }\n}\n\n","import React from 'react';\n\nimport EditLine from './EditLine.js';\n// import Footer from './Footer.js';\nimport {storageManager} from '../globals.js';\nimport GitHub from '../libs/GitHub.js';\nimport Head from './Head.js';\nimport Help from './Help.js';\nimport IDE from './IDE.js';\nimport Load from './Load.js';\nimport {isGistId, loadGistFromSrc} from '../libs/loader.js';\nimport {LogManager} from './Log.js';\nimport * as model from '../libs/model.js';\nimport Save from './Save.js';\nimport ServiceContext from '../ServiceContext.js';\nimport Settings from './Settings.js';\nimport Toolbar from './Toolbar.js';\nimport * as uiModel from '../libs/ui-model.js';\nimport UserManager from '../libs/UserManager.js';\nimport * as winMsgMgr from '../libs/WindowMessageManager';\nimport query from '../libs/start-query.js';\n\nimport './App.css';\nimport { classNames } from '../libs/css-utils.js';\n\nconst noJSX = () => [];\nconst darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');\n\nclass App extends React.Component {\n constructor(props) {\n super();\n this.state = {\n path: window.location.pathname,\n dark: darkMatcher.matches,\n fullscreen: !!query.fullscreen,\n loading: false,\n dialog: noJSX,\n gistId: '',\n messages: [],\n userData: {},\n updateVersion: 0,\n };\n this.github = new GitHub();\n this.oauthManager = props.oauthManager;\n this.backupManager = props.backupManager;\n this.logManager = new LogManager();\n this.userManager = new UserManager({\n oauthManager: this.oauthManager,\n github: this.github,\n addError: this.addError,\n });\n this.toolbarFns = {\n handleRun: this.handleRun,\n handleStop: this.handleStop,\n handleSave: this.handleSave,\n handleNew: this.handleNew,\n handleLoad: this.handleLoad,\n handleSettings: this.handleSettings,\n handleFullscreen: this.handleFullscreen,\n handleHelp: this.handleHelp,\n };\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleUIChange);\n this.userManager.cleanup();\n }\n componentDidMount() {\n uiModel.subscribe(this.handleUIChange);\n winMsgMgr.on('newGist', null, this.handleNewGist);\n this.github.addEventListener('userdata', (e) => {\n this.setState({\n userData: e.data,\n });\n });\n model.add('path', window.location.pathname);\n model.subscribe('path', (newValue) => {\n window.history.pushState({}, '', newValue);\n this.setState({\n path: newValue,\n });\n });\n // I still am not sure how I'm supposed to handle this.\n // Putting my model in the state itself seems wrong\n // and doesn't actually help since I'd have to \n // generate an entirely new state object to change any\n // nested property.\n //\n // Storing the data outside I see no way to tell\n // components to re-render except to call forceUpdate\n // which all the documentation says \"if you call this\n // you're doing it wrong\".\n //\n // Redux is a joke. 50 lines code needed to set\n // a single field. Repeat those 50 lines for every field.\n // Things like redux-tools make it less to type those\n // 50 lines but they still execute 50 to 500 lines of code\n // just to set a single value.\n model.subscribe(model.filesVersionKey, _ => {\n this.forceUpdate();\n });\n // this is a hack because I can't figure out how to\n // update the CodeMirror areas\n model.subscribe('updateVersion', _ => {\n this.setState({updateVersion: this.state.updateVersion + 1});\n });\n\n darkMatcher.addEventListener('change', () => {\n this.setState({dark: darkMatcher.matches});\n });\n\n if (query.newGist) {\n window.history.pushState({}, '', `${window.location.origin}`);\n window.opener.postMessage({type: 'gimmeDaCodez'}, '*');\n return;\n }\n\n const backup = this.backupManager.getBackup();\n let loaded = false;\n if (backup) {\n try {\n const data = JSON.parse(backup);\n if (data.href === window.location.href) {\n model.setData(data.data);\n const url = new URL(data.href);\n const {src} = Object.fromEntries(new URLSearchParams(url.search).entries());\n if (isGistId(src)) {\n this.setState({gistId: src, gistOwnerId: data.gistOwnerId});\n }\n loaded = true;\n this.addInfo('loaded backup from local storage')\n }\n } catch (e) {\n console.log('bad backup')\n }\n this.backupManager.clearBackup();\n }\n if (!loaded) {\n if (query.src) {\n this.loadData(query.src);\n }\n }\n this.updateTitle();\n }\n componentDidUpdate() {\n this.updateTitle();\n }\n updateTitle() {\n const data = model.getData();\n document.title = data.name || 'jsGist';\n }\n async loadData(src) {\n this.setState({loading: true});\n let success = true;\n let firstTry = true;\n for (;;) {\n try {\n const {data, id, rawData} = await loadGistFromSrc(src, this.github);\n model.setData(data);\n if (id) {\n this.setState({\n gistId: src,\n gistOwnerId: rawData?.owner?.id,\n });\n }\n break;\n } catch (e) {\n if (firstTry) {\n this.userManager.logout();\n firstTry = false;\n } else {\n success = false;\n console.warn(e);\n this.addError(`could not load jsGist: src=${src} ${e}`);\n break;\n }\n }\n }\n this.setState({loading: false});\n if (success) {\n this.handleRun();\n }\n }\n handleUIChange = () => {\n this.forceUpdate();\n }\n handleNewGist = (data) => {\n let success = true;\n try {\n model.setData(data);\n this.backupManager.clearBackup();\n } catch (e) {\n success = false;\n console.warn(e);\n this.addError(`could create new jsGist: ${e}`);\n }\n if (success) {\n this.handleRun();\n }\n };\n addMsg = (msg, className) => {\n switch (className) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.log(msg);\n break;\n }\n this.setState({messages: [{msg: msg.toString(), className}, ...this.state.messages]});\n setTimeout(() => {\n this.setState({messages: this.state.messages.slice(0, this.state.messages.length - 1)});\n }, 5000);\n }\n addInfo = (msg) => this.addMsg(msg, 'info');\n addError = (msg) => this.addMsg(msg, 'error');\n closeDialog = () => {\n this.setState({dialog: noJSX});\n }\n registerRunnerAPI = (api) => {\n this.runnerAPI = api;\n this.handleStop();\n }\n handleNew = async() => {\n //this.backupManager.clearBackup();\n //window.location.href = window.location.origin; // causes a reload\n window.open('/?newGist=1', '_blank');\n }\n handleRun = async () => {\n this.backupManager.setBackup(JSON.stringify({\n href: window.location.href,\n data: model.getData(),\n gistOwnerId: this.state.gistOwnerId,\n }));\n this.logManager.clear();\n console.clear();\n this.runnerAPI.run(model.getData());\n }\n handleStop = async () => {\n this.runnerAPI.run(model.getBlankData(), true);\n }\n handleSave = async () => {\n this.setState({dialog: this.renderSave});\n }\n handleSettings = () => {\n this.setState({dialog: this.renderSettings});\n }\n handleFullscreen = () => {\n this.setState({fullscreen: !this.state.fullscreen});\n }\n handleHelp = () => {\n this.setState({dialog: this.renderHelp});\n }\n handleLoad = () => {\n this.setState({dialog: this.renderLoad});\n }\n handleOnLoad = async() => {\n this.setState({dialog: noJSX});\n this.handleRun();\n }\n handleOnSave = (gistId) => {\n window.history.pushState({}, '', `${window.location.origin}?src=${gistId}`);\n this.setState({\n gistId,\n gistOwnerId: this.userManager.getUserData().id,\n });\n }\n handleAbort = () => {\n this.abort();\n };\n renderHelp = () => {\n return ();\n }\n renderSettings = () => {\n return (\n \n );\n }\n renderLoad = () => {\n return (\n \n );\n }\n renderSave = () => {\n const data = model.getData();\n return (\n \n );\n }\n render() {\n const data = model.getData();\n const {\n loading,\n dialog,\n updateVersion: hackKey,\n userData,\n fullscreen,\n } = this.state;\n const editor = uiModel.get().editor;\n return (\n
\n \n
\n
\n
\n
\n model.setName(v)} />\n {!!userData.name && }\n {!!userData.avatarURL && \"avatar\"/}\n
\n
\n
\n \n \n
\n
\n {\n !loading &&\n
\n \n
\n }\n
\n {/*\n \n */}\n {dialog()}\n
\n {\n this.state.messages.map(({msg, className}, i) => (
{msg}
))\n }\n
\n
\n
\n );\n }\n}\n\nexport default App;\n","const backupKey = 'backup';\r\n\r\nexport default class BackupManager {\r\n #storageManager;\r\n\r\n constructor(storageManager) {\r\n this.#storageManager = storageManager;\r\n }\r\n getBackup() {\r\n return this.#storageManager.get(backupKey);\r\n }\r\n setBackup(data) {\r\n this.#storageManager.set(backupKey, data);\r\n }\r\n clearBackup() {\r\n this.#storageManager.delete(backupKey);\r\n }\r\n}","\nimport {clientId} from '../globals.js';\nimport {createURL} from './url.js';\nimport {createPopup} from './utils';\nimport StorageManager from './StorageManager';\nimport * as winMsgMgr from './WindowMessageManager';\n\nconst patKey = 'pat';\n\nconst getTokenURL = process.env.REACT_APP_OAUTH_HELPER_URL;\nif (!getTokenURL) {\n throw Error ('must set environment variable: OAUTH_HELPER_URL');\n}\n\nexport default class OAuthManager {\n private _popup?: Window;\n private _state?: string;\n private _storageManager: StorageManager;\n\n constructor(storageManager: StorageManager) {\n this._popup = undefined;\n this._state = undefined; // last state sent to auth\n this._storageManager = storageManager;\n winMsgMgr.on('auth', null, (data: any) => {\n this._closePopup();\n if (data.state === this._state) {\n this.requestToken(data);\n }\n });\n }\n // TODO: rename this and decide if Github should be connected\n pat() {\n return this._storageManager.get(patKey);\n }\n subscribe(fn: () => void) {\n this._storageManager.subscribe(patKey, fn);\n }\n unsubscribe(fn: () => void) {\n this._storageManager.unsubscribe(patKey, fn);\n }\n _closePopup() {\n if (this._popup) {\n this._popup.close();\n this._popup = undefined;\n }\n }\n requestToken = async (auth: any) => {\n try {\n const params = {\n client: clientId,\n code: auth.code,\n };\n const url = createURL(getTokenURL, params);\n const req = await fetch(url);\n const data = await req.json();\n if (!data.access_token) {\n throw new Error(JSON.stringify(data));\n }\n this._storageManager.set(patKey, data.access_token);\n } catch (e) {\n console.error(e);\n }\n }\n logout = () => {\n this._storageManager.delete(patKey);\n }\n login = () => {\n this._closePopup();\n this._state = `${Date.now()}-${Math.random()}`; // does this need to special? Seems like no\n const url = createURL('https://github.com/login/oauth/authorize', {\n client_id: clientId,\n scope: 'gist',\n state: this._state,\n });\n this._popup = createPopup(url);\n }\n}","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {storageManager} from './globals.js';\nimport './index.css';\nimport './scrollbars.js';\nimport App from './components/App';\nimport BackupManager from './components/BackupManager.js';\nimport OAuthManager from './libs/OAuthManager';\nimport * as serviceWorker from './serviceWorker';\n\nconst oauthManager = new OAuthManager(storageManager);\nconst backupManager = new BackupManager(storageManager);\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","module.exports = __webpack_public_path__ + \"static/media/vertical-layout.f248a432.svg\";","module.exports = __webpack_public_path__ + \"static/media/horizontal-layout.e3f3298b.svg\";","module.exports = __webpack_public_path__ + \"static/media/two-by-two-layout.23605ce8.svg\";","module.exports = __webpack_public_path__ + \"static/media/tabbed-layout.8a8b9bc8.svg\";"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.ba9b3771.chunk.js b/static/js/main.ba9b3771.chunk.js new file mode 100644 index 0000000..ca3519d --- /dev/null +++ b/static/js/main.ba9b3771.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpjsgist=this.webpackJsonpjsgist||[]).push([[0],{178:function(e,t,n){},179:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),i=n(76),o=n.n(i),s=n(3),c=n(5),l=n(16),u=function(){function e(){Object(s.a)(this,e),this.itemToSubscriptionMap=void 0,this.itemToSubscriptionMap=new Map}return Object(c.a)(e,[{key:"subscribe",value:function(e,t){this.unsubscribe(e,t);var n=this.itemToSubscriptionMap.get(e);n||(n=[],this.itemToSubscriptionMap.set(e,n)),n.push(t)}},{key:"unsubscribe",value:function(e,t){var n=this.itemToSubscriptionMap.get(e);if(n){var a=n.indexOf(t);a>=0&&(n.splice(a,1),0===n.length&&this.itemToSubscriptionMap.delete(e))}}},{key:"notify",value:function(e){var t=this.itemToSubscriptionMap.get(e);if(t){var n,a=Object(l.a)(t.slice());try{for(a.s();!(n=a.n()).done;){(0,n.value)()}}catch(r){a.e(r)}finally{a.f()}}}}]),e}();var d=new(function(){function e(t){var n=this;Object(s.a)(this,e),this.prefix=void 0,this.subscriptionManager=void 0,this._handleNewValue=function(e){var t=e.key;if(t&&t.startsWith(n.prefix)){var a=t.substr(n.prefix.length);n.subscriptionManager.notify(a)}},this.prefix="".concat(t,"-"),this.subscriptionManager=new u,window.addEventListener("storage",this._handleNewValue)}return Object(c.a)(e,[{key:"_addPrefix",value:function(e){return"".concat(this.prefix).concat(e)}},{key:"subscribe",value:function(e,t){this.subscriptionManager.subscribe(e,t)}},{key:"unsubscribe",value:function(e,t){this.subscriptionManager.unsubscribe(e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._addPrefix(e);if(t){var a=sessionStorage.getItem(n);if(a)return a}return localStorage.getItem(n)}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this._addPrefix(e);n&&sessionStorage.setItem(a,t),localStorage.setItem(a,t),this.subscriptionManager.notify(e)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._addPrefix(e);t&&sessionStorage.removeItem(n),localStorage.removeItem(n),this.subscriptionManager.notify(e)}},{key:"cleanup",value:function(){window.removeEventListener("storage",this._handleNewValue)}}]),e}())("jsgist"),h=(n(94),n(95),document.createElement("div"));h.setAttribute("style","width:30px;height:30px;"),h.classList.add("scrollbar-test");var m=document.createElement("div");m.setAttribute("style","width:100%;height:40px"),h.appendChild(m),document.body.appendChild(h),30-h.firstChild.clientWidth&&document.body.classList.add("layout-scrollbar-obtrusive"),document.body.removeChild(h);var p=n(1),f=n.n(p),g=n(8),v=n(42),b=n(6),y=n(7);function E(e){return r.a.createElement("input",{type:"text",onChange:function(t){e.onChange(t.target.value)},placeholder:e.placeholder,value:e.value})}var w=n(20),k=n(4),S=n(9),j=n(53),O="/*bug-in-github-api-content-can-not-be-empty*/";function x(e){return e.content.startsWith(O)?e.content.substr(O.length):e.content}function C(e){var t=JSON.parse(e.files["jsGist.json"].content);return t.filenames?t.files=t.filenames.map((function(t){return{name:t,content:x(e.files[t])}})):t.files=Object.entries(e.files).filter((function(e){return"jsGist.json"!==Object(S.a)(e,1)[0]})).map((function(e){var t=Object(S.a)(e,2);return{name:t[0],content:x(t[1])}})).concat(t.files||[]),t}function M(e,t,n){var a=e.files.reduce((function(e,t){return e[t.name]={content:t.content.trim()?t.content:"".concat(O).concat(t.content)},e}),{}),r=Object(k.a)({},e),i={};if(a["jsGist.json"]=i,Object.keys(a).length===e.files.length+1?(delete r.files,r.filenames=e.files.map((function(e){return e.name}))):a={"jsGist.json":i},i.content=JSON.stringify(r),n){var o=Object.keys(a).map((function(e){return e.toLowerCase()}));if(!(o.includes("readme.md")||o.includes("readme.txt")||o.includes("readme"))){var s="## ".concat(e.name,"\n\n[view on jsgist](").concat(window.location.origin,"?src=").concat(n,")");a["README.md"]={content:s}}for(var c=0,l=Object.entries(a);c1&&void 0!==i[1]&&i[1],a=M(t,n),e.next=4,this.authorizedOctokit.gists.create(a);case 4:return r=e.sent,this._updateUserData(r.data),e.next=8,this.updateGist(r.data.id,t);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t,n){var a,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=M(n,!1,t),e.next=3,this.authorizedOctokit.gists.update(a);case 3:return r=e.sent,e.abrupt("return",{id:r.data.id,name:r.data.description,date:r.data.updated_at,public:r.data.public});case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"forkGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.fork({gist_id:t});case 2:return n=e.sent,e.abrupt("return",{id:n.data.id});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteGist",value:function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.delete({gist_id:t});case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createGistComment",value:function(){var e=Object(g.a)(f.a.mark((function e(t,n){var a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.authorizedOctokit.gists.createComment({gist_id:t,body:n});case 2:if(!((a=e.sent).status<200||a.status>=300)){e.next=5;break}throw new Error(a.message);case 5:return e.abrupt("return",a.data);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"octokit",get:function(){return this.authorizedOctokit||this.unAuthorizedOctokit}}]),n}(Object(w.a)(EventTarget));function N(){return r.a.createElement("div",{className:"head"},r.a.createElement("div",null,r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:window.location.origin},r.a.createElement("img",{src:"/resources/images/logo-small.svg",alt:"logo"}),window.location.hostname)),r.a.createElement("div",{className:"fix-help-contribute"},r.a.createElement("div",{className:"octocat"},r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/greggman/jsgist/"},r.a.createElement("img",{alt:"github",src:"/resources/images/octocat-icon.svg"})))))}var L=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;i--"),"."),r.a.createElement("p",null,"Example: ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/?src=f793cb359f2571409983351a6099d5d1"},"https://jsgist.org/?src=f793cb359f2571409983351a6099d5d1"))),r.a.createElement("li",null,"Save it manually somewhere else.",r.a.createElement("p",null,"If there's some other service that will provide a string via http get then copy and save the JSON there then create a URL in the form of ",r.a.createElement("code",null,"https://jsgist.org/?src="),". Note: you may have to escape the URL.")),r.a.createElement("li",null,"Save it as a bookmark or link",r.a.createElement("p",null,"In the SaveAs dialog there's a link that contains all the data for your benchmark.")))))}var U=n(15),T=n.n(U),_=n(14),A=n.n(_),D=n(18),P=/([a-z])([A-Z])/g,R=function(e,t,n){return"".concat(t,"-").concat(n)},G=function(e){return e.replace(P,R).toLowerCase()};function K(){for(var e=[],t=arguments.length,n=new Array(t),a=0;a=0?e.substr(t+1):e}(t.url||""),":",t.lineNo)))}))))}}]),n}(r.a.Component);function W(e,t){for(var n=new URL(e),a=new URLSearchParams(n.search),r=0,i=Object.entries(t);r=0&&r.splice(i,1),0===r.length&&(a.delete(e),0===a.size&&t&&q.delete(t))}}}function $(e,t,n){var a=e.get(t);if(a){var r,i=Object(l.a)(a);try{for(i.s();!(r=i.n()).done;){(0,r.value)(n)}}catch(o){i.e(o)}finally{i.f()}return!0}return!1}window.addEventListener("message",(function(e){var t=e.data,n=t.type,a=t.data,r=q.get(e.source);r&&$(r,n,a)||$(H,n,a)}));var X=["accelerometer","bluetooth","camera","encrypted-media","display-capture","geolocation","gyroscope","microphone","midi","clipboard-read","clipboard-write","serial","xr-spatial-tracking"].map((function(e){return"".concat(e," *")})).join("; "),Z=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).handleJSLog=function(e){a.context.logManager.addMsg(e)},a.handleJSError=function(e){a.context.logManager.addMsg(Object(k.a)(Object(k.a)({},e),{},{type:"error",showStack:!0}))},a.handleJSUnhandledRejection=function(e){a.context.logManager.addMsg(Object(k.a)(Object(k.a)({},e),{},{type:"error",showStack:!0}))},a.handleInfoMessages=function(e){a.context.logManager.addMsgs(e)},a.handleGimmeDaCodez=function(){a.iframe.contentWindow.postMessage({type:"run",data:a.data},"*")},a.handleMessage=function(e){var t=e.data,n=t.type,r=t.data,i=a.handlers[n];i&&i(r)},a.runnerRef=r.a.createRef(),a}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.registerAPI,n=Object.fromEntries(new URLSearchParams(window.location.search).entries()).debug,a=Object(k.a)({},n&&{debug:n});t({run:function(t,n){e.data=t,e.removeIFrame();var r=document.createElement("iframe");r.allow=X,e.iframe=r,r.src=W("https://jsgistrunner.devcomments.org/runner-03.html",Object(k.a)({url:"https://jsgist.org/jsgist-runner.js"},a)),n&&(r.style.background="none"),e.runnerRef.current.appendChild(r)}}),B("gimmeDaCodez",null,this.handleGimmeDaCodez),B("jsLog",null,this.handleJSLog),B("jsError",null,this.handleJSError),B("jsUnhandledRejection",null,this.handleJSUnhandledRejection),B("infoMessages",null,this.handleInfoMessages)}},{key:"removeIFrame",value:function(){this.iframe&&(this.iframe.remove(),this.iframe.src="about:blank",this.iframe=void 0)}},{key:"componentWillUnmount",value:function(){this.removeIFrame(),Y("gimmeDaCodez",null,this.handleGimmeDaCodez),Y("jsLog",null,this.handleJSLog),Y("jsError",null,this.handleJSError),Y("jsUnhandledRejection",null,this.handleJSUnhandledRejection),Y("infoMessages",null,this.handleInfoMessages)}},{key:"render",value:function(){return r.a.createElement("div",{className:"runner",ref:this.runnerRef})}}]),n}(r.a.Component);Z.contextType=F;var Q=n(79),ee=(new T.a).compile(Q),te={};function ne(e){var t=te[e]||{subscriptions:new Set};return te[e]=t,t}function ae(e,t){var n=ne(e);return void 0!==t&&(n.value=t),n}function re(e){return te[e].value}function ie(e,t){var n=te[e];if(!n)throw new Error("no such track value: ".concat(e));n.value=t;var a,r=Object(v.a)(n.subscriptions.keys()),i=Object(l.a)(r);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t,e)}}catch(o){i.e(o)}finally{i.f()}}function oe(e,t){ne(e).subscriptions.add(t)}function se(e,t){ne(e).subscriptions.delete(t)}var ce,le={name:"My jsGist",settings:{},files:[{name:"index.html",content:""},{name:"index.css",content:""},{name:"index.js",content:""}]};function ue(){var e="".concat(window.location.origin,"/resources/images/logo.svg");return JSON.parse(JSON.stringify({name:"jsGist",settings:{},files:[{name:"index.html",content:""},{name:"index.css",content:"\n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n background-image: url(".concat(e,");\n background-size: contain contain;\n background-position: center center;\n background-repeat: no-repeat no-repeat;\n }\n @media (prefers-color-scheme: dark) {\n html {\n background: #222;\n }\n }\n ")},{name:"index.js",content:""}]}))}function de(){return ce}ae("dataVersion",0),ae("updateVersion",0),ae("filesVersion",0);var he=function(e){return ie(e,re(e)+1)},me=function(e){return he("dataVersion")},pe=function(e){return he("filesVersion")};function fe(e,t){ce.files[e].name=t,me()}function ge(e,t){ce.files[e].content=t,me()}function ve(e){!function(e){if(!ee(e))throw new Error("data not valid:\n".concat(ee.errors.map((function(e){return"".concat(e.message,": ").concat(e.dataPath)}))))}(e),ce=e,he("updateVersion"),me(),pe()}ve(JSON.parse(JSON.stringify(le)));var be,ye=Object.fromEntries(new URLSearchParams(window.location.search).entries()),Ee=!ye.codeMirror&&!/webOS|iPhone|iPad|Android/.test(navigator.userAgent),we=!1,ke={layout:window.screen.width<540||window.screen.height<540?3:0,editor:Ee?"monaco":"codemirror",lineNumbers:!0,tabs:!1,showWhitespace:!1};function Se(e,t){be[e]=t;var n=JSON.stringify(be);d.set("ui-settings",n,!0),ie("settings",be)}function je(){return function(){if(!we){we=!0;try{if(!(be=JSON.parse(d.get("ui-settings",!0))))throw new Error("no settings")}catch(i){be=Object(k.a)({},ke)}for(var e=0,t=Object.entries(ke);e=0&&(u.matchTags=!0),r.a.createElement(Le.Controlled,{value:c,options:u,onBeforeChange:function(t,n,a){e.setState({value:a})},onChange:function(e,t,n){o(n)},editorDidMount:this.registerEditor})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.hackKey!==e.hackKey?{hackKey:e.hackKey,value:e.value}:null}}]),n}(r.a.Component),_e=n(88);function Ae(e,t){var n,a=Object(l.a)(t);try{var r=function(){var t=n.value,a=e.findIndex((function(e){return e.name.toLowerCase().endsWith(t.toLowerCase())}));if(a>=0)return{v:a}};for(a.s();!(n=a.n()).done;){var i=r();if("object"===typeof i)return i.v}}catch(o){a.e(o)}finally{a.f()}return-1}function De(e,t){var n=e.findIndex((function(e){return e.name.toLowerCase()===t.toLowerCase}));if(n>=0)return n;for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i1?t-1:0),a=1;a=0?e[r]:""}var Re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return Object.entries(e).map((function(e){var t=Object(S.a)(e,2),n=t[0],a=t[1];return"".concat(n,"=").concat(a)})).join(t)};var Ge=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):{},Ke=function(){};function Fe(e){return Je.apply(this,arguments)}function Je(){return(Je=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return n=e.sent,e.next=5,n.text();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ve,We=(Ve=function(){var e=Object(g.a)(f.a.mark((function e(t){var n;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Fe("/types/webgpu/dist/index.d.ts");case 3:n=e.sent,t.languages.typescript.javascriptDefaults.addExtraLib(n,"");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(){var e=!1;e||(e=!0,Ve.apply(void 0,arguments))});var He=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(s.a)(this,n),(a=t.call(this,e)).handleEditorDidMount=function(e,t){a.editor=e,We(t),e.getModel().updateOptions({tabSize:2});var n=a.props.registerAPI;n&&n({goToLine:function(e,t){a.editor.focus(),a.editor.setPosition({lineNumber:e,column:t}),a.editor.revealPosition({lineNumber:e,column:t})},refresh:function(e){},focus:function(e){a.editor.focus()}})},a.registerEditor=function(e){a.editor=e};var r=e.value,i=e.hackKey;return a.state={value:r,hackKey:i},a}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=void 0===t?{}:t,a=e.onValueChange,i=void 0===a?Ke:a,o=e.ui,s=this.state.value,c=Ge.matches,l=function(e){var t=((null===e||void 0===e?void 0:e.mode)||"javascript").split("/").pop();return"gfm"===t?"markdown":t}(n.editor).split("/").pop();return r.a.createElement(_e.a,{theme:c?"vs-dark":"light",language:l,value:s,onChange:i,onMount:this.handleEditorDidMount,options:{minimap:{enabled:!1},lineNumbers:o.lineNumbers?"on":"off",glyphMargin:!1,folding:!1,insertSpaces:!o.tabs,renderWhitespace:o.showWhitespace}})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.hackKey!==e.hackKey?{hackKey:e.hackKey,value:e.value}:null}}]),n}(r.a.Component),qe=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;i=0&&(t[0]=e[0]),a.state.showResult&&(t[1]=e[1]),a.state.showLow&&(t[2]=e[2]),a.setState({sizes:e,lastSizes:t}),Se("layoutTabbed",a.state)},a.handleGoToLine=function(e){a.files.forEach((function(t,n){if(t.goToLine(e)){var r=a.props.data.files.findIndex((function(t){return t.name===e.section}));r!==a.state.currentNdx&&a.handleOnChange(r)}}))},a.handleOnChange=function(e){var t=a.state.currentNdx===e?-1:e;a.setState({currentNdx:t,sizes:ot(a.state.sizes,a.state.lastSizes,0,t>=0)}),Se("layoutTabbed",a.state)},a.toggleShowLog=function(){var e=!a.state.showLog;a.setState({showLog:e,sizes:ot(a.state.sizes,a.state.lastSizes,2,e)}),Se("layoutTabbed",a.state)},a.toggleShowResult=function(){var e=!a.state.showResult;a.setState({showResult:e,sizes:ot(a.state.sizes,a.state.lastSizes,1,e)}),Se("layoutTabbed",a.state)};var r=je().layoutTabbed;return a.state=it(r)?r:{showResult:!0,showLog:!0,currentNdx:2,sizes:[.45,.45,.1],lastSizes:[.45,.45,.1]},a.files=new Map,a.fileToKeyMap=new Map,a}return Object(c.a)(n,[{key:"getFileKey",value:function(e){var t=this.fileToKeyMap.get(e);return t||(t="".concat(Date.now(),"-").concat(Math.random()),this.fileToKeyMap.set(e,t)),t}},{key:"componentDidUpdate",value:function(){this.previousNdx!==this.state.currentNdx&&(this.previousNdx=this.state.currentNdx,this.files.forEach((function(e){e.refresh(),e.focus()})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.hackKey,a=t.data,i=t.registerRunnerAPI,o=this.state,s=o.showResult,c=o.showLog,l=o.sizes,u=o.currentNdx,d=Object(k.a)({},!s&&{display:"none"}),h=Object(k.a)({},!c&&{display:"none"});return r.a.createElement("div",{className:"layout-tabbed"},r.a.createElement("div",{className:"layout-tabbed-top"},r.a.createElement("div",{className:"tab-tabs"},a.files.map((function(t,n){var a="ca".concat(e.getFileKey(t));return r.a.createElement(r.a.Fragment,{key:a},r.a.createElement("input",{type:"radio",name:"tabbed-files",id:a,checked:n===u,onClick:function(t){return e.handleOnChange(n)},onChange:function(e){return e}}),r.a.createElement("label",{htmlFor:a},t.name))})),r.a.createElement("input",{type:"checkbox",checked:s,onChange:this.toggleShowResult,id:"result"}),r.a.createElement("label",{htmlFor:"result"},"result"),r.a.createElement("input",{type:"checkbox",checked:c,onChange:this.toggleShowLog,id:"log"}),r.a.createElement("label",{htmlFor:"log"},"log"))),r.a.createElement(A.a,{direction:"vertical",minSize:0,sizes:l,onSetSizes:this.setSizes},r.a.createElement("div",{className:"tab-content"},a.files.map((function(t,a){var i="ca".concat(e.getFileKey(t));return r.a.createElement("div",{key:i,style:Object(k.a)({},a!==u&&{display:"none"})},r.a.createElement(Ye,{hackKey:n,desc:"filename",title:t.name,value:t.content,onTitleChange:function(e){return fe(a,e)},onValueChange:function(e){return ge(a,e)},register:e.handleRegister,unregister:e.handleUnregister}))}))),r.a.createElement("div",{className:"layout-tabbed-result",style:d},r.a.createElement(Z,{registerAPI:i})),r.a.createElement("div",{className:"layout-tabbed-log",style:h},r.a.createElement(V,{onGoToLine:this.handleGoToLine}))))}}]),n}(r.a.Component)],ct=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){var e;Object(s.a)(this,n);for(var a=arguments.length,r=new Array(a),i=0;it.name.toLowerCase()?1:0};case"date":return function(e,t){return e.datet.date?1:0};case"public":return function(e,t){var n=e.public?1:0,a=t.public?1:0;return Math.sign(n-a)};case"check":return function(e,n){var a=t.has(e.id)?1:0,r=t.has(n.id)?1:0;return Math.sign(a-r)};default:throw new Error("unknown sortKey")}}(n,t);return e.slice().sort((function(e,t){return i(t,e)*r}))}function wt(e){var t=new lt.a({fields:["name"]});return t.addAll(Object.entries(e).map((function(e){var t=Object(S.a)(e,2);return{id:t[0],name:t[1].name}}))),t}function kt(e){var t=e.sortDir,n=e.selected,a=e.update;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{onClick:function(){return a(n?"up"===t?"down":"up":t)},className:n?"current-sort-key":""},"up"===t?"\u25b2":"\u25bc"))}function St(e){for(var t,n=0,a=Object.values(e);nt)&&(t=i)}return t}ae("gists",ft()),d.subscribe("gists",(function(){ie("gists",ft())}));var jt=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(s.a)(this,n),(a=t.call(this,e)).handleNewGists=function(e){a.setState({gists:e,index:wt(e)})},a.toggleCheck=function(e){var t=new Set(a.state.checks);t.has(e)?t.delete(e):t.add(e),a.setState({checks:t})},a.onUserStatusChange=function(){a.forceUpdate(),a.context.userManager.getUserData()&&a.loadGists()},a.updateSort=function(e,t){a.setState({sortDir:t,sortKey:e,newFilter:!1})},a.handleKeyDown=function(e){a.setState({shift:e.shiftKey})},a.handleKeyUp=function(e){a.setState({shift:e.shiftKey})},a.loadGists=Object(g.a)(f.a.mark((function e(){var t,n,r,i,o,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.context,n=t.addError,r=t.github,a.setState({loading:!0}),e.prev=2,i=a.state.shift?{}:a.state.gists,o=St(i),e.next=7,r.getUserGists(o);case 7:s=e.sent,yt(s.reduce((function(e,t){return e[t.id]={name:t.description,date:t.updated_at,public:t.public},e}),Object(k.a)({},i))),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n("could not load gists: ".concat(e.t0));case 15:a.setState({loading:!1});case 16:case"end":return e.stop()}}),e,null,[[2,12]])}))),a.deleteSelected=Object(g.a)(f.a.mark((function e(){var t,n,r,i,o,s,c,l,u,d;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a.state,n=t.checks,r=t.gists,i=[],n.forEach((function(e,t){r[e]&&i.push(e)})),o=a.context,s=o.addError,c=o.github,a.setState({loading:!0}),l=0,u=i;case 6:if(!(l=0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement(E,{className:"foobar",placeholder:"search:",value:c,onChange:function(t){e.setState({filter:t,newFilter:""!==t.trim()})}})),r.a.createElement("div",{className:"gists"},r.a.createElement("table",null,r.a.createElement("thead",null,r.a.createElement("tr",null,r.a.createElement("th",null,r.a.createElement(kt,{selected:"check"===p,sortDir:u,update:function(t){return e.updateSort("check",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"name"===p,sortDir:u,update:function(t){return e.updateSort("name",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"date"===p,sortDir:u,update:function(t){return e.updateSort("date",t)}})),r.a.createElement("th",null,r.a.createElement(kt,{selected:"public"===p,sortDir:u,update:function(t){return e.updateSort("public",t)}})))),r.a.createElement("tbody",null,g.map((function(t,n){return r.a.createElement("tr",{key:"g".concat(n)},r.a.createElement("td",null,r.a.createElement("input",{type:"checkbox",id:"gc".concat(n),checked:i.has(t.id),onChange:function(){return e.toggleCheck(t.id)}}),r.a.createElement("label",{htmlFor:"gc".concat(n)})),r.a.createElement("td",null,r.a.createElement("a",{onClick:e.clearBackup,href:"".concat(window.location.origin,"?src=").concat(encodeURIComponent(t.id))},t.name)),r.a.createElement("td",null,t.date.substring(0,10)),r.a.createElement("td",null,t.public?"":"\ud83d\udd12"))}))))),r.a.createElement("div",null,r.a.createElement("button",{onClick:this.deleteSelected},"Delete Selected Gists"))))}},{key:"render",value:function(){return this.context.userManager.getUserData()?this.renderLoad():this.renderLogin()}}]),n}(r.a.Component);function Ot(e){var t=Object(a.useState)(""),n=Object(S.a)(t,2),i=n[0],o=n[1],s=Object(a.useContext)(F).addError;return r.a.createElement("div",null,r.a.createElement("div",{style:{height:"100px"}},r.a.createElement(qe,{value:i,onValueChange:o})),r.a.createElement("p",null,r.a.createElement("button",{onClick:function(){var t=e.onLoad;try{ve(JSON.parse(i)),t()}catch(n){s("bad json: ".concat(n))}}},"Load JSON")))}function xt(e){var t=Object(a.useState)(""),n=Object(S.a)(t,2),i=n[0],o=n[1],s=Object(a.useContext)(F).addError;function c(){return(c=Object(g.a)(f.a.mark((function t(){var n,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.onLoad,t.prev=1,t.next=4,fetch(i);case 4:return a=t.sent,t.next=7,a.json();case 7:ve(t.sent),n(),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),s("could not load url: ".concat(t.t0));case 15:case"end":return t.stop()}}),t,null,[[1,12]])})))).apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(E,{value:i,onChange:o,placeholder:"url-to-json"}),r.a.createElement("p",null,r.a.createElement("button",{onClick:function(){return c.apply(this,arguments)}},"Load URL")))}function Ct(e){var t=e.heading,n=e.children;return r.a.createElement("div",{className:"section"},r.a.createElement("div",{className:"section-heading"},t),r.a.createElement("div",{className:"section-content"},n))}function Mt(e){var t=e.data,n=e.onLoad,a=e.onClose;return r.a.createElement(L,{title:"Load",className:"fixed-size-dialog",onClose:a},r.a.createElement(Ct,{heading:"Load Gist"},r.a.createElement(jt,{data:t,onLoad:n})),r.a.createElement(Ct,{heading:"Load URL"},r.a.createElement(xt,{data:t,onLoad:n})),r.a.createElement(Ct,{heading:"Load JSON"},r.a.createElement(Ot,{data:t,onLoad:n})))}jt.contextType=F;var zt=n(52),Nt=n(54),Lt=new TextEncoder,It=new TextDecoder,Ut=function(e){return e.startsWith("cb64,")||e.startsWith("b64,")};function Tt(e){var t=e.startsWith("cb64,"),n=t?"cb64,":"b64,",a=e.substr(n.length).replace(/-/g,"+").replace(/_/g,"/"),r=new Uint8Array(Object(zt.a)(a)),i=t?Object(Nt.b)(r):r,o=It.decode(i);return JSON.parse(o)}var _t=/^[a-z0-9]+$/i,At=function(e){return _t.test(e)};function Dt(e,t){return Pt.apply(this,arguments)}function Pt(){return(Pt=Object(g.a)(f.a.mark((function e(t,n){var a,r,i,o,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!At(t)){e.next=9;break}return e.next=3,n.getGist(t);case 3:return a=e.sent,r=a.data,i=a.rawData,e.abrupt("return",{data:r,id:t,rawData:i});case 9:if(!Ut(t)){e.next=13;break}return e.abrupt("return",{data:Tt(t)});case 13:return e.next=15,fetch(t);case 15:return o=e.sent,e.next=18,o.json();case 18:return s=e.sent,e.abrupt("return",{data:s});case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rt(e){var t=e.gistId,n=t||"f793cb359f2571409983351a6099d5d1";return r.a.createElement("div",null,r.a.createElement("div",{className:"markdown"},r.a.createElement("p",null,"You can embed a jsGist by creating an iframe pointing to"," ",r.a.createElement("code",null,"https://jsgist.org/embed.html?src=")," "," where"," ",r.a.createElement("code",null,"")," "," is one of the forms above. Either"," ",r.a.createElement("code",null,"?src=")," ","or"," ",r.a.createElement("code",null,"?src=")," ","or"," ",r.a.createElement("code",null,"?src=")," ",". You can also add "," ",r.a.createElement("code",null,"noheader=true")," "," if you don't want the header to appear. You can also just run them directly rather than put in an iframe. ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/embed.html?src=".concat(n)},"[example]")," ",r.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://jsgist.org/embed.html?src=".concat(n,"&noheader=true")},"[example no header]")),!!t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"For example to embed the current gist:"),r.a.createElement("pre",null,r.a.createElement("code",{style:{userSelect:"all"}},''))),r.a.createElement("p",null)))}var Gt=function(){var e=document.createElement("a");return e.style.display="none",document.body.appendChild(e),function(t,n){var a=window.URL.createObjectURL(t);e.href=a,e.download=n,e.click()}}();function Kt(e){return e.split("\n").map((function(e){return" ".concat(e)})).join("\n")}function Ft(e,t){var n=e.files,a=Pe(n,"index.html","html"),r=Pe(n,"index.js","js","js","javascript"),i=Pe(n,"index.css","css");return t?"\n\x3c!-- begin snippet: js hide: false console: true babel: false --\x3e\n\n\x3c!-- language: lang-js --\x3e\n\n\x3c!-- language: lang-css --\x3e\n\n".concat(Kt(i.content),"\n\n\x3c!-- language: lang-html --\x3e\n\n").concat(Kt(a.content),'\n \n\n\n`\n : `\n\n\n\n\n${indent4(mainJS.content)}\n\n\n\n${indent4(mainCSS.content)}\n\n\n\n${indent4(mainHTML.content)}\n\n\n`;\n\n}\n\nfunction openInCodepen(data) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n\n const pen = {\n title : data.name,\n description : data.name,\n editors : '101',\n html : mainHTML.content,\n css : mainCSS.content,\n js : mainJS.content,\n };\n\n const elem = document.createElement('div');\n elem.innerHTML = `\n
'\n \n \n \"
\"\n `;\n elem.querySelector('input[name=data]').value = JSON.stringify(pen);\n document.body.appendChild(elem);\n elem.querySelector('form').submit();\n document.body.removeChild(elem);\n}\n\nfunction openInJSFiddle(data) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n\n const elem = document.createElement('div');\n elem.innerHTML = `\n
\n \n \n \n \n \n \n
\n `;\n elem.querySelector('input[name=html]').value = mainHTML.content;\n elem.querySelector('input[name=css]').value = mainCSS.content;\n elem.querySelector('input[name=js]').value = mainJS.content;\n elem.querySelector('input[name=title]').value = data.name;\n document.body.appendChild(elem);\n elem.querySelector('form').submit();\n document.body.removeChild(elem);\n}\n\nfunction makeHTML(data, asModule) {\n const files = data.files;\n const mainHTML = getOrFind(files, 'index.html', 'html');\n const mainJS = getOrFind(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSS = getOrFind(files, 'index.css', 'css');\n const isModule = asModule !== undefined ? asModule : /\\b(import|async|await)\\b/.test(mainJS.content);\n const module = isModule\n ? ' type=\"module\"'\n : '';\n return `\n\n \n \n \n ${escapeTextForHTMLContent(data.name)}\n \n \n \n${mainHTML.content}\n \n <${'script'}${module}>\n${mainJS.content}\n \n\n`;\n}\n\nexport default class Export extends React.Component {\n constructor(props) {\n super(props);\n const mainJS = getOrFind(props.data.files, 'index.js', 'js', 'js', 'javascript');\n this.state = {\n asModule: /\\bimport\\b/.test(mainJS.content), // random guess\n }\n }\n onChange = (asModule) => {\n this.setState({asModule});\n }\n exportToCodepen = () => {\n openInCodepen(this.props.data);\n }\n exportToJSFiddle = () => {\n openInJSFiddle(this.props.data);\n }\n saveToFile = () => {\n const {data} = this.props;\n const {asModule} = this.state;\n const html = makeHTML(data, asModule);\n const blob = new Blob([html], {type: 'text/html'});\n const filename = `jsgist-${data.name}.html`;\n saveData(blob, filename);\n }\n render() {\n const {data} = this.props;\n const {asModule} = this.state;\n return (\n
\n \n \n

StackOverflow Snippet (copy the code below paste into S.O.)

\n
\n
this.onChange(true)}/>
\n
this.onChange(false)}/>
\n

S.O. does not support es6 modules yet so picking \"As Module\" puts the code in a <script> in the HTML area.

\n
\n
\n
{makeSnippet(data, asModule)}
\n
\n \n
\n
\n

HTML (copy the code below paste into a file)

\n
\n
this.onChange(true)}/>
\n
this.onChange(false)}/>
\n
\n
\n
{makeHTML(data, asModule)}
\n
\n \n \n
\n
\n
\n );\n }\n}","import React from 'react';\nimport {classNames} from '../libs/css-utils.js';\nimport * as gists from '../libs/gists.js';\nimport ServiceContext from '../ServiceContext.js';\n\nexport default class SaveAsGist extends React.Component {\n constructor () {\n super();\n this.state = {\n saving: false,\n secret: false,\n };\n }\n componentDidMount() {\n const {userManager} = this.context;\n userManager.subscribe(this.onPatChange);\n }\n componentWillUnmount() {\n const {userManager} = this.context;\n userManager.unsubscribe(this.onPatChange);\n }\n onPatChange = () => {\n this.forceUpdate();\n }\n toggleSecret = () => {\n this.setState({secret: !this.state.secret});\n }\n saveNew = async() => {\n const {github, addError} = this.context;\n const {secret} = this.state;\n this.setState({saving: true});\n const {data, onSave, onClose} = this.props;\n let success = false;\n try {\n const {id, name, date, public: _public} = await github.createGist(data, secret);\n gists.addGist(id, name, date, _public);\n onSave(id);\n success = true;\n } catch (e) {\n addError(`could not create gist: ${e}`)\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n saveOverExisting = async() => {\n const {github, addError} = this.context;\n this.setState({saving: true});\n const {data, gistId, onClose} = this.props;\n let success = false;\n try {\n const {id, name, date, public: _public} = await github.updateGist(gistId, data);\n gists.addGist(id, name, date, _public);\n success = true;\n } catch (e) {\n addError(`could not update gist: ${e}`)\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n forkAndSave = async() => {\n const {github, addError} = this.context;\n const {data, gistId, onSave, onClose} = this.props;\n const {secret} = this.state;\n this.setState({saving: true});\n let success = false;\n try {\n const {id: newId} = await github.forkGist(gistId, secret);\n const {id, name, date, public: _public} = await github.updateGist(newId, data);\n gists.addGist(id, name, date, _public);\n onSave(id);\n success = true\n } catch (e) {\n addError(`could not fork and update gist: ${e}`);\n }\n this.setState({saving: false});\n if (success) {\n onClose();\n }\n }\n renderLogin() {\n const {userManager} = this.context;\n return (\n
\n Login with github\n
\n );\n }\n renderSave() {\n const {saving, secret} = this.state;\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n const {gistId, gistOwnerId} = this.props;\n const canUpdate = userData && gistId && userData.id === gistOwnerId;\n const canFork = userData && gistId && userData.id !== gistOwnerId;\n return (\n
\n
\n Save to New Gist\n Update Current Gist\n Fork and Save Gist\n
\n
\n
\n \n \n
Warning:\n
    \n
  • You can not change a gist from public to secret
  • \n
  • Secret gists are still publicly accessible they're just unlisted
  • \n
\n (see docs)\n
\n
\n
\n );\n }\n render() {\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return userData ? this.renderSave() : this.renderLogin();\n }\n}\n\nSaveAsGist.contextType = ServiceContext;","import React from 'react';\n\nexport default function SaveAsJSON(props) {\n const {data} = props;\n return (\n
\n
\n Copy the text below, paste into the load ui or put somewhere on the net\n and make your own URL with {window.location.origin}?src=url-to-json.\n
\n
{JSON.stringify(data)}
\n \n
\n );\n}","import React from 'react';\n\nimport {jsonToCompressedBase64} from '../libs/compression.js';\n\nexport default function SaveAsURL(props) {\n const {data} = props;\n const src = jsonToCompressedBase64(data);\n const url = `${window.location.origin}?src=${encodeURIComponent(src)}`;\n return url.length < 8000\n ? (\n
\n
Copy / bookmark the link below
\n {url}\n
\n )\n : (\n
\n Too large to save as URL\n
\n )\n ;\n}\n","import React from 'react';\nimport Dialog from './Dialog.js';\nimport Embed from './Embed.js';\nimport Export from './Export.js';\nimport SaveAsGist from './SaveAsGist.js';\nimport SaveAsJSON from './SaveAsJSON.js';\nimport SaveAsURL from './SaveAsURL.js';\nimport Section from './Section.js';\n\nexport default function Save(props) {\n const {data, gistId, gistOwnerId, onSave, onClose} = props;\n return (\n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n )\n}\n","import React from 'react';\n\nimport Dialog from './Dialog.js';\nimport Section from './Section.js';\nimport ServiceContext from '../ServiceContext.js';\n\nimport verticalIcon from '../icons/vertical-layout.svg';\nimport horizontalIcon from '../icons/horizontal-layout.svg';\nimport twoByTwoIcon from '../icons/two-by-two-layout.svg';\nimport tabbedIcon from '../icons/tabbed-layout.svg';\n\nimport {classNames} from '../libs/css-utils.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nfunction RadioOption(props) {\n const {children, onChange, selected} = props;\n return (\n
\n {children}\n
\n );\n}\n\nfunction Radio(props) {\n const {selected, onChange, children} = props;\n\n const newChildren = React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return null;\n }\n\n const {result} = child.props;\n const isSelected = result === selected;\n\n //const id = childNdx;\n //childNdx += 1;\n return React.cloneElement(child, {\n //...child.props,\n selected: isSelected,\n onChange: () => onChange(result),\n });\n });\n\n return (\n
\n {newChildren}\n
\n );\n}\n\nfunction Checkbox(props) {\n const {id, label, checked, onChange} = props;\n const elemId = `checkbox-${id}`;\n return (\n
\n onChange(e.target.checked)}\n />\n \n
\n );\n}\n\nclass Logout extends React.Component {\n componentDidMount() {\n const {userManager} = this.context;\n userManager.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n const {userManager} = this.context;\n userManager.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n handleLogout = () => {\n const {userManager} = this.context;\n userManager.logout();\n }\n render() {\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return (!!userData &&\n
\n
Logged in as: \n {!!userData.login && }\n {!!userData.avatar_url && \"avatar\"/}\n
\n \n
\n );\n }\n}\n\nLogout.contextType = ServiceContext;\n\nexport default class Settings extends React.Component {\n //constructor(props) {\n // super(props);\n //}\n componentDidMount() {\n uiModel.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n handleLayoutChange = (v) => {\n uiModel.set('layout', v);\n }\n handleEditorChange = (v) => {\n uiModel.set('editor', v);\n }\n handleLineNumbersChange = (v) => {\n uiModel.set('lineNumbers', v);\n }\n handleTabsChange = (v) => {\n uiModel.set('tabs', v);\n }\n handleShowWhitespaceChange = (v) => {\n uiModel.set('showWhitespace', v);\n }\n render() {\n const {onClose} = this.props;\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return (\n \n { !!userData && }\n
\n
\n \n \"vertical\"/\n \"horizontal\"/\n \"2x2\"\n \"tabbed\"\n \n
\n
\n
\n
\n \n
Monaco
\n
CodeMirror
\n
\n \n \n \n
\n
\n
\n );\n }\n}\n\nSettings.contextType = ServiceContext;\n","import React from 'react';\n\nexport default function Toolbar(props) {\n const {\n toolbarFns,\n fullscreen,\n } = props;\n const {\n handleRun,\n handleStop,\n handleSave,\n handleNew,\n handleLoad,\n handleFullscreen,\n handleSettings,\n handleHelp,\n } = toolbarFns;\n return (\n
\n \n \n \n \n \n \n \n \n
\n );\n}","import SubscriptionManager from './SubscriptionManager.ts';\n\nconst kUserManagerKey = 'foobar'; // not important\n\nexport default class UserManager {\n constructor({\n oauthManager,\n github,\n addError,\n }) {\n this.oauthManager = oauthManager;\n this.github = github;\n this.subscriptionManager = new SubscriptionManager();\n this.addError = addError;\n oauthManager.subscribe(this._handleNewAuth);\n this._handleNewAuth();\n this.userData = undefined;\n }\n /*\n {\n \"login\": \"greggman\",\n \"id\": 234804,\n \"node_id\": \"MDQ6VXNlcjIzNDgwNA==\",\n \"avatar_url\": \"https://avatars2.githubusercontent.com/u/234804?v=4\",\n \"gravatar_id\": \"\",\n \"url\": \"https://api.github.com/users/greggman\",\n \"html_url\": \"https://github.com/greggman\",\n \"followers_url\": \"https://api.github.com/users/greggman/followers\",\n \"following_url\": \"https://api.github.com/users/greggman/following{/other_user}\",\n \"gists_url\": \"https://api.github.com/users/greggman/gists{/gist_id}\",\n \"starred_url\": \"https://api.github.com/users/greggman/starred{/owner}{/repo}\",\n \"subscriptions_url\": \"https://api.github.com/users/greggman/subscriptions\",\n \"organizations_url\": \"https://api.github.com/users/greggman/orgs\",\n \"repos_url\": \"https://api.github.com/users/greggman/repos\",\n \"events_url\": \"https://api.github.com/users/greggman/events{/privacy}\",\n \"received_events_url\": \"https://api.github.com/users/greggman/received_events\",\n \"type\": \"User\",\n \"site_admin\": false,\n \"name\": \"Greggman\",\n \"company\": null,\n \"blog\": \"http://games.greggman.com\",\n \"location\": \"Earth\",\n \"email\": \"github@greggman.com\",\n \"hireable\": null,\n \"bio\": \"30 years of games\\r\\n5 years of Chrome\",\n \"twitter_username\": null,\n \"public_repos\": 283,\n \"public_gists\": 80,\n \"followers\": 1037,\n \"following\": 3,\n \"created_at\": \"2010-04-01T08:48:05Z\",\n \"updated_at\": \"2020-10-24T06:05:24Z\"\n }\n */\n getUserData() {\n return this.userData;\n }\n _handleNewAuth = async() => {\n this.userData = undefined;\n const pat = this.oauthManager.pat();\n this.github.setPat(pat);\n if (pat) {\n try {\n const data = await this.github.getAuthenticatedUser();\n this.userData = data;\n } catch (e) {\n this.addError(e);\n }\n }\n this.subscriptionManager.notify(kUserManagerKey);\n }\n login = () => {\n this.oauthManager.login();\n }\n logout = () => {\n this.oauthManager.logout();\n this.github.setPat()\n }\n subscribe(fn) {\n this.subscriptionManager.subscribe(kUserManagerKey, fn);\n }\n unsubscribe(fn) {\n this.subscriptionManager.unsubscribe(kUserManagerKey, fn);\n }\n cleanup() {\n this.oauthManager.unsubscribe(this._handleNewAuth);\n }\n}\n\n","import React from 'react';\n\nimport EditLine from './EditLine.js';\n// import Footer from './Footer.js';\nimport {storageManager} from '../globals.js';\nimport GitHub from '../libs/GitHub.js';\nimport Head from './Head.js';\nimport Help from './Help.js';\nimport IDE from './IDE.js';\nimport Load from './Load.js';\nimport {isGistId, loadGistFromSrc} from '../libs/loader.js';\nimport {LogManager} from './Log.js';\nimport * as model from '../libs/model.js';\nimport Save from './Save.js';\nimport ServiceContext from '../ServiceContext.js';\nimport Settings from './Settings.js';\nimport Toolbar from './Toolbar.js';\nimport * as uiModel from '../libs/ui-model.js';\nimport UserManager from '../libs/UserManager.js';\nimport * as winMsgMgr from '../libs/WindowMessageManager';\nimport query from '../libs/start-query.js';\n\nimport './App.css';\nimport { classNames } from '../libs/css-utils.js';\n\nconst noJSX = () => [];\nconst darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');\n\nclass App extends React.Component {\n constructor(props) {\n super();\n this.state = {\n path: window.location.pathname,\n dark: darkMatcher.matches,\n fullscreen: !!query.fullscreen,\n loading: false,\n dialog: noJSX,\n gistId: '',\n messages: [],\n userData: {},\n updateVersion: 0,\n };\n this.github = new GitHub();\n this.oauthManager = props.oauthManager;\n this.backupManager = props.backupManager;\n this.logManager = new LogManager();\n this.userManager = new UserManager({\n oauthManager: this.oauthManager,\n github: this.github,\n addError: this.addError,\n });\n this.toolbarFns = {\n handleRun: this.handleRun,\n handleStop: this.handleStop,\n handleSave: this.handleSave,\n handleNew: this.handleNew,\n handleLoad: this.handleLoad,\n handleSettings: this.handleSettings,\n handleFullscreen: this.handleFullscreen,\n handleHelp: this.handleHelp,\n };\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleUIChange);\n this.userManager.cleanup();\n }\n componentDidMount() {\n uiModel.subscribe(this.handleUIChange);\n winMsgMgr.on('newGist', null, this.handleNewGist);\n this.github.addEventListener('userdata', (e) => {\n this.setState({\n userData: e.data,\n });\n });\n model.add('path', window.location.pathname);\n model.subscribe('path', (newValue) => {\n window.history.pushState({}, '', newValue);\n this.setState({\n path: newValue,\n });\n });\n // I still am not sure how I'm supposed to handle this.\n // Putting my model in the state itself seems wrong\n // and doesn't actually help since I'd have to \n // generate an entirely new state object to change any\n // nested property.\n //\n // Storing the data outside I see no way to tell\n // components to re-render except to call forceUpdate\n // which all the documentation says \"if you call this\n // you're doing it wrong\".\n //\n // Redux is a joke. 50 lines code needed to set\n // a single field. Repeat those 50 lines for every field.\n // Things like redux-tools make it less to type those\n // 50 lines but they still execute 50 to 500 lines of code\n // just to set a single value.\n model.subscribe(model.filesVersionKey, _ => {\n this.forceUpdate();\n });\n // this is a hack because I can't figure out how to\n // update the CodeMirror areas\n model.subscribe('updateVersion', _ => {\n this.setState({updateVersion: this.state.updateVersion + 1});\n });\n\n darkMatcher.addEventListener('change', () => {\n this.setState({dark: darkMatcher.matches});\n });\n\n if (query.newGist) {\n window.history.pushState({}, '', `${window.location.origin}`);\n window.opener.postMessage({type: 'gimmeDaCodez'}, '*');\n return;\n }\n\n const backup = this.backupManager.getBackup();\n let loaded = false;\n if (backup) {\n try {\n const data = JSON.parse(backup);\n if (data.href === window.location.href) {\n model.setData(data.data);\n const url = new URL(data.href);\n const {src} = Object.fromEntries(new URLSearchParams(url.search).entries());\n if (isGistId(src)) {\n this.setState({gistId: src, gistOwnerId: data.gistOwnerId});\n }\n loaded = true;\n this.addInfo('loaded backup from local storage')\n }\n } catch (e) {\n console.log('bad backup')\n }\n this.backupManager.clearBackup();\n }\n if (!loaded) {\n if (query.src) {\n this.loadData(query.src);\n }\n }\n this.updateTitle();\n }\n componentDidUpdate() {\n this.updateTitle();\n }\n updateTitle() {\n const data = model.getData();\n document.title = data.name || 'jsGist';\n }\n async loadData(src) {\n this.setState({loading: true});\n let success = true;\n let firstTry = true;\n for (;;) {\n try {\n const {data, id, rawData} = await loadGistFromSrc(src, this.github);\n model.setData(data);\n if (id) {\n this.setState({\n gistId: src,\n gistOwnerId: rawData?.owner?.id,\n });\n }\n break;\n } catch (e) {\n if (firstTry) {\n this.userManager.logout();\n firstTry = false;\n } else {\n success = false;\n console.warn(e);\n this.addError(`could not load jsGist: src=${src} ${e}`);\n break;\n }\n }\n }\n this.setState({loading: false});\n if (success) {\n this.handleRun();\n }\n }\n handleUIChange = () => {\n this.forceUpdate();\n }\n handleNewGist = (data) => {\n let success = true;\n try {\n model.setData(data);\n this.backupManager.clearBackup();\n } catch (e) {\n success = false;\n console.warn(e);\n this.addError(`could create new jsGist: ${e}`);\n }\n if (success) {\n this.handleRun();\n }\n };\n addMsg = (msg, className) => {\n switch (className) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.log(msg);\n break;\n }\n this.setState({messages: [{msg: msg.toString(), className}, ...this.state.messages]});\n setTimeout(() => {\n this.setState({messages: this.state.messages.slice(0, this.state.messages.length - 1)});\n }, 5000);\n }\n addInfo = (msg) => this.addMsg(msg, 'info');\n addError = (msg) => this.addMsg(msg, 'error');\n closeDialog = () => {\n this.setState({dialog: noJSX});\n }\n registerRunnerAPI = (api) => {\n this.runnerAPI = api;\n this.handleStop();\n }\n handleNew = async() => {\n //this.backupManager.clearBackup();\n //window.location.href = window.location.origin; // causes a reload\n window.open('/?newGist=1', '_blank');\n }\n handleRun = async () => {\n this.backupManager.setBackup(JSON.stringify({\n href: window.location.href,\n data: model.getData(),\n gistOwnerId: this.state.gistOwnerId,\n }));\n this.logManager.clear();\n console.clear();\n this.runnerAPI.run(model.getData());\n }\n handleStop = async () => {\n this.runnerAPI.run(model.getBlankData(), true);\n }\n handleSave = async () => {\n this.setState({dialog: this.renderSave});\n }\n handleSettings = () => {\n this.setState({dialog: this.renderSettings});\n }\n handleFullscreen = () => {\n this.setState({fullscreen: !this.state.fullscreen});\n }\n handleHelp = () => {\n this.setState({dialog: this.renderHelp});\n }\n handleLoad = () => {\n this.setState({dialog: this.renderLoad});\n }\n handleOnLoad = async() => {\n this.setState({dialog: noJSX});\n this.handleRun();\n }\n handleOnSave = (gistId) => {\n window.history.pushState({}, '', `${window.location.origin}?src=${gistId}`);\n this.setState({\n gistId,\n gistOwnerId: this.userManager.getUserData().id,\n });\n }\n handleAbort = () => {\n this.abort();\n };\n renderHelp = () => {\n return ();\n }\n renderSettings = () => {\n return (\n \n );\n }\n renderLoad = () => {\n return (\n \n );\n }\n renderSave = () => {\n const data = model.getData();\n return (\n \n );\n }\n render() {\n const data = model.getData();\n const {\n loading,\n dialog,\n updateVersion: hackKey,\n userData,\n fullscreen,\n } = this.state;\n const editor = uiModel.get().editor;\n return (\n
\n \n
\n
\n
\n
\n model.setName(v)} />\n {!!userData.name && }\n {!!userData.avatarURL && \"avatar\"/}\n
\n
\n
\n \n \n
\n
\n {\n !loading &&\n
\n \n
\n }\n
\n {/*\n \n */}\n {dialog()}\n
\n {\n this.state.messages.map(({msg, className}, i) => (
{msg}
))\n }\n
\n
\n
\n );\n }\n}\n\nexport default App;\n","const backupKey = 'backup';\r\n\r\nexport default class BackupManager {\r\n #storageManager;\r\n\r\n constructor(storageManager) {\r\n this.#storageManager = storageManager;\r\n }\r\n getBackup() {\r\n return this.#storageManager.get(backupKey);\r\n }\r\n setBackup(data) {\r\n this.#storageManager.set(backupKey, data);\r\n }\r\n clearBackup() {\r\n this.#storageManager.delete(backupKey);\r\n }\r\n}","\nimport {clientId} from '../globals.js';\nimport {createURL} from './url.js';\nimport {createPopup} from './utils';\nimport StorageManager from './StorageManager';\nimport * as winMsgMgr from './WindowMessageManager';\n\nconst patKey = 'pat';\n\nconst getTokenURL = process.env.REACT_APP_OAUTH_HELPER_URL;\nif (!getTokenURL) {\n throw Error ('must set environment variable: OAUTH_HELPER_URL');\n}\n\nexport default class OAuthManager {\n private _popup?: Window;\n private _state?: string;\n private _storageManager: StorageManager;\n\n constructor(storageManager: StorageManager) {\n this._popup = undefined;\n this._state = undefined; // last state sent to auth\n this._storageManager = storageManager;\n winMsgMgr.on('auth', null, (data: any) => {\n this._closePopup();\n if (data.state === this._state) {\n this.requestToken(data);\n }\n });\n }\n // TODO: rename this and decide if Github should be connected\n pat() {\n return this._storageManager.get(patKey);\n }\n subscribe(fn: () => void) {\n this._storageManager.subscribe(patKey, fn);\n }\n unsubscribe(fn: () => void) {\n this._storageManager.unsubscribe(patKey, fn);\n }\n _closePopup() {\n if (this._popup) {\n this._popup.close();\n this._popup = undefined;\n }\n }\n requestToken = async (auth: any) => {\n try {\n const params = {\n client: clientId,\n code: auth.code,\n };\n const url = createURL(getTokenURL, params);\n const req = await fetch(url);\n const data = await req.json();\n if (!data.access_token) {\n throw new Error(JSON.stringify(data));\n }\n this._storageManager.set(patKey, data.access_token);\n } catch (e) {\n console.error(e);\n }\n }\n logout = () => {\n this._storageManager.delete(patKey);\n }\n login = () => {\n this._closePopup();\n this._state = `${Date.now()}-${Math.random()}`; // does this need to special? Seems like no\n const url = createURL('https://github.com/login/oauth/authorize', {\n client_id: clientId,\n scope: 'gist',\n state: this._state,\n });\n this._popup = createPopup(url);\n }\n}","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {storageManager} from './globals.js';\nimport './index.css';\nimport './scrollbars.js';\nimport App from './components/App';\nimport BackupManager from './components/BackupManager.js';\nimport OAuthManager from './libs/OAuthManager';\nimport * as serviceWorker from './serviceWorker';\n\nconst oauthManager = new OAuthManager(storageManager);\nconst backupManager = new BackupManager(storageManager);\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","module.exports = __webpack_public_path__ + \"static/media/vertical-layout.f248a432.svg\";","module.exports = __webpack_public_path__ + \"static/media/horizontal-layout.e3f3298b.svg\";","module.exports = __webpack_public_path__ + \"static/media/two-by-two-layout.23605ce8.svg\";","module.exports = __webpack_public_path__ + \"static/media/tabbed-layout.8a8b9bc8.svg\";"],"sourceRoot":""} \ No newline at end of file