diff --git a/asset-manifest.json b/asset-manifest.json index b3d9e7b..f20a519 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,18 +1,18 @@ { "files": { - "main.css": "/static/css/main.8a09dddb.chunk.css", - "main.js": "/static/js/main.bd7fc67a.chunk.js", - "main.js.map": "/static/js/main.bd7fc67a.chunk.js.map", + "main.css": "/static/css/main.274a1e2f.chunk.css", + "main.js": "/static/js/main.2df02371.chunk.js", + "main.js.map": "/static/js/main.2df02371.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.e4620b26.chunk.js": "/static/js/2.e4620b26.chunk.js", "static/js/2.e4620b26.chunk.js.map": "/static/js/2.e4620b26.chunk.js.map", "index.html": "/index.html", - "precache-manifest.2939d20d8316e754b820be6e160cfa00.js": "/precache-manifest.2939d20d8316e754b820be6e160cfa00.js", + "precache-manifest.969c878038f898019a36edfc14adb34a.js": "/precache-manifest.969c878038f898019a36edfc14adb34a.js", "service-worker.js": "/service-worker.js", "static/css/2.6b709c6b.chunk.css.map": "/static/css/2.6b709c6b.chunk.css.map", - "static/css/main.8a09dddb.chunk.css.map": "/static/css/main.8a09dddb.chunk.css.map", + "static/css/main.274a1e2f.chunk.css.map": "/static/css/main.274a1e2f.chunk.css.map", "static/js/2.e4620b26.chunk.js.LICENSE.txt": "/static/js/2.e4620b26.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.e4620b26.chunk.js", - "static/css/main.8a09dddb.chunk.css", - "static/js/main.bd7fc67a.chunk.js" + "static/css/main.274a1e2f.chunk.css", + "static/js/main.2df02371.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 9a66926..2d46d2d 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/precache-manifest.2939d20d8316e754b820be6e160cfa00.js b/precache-manifest.969c878038f898019a36edfc14adb34a.js similarity index 81% rename from precache-manifest.2939d20d8316e754b820be6e160cfa00.js rename to precache-manifest.969c878038f898019a36edfc14adb34a.js index 7a7eead..4a75df2 100644 --- a/precache-manifest.2939d20d8316e754b820be6e160cfa00.js +++ b/precache-manifest.969c878038f898019a36edfc14adb34a.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "516021b88bcf1b8f1ce9b9cdcd262cd0", + "revision": "ffd4f0f12d8fd27736469db9a3cd6eb7", "url": "/index.html" }, { @@ -8,8 +8,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/css/2.6b709c6b.chunk.css" }, { - "revision": "582a79a9e29c91c3c4a9", - "url": "/static/css/main.8a09dddb.chunk.css" + "revision": "3cff31048e1d046c990b", + "url": "/static/css/main.274a1e2f.chunk.css" }, { "revision": "ffdb0adcda38e13ac6a5", @@ -20,8 +20,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/js/2.e4620b26.chunk.js.LICENSE.txt" }, { - "revision": "582a79a9e29c91c3c4a9", - "url": "/static/js/main.bd7fc67a.chunk.js" + "revision": "3cff31048e1d046c990b", + "url": "/static/js/main.2df02371.chunk.js" }, { "revision": "21d734a13edf31307f64", diff --git a/service-worker.js b/service-worker.js index 7962c14..e1d6a01 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.2939d20d8316e754b820be6e160cfa00.js" + "/precache-manifest.969c878038f898019a36edfc14adb34a.js" ); self.addEventListener('message', (event) => { diff --git a/static/css/main.274a1e2f.chunk.css b/static/css/main.274a1e2f.chunk.css new file mode 100644 index 0000000..c5058f6 --- /dev/null +++ b/static/css/main.274a1e2f.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;--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:#222;color:#eee;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;--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.274a1e2f.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.274a1e2f.chunk.css.map b/static/css/main.274a1e2f.chunk.css.map new file mode 100644 index 0000000..754f5ad --- /dev/null +++ b/static/css/main.274a1e2f.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,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,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,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,sBAAuB,CACvB,uBAAwB,CACxB,oBAAqB,CACrB,oBAAuB,CACvB,yBACF,CACA,gFAEE,UACF,CACA,eACE,yBACF,CACA,OACE,+BACF,CACA,wBACE,+BACF,CACF","file":"main.274a1e2f.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 --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: #222;\n color: #eee;\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 --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.8a09dddb.chunk.css b/static/css/main.8a09dddb.chunk.css deleted file mode 100644 index 653c6ab..0000000 --- a/static/css/main.8a09dddb.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{--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;--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:#222;color:#eee;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}@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;--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.8a09dddb.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.8a09dddb.chunk.css.map b/static/css/main.8a09dddb.chunk.css.map deleted file mode 100644 index e2ec3d5..0000000 --- a/static/css/main.8a09dddb.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,oBAAqB,CACrB,oBAAqB,CACrB,qBAAsB,CACtB,uBAAwB,CACxB,0BAA2B,CAC3B,mBAAoB,CACpB,iBAAkB,CAClB,yBAA0B,CAC1B,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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ACE,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,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,sBAAuB,CACvB,uBAAwB,CACxB,oBAAqB,CACrB,oBAAuB,CACvB,yBACF,CACA,gFAEE,UACF,CACA,eACE,yBACF,CACA,OACE,+BACF,CACA,wBACE,+BACF,CACF","file":"main.8a09dddb.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 --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 --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: #222;\n color: #eee;\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\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 --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.bd7fc67a.chunk.js b/static/js/main.2df02371.chunk.js similarity index 69% rename from static/js/main.bd7fc67a.chunk.js rename to static/js/main.2df02371.chunk.js index e7d8c0e..2b320b2 100644 --- a/static/js/main.bd7fc67a.chunk.js +++ b/static/js/main.2df02371.chunk.js @@ -1,2 +1,2 @@ -(this.webpackJsonpjsgist=this.webpackJsonpjsgist||[]).push([[0],{177:function(e,t,n){},178: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(93),n(94),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),g=n.n(p),f=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(11),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(f.a)(g.a.mark((function e(t,n){var a,r;return g.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(f.a)(g.a.mark((function e(t){var n;return g.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(f.a)(g.a.mark((function e(t){var n;return g.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(f.a)(g.a.mark((function e(t,n){var a;return g.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),_=n.n(U),T=n(14),A=n.n(T),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=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");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);X.contextType=F;var Z=n(79),Q=(new _.a).compile(Z),ee={};function te(e){var t=ee[e]||{subscriptions:new Set};return ee[e]=t,t}function ne(e,t){var n=te(e);return void 0!==t&&(n.value=t),n}function ae(e){return ee[e].value}function re(e,t){var n=ee[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 ie(e,t){te(e).subscriptions.add(t)}function oe(e,t){te(e).subscriptions.delete(t)}var se,ce={name:"My jsGist",settings:{},files:[{name:"index.html",content:""},{name:"index.css",content:""},{name:"index.js",content:""}]};function le(){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 ue(){return se}ne("dataVersion",0),ne("updateVersion",0),ne("filesVersion",0);var de=function(e){return re(e,ae(e)+1)},he=function(e){return de("dataVersion")},me=function(e){return de("filesVersion")};function pe(e,t){se.files[e].name=t,he()}function ge(e,t){se.files[e].content=t,he()}function fe(e){!function(e){if(!Q(e))throw new Error("data not valid:\n".concat(Q.errors.map((function(e){return"".concat(e.message,": ").concat(e.dataPath)}))))}(e),se=e,de("updateVersion"),he(),me()}fe(JSON.parse(JSON.stringify(ce)));var ve,be=Object.fromEntries(new URLSearchParams(window.location.search).entries()),ye=!be.codeMirror&&!/webOS|iPhone|iPad|Android/.test(navigator.userAgent),Ee=!1,we={layout:window.screen.width<540||window.screen.height<540?3:0,editor:ye?"monaco":"codemirror",lineNumbers:!0,tabs:!1,showWhitespace:!1};function ke(e,t){ve[e]=t;var n=JSON.stringify(ve);d.set("ui-settings",n,!0),re("settings",ve)}function Se(){return function(){if(!Ee){Ee=!0;try{if(!(ve=JSON.parse(d.get("ui-settings",!0))))throw new Error("no settings")}catch(i){ve=Object(k.a)({},we)}for(var e=0,t=Object.entries(we);e=0&&(u.matchTags=!0),r.a.createElement(Ne.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(87);function Te(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 Ae(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 Pe=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 Re=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):{},Ge=function(){};function Ke(e){return Fe.apply(this,arguments)}function Fe(){return(Fe=Object(f.a)(g.a.mark((function e(t){var n;return g.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 Je,Ve=(Je=function(){var e=Object(f.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Ke("/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,Je.apply(void 0,arguments))});var We=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,Ve(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?Ge:a,o=e.ui,s=this.state.value,c=Re.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),He=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}),ke("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:it(a.state.sizes,a.state.lastSizes,0,t>=0)}),ke("layoutTabbed",a.state)},a.toggleShowLog=function(){var e=!a.state.showLog;a.setState({showLog:e,sizes:it(a.state.sizes,a.state.lastSizes,2,e)}),ke("layoutTabbed",a.state)},a.toggleShowResult=function(){var e=!a.state.showResult;a.setState({showResult:e,sizes:it(a.state.sizes,a.state.lastSizes,1,e)}),ke("layoutTabbed",a.state)};var r=Se().layoutTabbed;return a.state=rt(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(Be,{hackKey:n,desc:"filename",title:t.name,value:t.content,onTitleChange:function(e){return pe(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(X,{registerAPI:i})),r.a.createElement("div",{className:"layout-tabbed-log",style:h},r.a.createElement(V,{onGoToLine:this.handleGoToLine}))))}}]),n}(r.a.Component)],st=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 Object.entries(e).map((function(e){var t=Object(S.a)(e,2),n=t[0],a=t[1];return{id:n,name:a.name,date:a.date,public:a.public}})).sort((function(e,t){return i(t,e)*r}))}function yt(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 Et(e){for(var t,n=0,a=Object.values(e);nt)&&(t=i)}return t}ne("gists",mt()),d.subscribe("gists",(function(){re("gists",mt())}));var wt=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})},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){console.log("update:",e,t),a.setState({sortDir:t,sortKey:e})},a.handleKeyDown=function(e){a.setState({shift:e.shiftKey})},a.handleKeyUp=function(e){a.setState({shift:e.shiftKey})},a.loadGists=Object(f.a)(g.a.mark((function e(){var t,n,r,i,o,s;return g.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=Et(i),e.next=7,r.getUserGists(o);case 7:s=e.sent,vt(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(f.a)(g.a.mark((function e(){var t,n,r,i,o,s,c,l,u,d;return g.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:s,onChange:function(t){e.setState({filter:t})}})),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(yt,{selected:"check"===c,sortDir:l,update:function(t){return e.updateSort("check",t)}})),r.a.createElement("th",null,r.a.createElement(yt,{selected:"name"===c,sortDir:l,update:function(t){return e.updateSort("name",t)}})),r.a.createElement("th",null,r.a.createElement(yt,{selected:"date"===c,sortDir:l,update:function(t){return e.updateSort("date",t)}})),r.a.createElement("th",null,r.a.createElement(yt,{selected:"public"===c,sortDir:l,update:function(t){return e.updateSort("public",t)}})))),r.a.createElement("tbody",null,h.filter(function(e){return e=e.trim().toLowerCase(),function(t){var n=t.name,a=t.date;return""===e||n.toLowerCase().includes(e)||a.substring(0,10).includes(e)}}(s)).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 kt(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(He,{value:i,onValueChange:o})),r.a.createElement("p",null,r.a.createElement("button",{onClick:function(){var t=e.onLoad;try{fe(JSON.parse(i)),t()}catch(n){s("bad json: ".concat(n))}}},"Load JSON")))}function St(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(f.a)(g.a.mark((function t(){var n,a;return g.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:fe(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 jt(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 Ot(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(jt,{heading:"Load Gist"},r.a.createElement(wt,{data:t,onLoad:n})),r.a.createElement(jt,{heading:"Load URL"},r.a.createElement(St,{data:t,onLoad:n})),r.a.createElement(jt,{heading:"Load JSON"},r.a.createElement(kt,{data:t,onLoad:n})))}wt.contextType=F;var xt=n(52),Ct=n(54),Mt=new TextEncoder,zt=new TextDecoder,Nt=function(e){return e.startsWith("cb64,")||e.startsWith("b64,")};function Lt(e){var t=e.startsWith("cb64,"),n=t?"cb64,":"b64,",a=e.substr(n.length).replace(/-/g,"+").replace(/_/g,"/"),r=new Uint8Array(Object(xt.a)(a)),i=t?Object(Ct.b)(r):r,o=zt.decode(i);return JSON.parse(o)}var It=/^[a-z0-9]+$/i,Ut=function(e){return It.test(e)};function _t(e,t){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(f.a)(g.a.mark((function e(t,n){var a,r,i,o,s;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ut(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(!Nt(t)){e.next=13;break}return e.abrupt("return",{data:Lt(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 At(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)))}function Dt(e){return e.split("\n").map((function(e){return" ".concat(e)})).join("\n")}var Pt=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)).onChange=function(e){a.setState({asModule:e})},a.exportToCodepen=function(){!function(e){var t=e.files,n=De(t,"index.html","html"),a=De(t,"index.js","js","js","javascript"),r=De(t,"index.css","css"),i={title:e.name,description:e.name,editors:"101",html:n.content,css:r.content,js:a.content},o=document.createElement("div");o.innerHTML='\n "\n ',o.querySelector("input[name=data]").value=JSON.stringify(i),document.body.appendChild(o),o.querySelector("form").submit(),document.body.removeChild(o)}(a.props.data)},a.exportToJSFiddle=function(){!function(e){var t=e.files,n=De(t,"index.html","html"),a=De(t,"index.js","js","js","javascript"),r=De(t,"index.css","css"),i=document.createElement("div");i.innerHTML='\n \n ',i.querySelector("input[name=html]").value=n.content,i.querySelector("input[name=css]").value=r.content,i.querySelector("input[name=js]").value=a.content,i.querySelector("input[name=title]").value=e.name,document.body.appendChild(i),i.querySelector("form").submit(),document.body.removeChild(i)}(a.props.data)};var r=De(e.data.files,"index.js","js","js","javascript");return a.state={asModule:/\bimport\b/.test(r.content)},a}return Object(c.a)(n,[{key:"render",value:function(){var e=this,t=this.props.data,n=this.state.asModule;return r.a.createElement("div",null,r.a.createElement("button",{onClick:this.exportToCodepen},"Codepen"),r.a.createElement("button",{onClick:this.exportToJSFiddle},"JSFiddle"),r.a.createElement("p",null,"StackOverflow Snippet (copy the code below paste into S.O.)"),r.a.createElement("div",null,r.a.createElement("div",null,r.a.createElement("input",{type:"radio",id:"export-as-module",checked:n,onChange:function(t){return e.onChange(!0)}}),r.a.createElement("label",{htmlFor:"export-as-module"},"As es6 module")),r.a.createElement("div",null,r.a.createElement("input",{type:"radio",id:"export-as-script",checked:!n,onChange:function(t){return e.onChange(!1)}}),r.a.createElement("label",{htmlFor:"export-as-script"},"As script")),r.a.createElement("p",null,'S.O. does not support es6 modules yet so picking "As Module" puts the code in a \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 : /\\bimport\\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.bd7fc67a.chunk.js.map b/static/js/main.bd7fc67a.chunk.js.map deleted file mode 100644 index 7563d65..0000000 --- a/static/js/main.bd7fc67a.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["libs/SubscriptionManager.ts","globals.js","libs/StorageManager.ts","scrollbars.js","components/EditLine.js","libs/GitHub.js","components/Head.js","components/Dialog.js","components/Help.js","libs/css-utils.js","ServiceContext.js","components/Log.js","libs/url.js","libs/WindowMessageManager.ts","components/Runner.js","libs/model.js","libs/start-query.js","libs/ui-model.js","components/Layout1.js","components/CodeCodeMirror.js","libs/utils.ts","components/CodeMonaco.js","components/Code.js","components/CodeArea.js","components/File.js","components/Files.js","components/Layout3Vertical.js","components/Layout3Horizontal.js","components/Layout2x2.js","components/LayoutTabbed.js","components/IDE.js","libs/gists.js","components/LoadGist.tsx","components/LoadJSON.js","components/LoadURL.js","components/Section.js","components/Load.js","libs/compression.js","libs/loader.js","components/Embed.js","components/Export.js","components/SaveAsGist.js","components/SaveAsJSON.js","components/SaveAsURL.js","components/Save.js","components/Settings.js","components/Toolbar.js","libs/UserManager.js","components/App.js","components/BackupManager.js","libs/OAuthManager.ts","serviceWorker.js","index.js","icons/vertical-layout.svg","icons/horizontal-layout.svg","icons/two-by-two-layout.svg","icons/tabbed-layout.svg"],"names":["SubscriptionManager","itemToSubscriptionMap","this","Map","item","fn","unsubscribe","fns","get","set","push","ndx","indexOf","splice","length","delete","slice","storageManager","prefix","subscriptionManager","_handleNewValue","e","key","startsWith","unPrefixedKey","substr","notify","window","addEventListener","subscribe","session","k","_addPrefix","v","sessionStorage","getItem","localStorage","value","setItem","removeItem","removeEventListener","parent","document","createElement","setAttribute","classList","add","child","appendChild","body","firstChild","clientWidth","removeChild","EditLine","props","type","onChange","target","placeholder","emptyValue","getEmptyFileHack","file","content","getGistContent","gist","data","JSON","parse","files","filenames","map","name","Object","entries","filter","concat","createGistData","secret","gist_id","reduce","trim","saveData","jsGistData","keys","stringify","lowerCaseFiles","n","toLowerCase","includes","location","origin","filename","description","public","GitHub","pat","user","unAuthorizedOctokit","Octokit","userAgent","userData","owner","login","avatarURL","avatar_url","undefined","getUserData","assign","event","Event","dispatchEvent","authorizedOctokit","auth","users","getAuthenticated","response","status","Error","message","since","paginate","gists","list","per_page","octokit","rawData","gistData","create","_updateUserData","updateGist","id","update","date","updated_at","fork","result","createComment","EventTarget","Head","className","rel","href","src","alt","hostname","Dialog","handleKeyDown","keyCode","onClose","title","children","onClick","tabIndex","stopPropagation","React","Component","Help","camelCaseRE","toDash","_","left","right","camelCaseToDash","s","replace","classNames","names","args","arg","join","ServiceContext","createContext","LogManager","clear","_msgs","_notify","_addMsg","lastData","oldMsg","newMsg","isMsgSame","count","addMsg","addMsgs","msgs","showStack","Log","handleChange","forceUpdate","logMessagesRef","createRef","context","logManager","prevProps","prevState","snapshot","elem","current","scrollTop","scrollHeight","parentElement","clientHeight","onGoToLine","ref","getMsgs","msg","tooltip","section","fileLink","data-tooltip","url","lineNo","lastIndexOf","basename","createURL","base","params","URL","searchParams","URLSearchParams","search","toString","contextType","nullHandlers","fromToHandlersMap","on","from","remove","handlers","size","callHandler","source","Runner","handleJSLog","handleJSError","handleJSUnhandledRejection","handleInfoMessages","handleGimmeDaCodez","iframe","contentWindow","postMessage","handleMessage","runnerRef","registerAPI","debug","fromEntries","extra","run","blank","removeIFrame","style","background","winMsgMgr","validator","Ajv","compile","schema","trackedValues","getValueOrMakeNew","trackedValue","subscriptions","Set","initialValue","newValue","newTestData","getBlankData","getData","incVersion","incDataVersion","incFilesVersion","setFileName","newName","setFileContent","setData","newData","errors","dataPath","validate","settings","query","canMonaco","codeMirror","test","navigator","initialized","defaultSettings","layout","screen","width","height","editor","lineNumbers","tabs","showWhitespace","json","model","init","uiStateValidator","Layout","onSetVSizes","sizes","setState","vSizes","uiModel","state","registerRunnerAPI","direction","minSize","onSetSizes","handleGoToLine","darkMatcher","matchMedia","noop","CodeCodeMirror","registerEditor","setOption","Tab","cm","str","padEnd","getOption","replaceSelection","hackKey","goToLine","colNo","focus","doc","setCursor","refresh","options","onValueChange","ui","isDarkMode","matches","codeMirrorOptions","mode","scrollbarStyle","theme","matchBrackets","matchTags","onBeforeChange","editorDidMount","findNdx","endings","ending","findIndex","endsWith","getOrFindNdx","f","getOrFind","sep","getText","a","fetch","req","text","addTypes","monaco","languages","typescript","javascriptDefaults","addExtraLib","once","CodeMonaco","handleEditorDidMount","getModel","updateOptions","tabSize","setPosition","lineNumber","column","revealPosition","language","split","pop","codeMirrorModeToLanguage","onMount","minimap","enabled","glyphMargin","folding","insertSpaces","renderWhitespace","Code","newProps","CodeArea","heading","File","handleRegisterAPI","api","codeAPI","register","unregister","mimeType","mime","lookup","Files","kUIStateKey","handleRegister","handleUnregister","fileToKeyMap","uiStateKey","i","Date","now","Math","random","forEach","computeNewSizesFn","moveGuttersComputeNewSizes","getFileKey","desc","onTitleChange","Layout3Vertical","onSetHSizes","hSizes","registerFilesAPI","filesAPI","Layout3Horizontal","onSetTSizes","tSizes","onSetBSizes","bSizes","NamedFile","Layout2x2","onSetV1Sizes","v1Sizes","onSetV2Sizes","v2Sizes","mainHTMLNdx","mainJSNdx","mainCSSNdx","fixSizes","lastSizes","show","oldSize","availableSpace","len","sum","newSizes","layoutModes","setSizes","currentNdx","showResult","showLow","handleOnChange","toggleShowLog","showLog","toggleShowResult","previousNdx","resultStyle","display","logStyle","Fragment","checked","htmlFor","IDE","fullscreen","layoutMode","Layout1","gistSchema","gistsSchema","ajv","gistsValidator","gistValidator","getStoredGists","addGist","_public","locallySaved","saveGistsToLocalStorage","removeGist","setGists","gistsToSortedArray","checks","sortKey","sortDir","compareDirMult","compFn","b","ap","bp","sign","has","getSortFn","sort","SortBy","selected","getDateOfNewestNonLocallySavedGist","gistsById","values","LoadGist","handleNewGists","toggleCheck","onUserStatusChange","userManager","loadGists","updateSort","console","log","shift","shiftKey","handleKeyUp","addError","github","loading","existingGists","getUserGists","gistArray","deleteSelected","_gists","ids","deleteGist","clearBackup","backupManager","canLoad","disabled","dir","substring","matchFilter","encodeURIComponent","renderLoad","renderLogin","LoadJSON","useState","setJSON","useContext","onLoad","LoadURL","setUrl","Section","Load","utf8Encoder","TextEncoder","utf8Decoder","TextDecoder","isCompressedBase64","compressedBase64ToJSON","isCompressed","base64","raw","Uint8Array","decode","bin","inflate","idRE","isGistId","loadGistFromSrc","getGist","res","Embed","gistId","exampleId","userSelect","indent4","Export","asModule","exportToCodepen","mainHTML","mainJS","mainCSS","pen","editors","html","css","js","innerHTML","querySelector","submit","openInCodepen","exportToJSFiddle","openInJSFiddle","overflow","makeSnippet","module","makeHTML","SaveAsGist","onPatChange","toggleSecret","saveNew","saving","onSave","success","createGist","saveOverExisting","forkAndSave","forkGist","newId","gistOwnerId","canUpdate","canFork","data-type","renderSave","SaveAsJSON","SaveAsURL","encode","compressed","deflate","useCompressed","jsonToCompressedBase64","class","Save","RadioOption","radioSelected","Radio","newChildren","Children","isValidElement","isSelected","cloneElement","Checkbox","label","elemId","Logout","handleLogout","logout","Settings","handleLayoutChange","handleEditorChange","handleLineNumbersChange","handleTabsChange","handleShowWhitespaceChange","verticalIcon","horizontalIcon","twoByTwoIcon","tabbedIcon","Toolbar","toolbarFns","handleRun","handleStop","handleSave","handleNew","handleLoad","handleFullscreen","handleSettings","handleHelp","UserManager","oauthManager","_handleNewAuth","setPat","getAuthenticatedUser","noJSX","App","handleUIChange","handleNewGist","warn","error","messages","setTimeout","addInfo","closeDialog","dialog","runnerAPI","setBackup","renderSettings","renderHelp","handleOnLoad","handleOnSave","history","pushState","handleAbort","abort","path","pathname","dark","updateVersion","cleanup","newGist","opener","backup","getBackup","loaded","loadData","updateTitle","firstTry","Provider","BackupManager","getTokenURL","process","OAuthManager","_popup","_state","_storageManager","requestToken","client","code","access_token","_closePopup","client_id","scope","config","top","screenY","outerHeight","screenX","outerWidth","open","createPopup","close","Boolean","match","ReactDOM","render","StrictMode","getElementById","serviceWorker","ready","then","registration","catch","exports"],"mappings":"0LACqBA,E,WAEnB,aAAe,yBADfC,2BACc,EACZC,KAAKD,sBAAwB,IAAIE,I,sDAEzBC,EAAcC,GACtBH,KAAKI,YAAYF,EAAMC,GACvB,IAAIE,EAAML,KAAKD,sBAAsBO,IAAIJ,GACpCG,IACHA,EAAM,GACNL,KAAKD,sBAAsBQ,IAAIL,EAAMG,IAEvCA,EAAIG,KAAKL,K,kCAECD,EAAcC,GACxB,IAAME,EAAML,KAAKD,sBAAsBO,IAAIJ,GAC3C,GAAIG,EAAK,CACP,IAAMI,EAAMJ,EAAIK,QAAQP,GACpBM,GAAO,IACTJ,EAAIM,OAAOF,EAAK,GACG,IAAfJ,EAAIO,QACNZ,KAAKD,sBAAsBc,OAAOX,O,6BAKnCA,GACL,IAAMG,EAAML,KAAKD,sBAAsBO,IAAIJ,GAC3C,GAAIG,EAAK,CAAC,IAAD,gBACUA,EAAIS,SADd,IACP,2BAA8B,EAC5BX,EAD4B,YADv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0B,6C,mBCA3CxI,EAAOwI,QAAU,IAA0B,+C,mBCA3CxI,EAAOwI,QAAU,IAA0B,+C,mBCA3CxI,EAAOwI,QAAU,IAA0B,2C","file":"static/js/main.bd7fc67a.chunk.js","sourcesContent":["\nexport default class SubscriptionManager {\n itemToSubscriptionMap: Map void)[]>;\n constructor() {\n this.itemToSubscriptionMap = new Map();\n }\n subscribe(item: string, fn: () => void) {\n this.unsubscribe(item, fn);\n let fns = this.itemToSubscriptionMap.get(item);\n if (!fns) {\n fns = [];\n this.itemToSubscriptionMap.set(item, fns);\n }\n fns.push(fn);\n }\n unsubscribe(item: string, fn: () => void): void {\n const fns = this.itemToSubscriptionMap.get(item);\n if (fns) {\n const ndx = fns.indexOf(fn);\n if (ndx >= 0) {\n fns.splice(ndx, 1);\n if (fns.length === 0) {\n this.itemToSubscriptionMap.delete(item);\n }\n }\n }\n }\n notify(item: string): void {\n const fns = this.itemToSubscriptionMap.get(item);\n if (fns) {\n for (const fn of fns.slice()) {\n fn();\n }\n }\n }\n}","import StorageManager from './libs/StorageManager';\nimport {isDevelopment} from './libs/flags.js';\n\nexport const storageManager = new StorageManager('jsgist');\nexport const clientId = isDevelopment\n ? 'b7822ff167d2bbe9a361'\n : 'c055b54872b13c10e4bd';\n\n","import SubscriptionManager from './SubscriptionManager';\n\nexport default class StorageManager {\n prefix: string;\n subscriptionManager: SubscriptionManager;\n\n constructor(prefix: string) {\n this.prefix = `${prefix}-`;\n this.subscriptionManager = new SubscriptionManager();\n window.addEventListener('storage', this._handleNewValue);\n }\n private _handleNewValue = (e: StorageEvent) => {\n const key = e.key;\n if (key && key.startsWith(this.prefix)) {\n const unPrefixedKey = key.substr(this.prefix.length);\n this.subscriptionManager.notify(unPrefixedKey);\n }\n }\n private _addPrefix(key: string): string {\n return `${this.prefix}${key}`;\n }\n subscribe(key: string, fn: () => void): void {\n this.subscriptionManager.subscribe(key, fn);\n }\n unsubscribe(key: string, fn: () => void): void {\n this.subscriptionManager.unsubscribe(key, fn);\n }\n get(key: string, session = false) {\n const k = this._addPrefix(key);\n if (session) {\n const v = sessionStorage.getItem(k);\n if (v) {\n return v;\n }\n }\n return localStorage.getItem(k);\n }\n set(key: string, value: string, session = false) {\n const k = this._addPrefix(key);\n if (session) {\n sessionStorage.setItem(k, value);\n }\n localStorage.setItem(k, value);\n this.subscriptionManager.notify(key);\n }\n delete(key: string, session = false) {\n const k = this._addPrefix(key);\n if (session) {\n sessionStorage.removeItem(k);\n }\n localStorage.removeItem(k);\n this.subscriptionManager.notify(key);\n }\n cleanup() {\n window.removeEventListener('storage', this._handleNewValue);\n }\n}\n","import './scrollbars.css';\n\n/*\n * Scrollbar Width Test\n * Adds `layout-scrollbar-obtrusive` class to body if scrollbars use up screen real estate\n */\nconst parent = document.createElement(\"div\");\nparent.setAttribute(\"style\", \"width:30px;height:30px;\");\nparent.classList.add('scrollbar-test');\n\nconst child = document.createElement(\"div\");\nchild.setAttribute(\"style\", \"width:100%;height:40px\");\nparent.appendChild(child);\ndocument.body.appendChild(parent);\n\n// Measure the child element, if it is not\n// 30px wide the scrollbars are obtrusive.\nconst scrollbarWidth = 30 - parent.firstChild.clientWidth;\nif(scrollbarWidth) {\n document.body.classList.add(\"layout-scrollbar-obtrusive\");\n}\n\ndocument.body.removeChild(parent);","import React from 'react';\n\nexport default function EditLine(props) {\n return (\n {props.onChange(e.target.value)}}\n placeholder={props.placeholder}\n value={props.value} />\n );\n}","import { Octokit } from '@octokit/rest';\n\nconst userAgent = 'jsGist v0.0.1';\nconst emptyValue = '/*bug-in-github-api-content-can-not-be-empty*/';\n\nfunction getEmptyFileHack(file) {\n return file.content.startsWith(emptyValue)\n ? file.content.substr(emptyValue.length)\n : file.content;\n}\n\n// there are 3 forms current\n//\n// 1. files are stored by filename (legacy)\n// 2. files are stored as JSON (this happens if there are any duplicate names)\n// 3. files are stored by filename and filenames references them in order\n\nexport function getGistContent(gist) {\n const data = JSON.parse(gist.files['jsGist.json'].content);\n // github stores files by filename but we need them in the same order in the array\n // they started with so they go to the correct pane.\n if (data.filenames) {\n data.files = data.filenames.map(name => {\n return {\n name: name,\n content: getEmptyFileHack(gist.files[name]),\n };\n });\n } else {\n // legacy path if there are no filenames\n data.files = Object.entries(gist.files)\n .filter(([name]) => name !== 'jsGist.json')\n .map(([name, file]) => {\n return {\n name,\n content: getEmptyFileHack(file),\n }\n }).concat(data.files || []);\n }\n return data;\n} \n\n/*\n \"url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9\",\n \"forks_url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9/forks\",\n \"commits_url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9/commits\",\n \"id\": \"bad0a8491bd6614e729ff01cc14089c9\",\n \"node_id\": \"MDQ6R2lzdGJhZDBhODQ5MWJkNjYxNGU3MjlmZjAxY2MxNDA4OWM5\",\n \"git_pull_url\": \"https://gist.github.com/bad0a8491bd6614e729ff01cc14089c9.git\",\n \"git_push_url\": \"https://gist.github.com/bad0a8491bd6614e729ff01cc14089c9.git\",\n \"html_url\": \"https://gist.github.com/bad0a8491bd6614e729ff01cc14089c9\",\n \"files\": {\n \"index.css\": {\n \"filename\": \"index.css\",\n \"type\": \"text/css\",\n \"language\": \"CSS\",\n \"raw_url\": \"https://gist.githubusercontent.com/greggman/bad0a8491bd6614e729ff01cc14089c9/raw/1847e2c75f6b76223402f69bada71e72db880605/index.css\",\n \"size\": 243,\n \"truncated\": false,\n \"content\": \"body {\\n margin: 0;\\n}\\n#c {\\n width: 100vw;\\n height: 100vh;\\n display: block;\\n}\\n#info { \\n position: absolute; \\n left: 1em; \\n top: 1em; \\n background: rgba(0,0,0,.8); \\n padding: .5em;\\n color: white;\\n font-family: monospace;\\n}\\n\"\n },\n \"index.html\": {\n \"filename\": \"index.html\",\n \"type\": \"text/html\",\n \"language\": \"HTML\",\n \"raw_url\": \"https://gist.githubusercontent.com/greggman/bad0a8491bd6614e729ff01cc14089c9/raw/c9e9e838f601e2d98d448b035ce3052629969c11/index.html\",\n \"size\": 46,\n \"truncated\": false,\n \"content\": \"\\n
\"\n },\n \"index.js\": {\n \"filename\": \"index.js\",\n \"type\": \"application/javascript\",\n \"language\": \"JavaScript\",\n \"raw_url\": \"https://gist.githubusercontent.com/greggman/bad0a8491bd6614e729ff01cc14089c9/raw/77a7fca481ff157da44f4196ce253ea282f0abdc/index.js\",\n \"size\": 8413,\n \"truncated\": false,\n \"content\": \"import * as THREE from 'https://threejsfundamentals.org/threejs/resources/threejs/r119/build/three.module.js';\\n\\nfunction main() {\\n const canvas = document.querySelector('#c');\\n const renderer = new THREE.WebGLRenderer({canvas: canvas});\\n renderer.setClearColor(0x88AACC);\\n renderer.shadowMap.enabled = true;\\n\\n function makeCamera(fov = 40) {\\n const aspect = 2; // the canvas default\\n const zNear = 0.1;\\n const zFar = 1000;\\n return new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);\\n }\\n const camera = makeCamera();\\n camera.position.set(8, 4, 10).multiplyScalar(3);\\n camera.lookAt(0, 0, 0);\\n\\n const scene = new THREE.Scene();\\n\\n {\\n const light = new THREE.DirectionalLight(0xffffff, 1);\\n light.position.set(0, 20, 0);\\n scene.add(light);\\n light.castShadow = true;\\n light.shadow.mapSize.width = 2048;\\n light.shadow.mapSize.height = 2048;\\n\\n const d = 50;\\n light.shadow.camera.left = -d;\\n light.shadow.camera.right = d;\\n light.shadow.camera.top = d;\\n light.shadow.camera.bottom = -d;\\n light.shadow.camera.near = 1;\\n light.shadow.camera.far = 50;\\n light.shadow.bias = 0.001;\\n }\\n\\n {\\n const light = new THREE.DirectionalLight(0xffffff, 1);\\n light.position.set(1, 2, 4);\\n scene.add(light);\\n }\\n\\n const groundGeometry = new THREE.PlaneBufferGeometry(50, 50);\\n const groundMaterial = new THREE.MeshPhongMaterial({color: 0xCC8866});\\n const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial);\\n groundMesh.rotation.x = Math.PI * -.5;\\n groundMesh.receiveShadow = true;\\n scene.add(groundMesh);\\n\\n const carWidth = 4;\\n const carHeight = 1;\\n const carLength = 8;\\n\\n const tank = new THREE.Object3D();\\n scene.add(tank);\\n\\n const bodyGeometry = new THREE.BoxBufferGeometry(carWidth, carHeight, carLength);\\n const bodyMaterial = new THREE.MeshPhongMaterial({color: 0x66AA88});\\n const bodyMesh = new THREE.Mesh(bodyGeometry, bodyMaterial);\\n bodyMesh.position.y = 1.4;\\n bodyMesh.castShadow = true;\\n tank.add(bodyMesh);\\n\\n const tankCameraFov = 75;\\n const tankCamera = makeCamera(tankCameraFov);\\n tankCamera.position.y = 3;\\n tankCamera.position.z = -6;\\n tankCamera.rotation.y = Math.PI;\\n bodyMesh.add(tankCamera);\\n\\n const wheelRadius = 1;\\n const wheelThickness = .5;\\n const wheelSegments = 6;\\n const wheelGeometry = new THREE.CylinderBufferGeometry(\\n wheelRadius, // top radius\\n wheelRadius, // bottom radius\\n wheelThickness, // height of cylinder\\n wheelSegments);\\n const wheelMaterial = new THREE.MeshPhongMaterial({color: 0x888888});\\n const wheelPositions = [\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, carLength / 3],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, carLength / 3],\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, 0],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, 0],\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, -carLength / 3],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, -carLength / 3],\\n ];\\n const wheelMeshes = wheelPositions.map((position) => {\\n const mesh = new THREE.Mesh(wheelGeometry, wheelMaterial);\\n mesh.position.set(...position);\\n mesh.rotation.z = Math.PI * .5;\\n mesh.castShadow = true;\\n bodyMesh.add(mesh);\\n return mesh;\\n });\\n\\n const domeRadius = 2;\\n const domeWidthSubdivisions = 12;\\n const domeHeightSubdivisions = 12;\\n const domePhiStart = 0;\\n const domePhiEnd = Math.PI * 2;\\n const domeThetaStart = 0;\\n const domeThetaEnd = Math.PI * .5;\\n const domeGeometry = new THREE.SphereBufferGeometry(\\n domeRadius, domeWidthSubdivisions, domeHeightSubdivisions,\\n domePhiStart, domePhiEnd, domeThetaStart, domeThetaEnd);\\n const domeMesh = new THREE.Mesh(domeGeometry, bodyMaterial);\\n domeMesh.castShadow = true;\\n bodyMesh.add(domeMesh);\\n domeMesh.position.y = .5;\\n\\n const turretWidth = .1;\\n const turretHeight = .1;\\n const turretLength = carLength * .75 * .2;\\n const turretGeometry = new THREE.BoxBufferGeometry(\\n turretWidth, turretHeight, turretLength);\\n const turretMesh = new THREE.Mesh(turretGeometry, bodyMaterial);\\n const turretPivot = new THREE.Object3D();\\n turretMesh.castShadow = true;\\n turretPivot.scale.set(5, 5, 5);\\n turretPivot.position.y = .5;\\n turretMesh.position.z = turretLength * .5;\\n turretPivot.add(turretMesh);\\n bodyMesh.add(turretPivot);\\n\\n const turretCamera = makeCamera();\\n turretCamera.position.y = .75 * .2;\\n turretMesh.add(turretCamera);\\n\\n const targetGeometry = new THREE.SphereBufferGeometry(.5, 6, 3);\\n const targetMaterial = new THREE.MeshPhongMaterial({color: 0x00FF00, flatShading: true});\\n const targetMesh = new THREE.Mesh(targetGeometry, targetMaterial);\\n const targetOrbit = new THREE.Object3D();\\n const targetElevation = new THREE.Object3D();\\n const targetBob = new THREE.Object3D();\\n targetMesh.castShadow = true;\\n scene.add(targetOrbit);\\n targetOrbit.add(targetElevation);\\n targetElevation.position.z = carLength * 2;\\n targetElevation.position.y = 8;\\n targetElevation.add(targetBob);\\n targetBob.add(targetMesh);\\n\\n const targetCamera = makeCamera();\\n const targetCameraPivot = new THREE.Object3D();\\n targetCamera.position.y = 1;\\n targetCamera.position.z = -2;\\n targetCamera.rotation.y = Math.PI;\\n targetBob.add(targetCameraPivot);\\n targetCameraPivot.add(targetCamera);\\n\\n // Create a sine-like wave\\n const curve = new THREE.SplineCurve( [\\n new THREE.Vector2( -10, 0 ),\\n new THREE.Vector2( -5, 5 ),\\n new THREE.Vector2( 0, 0 ),\\n new THREE.Vector2( 5, -5 ),\\n new THREE.Vector2( 10, 0 ),\\n new THREE.Vector2( 5, 10 ),\\n new THREE.Vector2( -5, 10 ),\\n new THREE.Vector2( -10, -10 ),\\n new THREE.Vector2( -15, -8 ),\\n new THREE.Vector2( -10, 0 ),\\n ] );\\n\\n const points = curve.getPoints( 50 );\\n const geometry = new THREE.BufferGeometry().setFromPoints( points );\\n const material = new THREE.LineBasicMaterial( { color : 0xff0000 } );\\n const splineObject = new THREE.Line( geometry, material );\\n splineObject.rotation.x = Math.PI * .5;\\n splineObject.position.y = 0.05;\\n scene.add(splineObject);\\n\\n function resizeRendererToDisplaySize(renderer) {\\n const canvas = renderer.domElement;\\n const width = canvas.clientWidth;\\n const height = canvas.clientHeight;\\n const needResize = canvas.width !== width || canvas.height !== height;\\n if (needResize) {\\n renderer.setSize(width, height, false);\\n }\\n return needResize;\\n }\\n\\n const targetPosition = new THREE.Vector3();\\n const tankPosition = new THREE.Vector2();\\n const tankTarget = new THREE.Vector2();\\n\\n const cameras = [\\n { cam: camera, desc: 'detached camera', },\\n { cam: turretCamera, desc: 'on turret looking at target', },\\n { cam: targetCamera, desc: 'near target looking at tank', },\\n { cam: tankCamera, desc: 'above back of tank', },\\n ];\\n\\n const infoElem = document.querySelector('#info');\\n\\n function render(time) {\\n time *= 0.001;\\n\\n if (resizeRendererToDisplaySize(renderer)) {\\n const canvas = renderer.domElement;\\n cameras.forEach((cameraInfo) => {\\n const camera = cameraInfo.cam;\\n camera.aspect = canvas.clientWidth / canvas.clientHeight;\\n camera.updateProjectionMatrix();\\n });\\n }\\n\\n // move target\\n targetOrbit.rotation.y = time * .27;\\n targetBob.position.y = Math.sin(time * 2) * 4;\\n targetMesh.rotation.x = time * 7;\\n targetMesh.rotation.y = time * 13;\\n targetMaterial.emissive.setHSL(time * 10 % 1, 1, .25);\\n targetMaterial.color.setHSL(time * 10 % 1, 1, .25);\\n\\n // move tank\\n const tankTime = time * .05;\\n curve.getPointAt(tankTime % 1, tankPosition);\\n curve.getPointAt((tankTime + 0.01) % 1, tankTarget);\\n tank.position.set(tankPosition.x, 0, tankPosition.y);\\n tank.lookAt(tankTarget.x, 0, tankTarget.y);\\n\\n // face turret at target\\n targetMesh.getWorldPosition(targetPosition);\\n turretPivot.lookAt(targetPosition);\\n\\n // make the turretCamera look at target\\n turretCamera.lookAt(targetPosition);\\n\\n // make the targetCameraPivot look at the at the tank\\n tank.getWorldPosition(targetPosition);\\n targetCameraPivot.lookAt(targetPosition);\\n\\n wheelMeshes.forEach((obj) => {\\n obj.rotation.x = time * 3;\\n });\\n\\n const camera = cameras[time * .25 % cameras.length | 0];\\n infoElem.textContent = camera.desc;\\n\\n renderer.render(scene, camera.cam);\\n\\n requestAnimationFrame(render);\\n }\\n\\n requestAnimationFrame(render);\\n}\\n\\nmain();\\n\"\n },\n \"jsGist.json\": {\n \"filename\": \"jsGist.json\",\n \"type\": \"application/json\",\n \"language\": \"JSON\",\n \"raw_url\": \"https://gist.githubusercontent.com/greggman/bad0a8491bd6614e729ff01cc14089c9/raw/ac014ca1eb788c3c05b1612902b142f59fca3f7c/jsGist.json\",\n \"size\": 60,\n \"truncated\": false,\n \"content\": \"{\\\"name\\\":\\\"ThreeJSFundamentals Scenegraph Tank\\\",\\\"settings\\\":{}}\"\n }\n },\n \"public\": true,\n \"created_at\": \"2020-10-11T08:16:53Z\",\n \"updated_at\": \"2020-11-04T17:41:21Z\",\n \"description\": \"ThreeJSFundamentals Scenegraph Tank\",\n \"comments\": 9,\n \"user\": null,\n \"comments_url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9/comments\",\n \"owner\": {\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 },\n \"forks\": [\n\n ],\n \"history\": [\n {\n \"user\": {\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 },\n \"version\": \"fcbedffeccec982c99bc3963ed77f41762a8dd5a\",\n \"committed_at\": \"2020-10-17T02:08:28Z\",\n \"change_status\": {\n \"total\": 4,\n \"additions\": 2,\n \"deletions\": 2\n },\n \"url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9/fcbedffeccec982c99bc3963ed77f41762a8dd5a\"\n },\n {\n \"user\": {\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 },\n \"version\": \"16bda36d8000991414a7240edaf7f5aa709183af\",\n \"committed_at\": \"2020-10-11T08:16:53Z\",\n \"change_status\": {\n \"total\": 273,\n \"additions\": 273,\n \"deletions\": 0\n },\n \"url\": \"https://api.github.com/gists/bad0a8491bd6614e729ff01cc14089c9/16bda36d8000991414a7240edaf7f5aa709183af\"\n }\n ],\n \"truncated\": false\n}\n*/\nexport async function getAnonGist(gist_id) {\n const req = await fetch(`https://api.github.com/gists/${gist_id}`);\n const gist = await req.json();\n return {\n data: getGistContent(gist),\n rawData: gist,\n };\n}\n\nexport function getUserData(data) {\n return (data && data.owner)\n ? {\n name: data.owner.login,\n avatarURL: data.owner.avatar_url,\n }\n : undefined;\n}\n\nfunction createGistData(data, secret, gist_id) {\n let files = data.files.reduce((files, file) => {\n files[file.name] = {\n content: file.content.trim() ? file.content : `${emptyValue}${file.content}`,\n };\n return files;\n }, {});\n const saveData = {\n ...data,\n };\n const jsGistData = {}\n files['jsGist.json'] = jsGistData;\n const noDuplicateNames = Object.keys(files).length === data.files.length + 1;\n if (noDuplicateNames) {\n delete saveData.files;\n saveData.filenames = data.files.map(({name}) => name);\n } else {\n // save the files in the json\n files = {\n 'jsGist.json': jsGistData,\n };\n }\n jsGistData.content = JSON.stringify(saveData);\n if (gist_id) {\n // TODO: rather than check if there's a readme\n // insert the readme in our wrapped readme.\n // Maybe add a \"notes\" field to the save dialog\n const lowerCaseFiles = Object.keys(files).map(n => n.toLowerCase());\n const hadReadme = \n lowerCaseFiles.includes('readme.md') ||\n lowerCaseFiles.includes('readme.txt') ||\n lowerCaseFiles.includes('readme');\n if (!hadReadme) {\n const content = `## ${data.name}\\n\\n[view on jsgist](${window.location.origin}?src=${gist_id})`\n files['README.md'] = {content};\n }\n // if we have a gist_id this is an update\n // updates need filenames (which allows renaming)\n for (const [filename, file] of Object.entries(files)) {\n file.filename = filename;\n }\n }\n return {\n files,\n description: data.name,\n ...(!gist_id && {public: !secret}),\n ...(gist_id && {gist_id}),\n };\n}\n\nexport default class GitHub extends EventTarget {\n constructor() {\n super();\n this.pat = '';\n this.user = {};\n this.unAuthorizedOctokit = new Octokit({\n userAgent,\n });\n }\n get octokit() {\n return this.authorizedOctokit || this.unAuthorizedOctokit;\n }\n // TODO: this does not belong here!\n _updateUserData(data) {\n const userData = getUserData(data);\n if (userData) {\n Object.assign(this.user, userData);\n const event = new Event('userdata');\n event.data = {...this.user};\n this.dispatchEvent(event);\n }\n }\n setPat(pat) {\n if (pat !== this.pat) {\n this.pat = pat;\n if (pat) {\n this.authorizedOctokit = new Octokit({\n auth: pat,\n userAgent,\n });\n } else {\n this.authorizedOctokit = undefined;\n }\n }\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\": 79,\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 async getAuthenticatedUser() {\n const response = await this.authorizedOctokit.users.getAuthenticated();\n if (response.status !== 200) {\n throw new Error(response.message);\n }\n return response.data;\n }\n\n async getUserGists(since) {\n const gists = await this.authorizedOctokit.paginate(\n this.authorizedOctokit.gists.list,\n {\n per_page: 100,\n ...(since && {since}),\n });\n return gists.filter(gist => !!gist.files['jsGist.json']);\n // return await this.authorizedOctokit.gists.list();\n }\n\n async getGist(gist_id) {\n // I'm not sure where this should happen. The issue is if the user's\n // token has expired, then loading a gist fails, even if it's public.\n const octokit = this.authorizedOctokit || this.octokit;\n const gist = await octokit.gists.get({gist_id});\n return {\n data: getGistContent(gist.data),\n rawData: gist.data,\n };\n }\n\n async createGist(data, secret = false) {\n // TODO: Since we're doing the double save (create gist to get an id\n // so we can make the README.me) we should probably not send any data\n // the first time.\n const gistData = createGistData(data, secret);\n const gist = await this.authorizedOctokit.gists.create(gistData);\n this._updateUserData(gist.data);\n return await this.updateGist(gist.data.id, data);\n }\n async updateGist(gist_id, data) {\n const gistData = createGistData(data, false, gist_id);\n const gist = await this.authorizedOctokit.gists.update(gistData);\n return {\n id: gist.data.id,\n name: gist.data.description,\n date: gist.data.updated_at,\n public: gist.data.public,\n };\n }\n async forkGist(gist_id) {\n const gist = await this.authorizedOctokit.gists.fork({gist_id});\n return {\n id: gist.data.id\n };\n }\n async deleteGist(gist_id) {\n const result = await this.authorizedOctokit.gists.delete({gist_id});\n return result;\n }\n async createGistComment(gist_id, body) {\n const result = await this.authorizedOctokit.gists.createComment({\n gist_id,\n body,\n });\n if (result.status < 200 || result.status >= 300) {\n throw new Error(result.message);\n }\n return result.data;\n }\n}\n\n","import React from 'react';\n\nexport default function Head() {\n return (\n
\n \n
\n
\n \n \"github\"\n \n
\n
\n
\n );\n}","import React from 'react';\n\nexport default class Dialog extends React.Component {\n componentDidMount() {\n window.addEventListener('keydown', this.handleKeyDown);\n }\n componentWillUnmount() {\n window.removeEventListener('keydown', this.handleKeyDown);\n }\n handleKeyDown = (e) => {\n if (e.keyCode === 27) {\n this.props.onClose();\n }\n }\n render() {\n const {title, children, onClose, className = ''} = this.props;\n return (\n
\n {e.stopPropagation()}}\n >\n
\n
{title}
\n
\n \n
\n
\n
\n {children}\n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport Dialog from './Dialog.js';\n\nexport default function Help(props) {\n const {onClose} = props;\n return (\n \n
\n

A gist based JavaScript/HTML/CSS Playground

\n

Contribute, Fix, Enhance!

\n

\n https://github.com/greggman/jsgist\n

\n

Also see jsbenchit.org

\n

Saving

\n

You can save your tests in multiple ways.

\n
    \n
  1. Save to a github gist by logging in
  2. \n
  3. Save it manually into github\n

    \n Copy the JSON. Go to github. Create a new gist. Name the file\n jsGist.json Paste the JSON in. Pick \"Create public gist\".\n

    \n

    \n Note the id in the URL after you create the gist.\n

    \n

    \n Create a url in the form https://jsgist.org/?src=<gist_id>--.\n

    \n

    \n Example: https://jsgist.org/?src=f793cb359f2571409983351a6099d5d1\n

    \n
  4. \n
  5. Save it manually somewhere else.\n

    \n If there's some other service that will provide a string via\n http get then copy and save the JSON there then create a URL\n in the form of https://jsgist.org/?src=<url>. Note: you\n may have to escape the URL.\n

    \n
  6. \n
  7. Save it as a bookmark or link\n

    \n In the SaveAs dialog there's a link that contains all the data\n for your benchmark.\n

    \n
  8. \n
\n
\n
\n );\n}","const camelCaseRE = /([a-z])([A-Z])/g;\nconst toDash = (_, left, right) => `${left}-${right}`;\nconst camelCaseToDash = s => s.replace(camelCaseRE, toDash).toLowerCase();\n\nexport function classNames(...args) {\n const names = [];\n for (const arg of args) {\n if (typeof arg === 'string') {\n names.push(arg);\n } else {\n for (const [key, value] of Object.entries(arg)) {\n if (value) {\n names.push(camelCaseToDash(key));\n }\n }\n }\n }\n return names.join(' ');\n}","import React from 'react';\n\nconst ServiceContext = React.createContext();\nexport default ServiceContext;\n","import React from 'react';\n\nimport {classNames} from '../libs/css-utils';\nimport ServiceContext from '../ServiceContext.js';\n\nfunction basename(url) {\n const ndx = url.lastIndexOf('/');\n return ndx >= 0 ? url.substr(ndx + 1) : url;\n}\n\nfunction isMsgSame(oldMsg, newMsg) {\n if (!!oldMsg !== !!newMsg) {\n return false;\n }\n const keys = Object.keys(oldMsg).filter(key => key !== 'count');\n if (keys.length !== Object.keys(newMsg).length) {\n return false;\n }\n for (const key of keys) {\n if (oldMsg[key] !== newMsg[key]) {\n return false;\n }\n }\n return true;\n}\n\nexport class LogManager extends EventTarget {\n constructor() {\n super();\n this._msgs = [];\n }\n _notify() {\n this.dispatchEvent(new Event('change'));\n }\n clear = () => {\n this._msgs = [];\n this._notify();\n }\n _addMsg = (data) => {\n const lastData = this._msgs[this._msgs.length - 1];\n if (isMsgSame(lastData, data)) {\n lastData.count = (lastData.count || 0) + 1;\n } else {\n this._msgs.push(data);\n }\n }\n addMsg = (data) => {\n this._addMsg(data);\n this._notify();\n }\n addMsgs = (msgs) => {\n for (const {type, data} of msgs) {\n switch (type) {\n case 'jsError':\n this._addMsg({...data, type: 'error', showStack: true});\n break;\n case 'jsUnhandledRejection':\n this._addMsg({...data, type: 'error', showStack: true});\n break;\n default:\n this._addMsg(data);\n break;\n }\n }\n this._notify();\n }\n getMsgs() {\n return this._msgs\n }\n}\n\nexport default class Log extends React.Component {\n constructor(props) {\n super(props);\n this.logMessagesRef = React.createRef();\n }\n handleChange = () => {\n this.forceUpdate();\n }\n componentDidMount() {\n const {logManager} = this.context;\n logManager.addEventListener('change', this.handleChange);\n }\n componentWillUnmount() {\n const {logManager} = this.context;\n logManager.removeEventListener('change', this.handleChange);\n }\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (snapshot !== null) {\n // if we were at the bottom of the log then\n // stay at the bottom of the log\n if (snapshot < 1) {\n const elem = this.logMessagesRef.current;\n elem.scrollTop = elem.scrollHeight - elem.parentElement.clientHeight;\n }\n }\n }\n getSnapshotBeforeUpdate(prevProps, prevState) {\n const elem = this.logMessagesRef.current;\n return elem.scrollHeight - (elem.scrollTop + elem.parentElement.clientHeight);\n }\n render() {\n const {onGoToLine} = this.props;\n const {logManager} = this.context;\n return (\n
\n
\n { logManager.getMsgs().map((msg, ndx) => {\n const tooltip = !msg.section;\n return (\n
\n
{msg.count ? msg.count : ''}
\n
\n {msg.msg}\n   {/* this is to prevent auto-selection to the next element when double clicking */}\n onGoToLine(msg)}\n data-tooltip={`${msg.section || msg.url}:${msg.lineNo}`}\n >\n {msg.section || basename(msg.url || '')}:{msg.lineNo}\n
\n
\n
\n );\n })}\n
\n \n );\n }\n}\n\nLog.contextType = ServiceContext;","export function createURL(base, params) {\n const url = new URL(base);\n const searchParams = new URLSearchParams(url.search);\n for (const [key, value] of Object.entries(params)) {\n if (value === undefined) {\n searchParams.delete(key);\n } else {\n searchParams.set(key, value);\n }\n }\n url.search = searchParams.toString();\n return url.href;\n}\n\nexport function updateURL(params) {\n const url = createURL(window.location.href, params);\n window.history.replaceState({}, '', url.href);\n}\n\n","type Handler = (data: any) => void;\ntype StringToHandlers = Map;\nconst nullHandlers : StringToHandlers = new Map();\nconst fromToHandlersMap : Map = new Map([[null, nullHandlers]]);\n\nexport function on(type: string, from: Window | null, fn: (data: any) => void) {\n remove(type, from, fn);\n let handlers = fromToHandlersMap.get(from);\n if (!handlers) {\n handlers = new Map();\n fromToHandlersMap.set(from, handlers)\n }\n let fns = handlers.get(type);\n if (!fns) {\n fns = [];\n handlers.set(type, fns);\n }\n fns.push(fn);\n}\n\nexport function remove(type: string, from: Window | null, fn: (data: any) => void) {\n let handlers = fromToHandlersMap.get(from);\n if (!handlers) {\n return;\n }\n const fns = handlers.get(type);\n if (fns) {\n const ndx = fns.indexOf(fn);\n if (ndx >= 0) {\n fns.splice(ndx, 1);\n }\n if (fns.length === 0) {\n handlers.delete(type);\n if (handlers.size === 0 && from) {\n fromToHandlersMap.delete(from);\n }\n }\n }\n}\n\nfunction callHandler(handlers: StringToHandlers, type: string, data: any) {\n const fns = handlers.get(type);\n if (fns) {\n for (const fn of fns) {\n fn(data);\n }\n return true;\n }\n return false;\n}\n\nwindow.addEventListener('message', (e: MessageEvent) => {\n const {type, data} = e.data;\n const handlers = fromToHandlersMap.get(e.source as Window);\n if (handlers) {\n if (callHandler(handlers, type, data)) {\n return;\n }\n }\n callHandler(nullHandlers, type, data);\n});\n\n","import React from 'react';\n\nimport {isDevelopment} from '../libs/flags.js';\nimport ServiceContext from '../ServiceContext.js';\nimport {createURL} from '../libs/url.js';\nimport * as winMsgMgr from '../libs/WindowMessageManager';\n\nexport default class Runner extends React.Component {\n constructor(props) {\n super(props);\n this.runnerRef = React.createRef();\n }\n handleJSLog = (data) => {\n const {logManager} = this.context;\n logManager.addMsg(data);\n }\n handleJSError = (data) => {\n const {logManager} = this.context;\n logManager.addMsg({...data, type: 'error', showStack: true});\n }\n handleJSUnhandledRejection = (data) => {\n const {logManager} = this.context;\n logManager.addMsg({...data, type: 'error', showStack: true});\n }\n handleInfoMessages = (data) => {\n const {logManager} = this.context;\n logManager.addMsgs(data);\n }\n handleGimmeDaCodez = () => {\n this.iframe.contentWindow.postMessage({\n type: 'run',\n data: this.data,\n }, \"*\");\n }\n componentDidMount() {\n const {registerAPI} = this.props;\n\n const {debug} = Object.fromEntries(new URLSearchParams(window.location.search).entries());\n const extra = {\n ...(debug && {debug}),\n };\n\n registerAPI({\n run: (data, blank) => {\n this.data = data;\n this.removeIFrame();\n const iframe = document.createElement('iframe');\n this.iframe = iframe;\n iframe.src = isDevelopment\n ? createURL(`http://${window.location.hostname}:8081/runner-03.html`, {url: `http://${window.location.hostname}:8080/jsgist-runner.js`, ...extra})\n : createURL('https://jsgistrunner.devcomments.org/runner-03.html', {url: 'https://jsgist.org/jsgist-runner.js', ...extra});\n if (blank) {\n iframe.style.background = 'none';\n }\n this.runnerRef.current.appendChild(iframe);\n },\n })\n winMsgMgr.on('gimmeDaCodez', null, this.handleGimmeDaCodez);\n winMsgMgr.on('jsLog', null, this.handleJSLog);\n winMsgMgr.on('jsError', null, this.handleJSError);\n winMsgMgr.on('jsUnhandledRejection', null, this.handleJSUnhandledRejection);\n winMsgMgr.on('infoMessages', null, this.handleInfoMessages);\n }\n removeIFrame() {\n if (this.iframe) {\n this.iframe.remove();\n this.iframe.src = 'about:blank';\n this.iframe = undefined;\n }\n }\n componentWillUnmount() {\n this.removeIFrame();\n winMsgMgr.remove('gimmeDaCodez', null, this.handleGimmeDaCodez);\n winMsgMgr.remove('jsLog', null, this.handleJSLog);\n winMsgMgr.remove('jsError', null, this.handleJSError);\n winMsgMgr.remove('jsUnhandledRejection', null, this.handleJSUnhandledRejection);\n winMsgMgr.remove('infoMessages', null, this.handleInfoMessages);\n }\n handleMessage = (e) => {\n const {type, data} = e.data;\n const fn = this.handlers[type];\n if (fn) {\n fn(data);\n }\n }\n render() {\n return (\n
\n )\n }\n}\n\nRunner.contextType = ServiceContext;","import Ajv from 'ajv';\n\nimport {isDevelopment} from './flags.js';\nimport schema from './schema.json';\n\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst validator = ajv.compile(schema);\n\nconst trackedValues = {};\n\nfunction getValueOrMakeNew(name) {\n const trackedValue = trackedValues[name] || {\n subscriptions: new Set(),\n };\n trackedValues[name] = trackedValue;\n return trackedValue;\n}\n\nexport function add(name, initialValue) {\n const trackedValue = getValueOrMakeNew(name);\n if (initialValue !== undefined) {\n trackedValue.value = initialValue;\n }\n return trackedValue;\n}\n\nexport function get(name) {\n return trackedValues[name].value;\n}\n\nexport function set(name, newValue) {\n const trackedValue = trackedValues[name];\n if (!trackedValue) {\n throw new Error(`no such track value: ${name}`);\n }\n trackedValue.value = newValue;\n const fns = [...trackedValue.subscriptions.keys()];\n for (const fn of fns) {\n fn(newValue, name);\n }\n}\n\nexport function subscribe(name, fn) {\n const trackedValue = getValueOrMakeNew(name);\n trackedValue.subscriptions.add(fn);\n}\n\nexport function unsubscribe(name, fn) {\n const trackedValue = getValueOrMakeNew(name);\n trackedValue.subscriptions.delete(fn);\n}\n\nconst newTestData = {\n \"name\": \"My jsGist\",\n \"settings\": {},\n \"files\": [\n {\n name: \"index.html\",\n content: \"\",\n },\n {\n name: \"index.css\",\n content: \"\",\n },\n {\n name: \"index.js\",\n content: \"\",\n },\n ],\n};\nexport function getNewData() {\n return JSON.parse(JSON.stringify(newTestData));\n}\nexport function getBlankData() {\n const url = `${window.location.origin}/resources/images/logo.svg`;\n return JSON.parse(JSON.stringify({\n \"name\": \"jsGist\",\n \"settings\": {},\n \"files\": [\n {\n \"name\": \"index.html\",\n \"content\": ``,\n },\n {\n \"name\": \"index.css\",\n \"content\": `\n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n background-image: url(${url});\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 `,\n },\n {\n \"name\": \"index.js\",\n \"content\": \"\",\n }\n ]\n }));\n}\n\nlet data;\nexport function getData() {\n return data;\n}\n\nexport const dataVersionKey = 'dataVersion';\nexport const updateVersionKey = 'updateVersion';\nexport const filesVersionKey = 'filesVersion';\n\nadd(dataVersionKey, 0); // any data changes (when an item in the data is change)\nadd(updateVersionKey, 0); // all data changes (when the entire data objects replaced with new data)\nadd(filesVersionKey, 0); // files added or removed or the main name is changed\n\nconst incVersion = key => set(key, get(key) + 1);\nconst incDataVersion = _ => incVersion(dataVersionKey);\nconst incFilesVersion = _ => incVersion(filesVersionKey);\nconst incUpdateVersion = _ => {\n incVersion(updateVersionKey);\n incDataVersion();\n incFilesVersion();\n};\n\nfunction getUniqueName(basename) {\n const filenames = new Set(data.files.map(f => f.name));\n for (let count = data.files.length + 1; ; ++count) {\n const name = `${basename}${count}`;\n if (!filenames.has(name)) {\n return name;\n }\n }\n}\n\nexport function addFile(name = \"\", content = \"\") {\n name = name || getUniqueName('unnamed');\n data.files.push({\n name,\n content,\n });\n incDataVersion();\n incFilesVersion();\n}\n\nexport function setName(name) {\n data.name = name;\n incDataVersion();\n incFilesVersion();\n}\n\nexport function setFileName(ndx, newName) {\n data.files[ndx].name = newName;\n incDataVersion();\n}\n\nexport function setFileContent(ndx, content) {\n data.files[ndx].content = content;\n incDataVersion();\n}\n\nexport function setFileType(ndx, type) {\n data.files[ndx].type = type;\n incDataVersion();\n}\n\nexport function deleteFile(ndx) {\n data.files.splice(ndx, 1);\n incDataVersion();\n incFilesVersion();\n}\n\nexport function validate(data) {\n if (!validator(data)) {\n throw new Error(`data not valid:\\n${validator.errors.map(e => `${e.message}: ${e.dataPath}`)}`);\n }\n}\n\nexport function setData(newData) {\n validate(newData);\n data = newData;\n if (isDevelopment) {\n window.d = data;\n }\n incUpdateVersion();\n}\n\nsetData(isDevelopment ? {\n \"name\": \"ThreeJSFundamentals Scenegraph Tank\",\n \"settings\": {},\n \"files\": [\n {\n \"name\": \"index.html\",\n \"content\": \"\\n
\",\n },\n {\n \"name\": \"index.css\",\n \"content\": \"body {\\n margin: 0;\\n}\\n#c {\\n width: 100vw;\\n height: 100vh;\\n display: block;\\n}\\n#info { \\n position: absolute; \\n left: 1em; \\n top: 1em; \\n background: rgba(0,0,0,.8); \\n padding: .5em;\\n color: white;\\n font-family: monospace;\\n}\",\n },\n {\n \"name\": \"index.js\",\n \"content\": \"import * as THREE from 'https://threejsfundamentals.org/threejs/resources/threejs/r119/build/three.module.js';\\n\\nfunction main() {\\n const canvas = document.querySelector('#c');\\n const renderer = new THREE.WebGLRenderer({canvas: canvas});\\n renderer.setClearColor(0xAAAAAA);\\n renderer.shadowMap.enabled = true;\\n\\n function makeCamera(fov = 40) {\\n const aspect = 2; // the canvas default\\n const zNear = 0.1;\\n const zFar = 1000;\\n return new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);\\n }\\n const camera = makeCamera();\\n camera.position.set(8, 4, 10).multiplyScalar(3);\\n camera.lookAt(0, 0, 0);\\n\\n const scene = new THREE.Scene();\\n\\n {\\n const light = new THREE.DirectionalLight(0xffffff, 1);\\n light.position.set(0, 20, 0);\\n scene.add(light);\\n light.castShadow = true;\\n light.shadow.mapSize.width = 2048;\\n light.shadow.mapSize.height = 2048;\\n\\n const d = 50;\\n light.shadow.camera.left = -d;\\n light.shadow.camera.right = d;\\n light.shadow.camera.top = d;\\n light.shadow.camera.bottom = -d;\\n light.shadow.camera.near = 1;\\n light.shadow.camera.far = 50;\\n light.shadow.bias = 0.001;\\n }\\n\\n {\\n const light = new THREE.DirectionalLight(0xffffff, 1);\\n light.position.set(1, 2, 4);\\n scene.add(light);\\n }\\n\\n const groundGeometry = new THREE.PlaneBufferGeometry(50, 50);\\n const groundMaterial = new THREE.MeshPhongMaterial({color: 0xCC8866});\\n const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial);\\n groundMesh.rotation.x = Math.PI * -.5;\\n groundMesh.receiveShadow = true;\\n scene.add(groundMesh);\\n\\n const carWidth = 4;\\n const carHeight = 1;\\n const carLength = 8;\\n\\n const tank = new THREE.Object3D();\\n scene.add(tank);\\n\\n const bodyGeometry = new THREE.BoxBufferGeometry(carWidth, carHeight, carLength);\\n const bodyMaterial = new THREE.MeshPhongMaterial({color: 0x6688AA});\\n const bodyMesh = new THREE.Mesh(bodyGeometry, bodyMaterial);\\n bodyMesh.position.y = 1.4;\\n bodyMesh.castShadow = true;\\n tank.add(bodyMesh);\\n\\n const tankCameraFov = 75;\\n const tankCamera = makeCamera(tankCameraFov);\\n tankCamera.position.y = 3;\\n tankCamera.position.z = -6;\\n tankCamera.rotation.y = Math.PI;\\n bodyMesh.add(tankCamera);\\n\\n const wheelRadius = 1;\\n const wheelThickness = .5;\\n const wheelSegments = 6;\\n const wheelGeometry = new THREE.CylinderBufferGeometry(\\n wheelRadius, // top radius\\n wheelRadius, // bottom radius\\n wheelThickness, // height of cylinder\\n wheelSegments);\\n const wheelMaterial = new THREE.MeshPhongMaterial({color: 0x888888});\\n const wheelPositions = [\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, carLength / 3],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, carLength / 3],\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, 0],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, 0],\\n [-carWidth / 2 - wheelThickness / 2, -carHeight / 2, -carLength / 3],\\n [ carWidth / 2 + wheelThickness / 2, -carHeight / 2, -carLength / 3],\\n ];\\n const wheelMeshes = wheelPositions.map((position) => {\\n const mesh = new THREE.Mesh(wheelGeometry, wheelMaterial);\\n mesh.position.set(...position);\\n mesh.rotation.z = Math.PI * .5;\\n mesh.castShadow = true;\\n bodyMesh.add(mesh);\\n return mesh;\\n });\\n\\n const domeRadius = 2;\\n const domeWidthSubdivisions = 12;\\n const domeHeightSubdivisions = 12;\\n const domePhiStart = 0;\\n const domePhiEnd = Math.PI * 2;\\n const domeThetaStart = 0;\\n const domeThetaEnd = Math.PI * .5;\\n const domeGeometry = new THREE.SphereBufferGeometry(\\n domeRadius, domeWidthSubdivisions, domeHeightSubdivisions,\\n domePhiStart, domePhiEnd, domeThetaStart, domeThetaEnd);\\n const domeMesh = new THREE.Mesh(domeGeometry, bodyMaterial);\\n domeMesh.castShadow = true;\\n bodyMesh.add(domeMesh);\\n domeMesh.position.y = .5;\\n\\n const turretWidth = .1;\\n const turretHeight = .1;\\n const turretLength = carLength * .75 * .2;\\n const turretGeometry = new THREE.BoxBufferGeometry(\\n turretWidth, turretHeight, turretLength);\\n const turretMesh = new THREE.Mesh(turretGeometry, bodyMaterial);\\n const turretPivot = new THREE.Object3D();\\n turretMesh.castShadow = true;\\n turretPivot.scale.set(5, 5, 5);\\n turretPivot.position.y = .5;\\n turretMesh.position.z = turretLength * .5;\\n turretPivot.add(turretMesh);\\n bodyMesh.add(turretPivot);\\n\\n const turretCamera = makeCamera();\\n turretCamera.position.y = .75 * .2;\\n turretMesh.add(turretCamera);\\n\\n const targetGeometry = new THREE.SphereBufferGeometry(.5, 6, 3);\\n const targetMaterial = new THREE.MeshPhongMaterial({color: 0x00FF00, flatShading: true});\\n const targetMesh = new THREE.Mesh(targetGeometry, targetMaterial);\\n const targetOrbit = new THREE.Object3D();\\n const targetElevation = new THREE.Object3D();\\n const targetBob = new THREE.Object3D();\\n targetMesh.castShadow = true;\\n scene.add(targetOrbit);\\n targetOrbit.add(targetElevation);\\n targetElevation.position.z = carLength * 2;\\n targetElevation.position.y = 8;\\n targetElevation.add(targetBob);\\n targetBob.add(targetMesh);\\n\\n const targetCamera = makeCamera();\\n const targetCameraPivot = new THREE.Object3D();\\n targetCamera.position.y = 1;\\n targetCamera.position.z = -2;\\n targetCamera.rotation.y = Math.PI;\\n targetBob.add(targetCameraPivot);\\n targetCameraPivot.add(targetCamera);\\n\\n // Create a sine-like wave\\n const curve = new THREE.SplineCurve( [\\n new THREE.Vector2( -10, 0 ),\\n new THREE.Vector2( -5, 5 ),\\n new THREE.Vector2( 0, 0 ),\\n new THREE.Vector2( 5, -5 ),\\n new THREE.Vector2( 10, 0 ),\\n new THREE.Vector2( 5, 10 ),\\n new THREE.Vector2( -5, 10 ),\\n new THREE.Vector2( -10, -10 ),\\n new THREE.Vector2( -15, -8 ),\\n new THREE.Vector2( -10, 0 ),\\n ] );\\n\\n const points = curve.getPoints( 50 );\\n const geometry = new THREE.BufferGeometry().setFromPoints( points );\\n const material = new THREE.LineBasicMaterial( { color : 0xff0000 } );\\n const splineObject = new THREE.Line( geometry, material );\\n splineObject.rotation.x = Math.PI * .5;\\n splineObject.position.y = 0.05;\\n scene.add(splineObject);\\n\\n function resizeRendererToDisplaySize(renderer) {\\n const canvas = renderer.domElement;\\n const width = canvas.clientWidth;\\n const height = canvas.clientHeight;\\n const needResize = canvas.width !== width || canvas.height !== height;\\n if (needResize) {\\n renderer.setSize(width, height, false);\\n }\\n return needResize;\\n }\\n\\n const targetPosition = new THREE.Vector3();\\n const tankPosition = new THREE.Vector2();\\n const tankTarget = new THREE.Vector2();\\n\\n const cameras = [\\n { cam: camera, desc: 'detached camera', },\\n { cam: turretCamera, desc: 'on turret looking at target', },\\n { cam: targetCamera, desc: 'near target looking at tank', },\\n { cam: tankCamera, desc: 'above back of tank', },\\n ];\\n\\n const infoElem = document.querySelector('#info');\\n\\n function render(time) {\\n time *= 0.001;\\n\\n if (resizeRendererToDisplaySize(renderer)) {\\n const canvas = renderer.domElement;\\n cameras.forEach((cameraInfo) => {\\n const camera = cameraInfo.cam;\\n camera.aspect = canvas.clientWidth / canvas.clientHeight;\\n camera.updateProjectionMatrix();\\n });\\n }\\n\\n // move target\\n targetOrbit.rotation.y = time * .27;\\n targetBob.position.y = Math.sin(time * 2) * 4;\\n targetMesh.rotation.x = time * 7;\\n targetMesh.rotation.y = time * 13;\\n targetMaterial.emissive.setHSL(time * 10 % 1, 1, .25);\\n targetMaterial.color.setHSL(time * 10 % 1, 1, .25);\\n\\n // move tank\\n const tankTime = time * .05;\\n curve.getPointAt(tankTime % 1, tankPosition);\\n curve.getPointAt((tankTime + 0.01) % 1, tankTarget);\\n tank.position.set(tankPosition.x, 0, tankPosition.y);\\n tank.lookAt(tankTarget.x, 0, tankTarget.y);\\n\\n // face turret at target\\n targetMesh.getWorldPosition(targetPosition);\\n turretPivot.lookAt(targetPosition);\\n\\n // make the turretCamera look at target\\n turretCamera.lookAt(targetPosition);\\n\\n // make the targetCameraPivot look at the at the tank\\n tank.getWorldPosition(targetPosition);\\n targetCameraPivot.lookAt(targetPosition);\\n\\n wheelMeshes.forEach((obj) => {\\n obj.rotation.x = time * 3;\\n });\\n\\n const camera = cameras[time * .25 % cameras.length | 0];\\n infoElem.textContent = camera.desc;\\n\\n renderer.render(scene, camera.cam);\\n\\n requestAnimationFrame(render);\\n }\\n\\n requestAnimationFrame(render);\\n}\\n\\nmain();\\n\",\n }\n ]\n} : getNewData());\n","const query = Object.fromEntries(new URLSearchParams(window.location.search).entries());\nexport default query;","import {storageManager} from '../globals.js';\nimport * as model from './model.js';\nimport query from '../libs/start-query.js';\n\nconst settingsKey = 'ui-settings';\n\n// This sucks but Monaco doesn't work on mobile\nconst canMonaco = !query.codeMirror && !(/webOS|iPhone|iPad|Android/.test(navigator.userAgent));\n\nlet initialized = false;\nlet settings;\n\nconst defaultSettings = {\n layout: (window.screen.width < 540 || window.screen.height < 540) ? 3 : 0,\n editor: canMonaco ? 'monaco' : 'codemirror',\n lineNumbers: true,\n tabs: false,\n showWhitespace: false,\n}\n\nfunction init() {\n if (initialized) {\n return;\n }\n initialized = true;\n try {\n settings = JSON.parse(storageManager.get(settingsKey, true));\n if (!settings) {\n throw new Error('no settings');\n }\n } catch (e) {\n settings = {...defaultSettings};\n }\n for (const [key, value] of Object.entries(defaultSettings)) {\n if (typeof value !== typeof settings[key]) {\n settings[key] = value;\n }\n }\n}\n\nmodel.add('settings', settings);\n\nexport function set(name, value) {\n settings[name] = value;\n const json = JSON.stringify(settings);\n storageManager.set(settingsKey, json, true);\n model.set('settings', settings);\n}\n\nexport function get() {\n init();\n return settings;\n}\n\nexport function subscribe(fn) {\n model.subscribe('settings', fn);\n}\n\nexport function unsubscribe(fn) {\n model.unsubscribe('settings', fn);\n}\n","import Ajv from 'ajv';\nimport React from 'react';\nimport Split from 'react-split-it';\nimport Log from './Log.js';\nimport Runner from './Runner.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nconst kUIStateKey = 'layout1';\n\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"vSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n },\n \"required\": [\"vSizes\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nexport default class Layout extends React.Component {\n constructor(props) {\n super(props);\n const state = uiModel.get()[kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n vSizes: [0.95, 0.05],\n };\n }\n onSetVSizes = (sizes) => {\n this.setState({vSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n render() {\n const {registerRunnerAPI} = this.props;\n const {vSizes} = this.state;\n return (\n \n \n \n \n );\n };\n}","import React from 'react';\nimport {Controlled as CodeMirror} from 'react-codemirror2';\nimport 'codemirror/lib/codemirror.css';\nimport 'codemirror/theme/material.css';\nimport 'codemirror/theme/eclipse.css';\nimport 'codemirror/mode/css/css.js';\nimport 'codemirror/mode/gfm/gfm.js';\nimport 'codemirror/mode/htmlmixed/htmlmixed.js';\nimport 'codemirror/mode/javascript/javascript.js';\nimport 'codemirror/addon/scroll/simplescrollbars.js';\nimport 'codemirror/addon/scroll/simplescrollbars.css';\nimport 'codemirror/addon/search/search.js';\nimport 'codemirror/addon/search/searchcursor.js';\nimport 'codemirror/addon/search/jump-to-line.js';\nimport 'codemirror/addon/dialog/dialog.js';\nimport 'codemirror/addon/dialog/dialog.css';\nimport 'codemirror/addon/edit/matchbrackets.js';\nimport 'codemirror/addon/edit/matchtags.js';\nimport 'codemirror/addon/fold/xml-fold.js';\n\nconst darkMatcher = window.matchMedia\n ? window.matchMedia('(prefers-color-scheme: dark)')\n : {};\n// darkMatcher.addListener(render);\n\nconst noop = () => {};\n\nexport default class CodeCodeMirror extends React.Component {\n constructor(props) {\n super(props);\n const {value, hackKey} = props;\n this.state = {value, hackKey}\n }\n static getDerivedStateFromProps(props, state) {\n const needNewData = state.hackKey !== props.hackKey;\n return (needNewData)\n ? {hackKey: props.hackKey, value: props.value}\n : null;\n }\n componentDidMount() {\n const {registerAPI} = this.props;\n if (registerAPI) {\n registerAPI({\n goToLine: (lineNo, colNo) => {\n this.editor.focus();\n this.editor.doc.setCursor(lineNo - 1, colNo - 1);\n },\n refresh: _ => {\n this.editor.refresh();\n },\n focus: _ => {\n this.editor.focus();\n },\n });\n }\n }\n registerEditor = (editor) => {\n this.editor = editor;\n editor.setOption(\"extraKeys\", {\n Tab: (cm) => {\n const str = this.tabs ? '\\t' : ''.padEnd(cm.getOption(\"indentUnit\") + 1);\n cm.replaceSelection(str);\n }\n });\n }\n render() {\n const {options = {}, onValueChange = noop, ui} = this.props;\n const {value} = this.state;\n const isDarkMode = darkMatcher.matches;\n this.tabs = ui.tabs;\n const codeMirrorOptions = {\n mode: 'javascript',\n scrollbarStyle: 'overlay',\n theme: isDarkMode ? 'material' : 'eclipse',\n matchBrackets: true,\n lineNumbers: ui.lineNumbers,\n ...(options.editor && options.editor),\n };\n if (codeMirrorOptions.mode.indexOf('html') >= 0) {\n codeMirrorOptions.matchTags = true;\n }\n return (\n {\n this.setState({value});\n }}\n onChange={(editor, data, value) => {\n onValueChange(value);\n }}\n editorDidMount={this.registerEditor}\n />\n );\n }\n};\n","export const noop = () => {};\nexport const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n\nexport function escapeTextForHTMLContent(s: string) {\n return s.replace(/&/g, '&')\n .replace(//g, '>');\n}\n\nfunction findNdx(files: any, endings: string[]) {\n // calling toLowerCase a bunch is bad but there will never be more than a few files\n for (const ending of endings) {\n const ndx = files.findIndex((file: any) => file.name.toLowerCase().endsWith(ending.toLowerCase()));\n if (ndx >= 0) {\n return ndx;\n }\n }\n return -1;\n}\n\nexport function getOrFindNdx(files: any[], name: string, ...endings: string[]) {\n const ndx = files.findIndex(f => f.name.toLowerCase() === name.toLowerCase);\n if (ndx >= 0) {\n return ndx;\n }\n return findNdx(files, endings);\n}\n\nexport function getOrFind(files: any[], ...args: string[]) {\n const ndx = getOrFindNdx(files, '', ...args);\n return ndx >= 0 ? files[ndx] : '';\n}\n\nconst stringify = (options: any, sep: string = ',') => Object.entries(options).map(([key, value]) => `${key}=${value}`).join(sep);\n\nexport function createPopup(url: string, config: any = {}): (Window | undefined) {\n const width = config.width || 500;\n const height = config.height || 500;\n const options = {\n width: width,\n height: height,\n top: window.screenY + ((window.outerHeight - height) / 2.5),\n left: window.screenX + ((window.outerWidth - width) / 2)\n };\n return window.open(url, '_blank', stringify(options, ',')) || undefined;\n}\n\nexport function once(fn: (...args: any[]) => void) {\n return function (...args: any[]) {\n let once = false;\n if (!once) {\n once = true;\n fn(...args);\n }\n };\n}","import React from 'react';\nimport Editor from \"@monaco-editor/react\";\nimport { once } from '../libs/utils.ts';\n\nconst darkMatcher = window.matchMedia\n ? window.matchMedia('(prefers-color-scheme: dark)')\n : {};\n// darkMatcher.addListener(render);\n\nconst noop = () => {};\n\nasync function getText(url) {\n const req = await fetch(url);\n return await req.text();\n}\n\nconst addTypes = once(async function addTypes(monaco) {\n const basePath = '/types/webgpu/dist/index.d.ts';\n const text = await getText(basePath);\n monaco.languages.typescript.javascriptDefaults.addExtraLib(text, '');\n});\n\nfunction codeMirrorModeToLanguage(editor) {\n const language = (editor?.mode || 'javascript').split('/').pop();\n return language === 'gfm' ? 'markdown' : language;\n}\n\nexport default class CodeMonaco extends React.Component {\n constructor(props) {\n super(props);\n const {value, hackKey} = props;\n this.state = {value, hackKey}\n }\n static getDerivedStateFromProps(props, state) {\n const needNewData = state.hackKey !== props.hackKey;\n return (needNewData)\n ? {hackKey: props.hackKey, value: props.value}\n : null;\n }\n handleEditorDidMount = (editor, monaco) => {\n this.editor = editor;\n addTypes(monaco);\n editor.getModel().updateOptions({tabSize: 2});\n const {registerAPI} = this.props;\n if (registerAPI) {\n registerAPI({\n goToLine: (lineNo, colNo) => {\n this.editor.focus();\n this.editor.setPosition({lineNumber: lineNo, column: colNo});\n this.editor.revealPosition({lineNumber: lineNo, column: colNo})\n },\n refresh: _ => {\n // this.editor.refresh();\n },\n focus: _ => {\n this.editor.focus();\n },\n });\n }\n }\n registerEditor = (editor) => {\n this.editor = editor;\n }\n render() {\n const {options = {}, onValueChange = noop, ui} = this.props;\n const {value} = this.state;\n const isDarkMode = darkMatcher.matches;\n\n // Monaco options\n // https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IEditorConstructionOptions.html\n\n // we pass in mime-type (eg. 'text/css' but monaco wants just 'css')\n const language = codeMirrorModeToLanguage(options.editor).split('/').pop();\n return (\n \n );\n }\n};\n","import React from 'react';\nimport CodeCodeMirror from './CodeCodeMirror';\nimport CodeMonaco from './CodeMonaco';\nimport * as uiModel from '../libs/ui-model.js';\n\nexport default class Code extends React.Component {\n componentDidMount() {\n uiModel.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n render() {\n const ui = uiModel.get();\n const monaco = ui.editor === 'monaco';\n \n const {props} = this;\n const newProps = {...props, ui};\n return (\n monaco\n ? \n : \n );\n }\n}\n","import React from 'react';\nimport Code from './Code.js';\nimport {classNames} from '../libs/css-utils.js';\n\nexport default function CodeArea(props) {\n const {\n value,\n hackKey,\n heading,\n extra = [],\n options = {},\n onValueChange,\n registerAPI,\n } = props;\n return (\n
\n
\n {heading}\n
\n
\n \n {extra}\n
\n
\n );\n};\n","import mime from 'mime-types';\nimport React from 'react';\nimport CodeArea from './CodeArea.js';\n\nexport default class File extends React.Component {\n componentDidMount() {\n const {register} = this.props;\n register(this, {\n goToLine: (data) => {\n const {title} = this.props;\n if (data.section === title) {\n this.codeAPI.goToLine(data.lineNo, data.colNo);\n return true;\n }\n },\n refresh: _ => this.codeAPI.refresh(),\n focus: _ => this.codeAPI.focus(),\n });\n }\n componentWillUnmount() {\n const {unregister} = this.props;\n unregister(this);\n }\n handleRegisterAPI = (api) => {\n this.codeAPI = api;\n }\n render() {\n const props = this.props;\n const {title, hackKey} = props;\n const heading = (\n
{title}
\n );\n const mimeType = mime.lookup(title) || (title.toLowerCase() === 'javascript' ? 'application/javascript' : 'application/octet-stream');\n const options = {\n ...props.options,\n editor: {\n ...(props.options?.editor && props.options.editor),\n mode: mimeType,\n },\n };\n return (\n \n );\n }\n}\n\n/*\nexport default function TestArea(props) {\n const {desc, title, onTitleChange, hackKey} = props;\n const heading = (\n
{title}
\n \n );\n\n return (\n \n );\n}\n*/\n","import Ajv from 'ajv';\nimport React from 'react';\nimport Split, {moveGuttersComputeNewSizes} from 'react-split-it';\n\nimport * as model from '../libs/model.js';\nimport File from './File.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nconst makeId = _ => `${Date.now()}+${Math.random()}`;\n\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"sizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}},\n },\n \"required\": [\"sizes\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nexport default class Files extends React.Component {\n constructor(props) {\n super(props);\n this.files = new Map();\n this.fileToKeyMap = new Map();\n this.kUIStateKey = `${props.uiStateKey}-files`;\n const state = uiModel.get()[this.kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n sizes: [],\n };\n if (this.state.sizes.length !== props.data.files.length) {\n this.state.sizes = props.data.files.map((_, i) => 1 / props.data.files.length);\n }\n }\n onSetSizes = (sizes) => {\n this.setState({sizes});\n uiModel.set(this.kUIStateKey, this.state);\n }\n handleRegister = (file, api) => {\n this.files.set(file, api);\n }\n handleUnregister = (file) => {\n this.files.delete(file);\n }\n getFileKey(test) {\n let key = this.fileToKeyMap.get(test);\n if (!key) {\n key = makeId();\n this.fileToKeyMap.set(test, key);\n }\n return key;\n }\n componentDidMount() {\n const {registerAPI} = this.props;\n registerAPI({\n goToLine: (data) => {\n this.files.forEach(api => {\n api.goToLine(data);\n });\n },\n });\n }\n render() {\n const {hackKey, data, extra, direction} = this.props;\n const {sizes} = this.state;\n return (\n
\n \n {\n data.files.map((file, ndx) => {\n return (\n model.setFileName(ndx, name)}\n onValueChange={value => model.setFileContent(ndx, value)}\n register={this.handleRegister}\n unregister={this.handleUnregister}\n extra={extra}\n />\n );\n })\n }\n \n
\n );\n }\n}\n\n// {/**/}\n","import Ajv from 'ajv';\nimport React from 'react';\nimport Split from 'react-split-it';\n\nimport Files from './Files.js';\nimport Log from './Log.js';\nimport Runner from './Runner.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nconst kUIStateKey = 'layout3Vertical';\n\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"hSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n \"vSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n },\n \"required\": [\"hSizes\", \"vSizes\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nexport default class Layout3Vertical extends React.Component {\n constructor(props) {\n super(props);\n const state = uiModel.get()[kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n hSizes: [0.5, 0.5],\n vSizes: [0.9, 0.1],\n };\n }\n onSetVSizes = (sizes) => {\n this.setState({vSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n onSetHSizes = (sizes) => {\n this.setState({hSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n registerFilesAPI = (api) => {\n this.filesAPI = api;\n }\n handleGoToLine = (data) => {\n this.filesAPI.goToLine(data);\n }\n render() {\n const {hackKey, data, registerRunnerAPI} = this.props;\n const {vSizes, hSizes} = this.state;\n return (\n \n
\n \n
\n
\n \n \n \n \n
\n
\n );\n };\n}","import Ajv from 'ajv';\nimport React from 'react';\nimport Split from 'react-split-it';\n\nimport Files from './Files.js';\nimport Log from './Log.js';\nimport Runner from './Runner.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nconst kUIStateKey = 'layout3Horizontal';\n\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"tSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n \"bSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n },\n \"required\": [\"tSizes\", \"bSizes\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nexport default class Layout3Horizontal extends React.Component {\n constructor(props) {\n super(props);\n const state = uiModel.get()[kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n tSizes: [0.5, 0.5],\n bSizes: [0.9, 0.1],\n };\n }\n onSetTSizes = (sizes) => {\n this.setState({tSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n onSetBSizes = (sizes) => {\n this.setState({bSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n registerFilesAPI = (api) => {\n this.filesAPI = api;\n }\n handleGoToLine = (data) => {\n this.filesAPI.goToLine(data);\n }\n render() {\n const {hackKey, data, registerRunnerAPI} = this.props;\n const {tSizes, bSizes} = this.state;\n return (\n \n
\n \n
\n
\n \n \n \n \n
\n
\n );\n };\n}","import Ajv from 'ajv';\nimport React from 'react';\nimport Split from 'react-split-it';\n\nimport File from './File.js';\nimport Log from './Log.js';\nimport * as model from '../libs/model.js';\nimport Runner from './Runner.js';\nimport * as uiModel from '../libs/ui-model.js';\nimport {getOrFindNdx} from '../libs/utils';\n\nconst kUIStateKey = 'layout2x2';\n\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"hSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n \"v1Sizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n \"v2Sizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 2},\n },\n \"required\": [\"hSizes\", \"v1Sizes\", \"v2Sizes\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nfunction NamedFile(props) {\n const {data, ndx, hackKey, register, unregister} = props;\n const file = data.files[ndx];\n return (\n model.setFileName(ndx, name)}\n onValueChange={value => model.setFileContent(ndx, value)}\n register={register}\n unregister={unregister}\n />\n );\n}\n\n\nexport default class Layout2x2 extends React.Component {\n constructor(props) {\n super(props);\n this.files = new Map();\n const state = uiModel.get()[kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n hSizes: [0.5, 0.5],\n v1Sizes: [0.4, 0.6],\n v2Sizes: [0.4, 0.5, 0.1],\n };\n }\n onSetHSizes = (sizes) => {\n this.setState({hSizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n onSetV1Sizes = (sizes) => {\n this.setState({v1Sizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n onSetV2Sizes = (sizes) => {\n this.setState({v2Sizes: sizes});\n uiModel.set(kUIStateKey, this.state);\n }\n handleRegister = (file, api) => {\n this.files.set(file, api);\n }\n handleUnregister = (file) => {\n this.files.delete(file);\n }\n handleGoToLine = (data) => {\n this.files.forEach(api => {\n api.goToLine(data);\n });\n }\n render() {\n const {hackKey, data, registerRunnerAPI} = this.props;\n const files = data.files;\n const mainHTMLNdx = getOrFindNdx(files, 'index.html', 'html');\n const mainJSNdx = getOrFindNdx(files, 'index.js', 'js', 'js', 'javascript');\n const mainCSSNdx = getOrFindNdx(files, 'index.css', 'css');\n const {hSizes, v1Sizes, v2Sizes} = this.state;\n\n return (\n \n
\n \n \n \n \n
\n
\n \n \n \n \n \n
\n
\n );\n };\n}","import Ajv from 'ajv';\nimport React from 'react';\nimport Split from 'react-split-it';\n\nimport File from './File.js';\nimport Log from './Log.js';\nimport * as model from '../libs/model.js';\nimport Runner from './Runner.js';\nimport * as uiModel from '../libs/ui-model.js';\n\nconst kUIStateKey = 'layoutTabbed';\nconst uiStateSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"showResult\": { \"type\": \"boolean\" },\n \"showLog\": { \"type\": \"boolean\" },\n \"currentNdx\": { \"type\": \"integer\" },\n \"sizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 3 },\n \"lastSizes:\": { \"type\": \"array\", \"items\": {\"type\": \"number\"}, \"minItems\": 3 },\n },\n \"required\": [\"sizes\", \"lastSizes\", \"showResult\", \"showLog\", \"currentNdx\"],\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst uiStateValidator = ajv.compile(uiStateSchema);\n\nconst makeId = _ => `${Date.now()}-${Math.random()}`;\n\nfunction fixSizes(sizes, lastSizes, ndx, show) {\n if (show) {\n // we're adding a size back in.\n const oldSize = lastSizes[ndx];\n const availableSpace = 1 - oldSize;\n const s = sizes.filter((_, i) => ndx !== i);\n const len = s.reduce((sum, size) => sum + size, 0);\n const newSizes = s.map(size => size / len * availableSpace);\n newSizes.splice(ndx, 0, oldSize);\n return newSizes;\n } else {\n // we're removing a size\n const s = sizes.map((size, i) => ndx === i ? 0 : size);\n const len = s.reduce((sum, size) => sum + size, 0);\n const newSizes = s.map(size => size / len);\n return newSizes;\n }\n}\n\nexport default class Layout3Horizontal extends React.Component {\n constructor(props) {\n super(props);\n const state = uiModel.get()[kUIStateKey];\n this.state = uiStateValidator(state) ? state : {\n showResult: true,\n showLog: true,\n currentNdx: 2,\n sizes: [0.45, 0.45, 0.1],\n lastSizes: [0.45, 0.45, 0.1],\n };\n this.files = new Map();\n this.fileToKeyMap = new Map();\n }\n handleRegister = (file, api) => {\n this.files.set(file, api);\n }\n handleUnregister = (file) => {\n this.files.delete(file);\n }\n getFileKey(test) {\n let key = this.fileToKeyMap.get(test);\n if (!key) {\n key = makeId();\n this.fileToKeyMap.set(test, key);\n }\n return key;\n }\n setSizes = (sizes) => {\n const lastSizes = this.state.lastSizes.slice()\n if (this.state.currentNdx >= 0) { lastSizes[0] = sizes[0] }\n if (this.state.showResult) { lastSizes[1] = sizes[1]; }\n if (this.state.showLow) { lastSizes[2] = sizes[2]; }\n this.setState({sizes, lastSizes});\n uiModel.set(kUIStateKey, this.state);\n }\n handleGoToLine = (data) => {\n // this.files is Map of File components\n this.files.forEach((api, file) => {\n if (api.goToLine(data)) {\n const {files} = this.props.data;\n // this is gross (T_T)\n const ndx = files.findIndex(file => file.name === data.section);\n if (ndx !== this.state.currentNdx) {\n this.handleOnChange(ndx);\n }\n }\n });\n }\n handleOnChange = (ndx) => {\n const currentNdx = this.state.currentNdx === ndx ? -1 : ndx;\n this.setState({\n currentNdx,\n sizes: fixSizes(this.state.sizes, this.state.lastSizes, 0, currentNdx >= 0),\n });\n uiModel.set(kUIStateKey, this.state);\n }\n toggleShowLog = () => {\n const showLog = !this.state.showLog;\n this.setState({\n showLog,\n sizes: fixSizes(this.state.sizes, this.state.lastSizes, 2, showLog),\n });\n uiModel.set(kUIStateKey, this.state);\n }\n toggleShowResult = () => {\n const showResult = !this.state.showResult;\n this.setState({\n showResult,\n sizes: fixSizes(this.state.sizes, this.state.lastSizes, 1, showResult),\n });\n uiModel.set(kUIStateKey, this.state);\n }\n componentDidUpdate() {\n if (this.previousNdx !== this.state.currentNdx) {\n this.previousNdx = this.state.currentNdx;\n this.files.forEach(api => {\n api.refresh();\n api.focus();\n });\n }\n }\n render() {\n const {hackKey, data, registerRunnerAPI} = this.props;\n const {showResult, showLog, sizes, currentNdx} = this.state;\n const resultStyle = {...(!showResult && {display: 'none'})}\n const logStyle = {...(!showLog && {display: 'none'})}\n return (\n
\n
\n
\n {\n data.files.map((file, ndx) => {\n const key = `ca${this.getFileKey(file)}`;\n return (\n \n this.handleOnChange(ndx)}\n onChange={_ => _} /* this is to shut up react */\n />\n \n \n );\n })\n }\n \n \n \n \n
\n
\n \n
\n {\n data.files.map((file, ndx) => {\n const key = `ca${this.getFileKey(file)}`;\n return (\n
\n model.setFileName(ndx, name)}\n onValueChange={value => model.setFileContent(ndx, value)}\n register={this.handleRegister}\n unregister={this.handleUnregister}\n />\n
\n );\n })\n }\n
\n
\n
\n
\n
\n );\n };\n}","import React from 'react';\n\nimport Layout1 from './Layout1.js';\nimport Layout3Vertical from './Layout3Vertical.js';\nimport Layout3Horizontal from './Layout3Horizontal.js';\nimport Layout2x2 from './Layout2x2.js';\nimport LayoutTabbed from './LayoutTabbed.js';\n\nimport * as uiModel from '../libs/ui-model.js';\n\nconst layoutModes = [\n Layout3Vertical,\n Layout3Horizontal,\n Layout2x2,\n LayoutTabbed,\n];\n\nexport default class IDE extends React.Component {\n componentDidMount() {\n uiModel.subscribe(this.handleChange);\n }\n componentWillUnmount() {\n uiModel.unsubscribe(this.handleChange);\n }\n handleChange = () => {\n this.forceUpdate();\n }\n render() {\n const {fullscreen} = this.props;\n const mode = uiModel.get().layout;\n const layoutMode = fullscreen ? Layout1 : layoutModes[mode]\n return React.createElement(layoutMode, this.props);\n }\n}\n\n","import Ajv from 'ajv';\nimport * as model from './model.js';\nimport {storageManager} from '../globals.js';\nconst gistsKey = 'gists';\n\nconst gistSchema = {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"date\": { \"type\": \"string\" },\n \"locallySaved\": { \"type\": \"boolean\" },\n },\n \"required\": [\"name\", \"date\"],\n};\n\nconst gistsSchema = {\n \"$schema\": \"http://json-schema.org/schema#\",\n \"type\": \"object\",\n \"additionalProperties\": gistSchema,\n};\nconst ajv = new Ajv() // options can be passed, e.g. {allErrors: true}\nconst gistsValidator = ajv.compile(gistsSchema);\nconst gistValidator = ajv.compile(gistSchema);\n\nfunction getStoredGists() {\n try {\n const gists = JSON.parse(storageManager.get(gistsKey));\n if (!gistsValidator(gists)) {\n storageManager.delete(gistsKey);\n throw new Error();\n }\n return gists;\n } catch(e) {\n return {};\n }\n}\n\nmodel.add('gists', getStoredGists());\n\n// does this need to be centralized?\nstorageManager.subscribe(gistsKey, () => {\n model.set('gists', getStoredGists());\n});\n\nexport function addGist(id, name, date, _public) {\n const gist = {name, date, public: _public, locallySaved: true};\n if (!gistValidator(gist)) {\n throw new Error(`gist not valid:\\n${gistValidator.errors.map(e => `${e.message}: ${e.dataPath}`)}`)\n }\n const gists = {...model.get('gists')};\n gists[id] = gist;\n model.set('gists', gists);\n saveGistsToLocalStorage(gists);\n}\n\nexport function removeGist(id) {\n const gists = {...model.get('gists')};\n delete gists[id];\n model.set('gists', gists);\n saveGistsToLocalStorage(gists);\n}\n\nfunction saveGistsToLocalStorage(gists) {\n // send to other windows\n storageManager.set(gistsKey, JSON.stringify(gists));\n}\n\nexport function getGists() {\n return model.get('gists');\n}\n\nexport function setGists(gists) {\n if (!gistsValidator(gists)) {\n throw new Error(`gists not valid:\\n${gistValidator.errors.map(e => `${e.message}: ${e.dataPath}`)}`)\n }\n model.set('gists', gists);\n saveGistsToLocalStorage(gists);\n}\n\nexport function subscribe(fn) {\n model.subscribe('gists', fn);\n}\n\nexport function unsubscribe(fn) {\n model.unsubscribe('gists', fn);\n}\n","import React from 'react';\nimport EditLine from './EditLine.js';\nimport {classNames} from '../libs/css-utils.js';\nimport * as gists from '../libs/gists.js';\nimport ServiceContext from '../ServiceContext.js';\n\ntype Gist = {\n name: string,\n date: string,\n public: boolean,\n locallySaved?: boolean,\n id: string,\n}\n\n// ( ) Wrap table with div, scroll div. Because table expands to 100%\n\ninterface GistIdMap {\n [key: string]: Gist;\n} \n\ntype LoadGistState = {\n loading: boolean,\n gists: GistIdMap,\n checks: Set,\n filter: string, // TODO: move up\n sortKey: string, // TODO: move up\n sortDir: string, // TODO: move up\n shift: boolean,\n};\n\nfunction getSortFn(sortKey: string, checks: Set): (a: Gist, b: Gist) => number {\n switch (sortKey) {\n case 'name':\n return (a: Gist, b: Gist) => a.name.toLowerCase() < b.name.toLowerCase() ? -1 : (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : 0);\n case 'date':\n return (a: Gist, b: Gist) => a.date < b.date ? -1 : (a.date > b.date ? 1 : 0);\n case 'public':\n return (a: Gist, b: Gist) => {\n const ap = a.public ? 1 : 0;\n const bp = b.public ? 1 : 0;\n return Math.sign(ap - bp);\n };\n case 'check':\n return (a: Gist, b: Gist) => {\n const ap = checks.has(a.id) ? 1 : 0;\n const bp = checks.has(b.id) ? 1 : 0;\n return Math.sign(ap - bp);\n };\n default:\n throw new Error('unknown sortKey');\n }\n}\n\nfunction gistsToSortedArray(gists: GistIdMap, checks: Set, sortKey: string, sortDir: string) {\n const compareDirMult = sortDir === 'down' ? 1 : -1;\n const compFn = getSortFn(sortKey, checks);\n return Object.entries(gists).map(([id, {name, date, public: _public}]) => {\n return {id, name, date, public: _public};\n }).sort((b, a) => compFn(a, b) * compareDirMult);\n}\n\nfunction matchFilter(filter: string) {\n filter = filter.trim().toLowerCase();\n return function(gist: Gist) {\n const {name, date} = gist;\n return filter === '' ||\n name.toLowerCase().includes(filter) ||\n date.substring(0, 10).includes(filter);\n }\n}\n\n\ntype SortKeyInfo = {\n sortDir: string,\n selected: boolean,\n update: (sortDir: string) => void,\n};\n\nfunction SortBy(props: SortKeyInfo) {\n const {sortDir, selected, update} = props;\n return (\n \n update(!selected ? sortDir : (sortDir === 'up' ? 'down' : 'up'))} className={selected ? 'current-sort-key' : ''}>{sortDir === 'up' ? '▲' : '▼'}\n \n );\n}\n\nfunction getDateOfNewestNonLocallySavedGist(gistsById: GistIdMap) {\n let since;\n for (const {date, locallySaved} of Object.values(gistsById)) {\n if (!locallySaved) {\n if (!since || date > since) {\n since = date;\n }\n }\n }\n return since;\n}\n\nexport default class LoadGist extends React.Component<{}, LoadGistState> {\n constructor (props: {}) {\n super(props);\n const _gists = gists.getGists();\n this.state = {\n loading: false,\n gists: _gists,\n checks: new Set(),\n filter: '',\n sortKey: 'date',\n sortDir: 'down',\n shift: false,\n };\n }\n handleNewGists = (gists: GistIdMap) => {\n this.setState({\n gists,\n });\n }\n toggleCheck = (id: string) => {\n const checks = new Set(this.state.checks);\n if (checks.has(id)) {\n checks.delete(id);\n } else {\n checks.add(id);\n }\n this.setState({checks});\n }\n onUserStatusChange = () => {\n this.forceUpdate();\n const {userManager} = this.context;\n if (userManager.getUserData()) {\n this.loadGists();\n }\n }\n updateSort = (sortKey: string, sortDir: string) => {\n console.log('update:', sortKey, sortDir);\n this.setState({sortDir, sortKey});\n }\n componentDidMount() {\n const {userManager} = this.context;\n gists.subscribe(this.handleNewGists);\n userManager.subscribe(this.onUserStatusChange);\n window.addEventListener('keydown', this.handleKeyDown);\n window.addEventListener('keyup', this.handleKeyUp);\n }\n componentWillUnmount() {\n const {userManager} = this.context;\n gists.unsubscribe(this.handleNewGists);\n userManager.unsubscribe(this.onUserStatusChange);\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('keyup', this.handleKeyUp);\n }\n handleKeyDown = (e: KeyboardEvent) => {\n this.setState({shift: e.shiftKey});\n }\n handleKeyUp = (e: KeyboardEvent) => {\n this.setState({shift: e.shiftKey});\n }\n loadGists = async() => {\n const {addError, github} = this.context;\n this.setState({loading: true});\n try {\n // This doesn't belong here. It's not the UI's responsibility\n // to manage this stuff.\n // Find data of the newest gist that was not locally saved.\n // then pass that to getUserGists so Github will return only\n // newer gists.\n const existingGists = this.state.shift ? {} : this.state.gists;\n const since = getDateOfNewestNonLocallySavedGist(existingGists);\n const gistArray = await github.getUserGists(since);\n const gistsById = gistArray.reduce((gists: any[], gist: any) => {\n gists[gist.id] = {\n name: gist.description,\n date: gist.updated_at,\n public: gist.public,\n };\n return gists;\n }, {...existingGists});\n gists.setGists(gistsById);\n } catch (e) {\n addError(`could not load gists: ${e}`);\n }\n this.setState({loading: false});\n }\n deleteSelected = async() => {\n const {checks, gists: _gists} = this.state;\n const ids: string[] = [];\n // just incase?\n checks.forEach((id, ndx) => {\n if (_gists[id]) {\n ids.push(id);\n }\n });\n const {addError, github} = this.context;\n this.setState({loading: true});\n for (const id of ids) {\n try {\n await github.deleteGist(id);\n gists.removeGist(id);\n } catch(e) {\n addError(`could not delete gist: ${id}: ${e}`);\n }\n }\n this.setState({loading: false});\n }\n clearBackup = () => {\n const {backupManager} = this.context;\n backupManager.clearBackup();\n }\n renderLogin() {\n const {userManager} = this.context;\n return (\n
\n Login with github\n
\n );\n }\n renderLoad() {\n const {userManager} = this.context;\n const {gists, checks, loading, filter, sortKey, sortDir, shift} = this.state;\n const userData = userManager.getUserData();\n const canLoad = !!userData && !loading;\n const gistArray = gistsToSortedArray(gists, checks, sortKey, sortDir);\n return (\n
\n

\n {shift ? '(Force) ' : ''}Load New Gists\n

\n {\n gistArray.length >= 0 &&\n \n

\n {this.setState({filter})}} />\n

\n
\n \n \n \n \n \n \n \n \n \n \n {\n gistArray.filter(matchFilter(filter)).map((gist, ndx) => {\n return (\n \n \n \n \n \n \n );\n })\n }\n \n
this.updateSort('check', dir)}/> this.updateSort('name', dir)}/> this.updateSort('date', dir)}/> this.updateSort('public', dir)}/>
this.toggleCheck(gist.id)}/>{gist.name}{gist.date.substring(0, 10)}{gist.public ? '' : '🔒'}
\n
\n
\n
\n }\n
\n );\n }\n render() {\n const {userManager} = this.context;\n const userData = userManager.getUserData();\n return userData ? this.renderLoad() : this.renderLogin();\n }\n}\n\nLoadGist.contextType = ServiceContext;\n","import React, {useContext, useState} from 'react';\nimport Code from './Code.js';\nimport * as model from '../libs/model.js';\nimport ServiceContext from '../ServiceContext.js';\n\nexport default function LoadJSON(props) {\n const [json, setJSON] = useState('');\n const {addError} = useContext(ServiceContext);\n function load() {\n const {onLoad} = props;\n try {\n const data = JSON.parse(json);\n model.setData(data);\n onLoad();\n } catch (e) {\n addError(`bad json: ${e}`);\n }\n }\n return (\n
\n
\n \n
\n

\n \n

\n
\n )\n}","import React, {useContext, useState} from 'react';\nimport EditLine from './EditLine';\nimport * as model from '../libs/model.js';\nimport ServiceContext from '../ServiceContext.js';\n\nexport default function LoadURL(props) {\n const [url, setUrl] = useState('');\n const {addError} = useContext(ServiceContext);\n async function loadUrl() {\n const {onLoad} = props;\n try {\n const req = await fetch(url);\n const data = await req.json();\n model.setData(data);\n onLoad()\n } catch(e) {\n addError(`could not load url: ${e}`);\n }\n } \n return (\n
\n \n

\n \n

\n
\n )\n}","import React from 'react';\n\nexport default function Section(props) {\n const {heading, children} = props;\n return (\n
\n
{heading}
\n
\n {children}\n
\n
\n );\n}","import React from 'react';\nimport Dialog from './Dialog.js';\nimport LoadGist from './LoadGist';\nimport LoadJSON from './LoadJSON.js';\nimport LoadURL from './LoadURL.js';\nimport Section from './Section.js';\n\nexport default function Load(props) {\n const {data, onLoad, onClose} = props;\n return (\n \n
\n \n
\n
\n \n
\n
\n \n
\n
\n )\n}\n","import {decode, encode} from 'base64-arraybuffer';\nimport {inflate, deflate} from 'uzip-module';\n\nconst utf8Encoder = new TextEncoder();\nconst utf8Decoder = new TextDecoder();\nconst compressedPrefix = 'cb64,';\nconst uncompressedPrefix = 'b64,';\n\nexport const isCompressedBase64 = s => s.startsWith(compressedPrefix) || s.startsWith(uncompressedPrefix);\nexport function compressedBase64ToJSON(src) {\n const isCompressed = src.startsWith(compressedPrefix);\n const prefix = isCompressed ? compressedPrefix : uncompressedPrefix;\n const base64 = src.substr(prefix.length)\n .replace(/-/g, '+')\n .replace(/_/g, '/');\n const raw = new Uint8Array(decode(base64));\n const bin = isCompressed \n ? inflate(raw)\n : raw;\n const json = utf8Decoder.decode(bin);\n return JSON.parse(json);\n}\n\nexport function jsonToCompressedBase64(data) {\n const json = JSON.stringify(data);\n const bin = utf8Encoder.encode(json);\n const compressed = deflate(bin);\n const useCompressed = compressed.length < bin.length;\n const base64 = encode(useCompressed ? compressed : bin)\n .replace(/\\+/g, '-') // better for URLs because + and / have to be escaped\n .replace(/\\//g, '_');\n const prefix = useCompressed ? compressedPrefix : uncompressedPrefix;\n return `${prefix}${base64}`;\n}\n","\nimport {isCompressedBase64, compressedBase64ToJSON} from './compression.js';\n\nconst idRE = /^[a-z0-9]+$/i;\nexport const isGistId = s => idRE.test(s);\n\nexport async function loadGistFromSrc(src, github) {\n if (isGistId(src)) {\n const {data, rawData} = await github.getGist(src);\n return {data, id: src, rawData};\n } else if (isCompressedBase64(src)) {\n return {data: compressedBase64ToJSON(src)};\n } else {\n const res = await fetch(src);\n const data = await res.json();\n return {data};\n }\n}\n","import React from 'react';\n\nexport default function Embed(props) {\n const {gistId} = props;\n const exampleId = gistId || 'f793cb359f2571409983351a6099d5d1';\n return (\n
\n
\n

\n You can embed a jsGist by creating an iframe pointing to\n {' '}https://jsgist.org/embed.html?src=<src>{' '} where\n {' '}<src>{' '} is one of the forms above. Either\n {' '}?src=<gist_id>{' '}or\n {' '}?src=<base64url>{' '}or\n {' '}?src=<url_to_json>{' '}.\n You can also add {' '}noheader=true{' '} if you don't want the header\n to appear. You can also just run them directly rather\n than put in an iframe. [example]{' '}\n [example no header]\n

\n { !!gistId &&\n \n

\n For example to embed the current gist:\n

\n
\n      <iframe src=\"https://jsgist.org/embed.html?src={gistId}\"></iframe>\n              
\n
\n }\n

\n

\n
\n
\n );\n}","import React from 'react';\n\nimport {escapeTextForHTMLContent, getOrFind} from '../libs/utils';\n\n/*\n\n\n\n\n\n console.log();\n\n\n\n h1 { color: red; }\n\n\n\n

foo

\n\n\n\n*/\n\nfunction indent4(s) {\n return s.split('\\n').map(s => ` ${s}`).join('\\n');\n}\n\nfunction makeSnippet(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 return asModule\n ? `\n\n\n\n\n\n\n${indent4(mainCSS.content)}\n\n\n\n${indent4(mainHTML.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 : /\\bimport\\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 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.

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

HTML (copy the code below paste into a file)

\n
\n
this.onChange(true)}/>
\n
this.onChange(false)}/>
\n
\n
{makeHTML(data, asModule)}
\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 }\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