diff --git a/build/asset-manifest.json b/build/asset-manifest.json index d44a6f1f..a4adc1c0 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -4,9 +4,9 @@ "static/js/0.39eaacde.chunk.js.map": "./static/js/0.39eaacde.chunk.js.map", "static/js/1.94a8704a.chunk.js": "./static/js/1.94a8704a.chunk.js", "static/js/1.94a8704a.chunk.js.map": "./static/js/1.94a8704a.chunk.js.map", - "main.css": "./static/css/main.7af3225e.chunk.css", - "main.js": "./static/js/main.a39a299e.chunk.js", - "main.js.map": "./static/js/main.a39a299e.chunk.js.map", + "main.css": "./static/css/main.9e9378f5.chunk.css", + "main.js": "./static/js/main.5674bb15.chunk.js", + "main.js.map": "./static/js/main.5674bb15.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.4405e875.js", "runtime-main.js.map": "./static/js/runtime-main.4405e875.js.map", "static/css/4.7c0a8645.chunk.css": "./static/css/4.7c0a8645.chunk.css", @@ -152,7 +152,7 @@ "static/js/73.a6cb7cb2.chunk.js.map": "./static/js/73.a6cb7cb2.chunk.js.map", "index.html": "./index.html", "static/css/4.7c0a8645.chunk.css.map": "./static/css/4.7c0a8645.chunk.css.map", - "static/css/main.7af3225e.chunk.css.map": "./static/css/main.7af3225e.chunk.css.map", + "static/css/main.9e9378f5.chunk.css.map": "./static/css/main.9e9378f5.chunk.css.map", "static/js/4.045e3eee.chunk.js.LICENSE.txt": "./static/js/4.045e3eee.chunk.js.LICENSE.txt", "static/js/65.3aec7f39.chunk.js.LICENSE.txt": "./static/js/65.3aec7f39.chunk.js.LICENSE.txt", "static/media/codicon.css": "./static/media/codicon.b3726f01.ttf" @@ -161,7 +161,7 @@ "static/js/runtime-main.4405e875.js", "static/css/4.7c0a8645.chunk.css", "static/js/4.045e3eee.chunk.js", - "static/css/main.7af3225e.chunk.css", - "static/js/main.a39a299e.chunk.js" + "static/css/main.9e9378f5.chunk.css", + "static/js/main.5674bb15.chunk.js" ] } \ No newline at end of file diff --git a/build/index.html b/build/index.html index 90c217af..c1a7d14f 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Append Editor
\ No newline at end of file +Append Editor
\ No newline at end of file diff --git a/build/static/css/main.7af3225e.chunk.css b/build/static/css/main.7af3225e.chunk.css deleted file mode 100644 index 48f4b8ba..00000000 --- a/build/static/css/main.7af3225e.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--sn-stylekit-font-size-editor:16px;--sn-stylekit-monospace-font:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace}@media screen and (max-width:650px){:root{--sn-stylekit-font-size-editor:18px}h1{font-size:1.75em}}body,html{background-color:transparent;font-family:var(--sn-stylekit-sans-serif-font);font-size:var(--sn-stylekit-base-font-size);height:100%;margin:0;padding:0;width:100%}*{-webkit-tap-highlight-color:rgba(0,0,0,0)}button{color:var(--sn-stylekit-foreground-color);background-color:transparent;border-width:0;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}button.off svg{opacity:.75}button.off:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:hover{cursor:pointer}button.chevron-toggle-button{padding-left:0;display:flex}button.menu-button{display:flex;margin:8px 20px;padding:8px 16px;text-align:left}button.menu-button svg{margin-top:auto}button.menu-button.chevron-toggle-button{padding-top:0;padding-bottom:0}@media screen and (min-width:330px){button.menu-button.chevron-toggle-button{padding:0}}button .chevron-button-caption,button .chevron-icon{line-height:20px;margin-top:5px;margin-bottom:5px}button .button-caption{padding-left:5px}button:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component{display:flex;flex-direction:column;min-height:100vh}.sn-component .sk-button.info,.sn-component .sk-button.neutral{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}.sn-component .sk-panel.main{max-width:700px;width:100%;margin:10px 5px}@media screen and (max-width:725px){.sn-component .sk-panel.main{border-left:none;border-right:none;border-bottom:none;box-shadow:none;margin:0}}.sn-component .sk-panel.main.monacoEditor{max-width:800px}@media screen and (max-width:725px){.sn-component .sk-panel.main.otherEditor{border-top:none}}.sn-component .sk-panel-content.edit{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.edit{padding-left:0!important;padding-right:0!important;padding-top:0!important}}.sn-component .sk-panel-content.edit.monacoEditor{overflow-x:hidden!important}.sn-component .sk-panel-content.view{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.view{padding:0!important}}.sn-component .sk-input.textarea{min-height:136px;padding:9px 10px;max-width:inherit;width:calc(100% - 22px);height:100%;resize:vertical;overflow-y:auto;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);line-height:1.7}.sn-component .sk-input.textarea:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component .sk-input.textarea.editnote{max-height:calc(100% - 32px)}.sn-component .sk-input.textarea.append{max-height:calc(100% - 22px)}.sn-component .sk-panel-row{padding-top:.5rem;padding-bottom:.5rem}.sn-component .sk-button-group{display:flex;margin-left:auto;margin-right:auto}.sn-component .sk-panel-section:last-child{margin-bottom:0}#header{background-color:var(--sn-stylekit-background-color);display:flex;overflow:auto;padding:10px 0;width:100%}#header svg:after{content:"";background:var(--sn-stylekit-info-color);opacity:.1}#header .sk-button-group{max-width:700px;padding-left:2px;padding-right:2px}#header .sk-button-group .divider{opacity:.25;cursor:unset;margin-right:0}@media screen and (max-width:330px){#header .sk-button-group .divider{display:none}}#header.fixed{position:fixed;z-index:10}.menu-overlay{background-color:var(--sn-stylekit-neutral-color);cursor:pointer;height:100%;left:0;opacity:.2;position:fixed;top:60.2px;width:100%;z-index:9}@media screen and (max-width:330px){.menu-overlay{top:56.2px}}#menu{background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-border-color);border-right-width:0;display:flex;flex-direction:column;height:calc(100% - 62px);margin-right:0;margin-top:0;max-width:60%;min-width:330px;overflow-y:auto;position:fixed;right:0;width:100%;z-index:10}@media screen and (max-width:330px){#menu{max-width:100%;min-width:300px;height:calc(100vh - 56.2px)}}@media screen and (min-width:750px){#menu{max-width:450px;width:450px}}#menu .notification p{display:flex;margin:0 20px 8px;padding:0 16px;text-align:left}#menu .notification.visible{visibility:visible;opacity:1;transition:opacity .2s ease-in}#menu .notification.hidden{height:0;visibility:hidden;opacity:0;transition:visibility 0s .5s,opacity .5s ease-out}@media screen and (max-width:450px){#menu #printButton{display:none}}@media screen and (min-width:800px){#menu .extra-space{margin-bottom:5em}}#content{background-color:var(--sn-stylekit-contrast-background-color);flex:auto;display:flex;justify-content:center}@media screen and (max-width:725px){#content{padding:0}}#content.fixed-header{padding-top:60.2px}@media screen and (max-width:330px){#content.fixed-header{padding-top:56.2px}}#content.fixed-height{max-height:calc(100vh - 60.2px)}@media screen and (max-width:330px){#content.fixed-height{max-height:calc(100vh - 56.2px)}}#appendix.borderless,#content.borderless{background-color:var(--sn-stylekit-background-color)}#appendix.borderless .sk-panel.main,#appendix.full-width .sk-panel.main,#content.borderless .sk-panel.main,#content.full-width .sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}#appendix.borderless .sk-panel.main.edit,#appendix.borderless .sk-panel.main.view,#appendix.full-width .sk-panel.main,#appendix.full-width .sk-panel.main.edit,#appendix.full-width .sk-panel.main.view,#content.borderless .sk-panel.main.edit,#content.borderless .sk-panel.main.view,#content.full-width .sk-panel.main,#content.full-width .sk-panel.main.edit,#content.full-width .sk-panel.main.view{margin:0}#appendix.full-width .rendered-note-section,#appendix.full-width .sk-panel.main,#content.full-width .rendered-note-section,#content.full-width .sk-panel.main{max-width:unset}#appendix.full-width .monacoEditor,#content.full-width .monacoEditor{max-width:calc(100% - 1.25rem)}#appendix.overflow #renderedNote,#content.overflow #renderedNote{overflow-wrap:normal}#appendix.overflow #renderedNote pre,#appendix.overflow #renderedNote table,#content.overflow #renderedNote pre,#content.overflow #renderedNote table{overflow:visible}#appendix,#content,#menu,.DynamicEditor{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}#appendix a,#content a,#menu a,.DynamicEditor a{color:var(--sn-stylekit-info-color);text-decoration:none}#appendix a:hover,#content a:hover,#menu a:hover,.DynamicEditor a:hover{text-decoration:underline}#appendix blockquote,#content blockquote,#menu blockquote,.DynamicEditor blockquote{margin:0 0 16px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}#appendix hr,#content hr,#menu hr,.DynamicEditor hr{border:.5px solid var(--sn-stylekit-border-color)}#appendix img,#content img,#menu img,.DynamicEditor img{max-width:100%}#appendix table,#content table,#menu table,.DynamicEditor table{display:block;width:100%;overflow:auto;margin-top:0;margin-bottom:16px;border-spacing:0;border-collapse:collapse}#appendix table tr,#content table tr,#menu table tr,.DynamicEditor table tr{background-color:transparent;border-top:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table td,#appendix table th,#content table td,#content table th,#menu table td,#menu table th,.DynamicEditor table td,.DynamicEditor table th{padding:6px 13px;border:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table tr:nth-child(2n),#content table tr:nth-child(2n),#menu table tr:nth-child(2n),.DynamicEditor table tr:nth-child(2n){background-color:var(--sn-stylekit-contrast-background-color)}#appendix table tr:nth-child(2n) code,#appendix table tr:nth-child(2n) pre,#content table tr:nth-child(2n) code,#content table tr:nth-child(2n) pre,#menu table tr:nth-child(2n) code,#menu table tr:nth-child(2n) pre,.DynamicEditor table tr:nth-child(2n) code,.DynamicEditor table tr:nth-child(2n) pre{background-color:var(--sn-stylekit-background-color)}#appendix summary .link,#content summary .link,#menu summary .link,.DynamicEditor summary .link{display:inline;color:var(--sn-stylekit-info-color)}#appendix summary .link:hover,#content summary .link:hover,#menu summary .link:hover,.DynamicEditor summary .link:hover{text-decoration:underline}#appendix h1,#appendix h2,#appendix h3,#content h1,#content h2,#content h3,#menu h1,#menu h2,#menu h3,.DynamicEditor h1,.DynamicEditor h2,.DynamicEditor h3{line-height:normal}#appendDynamicEditor code,#appendDynamicEditor pre,#dynamicEditor code,#dynamicEditor pre,#errorBoundary code,#errorBoundary pre,#help code,#help pre,#intro code,#intro pre,#renderedNote code,#renderedNote pre,#settings code,#settings pre,.DynamicEditor code,.DynamicEditor pre,.rendered-note-section code,.rendered-note-section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}#appendDynamicEditor .hljs,#dynamicEditor .hljs,#errorBoundary .hljs,#help .hljs,#intro .hljs,#renderedNote .hljs,#settings .hljs,.DynamicEditor .hljs,.rendered-note-section .hljs{color:var(--sn-stylekit-contrast-foreground-color)}#appendDynamicEditor .hljs-tag,#dynamicEditor .hljs-tag,#errorBoundary .hljs-tag,#help .hljs-tag,#intro .hljs-tag,#renderedNote .hljs-tag,#settings .hljs-tag,.DynamicEditor .hljs-tag,.rendered-note-section .hljs-tag{color:var(--sn-stylekit-foreground-color)}#appendDynamicEditor code,#dynamicEditor code,#errorBoundary code,#help code,#intro code,#renderedNote code,#settings code,.DynamicEditor code,.rendered-note-section code{box-sizing:border-box;word-wrap:break-word;padding:.2em .4em;margin:0;font-size:85%;background-color:var(--sn-stylekit-contrast-background-color);border-radius:3px}#appendDynamicEditor pre,#dynamicEditor pre,#errorBoundary pre,#help pre,#intro pre,#renderedNote pre,#settings pre,.DynamicEditor pre,.rendered-note-section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-foreground-color);border-radius:3px;word-wrap:normal;margin-top:0;margin-bottom:16px}#appendDynamicEditor pre>code,#dynamicEditor pre>code,#errorBoundary pre>code,#help pre>code,#intro pre>code,#renderedNote pre>code,#settings pre>code,.DynamicEditor pre>code,.rendered-note-section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;background-color:transparent;border:0}#appendDynamicEditor pre code,#dynamicEditor pre code,#errorBoundary pre code,#help pre code,#intro pre code,#renderedNote pre code,#settings pre code,.DynamicEditor pre code,.rendered-note-section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;background-color:initial;border:0}#errorBoundary,#help,#intro,.rendered-note-section{padding:9px 10px;border:1px solid transparent;margin-left:auto;margin-right:auto;max-width:645.5px}#errorBoundary,#help,#intro,#renderedNote,.rendered-section{word-wrap:break-word;overflow-wrap:break-word;line-height:1.7}.inline-text-and-svg{display:inline-flex;padding-left:0;padding-right:0}.inline-text-and-svg svg{opacity:.75;margin-top:auto}#errorBoundary>:first-child,#renderedNote>div>:first-child,.ProseMirror>:nth-child(2){margin-top:0}.note-overlay{position:fixed!important;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:100}.note-dialog{max-width:700px;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:200}#settings{height:100%}#settings .title-section,.note-dialog .title-section{padding-top:0}#settings .title-section h1,#settings .title-section h2,.note-dialog .title-section h1,.note-dialog .title-section h2{margin:.2em 0}#settings .text-and-undo-button,.note-dialog .text-and-undo-button{display:flex}#settings .text-and-undo-button .undo-icon,#settings .text-and-undo-button p,.note-dialog .text-and-undo-button .undo-icon,.note-dialog .text-and-undo-button p{margin-top:0;margin-bottom:0;display:inline}@media screen and (max-width:650px){#settings button,.note-dialog button{font-size:17px}}#settings input[type=checkbox i]:hover,.note-dialog input[type=checkbox i]:hover{cursor:pointer}#settings .sk-panel-row.settings,.note-dialog .sk-panel-row.settings{padding-top:.2rem}#settings .sk-panel-row.settings input,#settings .sk-panel-row.settings label,#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings label,.note-dialog .sk-panel-row.settings select{cursor:pointer}#settings .sk-panel-row.settings input,#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings select{font-size:16px;padding:.5rem;background-color:var(--sn-stylekit-contrast-background-color);border-color:var(--sn-stylekit-border-color);color:var(--sn-stylekit-foreground-color)}#settings .sk-panel-row.settings .input-and-undo-button,.note-dialog .sk-panel-row.settings .input-and-undo-button{display:flex}#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings select{min-width:217px}#settings .sk-panel-row.settings input[type=text],.note-dialog .sk-panel-row.settings input[type=text]{min-width:200px}#settings .sk-panel-row.settings .checkbox-input-label,.note-dialog .sk-panel-row.settings .checkbox-input-label{padding-left:98.6px;padding-right:98.6px}@media screen and (min-width:360px){#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings select{min-width:267px}#settings .sk-panel-row.settings input[type=text],.note-dialog .sk-panel-row.settings input[type=text]{min-width:250px}#settings .sk-panel-row.settings .checkbox-input-label,.note-dialog .sk-panel-row.settings .checkbox-input-label{padding-left:123.6px;padding-right:123.6px}#settings .sk-panel-row.settings .chevron-toggle-button,.note-dialog .sk-panel-row.settings .chevron-toggle-button{min-width:267px}}#settings .sk-panel-row.settings .radio,.note-dialog .sk-panel-row.settings .radio{margin-top:3px;margin-bottom:3px}@media screen and (max-width:480px){#settings .sk-panel-row.settings,.note-dialog .sk-panel-row.settings{flex-direction:column;align-items:flex-start}#settings .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings input{margin-top:1rem}#settings .sk-panel-row.settings.custom-css,.note-dialog .sk-panel-row.settings.custom-css{flex-direction:row;max-width:299px}#settings .sk-panel-row.settings.custom-css .custom-css-undo-button,.note-dialog .sk-panel-row.settings.custom-css .custom-css-undo-button{margin-top:auto;margin-bottom:auto}}#appendix{background-color:var(--sn-stylekit-contrast-background-color);display:block}#appendix .sk-button-group{width:50%}#appendix .sk-panel{margin-top:0;margin-left:auto;margin-right:auto}#appendix .checkBoxForm{position:absolute;font-size:13px;padding-left:25px}#appendix .checkBoxForm label{cursor:pointer}@media screen and (max-width:600px){#appendix .checkBoxForm{padding-left:10px}}@media screen and (max-width:500px){#appendix .checkBoxForm{padding-left:5px}}@media screen and (max-width:455px){#appendix .checkBoxForm label{font-size:12px}}@media screen and (max-width:426px){#appendix .checkBoxForm label{font-size:11px}}@media screen and (max-width:410px){#appendix .checkBoxForm label{font-size:10px}}@media screen and (max-width:388px){#appendix .checkBoxForm label{font-size:9px}}#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:14px}@media screen and (max-width:650px){#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:17px}}#appendix #scrollToTopButton{position:fixed;right:25px;bottom:45px}@media screen and (max-width:725px){#appendix #scrollToTopButton{right:15px;bottom:5.2px}}#appendix #scrollToBottomButton{position:fixed;right:25px;bottom:10px}@media screen and (max-width:725px){#appendix #scrollToBottomButton{right:55px;bottom:5.2px}}.MonacoDiffEditorContainer,.MonacoEditorContainer{min-height:200px;width:calc(100% - 1.5px);max-width:inherit;max-height:inherit}.edit .MonacoDiffEditorContainer,.edit .MonacoEditorContainer{min-height:200px;height:calc(100% - 1.7em);margin-bottom:25px}#appendix .MonacoEditorContainer{height:400px}#content .CodeMirror{max-height:calc(100% - 1rem)}#appendix .CodeMirror{max-height:calc(100% - 2px)}.CodeMirror{font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);background:inherit;color:inherit;line-height:1.7;min-height:8.25em;border:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:725px){.CodeMirror{border-top:1px solid var(--sn-stylekit-border-color)}}.CodeMirror .CodeMirror-gutter,.CodeMirror .CodeMirror-gutters,.CodeMirror .CodeMirror-linenumber,.CodeMirror .CodeMirror-scroll,.CodeMirror .CodeMirror-sizer{background:inherit}.CodeMirror .CodeMirror-linenumber{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}.CodeMirror .cm-header.cm-header-1{font-size:2em}.CodeMirror .cm-header.cm-header-2{font-size:1.5em}.CodeMirror .cm-header.cm-header-3{font-size:1.17em}.CodeMirror .cm-header.cm-header-4{font-size:1em}.CodeMirror .cm-comment{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font);font-size:85%;margin:0;padding:.2em .4em}.CodeMirror .cm-comment.cm-link.CodeMirror-selectedtext,.CodeMirror .cm-comment.CodeMirror-selectedtext{background-color:unset}.CodeMirror .cm-attribute,.CodeMirror .cm-header{color:var(--sn-stylekit-success-color)}.CodeMirror .cm-string-2,.CodeMirror .cm-tag,.CodeMirror .cm-tag.cm-bracket,.CodeMirror .cm-variable,.CodeMirror .cm-variable-1,.CodeMirror .cm-variable-2,.CodeMirror .cm-variable-3{color:var(--sn-stylekit-foreground-color)}.CodeMirror .cm-string-2.CodeMirror-selectedtext,.CodeMirror .cm-tag.cm-bracket.CodeMirror-selectedtext,.CodeMirror .cm-tag.CodeMirror-selectedtext,.CodeMirror .cm-variable-1.CodeMirror-selectedtext,.CodeMirror .cm-variable-2.CodeMirror-selectedtext,.CodeMirror .cm-variable-3.CodeMirror-selectedtext,.CodeMirror .cm-variable.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror .cm-builtin,.CodeMirror .cm-string,.CodeMirror .cm-string.cm-url.cm-variable-2{color:var(--sn-stylekit-warning-color)}.CodeMirror .cm-error{color:var(--sn-stylekit-danger-color)}.CodeMirror .cm-link,.CodeMirror .cm-link.cm-variable-2{color:var(--sn-stylekit-info-color)}.CodeMirror .cm-quote{color:#6a737d}.cm-attribute.CodeMirror-selectedtext,.cm-builtin.CodeMirror-selectedtext,.cm-keyword.CodeMirror-selectedtext,.cm-link.CodeMirror-selectedtext,.cm-number.CodeMirror-selectedtext,.cm-string.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror-dialog{position:fixed;background:var(--sn-stylekit-background-color)}.CodeMirror-cursor{border-color:var(--sn-stylekit-info-color)}.CodeMirror-selected{background:var(--sn-stylekit-input-placeholder-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-focused .CodeMirror-selected{background:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-selectedtext{background:transparent;color:var(--sn-stylekit-info-contrast-color)}.DynamicEditor{padding:9px 30px 10px}.DynamicEditor div[class^=sc]{background-color:var(--sn-stylekit-background-color)}button.block-menu-trigger{display:none!important}@media screen and (min-width:725px){.DynamicEditor{padding:5px 20px 10px}}@media screen and (min-width:600px){.YouTube{min-height:315px;min-width:560px;margin:10px auto;display:block}}.ProseMirror{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color)}@media print{.printURL a[href]:after{content:" (" attr(href) ")"}.sn-component{outline:none}#content.fixed-header{padding-top:unset}#content.fixed-height{max-height:unset}#appendix,#header,#menu,.menu-overlay{display:none}.sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix,.sk-panel.main.edit{display:none;background-color:var(--sn-stylekit-background-color)}.appendix,.content{background-color:var(--sn-stylekit-background-color)!important}#renderedNote pre code{white-space:pre-wrap;word-break:break-word}}@media (prefers-color-scheme:dark){:root{--primary-bg-color:#292937;--secondary-bg-color:#313142;--editor-bg-color:#202020;--border-color:#13131a;--ui-text-color:#d8d8d8;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-neutral-color:#7c7c7c;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-desktop-titlebar-bg-color:var(--primary-bg-color);--sn-desktop-titlebar-border-color:var(--border-color);--sn-desktop-titlebar-ui-color:var(--ui-text-color);--sn-desktop-titlebar-ui-hover-color:var(--sn-stylekit-info-color);--sn-stylekit-shadow-color:#20202b;--sn-stylekit-background-color:#20202b;--sn-stylekit-border-color:var(--border-color);--sn-stylekit-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-background-color:var(--secondary-bg-color);--sn-stylekit-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-border-color:var(--border-color);--sn-stylekit-secondary-background-color:#292937;--sn-stylekit-secondary-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-border-color:var(--border-color);--sn-stylekit-secondary-contrast-background-color:#45445a;--sn-stylekit-secondary-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-contrast-border-color:var(--border-color);--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:var(--ui-text-color);--sn-stylekit-scrollbar-track-border-color:var(--border-color);--sn-stylekit-scrollbar-thumb-color:var(--sn-stylekit-info-color)}.CodeMirror,.sn-component .sk-input.contrast{background-color:var(--sn-stylekit-background-color)}} -/*# sourceMappingURL=main.7af3225e.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/main.7af3225e.chunk.css.map b/build/static/css/main.7af3225e.chunk.css.map deleted file mode 100644 index dca88449..00000000 --- a/build/static/css/main.7af3225e.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://src/index.scss","webpack://node_modules/highlight.js/scss/vs.scss","webpack://src/stylesheets/main.scss","webpack://src/stylesheets/codemirror.scss","webpack://src/stylesheets/dynamicEditor.scss","webpack://src/stylesheets/print.scss","webpack://src/stylesheets/dark.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CACnC,KAGC,yEACW,CCNb,MACE,aAAc,CACd,eAAgB,CAChB,YAAc,CACd,eAAiB,CACjB,UAAY,CACb,yCAKC,WAAc,CACf,qEAOC,UAAW,CACZ,0IAWC,aAAc,CACf,oEAMC,aAAc,CACf,aAGC,UAAc,CACf,WAGC,SAAW,CACZ,qCAKC,aAAc,CACf,eAIC,iBAAkB,CACnB,aAGC,eAAiB,CC5DnB,MACE,mCAA+B,CAC/B,0GAA6B,CAE9B,oCAGC,MACE,mCAA+B,CAChC,GAEC,gBAAiB,CAClB,CAGH,UAEE,4BAA6B,CAC7B,8CAA+C,CAC/C,2CAA4C,CAC5C,WAAY,CACZ,QAAS,CACT,SAAU,CACV,UAAW,CACZ,EAIC,yCAA6C,CAC9C,OAGC,yCAA0C,CAC1C,4BAA6B,CAC7B,cAAiB,CACjB,8CAA+C,CAC/C,cAAA,CAAA,6CAA8C,CALhD,eAQM,WAAa,CARnB,iBAYI,6DAA8D,CAZlE,aAeI,cAAe,CAfnB,6BAkBI,cAAiB,CACjB,YAAa,CAnBjB,mBAsBI,YAAa,CACb,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AA8C,CAE9C,yEAAsC,CACtC,yEAAsC,CAEtC,uDAAmC,CAEnC,8DAA2C,CAC3C,iEAAoC,CACrC,6CAOC,oDAAqD,CACtD","file":"main.7af3225e.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond \n\n*/\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: white;\n color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n color: #2b91af;\n}\n\n.hljs-doctag {\n color: #808080;\n}\n\n.hljs-attr {\n color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n","@import '~sn-stylekit/dist/stylekit.css';\n@import '~codemirror/lib/codemirror.css';\n@import '~codemirror/addon/dialog/dialog.css';\n@import '~codemirror/addon/search/matchesonscrollbar.css';\n@import '~highlight.js/scss/vs.scss';\n\n:root {\n --sn-stylekit-font-size-editor: 16px;\n --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo,\n 'Ubuntu Mono', courier, monospace;\n}\n\n@media screen and (max-width: 650px) {\n :root {\n --sn-stylekit-font-size-editor: 18px;\n }\n h1 {\n font-size: 1.75em; // is usually 2em\n }\n}\n\nbody,\nhtml {\n background-color: transparent;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-base-font-size);\n height: 100%;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n* {\n // To prevent gray flash when focusing input on mobile Safari\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nbutton {\n color: var(--sn-stylekit-foreground-color);\n background-color: transparent;\n border-width: 0px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n &.off {\n svg {\n opacity: 0.75;\n }\n }\n &.off:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n &:hover {\n cursor: pointer;\n }\n &.chevron-toggle-button {\n padding-left: 0px;\n display: flex;\n }\n &.menu-button {\n display: flex;\n margin: 8px 20px;\n padding: 8px 16px;\n text-align: left;\n svg {\n margin-top: auto;\n }\n &.chevron-toggle-button {\n padding-top: 0px;\n padding-bottom: 0px;\n @media screen and (min-width: 330px) {\n padding: 0px;\n }\n }\n }\n .chevron-icon,\n .chevron-button-caption {\n line-height: 20px;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n .button-caption {\n padding-left: 5px;\n }\n}\n\nbutton:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n}\n\nbutton:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n}\n\n.sn-component {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n\n .sk-button.info,\n .sk-button.neutral {\n font-size: var(--sn-stylekit-font-size-editor);\n }\n\n .sk-panel.main {\n max-width: 700px;\n width: 100%;\n margin: 10px 5px;\n\n @media screen and (max-width: 725px) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n box-shadow: none;\n margin: 0;\n }\n &.monacoEditor {\n max-width: 800px;\n }\n &.otherEditor {\n @media screen and (max-width: 725px) {\n border-top: none;\n }\n }\n }\n\n .sk-panel-content.edit {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n padding-left: 0px !important;\n padding-right: 0px !important;\n padding-top: 0px !important;\n }\n\n // Hides the horizontal scroll bar when using the Monaco Editor\n // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words\n &.monacoEditor {\n overflow-x: hidden !important;\n }\n }\n\n .sk-panel-content.view {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n padding: 0px !important;\n }\n }\n\n .sk-input.textarea {\n min-height: 136px;\n padding: 9px 10px;\n max-width: inherit;\n width: calc(100% - 22px);\n height: 100%;\n resize: vertical;\n overflow-y: auto;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n line-height: 1.7;\n }\n\n // This is automatic in Microsoft Edge.\n // We need to make it explicit for Firefox.\n .sk-input.textarea:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n }\n\n .sk-input.textarea.editnote {\n max-height: calc(100% - 32px);\n }\n\n .sk-input.textarea.append {\n max-height: calc(100% - 22px);\n }\n\n .sk-panel-row {\n // used in #appendix, note dialog, and settings\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; // default is 0.4rem top only\n }\n .sk-button-group {\n display: flex;\n margin-left: auto;\n margin-right: auto;\n }\n .sk-panel-section:last-child {\n margin-bottom: 0px;\n }\n}\n\n#header {\n background-color: var(--sn-stylekit-background-color);\n display: flex;\n overflow: auto;\n padding: 10px 0;\n width: 100%;\n\n svg::after {\n content: '';\n background: var(--sn-stylekit-info-color);\n opacity: 0.1;\n }\n\n .sk-button-group {\n max-width: 700px;\n padding-left: 2px;\n padding-right: 2px;\n\n .divider {\n opacity: 0.25;\n cursor: unset;\n margin-right: 0px;\n @media screen and (max-width: 330px) {\n display: none;\n }\n }\n }\n &.fixed {\n position: fixed;\n z-index: 10;\n }\n}\n\n.menu-overlay {\n background-color: var(--sn-stylekit-neutral-color);\n cursor: pointer;\n height: 100%;\n left: 0;\n opacity: 0.2;\n position: fixed;\n top: 60.2px;\n width: 100%;\n z-index: 9;\n @media screen and (max-width: 330px) {\n top: 56.2px;\n }\n}\n\n#menu {\n background-color: var(--sn-stylekit-background-color);\n border: 1px solid var(--sn-stylekit-border-color);\n border-right-width: 0px;\n display: flex;\n flex-direction: column;\n height: calc(100% - 62px);\n margin-right: 0px;\n margin-top: 0px;\n max-width: 60%;\n min-width: 330px;\n overflow-y: auto;\n position: fixed;\n right: 0px;\n width: 100%;\n z-index: 10;\n\n @media screen and (max-width: 330px) {\n max-width: 100%;\n min-width: 300px;\n height: calc(100vh - 56.2px);\n }\n\n @media screen and (min-width: 750px) {\n max-width: 450px;\n width: 450px;\n }\n\n .notification {\n p {\n display: flex;\n margin: 0px 20px 8px;\n padding: 0px 16px;\n text-align: left;\n }\n &.visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 200ms ease-in;\n }\n\n &.hidden {\n height: 0px;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 500ms, opacity 500ms ease-out;\n }\n }\n @media screen and (max-width: 450px) {\n #printButton {\n display: none;\n }\n }\n .extra-space {\n @media screen and (min-width: 800px) {\n margin-bottom: 5em;\n }\n }\n}\n\n#content {\n background-color: var(--sn-stylekit-contrast-background-color);\n flex: auto;\n display: flex;\n justify-content: center;\n\n @media screen and (max-width: 725px) {\n padding: 0;\n }\n &.fixed-header {\n padding-top: 60.2px;\n @media screen and (max-width: 330px) {\n padding-top: 56.2px;\n }\n }\n &.fixed-height {\n max-height: calc(100vh - 60.2px);\n @media screen and (max-width: 330px) {\n max-height: calc(100vh - 56.2px);\n }\n }\n}\n\n#content,\n#appendix {\n &.borderless {\n background-color: var(--sn-stylekit-background-color);\n }\n &.borderless,\n &.full-width {\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n &.edit,\n &.view {\n margin: 0px;\n }\n }\n }\n &.full-width {\n // Also includes appendix\n .sk-panel.main {\n margin: 0px;\n }\n .sk-panel.main,\n .rendered-note-section {\n max-width: unset;\n }\n .monacoEditor {\n max-width: calc(100% - 1.25rem);\n }\n }\n &.overflow {\n #renderedNote {\n overflow-wrap: normal;\n pre,\n table {\n overflow: visible;\n }\n }\n }\n}\n\n#menu,\n#content,\n#appendix,\n.DynamicEditor {\n font-size: var(--sn-stylekit-font-size-editor);\n a {\n color: var(--sn-stylekit-info-color); // #086dd6;\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n blockquote {\n margin: 0;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0 1em;\n color: #6a737d;\n border-left: 0.25em solid #dfe2e5;\n }\n\n hr {\n border: 0.5px solid var(--sn-stylekit-border-color);\n }\n\n img {\n max-width: 100%; // 645.500px;\n }\n\n table {\n display: block;\n width: 100%;\n overflow: auto;\n margin-top: 0;\n margin-bottom: 16px;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n background-color: transparent; // #fff;\n border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1;\n }\n\n td,\n th {\n padding: 6px 13px;\n border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5;\n }\n\n tr:nth-child(2n) {\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // #f6f8fa;\n code,\n pre {\n background-color: var(--sn-stylekit-background-color);\n }\n }\n }\n summary {\n .link {\n display: inline;\n color: var(--sn-stylekit-info-color);\n }\n .link:hover {\n text-decoration: underline;\n }\n }\n\n h1,\n h2,\n h3 {\n line-height: normal;\n }\n}\n\n// Exclude CodeMirror\n#appendDynamicEditor,\n#dynamicEditor,\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n#settings,\n.DynamicEditor,\n.rendered-note-section {\n code,\n pre {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .hljs {\n color: var(--sn-stylekit-contrast-foreground-color);\n }\n .hljs-tag {\n color: var(--sn-stylekit-foreground-color);\n }\n\n code {\n box-sizing: border-box;\n word-wrap: break-word;\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);\n border-radius: 3px;\n }\n\n pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode\n color: var(--sn-stylekit-foreground-color);\n border-radius: 3px;\n word-wrap: normal;\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n background-color: transparent;\n border: 0;\n }\n\n pre code {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: initial;\n border: 0;\n }\n}\n\n#errorBoundary,\n#help,\n#intro,\n.rendered-note-section {\n padding: 9px 10px;\n border: 1px transparent;\n border-style: solid;\n margin-left: auto;\n margin-right: auto;\n max-width: 645.5px; //628.700px;\n}\n\n// Same selection plus #renderedNote\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n.rendered-section {\n /*align-items: center;\n justify-content: space-between;\n min-width: inherit;\n width: 100%;*/\n word-wrap: break-word;\n overflow-wrap: break-word;\n line-height: 1.7;\n}\n\n.inline-text-and-svg {\n display: inline-flex;\n padding-left: 0px;\n padding-right: 0px;\n svg {\n opacity: 0.75;\n margin-top: auto;\n }\n}\n\n#errorBoundary > :nth-child(1),\n#renderedNote > div > :nth-child(1),\n.ProseMirror > :nth-child(2) {\n margin-top: 0px;\n}\n\n.note-overlay {\n position: fixed !important;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n}\n\n.note-dialog {\n max-width: 700px;\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 200;\n}\n\n#settings {\n height: 100%;\n}\n\n.note-dialog,\n#settings {\n .title-section {\n padding-top: 0px;\n h1,\n h2 {\n margin: 0.2em 0px;\n }\n }\n .text-and-undo-button {\n display: flex;\n p,\n .undo-icon {\n margin-top: 0px;\n margin-bottom: 0px;\n display: inline;\n }\n }\n button {\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n }\n input[type='checkbox' i]:hover {\n cursor: pointer;\n }\n\n .sk-panel-row.settings {\n padding-top: 0.2rem;\n label,\n input,\n select {\n cursor: pointer;\n }\n input,\n select {\n font-size: 16px;\n padding: 0.5rem;\n background-color: var(--sn-stylekit-contrast-background-color);\n border-color: var(--sn-stylekit-border-color);\n color: var(--sn-stylekit-foreground-color);\n }\n .input-and-undo-button {\n display: flex;\n }\n /* On screens with screens less than 360px\n The inputs and buttons have width 217px*/\n select {\n min-width: 217px;\n }\n input[type='text'] {\n min-width: 200px;\n }\n // The checkbox is 19.8px wide.\n // 98.6 + 98.6 + 18.8px is 217\n // Use padding instead of width to center the checkbox\n .checkbox-input-label {\n padding-left: 98.6px;\n padding-right: 98.6px;\n }\n @media screen and (min-width: 360px) {\n /* On screens with screens greater than 360px\n The inputs and buttons have width 267px*/\n select {\n min-width: 267px;\n }\n input[type='text'] {\n min-width: 250px;\n }\n .checkbox-input-label {\n padding-left: 123.6px;\n padding-right: 123.6px;\n }\n .chevron-toggle-button {\n min-width: 267px;\n }\n }\n .radio {\n margin-top: 3px;\n margin-bottom: 3px;\n }\n // Collapse on mobile\n @media screen and (max-width: 480px) {\n flex-direction: column;\n align-items: flex-start;\n\n input {\n margin-top: 1rem;\n }\n &.custom-css {\n flex-direction: row;\n max-width: 299px;\n .custom-css-undo-button {\n margin-top: auto;\n margin-bottom: auto;\n }\n }\n }\n }\n}\n\n#appendix {\n background-color: var(--sn-stylekit-contrast-background-color);\n display: block;\n\n .sk-button-group {\n width: 50%;\n }\n .sk-panel {\n margin-top: 0;\n margin-left: auto;\n margin-right: auto;\n }\n\n .checkBoxForm {\n position: absolute;\n font-size: 13px;\n\n label {\n cursor: pointer;\n }\n padding-left: 25px;\n @media screen and (max-width: 600px) {\n padding-left: 10px;\n }\n @media screen and (max-width: 500px) {\n padding-left: 5px;\n }\n @media screen and (max-width: 455px) {\n label {\n font-size: 12px;\n }\n }\n @media screen and (max-width: 426px) {\n label {\n font-size: 11px;\n }\n }\n @media screen and (max-width: 410px) {\n label {\n font-size: 10px;\n }\n }\n @media screen and (max-width: 388px) {\n label {\n font-size: 9px;\n }\n }\n }\n\n #appendTextButton,\n #scrollToTopButton,\n #scrollToBottomButton {\n font-size: 14px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n }\n\n #scrollToTopButton {\n position: fixed;\n right: 25px;\n bottom: 45px;\n @media screen and (max-width: 725px) {\n right: 15px;\n bottom: 5.2px;\n }\n }\n #scrollToBottomButton {\n position: fixed;\n right: 25px;\n bottom: 10px;\n @media screen and (max-width: 725px) {\n right: 55px;\n bottom: 5.2px;\n }\n }\n}\n\n.MonacoEditorContainer,\n.MonacoDiffEditorContainer {\n min-height: 200px;\n width: calc(100% - 1.5px);\n max-width: inherit;\n max-height: inherit;\n}\n\n.edit .MonacoEditorContainer,\n.edit .MonacoDiffEditorContainer {\n min-height: 200px;\n height: calc(100% - 1.7em);\n margin-bottom: 25px;\n}\n\n#appendix .MonacoEditorContainer {\n height: 400px;\n}\n\n@import './codemirror.scss';\n@import './dynamicEditor.scss';\n@import './print.scss';\n@import './dark.scss';\n","#content .CodeMirror {\n max-height: calc(100% - 1rem);\n}\n\n#appendix .CodeMirror {\n max-height: calc(100% - 2px);\n}\n\n.CodeMirror {\n //fix : margin left is 30px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n background: inherit;\n color: inherit;\n line-height: 1.7;\n min-height: 8.25em;\n border: 1px solid var(--sn-stylekit-contrast-border-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n\n @media screen and (max-width: 725px) {\n border-top: 1px solid var(--sn-stylekit-border-color);\n }\n .CodeMirror-scroll,\n .CodeMirror-sizer,\n .CodeMirror-gutter,\n .CodeMirror-gutters,\n .CodeMirror-linenumber {\n background: inherit;\n }\n .CodeMirror-linenumber {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .cm-header.cm-header-1 {\n font-size: 2em;\n }\n .cm-header.cm-header-2 {\n font-size: 1.5em;\n }\n .cm-header.cm-header-3 {\n font-size: 1.17em;\n }\n .cm-header.cm-header-4 {\n font-size: 1em;\n }\n .cm-comment {\n background-color: var(--sn-stylekit-contrast-background-color);\n color: var(--sn-stylekit-contrast-foreground-color);\n font-family: var(--sn-stylekit-monospace-font);\n font-size: 85%;\n margin: 0;\n padding: 0.2em 0.4em;\n }\n .cm-comment.CodeMirror-selectedtext,\n .cm-comment.cm-link.CodeMirror-selectedtext {\n background-color: unset;\n }\n .cm-attribute,\n .cm-header {\n color: var(--sn-stylekit-success-color);\n }\n .cm-variable,\n .cm-variable-1,\n .cm-variable-2,\n .cm-variable-3,\n .cm-string-2,\n .cm-tag,\n .cm-tag.cm-bracket {\n color: var(--sn-stylekit-foreground-color);\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n }\n .cm-builtin,\n .cm-string,\n .cm-string.cm-url.cm-variable-2 {\n color: var(--sn-stylekit-warning-color);\n }\n .cm-error {\n color: var(--sn-stylekit-danger-color);\n }\n .cm-link,\n .cm-link.cm-variable-2 {\n color: var(--sn-stylekit-info-color);\n }\n .cm-quote {\n color: #6a737d;\n }\n}\n.cm-link,\n.cm-string,\n.cm-keyword,\n.cm-builtin,\n.cm-number,\n.cm-attribute {\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n}\n.CodeMirror-dialog {\n position: fixed;\n background: var(--sn-stylekit-background-color);\n}\n.CodeMirror-cursor {\n border-color: var(--sn-stylekit-info-color);\n}\n.CodeMirror-selected {\n background: var(--sn-stylekit-input-placeholder-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-focused .CodeMirror-selected {\n background: var(--sn-stylekit-info-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-selectedtext {\n background: transparent;\n color: var(--sn-stylekit-info-contrast-color);\n}\n",".DynamicEditor {\n padding: 9px 30px 10px;\n div[class^='sc'] {\n background-color: var(--sn-stylekit-background-color);\n }\n}\nbutton.block-menu-trigger {\n display: none !important;\n}\n@media screen and (min-width: 725px) {\n .DynamicEditor {\n padding: 5px 20px 10px;\n }\n}\n@media screen and (min-width: 600px) {\n .YouTube {\n min-height: 315px;\n min-width: 560px;\n margin: 10px auto;\n display: block;\n }\n}\n\n.ProseMirror {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n}\n","@media print {\n .printURL {\n a[href]:after {\n content: ' (' attr(href) ')';\n }\n }\n\n .sn-component {\n outline: none;\n }\n\n #content {\n &.fixed-header {\n padding-top: unset;\n }\n &.fixed-height {\n max-height: unset;\n }\n }\n\n #appendix,\n #header,\n #menu,\n .menu-overlay {\n display: none;\n }\n\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n }\n\n .sk-panel.main.view {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n }\n\n .sk-panel.main.edit,\n .sk-panel.main.appendix {\n display: none;\n background-color: var(--sn-stylekit-background-color);\n }\n\n .content,\n .appendix {\n background-color: var(--sn-stylekit-background-color) !important;\n }\n\n #renderedNote pre code {\n white-space: pre-wrap;\n word-break: break-word;\n }\n}\n","@media (prefers-color-scheme: dark) {\n // This is the Midnight theme available here:\n // https://github.com/sn-extensions/midnight-theme\n // Licensed under AGPL-3.0\n :root {\n --primary-bg-color: #292937;\n --secondary-bg-color: #313142;\n --editor-bg-color: #202020;\n --border-color: #13131a;\n --ui-text-color: #d8d8d8;\n\n --sn-stylekit-info-color: #086dd6;\n --sn-stylekit-info-contrast-color: white;\n\n --sn-stylekit-neutral-color: #7c7c7c;\n --sn-stylekit-neutral-contrast-color: white;\n\n --sn-stylekit-success-color: #2b9612;\n --sn-stylekit-success-contrast-color: white;\n\n --sn-stylekit-warning-color: #f6a200;\n --sn-stylekit-warning-contrast-color: white;\n\n --sn-stylekit-danger-color: #f80324;\n --sn-stylekit-danger-contrast-color: white;\n\n --sn-desktop-titlebar-bg-color: var(--primary-bg-color);\n --sn-desktop-titlebar-border-color: var(--border-color);\n --sn-desktop-titlebar-ui-color: var(--ui-text-color);\n --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color);\n\n // StyleKit Vars\n --sn-stylekit-shadow-color: #20202b;\n\n --sn-stylekit-background-color: #20202b;\n --sn-stylekit-border-color: var(--border-color);\n --sn-stylekit-foreground-color: var(--ui-text-color);\n\n --sn-stylekit-contrast-background-color: var(--secondary-bg-color);\n --sn-stylekit-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-contrast-border-color: var(--border-color);\n\n --sn-stylekit-secondary-background-color: #292937;\n --sn-stylekit-secondary-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-border-color: var(--border-color);\n\n --sn-stylekit-secondary-contrast-background-color: #45445a;\n --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-contrast-border-color: var(--border-color);\n\n --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);\n --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);\n\n --sn-stylekit-paragraph-text-color: var(--ui-text-color);\n\n --sn-stylekit-scrollbar-track-border-color: var(--border-color);\n --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color);\n }\n\n /* Adjust background color for Plain Textarea and CodeMirror \n to be same as View Mode instead of a contrast background color. \n This improves readability / usability in dark modes. */\n .sn-component .sk-input.contrast,\n .CodeMirror {\n background-color: var(--sn-stylekit-background-color);\n }\n}\n"]} \ No newline at end of file diff --git a/build/static/css/main.9e9378f5.chunk.css b/build/static/css/main.9e9378f5.chunk.css new file mode 100644 index 00000000..5b863700 --- /dev/null +++ b/build/static/css/main.9e9378f5.chunk.css @@ -0,0 +1,2 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--sn-stylekit-font-size-editor:16px;--sn-stylekit-monospace-font:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace}@media screen and (max-width:650px){:root{--sn-stylekit-font-size-editor:18px}h1{font-size:1.75em}}body,html{background-color:transparent;background-color:var(--sn-stylekit-background-color);font-family:var(--sn-stylekit-sans-serif-font);font-size:var(--sn-stylekit-base-font-size);height:100%;margin:0;padding:0;width:100%}*{-webkit-tap-highlight-color:rgba(0,0,0,0)}button{color:var(--sn-stylekit-foreground-color);background-color:transparent;border-width:0;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}button.off svg{opacity:.75}button.off:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:hover{cursor:pointer}button.chevron-toggle-button{padding-left:0;display:flex}button.menu-button{display:flex;margin:8px 20px;padding:8px 16px;text-align:left}button.menu-button svg{margin-top:auto}button.menu-button.chevron-toggle-button{padding-top:0;padding-bottom:0}@media screen and (min-width:330px){button.menu-button.chevron-toggle-button{padding:0}}button .chevron-button-caption,button .chevron-icon{line-height:20px;margin-top:5px;margin-bottom:5px}button .button-caption{padding-left:5px}button:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component{display:flex;flex-direction:column;min-height:100vh}@media screen and (max-width:420px){.sn-component{min-height:-webkit-fill-available}}.sn-component .sk-button.info,.sn-component .sk-button.neutral{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}.sn-component .sk-panel.main{max-width:700px;width:100%;margin:10px 5px}@media screen and (max-width:725px){.sn-component .sk-panel.main{border-left:none;border-right:none;border-bottom:none;box-shadow:none;margin:0}}.sn-component .sk-panel.main.monacoEditor{max-width:800px}@media screen and (max-width:725px){.sn-component .sk-panel.main.otherEditor{border-top:none}}.sn-component .sk-panel-content.edit{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.edit{padding-left:0!important;padding-right:0!important;padding-top:0!important}}.sn-component .sk-panel-content.edit.MonacoEditorContainerParentDiv{overflow-x:hidden!important}.sn-component .sk-panel-content.view{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.view{padding:0!important}}.sn-component .sk-input.textarea{min-height:136px;padding:9px 10px;max-width:inherit;width:calc(100% - 22px);height:100%;resize:vertical;overflow-y:auto;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);line-height:1.7}.sn-component .sk-input.textarea:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component .sk-input.textarea.editnote{max-height:calc(100% - 32px)}.sn-component .sk-input.textarea.append{max-height:calc(100% - 22px)}.sn-component .sk-panel-row{padding-top:.5rem;padding-bottom:.5rem}.sn-component .sk-button-group{display:flex;margin-left:auto;margin-right:auto}.sn-component .sk-panel-section:last-child{margin-bottom:0}#header{background-color:var(--sn-stylekit-background-color);display:flex;overflow:auto;padding:10px 0;width:100%}#header svg:after{content:"";background:var(--sn-stylekit-info-color);opacity:.1}#header .sk-button-group{max-width:700px;padding-left:2px;padding-right:2px}#header .sk-button-group .divider{opacity:.25;cursor:unset;margin-right:0}@media screen and (max-width:330px){#header .sk-button-group .divider{display:none}}#header.fixed{position:fixed;z-index:10}.menu-overlay{background-color:var(--sn-stylekit-neutral-color);cursor:pointer;height:100%;left:0;opacity:.2;position:fixed;top:60.2px;width:100%;z-index:9}@media screen and (max-width:330px){.menu-overlay{top:56.2px}}#menu{background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-border-color);border-right-width:0;display:flex;flex-direction:column;height:calc(100% - 62px);margin-right:0;margin-top:0;max-width:60%;min-width:330px;overflow-y:auto;position:fixed;right:0;width:100%;z-index:10}@media screen and (max-width:330px){#menu{max-width:100%;min-width:300px;height:calc(100vh - 56.2px)}}@media screen and (min-width:750px){#menu{max-width:450px;width:450px}}#menu .notification p{display:flex;margin:0 20px 8px;padding:0 16px;text-align:left}#menu .notification.visible{visibility:visible;opacity:1;transition:opacity .2s ease-in}#menu .notification.hidden{height:0;visibility:hidden;opacity:0;transition:visibility 0s .5s,opacity .5s ease-out}@media screen and (max-width:450px){#menu #printButton{display:none}}@media screen and (min-width:800px){#menu .extra-space{margin-bottom:5em}}#content{background-color:var(--sn-stylekit-contrast-background-color);flex:auto;display:flex;justify-content:center}@media screen and (max-width:725px){#content{padding:0}}@media screen and (max-width:420px){#content.edit-only{max-height:calc(100vh - 60.2px)}#content.edit-only.focused{max-height:55vh}#content.edit-only.focused .CodeMirror{max-height:calc(55vh - .5rem)}}@media screen and (max-width:330px){#content.edit-only{max-height:calc(100vh - 56.2px)}}#content.fixed-header{padding-top:60.2px}@media screen and (max-width:330px){#content.fixed-header{padding-top:56.2px}}#content.fixed-height{max-height:calc(100vh - 60.2px)}@media screen and (max-width:330px){#content.fixed-height{max-height:calc(100vh - 56.2px)}}#appendix.borderless,#content.borderless{background-color:var(--sn-stylekit-background-color)}#appendix.borderless .sk-panel.main,#appendix.full-width .sk-panel.main,#content.borderless .sk-panel.main,#content.full-width .sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}#appendix.borderless .sk-panel.main.edit,#appendix.borderless .sk-panel.main.view,#appendix.full-width .sk-panel.main,#appendix.full-width .sk-panel.main.edit,#appendix.full-width .sk-panel.main.view,#content.borderless .sk-panel.main.edit,#content.borderless .sk-panel.main.view,#content.full-width .sk-panel.main,#content.full-width .sk-panel.main.edit,#content.full-width .sk-panel.main.view{margin:0}#appendix.full-width .rendered-note-section,#appendix.full-width .sk-panel.main,#content.full-width .rendered-note-section,#content.full-width .sk-panel.main{max-width:unset}#appendix.full-width .monacoEditor,#content.full-width .monacoEditor{max-width:calc(100% - 1.25rem)}#appendix.overflow #renderedNote,#content.overflow #renderedNote{overflow-wrap:normal}#appendix.overflow #renderedNote pre,#appendix.overflow #renderedNote table,#content.overflow #renderedNote pre,#content.overflow #renderedNote table{overflow:visible}#appendix,#content,#menu,.DynamicEditor{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}#appendix a,#content a,#menu a,.DynamicEditor a{color:var(--sn-stylekit-info-color);text-decoration:none}#appendix a:hover,#content a:hover,#menu a:hover,.DynamicEditor a:hover{text-decoration:underline}#appendix blockquote,#content blockquote,#menu blockquote,.DynamicEditor blockquote{margin:0 0 16px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}#appendix hr,#content hr,#menu hr,.DynamicEditor hr{border:.5px solid var(--sn-stylekit-border-color)}#appendix img,#content img,#menu img,.DynamicEditor img{max-width:100%}#appendix table,#content table,#menu table,.DynamicEditor table{display:block;width:100%;overflow:auto;margin-top:0;margin-bottom:16px;border-spacing:0;border-collapse:collapse}#appendix table tr,#content table tr,#menu table tr,.DynamicEditor table tr{background-color:transparent;border-top:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table td,#appendix table th,#content table td,#content table th,#menu table td,#menu table th,.DynamicEditor table td,.DynamicEditor table th{padding:6px 13px;border:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table tr:nth-child(2n),#content table tr:nth-child(2n),#menu table tr:nth-child(2n),.DynamicEditor table tr:nth-child(2n){background-color:var(--sn-stylekit-contrast-background-color)}#appendix table tr:nth-child(2n) code,#appendix table tr:nth-child(2n) pre,#content table tr:nth-child(2n) code,#content table tr:nth-child(2n) pre,#menu table tr:nth-child(2n) code,#menu table tr:nth-child(2n) pre,.DynamicEditor table tr:nth-child(2n) code,.DynamicEditor table tr:nth-child(2n) pre{background-color:var(--sn-stylekit-background-color)}#appendix summary .link,#content summary .link,#menu summary .link,.DynamicEditor summary .link{display:inline;color:var(--sn-stylekit-info-color)}#appendix summary .link:hover,#content summary .link:hover,#menu summary .link:hover,.DynamicEditor summary .link:hover{text-decoration:underline}#appendix h1,#appendix h2,#appendix h3,#content h1,#content h2,#content h3,#menu h1,#menu h2,#menu h3,.DynamicEditor h1,.DynamicEditor h2,.DynamicEditor h3{line-height:normal}#appendDynamicEditor code,#appendDynamicEditor pre,#dynamicEditor code,#dynamicEditor pre,#errorBoundary code,#errorBoundary pre,#help code,#help pre,#intro code,#intro pre,#renderedNote code,#renderedNote pre,#settings code,#settings pre,.DynamicEditor code,.DynamicEditor pre,.rendered-note-section code,.rendered-note-section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}#appendDynamicEditor .hljs,#dynamicEditor .hljs,#errorBoundary .hljs,#help .hljs,#intro .hljs,#renderedNote .hljs,#settings .hljs,.DynamicEditor .hljs,.rendered-note-section .hljs{color:var(--sn-stylekit-contrast-foreground-color)}#appendDynamicEditor .hljs-tag,#dynamicEditor .hljs-tag,#errorBoundary .hljs-tag,#help .hljs-tag,#intro .hljs-tag,#renderedNote .hljs-tag,#settings .hljs-tag,.DynamicEditor .hljs-tag,.rendered-note-section .hljs-tag{color:var(--sn-stylekit-foreground-color)}#appendDynamicEditor code,#dynamicEditor code,#errorBoundary code,#help code,#intro code,#renderedNote code,#settings code,.DynamicEditor code,.rendered-note-section code{box-sizing:border-box;word-wrap:break-word;padding:.2em .4em;margin:0;font-size:85%;background-color:var(--sn-stylekit-contrast-background-color);border-radius:3px}#appendDynamicEditor pre,#dynamicEditor pre,#errorBoundary pre,#help pre,#intro pre,#renderedNote pre,#settings pre,.DynamicEditor pre,.rendered-note-section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-foreground-color);border-radius:3px;word-wrap:normal;margin-top:0;margin-bottom:16px}#appendDynamicEditor pre>code,#dynamicEditor pre>code,#errorBoundary pre>code,#help pre>code,#intro pre>code,#renderedNote pre>code,#settings pre>code,.DynamicEditor pre>code,.rendered-note-section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;background-color:transparent;border:0}#appendDynamicEditor pre code,#dynamicEditor pre code,#errorBoundary pre code,#help pre code,#intro pre code,#renderedNote pre code,#settings pre code,.DynamicEditor pre code,.rendered-note-section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;background-color:initial;border:0}#errorBoundary,#help,#intro,.rendered-note-section{padding:9px 10px;border:1px solid transparent;margin-left:auto;margin-right:auto;max-width:645.5px}#errorBoundary,#help,#intro,#renderedNote,.rendered-section{word-wrap:break-word;overflow-wrap:break-word;line-height:1.7}.inline-text-and-svg{display:inline-flex;padding-left:0;padding-right:0}.inline-text-and-svg svg{opacity:.75;margin-top:auto}#errorBoundary>:first-child,#renderedNote>div>:first-child,.ProseMirror>:nth-child(2){margin-top:0}.note-overlay{position:fixed!important;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:100}.note-dialog{max-width:700px;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:200}#settings{height:100%}#settings .title-section,.note-dialog .title-section{padding-top:0}#settings .title-section h1,#settings .title-section h2,.note-dialog .title-section h1,.note-dialog .title-section h2{margin:.2em 0}#settings .text-and-undo-button,.note-dialog .text-and-undo-button{display:flex}#settings .text-and-undo-button .undo-icon,#settings .text-and-undo-button p,.note-dialog .text-and-undo-button .undo-icon,.note-dialog .text-and-undo-button p{margin-top:0;margin-bottom:0;display:inline}@media screen and (max-width:650px){#settings button,.note-dialog button{font-size:17px}}#settings input[type=checkbox i]:hover,.note-dialog input[type=checkbox i]:hover{cursor:pointer}#settings .sk-panel-row.settings,.note-dialog .sk-panel-row.settings{padding-top:.2rem}#settings .sk-panel-row.settings input,#settings .sk-panel-row.settings label,#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings label,.note-dialog .sk-panel-row.settings select{cursor:pointer}#settings .sk-panel-row.settings input,#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings select{font-size:16px;padding:.5rem;background-color:var(--sn-stylekit-contrast-background-color);border-color:var(--sn-stylekit-border-color);color:var(--sn-stylekit-foreground-color)}#settings .sk-panel-row.settings .input-and-undo-button,.note-dialog .sk-panel-row.settings .input-and-undo-button{display:flex}#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings select{min-width:217px}#settings .sk-panel-row.settings input[type=text],.note-dialog .sk-panel-row.settings input[type=text]{min-width:200px}#settings .sk-panel-row.settings .checkbox-input-label,.note-dialog .sk-panel-row.settings .checkbox-input-label{padding-left:98.6px;padding-right:98.6px}@media screen and (min-width:360px){#settings .sk-panel-row.settings select,.note-dialog .sk-panel-row.settings select{min-width:267px}#settings .sk-panel-row.settings input[type=text],.note-dialog .sk-panel-row.settings input[type=text]{min-width:250px}#settings .sk-panel-row.settings .checkbox-input-label,.note-dialog .sk-panel-row.settings .checkbox-input-label{padding-left:123.6px;padding-right:123.6px}#settings .sk-panel-row.settings .chevron-toggle-button,.note-dialog .sk-panel-row.settings .chevron-toggle-button{min-width:267px}}#settings .sk-panel-row.settings .radio,.note-dialog .sk-panel-row.settings .radio{margin-top:3px;margin-bottom:3px}@media screen and (max-width:480px){#settings .sk-panel-row.settings,.note-dialog .sk-panel-row.settings{flex-direction:column;align-items:flex-start}#settings .sk-panel-row.settings input,.note-dialog .sk-panel-row.settings input{margin-top:1rem}#settings .sk-panel-row.settings.custom-css,.note-dialog .sk-panel-row.settings.custom-css{flex-direction:row;max-width:299px}#settings .sk-panel-row.settings.custom-css .custom-css-undo-button,.note-dialog .sk-panel-row.settings.custom-css .custom-css-undo-button{margin-top:auto;margin-bottom:auto}}#appendix{background-color:var(--sn-stylekit-contrast-background-color);display:block}#appendix .sk-button-group{width:50%}#appendix .sk-panel{margin-top:0;margin-left:auto;margin-right:auto}#appendix .checkBoxForm{position:absolute;font-size:13px;padding-left:25px}#appendix .checkBoxForm label{cursor:pointer}@media screen and (max-width:600px){#appendix .checkBoxForm{padding-left:10px}}@media screen and (max-width:500px){#appendix .checkBoxForm{padding-left:5px}}@media screen and (max-width:455px){#appendix .checkBoxForm label{font-size:12px}}@media screen and (max-width:426px){#appendix .checkBoxForm label{font-size:11px}}@media screen and (max-width:410px){#appendix .checkBoxForm label{font-size:10px}}@media screen and (max-width:388px){#appendix .checkBoxForm label{font-size:9px}}#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:14px}@media screen and (max-width:650px){#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:17px}}#appendix #scrollToTopButton{position:fixed;right:25px;bottom:45px}@media screen and (max-width:725px){#appendix #scrollToTopButton{right:15px;bottom:5.2px}}#appendix #scrollToBottomButton{position:fixed;right:25px;bottom:10px}@media screen and (max-width:725px){#appendix #scrollToBottomButton{right:55px;bottom:5.2px}}.MonacoDiffEditorContainer,.MonacoEditorContainer{min-height:300px;width:calc(100% - 1.5px);max-width:inherit;max-height:inherit}.edit .MonacoDiffEditorContainer,.edit .MonacoEditorContainer{min-height:300px;height:calc(100% - 1.7em);margin-bottom:25px}#appendix .MonacoEditorContainer{height:400px}#content .CodeMirror{max-height:calc(100% - 1rem)}#appendix .CodeMirror{max-height:calc(100% - 2px)}.CodeMirror{font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);background:inherit;color:inherit;line-height:1.7;min-height:8.25em;border:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:725px){.CodeMirror{border-left:0;border-right:0;border-top:1px solid var(--sn-stylekit-border-color)}}.CodeMirror .CodeMirror-gutter,.CodeMirror .CodeMirror-gutters,.CodeMirror .CodeMirror-linenumber,.CodeMirror .CodeMirror-scroll,.CodeMirror .CodeMirror-sizer{background:inherit}.CodeMirror .CodeMirror-linenumber{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}.CodeMirror .cm-header.cm-header-1{font-size:2em}.CodeMirror .cm-header.cm-header-2{font-size:1.5em}.CodeMirror .cm-header.cm-header-3{font-size:1.17em}.CodeMirror .cm-header.cm-header-4{font-size:1em}.CodeMirror .cm-comment{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font);font-size:85%;margin:0;padding:.2em .4em}.CodeMirror .cm-comment.cm-link.CodeMirror-selectedtext,.CodeMirror .cm-comment.CodeMirror-selectedtext{background-color:unset}.CodeMirror .cm-attribute,.CodeMirror .cm-header{color:var(--sn-stylekit-success-color)}.CodeMirror .cm-string-2,.CodeMirror .cm-tag,.CodeMirror .cm-tag.cm-bracket,.CodeMirror .cm-variable,.CodeMirror .cm-variable-1,.CodeMirror .cm-variable-2,.CodeMirror .cm-variable-3{color:var(--sn-stylekit-foreground-color)}.CodeMirror .cm-string-2.CodeMirror-selectedtext,.CodeMirror .cm-tag.cm-bracket.CodeMirror-selectedtext,.CodeMirror .cm-tag.CodeMirror-selectedtext,.CodeMirror .cm-variable-1.CodeMirror-selectedtext,.CodeMirror .cm-variable-2.CodeMirror-selectedtext,.CodeMirror .cm-variable-3.CodeMirror-selectedtext,.CodeMirror .cm-variable.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror .cm-builtin,.CodeMirror .cm-string,.CodeMirror .cm-string.cm-url.cm-variable-2{color:var(--sn-stylekit-warning-color)}.CodeMirror .cm-error{color:var(--sn-stylekit-danger-color)}.CodeMirror .cm-link,.CodeMirror .cm-link.cm-variable-2{color:var(--sn-stylekit-info-color)}.CodeMirror .cm-quote{color:#6a737d}.cm-attribute.CodeMirror-selectedtext,.cm-builtin.CodeMirror-selectedtext,.cm-keyword.CodeMirror-selectedtext,.cm-link.CodeMirror-selectedtext,.cm-number.CodeMirror-selectedtext,.cm-string.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror-dialog{position:fixed;background:var(--sn-stylekit-background-color)}.CodeMirror-cursor{border-color:var(--sn-stylekit-info-color)}.CodeMirror-selected{background:var(--sn-stylekit-input-placeholder-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-focused .CodeMirror-selected{background:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-selectedtext{background:transparent;color:var(--sn-stylekit-info-contrast-color)}.DynamicEditor{padding:9px 30px 10px}.DynamicEditor div[class^=sc]{background-color:var(--sn-stylekit-background-color)}button.block-menu-trigger{display:none!important}@media screen and (min-width:725px){.DynamicEditor{padding:5px 20px 10px}}@media screen and (min-width:600px){.YouTube{min-height:315px;min-width:560px;margin:10px auto;display:block}}.ProseMirror{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color)}@media print{.printURL a[href]:after{content:" (" attr(href) ")"}.sn-component{outline:none}#content.fixed-header{padding-top:unset}#content.fixed-height{max-height:unset}#appendix,#header,#menu,.menu-overlay{display:none}.sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix,.sk-panel.main.edit{display:none;background-color:var(--sn-stylekit-background-color)}.appendix,.content{background-color:var(--sn-stylekit-background-color)!important}#renderedNote pre code{white-space:pre-wrap;word-break:break-word}}@media (prefers-color-scheme:dark){:root{--primary-bg-color:#292937;--secondary-bg-color:#313142;--editor-bg-color:#202020;--border-color:#13131a;--ui-text-color:#d8d8d8;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-neutral-color:#7c7c7c;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-desktop-titlebar-bg-color:var(--primary-bg-color);--sn-desktop-titlebar-border-color:var(--border-color);--sn-desktop-titlebar-ui-color:var(--ui-text-color);--sn-desktop-titlebar-ui-hover-color:var(--sn-stylekit-info-color);--sn-stylekit-shadow-color:#20202b;--sn-stylekit-background-color:#20202b;--sn-stylekit-border-color:var(--border-color);--sn-stylekit-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-background-color:var(--secondary-bg-color);--sn-stylekit-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-border-color:var(--border-color);--sn-stylekit-secondary-background-color:#292937;--sn-stylekit-secondary-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-border-color:var(--border-color);--sn-stylekit-secondary-contrast-background-color:#45445a;--sn-stylekit-secondary-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-contrast-border-color:var(--border-color);--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:var(--ui-text-color);--sn-stylekit-scrollbar-track-border-color:var(--border-color);--sn-stylekit-scrollbar-thumb-color:var(--sn-stylekit-info-color)}.CodeMirror,.sn-component .sk-input.contrast{background-color:var(--sn-stylekit-background-color)}} +/*# sourceMappingURL=main.9e9378f5.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/main.9e9378f5.chunk.css.map b/build/static/css/main.9e9378f5.chunk.css.map new file mode 100644 index 00000000..64ea51a3 --- /dev/null +++ b/build/static/css/main.9e9378f5.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.scss","webpack://node_modules/highlight.js/scss/vs.scss","webpack://src/stylesheets/main.scss","webpack://src/stylesheets/codemirror.scss","webpack://src/stylesheets/dynamicEditor.scss","webpack://src/stylesheets/print.scss","webpack://src/stylesheets/dark.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CACnC,KAGC,yEACW,CCNb,MACE,aAAc,CACd,eAAgB,CAChB,YAAc,CACd,eAAiB,CACjB,UAAY,CACb,yCAKC,WAAc,CACf,qEAOC,UAAW,CACZ,0IAWC,aAAc,CACf,oEAMC,aAAc,CACf,aAGC,UAAc,CACf,WAGC,SAAW,CACZ,qCAKC,aAAc,CACf,eAIC,iBAAkB,CACnB,aAGC,eAAiB,CC5DnB,MACE,mCAA+B,CAC/B,0GAA6B,CAE9B,oCAGC,MACE,mCAA+B,CAChC,GAEC,gBAAiB,CAClB,CAGH,UAEE,4BAA6B,CAC7B,oDAAqD,CACrD,8CAA+C,CAC/C,2CAA4C,CAC5C,WAAY,CACZ,QAAS,CACT,S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,CACrB,yBAAkB,CAClB,sBAAe,CACf,uBAAgB,CAEhB,gCAAyB,CACzB,sCAAkC,CAElC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,kCAA2B,CAC3B,wCAAoC,CAEpC,sDAA+B,CAC/B,sDAAmC,CACnC,mDAA+B,CAC/B,kEAAqC,CAGrC,kCAA2B,CAE3B,sCAA+B,CAC/B,8CAA2B,CAC3B,mDAA+B,CAE/B,iEAAwC,CACxC,4DAAwC,CACxC,uDAAoC,CAEpC,gDAAyC,CACzC,6DAAyC,CACzC,wDAAqC,CAErC,yDAAkD,CAClD,sEAAkD,CAClD,iEAA8C,CAE9C,yEAAsC,CACtC,yEAAsC,CAEtC,uDAAmC,CAEnC,8DAA2C,CAC3C,iEAAoC,CACrC,6CAOC,oDAAqD,CACtD","file":"main.9e9378f5.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond \n\n*/\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: white;\n color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n color: #2b91af;\n}\n\n.hljs-doctag {\n color: #808080;\n}\n\n.hljs-attr {\n color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n","@import '~sn-stylekit/dist/stylekit.css';\n@import '~codemirror/lib/codemirror.css';\n@import '~codemirror/addon/dialog/dialog.css';\n@import '~codemirror/addon/search/matchesonscrollbar.css';\n@import '~highlight.js/scss/vs.scss';\n\n:root {\n --sn-stylekit-font-size-editor: 16px;\n --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo,\n 'Ubuntu Mono', courier, monospace;\n}\n\n@media screen and (max-width: 650px) {\n :root {\n --sn-stylekit-font-size-editor: 18px;\n }\n h1 {\n font-size: 1.75em; // is usually 2em\n }\n}\n\nbody,\nhtml {\n background-color: transparent;\n background-color: var(--sn-stylekit-background-color);\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-base-font-size);\n height: 100%;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n* {\n // To prevent gray flash when focusing input on mobile Safari\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nbutton {\n color: var(--sn-stylekit-foreground-color);\n background-color: transparent;\n border-width: 0px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n &.off {\n svg {\n opacity: 0.75;\n }\n }\n &.off:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n &:hover {\n cursor: pointer;\n }\n &.chevron-toggle-button {\n padding-left: 0px;\n display: flex;\n }\n &.menu-button {\n display: flex;\n margin: 8px 20px;\n padding: 8px 16px;\n text-align: left;\n svg {\n margin-top: auto;\n }\n &.chevron-toggle-button {\n padding-top: 0px;\n padding-bottom: 0px;\n @media screen and (min-width: 330px) {\n padding: 0px;\n }\n }\n }\n .chevron-icon,\n .chevron-button-caption {\n line-height: 20px;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n .button-caption {\n padding-left: 5px;\n }\n}\n\nbutton:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n}\n\nbutton:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n}\n\n.sn-component {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n @media screen and (max-width: 420px) {\n min-height: -webkit-fill-available;\n }\n\n .sk-button.info,\n .sk-button.neutral {\n font-size: var(--sn-stylekit-font-size-editor);\n }\n\n .sk-panel.main {\n max-width: 700px;\n width: 100%;\n margin: 10px 5px;\n\n @media screen and (max-width: 725px) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n box-shadow: none;\n margin: 0;\n }\n &.monacoEditor {\n max-width: 800px;\n }\n &.otherEditor {\n @media screen and (max-width: 725px) {\n border-top: none;\n }\n }\n }\n\n .sk-panel-content.edit {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n padding-left: 0px !important;\n padding-right: 0px !important;\n padding-top: 0px !important;\n }\n\n // Hides the horizontal scroll bar when using the Monaco Editor\n // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words\n &.MonacoEditorContainerParentDiv {\n overflow-x: hidden !important;\n }\n }\n\n .sk-panel-content.view {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n padding: 0px !important;\n }\n }\n\n .sk-input.textarea {\n min-height: 136px;\n padding: 9px 10px;\n max-width: inherit;\n width: calc(100% - 22px);\n height: 100%;\n resize: vertical;\n overflow-y: auto;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n line-height: 1.7;\n }\n\n // This is automatic in Microsoft Edge.\n // We need to make it explicit for Firefox.\n .sk-input.textarea:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n }\n\n .sk-input.textarea.editnote {\n max-height: calc(100% - 32px);\n }\n\n .sk-input.textarea.append {\n max-height: calc(100% - 22px);\n }\n\n .sk-panel-row {\n // used in #appendix, note dialog, and settings\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; // default is 0.4rem top only\n }\n .sk-button-group {\n display: flex;\n margin-left: auto;\n margin-right: auto;\n }\n .sk-panel-section:last-child {\n margin-bottom: 0px;\n }\n}\n\n#header {\n background-color: var(--sn-stylekit-background-color);\n display: flex;\n overflow: auto;\n padding: 10px 0;\n width: 100%;\n\n svg::after {\n content: '';\n background: var(--sn-stylekit-info-color);\n opacity: 0.1;\n }\n\n .sk-button-group {\n max-width: 700px;\n padding-left: 2px;\n padding-right: 2px;\n\n .divider {\n opacity: 0.25;\n cursor: unset;\n margin-right: 0px;\n @media screen and (max-width: 330px) {\n display: none;\n }\n }\n }\n &.fixed {\n position: fixed;\n z-index: 10;\n }\n}\n\n.menu-overlay {\n background-color: var(--sn-stylekit-neutral-color);\n cursor: pointer;\n height: 100%;\n left: 0;\n opacity: 0.2;\n position: fixed;\n top: 60.2px;\n width: 100%;\n z-index: 9;\n @media screen and (max-width: 330px) {\n top: 56.2px;\n }\n}\n\n#menu {\n background-color: var(--sn-stylekit-background-color);\n border: 1px solid var(--sn-stylekit-border-color);\n border-right-width: 0px;\n display: flex;\n flex-direction: column;\n height: calc(100% - 62px);\n margin-right: 0px;\n margin-top: 0px;\n max-width: 60%;\n min-width: 330px;\n overflow-y: auto;\n position: fixed;\n right: 0px;\n width: 100%;\n z-index: 10;\n\n @media screen and (max-width: 330px) {\n max-width: 100%;\n min-width: 300px;\n height: calc(100vh - 56.2px);\n }\n\n @media screen and (min-width: 750px) {\n max-width: 450px;\n width: 450px;\n }\n\n .notification {\n p {\n display: flex;\n margin: 0px 20px 8px;\n padding: 0px 16px;\n text-align: left;\n }\n &.visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 200ms ease-in;\n }\n\n &.hidden {\n height: 0px;\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 500ms, opacity 500ms ease-out;\n }\n }\n @media screen and (max-width: 450px) {\n #printButton {\n display: none;\n }\n }\n .extra-space {\n @media screen and (min-width: 800px) {\n margin-bottom: 5em;\n }\n }\n}\n\n#content {\n background-color: var(--sn-stylekit-contrast-background-color);\n flex: auto;\n display: flex;\n justify-content: center;\n\n @media screen and (max-width: 725px) {\n padding: 0;\n }\n &.edit-only {\n @media screen and (max-width: 420px) {\n max-height: calc(100vh - 60.2px);\n &.focused {\n max-height: 55vh;\n .CodeMirror {\n max-height: calc(55vh - 0.5rem);\n }\n }\n }\n @media screen and (max-width: 330px) {\n max-height: calc(100vh - 56.2px);\n }\n }\n &.fixed-header {\n padding-top: 60.2px;\n @media screen and (max-width: 330px) {\n padding-top: 56.2px;\n }\n }\n &.fixed-height {\n max-height: calc(100vh - 60.2px);\n @media screen and (max-width: 330px) {\n max-height: calc(100vh - 56.2px);\n }\n }\n}\n\n#content,\n#appendix {\n &.borderless {\n background-color: var(--sn-stylekit-background-color);\n }\n &.borderless,\n &.full-width {\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n &.edit,\n &.view {\n margin: 0px;\n }\n }\n }\n &.full-width {\n // Also includes appendix\n .sk-panel.main {\n margin: 0px;\n }\n .sk-panel.main,\n .rendered-note-section {\n max-width: unset;\n }\n .monacoEditor {\n max-width: calc(100% - 1.25rem);\n }\n }\n &.overflow {\n #renderedNote {\n overflow-wrap: normal;\n pre,\n table {\n overflow: visible;\n }\n }\n }\n}\n\n#menu,\n#content,\n#appendix,\n.DynamicEditor {\n font-size: var(--sn-stylekit-font-size-editor);\n a {\n color: var(--sn-stylekit-info-color); // #086dd6;\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n blockquote {\n margin: 0;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0 1em;\n color: #6a737d;\n border-left: 0.25em solid #dfe2e5;\n }\n\n hr {\n border: 0.5px solid var(--sn-stylekit-border-color);\n }\n\n img {\n max-width: 100%; // 645.500px;\n }\n\n table {\n display: block;\n width: 100%;\n overflow: auto;\n margin-top: 0;\n margin-bottom: 16px;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n background-color: transparent; // #fff;\n border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1;\n }\n\n td,\n th {\n padding: 6px 13px;\n border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5;\n }\n\n tr:nth-child(2n) {\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // #f6f8fa;\n code,\n pre {\n background-color: var(--sn-stylekit-background-color);\n }\n }\n }\n summary {\n .link {\n display: inline;\n color: var(--sn-stylekit-info-color);\n }\n .link:hover {\n text-decoration: underline;\n }\n }\n\n h1,\n h2,\n h3 {\n line-height: normal;\n }\n}\n\n// Exclude CodeMirror\n#appendDynamicEditor,\n#dynamicEditor,\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n#settings,\n.DynamicEditor,\n.rendered-note-section {\n code,\n pre {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .hljs {\n color: var(--sn-stylekit-contrast-foreground-color);\n }\n .hljs-tag {\n color: var(--sn-stylekit-foreground-color);\n }\n\n code {\n box-sizing: border-box;\n word-wrap: break-word;\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);\n border-radius: 3px;\n }\n\n pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode\n color: var(--sn-stylekit-foreground-color);\n border-radius: 3px;\n word-wrap: normal;\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n background-color: transparent;\n border: 0;\n }\n\n pre code {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: initial;\n border: 0;\n }\n}\n\n#errorBoundary,\n#help,\n#intro,\n.rendered-note-section {\n padding: 9px 10px;\n border: 1px transparent;\n border-style: solid;\n margin-left: auto;\n margin-right: auto;\n max-width: 645.5px; //628.700px;\n}\n\n// Same selection plus #renderedNote\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n.rendered-section {\n /*align-items: center;\n justify-content: space-between;\n min-width: inherit;\n width: 100%;*/\n word-wrap: break-word;\n overflow-wrap: break-word;\n line-height: 1.7;\n}\n\n.inline-text-and-svg {\n display: inline-flex;\n padding-left: 0px;\n padding-right: 0px;\n svg {\n opacity: 0.75;\n margin-top: auto;\n }\n}\n\n#errorBoundary > :nth-child(1),\n#renderedNote > div > :nth-child(1),\n.ProseMirror > :nth-child(2) {\n margin-top: 0px;\n}\n\n.note-overlay {\n position: fixed !important;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n}\n\n.note-dialog {\n max-width: 700px;\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 200;\n}\n\n#settings {\n height: 100%;\n}\n\n.note-dialog,\n#settings {\n .title-section {\n padding-top: 0px;\n h1,\n h2 {\n margin: 0.2em 0px;\n }\n }\n .text-and-undo-button {\n display: flex;\n p,\n .undo-icon {\n margin-top: 0px;\n margin-bottom: 0px;\n display: inline;\n }\n }\n button {\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n }\n input[type='checkbox' i]:hover {\n cursor: pointer;\n }\n\n .sk-panel-row.settings {\n padding-top: 0.2rem;\n label,\n input,\n select {\n cursor: pointer;\n }\n input,\n select {\n font-size: 16px;\n padding: 0.5rem;\n background-color: var(--sn-stylekit-contrast-background-color);\n border-color: var(--sn-stylekit-border-color);\n color: var(--sn-stylekit-foreground-color);\n }\n .input-and-undo-button {\n display: flex;\n }\n /* On screens with screens less than 360px\n The inputs and buttons have width 217px*/\n select {\n min-width: 217px;\n }\n input[type='text'] {\n min-width: 200px;\n }\n // The checkbox is 19.8px wide.\n // 98.6 + 98.6 + 18.8px is 217\n // Use padding instead of width to center the checkbox\n .checkbox-input-label {\n padding-left: 98.6px;\n padding-right: 98.6px;\n }\n @media screen and (min-width: 360px) {\n /* On screens with screens greater than 360px\n The inputs and buttons have width 267px*/\n select {\n min-width: 267px;\n }\n input[type='text'] {\n min-width: 250px;\n }\n .checkbox-input-label {\n padding-left: 123.6px;\n padding-right: 123.6px;\n }\n .chevron-toggle-button {\n min-width: 267px;\n }\n }\n .radio {\n margin-top: 3px;\n margin-bottom: 3px;\n }\n // Collapse on mobile\n @media screen and (max-width: 480px) {\n flex-direction: column;\n align-items: flex-start;\n\n input {\n margin-top: 1rem;\n }\n &.custom-css {\n flex-direction: row;\n max-width: 299px;\n .custom-css-undo-button {\n margin-top: auto;\n margin-bottom: auto;\n }\n }\n }\n }\n}\n\n#appendix {\n background-color: var(--sn-stylekit-contrast-background-color);\n display: block;\n\n .sk-button-group {\n width: 50%;\n }\n .sk-panel {\n margin-top: 0;\n margin-left: auto;\n margin-right: auto;\n }\n\n .checkBoxForm {\n position: absolute;\n font-size: 13px;\n\n label {\n cursor: pointer;\n }\n padding-left: 25px;\n @media screen and (max-width: 600px) {\n padding-left: 10px;\n }\n @media screen and (max-width: 500px) {\n padding-left: 5px;\n }\n @media screen and (max-width: 455px) {\n label {\n font-size: 12px;\n }\n }\n @media screen and (max-width: 426px) {\n label {\n font-size: 11px;\n }\n }\n @media screen and (max-width: 410px) {\n label {\n font-size: 10px;\n }\n }\n @media screen and (max-width: 388px) {\n label {\n font-size: 9px;\n }\n }\n }\n\n #appendTextButton,\n #scrollToTopButton,\n #scrollToBottomButton {\n font-size: 14px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n }\n\n #scrollToTopButton {\n position: fixed;\n right: 25px;\n bottom: 45px;\n @media screen and (max-width: 725px) {\n right: 15px;\n bottom: 5.2px;\n }\n }\n #scrollToBottomButton {\n position: fixed;\n right: 25px;\n bottom: 10px;\n @media screen and (max-width: 725px) {\n right: 55px;\n bottom: 5.2px;\n }\n }\n}\n\n.MonacoEditorContainer,\n.MonacoDiffEditorContainer {\n min-height: 300px;\n width: calc(100% - 1.5px);\n max-width: inherit;\n max-height: inherit;\n}\n\n.edit .MonacoEditorContainer,\n.edit .MonacoDiffEditorContainer {\n min-height: 300px;\n height: calc(100% - 1.7em);\n margin-bottom: 25px;\n}\n\n#appendix .MonacoEditorContainer {\n height: 400px;\n}\n\n@import './codemirror.scss';\n@import './dynamicEditor.scss';\n@import './print.scss';\n@import './dark.scss';\n","#content .CodeMirror {\n max-height: calc(100% - 1rem);\n}\n\n#appendix .CodeMirror {\n max-height: calc(100% - 2px);\n}\n\n.CodeMirror {\n //fix : margin left is 30px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n background: inherit;\n color: inherit;\n line-height: 1.7;\n min-height: 8.25em;\n border: 1px solid var(--sn-stylekit-contrast-border-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n\n @media screen and (max-width: 725px) {\n border-left: 0px;\n border-right: 0px;\n border-top: 1px solid var(--sn-stylekit-border-color);\n }\n .CodeMirror-scroll,\n .CodeMirror-sizer,\n .CodeMirror-gutter,\n .CodeMirror-gutters,\n .CodeMirror-linenumber {\n background: inherit;\n }\n .CodeMirror-linenumber {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .cm-header.cm-header-1 {\n font-size: 2em;\n }\n .cm-header.cm-header-2 {\n font-size: 1.5em;\n }\n .cm-header.cm-header-3 {\n font-size: 1.17em;\n }\n .cm-header.cm-header-4 {\n font-size: 1em;\n }\n .cm-comment {\n background-color: var(--sn-stylekit-contrast-background-color);\n color: var(--sn-stylekit-contrast-foreground-color);\n font-family: var(--sn-stylekit-monospace-font);\n font-size: 85%;\n margin: 0;\n padding: 0.2em 0.4em;\n }\n .cm-comment.CodeMirror-selectedtext,\n .cm-comment.cm-link.CodeMirror-selectedtext {\n background-color: unset;\n }\n .cm-attribute,\n .cm-header {\n color: var(--sn-stylekit-success-color);\n }\n .cm-variable,\n .cm-variable-1,\n .cm-variable-2,\n .cm-variable-3,\n .cm-string-2,\n .cm-tag,\n .cm-tag.cm-bracket {\n color: var(--sn-stylekit-foreground-color);\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n }\n .cm-builtin,\n .cm-string,\n .cm-string.cm-url.cm-variable-2 {\n color: var(--sn-stylekit-warning-color);\n }\n .cm-error {\n color: var(--sn-stylekit-danger-color);\n }\n .cm-link,\n .cm-link.cm-variable-2 {\n color: var(--sn-stylekit-info-color);\n }\n .cm-quote {\n color: #6a737d;\n }\n}\n.cm-link,\n.cm-string,\n.cm-keyword,\n.cm-builtin,\n.cm-number,\n.cm-attribute {\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n}\n.CodeMirror-dialog {\n position: fixed;\n background: var(--sn-stylekit-background-color);\n}\n.CodeMirror-cursor {\n border-color: var(--sn-stylekit-info-color);\n}\n.CodeMirror-selected {\n background: var(--sn-stylekit-input-placeholder-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-focused .CodeMirror-selected {\n background: var(--sn-stylekit-info-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-selectedtext {\n background: transparent;\n color: var(--sn-stylekit-info-contrast-color);\n}\n",".DynamicEditor {\n padding: 9px 30px 10px;\n div[class^='sc'] {\n background-color: var(--sn-stylekit-background-color);\n }\n}\nbutton.block-menu-trigger {\n display: none !important;\n}\n@media screen and (min-width: 725px) {\n .DynamicEditor {\n padding: 5px 20px 10px;\n }\n}\n@media screen and (min-width: 600px) {\n .YouTube {\n min-height: 315px;\n min-width: 560px;\n margin: 10px auto;\n display: block;\n }\n}\n\n.ProseMirror {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n}\n","@media print {\n .printURL {\n a[href]:after {\n content: ' (' attr(href) ')';\n }\n }\n\n .sn-component {\n outline: none;\n }\n\n #content {\n &.fixed-header {\n padding-top: unset;\n }\n &.fixed-height {\n max-height: unset;\n }\n }\n\n #appendix,\n #header,\n #menu,\n .menu-overlay {\n display: none;\n }\n\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n }\n\n .sk-panel.main.view {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n }\n\n .sk-panel.main.edit,\n .sk-panel.main.appendix {\n display: none;\n background-color: var(--sn-stylekit-background-color);\n }\n\n .content,\n .appendix {\n background-color: var(--sn-stylekit-background-color) !important;\n }\n\n #renderedNote pre code {\n white-space: pre-wrap;\n word-break: break-word;\n }\n}\n","@media (prefers-color-scheme: dark) {\n // This is the Midnight theme available here:\n // https://github.com/sn-extensions/midnight-theme\n // Licensed under AGPL-3.0\n :root {\n --primary-bg-color: #292937;\n --secondary-bg-color: #313142;\n --editor-bg-color: #202020;\n --border-color: #13131a;\n --ui-text-color: #d8d8d8;\n\n --sn-stylekit-info-color: #086dd6;\n --sn-stylekit-info-contrast-color: white;\n\n --sn-stylekit-neutral-color: #7c7c7c;\n --sn-stylekit-neutral-contrast-color: white;\n\n --sn-stylekit-success-color: #2b9612;\n --sn-stylekit-success-contrast-color: white;\n\n --sn-stylekit-warning-color: #f6a200;\n --sn-stylekit-warning-contrast-color: white;\n\n --sn-stylekit-danger-color: #f80324;\n --sn-stylekit-danger-contrast-color: white;\n\n --sn-desktop-titlebar-bg-color: var(--primary-bg-color);\n --sn-desktop-titlebar-border-color: var(--border-color);\n --sn-desktop-titlebar-ui-color: var(--ui-text-color);\n --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color);\n\n // StyleKit Vars\n --sn-stylekit-shadow-color: #20202b;\n\n --sn-stylekit-background-color: #20202b;\n --sn-stylekit-border-color: var(--border-color);\n --sn-stylekit-foreground-color: var(--ui-text-color);\n\n --sn-stylekit-contrast-background-color: var(--secondary-bg-color);\n --sn-stylekit-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-contrast-border-color: var(--border-color);\n\n --sn-stylekit-secondary-background-color: #292937;\n --sn-stylekit-secondary-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-border-color: var(--border-color);\n\n --sn-stylekit-secondary-contrast-background-color: #45445a;\n --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-contrast-border-color: var(--border-color);\n\n --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);\n --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);\n\n --sn-stylekit-paragraph-text-color: var(--ui-text-color);\n\n --sn-stylekit-scrollbar-track-border-color: var(--border-color);\n --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color);\n }\n\n /* Adjust background color for Plain Textarea and CodeMirror \n to be same as View Mode instead of a contrast background color. \n This improves readability / usability in dark modes. */\n .sn-component .sk-input.contrast,\n .CodeMirror {\n background-color: var(--sn-stylekit-background-color);\n }\n}\n"]} \ No newline at end of file diff --git a/build/static/js/main.5674bb15.chunk.js b/build/static/js/main.5674bb15.chunk.js new file mode 100644 index 00000000..11e5f0c9 --- /dev/null +++ b/build/static/js/main.5674bb15.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpappend-editor"]=this["webpackJsonpappend-editor"]||[]).push([[2],{1172:function(e,t,o){},1173:function(e,t,o){"use strict";o.r(t);var n=o(7),i=o(24),s=o.n(i),a=o(152),r=o.n(a);o(454),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=function(e){e&&e instanceof Function&&o.e(73).then(o.bind(null,1179)).then((function(t){var o=t.getCLS,n=t.getFID,i=t.getFCP,s=t.getLCP,a=t.getTTFB;o(e),n(e),i(e),s(e),a(e)}))},d=o(181),l=o(0),p=o(1),h=o(4),u=o(5),j=o(311),g="var(--sn-stylekit-info-color)",b="var(--sn-stylekit-foreground-color)",f=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon down",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:t||b})})})},x=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon right",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.90918 14.0667L10.7342 10.2417L6.90918 6.4167L8.09251 5.2417L13.0925 10.2417L8.09251 15.2417L6.90918 14.0667Z",fill:t||b})})})},m=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"close icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.2459 5.92917C15.5704 5.6047 15.5704 5.07864 15.2459 4.75417C14.9214 4.4297 14.3954 4.4297 14.0709 4.75417L10.0001 8.82501L5.92925 4.75417C5.60478 4.4297 5.07872 4.4297 4.75425 4.75417C4.42978 5.07864 4.42978 5.6047 4.75425 5.92917L8.82508 10L4.75425 14.0708C4.42978 14.3953 4.42978 14.9214 4.75425 15.2458C5.07872 15.5703 5.60478 15.5703 5.92925 15.2458L10.0001 11.175L14.0709 15.2458C14.3954 15.5703 14.9214 15.5703 15.2459 15.2458C15.5704 14.9214 15.5704 14.3953 15.2459 14.0708L11.1751 10L15.2459 5.92917Z",fill:t||b})})},v=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"copy icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M1.66724 3.66626C1.66724 2.56169 2.56267 1.66626 3.66724 1.66626H11.3339C12.4385 1.66626 13.3339 2.56169 13.3339 3.66626V13.3329H3.66724C2.56267 13.3329 1.66724 12.4375 1.66724 11.3329V3.66626ZM16.3339 6.66626C17.4385 6.66626 18.3339 7.56169 18.3339 8.66626V16.3329C18.3339 17.4375 17.4385 18.3329 16.3339 18.3329H8.66724C7.56267 18.3329 6.66724 17.4375 6.66724 16.3329V14.9996H15.0006V6.66626H16.3339ZM3.3339 3.33293V11.6663H11.6672V3.33293H3.3339Z",fill:t||b})})},O=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"eye icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 7.5C9.33688 7.5 8.70099 7.76339 8.23215 8.23223C7.76331 8.70107 7.49992 9.33696 7.49992 10C7.49992 10.663 7.76331 11.2989 8.23215 11.7678C8.70099 12.2366 9.33688 12.5 9.99992 12.5C10.663 12.5 11.2988 12.2366 11.7677 11.7678C12.2365 11.2989 12.4999 10.663 12.4999 10C12.4999 9.33696 12.2365 8.70107 11.7677 8.23223C11.2988 7.76339 10.663 7.5 9.99992 7.5ZM9.99992 14.1667C8.89485 14.1667 7.83504 13.7277 7.05364 12.9463C6.27224 12.1649 5.83325 11.1051 5.83325 10C5.83325 8.89493 6.27224 7.83512 7.05364 7.05372C7.83504 6.27232 8.89485 5.83333 9.99992 5.83333C11.105 5.83333 12.1648 6.27232 12.9462 7.05372C13.7276 7.83512 14.1666 8.89493 14.1666 10C14.1666 11.1051 13.7276 12.1649 12.9462 12.9463C12.1648 13.7277 11.105 14.1667 9.99992 14.1667ZM9.99992 3.75C5.83325 3.75 2.27492 6.34167 0.833252 10C2.27492 13.6583 5.83325 16.25 9.99992 16.25C14.1666 16.25 17.7249 13.6583 19.1666 10C17.7249 6.34167 14.1666 3.75 9.99992 3.75Z",fill:o||(t?g:b)})})},w=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"gear icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.0001 6.66675C10.8842 6.66675 11.732 7.01794 12.3571 7.64306C12.9823 8.26818 13.3334 9.11603 13.3334 10.0001C13.3334 10.8841 12.9823 11.732 12.3571 12.3571C11.732 12.9822 10.8842 13.3334 10.0001 13.3334C9.11606 13.3334 8.26821 12.9822 7.64309 12.3571C7.01797 11.732 6.66678 10.8841 6.66678 10.0001C6.66678 9.11603 7.01797 8.26818 7.64309 7.64306C8.26821 7.01794 9.11606 6.66675 10.0001 6.66675ZM10.0001 8.33342C9.55808 8.33342 9.13416 8.50901 8.8216 8.82157C8.50904 9.13413 8.33344 9.55805 8.33344 10.0001C8.33344 10.4421 8.50904 10.866 8.8216 11.1786C9.13416 11.4912 9.55808 11.6667 10.0001 11.6667C10.4421 11.6667 10.8661 11.4912 11.1786 11.1786C11.4912 10.866 11.6668 10.4421 11.6668 10.0001C11.6668 9.55805 11.4912 9.13413 11.1786 8.82157C10.8661 8.50901 10.4421 8.33342 10.0001 8.33342ZM8.33344 18.3334C8.12511 18.3334 7.95011 18.1834 7.91678 17.9834L7.60844 15.7751C7.08344 15.5667 6.63344 15.2834 6.20011 14.9501L4.12511 15.7917C3.94178 15.8584 3.71678 15.7917 3.61678 15.6084L1.95011 12.7251C1.84178 12.5417 1.89178 12.3167 2.05011 12.1917L3.80844 10.8084L3.75011 10.0001L3.80844 9.16675L2.05011 7.80841C1.89178 7.68341 1.84178 7.45841 1.95011 7.27508L3.61678 4.39175C3.71678 4.20841 3.94178 4.13341 4.12511 4.20842L6.20011 5.04175C6.63344 4.71675 7.08344 4.43341 7.60844 4.22508L7.91678 2.01675C7.95011 1.81675 8.12511 1.66675 8.33344 1.66675H11.6668C11.8751 1.66675 12.0501 1.81675 12.0834 2.01675L12.3918 4.22508C12.9168 4.43341 13.3668 4.71675 13.8001 5.04175L15.8751 4.20842C16.0584 4.13341 16.2834 4.20841 16.3834 4.39175L18.0501 7.27508C18.1584 7.45841 18.1084 7.68341 17.9501 7.80841L16.1918 9.16675L16.2501 10.0001L16.1918 10.8334L17.9501 12.1917C18.1084 12.3167 18.1584 12.5417 18.0501 12.7251L16.3834 15.6084C16.2834 15.7917 16.0584 15.8667 15.8751 15.7917L13.8001 14.9584C13.3668 15.2834 12.9168 15.5667 12.3918 15.7751L12.0834 17.9834C12.0501 18.1834 11.8751 18.3334 11.6668 18.3334H8.33344ZM9.37511 3.33341L9.06678 5.50841C8.06678 5.71675 7.18344 6.25008 6.54178 6.99175L4.53344 6.12508L3.90844 7.20841L5.66678 8.50008C5.33344 9.47508 5.33344 10.5334 5.66678 11.5001L3.90011 12.8001L4.52511 13.8834L6.55011 13.0167C7.19178 13.7501 8.06678 14.2834 9.05844 14.4834L9.36678 16.6667H10.6334L10.9418 14.4917C11.9334 14.2834 12.8084 13.7501 13.4501 13.0167L15.4751 13.8834L16.1001 12.8001L14.3334 11.5084C14.6668 10.5334 14.6668 9.47508 14.3334 8.50008L16.0918 7.20841L15.4668 6.12508L13.4584 6.99175C12.8168 6.25008 11.9334 5.71675 10.9334 5.51675L10.6251 3.33341H9.37511Z",fill:o||(t?g:b)})})},M=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"help icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.16675 15.0001H10.8334V13.3334H9.16675V15.0001ZM10.0001 1.66675C8.90573 1.66675 7.8221 1.8823 6.81105 2.30109C5.80001 2.71987 4.88135 3.3337 4.10753 4.10753C2.54472 5.67033 1.66675 7.78995 1.66675 10.0001C1.66675 12.2102 2.54472 14.3298 4.10753 15.8926C4.88135 16.6665 5.80001 17.2803 6.81105 17.6991C7.8221 18.1179 8.90573 18.3334 10.0001 18.3334C12.2102 18.3334 14.3298 17.4554 15.8926 15.8926C17.4554 14.3298 18.3334 12.2102 18.3334 10.0001C18.3334 8.90573 18.1179 7.8221 17.6991 6.81105C17.2803 5.80001 16.6665 4.88135 15.8926 4.10753C15.1188 3.3337 14.2002 2.71987 13.1891 2.30109C12.1781 1.8823 11.0944 1.66675 10.0001 1.66675ZM10.0001 16.6668C6.32508 16.6668 3.33342 13.6751 3.33342 10.0001C3.33342 6.32508 6.32508 3.33342 10.0001 3.33342C13.6751 3.33342 16.6668 6.32508 16.6668 10.0001C16.6668 13.6751 13.6751 16.6668 10.0001 16.6668ZM10.0001 5.00008C9.11603 5.00008 8.26818 5.35127 7.64306 5.97639C7.01794 6.60151 6.66675 7.44936 6.66675 8.33342H8.33342C8.33342 7.89139 8.50901 7.46747 8.82157 7.1549C9.13413 6.84234 9.55806 6.66675 10.0001 6.66675C10.4421 6.66675 10.866 6.84234 11.1786 7.1549C11.4912 7.46747 11.6667 7.89139 11.6667 8.33342C11.6667 10.0001 9.16675 9.79175 9.16675 12.5001H10.8334C10.8334 10.6251 13.3334 10.4167 13.3334 8.33342C13.3334 7.44936 12.9822 6.60151 12.3571 5.97639C11.732 5.35127 10.8841 5.00008 10.0001 5.00008Z",fill:o||(t?g:b)})})},y=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"menu icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M17 5V6.66667H3V5H17ZM3 15H17V13.3333H3V15ZM3 10.8333H17V9.16667H3V10.8333Z",fill:o||(t?g:b)})})},C=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"pencil icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M11.7167 7.5L12.5 8.28333L4.93333 15.8333H4.16667V15.0667L11.7167 7.5ZM14.7167 2.5C14.5083 2.5 14.2917 2.58333 14.1333 2.74167L12.6083 4.26667L15.7333 7.39167L17.2583 5.86667C17.5833 5.54167 17.5833 5 17.2583 4.69167L15.3083 2.74167C15.1417 2.575 14.9333 2.5 14.7167 2.5ZM11.7167 5.15833L2.5 14.375V17.5H5.625L14.8417 8.28333L11.7167 5.15833Z",fill:o||(t?g:b)})})},E=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{role:i,"aria-label":"plus icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.385 11.385H15.615C16.3799 11.385 17 10.7649 17 10C17 9.23507 16.3799 8.61497 15.615 8.61497H11.385V4.38503C11.385 3.6201 10.7649 3 10 3C9.23507 3 8.61497 3.6201 8.61497 4.38503V8.61497H4.38503C3.6201 8.61497 3 9.23507 3 10C3 10.7649 3.6201 11.385 4.38503 11.385H8.61497V15.615C8.61497 16.3799 9.23507 17 10 17C10.7649 17 11.385 16.3799 11.385 15.615V11.385Z",fill:o||(t?g:b)})})},S=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"print icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.0001 2.5H5.00008V5.83333H15.0001V2.5ZM15.8334 10C15.6124 10 15.4004 9.9122 15.2442 9.75592C15.0879 9.59964 15.0001 9.38768 15.0001 9.16667C15.0001 8.94565 15.0879 8.73369 15.2442 8.57741C15.4004 8.42113 15.6124 8.33333 15.8334 8.33333C16.0544 8.33333 16.2664 8.42113 16.4227 8.57741C16.579 8.73369 16.6668 8.94565 16.6668 9.16667C16.6668 9.38768 16.579 9.59964 16.4227 9.75592C16.2664 9.9122 16.0544 10 15.8334 10ZM13.3334 15.8333H6.66675V11.6667H13.3334V15.8333ZM15.8334 6.66667H4.16675C3.50371 6.66667 2.86782 6.93006 2.39898 7.3989C1.93014 7.86774 1.66675 8.50363 1.66675 9.16667V14.1667H5.00008V17.5H15.0001V14.1667H18.3334V9.16667C18.3334 8.50363 18.07 7.86774 17.6012 7.3989C17.1323 6.93006 16.4965 6.66667 15.8334 6.66667Z",fill:t||b})})},k=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"refresh icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 14.9999C8.67384 14.9999 7.40207 14.4731 6.46438 13.5355C5.5267 12.5978 4.99992 11.326 4.99992 9.99992C4.99992 9.16658 5.20825 8.35825 5.58325 7.66658L4.36659 6.44992C3.71659 7.47492 3.33325 8.69158 3.33325 9.99992C3.33325 11.768 4.03563 13.4637 5.28587 14.714C6.53612 15.9642 8.23181 16.6666 9.99992 16.6666V19.1666L13.3333 15.8332L9.99992 12.4999V14.9999ZM9.99992 3.33325V0.833252L6.66658 4.16658L9.99992 7.49992V4.99992C11.326 4.99992 12.5978 5.5267 13.5355 6.46438C14.4731 7.40207 14.9999 8.67383 14.9999 9.99992C14.9999 10.8333 14.7916 11.6416 14.4166 12.3333L15.6333 13.5499C16.2833 12.5249 16.6666 11.3083 16.6666 9.99992C16.6666 8.23181 15.9642 6.53612 14.714 5.28587C13.4637 4.03563 11.768 3.33325 9.99992 3.33325Z",fill:t||b})})},T=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"undo icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.1812 7.66667C8.36883 7.66667 6.72741 8.33333 5.46214 9.4L3 7V13H9.15535L6.67953 10.5867C7.63019 9.81333 8.84074 9.33333 10.1812 9.33333C12.6023 9.33333 14.661 10.8733 15.3791 13L17 12.48C16.0493 9.68667 13.3615 7.66667 10.1812 7.66667Z",fill:t||b})})},L=function(e){var t=e.cancelText,o=e.confirmText,i=e.helpLink,s=e.onCancel,a=e.onConfirm,r=e.onUndo,c=e.title;return Object(n.jsx)("div",{className:"note-overlay",children:Object(n.jsxs)("div",{className:"sk-panel note-dialog",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h2",{children:c}),Object(n.jsx)("button",{id:"undoDialog",onClick:r,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsxs)("p",{children:["Need help deciding? Check out the"," ",Object(n.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),"."]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:s,children:Object(n.jsx)("div",{children:t})}),Object(n.jsx)("button",{className:"sk-button info",onClick:a,children:Object(n.jsx)("div",{children:o})})]})})]})})},N=o(242),B="MonacoEditorContainer",D="MonacoDiffEditorContainer";self.MonacoEnvironment={getWorkerUrl:function(e,t){return"json"===t?"./json.worker.bundle.js":"css"===t?"./css.worker.bundle.js":"html"===t?"./html.worker.bundle.js":"typescript"===t||"javascript"===t?"./ts.worker.bundle.js":"./editor.worker.bundle.js"}};var A=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?B:a,c=e.language,d=void 0===c?"markdown":c,l=e.saveText,p=e.tabSize,h=void 0===p?2:p,u=e.text,j=e.theme,g=void 0===j?"vs-dark":j,b=e.viewMode,f=void 0!==b&&b,x=Object(i.useRef)(null);""===s&&(s="16px");var m=!0;return f&&(m=!1),Object(i.useEffect)((function(){return x.current&&((t=N.a.create(x.current,{fontSize:parseInt(s.replace("px","")),language:d,tabSize:h,theme:g,scrollBeyondLastLine:m,value:[u].join("\n"),autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced"})).onKeyDown((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false),e.ctrlKey&&"KeyS"===e.code&&e.preventDefault()})),t.onKeyUp((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false)})),t.onDidChangeModelContent((function(e){l&&l(t.getValue())}))),function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:B,ref:x})},V=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?D:a,c=e.language,d=void 0===c?"markdown":c,l=e.saveText,p=e.text,h=e.modifiedText,u=e.theme,j=void 0===u?"vs-dark":u,g=Object(i.useRef)(null);return""===s&&(s="16px"),Object(i.useEffect)((function(){if(g.current){var e=N.a.createModel([p].join("\n"),d),o=N.a.createModel([h].join("\n"),d);(t=N.a.createDiffEditor(g.current,{fontSize:parseInt(s.replace("px","")),theme:j,autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced",originalEditable:!0,readOnly:!0})).setModel({original:e,modified:o}),e.onDidChangeContent((function(t){l&&l(e.getValue())}))}return function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:D,ref:g})},H=o(439),K=o.n(H),I=o(440),F=o.n(I),P=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(){return Object(l.a)(this,o),t.apply(this,arguments)}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.attrs.matches[1];return Object(n.jsx)("iframe",{title:"Youtube Embed ".concat(e),className:this.props.isSelected?"YouTube ProseMirror-selectednode":"YouTube",src:"https://www.youtube.com/embed/".concat(e,"?modestbranding=1")})}}]),o}(i.Component),U=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).handleToggleReadOnly=function(){n.setState({readOnly:!n.state.readOnly})},n.handleChange=K()((function(e){var t=e();n.props.debugMode&&console.log(t),n.props.onChange(t)}),50),n.state={readOnly:n.props.readOnly,template:!1,value:void 0},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return Object(n.jsx)(F.a,{className:"DynamicEditor",placeholder:"Type '/' to insert...",id:"DynamicEditor",readOnly:this.state.readOnly,readOnlyWriteCheckboxes:!0,value:this.state.value,defaultValue:this.props.text,scrollTo:window.location.hash,onCancel:function(){e.props.debugMode&&console.log("Cancel triggered")},autoFocus:!0,onChange:function(t){return e.handleChange(t)},embeds:[{title:"YouTube",keywords:"youtube video tube google",icon:function(){return Object(n.jsx)("img",{alt:"YouTube Logo",src:"/icons/ic-YouTube.svg",width:24,height:24})},matcher:function(e){return e.match(/(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([a-zA-Z0-9_-]{11})$/i)},component:P}]})}}]),o}(i.Component),z=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.props.saveText(n.state.text)}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.saveText(n.state.text)}))},n.onBlur=function(e){var t=document.getElementById(Ge.content);t&&t.classList.remove(qe.focused)},n.onFocus=function(e){var t=document.getElementById(Ge.content);t&&t.classList.add(qe.focused)},n.onKeyDown=function(e){n.props.onKeyDown(e),n.props.onKeyDownEditTextArea(e),n.props.onKeyDownTextArea(e)},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsx)("div",{className:"sk-panel main edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),id:Ge.edit,children:this.props.editingMode===Xe.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e,viewMode:this.props.viewMode}):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)("div",{id:"dynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,text:e,onChange:this.saveText,readOnly:!1})}):Object(n.jsx)("textarea",{id:Ge.editTextArea,name:"text",className:"sk-input contrast textarea editnote",placeholder:"Welcome to the Append Editor! \ud83d\ude04",rows:15,spellCheck:"true",value:e,onBlur:this.onBlur,onChange:this.handleInputChange,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})})})}}]),o}(s.a.Component);z.defaultProps={};var R=function(){var e=document.getElementById(Ge.appendButton);e&&e.click()},W=function(){var e=document.getElementById(Ge.editButton);e&&e.click()},_=function(){var e=document.getElementById(Ge.helpButton);e&&e.click()},Z=function(){var e=document.getElementById(Ge.menuButton);e&&e.click()},Y=function(){var e=document.getElementById(Ge.settingsButton);e&&e.click()},G=function(){var e=document.getElementById(Ge.viewButton);e&&e.click()},q=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).onToggleShowFeelings=function(){n.setState({showFeelings:!n.state.showFeelings})},n.onToggleShowMoreQuestions=function(){n.setState({showMoreQuestions:!n.state.showMoreQuestions})},n.onToggleShowFeedback=function(){n.setState({showFeedback:!n.state.showFeedback})},n.state={showFeelings:!1,showMoreQuestions:!1,showFeedback:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return Object(n.jsxs)("div",{id:"help",children:[Object(n.jsx)("hr",{}),Object(n.jsx)("h2",{children:"Append Editor Help"}),Object(n.jsxs)("p",{children:["The Append Editor is an ",Object(n.jsx)("b",{children:"unofficial"})," ",Object(n.jsx)("a",{href:"https://standardnotes.org/help/77/what-are-editors",target:"_blank",rel:"nofollow noreferrer noopener",children:"editor"})," ","for"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app. The Append Editor is also free software licensed under"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/blob/main/LICENSE",target:"_blank",rel:"nofollow noreferrer noopener",children:"AGPL-3.0"}),". Its source code is available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor",target:"_blank",rel:"nofollow noreferrer noopener",children:"GitHub"}),"."]}),Object(n.jsx)("h3",{children:"Append Editor Features"}),Object(n.jsxs)("p",{children:["The Append Editor supports"," ",Object(n.jsx)("a",{href:"https://guides.github.com/features/mastering-markdown/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Markdown"})," ","with"," ",Object(n.jsx)("a",{href:"https://katex.org/docs/support_table.html",target:"_blank",rel:"nofollow noreferrer noopener",children:"KaTeX"}),", syntax highlighting, in-line HTML, table of contents, footnotes, auto-linking,"," ",Object(n.jsx)("a",{href:"https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md",target:"_blank",rel:"nofollow noreferrer noopener",children:"emoji codes"}),", and more."," "]}),Object(n.jsxs)("p",{children:["There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and Monaco. You can read about each mode and choose which to use in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),". You can also choose default and per-note font sizes, font families, and custom styles (CSS)."]}),Object(n.jsxs)("p",{children:["The Menu",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Z,title:"Open the Menu",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(y,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"has additional options to customize the appearance of the editor, share your note, and perform actions to quickly format and edit Markdown text."]}),Object(n.jsxs)("p",{children:["A more detailed documentation of the Append Editor is available at"," ",Object(n.jsx)("a",{href:"https://appendeditor.com",target:"_blank",rel:"noopener noreferrer",children:"appendeditor.com"}),". If you like the Append Editor, please support it by giving it a star on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/stargazers",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," "]}),Object(n.jsx)("h3",{children:"How to install the Append Editor in Standard Notes"}),Object(n.jsxs)("ol",{children:[Object(n.jsxs)("li",{children:["Download, install, and sign in to the Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"Desktop"})," ","app."]}),Object(n.jsxs)("li",{children:["In the bottom left corner of the app, click ",Object(n.jsx)("b",{children:"Extensions"}),"."]}),Object(n.jsxs)("li",{children:["Click ",Object(n.jsx)("b",{children:"Import Extensions"})," and paste the following link into the input box. If you want to use the alpha version, replace"," ",Object(n.jsx)("code",{children:"beta"})," with ",Object(n.jsx)("code",{children:"alpha"}),":"," ",Object(n.jsx)("code",{children:Object(n.jsx)("a",{href:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json",target:"_blank",rel:"noopener noreferrer",children:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json"})})]}),Object(n.jsxs)("li",{children:["Press ",Object(n.jsx)("b",{children:"Enter"})," or ",Object(n.jsx)("b",{children:"Return"})," on your keyboard."]}),Object(n.jsxs)("li",{children:["The title of your selected note is near the top of the app. Under the title, click ",Object(n.jsx)("b",{children:"Editor"}),", click ",Object(n.jsx)("b",{children:"Append Editor"}),", and click ",Object(n.jsx)("b",{children:"Continue"})," to begin using the editor. Enjoy!"," ",Object(n.jsx)("span",{role:"img","aria-label":"clap emoji",children:"\ud83d\udc4f"})," "]})]}),Object(n.jsxs)("p",{children:["After you install the editor on the desktop app, it will automatically sync to the"," ",Object(n.jsx)("a",{href:"https://app.standardnotes.org",target:"_blank",rel:"noopener noreferrer",children:"web"})," ","and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"mobile apps"})," ","after you sign in."]}),Object(n.jsx)("h3",{children:"What to write about"}),Object(n.jsx)("p",{children:"The Append Editor is great for writing articles, blog posts, checklists, code snippets, documentation, emails, essays, journals, lists, logs, notes, tables, todo lists, and much more. Here are some questions to help you get started with today's daily journal:"})," ",Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:"How are you? What's happening?"}),Object(n.jsx)("li",{children:"What might be affecting your mood?"}),Object(n.jsx)("li",{children:"Which feelings fit your mood and to what extent?"}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeelings,children:[Object(n.jsxs)("summary",{children:[!this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Show feelings"})],this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Hide feelings"})]]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Positive Feelings:"})," bold, calm, cheerful, confident, content, eager, ecstatic, energized, engaged, enthusiastic, excited, grateful, happy, humorous, inspired, joyful, light, lively, loving, motivated, optimistic, passionate, peaceful, playful, proud, reassured, refreshed, relaxed, relieved, satisfied, secure, surprised, thrilled, wonderful"]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Negative Feelings:"})," afraid, angry, annoyed, anxious, ashamed, bored, burnt out, confused, demoralized, depressed, disappointed, disgusted, distraught, embarrassed, empty, exhausted, frustrated, furious, guilty, heavy, insecure, irritated, jealous, jittery, lethargic, lonely, nervous, numb, resentful, sad, self-conscious, sleepy, stressed, tired, winded, worried"]})]}),Object(n.jsx)("li",{children:"What thoughts are contributing to the way you're feeling?"}),Object(n.jsx)("details",{onToggle:this.onToggleShowMoreQuestions,children:Object(n.jsxs)("summary",{children:[!this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show more questions"})],this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show fewer questions"})]]})}),this.state.showMoreQuestions&&[Object(n.jsxs)("div",{children:[Object(n.jsx)("li",{children:"What do you hope your life will look like in a week? a month? a year?"}),Object(n.jsx)("li",{children:"What can you do today to make your life the way you want it?"}),Object(n.jsx)("li",{children:"How will you feel when you've realized the goals that you have for yourself?"}),Object(n.jsx)("li",{children:"Who or what do you feel grateful for and why?"}),Object(n.jsx)("li",{children:"What did you enjoy about today?"})]})]]}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeedback,children:[Object(n.jsx)("summary",{children:Object(n.jsx)("p",{className:"link",children:"Need more help?"})}),this.state.showFeedback&&[Object(n.jsxs)("p",{children:["Feel free to"," ",Object(n.jsx)("a",{href:"https://appendeditor.com/contact",target:"_blank",rel:"noopener noreferrer",children:"reach out"})," ","if you have any questions, comments, concerns, or feedback."," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"}),Object(n.jsx)("br",{}),"If you find any bugs or have a feature request, please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"open an issue on GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"}),Object(n.jsx)("br",{}),"You are using version ",Object(n.jsx)("code",{children:"1.2.0"}),". The release notes and change log are available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/releases",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."]})]]}),"Click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Close Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{fill:"var(--sn-stylekit-info-color)",role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to close this section.",Object(n.jsx)("hr",{})]})}}]),o}(s.a.Component),X=function(e){var t=e.appendMode,o=e.editMode,i=e.showHelp;return Object(n.jsx)("div",{id:"intro",children:Object(n.jsxs)("details",{children:[Object(n.jsxs)("summary",{children:["Welcome to the Append Editor!"," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"})," ","Your note is empty."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," ","Click here to get started."," ",Object(n.jsx)("span",{role:"img","aria-label":"memo emoji",children:"\ud83d\udcdd"})]}),Object(n.jsx)("p",{children:"To get started:"}),Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Pencil",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:W,title:"Toggle Edit Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(C,{condition:o,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Edit Mode"})]})}),Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Plus",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:R,title:"Toggle Append Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(E,{condition:t,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Append Mode"})]})})]}),Object(n.jsxs)("p",{children:[Object(n.jsx)("b",{children:"View Mode"})," is currently ",Object(n.jsx)("b",{children:"on"}),". When you type in"," ",Object(n.jsx)("b",{children:"Edit Mode"}),", your note will automatically render here. In"," ",Object(n.jsx)("b",{children:"Append Mode"}),", clicking ",Object(n.jsx)("b",{children:"Append"})," will add the text in the textarea to the end of your note. Click the Eye",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:G,title:"Toggle View Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(O,{condition:!0,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to turn View Mode off and switch to ",Object(n.jsx)("b",{children:"Edit Only Mode"}),"."]}),Object(n.jsxs)("p",{children:["If you are using the demo at"," ",Object(n.jsx)("a",{href:"https://beta.appendeditor.com",target:"_blank",rel:"nofollow noreferrer noopener",children:"beta.appendeditor.com"}),", then your notes will be lost after you close the page."]}),Object(n.jsxs)("p",{children:["If you want to save your notes, then click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Toggle show Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{condition:i,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and follow the instructions on how to install the Append Editor in"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app."]}),Object(n.jsxs)("p",{children:["If you like Standard Notes, please check out Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/extensions",target:"_blank",rel:"nofollow noreferrer noopener",children:"Extended"})," ","for more editors, themes, components, and methods to backup up your data."]}),Object(n.jsxs)("p",{children:["Happy note-taking!"," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude04"})]})]})})},Q=o(309),J=o.n(Q),$=o(444),ee=o.n($),te=o(445),oe=o.n(te),ne=o(446),ie=o.n(ne),se=o(278),ae=o(880),re=o(905),ce=o(906),de=o(914),le=o(938),pe=o(1133),he=o(1139),ue=o(1141),je=o(1147),ge=o(1152),be=o(1153),fe=J()().use(ee.a).use(ae).use(re).use(ge).use(ue,{maxDepth:6}).use(he).use(je,{inlineNotes:!0}).use(oe.a,{allowDangerousHtml:!0}).use(be).use(ce).use(de).use(le,{ignoreMissing:!0}).use(pe).use(ie.a,{createElement:s.a.createElement}),xe=function(e){return fe.processSync(e).result},me=Object(se.throttle)((function(e){return e.length>1e4}),1e3),ve=Object(se.debounce)((function(e){return xe(e)}),500),Oe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).onToggleShowHelp=function(){var e=document.getElementById("helpButton");e&&e.click()},n.renderMarkdown=function(e){return function(e,t){return t?xe(e):me(e)?ve(e):xe(e)}(e,n.props.bypassDebounce)},n.state={showHelp:n.props.showHelp},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.text;return Object(n.jsx)("div",{className:"sk-panel main view"+(this.props.printURL?" printURL":""),children:Object(n.jsxs)("div",{className:"sk-panel-content view",id:Ge.view,children:[!e&&[Object(n.jsx)(X,{appendMode:this.props.appendMode,editMode:this.props.editMode,showHelp:this.props.showHelp})],this.state.showHelp&&[Object(n.jsx)(q,{debugMode:this.props.debugMode,printURL:this.props.printURL})],Object(n.jsx)("div",{id:"renderedNote",className:this.props.editingMode===Xe.useDynamicEditor?"":"rendered-note-section",children:this.props.editingMode===Xe.useMonacoEditor&&"markdown"!==this.props.monacoEditorLanguage&&"html"!==this.props.monacoEditorLanguage&&e?this.renderMarkdown("```"+this.props.monacoEditorLanguage+"\n"+e+"\n```"):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.props.saveText,readOnly:!0,text:e}):this.renderMarkdown(e)})]})})}}]),o}(s.a.Component),we=o(38),Me=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.autoSaveCheckBoxes()}))},n.handleTextAreaChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.autoSaveAppendText()}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.autoSaveAppendText(n.state.text)}))},n.appendTextToNote=function(){n.props.appendTextToNote(),n.setState({text:""});var e=document.getElementById(Ge.appendTextArea);e&&e.focus(),n.state.useMonacoEditor&&n.setState({useMonacoEditor:!1},(function(){n.setState({useMonacoEditor:!0})})),n.state.useDynamicEditor&&n.setState({useDynamicEditor:!1},(function(){n.setState({useDynamicEditor:!0})}))},n.autoSaveAppendText=function(){var e=n.state.text;n.props.autoSaveAppendText(e)},n.autoSaveCheckBoxes=function(){var e=n.state.newLine,t=n.state.newParagraph;n.props.autoSaveCheckBoxes(e,t)},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),n.props.debugMode&&(console.log("Keys pressed: "+e.key+"KeyMap for key: "+n.props.keyMap.get(e.key)),console.log("Append Text Value: "+n.state.text)),n.props.onKeyDown(e),n.props.onKeyDownAppendTextArea(e),n.props.onKeyDownTextArea(e),(n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter")||n.props.keyMap.get("Control")&&n.props.keyMap.get("s"))&&(e.preventDefault(),n.appendTextToNote())},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text,newLine:n.props.appendNewLine,newParagraph:n.props.appendNewParagraph,useMonacoEditor:n.props.editingMode===Xe.useMonacoEditor,useDynamicEditor:n.props.editingMode===Xe.useDynamicEditor},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsxs)("div",{className:"sk-panel main appendix "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:[Object(n.jsx)("div",{className:"sk-panel-content edit"+(this.props.editingMode===Xe.useMonacoEditor?" MonacoEditorContainerParentDiv":""),children:this.state.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e}):this.state.useDynamicEditor?Object(n.jsx)("div",{id:"appendDynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.saveText,readOnly:!1,text:e})}):Object(n.jsx)("textarea",{id:Ge.appendTextArea,name:"text",className:"sk-input contrast textarea append",placeholder:"Append to your note",rows:this.props.appendRows,spellCheck:"true",value:e,onChange:this.handleTextAreaChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})}),Object(n.jsxs)("div",{className:"sk-panel-row",children:[Object(n.jsxs)("form",{className:"checkBoxForm",children:[Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newLine,name:"newLine",type:"checkbox",checked:this.state.newLine,onChange:this.handleInputChange}),"New Line"]}),Object(n.jsx)("br",{}),Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newParagraph,name:"newParagraph",type:"checkbox",checked:this.state.newParagraph,onChange:this.handleInputChange}),"New Paragraph"]})]}),Object(n.jsx)("div",{className:"sk-button-group stretch",children:Object(n.jsx)("button",{type:"button",id:"appendTextButton",onClick:this.appendTextToNote,className:"sk-button info",children:Object(n.jsx)("div",{children:"Append"})})})]})]})}}]),o}(s.a.Component);Me.defaultProps={};var ye,Ce=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[i?Object(n.jsx)(f,{role:"button"}):Object(n.jsx)(x,{role:"button"}),Object(n.jsx)("p",{className:"chevron-button-caption",children:t})]})},Ee=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(v,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Se=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.messageOn,a=e.messageOff,r=e.onClick,c=e.title;return Object(n.jsxs)("button",{className:o,onClick:r,title:c,children:[Object(n.jsx)(O,{condition:i,role:"button"}),Object(n.jsxs)("span",{className:"button-caption",children:[t,":",Object(n.jsxs)("b",{children:["\xa0",i?s:a]})]})]})},ke=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(C,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Te=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.id,a=e.onClick,r=e.title;return Object(n.jsxs)("button",{className:o,id:s,onClick:a,title:r,children:[Object(n.jsx)(S,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Le=function(e){var t=e.className,o=e.fill,i=e.id,s=e.onClick,a=e.title;return Object(n.jsx)("button",{className:t,id:i,onClick:s,title:a,children:Object(n.jsx)(T,{fill:o,role:"button"})})},Ne="editingMode",Be="fontEdit",De="fontSize",Ae="fontView",Ve="monacoEditorLanguage",He="resetAllSettings",Ke="saveAsDefault",Ie=new RegExp(/```css\n/gm),Fe=new RegExp(/```css/gm),Pe=new RegExp(/\n```/gm),Ue=new RegExp(/```/gm),ze=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;Object(l.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o)),n.props.debugMode&&console.log("Settings event name: "+e.target.name+" Value: "+e.target.value)},n.handleSelectChange=function(e){var t=e.target,o=t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.props.debugMode&&console.log("Saved select. Name: "+e.target.name+" Value: "+e.target.value)}))},n.toggleShowCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles})},n.cleanCustomStyles=function(e){return e?e.replace(Ie,"").replace(Fe,"").replace(Pe,"").replace(Ue,""):e},n.saveText=function(e){n.setState({customStyles:e})},n.handleSubmit=function(){if(n.props.debugMode){var e="",t="";""===n.state.fontEdit||void 0===n.state.fontEdit?e="Default":n.state.fontEdit&&(e=n.state.fontEdit),""===n.state.fontView||void 0===n.state.fontView?t="Default":n.state.fontView&&(t=n.state.fontView),console.log("Settings.tsx handleSubmit() triggered: \n - Settings editingMode: "+n.state.editingMode+"\n - Settings fontEdit: "+n.state.fontEdit+"\n - Settings fontView: "+n.state.fontView+"\n - Your chosen font for Edit/Append is: "+e+"\n - Your chosen font for View/Print is: "+t+"\n")}n.setState({customStyles:n.cleanCustomStyles(n.state.customStyles)},(function(){n.props.debugMode&&console.log("Your custom styles: "+n.state.customStyles);var e=n.state,t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.props.onConfirm({customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,saveAsDefault:c})}))},n.loadDefaultSettings=function(){var e=n.props.defaultSettings;n.setState(Object(d.a)({},e),(function(){n.refreshCustomStyles()}))},n.refreshCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles},(function(){n.setState({showCustomStyles:!n.state.showCustomStyles})}))},n.clearCustomStyles=function(){n.setState({customStyles:""},(function(){n.refreshCustomStyles(),n.props.debugMode&&console.log("customStyles reset: "+n.state.customStyles)}));var e=document.getElementById("customStyles");e&&(e.value="",e.focus())},n.clearFontEdit=function(){n.setState({fontEdit:""});var e=document.getElementById(Be);e&&(e.value="",e.focus())},n.clearFontSize=function(){n.setState({fontSize:""});var e=document.getElementById(De);e&&(e.value="",e.focus())},n.clearFontView=function(){n.setState({fontView:""});var e=document.getElementById(Ae);e&&(e.value="",e.focus())},n.clearEditingMode=function(){n.setState({editingMode:Xe.usePlainText})},n.clearMonacoEditorLanguage=function(){n.setState({monacoEditorLanguage:"markdown"});var e=document.getElementById(Ve);e&&(e.value="markdown",e.focus())},n.clearSaveAsDefault=function(){n.setState({saveAsDefault:!1});var e=document.getElementById(Ke);e.checked=!1,e.focus()},n.clearAllSettings=function(){n.clearSaveAsDefault(),n.clearCustomStyles(),n.clearFontView(),n.clearFontEdit(),n.clearFontSize(),n.clearMonacoEditorLanguage(),n.clearEditingMode();var e=document.getElementById(He);e&&e.focus()},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),(n.props.keyMap.get("Control")&&n.props.keyMap.get("s")||n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter"))&&(e.preventDefault(),n.handleSubmit())},n.onKeyUp=function(e){n.props.keyMap.set(e.key,!1)},n.onBlur=function(e){n.props.keyMap.clear()},n.componentWillUnmount=function(){n.props.keyMap.clear()};var i="markdown";n.props.monacoEditorLanguage&&(i=n.props.monacoEditorLanguage);var s="usePlainText";return n.props.editingMode&&(s=n.props.editingMode),n.state={customStyles:n.props.customStyles,editingMode:s,fontEdit:n.props.fontEdit,fontSize:n.props.fontSize,fontView:n.props.fontView,monacoEditorLanguage:i,saveAsDefault:!1,showCustomStyles:!1},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.onCancel,i=e.confirmText,s=e.cancelText,a=e.helpLink;return Object(n.jsxs)("div",{id:"settings",className:"sk-panel main settings",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("datalist",{id:"fonts",children:[Object(n.jsx)("option",{value:'SFMono-Regular, Consolas, Liberation Mono, Menlo, "Ubuntu Mono", courier, monospace;'}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Arial"}),Object(n.jsx)("option",{value:"Arial Black"}),Object(n.jsx)("option",{value:"-apple-system"}),Object(n.jsx)("option",{value:"Bell MT"}),Object(n.jsx)("option",{value:"Baskerville Old Face"}),Object(n.jsx)("option",{value:"Bahnschrift Light"}),Object(n.jsx)("option",{value:"BlinkMacSystemFont"}),Object(n.jsx)("option",{value:"Bodoni MT"}),Object(n.jsx)("option",{value:"Calibri"}),Object(n.jsx)("option",{value:"Calibri Light"}),Object(n.jsx)("option",{value:"Calisto MT"}),Object(n.jsx)("option",{value:"Cambria"}),Object(n.jsx)("option",{value:"Candara"}),Object(n.jsx)("option",{value:"Candara Light"}),Object(n.jsx)("option",{value:"Cantarell"}),Object(n.jsx)("option",{value:"Centaur"}),Object(n.jsx)("option",{value:"Century"}),Object(n.jsx)("option",{value:"Century Gothic"}),Object(n.jsx)("option",{value:"Comic Sans MS"}),Object(n.jsx)("option",{value:"Consolas"}),Object(n.jsx)("option",{value:"Constantia"}),Object(n.jsx)("option",{value:"Courier New"}),Object(n.jsx)("option",{value:"Corbel"}),Object(n.jsx)("option",{value:"Corbel Light"}),Object(n.jsx)("option",{value:"DengXian"}),Object(n.jsx)("option",{value:"Ebrima"}),Object(n.jsx)("option",{value:"Droid Sans"}),Object(n.jsx)("option",{value:"Fira Sans"}),Object(n.jsx)("option",{value:"Gabriola"}),Object(n.jsx)("option",{value:"Garamond"}),Object(n.jsx)("option",{value:"Georgia"}),Object(n.jsx)("option",{value:"Helvetica"}),Object(n.jsx)("option",{value:"Helvetica Neue"}),Object(n.jsx)("option",{value:"Impact"}),Object(n.jsx)("option",{value:"KaTeX_AMS"}),Object(n.jsx)("option",{value:"KaTeX_Caligraphic"}),Object(n.jsx)("option",{value:"KaTeX_Fraktur"}),Object(n.jsx)("option",{value:"KaTeX_Main"}),Object(n.jsx)("option",{value:"KaTeX_Math"}),Object(n.jsx)("option",{value:"KaTeX_SansSerif"}),Object(n.jsx)("option",{value:"KaTeX_Script"}),Object(n.jsx)("option",{value:"KaTeX_Typewriter"}),Object(n.jsx)("option",{value:"Lato"}),Object(n.jsx)("option",{value:"Liberation Mono"}),Object(n.jsx)("option",{value:"Lucida Caligraphy"}),Object(n.jsx)("option",{value:"Lucida Sans"}),Object(n.jsx)("option",{value:"Menlo"}),Object(n.jsx)("option",{value:"Monaco"}),Object(n.jsx)("option",{value:"Monospace"}),Object(n.jsx)("option",{value:"New York"}),Object(n.jsx)("option",{value:"Oxygen"}),Object(n.jsx)("option",{value:"Palatino"}),Object(n.jsx)("option",{value:"Roboto"}),Object(n.jsx)("option",{value:"Sans-Serif"}),Object(n.jsx)("option",{value:"Segoe UI"}),Object(n.jsx)("option",{value:"SFMono-Regular"}),Object(n.jsx)("option",{value:"Serif"}),Object(n.jsx)("option",{value:"Sylfaen"}),Object(n.jsx)("option",{value:"Tahoma"}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Trebuchet MS"}),Object(n.jsx)("option",{value:"Ubuntu"}),Object(n.jsx)("option",{value:"Verdana"}),Object(n.jsx)("option",{value:"Yu Gothic"})]}),Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h1",{children:t}),Object(n.jsx)("button",{id:"undoDialog",onClick:o,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsxs)("p",{children:["Need help? Check out the"," ",Object(n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),". To clear all settings, click undo:\xa0"]}),Object(n.jsx)(Le,{onClick:this.clearAllSettings,title:"Reset all Settings",id:He})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"To load your personal default settings, click:\xa0"}),Object(n.jsx)("button",{onClick:this.loadDefaultSettings,title:"Load personal default settings",children:Object(n.jsx)(k,{role:"button"})})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"Editing Mode: "}),Object(n.jsx)(Le,{onClick:this.clearEditingMode,title:"Reset Editing Mode to Plain Textarea"})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.usePlainText,name:Ne,value:Xe.usePlainText,className:"radio",type:"radio",checked:this.state.editingMode===Xe.usePlainText,onChange:this.handleInputChange}),"Plain Textarea: standard textarea with spellcheck (default, mobile recommended)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useCodeMirror,name:Ne,value:Xe.useCodeMirror,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useCodeMirror,onChange:this.handleInputChange}),"CodeMirror: in-line formatting for Markdown"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useDynamicEditor,name:Ne,value:Xe.useDynamicEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useDynamicEditor,onChange:this.handleInputChange}),"Dynamic: live formatting for Markdown. ",Object(n.jsx)("b",{children:"warning: "}),"existing Markdown may break (not compatible with KaTeX, lists may not render properly; desktop and mobile compatible)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{htmlFor:Xe.useMonacoEditor,children:[Object(n.jsx)("input",{id:Xe.useMonacoEditor,name:Ne,value:Xe.useMonacoEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useMonacoEditor,onChange:this.handleInputChange}),"Monaco: syntax highlighting for Markdown and many other programming languages, intelligent auto-completion, sophisticated search and replace (desktop recommended)"]})}),this.state.editingMode===Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ve,children:["Monaco Editor Language:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{children:Object(n.jsxs)("select",{id:Ve,name:Ve,value:this.state.monacoEditorLanguage,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{children:"abap"}),Object(n.jsx)("option",{children:"aes"}),Object(n.jsx)("option",{children:"apex"}),Object(n.jsx)("option",{children:"azcli"}),Object(n.jsx)("option",{children:"bat"}),Object(n.jsx)("option",{children:"c"}),Object(n.jsx)("option",{children:"cameligo"}),Object(n.jsx)("option",{children:"clojure"}),Object(n.jsx)("option",{children:"coffeescript"}),Object(n.jsx)("option",{children:"cpp"}),Object(n.jsx)("option",{children:"csharp"}),Object(n.jsx)("option",{children:"csp"}),Object(n.jsx)("option",{children:"css"}),Object(n.jsx)("option",{children:"dart"}),Object(n.jsx)("option",{children:"dockerfile"}),Object(n.jsx)("option",{children:"fsharp"}),Object(n.jsx)("option",{children:"go"}),Object(n.jsx)("option",{children:"graphql"}),Object(n.jsx)("option",{children:"handlebars"}),Object(n.jsx)("option",{children:"hcl"}),Object(n.jsx)("option",{children:"html"}),Object(n.jsx)("option",{children:"ini"}),Object(n.jsx)("option",{children:"java"}),Object(n.jsx)("option",{children:"javascript"}),Object(n.jsx)("option",{children:"json"}),Object(n.jsx)("option",{children:"julia"}),Object(n.jsx)("option",{children:"kotlin"}),Object(n.jsx)("option",{children:"less"}),Object(n.jsx)("option",{children:"lexon"}),Object(n.jsx)("option",{children:"lua"}),Object(n.jsx)("option",{children:"markdown"}),Object(n.jsx)("option",{children:"mips"}),Object(n.jsx)("option",{children:"msdax"}),Object(n.jsx)("option",{children:"mysql"}),Object(n.jsx)("option",{children:"objective-c"}),Object(n.jsx)("option",{children:"pascal"}),Object(n.jsx)("option",{children:"pascaligo"}),Object(n.jsx)("option",{children:"perl"}),Object(n.jsx)("option",{children:"pgsql"}),Object(n.jsx)("option",{children:"php"}),Object(n.jsx)("option",{children:"plaintext"}),Object(n.jsx)("option",{children:"postiats"}),Object(n.jsx)("option",{children:"powerquery"}),Object(n.jsx)("option",{children:"powershell"}),Object(n.jsx)("option",{children:"pug"}),Object(n.jsx)("option",{children:"python"}),Object(n.jsx)("option",{children:"r"}),Object(n.jsx)("option",{children:"razor"}),Object(n.jsx)("option",{children:"redis"}),Object(n.jsx)("option",{children:"redshift"}),Object(n.jsx)("option",{children:"restructuredtext"}),Object(n.jsx)("option",{children:"ruby"}),Object(n.jsx)("option",{children:"rust"}),Object(n.jsx)("option",{children:"sb"}),Object(n.jsx)("option",{children:"scala"}),Object(n.jsx)("option",{children:"scheme"}),Object(n.jsx)("option",{children:"scss"}),Object(n.jsx)("option",{children:"shell"}),Object(n.jsx)("option",{children:"sol"}),Object(n.jsx)("option",{children:"sql"}),Object(n.jsx)("option",{children:"st"}),Object(n.jsx)("option",{children:"swift"}),Object(n.jsx)("option",{children:"systemverilog"}),Object(n.jsx)("option",{children:"tcl"}),Object(n.jsx)("option",{children:"twig"}),Object(n.jsx)("option",{children:"typescript"}),Object(n.jsx)("option",{children:"vb"}),Object(n.jsx)("option",{children:"verilog"}),Object(n.jsx)("option",{children:"xml"}),Object(n.jsx)("option",{children:"yaml"})]})}),Object(n.jsx)(Le,{onClick:this.clearMonacoEditorLanguage,title:"Reset Monaco Editor Language to Markdown"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsx)("label",{htmlFor:De,children:"Choose a base font size: "}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsxs)("select",{id:De,name:De,value:this.state.fontSize,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{}),Object(n.jsx)("option",{children:"12px"}),Object(n.jsx)("option",{children:"13px"}),Object(n.jsx)("option",{children:"14px"}),Object(n.jsx)("option",{children:"15px"}),Object(n.jsx)("option",{children:"16px"}),Object(n.jsx)("option",{children:"17px"}),Object(n.jsx)("option",{children:"18px"}),Object(n.jsx)("option",{children:"19px"}),Object(n.jsx)("option",{children:"20px"}),Object(n.jsx)("option",{children:"21px"}),Object(n.jsx)("option",{children:"22px"}),Object(n.jsx)("option",{children:"23px"}),Object(n.jsx)("option",{children:"24px"}),Object(n.jsx)("option",{children:"25px"}),Object(n.jsx)("option",{children:"26px"}),Object(n.jsx)("option",{children:"27px"}),Object(n.jsx)("option",{children:"28px"}),Object(n.jsx)("option",{children:"29px"}),Object(n.jsx)("option",{children:"30px"})]}),Object(n.jsx)(Le,{onClick:this.clearFontSize,title:"Reset font size to 16px"})]})]}),this.state.editingMode!==Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Be,children:["Choose a font for Edit/Append:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Be,name:Be,value:this.state.fontEdit,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontEdit,title:"Reset font for Edit/Append"})]})]})],this.state.editingMode!==Xe.useDynamicEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ae,children:["Choose a font for View/Print:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Ae,name:Ae,value:this.state.fontView,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontView,title:"Reset font for View/Print"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings custom-css",children:[Object(n.jsx)(Ce,{caption:"Add custom styles (CSS):",className:"chevron-toggle-button",condition:this.state.showCustomStyles,onClick:this.toggleShowCustomStyles,title:"Toggle show add custom styles (CSS)"}),this.state.showCustomStyles&&[Object(n.jsx)(Le,{className:"custom-css-undo-button",onClick:this.clearCustomStyles,title:"Reset custom styles (CSS)"})]]}),this.state.showCustomStyles&&[Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsx)(A,{tabSize:2,language:"css",text:this.state.customStyles,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,saveText:this.saveText})})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ke,children:["Save these settings as your personal default:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{className:"checkbox-input-label",children:Object(n.jsx)("input",{id:Ke,name:Ke,type:"checkbox",checked:this.state.saveAsDefault,onChange:this.handleInputChange})}),Object(n.jsx)(Le,{onClick:this.clearSaveAsDefault,title:"Clear save as default"})]})]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:o,children:Object(n.jsx)("div",{children:s})}),Object(n.jsx)("button",{className:"sk-button info",onClick:this.handleSubmit,children:Object(n.jsx)("div",{children:i})})]})})]})}}]),o}(s.a.Component),Re=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).state={hasError:!1},n}return Object(p.a)(o,[{key:"componentDidCatch",value:function(e,t){console.log("Error:",e,"\nError Info:",t),this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e,t;return this.state.hasError?Object(n.jsx)("div",{className:"sk-panel main",children:Object(n.jsx)("div",{className:"sk-panel-content view",children:Object(n.jsxs)("div",{id:"errorBoundary",children:[Object(n.jsx)("h1",{children:"Something went wrong."}),Object(n.jsxs)("p",{children:["Error Name: ",Object(n.jsx)("code",{children:null===(e=this.state.error)||void 0===e?void 0:e.name})]}),Object(n.jsxs)("p",{children:["Error Message: ",Object(n.jsx)("code",{children:null===(t=this.state.error)||void 0===t?void 0:t.message})]}),Object(n.jsx)("p",{children:"Please see the developer console for details."}),Object(n.jsx)("hr",{}),Object(n.jsxs)("p",{children:["Errors such as ",Object(n.jsx)("code",{children:"TypeError"})," and"," ",Object(n.jsx)("code",{children:"Cannot read property 'type' of undefined"})," usually occur when the editor is unable to process and render your notes because it contains incorrect or incomplete HTML. If you are writing in HTML, then please continue to write and refresh the View Mode when the HTML tags are closed."]}),Object(n.jsxs)("p",{children:["If you are using the Dynamic editing mode, then please switch to the Plain Textarea or Monaco editing modes in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and remove or fix the text that is causing the error."]}),Object(n.jsxs)("p",{children:["If the error persists or is not related to the content of your note, then please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"report the issue on GitHub"})," ","and we will try to fix it."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})]})]})})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),o}(s.a.Component),We=o(447),_e=o.n(We),Ze=o(448),Ye=o.n(Ze);!function(e){e.chevronToggleButton="menu-button chevron-toggle-button",e.menuButton="menu-button",e.on=" on",e.off=" off"}(ye||(ye={}));var Ge,qe,Xe,Qe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).clearTooltipTimer=void 0,n.resetMessageTimer=function(){n.clearTooltipTimer&&clearTimeout(n.clearTooltipTimer),n.clearTooltipTimer=setTimeout((function(){n.setState({displayMessageEdit:!1,displayMessageShare:!1})}),5e3)},n.showMessageEdit=function(){n.setState({displayMessageEdit:!0,displayMessageShare:!1},(function(){n.resetMessageTimer()}))},n.showMessageShare=function(){n.setState({displayMessageEdit:!1,displayMessageShare:!0},(function(){n.resetMessageTimer()}))},n.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),n.showMessageShare(),t.remove()},n.copyText=function(){n.props.text?n.setState({message:"Copied Text to clipboard"},(function(){n.copyToClipboard(n.props.text)})):n.setState({message:"No text to copy. Your note is empty"},(function(){n.showMessageShare()}))},n.copyHtml=function(){if(n.props.viewMode)if(n.props.text){var e,t=document.getElementById("renderedNote");(null===t||void 0===t||null===(e=t.firstElementChild)||void 0===e?void 0:e.innerHTML)&&(n.setState({message:"Copied HTML to clipboard"}),n.copyToClipboard(null===t||void 0===t?void 0:t.firstElementChild.innerHTML))}else n.setState({message:"No HTML to copy. Your note is empty"},(function(){n.showMessageShare()}));else n.setState({message:"Unable to copy HTML. Please turn View Mode on"},(function(){return n.showMessageShare()}))},n.formatText=function(){"markdown"!==n.props.monacoEditorLanguage&&n.props.editingMode===Xe.useMonacoEditor?n.setState({message:"Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown"},(function(){n.showMessageEdit()})):n.props.text?n.setState({message:"Formatted Markdown text with Prettier"},(function(){try{var e=_e.a.format(n.props.text,{parser:"markdown",plugins:[Ye.a]});n.props.saveText(e),n.props.refreshEdit(),n.props.refreshView(),n.showMessageEdit()}catch(t){n.setState({message:"Error formatting text: "+t},(function(){n.showMessageEdit()})),console.log("Error formatting text: "+t)}})):n.setState({message:"No text to format. Your note is empty"},(function(){n.showMessageEdit()}))},n.uncheckBoxes=function(){var e=n.props.text,t=new RegExp(/- \[x\]/gm);if(t.test(e)){var o=e.replace(t,"- [ ]");n.props.saveText(o),n.props.refreshEdit(),n.props.refreshView(),n.setState({message:"Unchecked all checkboxes"},(function(){n.showMessageEdit()}))}else n.setState({message:"No checked checkboxes found"},(function(){n.showMessageEdit()}))},n.state={message:"",displayMessageEdit:!1,displayMessageShare:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return[Object(n.jsx)("div",{className:"menu-overlay",onClick:this.props.toggleShowMenu}),Object(n.jsxs)("div",{id:"menu",children:[Object(n.jsx)(Ce,{caption:"Appearance",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsView,onClick:this.props.toggleShowMenuOptionsView,title:"Toggle show options for the appearance of the editor"}),this.props.showMenuOptionsView&&[Object(n.jsx)(Se,{caption:"Borderless",className:ye.menuButton+(this.props.borderlessMode?ye.on:ye.off),condition:this.props.borderlessMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleBorderlessMode,title:"Toggle Borderless Mode. Blends borders and margins into the background for a cleaner look"}),Object(n.jsx)(Se,{caption:"Fixed Height",className:ye.menuButton+(this.props.fixedHeightMode?ye.on:ye.off),condition:this.props.fixedHeightMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFixedHeightMode,title:"Toggle Fixed Height Mode. Limits the height of the content container for easier side-by-side editing"}),Object(n.jsx)(Se,{caption:"Full Width",className:ye.menuButton+(this.props.fullWidthMode?ye.on:ye.off),condition:this.props.fullWidthMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFullWidthMode,title:"Toggle Full Width Mode for unrestricted editing. Borderless mode plus unset maximum container widths"}),Object(n.jsx)(Se,{caption:"Horizontal Overflow",className:ye.menuButton+(this.props.overflowMode?ye.on:ye.off),condition:this.props.overflowMode,messageOn:"visible",messageOff:"auto",onClick:this.props.toggleOverflowMode,title:"Toggle Horizontal Overflow. Visible is great for editing and viewing large tables and preformatted text. Works best with Full Width mode"})],Object(n.jsx)(Ce,{caption:"Share",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsShare,onClick:this.props.toggleShowMenuOptionsShare,title:"Toggle show options to share your note"}),this.props.showMenuOptionsShare&&[Object(n.jsx)(Ee,{caption:"Copy note text",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyText,title:"Copy the text of your note to your device's clipboard"}),Object(n.jsx)(Ee,{caption:"Copy rendered HTML",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyHtml,title:"Copy the rendered HTML from your note text to your device's clipboard"}),Object(n.jsx)(Te,{caption:"Print rendered note",className:"menu-button off",fill:"var(--sn-stylekit-foreground-color)",id:Ge.printButton,onClick:this.props.onConfirmPrintUrl,title:"Print rendered note. Works best on the web app in Chromium browsers (e.g., MS Edge, Google Chrome). Not available on mobile"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageShare?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)(Ce,{caption:"Actions",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsEdit,onClick:this.props.toggleShowMenuOptionsEdit,title:"Toggle show actions to quickly format and edit your note"}),this.props.showMenuOptionsEdit&&[Object(n.jsx)(ke,{caption:"Format Markdown text",className:ye.menuButton,fill:"var(--sn-stylekit-warning-color)",onClick:this.formatText,title:"Format Markdown text with Prettier. WARNING: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)(ke,{caption:"Uncheck all checkboxes",className:ye.menuButton,fill:"var(--sn-stylekit-danger-color)",onClick:this.uncheckBoxes,title:"Uncheck all checkboxes. DANGER: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageEdit?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)("div",{className:"extra-space"})]})]}}]),o}(s.a.Component),Je=o(108),$e=o.n(Je);o(1161),o(1166),o(1167),o(1168),o(437),o(1170),o(305),o(304),o(1171);!function(e){e.appendButton="appendButton",e.appendTextArea="appendTextArea",e.appendix="appendix",e.content="content",e.edit="edit",e.editButton="editButton",e.editTextArea="editTextArea",e.header="header",e.helpButton="helpButton",e.menuButton="menuButton",e.newLine="newLine",e.newParagraph="newParagraph",e.printButton="printButton",e.settingsButton="settingsButton",e.view="view",e.viewButton="viewButton"}(Ge||(Ge={})),function(e){e.fixed="fixed",e.fixedHeader="fixed-header",e.focused="focused"}(qe||(qe={})),function(e){e.usePlainText="usePlainText",e.useCodeMirror="useCodeMirror",e.useDynamicEditor="useDynamicEditor",e.useMonacoEditor="useMonacoEditor"}(Xe||(Xe={}));var et={text:"",appendNewLine:!1,appendNewParagraph:!1,appendMode:!1,appendRows:8,appendText:"",bypassDebounce:!1,confirmPrintUrl:!1,customStyles:"",defaultSettings:{customStyles:"",editingMode:"usePlainText",fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown"},fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown",printURL:!0,refreshEdit:!1,refreshView:!1,showAppendix:!0,showHeader:!0,showHelp:!1,showDiff:!1,settingsMode:!1},tt=0,ot=!1,nt=new Map,it=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).editorKit=void 0,n.refreshEditorTimer=void 0,n.saveTimer=void 0,n.componentDidMount=function(){n.onViewMode(),n.loadDefaultMenuState(),document.addEventListener("scroll",n.onScroll)},n.componentWillUnmount=function(){document.removeEventListener("scroll",n.onScroll)},n.configureEditorKit=function(){var e=new j.EditorKitDelegate({setEditorRawText:function(e){n.setState(Object(d.a)(Object(d.a)({},et),{},{bypassDebounce:!0,text:e}),(function(){me.cancel(),me(e),me.flush(),ve.cancel(),me(e)&&(ve(e),ve.flush()),n.state.savingEditorOptions||(n.loadEditorOptions(),n.loadDefaultSettings(),n.loadMetaData()),setTimeout((function(){n.setState({bypassDebounce:!1})}),1e3)}))},clearUndoHistory:function(){},getElementsBySelector:function(){return[]}});n.editorKit=new j.EditorKit({delegate:e,mode:"plaintext",supportsFilesafe:!1})},n.refreshEditor=function(){me(n.state.text)?(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),20)):(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),10))},n.loadDefaultSettings=function(){try{var e=n.editorKit.internal.componentManager.componentDataValueForKey("defaultSettings"),t=n.editorKit.internal.componentManager.componentDataValueForKey("editingMode");if(void 0!==e){var o=JSON.parse(e);ot,n.setState({customStyles:o.customStyles,editingMode:o.editingMode,fontEdit:o.fontEdit,fontSize:o.fontSize,fontView:o.fontView,monacoEditorLanguage:o.monacoEditorLanguage,defaultSettings:o},(function(){n.refreshEditor()}))}else if(void 0!==t){var i=n.editorKit.internal.componentManager.componentDataValueForKey("customStyles"),s=n.editorKit.internal.componentManager.componentDataValueForKey("fontEdit"),a=n.editorKit.internal.componentManager.componentDataValueForKey("fontSize"),r=n.editorKit.internal.componentManager.componentDataValueForKey("fontView"),c=n.editorKit.internal.componentManager.componentDataValueForKey("monacoEditorLanguage");ot,n.setState({customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c,defaultSettings:{customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c}},(function(){n.refreshEditor()}))}else n.refreshEditor()}catch(d){console.log("Error loading default settings:",d)}},n.loadEditorOptions=function(){try{var e=n.editorKit.internal.componentManager.componentDataValueForKey("menuOptions");if(void 0!==e){var t=JSON.parse(e);n.setState({borderlessMode:t.borderlessMode,fixedHeightMode:t.fixedHeightMode,fullWidthMode:t.fullWidthMode,overflowMode:t.overflowMode},(function(){n.refreshEditor()}))}}catch(o){console.log("Error loading editor options:",o)}},n.loadMetaData=function(){n.editorKit.internal.componentManager.streamContextItem((function(e){(e.content.appendEditorCustomStyles||e.content.appendEditorEditingMode||e.content.appendEditorFontEdit||e.content.appendEditorFontSize||e.content.appendEditorFontView||e.content.appendEditorMonacoEditorLanguage)&&n.setState({customStyles:e.content.appendEditorCustomStyles,editingMode:e.content.appendEditorEditingMode,fontEdit:e.content.appendEditorFontEdit,fontSize:e.content.appendEditorFontSize,fontView:e.content.appendEditorFontView,monacoEditorLanguage:e.content.appendEditorMonacoEditorLanguage},(function(){n.refreshEditor()})),(e.content.appendNewLine||e.content.appendNewParagraph)&&n.setState({appendNewLine:e.content.appendNewLine,appendNewParagraph:e.content.appendNewParagraph}),n.setState({appendText:e.content.appendText},(function(){n.state.text||n.state.appendText||n.state.editMode||n.onEditMode()}))}))},n.saveText=function(e){n.saveNote(e),n.setState({text:e},(function(){n.state.editingMode===Xe.useDynamicEditor?n.refreshView():n.state.viewMode&&me(e)&&(n.saveTimer&&clearTimeout(n.saveTimer),n.saveTimer=setTimeout((function(){if(n.state.fixedHeightMode){var e=document.getElementById(Ge.view);if(e){var t=e.scrollTop;n.refreshView();var o=document.getElementById(Ge.view);o&&(o.scrollTop=t)}else n.refreshView()}else n.refreshView()}),550))}))},n.saveNote=function(e){try{n.editorKit.onEditorValueChanged(e)}catch(t){console.log("Error saving note:",t)}},n.appendTextToNote=function(){if(n.state.appendText){var e=n.state.appendText,t="";t=n.state.appendNewParagraph?" \n\n"+e:n.state.appendNewLine?" \n"+e:e,n.setState({text:n.state.text.concat(t),appendText:""},(function(){var e=n.editorKit.internal.note;e&&n.editorKit.internal.componentManager.saveItemWithPresave(e,(function(){e.content.text=n.state.text,e.content.appendText=n.state.appendText})),n.refreshEdit(),n.state.editingMode===Xe.useDynamicEditor?(n.refreshView(),setTimeout((function(){n.skipToBottom()}),50)):me(n.state.text)?setTimeout((function(){n.refreshView(),n.skipToBottom()}),550):n.skipToBottom()}))}n.state.appendCodeMirror&&n.state.editingMode===Xe.useCodeMirror&&n.state.appendCodeMirror.setValue("")},n.autoSaveAppendText=function(e){n.setState({appendText:e});try{var t=n.editorKit.internal.note;t&&n.editorKit.internal.componentManager.saveItemWithPresave(t,(function(){t.content.appendText=e}))}catch(o){console.log("Error saving appendText:",o)}},n.autoSaveCheckBoxes=function(e,t){n.setState({appendNewLine:e,appendNewParagraph:t});try{var o=n.editorKit.internal.note;o&&n.editorKit.internal.componentManager.saveItemWithPresave(o,(function(){o.content.appendNewLine=e,o.content.appendNewParagraph=t}))}catch(i){console.log("Error saving checkboxes:",i)}},n.refreshEdit=function(){n.setState({refreshEdit:!n.state.refreshEdit},(function(){document.getElementById(Ge.editTextArea)&&n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea)}))},n.refreshView=function(){n.setState({refreshView:!n.state.refreshView})},n.configureCodeMirror=function(e){if(e===Ge.editTextArea){ot;var t=document.getElementById(e);if(t){var o=$e.a.fromTextArea(t,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.text});o.setSize("100%","100%"),o.on("change",(function(){var e=o.getValue();o.save(),n.saveText(e)})),o.on("blur",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.remove(qe.focused)})),o.on("focus",(function(e,t){var o=document.getElementById(Ge.content);o&&o.classList.add(qe.focused)})),o.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownEditTextArea(t),n.onKeyDownTextArea(t)})),o.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({editCodeMirror:o})}}else if(e===Ge.appendTextArea){var i=document.getElementById(Ge.appendTextArea);if(i){var s=$e.a.fromTextArea(i,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.appendText});s.setSize("100%","100%"),s.on("change",(function(){var e=s.getValue();s.save(),n.autoSaveAppendText(e)})),s.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownAppendTextArea(t),n.onKeyDownTextArea(t)})),s.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({appendCodeMirror:s})}}},n.onEditMode=function(){n.state.editMode?n.state.editMode&&(n.state.editingMode!==Xe.useMonacoEditor&&n.setState({viewMode:!0}),n.state.editCodeMirror&&n.state.editCodeMirror.toTextArea(),n.setState({editMode:!1},(function(){if(!n.state.appendMode){var e=document.getElementById(Ge.editButton);e&&e.focus()}}))):(n.state.appendMode&&!n.state.appendText&&n.setState({appendMode:!1}),n.setState({editMode:!0},(function(){var e=document.getElementById(Ge.editTextArea);e&&(e.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea))})))},n.onAppendMode=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n.state.appendMode?n.state.appendMode&&(n.state.appendCodeMirror&&n.state.appendCodeMirror.toTextArea(),n.setState({appendMode:!1},(function(){if(n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),o){var e=document.getElementById(Ge.appendButton);e&&e.focus()}}))):(t&&n.setState({editMode:!1}),n.setState({appendMode:!0},(function(){if(e&&n.scrollToBottom(),o){var t=document.getElementById(Ge.appendTextArea);t&&(t.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.appendTextArea))}})))},n.onViewMode=function(){n.state.viewMode||n.setState({viewMode:!0},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.appendMode&&!n.state.editMode&&n.skipToBottom()})),n.state.viewMode&&n.setState({viewMode:!1},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.editMode||n.state.appendMode||n.onEditMode()}))},n.toggleShowHelp=function(){n.state.showHelp?n.setState({showHelp:!1},(function(){n.refreshView();var e=document.getElementById(Ge.helpButton);e&&e.focus()})):n.setState({showHelp:!0},(function(){n.state.viewMode?n.state.viewMode&&n.refreshView():n.onViewMode();var e=document.getElementById(Ge.helpButton);e&&e.focus(),setTimeout((function(){n.scrollToTop()}),50)}))},n.toggleShowMenu=function(){n.setState({showMenu:!n.state.showMenu},(function(){var e=document.getElementById(Ge.menuButton);e&&e.focus()}))},n.loadDefaultMenuState=function(){n.setState({showMenuOptionsEdit:!1,showMenuOptionsShare:!0,showMenuOptionsView:!0})},n.toggleShowMenuOptionsEdit=function(){n.setState({showMenuOptionsEdit:!n.state.showMenuOptionsEdit})},n.toggleShowMenuOptionsShare=function(){n.setState({showMenuOptionsShare:!n.state.showMenuOptionsShare})},n.toggleShowMenuOptionsView=function(){n.setState({showMenuOptionsView:!n.state.showMenuOptionsView})},n.toggleBorderlessMode=function(){n.setState({borderlessMode:!n.state.borderlessMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFixedHeightMode=function(){n.setState({fixedHeightMode:!n.state.fixedHeightMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFullWidthMode=function(){n.setState({fullWidthMode:!n.state.fullWidthMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleOverflowMode=function(){n.setState({overflowMode:!n.state.overflowMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.saveMenuOptions=function(){var e;e={borderlessMode:n.state.borderlessMode,fixedHeightMode:n.state.fixedHeightMode,fullWidthMode:n.state.fullWidthMode,overflowMode:n.state.overflowMode},n.saveEditorOption("menuOptions",JSON.stringify(e))},n.saveEditorOption=function(e,t){n.setState({savingEditorOptions:!0},(function(){try{n.editorKit.internal.componentManager.setComponentDataValueForKey(e,t),setTimeout((function(){n.setState({savingEditorOptions:!1},(function(){n.loadDefaultSettings(),n.loadMetaData()}))}),250)}catch(o){console.log("Error saving editor option. Your optionKey:",e,"\n - Your optionValue: ",t,"\n - The error: ",o),n.setState({savingEditorOptions:!1},(function(){n.refreshEditor(),n.loadDefaultSettings(),n.loadMetaData()}))}}))},n.onSettingsMode=function(){n.state.settingsMode?n.state.settingsMode&&n.setState(Object(d.a)(Object(d.a)({},n.state.currentState),{},{settingsMode:!1}),(function(){n.refreshEdit();var e=document.getElementById(Ge.settingsButton);e&&e.focus()})):(n.removeFixedHeader(),n.setState({currentState:n.state},(function(){n.setState({appendMode:!1,editMode:!1,fullWidthMode:!1,fixedHeightMode:!1,settingsMode:!0,showAppendix:!1,showHeader:!1,showMenu:!1,viewMode:!1},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))})))},n.onSaveSettings=function(e){var t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.setState(Object(d.a)(Object(d.a)({},n.state.currentState),{},{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,showAppendix:!0,showHeader:!0,settingsMode:!1}),(function(){n.refreshEditor();var e=document.getElementById(Ge.settingsButton);e&&e.focus()}));var l=n.editorKit.internal.note;l&&n.editorKit.internal.componentManager.saveItemWithPresave(l,(function(){l.content.appendEditorCustomStyles=t,l.content.appendEditorEditingMode=o,l.content.appendEditorFontEdit=i,l.content.appendEditorFontSize=s,l.content.appendEditorFontView=a,l.content.appendEditorMonacoEditorLanguage=r})),c&&n.setState({defaultSettings:{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r}},(function(){n.saveEditorOption("defaultSettings",JSON.stringify(n.state.defaultSettings))}))},n.activateStyles=function(){var e=document.getElementById("customStyleSheet");if(e){var t=e.parentNode;t&&t.removeChild(e)}var o="";n.state.fontSize&&(o=".CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: "+n.state.fontSize+";}\n");var i="";n.state.fontEdit&&(i=".CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: "+n.state.fontEdit+";}\n");var s="";if(n.state.fontView&&(s="#renderedNote {font-family: "+n.state.fontView+";}\n"),n.state.customStyles||n.state.fontEdit||n.state.fontSize||n.state.fontView){var a=document.createElement("style");a.setAttribute("id","customStyleSheet"),a.innerHTML=o+i+s+n.state.customStyles,document.body.appendChild(a)}},n.onCancelPrint=function(){n.setState({confirmPrintUrl:!1},(function(){var e=document.getElementById(Ge.printButton);e&&e.focus()}))},n.onConfirmPrintUrl=function(){n.setState({confirmPrintUrl:!0},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))},n.onPrintUrlTrue=function(){n.setState({confirmPrintUrl:!1,printURL:!0},(function(){n.printRenderedHtml()}))},n.onPrintUrlFalse=function(){n.setState({confirmPrintUrl:!1,printURL:!1},(function(){n.printRenderedHtml()}))},n.printRenderedHtml=function(){window.print();var e=document.getElementById(Ge.printButton);e&&e.focus()},n.goDown=function(){if(document.body.scrollTop=1e7,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=1e7)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=1e7)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=1e7);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=1e7);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=1e7)}},n.scrollToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},n.skipToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"})},n.goUp=function(){if(document.body.scrollTop=0,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=0)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=0)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=0);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=0);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=0)}},n.scrollToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},n.skipToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"auto",block:"start",inline:"nearest"})},n.onKeyDown=function(e){nt.set(e.key,!0),nt.get("Control")&&nt.get("e")?(e.preventDefault(),n.onEditMode()):nt.get("Control")&&!nt.get("Alt")&&(nt.get("u")||nt.get("m"))?(e.preventDefault(),n.onAppendMode()):nt.get("Control")&&!nt.get("Alt")&&nt.get("p")?(e.preventDefault(),n.onViewMode()):nt.get("Control")&&nt.get(".")?(e.preventDefault(),n.setState({appendRows:n.state.appendRows+1})):nt.get("Control")&&nt.get(",")?(e.preventDefault(),n.state.appendRows>5&&n.setState({appendRows:n.state.appendRows-1})):nt.get("Control")&&nt.get("<")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onEditMode()}))):nt.get("Control")&&nt.get(">")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onAppendMode()}))):nt.get("Control")&&nt.get("[")?(e.preventDefault(),n.skipToTop()):nt.get("Control")&&nt.get("]")?(e.preventDefault(),n.skipToBottom()):nt.get("Control")&&!nt.get("Alt")&&!nt.get("Shift")&&nt.get("w")&&nt.delete("w")},n.onKeyDownAppendTextArea=function(e){if(nt.get("Escape"))e.preventDefault(),nt.delete("Escape"),n.onAppendMode();else if(nt.get("Control")&&nt.get("Enter"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&nt.get("s"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("n")){e.preventDefault();var t=document.getElementById(Ge.newLine);t&&t.click()}else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("p")){e.preventDefault();var o=document.getElementById(Ge.newParagraph);o&&o.click()}},n.onKeyDownEditTextArea=function(e){nt.get("Escape")&&(e.preventDefault(),nt.set("Escape",!1),n.onEditMode())},n.onKeyDownTextArea=function(e){nt.get("Shift")&&nt.get("Enter")?(e.preventDefault(),document.execCommand("insertText",!1," \n")):nt.get("Control")&&nt.get("b")?(e.preventDefault(),document.execCommand("insertText",!1,"**")):nt.get("Control")&&nt.get("h")?(e.preventDefault(),document.execCommand("insertText",!1,"#")):nt.get("Control")&&nt.get("Alt")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"![]()")):nt.get("Control")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"*")):nt.get("Control")&&nt.get("Alt")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"`")):nt.get("Control")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"[]()")):nt.get("Control")&&nt.get("Alt")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n1. ")):nt.get("Control")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n- ")):nt.get("Control")&&nt.get("Alt")&&nt.get("u")?(e.preventDefault(),document.execCommand("insertText",!1,"~~")):(nt.get("Control")&&nt.get("q")||nt.get("Control")&&nt.get("'")||nt.get("Control")&&nt.get('"'))&&(e.preventDefault(),document.execCommand("insertText",!1,"\n> "))},n.onKeyUp=function(e){nt.delete(e.key)},n.onBlur=function(e){nt.clear()},n.onScroll=function(e){n.state.settingsMode||(window.scrollYtt&&!n.state.showMenu&&(void 0!==n.state.editingMode&&n.state.editingMode!==Xe.usePlainText&&n.state.editingMode!==Xe.useCodeMirror||!n.state.editMode||n.state.appendMode||n.state.settingsMode||n.state.viewMode)&&n.removeFixedHeader(),tt=window.scrollY)},n.activateFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&t&&(e.classList.add(qe.fixed),t.classList.add(qe.fixedHeader))},n.removeFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&e.classList.remove(qe.fixed),t&&t.classList.remove(qe.fixedHeader)},n.configureEditorKit(),n.state=et,n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return[Object(n.jsx)("span",{id:"top"}),Object(n.jsxs)("div",{tabIndex:0,className:"sn-component",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onBlur:this.onBlur,children:[this.state.showHeader&&[Object(n.jsx)("div",{id:Ge.header,className:"header"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed"),children:Object(n.jsxs)("div",{className:"sk-button-group",children:[Object(n.jsx)("button",{type:"button",id:Ge.editButton,onClick:this.onEditMode,title:"Toggle Edit Mode",className:"sk-button "+(this.state.editMode?"on":"off"),children:Object(n.jsx)(C,{condition:this.state.editMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.viewButton,onClick:this.onViewMode,title:"Toggle View Mode",className:"sk-button "+(this.state.viewMode?"on":"off"),children:Object(n.jsx)(O,{condition:this.state.viewMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.appendButton,onClick:function(){return e.onAppendMode()},title:"Toggle Append Mode",className:"sk-button "+(this.state.appendMode?"on":"off"),children:Object(n.jsx)(E,{condition:this.state.appendMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.helpButton,onClick:this.toggleShowHelp,title:"Help",className:"sk-button "+(this.state.showHelp?"on":"off"),children:Object(n.jsx)(M,{condition:this.state.showHelp,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.settingsButton,onClick:this.onSettingsMode,title:"Settings",className:"sk-button "+(this.state.settingsMode?"on":"off"),children:Object(n.jsx)(w,{condition:this.state.settingsMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToBottomButtonHeader",onClick:this.skipToBottom,title:"Scroll to Bottom",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing down for scroll to bottom button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToTopButtonHeader",onClick:this.skipToTop,title:"Scroll to Top",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing up for scroll to top button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M13.826 13.3335L10.001 9.5085L6.17597 13.3335L5.00097 12.1502L10.001 7.15017L15.001 12.1502L13.826 13.3335Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.menuButton,onClick:this.toggleShowMenu,title:"Toggle Menu",className:"sk-button "+(this.state.showMenu?"on":"off"),children:Object(n.jsx)(y,{condition:this.state.showMenu,role:"button"})})]})})],Object(n.jsxs)("div",{id:Ge.content,className:"content"+(void 0!==this.state.editingMode&&this.state.editingMode!==Xe.usePlainText&&this.state.editingMode!==Xe.useCodeMirror||!this.state.editMode||this.state.appendMode||this.state.settingsMode||this.state.viewMode?"":" fixed-header edit-only")+(this.state.borderlessMode?" borderless":"")+(this.state.fixedHeightMode?" fixed-height":"")+(this.state.fullWidthMode?" full-width":"")+(this.state.overflowMode?" overflow":""),children:[this.state.showMenu&&Object(n.jsx)(Re,{children:Object(n.jsx)(Qe,{borderlessMode:this.state.borderlessMode,editingMode:this.state.editingMode,fixedHeightMode:this.state.fixedHeightMode,fullWidthMode:this.state.fullWidthMode,monacoEditorLanguage:this.state.monacoEditorLanguage,onConfirmPrintUrl:this.onConfirmPrintUrl,overflowMode:this.state.overflowMode,refreshEdit:this.refreshEdit,refreshView:this.refreshView,saveText:this.saveText,showMenuOptionsEdit:this.state.showMenuOptionsEdit,showMenuOptionsShare:this.state.showMenuOptionsShare,showMenuOptionsView:this.state.showMenuOptionsView,text:this.state.text,toggleBorderlessMode:this.toggleBorderlessMode,toggleFixedHeightMode:this.toggleFixedHeightMode,toggleFullWidthMode:this.toggleFullWidthMode,toggleOverflowMode:this.toggleOverflowMode,toggleShowMenu:this.toggleShowMenu,toggleShowMenuOptionsEdit:this.toggleShowMenuOptionsEdit,toggleShowMenuOptionsShare:this.toggleShowMenuOptionsShare,toggleShowMenuOptionsView:this.toggleShowMenuOptionsView,viewMode:this.state.viewMode})}),this.state.settingsMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(ze,{cancelText:"Cancel",confirmText:"Save",customStyles:this.state.customStyles,debugMode:ot,defaultSettings:this.state.defaultSettings,editingMode:this.state.editingMode,fontEdit:this.state.fontEdit,fontSize:this.state.fontSize,fontView:this.state.fontView,helpLink:"https://appendeditor.com/#settings",keyMap:nt,onConfirm:this.onSaveSettings,onCancel:this.onSettingsMode,title:"Append Editor Settings",monacoEditorLanguage:this.state.monacoEditorLanguage})}),this.state.editMode&&!this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.editMode&&this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.viewMode&&!this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.viewMode&&this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(Oe,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.confirmPrintUrl&&Object(n.jsxs)(Re,{children:[Object(n.jsx)(L,{title:"Would you like to print URLs?",onUndo:this.onCancelPrint,onConfirm:this.onPrintUrlTrue,onCancel:this.onPrintUrlFalse,helpLink:"https://appendeditor.com/#printing",confirmText:"Yes, print URLs",cancelText:"No, thanks"})," "]}),this.state.showDiff&&[Object(n.jsx)(Re,{children:Object(n.jsx)(V,{text:this.state.text,modifiedText:this.state.appendText,saveText:this.saveText})})]]}),this.state.showAppendix&&[Object(n.jsxs)("div",{id:Ge.appendix,className:"appendix"+(this.state.borderlessMode?" borderless":"")+(this.state.fullWidthMode?" full-width":""),children:[this.state.appendMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(Me,{appendTextToNote:this.appendTextToNote,autoSaveAppendText:this.autoSaveAppendText,autoSaveCheckBoxes:this.autoSaveCheckBoxes,debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,appendNewLine:this.state.appendNewLine,appendNewParagraph:this.state.appendNewParagraph,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownAppendTextArea:this.onKeyDownAppendTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,appendRows:this.state.appendRows,text:this.state.appendText})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToTopButton",onClick:this.scrollToTop,title:"Scroll to Top",type:"button",children:Object(n.jsx)("div",{children:" \u25b2 "})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToBottomButton",onClick:this.scrollToBottom,title:"Scroll to Bottom",type:"button",children:Object(n.jsx)("div",{children:" \u25bc "})})]})]]})]}}]),o}(s.a.Component);o(1172);r.a.render(Object(n.jsx)(s.a.StrictMode,{children:Object(n.jsx)(it,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),c()},454:function(e,t,o){}},[[1173,3,4]]]); +//# sourceMappingURL=main.5674bb15.chunk.js.map \ No newline at end of file diff --git a/build/static/js/main.5674bb15.chunk.js.map b/build/static/js/main.5674bb15.chunk.js.map new file mode 100644 index 00000000..68e29d9f --- /dev/null +++ b/build/static/js/main.5674bb15.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["serviceWorker.ts","reportWebVitals.ts","components/Icons.tsx","components/PrintDialog.tsx","components/Monaco.tsx","components/DynamicEditor.tsx","components/EditNote.tsx","lib/clickButton.ts","components/Help.tsx","components/Intro.tsx","lib/renderMarkdown.ts","components/ViewNote.tsx","components/AppendText.tsx","components/Buttons.tsx","components/Menu.tsx","components/Settings.tsx","components/ErrorBoundary.tsx","components/AppendEditor.tsx","index.tsx"],"names":["Boolean","window","location","hostname","match","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","infoColor","foregroundColor","ChevronIconDown","fill","role","className","aria-label","width","height","viewBox","xmlns","d","ChevronIconRight","CloseIcon","CopyIcon","EyeIcon","condition","GearIcon","HelpIcon","MenuIcon","PencilIcon","PlusIcon","fill-rule","clip-rule","PrintIcon","RefreshIcon","UndoIcon","PrintDialog","cancelText","confirmText","helpLink","onCancel","onConfirm","onUndo","title","id","onClick","href","target","rel","MonacoEditorContainerID","MonacoDiffEditorContainerID","self","MonacoEnvironment","getWorkerUrl","_moduleId","label","MonacoEditor","editor","fontSize","language","saveText","tabSize","text","theme","viewMode","divEl","useRef","scrollBeyondLastLine","useEffect","current","monaco","create","parseInt","replace","value","join","autoClosingOvertype","formatOnPaste","formatOnType","wordWrap","wrappingStrategy","onKeyDown","e","keyCode","console","log","code","ctrlKey","preventDefault","onKeyUp","onDidChangeModelContent","getValue","dispose","ref","MonacoDiffEditor","diffEditor","modifiedText","originalModel","createModel","modifiedModel","createDiffEditor","originalEditable","readOnly","setModel","original","modified","onDidChangeContent","YouTubeEmbed","videoId","this","props","attrs","matches","isSelected","src","React","DynamicEditor","handleToggleReadOnly","setState","state","handleChange","debounce","debugMode","onChange","template","undefined","placeholder","readOnlyWriteCheckboxes","defaultValue","scrollTo","hash","autoFocus","embeds","keywords","icon","alt","matcher","url","component","EditNote","handleInputChange","event","onBlur","content","document","getElementById","HtmlElementId","classList","remove","HtmlClassName","focused","onFocus","add","onKeyDownEditTextArea","onKeyDownTextArea","keyMap","delete","key","editingMode","EditingModes","useMonacoEditor","useDynamicEditor","edit","monacoEditorLanguage","editTextArea","name","rows","spellCheck","Component","defaultProps","clickAppendButton","appendButton","click","clickEditButton","editButton","clickHelpButton","helpButton","clickMenuButton","menuButton","clickSettingsButton","settingsButton","clickViewButton","viewButton","Help","onToggleShowFeelings","showFeelings","onToggleShowMoreQuestions","showMoreQuestions","onToggleShowFeedback","showFeedback","onToggle","Intro","appendMode","editMode","showHelp","gfm","require","breaks","math","rehypeKatex","highlight","emoji","externalLinks","toc","footnotes","slug","raw","processor","unified","use","parse","maxDepth","inlineNotes","remark2rehype","allowDangerousHtml","ignoreMissing","rehype2react","createElement","processMarkdown","processSync","result","isLongString","throttle","length","renderLongMarkdown","ViewNote","onToggleShowHelp","renderMarkdown","bypassDebounce","printURL","view","AppendText","type","checked","autoSaveCheckBoxes","handleTextAreaChange","autoSaveAppendText","appendTextToNote","appendTextArea","focus","newLine","newParagraph","set","get","onKeyDownAppendTextArea","appendNewLine","appendNewParagraph","appendRows","ChevronToggleButton","caption","CopyButton","EyeButton","messageOn","messageOff","PencilButton","PrintButton","UndoButton","editingModeID","fontEditID","fontSizeID","fontViewID","monacoEditorLanguageID","resetAllSettingsID","saveAsDefaultID","startRegExp","RegExp","cssRegExp","endRegExp","codeRegExp","Settings","handleSelectChange","toggleShowCustomStyles","showCustomStyles","cleanCustomStyles","customStyles","handleSubmit","fontEditMessage","fontViewMessage","fontEdit","fontView","saveAsDefault","loadDefaultSettings","defaultSettings","refreshCustomStyles","clearCustomStyles","clearFontEdit","clearFontSize","clearFontView","clearEditingMode","usePlainText","clearMonacoEditorLanguage","clearSaveAsDefault","clearAllSettings","resetAllSettings","clear","componentWillUnmount","useCodeMirror","htmlFor","list","ErrorBoundary","hasError","error","errorInfo","message","children","Menu","clearTooltipTimer","resetMessageTimer","clearTimeout","setTimeout","displayMessageEdit","displayMessageShare","showMessageEdit","showMessageShare","copyToClipboard","textField","body","appendChild","select","execCommand","copyText","copyHtml","renderedNote","firstElementChild","innerHTML","formatText","formattedText","prettier","format","parser","plugins","parserMarkdown","refreshEdit","refreshView","uncheckBoxes","checkedBoxes","test","newText","toggleShowMenu","chevronToggleButton","showMenuOptionsView","toggleShowMenuOptionsView","borderlessMode","on","off","toggleBorderlessMode","fixedHeightMode","toggleFixedHeightMode","fullWidthMode","toggleFullWidthMode","overflowMode","toggleOverflowMode","showMenuOptionsShare","toggleShowMenuOptionsShare","printButton","onConfirmPrintUrl","showMenuOptionsEdit","toggleShowMenuOptionsEdit","initialState","appendText","confirmPrintUrl","showAppendix","showHeader","showDiff","settingsMode","last_known_scroll_position","Map","AppendEditor","editorKit","refreshEditorTimer","saveTimer","componentDidMount","onViewMode","loadDefaultMenuState","addEventListener","onScroll","removeEventListener","configureEditorKit","delegate","EditorKitDelegate","setEditorRawText","cancel","flush","savingEditorOptions","loadEditorOptions","loadMetaData","clearUndoHistory","getElementsBySelector","EditorKit","mode","supportsFilesafe","refreshEditor","activateStyles","defaultSettingsString","internal","componentManager","componentDataValueForKey","defaultEditingMode","defaultSettingsObject","JSON","defaultCustomStyles","defaultFontEdit","defaultFontSize","defaultFontView","defaultMonacoEditorLanguage","menuOptionsString","menuOptionsObject","streamContextItem","note","appendEditorCustomStyles","appendEditorEditingMode","appendEditorFontEdit","appendEditorFontSize","appendEditorFontView","appendEditorMonacoEditorLanguage","onEditMode","saveNote","scrollY","scrollTop","refreshedView","onEditorValueChanged","textToAppend","concat","saveItemWithPresave","skipToBottom","appendCodeMirror","setValue","configureCodeMirror","editCodeMirror","CodeMirror","fromTextArea","autocorrect","autocapitalize","extraKeys","Enter","lineNumbers","lineWrapping","spellcheck","styleSelectedText","tabindex","setSize","editCodeMirrorText","save","cm","appendCodeMirrorText","toTextArea","onAppendMode","scrollDown","closeEdit","scrollToBottom","toggleShowHelp","scrollToTop","showMenu","activateFixedHeader","saveMenuOptions","currentMenuOptions","saveEditorOption","stringify","optionKey","optionValue","setComponentDataValueForKey","onSettingsMode","currentState","removeFixedHeader","undoDialog","onSaveSettings","sheetToBeRemoved","sheetParent","parentNode","removeChild","fontSizeStyle","fontEditStyle","fontViewStyle","sheet","setAttribute","onCancelPrint","onPrintUrlTrue","printRenderedHtml","onPrintUrlFalse","print","goDown","codeMirrorEditMode","getElementsByClassName","appendix","scrollIntoView","behavior","block","inline","goUp","top","skipToTop","header","fixed","fixedHeader","tabIndex","ReactDOM","render","StrictMode","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"0MAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,S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C,GAAaC,iBAAmB,CAC1D,0BAASlJ,UAAU,wBAAnB,UACE,wBAAO2R,QAASpC,GAAhB,oCAC0B,OAE1B,sBAAKvP,UAAU,wBAAf,UACE,gCACE,yBACE8B,GAAIyN,GACJhG,KAAMgG,GACN3L,MAAOmC,KAAKU,MAAM4C,qBAClBxC,SAAUd,KAAKiK,mBAJjB,UAME,0CACA,yCACA,0CACA,2CACA,yCACA,uCACA,8CACA,6CACA,kDACA,yCACA,4CACA,yCACA,yCACA,0CACA,gDACA,4CACA,wCACA,6CACA,gDACA,yCACA,0CACA,yCACA,0CACA,gDACA,0CACA,2CACA,4CACA,0CACA,2CACA,yCACA,8CACA,0CACA,2CACA,2CACA,iDACA,4CACA,+CACA,0CACA,2CACA,yCACA,+CACA,8CACA,gDACA,gDACA,yCACA,4CACA,uCACA,2CACA,2CACA,8CACA,sDACA,0CACA,0CACA,wCACA,2CACA,4CACA,0CACA,2CACA,yCACA,yCACA,wCACA,2CACA,mDACA,yCACA,0CACA,gDACA,wCACA,6CACA,yCACA,+CAGJ,cAAC,GAAD,CACEjO,QAASgE,KAAKqL,0BACdvP,MAAM,oDAKd,0BAAS7B,UAAU,wBAAnB,UACE,uBAAO2R,QAAStC,GAAhB,uCACA,sBAAKrP,UAAU,wBAAf,UACE,yBACE8B,GAAIuN,GACJ9F,KAAM8F,GACNzL,MAAOmC,KAAKU,MAAM7D,SAClBiE,SAAUd,KAAKiK,mBAJjB,UAME,2BACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,0CACA,6CAEF,cAAC,GAAD,CACEjO,QAASgE,KAAKiL,cACdnP,MAAM,kCAIXkE,KAAKU,MAAMuC,cAAgBC,GAAaC,iBAAmB,CAC1D,0BAASlJ,UAAU,wBAAnB,UACE,wBAAO2R,QAASvC,GAAhB,2CACiC,OAEjC,sBAAKpP,UAAU,wBAAf,UACE,uBACE4R,KAA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T,GAAIsG,GAAciV,SAClBrd,UACE,YACC+F,KAAKU,MAAM+N,eAAiB,cAAgB,KAC5CzO,KAAKU,MAAMqO,cAAgB,cAAgB,IALhD,UAQG/O,KAAKU,MAAMyE,YACV,cAAC,GAAD,UACE,cAAC,GAAD,CACE6C,iBAAkBhI,KAAKgI,iBACvBD,mBAAoB/H,KAAK+H,mBACzBF,mBAAoB7H,KAAK6H,mBACzBhH,UAAWA,GACXoC,YAAajD,KAAKU,MAAMuC,YACxBpG,SAAUmD,KAAKU,MAAM7D,SACrBiG,OAAQA,GACR0F,cAAexI,KAAKU,MAAM8H,cAC1BC,mBAAoBzI,KAAKU,MAAM+H,mBAC/BnF,qBAAsBtD,KAAKU,MAAM4C,qBACjClF,UAAW4B,KAAK5B,UAChBmK,wBAAyBvI,KAAKuI,wBAC9B1F,kBAAmB7C,KAAK6C,kBACxBjE,QAASoB,KAAKpB,QACd8J,WAAY1I,KAAKU,MAAMgI,WACvBzL,KAAM+C,KAAKU,MAAMgP,eAIvB,wBACEzV,UAAU,iBACV8B,GAAG,oBACHC,QAASgE,KAAKsV,YACdxZ,MAAM,gBACN6L,KAAK,SALP,SAOE,6CAEF,wBACE1N,UAAU,iBACV8B,GAAG,uBACHC,QAASgE,KAAKoV,eACdtZ,MAAM,mBACN6L,KAAK,SALP,SAOE,yD,GAt+D4BrH,IAAMqD,W,QC9KhDuU,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFjW,SAASC,eAAe,SlB4HpB,kBAAmBiW,WACrBA,UAAUC,cAAcC,MACrBjf,MAAK,SAACkf,GACLA,EAAaC,gBAEdC,OAAM,SAAC1M,GACNzN,QAAQyN,MAAMA,EAAME,YkBvH5B/S,K","file":"static/js/main.5674bb15.chunk.js","sourcesContent":["// 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\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: 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: string, config?: 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: string, config?: 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 { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\n\nconst infoColor = 'var(--sn-stylekit-info-color)';\nconst foregroundColor = 'var(--sn-stylekit-foreground-color)';\n\ninterface Icons {\n condition?: boolean;\n fill?: string;\n role: string;\n}\n\nexport const ChevronIconDown: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const ChevronIconRight: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const CloseIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const CopyIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const EyeIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const GearIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const HelpIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const MenuIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PencilIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PlusIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PrintIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const RefreshIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const UndoIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n","// import { Method } from '@testing-library/react';\nimport React from 'react';\nimport { CloseIcon } from './Icons';\n\ninterface PrintDialogTypes {\n cancelText: string;\n confirmText: string;\n helpLink: string;\n onCancel: () => void;\n onConfirm: () => void;\n onUndo: () => void;\n title: string;\n}\n\nconst PrintDialog: React.FC = ({\n cancelText,\n confirmText,\n helpLink,\n onCancel,\n onConfirm,\n onUndo,\n title,\n}) => (\n
\n
\n
\n
\n
\n

{title}

\n \n
\n

\n Need help deciding? Check out the{' '}\n \n documentation\n \n .\n

\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n);\n\nexport default PrintDialog;\n","/**\n * This component is derived from the \"browser-esm-webpack-typescript-react\" found\n * at https://github.com/microsoft/monaco-editor-samples,\n * which is released under MIT, Copyright (c) 2016 Microsoft Corporation.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\nimport React, { useRef, useEffect } from 'react';\nimport * as monaco from 'monaco-editor';\n\nconst debugMode = false;\nconst MonacoEditorContainerID = 'MonacoEditorContainer';\nconst MonacoDiffEditorContainerID = 'MonacoDiffEditorContainer';\n\n/*eslint no-restricted-globals: [\"error\", \"event\", \"monaco\"]*/\n// @ts-ignore\nself.MonacoEnvironment = {\n getWorkerUrl: function (_moduleId: any, label: string) {\n if (label === 'json') {\n return './json.worker.bundle.js';\n }\n if (label === 'css') {\n return './css.worker.bundle.js';\n }\n if (label === 'html') {\n return './html.worker.bundle.js';\n }\n if (label === 'typescript' || label === 'javascript') {\n return './ts.worker.bundle.js';\n }\n return './editor.worker.bundle.js';\n },\n};\n\nconst onKeyDown = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\nconst onKeyUp = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\ninterface MonacoEditorTypes {\n fontSize?: string;\n id?: string;\n language?: string;\n onKeyDown?: Function;\n onKeyUp?: Function;\n saveText?: Function;\n tabSize?: number;\n text: string;\n theme?: string;\n viewMode?: boolean;\n}\n\nexport const MonacoEditor: React.FC = ({\n fontSize = '16',\n id = MonacoEditorContainerID,\n language = 'markdown',\n saveText,\n tabSize = 2,\n text,\n theme = 'vs-dark',\n viewMode = false,\n}) => {\n const divEl = useRef(null);\n let editor: monaco.editor.IStandaloneCodeEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n let scrollBeyondLastLine = true;\n if (viewMode) {\n scrollBeyondLastLine = false;\n }\n\n useEffect(() => {\n if (divEl.current) {\n editor = monaco.editor.create(divEl.current, {\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n language: language,\n tabSize: tabSize,\n theme: theme,\n scrollBeyondLastLine: scrollBeyondLastLine,\n value: [text].join('\\n'),\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n });\n\n // Keyboard Events\n editor.onKeyDown((e: monaco.IKeyboardEvent) => {\n onKeyDown(e.code, debugMode);\n if (e.ctrlKey && e.code === 'KeyS') {\n e.preventDefault();\n }\n });\n editor.onKeyUp((e: monaco.IKeyboardEvent) => {\n onKeyUp(e.code, debugMode);\n });\n\n // Content Change Events\n editor.onDidChangeModelContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(editor.getValue());\n }\n }\n );\n }\n return () => {\n editor.dispose();\n };\n }, []);\n return
;\n};\n\ninterface MonacoDiffEditorTypes extends MonacoEditorTypes {\n modifiedText: string;\n}\n\nexport const MonacoDiffEditor: React.FC = ({\n fontSize = '16',\n id = MonacoDiffEditorContainerID,\n language = 'markdown',\n saveText,\n text,\n modifiedText,\n theme = 'vs-dark',\n}) => {\n const divEl = useRef(null);\n let diffEditor: monaco.editor.IStandaloneDiffEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n useEffect(() => {\n if (divEl.current) {\n const originalModel = monaco.editor.createModel(\n [text].join('\\n'),\n language\n );\n const modifiedModel = monaco.editor.createModel(\n [modifiedText].join('\\n'),\n language\n );\n\n diffEditor = monaco.editor.createDiffEditor(divEl.current, {\n // Same settings as above\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n theme: theme,\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n\n // Specific to Diff Editor\n originalEditable: true, // for left panel\n readOnly: true, // for right panel\n });\n diffEditor.setModel({\n original: originalModel,\n modified: modifiedModel,\n });\n\n // Content Change Events\n originalModel.onDidChangeContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(originalModel.getValue());\n }\n }\n );\n }\n return () => {\n diffEditor.dispose();\n };\n }, []);\n return (\n
\n );\n};\n","/**\n * This component is derived from the example found at\n * https://github.com/outline/rich-markdown-editor/blob/develop/example/src/index.js,\n * which is released under BSD-3 License, Copyright (c) 2020 General Outline,\n * Inc (https://www.getoutline.com/) and individual contributors.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\n\nimport * as React from 'react';\nimport debounce from 'lodash/debounce';\nimport RichMarkdownEditor from 'rich-markdown-editor';\n\nclass YouTubeEmbed extends React.Component {\n render() {\n const { attrs } = this.props;\n const videoId = attrs.matches[1];\n\n return (\n \n );\n }\n}\n\ninterface DynamicProps {\n debugMode: boolean;\n onChange: (text: string) => void;\n readOnly: boolean;\n text: string;\n}\n\ninterface DynamicState {\n readOnly: boolean;\n template: boolean;\n value: undefined;\n}\n\nexport default class DynamicEditor extends React.Component<\n DynamicProps,\n DynamicState\n> {\n constructor(props: DynamicProps) {\n super(props);\n this.state = {\n readOnly: this.props.readOnly,\n template: false,\n value: undefined,\n };\n }\n\n handleToggleReadOnly = () => {\n this.setState({ readOnly: !this.state.readOnly });\n };\n\n handleChange = debounce((value) => {\n const text = value();\n if (this.props.debugMode) {\n console.log(text);\n }\n this.props.onChange(text);\n }, 50);\n\n render() {\n return (\n {\n if (this.props.debugMode) {\n console.log('Cancel triggered');\n }\n }}\n autoFocus\n onChange={(value) => this.handleChange(value)}\n embeds={[\n {\n title: 'YouTube',\n keywords: 'youtube video tube google',\n icon: () => (\n \n ),\n //@ts-ignore\n matcher: (url) => {\n return url.match(\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([a-zA-Z0-9_-]{11})$/i\n );\n },\n component: YouTubeEmbed,\n },\n ]}\n />\n );\n }\n}\n","import React from 'react';\nimport { EditingModes, HtmlClassName } from './AppendEditor';\nimport { MonacoEditor } from './Monaco';\nimport DynamicEditor from './DynamicEditor';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface EditProps {\n debugMode: boolean;\n editingMode?: string;\n fontSize: string;\n keyMap: any;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownEditTextArea: Function;\n onKeyDownTextArea: Function;\n saveText: Function;\n text: string;\n viewMode: boolean | undefined;\n}\n\ninterface EditState {\n text: string;\n}\n\nexport default class EditNote extends React.Component {\n static defaultProps = {\n // none\n };\n\n constructor(props: EditProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n\n this.setState(\n {\n text: value,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n onBlur = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n };\n\n onFocus = (e: React.FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.onKeyDown(e);\n this.props.onKeyDownEditTextArea(e);\n this.props.onKeyDownTextArea(e);\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n return (\n \n \n {this.props.editingMode === EditingModes.useMonacoEditor ? (\n \n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n \n );\n }\n}\n","import { HtmlElementId } from '../components/AppendEditor';\n\nexport const clickAppendButton = () => {\n const appendButton = document.getElementById(HtmlElementId.appendButton);\n if (appendButton) {\n appendButton.click();\n }\n};\n\nexport const clickEditButton = () => {\n const editButton = document.getElementById(HtmlElementId.editButton);\n if (editButton) {\n editButton.click();\n }\n};\n\nexport const clickHelpButton = () => {\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.click();\n }\n};\n\nexport const clickMenuButton = () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.click();\n }\n};\n\nexport const clickSettingsButton = () => {\n const settingsButton = document.getElementById(HtmlElementId.settingsButton);\n if (settingsButton) {\n settingsButton.click();\n }\n};\n\nexport const clickViewButton = () => {\n const viewButton = document.getElementById(HtmlElementId.viewButton);\n if (viewButton) {\n viewButton.click();\n }\n};\n","import React from 'react';\nimport { GearIcon, HelpIcon, MenuIcon } from './Icons';\nimport {\n clickHelpButton,\n clickMenuButton,\n clickSettingsButton,\n} from '../lib/clickButton';\n\ninterface HelpProps {\n debugMode: boolean;\n printURL: boolean;\n}\n\ninterface HelpState {\n showFeelings: boolean;\n showMoreQuestions: boolean;\n showFeedback: boolean;\n}\n\nexport default class Help extends React.Component {\n constructor(props: HelpProps) {\n super(props);\n\n this.state = {\n showFeelings: false,\n showMoreQuestions: false,\n showFeedback: false,\n };\n }\n\n onToggleShowFeelings = () => {\n this.setState({\n showFeelings: !this.state.showFeelings,\n });\n };\n\n onToggleShowMoreQuestions = () => {\n this.setState({\n showMoreQuestions: !this.state.showMoreQuestions,\n });\n };\n\n onToggleShowFeedback = () => {\n this.setState({\n showFeedback: !this.state.showFeedback,\n });\n };\n\n render() {\n return (\n
\n
\n

Append Editor Help

\n

\n The Append Editor is an unofficial{' '}\n \n editor\n {' '}\n for{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app. The Append Editor is also free software licensed under{' '}\n \n AGPL-3.0\n \n . Its source code is available on{' '}\n \n GitHub\n \n .\n

\n

Append Editor Features

\n

\n The Append Editor supports{' '}\n \n Markdown\n {' '}\n with{' '}\n \n KaTeX\n \n , syntax highlighting, in-line HTML, table of contents, footnotes,\n auto-linking,{' '}\n \n emoji codes\n \n , and more.{' '}\n

\n

\n There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and\n Monaco. You can read about each mode and choose which to use in the\n Settings\n \n  \n \n  \n \n . You can also choose default and per-note font sizes, font families,\n and custom styles (CSS).\n

\n

\n The Menu\n \n  \n \n  \n \n has additional options to customize the appearance of the editor,\n share your note, and perform actions to quickly format and edit\n Markdown text.\n

\n

\n A more detailed documentation of the Append Editor is available at{' '}\n \n appendeditor.com\n \n . If you like the Append Editor, please support it by giving it a star\n on{' '}\n \n GitHub\n \n .{' '}\n \n 🙂\n {' '}\n

\n

How to install the Append Editor in Standard Notes

\n
    \n
  1. \n Download, install, and sign in to the Standard Notes{' '}\n \n Desktop\n {' '}\n app.\n
  2. \n
  3. \n In the bottom left corner of the app, click Extensions.\n
  4. \n
  5. \n Click Import Extensions and paste the following link into the\n input box. If you want to use the alpha version, replace{' '}\n beta with alpha:{' '}\n \n \n https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json\n \n \n
  6. \n
  7. \n Press Enter or Return on your keyboard.\n
  8. \n
  9. \n The title of your selected note is near the top of the app. Under\n the title, click Editor, click Append Editor, and\n click Continue to begin using the editor. Enjoy!{' '}\n \n 👏\n {' '}\n
  10. \n
\n

\n After you install the editor on the desktop app, it will automatically\n sync to the{' '}\n \n web\n {' '}\n and{' '}\n \n mobile apps\n {' '}\n after you sign in.\n

\n

What to write about

\n

\n The Append Editor is great for writing articles, blog posts,\n checklists, code snippets, documentation, emails, essays, journals,\n lists, logs, notes, tables, todo lists, and much more. Here are some\n questions to help you get started with today's daily journal:\n

{' '}\n
    \n
  • How are you? What's happening?
  • \n
  • What might be affecting your mood?
  • \n
  • Which feelings fit your mood and to what extent?
  • \n
    \n \n {!this.state.showFeelings && [\n

    Show feelings

    ,\n ]}\n {this.state.showFeelings && [\n

    Hide feelings

    ,\n ]}\n
    \n
  • \n Positive Feelings: bold, calm, cheerful, confident,\n content, eager, ecstatic, energized, engaged, enthusiastic,\n excited, grateful, happy, humorous, inspired, joyful, light,\n lively, loving, motivated, optimistic, passionate, peaceful,\n playful, proud, reassured, refreshed, relaxed, relieved,\n satisfied, secure, surprised, thrilled, wonderful\n
  • \n
  • \n Negative Feelings: afraid, angry, annoyed, anxious,\n ashamed, bored, burnt out, confused, demoralized, depressed,\n disappointed, disgusted, distraught, embarrassed, empty,\n exhausted, frustrated, furious, guilty, heavy, insecure,\n irritated, jealous, jittery, lethargic, lonely, nervous, numb,\n resentful, sad, self-conscious, sleepy, stressed, tired, winded,\n worried\n
  • \n
    \n
  • What thoughts are contributing to the way you're feeling?
  • \n
    \n \n {!this.state.showMoreQuestions && [\n

    Show more questions

    ,\n ]}\n {this.state.showMoreQuestions && [\n

    Show fewer questions

    ,\n ]}\n
    \n
    \n {this.state.showMoreQuestions && [\n
    \n
  • \n What do you hope your life will look like in a week? a month? a\n year?\n
  • \n
  • \n What can you do today to make your life the way you want it?\n
  • \n
  • \n How will you feel when you've realized the goals that you have\n for yourself?\n
  • \n
  • Who or what do you feel grateful for and why?
  • \n
  • What did you enjoy about today?
  • \n
    ,\n ]}\n
\n
\n \n

Need more help?

\n
\n {this.state.showFeedback && [\n

\n Feel free to{' '}\n \n reach out\n {' '}\n if you have any questions, comments, concerns, or feedback.{' '}\n \n 👋\n \n
\n If you find any bugs or have a feature request, please{' '}\n \n open an issue on GitHub\n \n .{' '}\n \n 🙂\n \n
\n You are using version 1.2.0. The release notes and\n change log are available on{' '}\n \n GitHub\n \n .\n

,\n ]}\n
\n Click Help\n \n  \n \n  \n \n to close this section.\n
\n
\n );\n }\n}\n","import React from 'react';\nimport { EyeIcon, HelpIcon, PencilIcon, PlusIcon } from './Icons';\nimport {\n clickAppendButton,\n clickEditButton,\n clickHelpButton,\n clickViewButton,\n} from '../lib/clickButton';\n\ninterface IntroProps {\n appendMode: boolean;\n editMode: boolean;\n showHelp: boolean;\n}\n\nconst Intro: React.FC = ({ appendMode, editMode, showHelp }) => (\n
\n
\n \n Welcome to the Append Editor!{' '}\n \n 👋\n {' '}\n Your note is empty.{' '}\n \n 🙂\n {' '}\n Click here to get started.{' '}\n \n 📝\n \n \n

To get started:

\n
    \n
  • \n

    \n Click the Pencil\n \n  \n \n  \n \n to toggle Edit Mode\n

    \n
  • \n
  • \n

    \n Click the Plus\n \n  \n \n  \n \n to toggle Append Mode\n

    \n
  • \n
\n

\n View Mode is currently on. When you type in{' '}\n Edit Mode, your note will automatically render here. In{' '}\n Append Mode, clicking Append will add the text in the\n textarea to the end of your note. Click the Eye\n \n  \n \n  \n \n to turn View Mode off and switch to Edit Only Mode.\n

\n

\n If you are using the demo at{' '}\n \n beta.appendeditor.com\n \n , then your notes will be lost after you close the page.\n

\n

\n If you want to save your notes, then click Help\n \n  \n \n  \n \n and follow the instructions on how to install the Append Editor in{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app.\n

\n

\n If you like Standard Notes, please check out Standard Notes{' '}\n \n Extended\n {' '}\n for more editors, themes, components, and methods to backup up your\n data.\n

\n

\n Happy note-taking!{' '}\n \n 😄\n \n

\n
\n
\n);\n\nexport default Intro;\n","import React, { ReactNode } from 'react';\nimport unified from 'unified';\nimport parse from 'remark-parse';\nimport remark2rehype from 'remark-rehype';\nimport rehype2react from 'rehype-react';\nimport { debounce, throttle } from 'lodash';\n\nconst gfm = require('remark-gfm');\nconst breaks = require('remark-breaks');\nconst math = require('remark-math');\nconst rehypeKatex = require('rehype-katex');\nconst highlight = require('rehype-highlight');\nconst emoji = require('remark-emoji');\nconst externalLinks = require('remark-external-links');\nconst toc = require('remark-toc');\nconst footnotes = require('remark-footnotes');\nconst slug = require('remark-slug');\nconst raw = require('rehype-raw');\n\nconst processor = unified()\n .use(parse)\n .use(gfm)\n .use(breaks)\n .use(slug)\n .use(toc, { maxDepth: 6 })\n .use(externalLinks)\n .use(footnotes, { inlineNotes: true })\n .use(remark2rehype, { allowDangerousHtml: true })\n .use(raw)\n .use(math)\n .use(rehypeKatex)\n .use(highlight, { ignoreMissing: true })\n .use(emoji)\n .use(rehype2react, { createElement: React.createElement });\n\nexport const processMarkdown = (text: string) => {\n const markdown = processor.processSync(text).result as ReactNode;\n return markdown;\n};\n\n/** Throttle instead of debounce because\n * we want it to work even when typing\n * lots of characters in a short amount of time. */\nexport const isLongString = throttle((text: string) => {\n //console.log('length', text.length);\n if (text.length > 10000) {\n return true;\n } else {\n return false;\n }\n}, 1000);\n\n/** Debounce the rendering of long notes to prevent lagging.\n * There is no max on the debounce to prevent lagging\n * even for very, very long notes */\nexport const renderLongMarkdown = debounce((text: string) => {\n //console.log('renderLongMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n}, 500);\n\nexport const renderMarkdown = (text: string, bypassDebounce: boolean) => {\n if (bypassDebounce) {\n //console.log('renderBypassDebounceText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n let textIsLong = false as boolean | undefined;\n textIsLong = isLongString(text);\n //console.log('textIsLong', textIsLong);\n if (textIsLong) {\n return renderLongMarkdown(text);\n } else {\n //console.log('renderShortMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n};\n","import React from 'react';\nimport { EditingModes, HtmlElementId } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport Help from './Help';\nimport Intro from './Intro';\nimport { renderMarkdown } from '../lib/renderMarkdown';\n\ninterface ViewProps {\n appendMode: boolean;\n bypassDebounce: boolean;\n debugMode: boolean;\n editMode: boolean;\n editingMode?: string;\n monacoEditorLanguage: string;\n printURL: boolean;\n saveText: (text: string) => void;\n showHelp: boolean;\n text: string;\n}\n\ninterface ViewState {\n showHelp: boolean;\n}\n\nexport default class ViewNote extends React.Component {\n constructor(props: ViewProps) {\n super(props);\n\n this.state = {\n showHelp: this.props.showHelp,\n };\n }\n\n onToggleShowHelp = () => {\n const helpButton = document.getElementById('helpButton');\n if (helpButton) {\n helpButton.click();\n }\n };\n\n renderMarkdown = (text: string) => {\n const markdown = renderMarkdown(text, this.props.bypassDebounce);\n return markdown;\n };\n\n render() {\n const { text } = this.props;\n return (\n \n
\n {!text && [\n ,\n ]}\n {this.state.showHelp && [\n ,\n ]}\n \n {this.props.editingMode === EditingModes.useMonacoEditor &&\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.monacoEditorLanguage !== 'html' &&\n text ? (\n this.renderMarkdown(\n '```' + this.props.monacoEditorLanguage + '\\n' + text + '\\n```'\n )\n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n \n ) : (\n this.renderMarkdown(text)\n )}\n
\n \n \n );\n }\n}\n","import React from 'react';\nimport { EditingModes } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport { MonacoEditor } from './Monaco';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface AppendProps {\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendRows: number;\n appendTextToNote: Function;\n editingMode?: string;\n fontSize: string;\n keyMap: Map;\n debugMode: boolean;\n autoSaveAppendText: Function;\n autoSaveCheckBoxes: Function;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownAppendTextArea: Function;\n onKeyDownTextArea: Function;\n text: string;\n}\n\ninterface AppendState {\n text: string;\n newLine: boolean;\n newParagraph: boolean;\n [x: string]: string | boolean;\n}\n\nexport default class AppendText extends React.Component<\n AppendProps,\n AppendState\n> {\n static defaultProps = {\n // none\n };\n\n constructor(props: AppendProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n newLine: this.props.appendNewLine,\n newParagraph: this.props.appendNewParagraph,\n useMonacoEditor: this.props.editingMode === EditingModes.useMonacoEditor,\n useDynamicEditor:\n this.props.editingMode === EditingModes.useDynamicEditor,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n // This callback saves the checkboxes\n this.autoSaveCheckBoxes();\n }\n );\n };\n\n // This is an almost duplicate of the above editor. Here we don't save the checkboxes to improve performance\n handleTextAreaChange = (event: any) => {\n const target = event.target;\n const value = target.value;\n this.setState(\n {\n text: value,\n },\n () => {\n // This callback saves the append text\n this.autoSaveAppendText();\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.autoSaveAppendText(this.state.text);\n }\n );\n };\n\n appendTextToNote = () => {\n this.props.appendTextToNote();\n this.setState({\n text: '',\n });\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n }\n // Refresh Monaco Editor after appending text to note\n if (this.state.useMonacoEditor) {\n this.setState(\n {\n useMonacoEditor: false,\n },\n () => {\n this.setState({\n useMonacoEditor: true,\n });\n }\n );\n }\n // Refresh Dynamic Editor after appending text to note\n if (this.state.useDynamicEditor) {\n this.setState(\n {\n useDynamicEditor: false,\n },\n () => {\n this.setState({\n useDynamicEditor: true,\n });\n }\n );\n }\n };\n\n autoSaveAppendText = () => {\n const text = this.state.text;\n this.props.autoSaveAppendText(text);\n };\n\n autoSaveCheckBoxes = () => {\n const newLine = this.state.newLine;\n const newParagraph = this.state.newParagraph;\n this.props.autoSaveCheckBoxes(newLine, newParagraph);\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n if (this.props.debugMode) {\n console.log(\n 'Keys pressed: ' +\n e.key +\n 'KeyMap for key: ' +\n this.props.keyMap.get(e.key)\n );\n console.log('Append Text Value: ' + this.state.text);\n }\n\n this.props.onKeyDown(e);\n this.props.onKeyDownAppendTextArea(e);\n this.props.onKeyDownTextArea(e);\n // Append Text if Ctrl and 'Enter' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('Enter')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n // Append Text if Ctrl and 's' are pressed\n else if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n\n return (\n \n \n {this.state.useMonacoEditor ? (\n // We use this.state instead of this.props so we can easily refresh it on Append\n \n ) : this.state.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n
\n
\n \n
\n \n
\n
\n \n
Append
\n \n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport {\n ChevronIconDown,\n ChevronIconRight,\n CopyIcon,\n EyeIcon,\n PencilIcon,\n PrintIcon,\n UndoIcon,\n} from './Icons';\n\ninterface ActionButtonTypes {\n caption?: string;\n className?: string;\n fill?: string;\n id?: string;\n title: string;\n onClick: () => void;\n}\n\ninterface ConditionalButtonTypes extends ActionButtonTypes {\n condition?: boolean | undefined;\n messageOn?: string;\n messageOff?: string;\n}\n\nexport const ChevronToggleButton: React.FC = ({\n caption,\n className,\n condition,\n onClick,\n title,\n}) => (\n \n);\n\nexport const CopyButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const EyeButton: React.FC = ({\n caption,\n className,\n condition,\n messageOn,\n messageOff,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PencilButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PrintButton: React.FC = ({\n caption,\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n\nexport const UndoButton: React.FC = ({\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n","import React from 'react';\nimport prettier from 'prettier';\nimport parserMarkdown from 'prettier/parser-markdown';\nimport { EditingModes } from './AppendEditor';\nimport {\n ChevronToggleButton,\n CopyButton,\n EyeButton,\n PencilButton,\n PrintButton,\n} from './Buttons';\n\n// Import types\nimport { HtmlElementId } from './AppendEditor';\n\nenum HtmlClassName {\n chevronToggleButton = 'menu-button chevron-toggle-button',\n menuButton = 'menu-button',\n on = ' on',\n off = ' off',\n}\n\ninterface MenuProps {\n borderlessMode?: boolean;\n editingMode?: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n monacoEditorLanguage: string;\n onConfirmPrintUrl: () => void;\n overflowMode?: boolean;\n refreshEdit: () => void;\n refreshView: () => void;\n saveText: (text: string) => void;\n showMenuOptionsEdit?: boolean;\n //showMenuOptionsMonacoEditor?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n text: string;\n toggleBorderlessMode: () => void;\n toggleFixedHeightMode: () => void;\n toggleFullWidthMode: () => void;\n toggleOverflowMode: () => void;\n toggleShowMenu: () => void;\n toggleShowMenuOptionsEdit: () => void;\n //toggleShowMenuOptionsMonacoEditor?: () => void;\n toggleShowMenuOptionsView: () => void;\n toggleShowMenuOptionsShare: () => void;\n viewMode?: boolean;\n}\n\ninterface MenuState {\n message?: string;\n displayMessageShare: boolean;\n displayMessageEdit: boolean;\n}\n\nexport default class Menu extends React.Component {\n clearTooltipTimer: NodeJS.Timeout | undefined;\n constructor(props: MenuProps) {\n super(props);\n this.state = {\n message: '',\n displayMessageEdit: false,\n displayMessageShare: false,\n };\n }\n\n resetMessageTimer = () => {\n if (this.clearTooltipTimer) {\n clearTimeout(this.clearTooltipTimer);\n }\n this.clearTooltipTimer = setTimeout(() => {\n this.setState({\n displayMessageEdit: false,\n displayMessageShare: false,\n });\n }, 5000);\n };\n\n showMessageEdit = () => {\n this.setState(\n {\n displayMessageEdit: true,\n displayMessageShare: false,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n showMessageShare = () => {\n this.setState(\n {\n displayMessageEdit: false,\n displayMessageShare: true,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n\n copyToClipboard = (text: string) => {\n const textField = document.createElement('textarea');\n textField.value = text;\n document.body.appendChild(textField);\n textField.select();\n document.execCommand('copy');\n this.showMessageShare();\n textField.remove();\n };\n\n copyText = () => {\n if (this.props.text) {\n this.setState({ message: 'Copied Text to clipboard' }, () => {\n this.copyToClipboard(this.props.text);\n });\n } else {\n this.setState({ message: 'No text to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n }\n };\n\n copyHtml = () => {\n if (!this.props.viewMode) {\n this.setState(\n { message: 'Unable to copy HTML. Please turn View Mode on' },\n () => this.showMessageShare()\n );\n } else if (!this.props.text) {\n this.setState({ message: 'No HTML to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n } else {\n const renderedNote = document.getElementById('renderedNote');\n if (renderedNote?.firstElementChild?.innerHTML) {\n this.setState({ message: 'Copied HTML to clipboard' });\n this.copyToClipboard(renderedNote?.firstElementChild.innerHTML);\n }\n }\n };\n\n formatText = () => {\n if (\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.editingMode === EditingModes.useMonacoEditor\n ) {\n this.setState(\n {\n message:\n 'Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown',\n },\n () => {\n this.showMessageEdit();\n }\n );\n } else if (this.props.text) {\n this.setState(\n { message: 'Formatted Markdown text with Prettier' },\n () => {\n try {\n const formattedText = prettier.format(this.props.text, {\n parser: 'markdown',\n plugins: [parserMarkdown],\n });\n this.props.saveText(formattedText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.showMessageEdit();\n } catch (e) {\n this.setState({ message: 'Error formatting text: ' + e }, () => {\n this.showMessageEdit();\n });\n console.log('Error formatting text: ' + e);\n }\n }\n );\n } else {\n this.setState(\n { message: 'No text to format. Your note is empty' },\n () => {\n this.showMessageEdit();\n }\n );\n }\n };\n\n uncheckBoxes = () => {\n const { text } = this.props;\n const checkedBoxes = new RegExp(/- \\[x\\]/gm);\n if (checkedBoxes.test(text)) {\n const newText = text.replace(checkedBoxes, '- [ ]');\n this.props.saveText(newText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.setState({ message: 'Unchecked all checkboxes' }, () => {\n this.showMessageEdit();\n });\n } else {\n this.setState({ message: 'No checked checkboxes found' }, () => {\n this.showMessageEdit();\n });\n }\n };\n\n render() {\n // You can render any custom fallback UI\n return [\n
,\n
\n \n {this.props.showMenuOptionsView && [\n ,\n ,\n ,\n ,\n ]}\n \n {this.props.showMenuOptionsShare && [\n ,\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n \n {this.props.showMenuOptionsEdit && [\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n
\n ,\n ];\n }\n}\n","import React from 'react';\nimport { MonacoEditor } from './Monaco';\nimport {\n DefaultSettings,\n EditingModes,\n SaveSettingsInterface,\n} from './AppendEditor';\nimport { CloseIcon, RefreshIcon } from './Icons';\nimport { ChevronToggleButton, UndoButton } from './Buttons';\n\nconst customStylesID = 'customStyles';\nconst editingModeID = 'editingMode';\nconst fontEditID = 'fontEdit';\nconst fontSizeID = 'fontSize';\nconst fontViewID = 'fontView';\nconst monacoEditorLanguageID = 'monacoEditorLanguage';\nconst resetAllSettingsID = 'resetAllSettings';\nconst saveAsDefaultID = 'saveAsDefault';\n\ninterface SettingsProps {\n defaultSettings: DefaultSettings;\n customStyles: string;\n editingMode?: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n cancelText: string;\n confirmText: string;\n debugMode: boolean;\n keyMap: Map;\n onCancel: () => void;\n onConfirm: (object: SaveSettingsInterface) => void;\n title: string;\n helpLink: string;\n}\n\ninterface SettingsState {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n saveAsDefault: boolean;\n showCustomStyles: boolean;\n [x: string]: string | boolean;\n}\n\nconst startRegExp = new RegExp(/```css\\n/gm);\nconst cssRegExp = new RegExp(/```css/gm);\nconst endRegExp = new RegExp(/\\n```/gm);\nconst codeRegExp = new RegExp(/```/gm);\n\nexport default class Settings extends React.Component<\n SettingsProps,\n SettingsState\n> {\n constructor(props: SettingsProps) {\n super(props);\n let monacoEditorLanguage = 'markdown';\n if (this.props.monacoEditorLanguage) {\n monacoEditorLanguage = this.props.monacoEditorLanguage;\n }\n let editingMode = 'usePlainText';\n if (this.props.editingMode) {\n editingMode = this.props.editingMode;\n }\n this.state = {\n customStyles: this.props.customStyles,\n editingMode,\n fontEdit: this.props.fontEdit,\n fontSize: this.props.fontSize,\n fontView: this.props.fontView,\n monacoEditorLanguage,\n saveAsDefault: false,\n showCustomStyles: false, // false by default for a mobile-first experience\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState({\n [name]: value,\n });\n if (this.props.debugMode) {\n console.log(\n 'Settings event name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n };\n\n handleSelectChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n if (this.props.debugMode) {\n console.log(\n 'Saved select. Name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n }\n );\n };\n\n toggleShowCustomStyles = () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n };\n\n cleanCustomStyles = (text: string) => {\n if (text) {\n return text\n .replace(startRegExp, '')\n .replace(cssRegExp, '')\n .replace(endRegExp, '')\n .replace(codeRegExp, '');\n } else {\n return text;\n }\n };\n\n saveText = (text: string) => {\n this.setState({\n customStyles: text,\n });\n };\n\n handleSubmit = () => {\n if (this.props.debugMode) {\n let fontEditMessage = '';\n let fontViewMessage = '';\n if (this.state.fontEdit === '' || this.state.fontEdit === undefined) {\n fontEditMessage = 'Default';\n } else if (this.state.fontEdit) {\n fontEditMessage = this.state.fontEdit;\n }\n if (this.state.fontView === '' || this.state.fontView === undefined) {\n fontViewMessage = 'Default';\n } else if (this.state.fontView) {\n fontViewMessage = this.state.fontView;\n }\n console.log(\n 'Settings.tsx handleSubmit() triggered: ' +\n '\\n - Settings editingMode: ' +\n this.state.editingMode +\n '\\n - Settings fontEdit: ' +\n this.state.fontEdit +\n '\\n - Settings fontView: ' +\n this.state.fontView +\n '\\n - Your chosen font for Edit/Append is: ' +\n fontEditMessage +\n '\\n - Your chosen font for View/Print is: ' +\n fontViewMessage +\n '\\n'\n );\n }\n this.setState(\n {\n // clean the custom styles prior to saving them\n customStyles: this.cleanCustomStyles(this.state.customStyles),\n },\n () => {\n if (this.props.debugMode) {\n console.log('Your custom styles: ' + this.state.customStyles);\n }\n const {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n } = this.state;\n this.props.onConfirm({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n });\n }\n );\n };\n\n loadDefaultSettings = () => {\n const defaultSettings = this.props.defaultSettings;\n this.setState(\n {\n ...defaultSettings,\n },\n () => {\n this.refreshCustomStyles();\n }\n );\n };\n\n refreshCustomStyles = () => {\n this.setState(\n {\n showCustomStyles: !this.state.showCustomStyles,\n },\n () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n }\n );\n };\n\n clearCustomStyles = () => {\n this.setState(\n {\n customStyles: '',\n },\n () => {\n this.refreshCustomStyles();\n if (this.props.debugMode) {\n console.log('customStyles reset: ' + this.state.customStyles);\n }\n }\n );\n const customStyles = document.getElementById(\n customStylesID\n ) as HTMLTextAreaElement;\n if (customStyles) {\n customStyles.value = '';\n customStyles.focus();\n }\n };\n\n clearFontEdit = () => {\n this.setState({\n fontEdit: '',\n });\n const fontEdit = document.getElementById(fontEditID) as HTMLTextAreaElement;\n if (fontEdit) {\n fontEdit.value = '';\n fontEdit.focus();\n }\n };\n\n clearFontSize = () => {\n this.setState({\n fontSize: '',\n });\n const fontSize = document.getElementById(fontSizeID) as HTMLSelectElement;\n if (fontSize) {\n fontSize.value = '';\n fontSize.focus();\n }\n };\n\n clearFontView = () => {\n this.setState({\n fontView: '',\n });\n const fontView = document.getElementById(fontViewID) as HTMLTextAreaElement;\n if (fontView) {\n fontView.value = '';\n fontView.focus();\n }\n };\n\n clearEditingMode = () => {\n this.setState({\n editingMode: EditingModes.usePlainText,\n });\n };\n\n clearMonacoEditorLanguage = () => {\n this.setState({\n monacoEditorLanguage: 'markdown',\n });\n const monacoEditorLanguage = document.getElementById(\n monacoEditorLanguageID\n ) as HTMLSelectElement;\n if (monacoEditorLanguage) {\n monacoEditorLanguage.value = 'markdown';\n monacoEditorLanguage.focus();\n }\n };\n\n clearSaveAsDefault = () => {\n this.setState({\n saveAsDefault: false,\n });\n const saveAsDefault = document.getElementById(\n saveAsDefaultID\n ) as HTMLInputElement;\n saveAsDefault.checked = false;\n saveAsDefault.focus();\n };\n\n clearAllSettings = () => {\n // We clear from bottom settings to top settings so the focus afterwards is on top\n this.clearSaveAsDefault();\n this.clearCustomStyles();\n this.clearFontView();\n this.clearFontEdit();\n this.clearFontSize();\n this.clearMonacoEditorLanguage();\n this.clearEditingMode();\n const resetAllSettings = document.getElementById(resetAllSettingsID);\n if (resetAllSettings) {\n resetAllSettings.focus();\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n //console.log(\"Keys pressed: \" + e.key + \"KeyMap for key: \" + keyMap.get(e.key)) + \"KeyMap for Shift: \" + keyMap.get('Shift');\n // Save settings if Control and 's' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.handleSubmit();\n }\n // Save settings if Control and Enter are pressed\n else if (\n this.props.keyMap.get('Control') &&\n this.props.keyMap.get('Enter')\n ) {\n e.preventDefault();\n this.handleSubmit();\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, false);\n };\n\n onBlur = (e: React.FocusEvent) => {\n this.props.keyMap.clear();\n };\n\n componentWillUnmount = () => {\n this.props.keyMap.clear();\n };\n\n render() {\n //

\n const { title, onCancel, confirmText, cancelText, helpLink } = this.props;\n return (\n
\n
\n
\n \n \n \n
\n

{title}

\n \n
\n
\n
\n

\n Need help? Check out the{' '}\n \n documentation\n \n . To clear all settings, click undo: \n

\n \n
\n
\n
\n
\n

To load your personal default settings, click: 

\n \n \n \n
\n
\n
\n
\n

Editing Mode:

\n \n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n {this.state.editingMode === EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {this.state.editingMode !== EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n {this.state.editingMode !== EditingModes.useDynamicEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n {this.state.showCustomStyles && [\n ,\n ]}\n
\n {this.state.showCustomStyles && [\n
\n \n
,\n ]}\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n );\n }\n}\n","import React, { ErrorInfo } from 'react';\nimport { GearIcon } from './Icons';\nimport { clickSettingsButton } from '../lib/clickButton';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\n/**\n * Learn more about Error Boundaries here:\n * https://reactjs.org/docs/error-boundaries.html\n */\n\nexport default class ErrorBoundary extends React.Component<\n any,\n ErrorBoundaryState\n> {\n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log('Error:', error, '\\nError Info:', errorInfo);\n this.setState({\n error,\n errorInfo,\n });\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (\n
\n
\n
\n

Something went wrong.

\n

\n Error Name: {this.state.error?.name}\n

\n

\n Error Message: {this.state.error?.message}\n

\n

Please see the developer console for details.

\n
\n

\n Errors such as TypeError and{' '}\n Cannot read property 'type' of undefined usually\n occur when the editor is unable to process and render your notes\n because it contains incorrect or incomplete HTML. If you are\n writing in HTML, then please continue to write and refresh the\n View Mode when the HTML tags are closed.\n

\n

\n If you are using the Dynamic editing mode, then please switch to\n the Plain Textarea or Monaco editing modes in the Settings\n \n  \n \n  \n \n and remove or fix the text that is causing the error.\n

\n

\n If the error persists or is not related to the content of your\n note, then please{' '}\n \n report the issue on GitHub\n {' '}\n and we will try to fix it.{' '}\n \n 🙂\n \n

\n
\n
\n
\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport { EditorKit, EditorKitDelegate } from 'sn-editor-kit';\nimport PrintDialog from './PrintDialog';\nimport EditNote from './EditNote';\nimport ViewNote from './ViewNote';\nimport AppendText from './AppendText';\nimport Settings from './Settings';\nimport { MonacoDiffEditor } from './Monaco';\nimport ErrorBoundary from './ErrorBoundary';\nimport Menu from './Menu';\n\nimport CodeMirror, { Editor } from 'codemirror';\nimport 'codemirror/lib/codemirror';\nimport 'codemirror/mode/gfm/gfm';\n\n// CodeMirror addons\n\n// For markdown\nimport 'codemirror/addon/edit/continuelist';\n\n// For search\nimport 'codemirror/addon/search/jump-to-line';\nimport 'codemirror/addon/search/match-highlighter';\nimport 'codemirror/addon/search/matchesonscrollbar';\nimport 'codemirror/addon/search/search';\nimport 'codemirror/addon/search/searchcursor';\nimport 'codemirror/addon/dialog/dialog';\n\n// For styling selected text\nimport 'codemirror/addon/selection/mark-selection';\nimport {\n EyeIcon,\n GearIcon,\n HelpIcon,\n MenuIcon,\n PencilIcon,\n PlusIcon,\n} from './Icons';\n\nimport { isLongString, renderLongMarkdown } from '../lib/renderMarkdown';\n\nexport enum HtmlElementId {\n appendButton = 'appendButton',\n appendTextArea = 'appendTextArea',\n appendix = 'appendix',\n content = 'content',\n edit = 'edit',\n editButton = 'editButton',\n editTextArea = 'editTextArea',\n header = 'header',\n helpButton = 'helpButton',\n menuButton = 'menuButton',\n newLine = 'newLine',\n newParagraph = 'newParagraph',\n printButton = 'printButton',\n settingsButton = 'settingsButton',\n view = 'view',\n viewButton = 'viewButton',\n}\n\nexport enum HtmlClassName {\n fixed = 'fixed',\n fixedHeader = 'fixed-header',\n focused = 'focused',\n}\n\nexport enum EditingModes {\n usePlainText = 'usePlainText',\n useCodeMirror = 'useCodeMirror',\n useDynamicEditor = 'useDynamicEditor',\n useMonacoEditor = 'useMonacoEditor',\n}\n\nexport type DefaultSettings = {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n};\n\nexport interface SaveSettingsInterface extends DefaultSettings {\n saveAsDefault: boolean;\n}\n\nexport type menuOptions = {\n borderlessMode?: boolean;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n};\n\nexport interface AppendInterface {\n text: string;\n appendCodeMirror?: any;\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendMode: boolean;\n appendRows: number;\n appendText: string;\n borderlessMode?: boolean;\n bypassDebounce: boolean;\n confirmPrintUrl: boolean;\n currentState?: object;\n customStyles: string;\n defaultSettings: DefaultSettings;\n editMode?: any;\n editingMode?: string;\n editCodeMirror?: any;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n keyMap?: Object;\n monacoEditorLanguage: string;\n printURL: boolean;\n refreshEdit: boolean;\n refreshView: boolean;\n saveAsDefault?: boolean;\n savingEditorOptions?: boolean;\n showAppendix: boolean;\n showDiff: boolean;\n showHeader: boolean;\n showHelp: boolean;\n showMenu?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n settingsMode: boolean;\n viewMode?: boolean;\n}\n\n/**\n * Some properties are optional so\n * they do not need to be set\n * when switching between notes.\n */\n\nconst initialState = {\n text: '',\n appendNewLine: false,\n appendNewParagraph: false,\n appendMode: false,\n appendRows: 8,\n appendText: '',\n bypassDebounce: false, // We keep this as false in initialState so debounce works in the demo\n confirmPrintUrl: false,\n customStyles: '',\n defaultSettings: {\n customStyles: '',\n editingMode: 'usePlainText',\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n },\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n printURL: true,\n refreshEdit: false,\n refreshView: false,\n showAppendix: true,\n showHeader: true,\n showHelp: false,\n showDiff: false,\n settingsMode: false,\n};\n\nlet last_known_scroll_position = 0;\n\nconst debugMode = false;\n\nlet keyMap = new Map();\n\nexport default class AppendEditor extends React.Component<{}, AppendInterface> {\n editorKit: any;\n refreshEditorTimer: NodeJS.Timeout | undefined;\n saveTimer: NodeJS.Timeout | undefined;\n\n constructor(props: AppendInterface) {\n super(props);\n this.configureEditorKit();\n this.state = initialState;\n }\n\n /**\n * This loads the first time the editor is loaded\n * This does not load every time a new note is loaded */\n componentDidMount = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.componentDidMount() triggered');\n }\n this.onViewMode();\n this.loadDefaultMenuState();\n document.addEventListener('scroll', this.onScroll);\n };\n\n componentWillUnmount = () => {\n document.removeEventListener('scroll', this.onScroll);\n };\n\n configureEditorKit = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.configureEditorKit() triggered');\n }\n let delegate = new EditorKitDelegate({\n /** This loads every time a different note is loaded\n * We turn bypassDebounce to true so\n * the editor always renders the markdown for the latest note\n */\n setEditorRawText: (text: string) => {\n this.setState(\n {\n ...initialState,\n bypassDebounce: true,\n text,\n },\n () => {\n if (debugMode) {\n console.log(\n '#################################################################################\\n' +\n 'AppendEditor.tsx:',\n '\\n - loaded text:',\n text +\n '\\n - this.configureEditorKit() callback triggered:' +\n '\\n - this.state.savingsDefaultSettings: ' +\n this.state.savingEditorOptions +\n '\\n - this.state: ' +\n JSON.stringify(this.state, null, ' ')\n );\n }\n /** Clear the debounce from the previous note and componentDidMount\n * Then call and flush the debounce so the correct markdown will render\n * the first time after turning the bypass off */\n isLongString.cancel();\n isLongString(text);\n isLongString.flush();\n renderLongMarkdown.cancel();\n if (isLongString(text)) {\n renderLongMarkdown(text);\n renderLongMarkdown.flush();\n }\n /** This prevents metadata from loading when saving editor options or default settings */\n if (!this.state.savingEditorOptions) {\n this.loadEditorOptions();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n /** Turn the debounce bypass off\n * This loads every time, even when saving editor options or default settings\n * because bypassDebounce is set to true every time\n */\n setTimeout(() => {\n this.setState({\n bypassDebounce: false,\n });\n }, 1000);\n }\n );\n },\n clearUndoHistory: () => {},\n getElementsBySelector: () => [],\n });\n\n this.editorKit = new EditorKit({\n delegate: delegate,\n mode: 'plaintext',\n supportsFilesafe: false,\n });\n };\n\n /** Expect this to run three times when loading a note:\n * once when loading editor options,\n * once when loading default settings, and\n * once when loading meta data\n * Use the timer to prevent the function from being executed when it is called\n * repeatedly, as when loading a note or saving a menu option */\n refreshEditor = () => {\n if (isLongString(this.state.text)) {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 20);\n } else {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 10);\n }\n };\n\n loadDefaultSettings = () => {\n try {\n const defaultSettingsString = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'defaultSettings'\n );\n const defaultEditingMode = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'editingMode'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting() default settings loaded: ' +\n '\\n - defaultSettingsString: ' +\n defaultSettingsString,\n '\\n - typeof:',\n typeof defaultSettingsString,\n '\\n - defaultEditingMode:',\n defaultEditingMode,\n '\\n - typeof:',\n typeof defaultEditingMode\n );\n }\n if (defaultSettingsString !== undefined) {\n const defaultSettingsObject = JSON.parse(\n defaultSettingsString\n ) as DefaultSettings;\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'if (defaultSettingsString !== undefined) triggered',\n '\\n - typeof defaultSettings:',\n typeof defaultSettingsObject\n );\n }\n this.setState(\n {\n customStyles: defaultSettingsObject.customStyles,\n editingMode: defaultSettingsObject.editingMode,\n fontEdit: defaultSettingsObject.fontEdit,\n fontSize: defaultSettingsObject.fontSize,\n fontView: defaultSettingsObject.fontView,\n monacoEditorLanguage: defaultSettingsObject.monacoEditorLanguage,\n defaultSettings: defaultSettingsObject,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n defaultSettingsObject:',\n defaultSettingsObject,\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings, null, ' ')\n );\n }\n this.refreshEditor();\n }\n );\n } else if (defaultEditingMode !== undefined) {\n /** This else if loads legacy default settings introduced in v1.1.0\n * We only need to check defaultEditingMode because it is never empty if it is defined\n * */\n const defaultCustomStyles = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'customStyles'\n );\n const defaultFontEdit = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontEdit'\n );\n const defaultFontSize = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontSize'\n );\n const defaultFontView = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontView'\n );\n const defaultMonacoEditorLanguage = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'monacoEditorLanguage'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'else if (defaultEditingMode !== undefined) triggered',\n '\\n - default customStyles: ' + defaultCustomStyles,\n '\\n - typeof:',\n typeof defaultCustomStyles +\n '\\n - default fontSize: ' +\n defaultFontSize +\n '\\n - default fontEdit: ' +\n defaultFontEdit +\n '\\n - default fontView: ' +\n defaultFontView +\n '\\n - default monacoEditorLanguage: ' +\n defaultMonacoEditorLanguage\n );\n }\n this.setState(\n {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n defaultSettings: {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n }\n );\n } else {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: loadDefaultSettings(), else, current state:',\n JSON.stringify(this.state, null, ' ')\n );\n }\n this.refreshEditor();\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading default settings:', error);\n }\n };\n\n loadEditorOptions = () => {\n try {\n const menuOptionsString = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'menuOptions'\n );\n if (menuOptionsString !== undefined) {\n const menuOptionsObject = JSON.parse(menuOptionsString) as menuOptions;\n this.setState(\n {\n borderlessMode: menuOptionsObject.borderlessMode,\n fixedHeightMode: menuOptionsObject.fixedHeightMode,\n fullWidthMode: menuOptionsObject.fullWidthMode,\n overflowMode: menuOptionsObject.overflowMode,\n //showMenuOptionsEdit: menuOptionsObject.showMenuOptionsEdit,\n //showMenuOptionsShare: menuOptionsObject.showMenuOptionsShare,\n //showMenuOptionsView: menuOptionsObject.showMenuOptionsView,\n },\n () => {\n this.refreshEditor();\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading editor options:', error);\n }\n };\n\n // This loads the Settings and Append Text\n loadMetaData = () => {\n this.editorKit.internal.componentManager.streamContextItem((note: any) => {\n // Load editor settings\n if (\n note.content.appendEditorCustomStyles ||\n note.content.appendEditorEditingMode ||\n note.content.appendEditorFontEdit ||\n note.content.appendEditorFontSize ||\n note.content.appendEditorFontView ||\n note.content.appendEditorMonacoEditorLanguage\n ) {\n this.setState(\n {\n customStyles: note.content.appendEditorCustomStyles,\n editingMode: note.content.appendEditorEditingMode,\n fontEdit: note.content.appendEditorFontEdit,\n fontSize: note.content.appendEditorFontSize,\n fontView: note.content.appendEditorFontView,\n monacoEditorLanguage: note.content.appendEditorMonacoEditorLanguage,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadMetaData() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n if (debugMode) {\n console.log(\n 'editorKit metadata loaded: ' +\n '\\n - loaded customStyles: ' +\n this.state.customStyles +\n '\\n - loaded editingMode: ' +\n this.state.editingMode +\n '\\n - loaded fontEdit: ' +\n this.state.fontEdit +\n '\\n - loaded fontSize: ' +\n this.state.fontSize +\n '\\n - loaded fontView: ' +\n this.state.fontView +\n '\\n - loaded monacoEditorLanguage: ' +\n this.state.monacoEditorLanguage\n );\n }\n }\n );\n }\n // Load append settings\n if (note.content.appendNewLine || note.content.appendNewParagraph) {\n this.setState({\n appendNewLine: note.content.appendNewLine,\n appendNewParagraph: note.content.appendNewParagraph,\n });\n }\n // Finally, load appendText\n this.setState(\n {\n appendText: note.content.appendText,\n },\n () => {\n /**If both text and appendText are empty,\n * such as when creating a new note,\n * and editMode is off,\n * then open the edit mode\n */\n if (\n !this.state.text &&\n !this.state.appendText &&\n !this.state.editMode\n ) {\n this.onEditMode();\n }\n }\n );\n if (debugMode) {\n console.log(\n ' - loaded append text: ' +\n this.state.appendText +\n '\\n - loaded append newline: ' +\n this.state.appendNewLine +\n '\\n - loaded append new paragraph: ' +\n this.state.appendNewParagraph +\n '\\n - loaded editorKit internal appendText: ' +\n this.editorKit.internal.note.content.appendText\n );\n }\n });\n };\n\n saveText = (text: string) => {\n this.saveNote(text);\n this.setState(\n {\n text: text,\n },\n () => {\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n } else if (this.state.viewMode && isLongString(text)) {\n /** If the note text is long, then rendering its markdown will debounce\n * If the we stop editing for 550 milliseconds, then\n * automatically refresh the view to force the latest markdown to render\n * We use 550 because the debounce is 500.\n */\n if (this.saveTimer) {\n clearTimeout(this.saveTimer);\n }\n this.saveTimer = setTimeout(() => {\n if (this.state.fixedHeightMode) {\n /** This keeps the vertical scroll when refreshing view */\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n let scrollY = view.scrollTop;\n this.refreshView();\n /** We have to find the new view because\n * the previous one doesn't exist anymore */\n const refreshedView = document.getElementById(\n HtmlElementId.view\n );\n if (refreshedView) {\n refreshedView.scrollTop = scrollY;\n }\n } else {\n this.refreshView();\n }\n } else {\n this.refreshView();\n }\n }, 550);\n }\n if (debugMode) {\n console.log('AppendEditor.tsx: saved text:', this.state.text);\n }\n }\n );\n };\n\n saveNote = (text: string) => {\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n this.editorKit.onEditorValueChanged(text);\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving note:', error);\n }\n };\n\n // Entry operations\n\n appendTextToNote = () => {\n // Do nothing if there's no append text\n if (this.state.appendText) {\n /*\n * We usually use this.editText() to save the main text\n * However, we want to save the main text and clear the appendText\n * Consecutive calls to the component manager does not work well,\n * so we want to do both with one call to the component manager\n * This means we need multiple versions of this function depending on what we want to save */\n const { appendText } = this.state;\n let textToAppend = '';\n // We test for new paragraph first even though new line is on top and is on by default\n if (this.state.appendNewParagraph) {\n textToAppend = ' \\n\\n' + appendText;\n } else if (this.state.appendNewLine) {\n textToAppend = ' \\n' + appendText;\n } else {\n textToAppend = appendText;\n }\n this.setState(\n {\n text: this.state.text.concat(textToAppend),\n appendText: '',\n },\n () => {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.text = this.state.text; // this.editorKit.internal.note.content.text\n note.content.appendText = this.state.appendText; // this.editorKit.internal.note.content.appendText\n }\n );\n }\n this.refreshEdit();\n // Refresh view mode if using dynamic\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n setTimeout(() => {\n this.skipToBottom();\n }, 50);\n } else if (isLongString(this.state.text)) {\n setTimeout(() => {\n this.refreshView();\n this.skipToBottom();\n }, 550);\n } else {\n this.skipToBottom();\n }\n }\n );\n }\n // Refresh appendCodeMirror\n if (\n this.state.appendCodeMirror &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.state.appendCodeMirror.setValue('');\n }\n };\n\n autoSaveAppendText = (text: string) => {\n // This code is similar to this.onAppend();, but we only save the appendText and not the main text\n this.setState({\n appendText: text,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.appendText = text;\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving appendText:', error);\n }\n };\n\n autoSaveCheckBoxes = (newLine: boolean, newParagraph: boolean) => {\n // Here we save the appendText, appendNewLine, and appendNewParagraph\n // We have an additional function for this because we only call it when the user clicks a checkbox\n this.setState({\n appendNewLine: newLine,\n appendNewParagraph: newParagraph,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.appendNewLine = newLine;\n note.content.appendNewParagraph = newParagraph;\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving checkboxes:', error);\n }\n };\n\n refreshEdit = () => {\n this.setState(\n {\n refreshEdit: !this.state.refreshEdit,\n },\n () => {\n // We could also check for this.state.editMode,\n // but it might not be loaded yet.\n // Checking for editTextArea checks whether editMode has loaded\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (\n editTextArea &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n );\n };\n\n refreshView = () => {\n this.setState({\n refreshView: !this.state.refreshView,\n });\n };\n\n configureCodeMirror = (id: string) => {\n if (id === HtmlElementId.editTextArea) {\n if (debugMode) {\n console.log('this.state.text: ' + this.state.text);\n }\n const editTextArea = document.getElementById(id) as HTMLTextAreaElement;\n if (editTextArea) {\n const editCodeMirror = CodeMirror.fromTextArea(editTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.text,\n });\n editCodeMirror.setSize('100%', '100%');\n editCodeMirror.on('change', () => {\n const editCodeMirrorText = editCodeMirror.getValue();\n if (debugMode) {\n console.log('editCodeMirror value: ' + editCodeMirrorText);\n }\n editCodeMirror.save();\n this.saveText(editCodeMirrorText);\n });\n editCodeMirror.on('blur', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.remove(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('focus', (cm: Editor, event: FocusEvent) => {\n const content = document.getElementById(HtmlElementId.content);\n if (content) {\n content.classList.add(HtmlClassName.focused);\n }\n });\n editCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownEditTextArea(event);\n this.onKeyDownTextArea(event);\n });\n editCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n editCodeMirror: editCodeMirror,\n });\n }\n } else if (id === HtmlElementId.appendTextArea) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n ) as HTMLTextAreaElement;\n if (appendTextArea) {\n const appendCodeMirror = CodeMirror.fromTextArea(appendTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.appendText,\n });\n appendCodeMirror.setSize('100%', '100%');\n appendCodeMirror.on('change', () => {\n const appendCodeMirrorText = appendCodeMirror.getValue();\n appendCodeMirror.save();\n this.autoSaveAppendText(appendCodeMirrorText);\n });\n appendCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownAppendTextArea(event);\n this.onKeyDownTextArea(event);\n });\n appendCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n appendCodeMirror: appendCodeMirror,\n });\n }\n }\n };\n\n // Event Handlers\n onEditMode = () => {\n // if Append box is empty, close it and open Edit mode\n // if Edit mode is on, then close it, open View mode, and Append mode\n if (!this.state.editMode) {\n if (this.state.appendMode && !this.state.appendText) {\n this.setState({\n appendMode: false,\n });\n }\n this.setState(\n {\n editMode: true,\n },\n () => {\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (editTextArea) {\n editTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n }\n );\n } else if (this.state.editMode) {\n /**If edit mode is on and Monaco Editor is off,\n * then turn edit mode off and turn view mode on.\n * This automatically renders the text. We do not\n * do this when Monaco is on because refreshing edit Mode\n * with Monaco Editor off allows us to resize the Monaco Editor.\n */\n if (!(this.state.editingMode === EditingModes.useMonacoEditor)) {\n this.setState({\n viewMode: true,\n });\n }\n if (this.state.editCodeMirror) {\n this.state.editCodeMirror.toTextArea();\n }\n this.setState(\n {\n editMode: false,\n },\n () => {\n // if not using append mode, focus on editButton\n if (!this.state.appendMode) {\n const editButton = document.getElementById(\n HtmlElementId.editButton\n );\n if (editButton) {\n editButton.focus();\n }\n }\n }\n );\n }\n };\n\n onAppendMode = (scrollDown = true, closeEdit = true, focus = true) => {\n if (!this.state.appendMode) {\n if (closeEdit) {\n this.setState({\n editMode: false,\n });\n }\n this.setState(\n {\n appendMode: true,\n },\n () => {\n if (scrollDown) {\n this.scrollToBottom();\n }\n if (focus) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.appendTextArea);\n }\n }\n }\n }\n );\n } else if (this.state.appendMode) {\n if (this.state.appendCodeMirror) {\n this.state.appendCodeMirror.toTextArea();\n }\n this.setState(\n {\n appendMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (focus) {\n const appendButton = document.getElementById(\n HtmlElementId.appendButton\n );\n if (appendButton) {\n appendButton.focus();\n }\n }\n }\n );\n }\n };\n\n onViewMode = () => {\n if (!this.state.viewMode) {\n this.setState(\n {\n viewMode: true,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (this.state.appendMode && !this.state.editMode) {\n this.skipToBottom();\n }\n }\n );\n }\n if (this.state.viewMode) {\n this.setState(\n {\n viewMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (!this.state.editMode && !this.state.appendMode) {\n this.onEditMode();\n }\n }\n );\n }\n };\n\n toggleShowHelp = () => {\n if (!this.state.showHelp) {\n this.setState(\n {\n showHelp: true,\n },\n () => {\n if (!this.state.viewMode) {\n this.onViewMode();\n } else if (this.state.viewMode) {\n this.refreshView();\n }\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n setTimeout(() => {\n this.scrollToTop();\n }, 50);\n }\n );\n } else {\n this.setState(\n {\n showHelp: false,\n },\n () => {\n this.refreshView();\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n }\n );\n }\n };\n\n toggleShowMenu = () => {\n this.setState(\n {\n showMenu: !this.state.showMenu,\n },\n () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.focus();\n }\n }\n );\n };\n\n loadDefaultMenuState = () => {\n this.setState({\n showMenuOptionsEdit: false,\n showMenuOptionsShare: true,\n showMenuOptionsView: true,\n });\n };\n\n toggleShowMenuOptionsEdit = () => {\n this.setState({ showMenuOptionsEdit: !this.state.showMenuOptionsEdit });\n };\n\n toggleShowMenuOptionsShare = () => {\n this.setState({ showMenuOptionsShare: !this.state.showMenuOptionsShare });\n };\n\n toggleShowMenuOptionsView = () => {\n this.setState({ showMenuOptionsView: !this.state.showMenuOptionsView });\n };\n\n toggleBorderlessMode = () => {\n this.setState(\n {\n borderlessMode: !this.state.borderlessMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFixedHeightMode = () => {\n this.setState(\n {\n fixedHeightMode: !this.state.fixedHeightMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFullWidthMode = () => {\n this.setState(\n {\n fullWidthMode: !this.state.fullWidthMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleOverflowMode = () => {\n this.setState(\n {\n overflowMode: !this.state.overflowMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n saveMenuOptions = () => {\n let currentMenuOptions: menuOptions;\n currentMenuOptions = {\n borderlessMode: this.state.borderlessMode,\n fixedHeightMode: this.state.fixedHeightMode,\n fullWidthMode: this.state.fullWidthMode,\n overflowMode: this.state.overflowMode,\n /**These are turned off to prevent excess re-rendering of the note when opening/closing the menu */\n //showMenuOptionsEdit: this.state.showMenuOptionsEdit,\n //showMenuOptionsShare: this.state.showMenuOptionsShare,\n //showMenuOptionsView: this.state.showMenuOptionsView,\n };\n this.saveEditorOption('menuOptions', JSON.stringify(currentMenuOptions));\n };\n\n saveEditorOption = (\n optionKey: string,\n optionValue: string | boolean | undefined\n ) => {\n this.setState(\n {\n savingEditorOptions: true,\n },\n () => {\n try {\n this.editorKit.internal.componentManager.setComponentDataValueForKey(\n optionKey,\n optionValue\n );\n /** this.configureEditorKit() is triggered\n * every time setComponentDataValueForKey is triggered, but\n * savingEditorOptions prevents the callback from triggering.\n * Then, after the timeout, the new default settings or options can\n * take into effect immediately.\n * However, if you switch the note within the timeout, you will get an error.\n * I have tried 150 and 200 but they both are not long enough. 250 is short enough\n * to work, but not long enough to be easily noticeable.\n * We do not load editor options because they are optional and persist through\n * this.configureEditorKit().\n * */\n setTimeout(() => {\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }, 250);\n } catch (error) {\n console.log(\n 'Error saving editor option. Your optionKey:',\n optionKey,\n '\\n - Your optionValue: ',\n optionValue,\n '\\n - The error: ',\n error\n );\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n /** We use refreshEditor() if there's an error (such as in the demo)\n * But not in the actual editor because loadDefaultSettings and loadMetaData\n * will run refreshEditor() twice, and if there's no issue saving editor options,\n * then there's probably no issue loading default settings and metadata.\n * */\n this.refreshEditor();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }\n }\n );\n };\n\n onSettingsMode = () => {\n // Here we save the current state. We reload the current state if we cancel and after we save\n if (!this.state.settingsMode) {\n this.removeFixedHeader();\n this.setState(\n {\n currentState: this.state,\n },\n () => {\n /** Turn everything off and turn Settings on */\n this.setState(\n {\n appendMode: false,\n editMode: false,\n fullWidthMode: false,\n fixedHeightMode: false,\n settingsMode: true,\n showAppendix: false, // Hides the scroll up/down buttons\n showHeader: false,\n showMenu: false,\n viewMode: false,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n }\n );\n } else if (this.state.settingsMode) {\n this.setState(\n {\n ...this.state.currentState,\n settingsMode: false,\n },\n () => {\n this.refreshEdit();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n }\n };\n\n /** Restore current state but change the items that are saved from the Settings.\n * It's important to restore the current state to restore items that were turned off, such as\n * fixedHeight and fullWidth.\n */\n onSaveSettings = ({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n }: SaveSettingsInterface) => {\n this.setState(\n {\n ...this.state.currentState,\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n showAppendix: true,\n showHeader: true,\n settingsMode: false,\n },\n () => {\n this.refreshEditor();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n let note = this.editorKit.internal.note;\n if (note) {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentManager.saveItemWithPresave() triggered'\n );\n }\n this.editorKit.internal.componentManager.saveItemWithPresave(note, () => {\n note.content.appendEditorCustomStyles = customStyles;\n note.content.appendEditorEditingMode = editingMode;\n note.content.appendEditorFontEdit = fontEdit;\n note.content.appendEditorFontSize = fontSize;\n note.content.appendEditorFontView = fontView;\n note.content.appendEditorMonacoEditorLanguage = monacoEditorLanguage;\n });\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentManager.saveItemWithPresave() completed'\n );\n }\n }\n if (saveAsDefault) {\n this.setState(\n {\n defaultSettings: {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n this.saveEditorOption(\n 'defaultSettings',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n );\n }\n };\n\n activateStyles = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.activateStyles() triggered');\n }\n const sheetToBeRemoved = document.getElementById('customStyleSheet');\n if (sheetToBeRemoved) {\n const sheetParent = sheetToBeRemoved.parentNode;\n if (sheetParent) {\n sheetParent.removeChild(sheetToBeRemoved);\n }\n }\n // Follow the order that appears in the Settings to make the Settings cascade\n let fontSizeStyle = '';\n if (this.state.fontSize) {\n fontSizeStyle =\n '.CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: ' +\n this.state.fontSize +\n ';}\\n';\n }\n let fontEditStyle = '';\n if (this.state.fontEdit) {\n fontEditStyle =\n '.CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: ' +\n this.state.fontEdit +\n ';}\\n';\n }\n let fontViewStyle = '';\n if (this.state.fontView) {\n fontViewStyle =\n '#renderedNote {font-family: ' + this.state.fontView + ';}\\n';\n }\n if (\n this.state.customStyles ||\n this.state.fontEdit ||\n this.state.fontSize ||\n this.state.fontView\n ) {\n const sheet = document.createElement('style');\n sheet.setAttribute('id', 'customStyleSheet');\n // Follow the order that appears in the Settings to make the Settings cascade\n sheet.innerHTML =\n fontSizeStyle + fontEditStyle + fontViewStyle + this.state.customStyles;\n document.body.appendChild(sheet);\n }\n };\n\n onCancelPrint = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n },\n () => {\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n }\n );\n };\n\n onConfirmPrintUrl = () => {\n this.setState(\n {\n confirmPrintUrl: true,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n };\n\n onPrintUrlTrue = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: true,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n onPrintUrlFalse = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: false,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n printRenderedHtml = () => {\n window.print();\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n };\n\n goDown = () => {\n document.body.scrollTop = 10000000; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 10000000;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 10000000;\n }\n /** Scroll down for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 10000000;\n }\n }\n };\n\n scrollToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'smooth',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'auto',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n goUp = () => {\n document.body.scrollTop = 0; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 0;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 0;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 0;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 0;\n }\n /** Scroll up for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 0;\n }\n }\n };\n\n scrollToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'smooth',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n // Need both content and appendix for mobile\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'auto',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.set(e.key, true);\n // Click the top Append if 'Control' and 'e' are pressed\n if (keyMap.get('Control') && keyMap.get('e')) {\n e.preventDefault();\n this.onEditMode();\n }\n // Click the top Append if 'Control' and 'u' are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n (keyMap.get('u') || keyMap.get('m'))\n ) {\n e.preventDefault();\n this.onAppendMode();\n }\n // Click view if 'Control' and 'p' are pressed\n else if (keyMap.get('Control') && !keyMap.get('Alt') && keyMap.get('p')) {\n e.preventDefault();\n this.onViewMode();\n } else if (keyMap.get('Control') && keyMap.get('.')) {\n e.preventDefault();\n this.setState({\n appendRows: this.state.appendRows + 1,\n });\n } else if (keyMap.get('Control') && keyMap.get(',')) {\n e.preventDefault();\n if (this.state.appendRows > 5) {\n this.setState({\n appendRows: this.state.appendRows - 1,\n });\n }\n } else if (keyMap.get('Control') && keyMap.get('<')) {\n // Edit only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onEditMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('>')) {\n // Append only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onAppendMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('[')) {\n e.preventDefault();\n this.skipToTop();\n } else if (keyMap.get('Control') && keyMap.get(']')) {\n e.preventDefault();\n this.skipToBottom();\n } else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n !keyMap.get('Shift') &&\n keyMap.get('w')\n ) {\n keyMap.delete('w');\n }\n };\n\n onKeyDownAppendTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close Append Mode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.delete('Escape');\n this.onAppendMode();\n }\n // Save note if Control and Enter are pressed\n else if (keyMap.get('Control') && keyMap.get('Enter')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Save note if Control and S are pressed\n else if (keyMap.get('Control') && keyMap.get('s')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + N are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('n')\n ) {\n e.preventDefault();\n const newLine = document.getElementById(HtmlElementId.newLine);\n if (newLine) {\n newLine.click();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + P are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('p')\n ) {\n e.preventDefault();\n const newParagraph = document.getElementById(HtmlElementId.newParagraph);\n if (newParagraph) {\n newParagraph.click();\n }\n }\n };\n\n onKeyDownEditTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close EditMode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.set('Escape', false);\n this.onEditMode();\n }\n };\n\n onKeyDownTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Add two spaces and line break if Shift and Enter are pressed\n if (keyMap.get('Shift') && keyMap.get('Enter')) {\n e.preventDefault();\n document.execCommand('insertText', false, ' \\n');\n }\n // Add two stars if Control + b are pressed\n else if (keyMap.get('Control') && keyMap.get('b')) {\n e.preventDefault();\n document.execCommand('insertText', false, '**');\n }\n // Add header when pressing Control + H\n else if (keyMap.get('Control') && keyMap.get('h')) {\n e.preventDefault();\n document.execCommand('insertText', false, '#');\n }\n // Add image code if Control + Alt and i are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '![]()');\n }\n // Add one stars if Control + i is pressed\n else if (keyMap.get('Control') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '*');\n }\n // Add inline code if Control + Alt and k are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '`');\n }\n // Add link if Control + k are pressed\n else if (keyMap.get('Control') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '[]()');\n }\n // Add ordered list item if Control + Alt + l are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n1. ');\n }\n // Add unordered list item if Control + l are pressed\n else if (keyMap.get('Control') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n- ');\n }\n // Add strike through if Control + Alt + u are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('u')) {\n e.preventDefault();\n document.execCommand('insertText', false, '~~');\n }\n // Add quote Control + q, Control + ' or Control + \" are pressed\n else if (\n (keyMap.get('Control') && keyMap.get('q')) ||\n (keyMap.get('Control') && keyMap.get(\"'\")) ||\n (keyMap.get('Control') && keyMap.get('\"'))\n ) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n> ');\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.delete(e.key);\n };\n\n onBlur = (e: React.FocusEvent) => {\n keyMap.clear();\n };\n\n onScroll = (e: Event) => {\n if (!this.state.settingsMode) {\n if (window.scrollY < last_known_scroll_position) {\n // If scrolling up, fix header\n this.activateFixedHeader();\n } else if (\n // If scrolling down, unfix header\n window.scrollY > last_known_scroll_position &&\n !this.state.showMenu\n ) {\n if (\n // If NOT using Edit Only mode with PlainText and CodeMirror\n !(\n (this.state.editingMode === undefined ||\n this.state.editingMode === EditingModes.usePlainText ||\n this.state.editingMode === EditingModes.useCodeMirror) &&\n this.state.editMode &&\n !this.state.appendMode &&\n !this.state.settingsMode &&\n !this.state.viewMode\n )\n ) {\n this.removeFixedHeader();\n }\n }\n last_known_scroll_position = window.scrollY;\n }\n };\n\n activateFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n // Activate only if we have both\n if (header && content) {\n header.classList.add(HtmlClassName.fixed);\n content.classList.add(HtmlClassName.fixedHeader);\n }\n };\n\n removeFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n /** Remove both even if you don't have both\n * This is needed for loading settings\n */\n if (header) {\n header.classList.remove(HtmlClassName.fixed);\n }\n if (content) {\n content.classList.remove(HtmlClassName.fixedHeader);\n }\n };\n\n render() {\n return [\n ,\n \n {this.state.showHeader && [\n \n
\n \n \n \n \n \n \n this.onAppendMode()}\n title=\"Toggle Append Mode\"\n className={\n 'sk-button ' + (this.state.appendMode ? 'on' : 'off')\n }\n >\n \n \n
\n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n ,\n ]}\n \n {this.state.showMenu && (\n \n \n \n )}\n {this.state.settingsMode && (\n \n \n \n )}\n {this.state.editMode && !this.state.refreshEdit && (\n \n \n \n )}\n {this.state.editMode && this.state.refreshEdit && (\n \n \n \n )}\n {this.state.viewMode && !this.state.refreshView && (\n \n \n \n )}\n {this.state.viewMode && this.state.refreshView && (\n \n \n \n )}\n {this.state.confirmPrintUrl && (\n \n {' '}\n \n )}\n\n {this.state.showDiff && [\n \n \n ,\n ]}\n \n {this.state.showAppendix && [\n \n {this.state.appendMode && (\n \n \n \n )}\n \n
\n \n \n
\n \n ,\n ]}\n ,\n ];\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.scss';\nimport * as serviceWorker from './serviceWorker';\nimport reportWebVitals from './reportWebVitals';\n\nimport AppendEditor from './components/AppendEditor';\nimport './stylesheets/main.scss';\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\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/static/js/main.a39a299e.chunk.js b/build/static/js/main.a39a299e.chunk.js deleted file mode 100644 index af8e25d2..00000000 --- a/build/static/js/main.a39a299e.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpappend-editor"]=this["webpackJsonpappend-editor"]||[]).push([[2],{1172:function(e,t,o){},1173:function(e,t,o){"use strict";o.r(t);var n=o(7),i=o(24),s=o.n(i),a=o(152),r=o.n(a);o(454),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=function(e){e&&e instanceof Function&&o.e(73).then(o.bind(null,1179)).then((function(t){var o=t.getCLS,n=t.getFID,i=t.getFCP,s=t.getLCP,a=t.getTTFB;o(e),n(e),i(e),s(e),a(e)}))},l=o(181),d=o(0),p=o(1),h=o(4),u=o(5),j=o(311),g="var(--sn-stylekit-info-color)",b="var(--sn-stylekit-foreground-color)",f=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon down",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:t||b})})})},x=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("span",{className:"chevron-icon right",children:Object(n.jsx)("svg",{"aria-label":"chevron icon down",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.90918 14.0667L10.7342 10.2417L6.90918 6.4167L8.09251 5.2417L13.0925 10.2417L8.09251 15.2417L6.90918 14.0667Z",fill:t||b})})})},m=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"close icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.2459 5.92917C15.5704 5.6047 15.5704 5.07864 15.2459 4.75417C14.9214 4.4297 14.3954 4.4297 14.0709 4.75417L10.0001 8.82501L5.92925 4.75417C5.60478 4.4297 5.07872 4.4297 4.75425 4.75417C4.42978 5.07864 4.42978 5.6047 4.75425 5.92917L8.82508 10L4.75425 14.0708C4.42978 14.3953 4.42978 14.9214 4.75425 15.2458C5.07872 15.5703 5.60478 15.5703 5.92925 15.2458L10.0001 11.175L14.0709 15.2458C14.3954 15.5703 14.9214 15.5703 15.2459 15.2458C15.5704 14.9214 15.5704 14.3953 15.2459 14.0708L11.1751 10L15.2459 5.92917Z",fill:t||b})})},O=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"copy icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M1.66724 3.66626C1.66724 2.56169 2.56267 1.66626 3.66724 1.66626H11.3339C12.4385 1.66626 13.3339 2.56169 13.3339 3.66626V13.3329H3.66724C2.56267 13.3329 1.66724 12.4375 1.66724 11.3329V3.66626ZM16.3339 6.66626C17.4385 6.66626 18.3339 7.56169 18.3339 8.66626V16.3329C18.3339 17.4375 17.4385 18.3329 16.3339 18.3329H8.66724C7.56267 18.3329 6.66724 17.4375 6.66724 16.3329V14.9996H15.0006V6.66626H16.3339ZM3.3339 3.33293V11.6663H11.6672V3.33293H3.3339Z",fill:t||b})})},v=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"eye icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 7.5C9.33688 7.5 8.70099 7.76339 8.23215 8.23223C7.76331 8.70107 7.49992 9.33696 7.49992 10C7.49992 10.663 7.76331 11.2989 8.23215 11.7678C8.70099 12.2366 9.33688 12.5 9.99992 12.5C10.663 12.5 11.2988 12.2366 11.7677 11.7678C12.2365 11.2989 12.4999 10.663 12.4999 10C12.4999 9.33696 12.2365 8.70107 11.7677 8.23223C11.2988 7.76339 10.663 7.5 9.99992 7.5ZM9.99992 14.1667C8.89485 14.1667 7.83504 13.7277 7.05364 12.9463C6.27224 12.1649 5.83325 11.1051 5.83325 10C5.83325 8.89493 6.27224 7.83512 7.05364 7.05372C7.83504 6.27232 8.89485 5.83333 9.99992 5.83333C11.105 5.83333 12.1648 6.27232 12.9462 7.05372C13.7276 7.83512 14.1666 8.89493 14.1666 10C14.1666 11.1051 13.7276 12.1649 12.9462 12.9463C12.1648 13.7277 11.105 14.1667 9.99992 14.1667ZM9.99992 3.75C5.83325 3.75 2.27492 6.34167 0.833252 10C2.27492 13.6583 5.83325 16.25 9.99992 16.25C14.1666 16.25 17.7249 13.6583 19.1666 10C17.7249 6.34167 14.1666 3.75 9.99992 3.75Z",fill:o||(t?g:b)})})},w=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"gear icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.0001 6.66675C10.8842 6.66675 11.732 7.01794 12.3571 7.64306C12.9823 8.26818 13.3334 9.11603 13.3334 10.0001C13.3334 10.8841 12.9823 11.732 12.3571 12.3571C11.732 12.9822 10.8842 13.3334 10.0001 13.3334C9.11606 13.3334 8.26821 12.9822 7.64309 12.3571C7.01797 11.732 6.66678 10.8841 6.66678 10.0001C6.66678 9.11603 7.01797 8.26818 7.64309 7.64306C8.26821 7.01794 9.11606 6.66675 10.0001 6.66675ZM10.0001 8.33342C9.55808 8.33342 9.13416 8.50901 8.8216 8.82157C8.50904 9.13413 8.33344 9.55805 8.33344 10.0001C8.33344 10.4421 8.50904 10.866 8.8216 11.1786C9.13416 11.4912 9.55808 11.6667 10.0001 11.6667C10.4421 11.6667 10.8661 11.4912 11.1786 11.1786C11.4912 10.866 11.6668 10.4421 11.6668 10.0001C11.6668 9.55805 11.4912 9.13413 11.1786 8.82157C10.8661 8.50901 10.4421 8.33342 10.0001 8.33342ZM8.33344 18.3334C8.12511 18.3334 7.95011 18.1834 7.91678 17.9834L7.60844 15.7751C7.08344 15.5667 6.63344 15.2834 6.20011 14.9501L4.12511 15.7917C3.94178 15.8584 3.71678 15.7917 3.61678 15.6084L1.95011 12.7251C1.84178 12.5417 1.89178 12.3167 2.05011 12.1917L3.80844 10.8084L3.75011 10.0001L3.80844 9.16675L2.05011 7.80841C1.89178 7.68341 1.84178 7.45841 1.95011 7.27508L3.61678 4.39175C3.71678 4.20841 3.94178 4.13341 4.12511 4.20842L6.20011 5.04175C6.63344 4.71675 7.08344 4.43341 7.60844 4.22508L7.91678 2.01675C7.95011 1.81675 8.12511 1.66675 8.33344 1.66675H11.6668C11.8751 1.66675 12.0501 1.81675 12.0834 2.01675L12.3918 4.22508C12.9168 4.43341 13.3668 4.71675 13.8001 5.04175L15.8751 4.20842C16.0584 4.13341 16.2834 4.20841 16.3834 4.39175L18.0501 7.27508C18.1584 7.45841 18.1084 7.68341 17.9501 7.80841L16.1918 9.16675L16.2501 10.0001L16.1918 10.8334L17.9501 12.1917C18.1084 12.3167 18.1584 12.5417 18.0501 12.7251L16.3834 15.6084C16.2834 15.7917 16.0584 15.8667 15.8751 15.7917L13.8001 14.9584C13.3668 15.2834 12.9168 15.5667 12.3918 15.7751L12.0834 17.9834C12.0501 18.1834 11.8751 18.3334 11.6668 18.3334H8.33344ZM9.37511 3.33341L9.06678 5.50841C8.06678 5.71675 7.18344 6.25008 6.54178 6.99175L4.53344 6.12508L3.90844 7.20841L5.66678 8.50008C5.33344 9.47508 5.33344 10.5334 5.66678 11.5001L3.90011 12.8001L4.52511 13.8834L6.55011 13.0167C7.19178 13.7501 8.06678 14.2834 9.05844 14.4834L9.36678 16.6667H10.6334L10.9418 14.4917C11.9334 14.2834 12.8084 13.7501 13.4501 13.0167L15.4751 13.8834L16.1001 12.8001L14.3334 11.5084C14.6668 10.5334 14.6668 9.47508 14.3334 8.50008L16.0918 7.20841L15.4668 6.12508L13.4584 6.99175C12.8168 6.25008 11.9334 5.71675 10.9334 5.51675L10.6251 3.33341H9.37511Z",fill:o||(t?g:b)})})},M=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"help icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.16675 15.0001H10.8334V13.3334H9.16675V15.0001ZM10.0001 1.66675C8.90573 1.66675 7.8221 1.8823 6.81105 2.30109C5.80001 2.71987 4.88135 3.3337 4.10753 4.10753C2.54472 5.67033 1.66675 7.78995 1.66675 10.0001C1.66675 12.2102 2.54472 14.3298 4.10753 15.8926C4.88135 16.6665 5.80001 17.2803 6.81105 17.6991C7.8221 18.1179 8.90573 18.3334 10.0001 18.3334C12.2102 18.3334 14.3298 17.4554 15.8926 15.8926C17.4554 14.3298 18.3334 12.2102 18.3334 10.0001C18.3334 8.90573 18.1179 7.8221 17.6991 6.81105C17.2803 5.80001 16.6665 4.88135 15.8926 4.10753C15.1188 3.3337 14.2002 2.71987 13.1891 2.30109C12.1781 1.8823 11.0944 1.66675 10.0001 1.66675ZM10.0001 16.6668C6.32508 16.6668 3.33342 13.6751 3.33342 10.0001C3.33342 6.32508 6.32508 3.33342 10.0001 3.33342C13.6751 3.33342 16.6668 6.32508 16.6668 10.0001C16.6668 13.6751 13.6751 16.6668 10.0001 16.6668ZM10.0001 5.00008C9.11603 5.00008 8.26818 5.35127 7.64306 5.97639C7.01794 6.60151 6.66675 7.44936 6.66675 8.33342H8.33342C8.33342 7.89139 8.50901 7.46747 8.82157 7.1549C9.13413 6.84234 9.55806 6.66675 10.0001 6.66675C10.4421 6.66675 10.866 6.84234 11.1786 7.1549C11.4912 7.46747 11.6667 7.89139 11.6667 8.33342C11.6667 10.0001 9.16675 9.79175 9.16675 12.5001H10.8334C10.8334 10.6251 13.3334 10.4167 13.3334 8.33342C13.3334 7.44936 12.9822 6.60151 12.3571 5.97639C11.732 5.35127 10.8841 5.00008 10.0001 5.00008Z",fill:o||(t?g:b)})})},y=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"menu icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M17 5V6.66667H3V5H17ZM3 15H17V13.3333H3V15ZM3 10.8333H17V9.16667H3V10.8333Z",fill:o||(t?g:b)})})},C=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{"aria-label":"pencil icon",role:i,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M11.7167 7.5L12.5 8.28333L4.93333 15.8333H4.16667V15.0667L11.7167 7.5ZM14.7167 2.5C14.5083 2.5 14.2917 2.58333 14.1333 2.74167L12.6083 4.26667L15.7333 7.39167L17.2583 5.86667C17.5833 5.54167 17.5833 5 17.2583 4.69167L15.3083 2.74167C15.1417 2.575 14.9333 2.5 14.7167 2.5ZM11.7167 5.15833L2.5 14.375V17.5H5.625L14.8417 8.28333L11.7167 5.15833Z",fill:o||(t?g:b)})})},E=function(e){var t=e.condition,o=e.fill,i=e.role;return Object(n.jsx)("svg",{role:i,"aria-label":"plus icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.385 11.385H15.615C16.3799 11.385 17 10.7649 17 10C17 9.23507 16.3799 8.61497 15.615 8.61497H11.385V4.38503C11.385 3.6201 10.7649 3 10 3C9.23507 3 8.61497 3.6201 8.61497 4.38503V8.61497H4.38503C3.6201 8.61497 3 9.23507 3 10C3 10.7649 3.6201 11.385 4.38503 11.385H8.61497V15.615C8.61497 16.3799 9.23507 17 10 17C10.7649 17 11.385 16.3799 11.385 15.615V11.385Z",fill:o||(t?g:b)})})},S=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"print icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M15.0001 2.5H5.00008V5.83333H15.0001V2.5ZM15.8334 10C15.6124 10 15.4004 9.9122 15.2442 9.75592C15.0879 9.59964 15.0001 9.38768 15.0001 9.16667C15.0001 8.94565 15.0879 8.73369 15.2442 8.57741C15.4004 8.42113 15.6124 8.33333 15.8334 8.33333C16.0544 8.33333 16.2664 8.42113 16.4227 8.57741C16.579 8.73369 16.6668 8.94565 16.6668 9.16667C16.6668 9.38768 16.579 9.59964 16.4227 9.75592C16.2664 9.9122 16.0544 10 15.8334 10ZM13.3334 15.8333H6.66675V11.6667H13.3334V15.8333ZM15.8334 6.66667H4.16675C3.50371 6.66667 2.86782 6.93006 2.39898 7.3989C1.93014 7.86774 1.66675 8.50363 1.66675 9.16667V14.1667H5.00008V17.5H15.0001V14.1667H18.3334V9.16667C18.3334 8.50363 18.07 7.86774 17.6012 7.3989C17.1323 6.93006 16.4965 6.66667 15.8334 6.66667Z",fill:t||b})})},k=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"refresh icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M9.99992 14.9999C8.67384 14.9999 7.40207 14.4731 6.46438 13.5355C5.5267 12.5978 4.99992 11.326 4.99992 9.99992C4.99992 9.16658 5.20825 8.35825 5.58325 7.66658L4.36659 6.44992C3.71659 7.47492 3.33325 8.69158 3.33325 9.99992C3.33325 11.768 4.03563 13.4637 5.28587 14.714C6.53612 15.9642 8.23181 16.6666 9.99992 16.6666V19.1666L13.3333 15.8332L9.99992 12.4999V14.9999ZM9.99992 3.33325V0.833252L6.66658 4.16658L9.99992 7.49992V4.99992C11.326 4.99992 12.5978 5.5267 13.5355 6.46438C14.4731 7.40207 14.9999 8.67383 14.9999 9.99992C14.9999 10.8333 14.7916 11.6416 14.4166 12.3333L15.6333 13.5499C16.2833 12.5249 16.6666 11.3083 16.6666 9.99992C16.6666 8.23181 15.9642 6.53612 14.714 5.28587C13.4637 4.03563 11.768 3.33325 9.99992 3.33325Z",fill:t||b})})},T=function(e){var t=e.fill,o=e.role;return Object(n.jsx)("svg",{"aria-label":"undo icon",role:o,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M10.1812 7.66667C8.36883 7.66667 6.72741 8.33333 5.46214 9.4L3 7V13H9.15535L6.67953 10.5867C7.63019 9.81333 8.84074 9.33333 10.1812 9.33333C12.6023 9.33333 14.661 10.8733 15.3791 13L17 12.48C16.0493 9.68667 13.3615 7.66667 10.1812 7.66667Z",fill:t||b})})},L=function(e){var t=e.cancelText,o=e.confirmText,i=e.helpLink,s=e.onCancel,a=e.onConfirm,r=e.onUndo,c=e.title;return Object(n.jsx)("div",{className:"note-overlay",children:Object(n.jsxs)("div",{className:"sk-panel note-dialog",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h2",{children:c}),Object(n.jsx)("button",{id:"undoDialog",onClick:r,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsxs)("p",{children:["Need help deciding? Check out the"," ",Object(n.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),"."]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:s,children:Object(n.jsx)("div",{children:t})}),Object(n.jsx)("button",{className:"sk-button info",onClick:a,children:Object(n.jsx)("div",{children:o})})]})})]})})},N=o(242),B="MonacoEditorContainer",D="MonacoDiffEditorContainer";self.MonacoEnvironment={getWorkerUrl:function(e,t){return"json"===t?"./json.worker.bundle.js":"css"===t?"./css.worker.bundle.js":"html"===t?"./html.worker.bundle.js":"typescript"===t||"javascript"===t?"./ts.worker.bundle.js":"./editor.worker.bundle.js"}};var A=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?B:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.tabSize,h=void 0===p?2:p,u=e.text,j=e.theme,g=void 0===j?"vs-dark":j,b=e.viewMode,f=void 0!==b&&b,x=Object(i.useRef)(null);""===s&&(s="16px");var m=!0;return f&&(m=!1),Object(i.useEffect)((function(){return x.current&&((t=N.a.create(x.current,{fontSize:parseInt(s.replace("px","")),language:l,tabSize:h,theme:g,scrollBeyondLastLine:m,value:[u].join("\n"),autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced"})).onKeyDown((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false),e.ctrlKey&&"KeyS"===e.code&&e.preventDefault()})),t.onKeyUp((function(e){!function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&console.log("IKeyboardEvent Up: "+e)}(e.code,false)})),t.onDidChangeModelContent((function(e){d&&d(t.getValue())}))),function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:B,ref:x})},V=function(e){var t,o=e.fontSize,s=void 0===o?"16":o,a=e.id,r=void 0===a?D:a,c=e.language,l=void 0===c?"markdown":c,d=e.saveText,p=e.text,h=e.modifiedText,u=e.theme,j=void 0===u?"vs-dark":u,g=Object(i.useRef)(null);return""===s&&(s="16px"),Object(i.useEffect)((function(){if(g.current){var e=N.a.createModel([p].join("\n"),l),o=N.a.createModel([h].join("\n"),l);(t=N.a.createDiffEditor(g.current,{fontSize:parseInt(s.replace("px","")),theme:j,autoClosingOvertype:"auto",formatOnPaste:!0,formatOnType:!0,wordWrap:"on",wrappingStrategy:"advanced",originalEditable:!0,readOnly:!0})).setModel({original:e,modified:o}),e.onDidChangeContent((function(t){d&&d(e.getValue())}))}return function(){t.dispose()}}),[]),Object(n.jsx)("div",{id:r,className:D,ref:g})},H=o(439),K=o.n(H),I=o(440),F=o.n(I),P=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(){return Object(d.a)(this,o),t.apply(this,arguments)}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.attrs.matches[1];return Object(n.jsx)("iframe",{title:"Youtube Embed ".concat(e),className:this.props.isSelected?"YouTube ProseMirror-selectednode":"YouTube",src:"https://www.youtube.com/embed/".concat(e,"?modestbranding=1")})}}]),o}(i.Component),U=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleToggleReadOnly=function(){n.setState({readOnly:!n.state.readOnly})},n.handleChange=K()((function(e){var t=e();n.props.debugMode&&console.log(t),n.props.onChange(t)}),50),n.state={readOnly:n.props.readOnly,template:!1,value:void 0},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return Object(n.jsx)(F.a,{className:"DynamicEditor",placeholder:"Type '/' to insert...",id:"DynamicEditor",readOnly:this.state.readOnly,readOnlyWriteCheckboxes:!0,value:this.state.value,defaultValue:this.props.text,scrollTo:window.location.hash,onCancel:function(){e.props.debugMode&&console.log("Cancel triggered")},autoFocus:!0,onChange:function(t){return e.handleChange(t)},embeds:[{title:"YouTube",keywords:"youtube video tube google",icon:function(){return Object(n.jsx)("img",{alt:"YouTube Logo",src:"/icons/ic-YouTube.svg",width:24,height:24})},matcher:function(e){return e.match(/(?:https?:\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([a-zA-Z0-9_-]{11})$/i)},component:P}]})}}]),o}(i.Component),z=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.props.saveText(n.state.text)}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.saveText(n.state.text)}))},n.onKeyDown=function(e){n.props.onKeyDown(e),n.props.onKeyDownEditTextArea(e),n.props.onKeyDownTextArea(e)},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsx)("div",{className:"sk-panel main edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:Object(n.jsx)("div",{className:"sk-panel-content edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":""),id:Ge.edit,children:this.props.editingMode===Xe.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e,viewMode:this.props.viewMode}):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)("div",{id:"dynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,text:e,onChange:this.saveText,readOnly:!1})}):Object(n.jsx)("textarea",{id:Ge.editTextArea,name:"text",className:"sk-input contrast textarea editnote",placeholder:"Welcome to the Append Editor! \ud83d\ude04",rows:15,spellCheck:"true",value:e,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})})})}}]),o}(s.a.Component);z.defaultProps={};var R=function(){var e=document.getElementById(Ge.appendButton);e&&e.click()},W=function(){var e=document.getElementById(Ge.editButton);e&&e.click()},_=function(){var e=document.getElementById(Ge.helpButton);e&&e.click()},Z=function(){var e=document.getElementById(Ge.menuButton);e&&e.click()},Y=function(){var e=document.getElementById(Ge.settingsButton);e&&e.click()},G=function(){var e=document.getElementById(Ge.viewButton);e&&e.click()},q=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowFeelings=function(){n.setState({showFeelings:!n.state.showFeelings})},n.onToggleShowMoreQuestions=function(){n.setState({showMoreQuestions:!n.state.showMoreQuestions})},n.onToggleShowFeedback=function(){n.setState({showFeedback:!n.state.showFeedback})},n.state={showFeelings:!1,showMoreQuestions:!1,showFeedback:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return Object(n.jsxs)("div",{id:"help",children:[Object(n.jsx)("hr",{}),Object(n.jsx)("h2",{children:"Append Editor Help"}),Object(n.jsxs)("p",{children:["The Append Editor is an ",Object(n.jsx)("b",{children:"unofficial"})," ",Object(n.jsx)("a",{href:"https://standardnotes.org/help/77/what-are-editors",target:"_blank",rel:"nofollow noreferrer noopener",children:"editor"})," ","for"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app. The Append Editor is also free software licensed under"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/blob/main/LICENSE",target:"_blank",rel:"nofollow noreferrer noopener",children:"AGPL-3.0"}),". Its source code is available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor",target:"_blank",rel:"nofollow noreferrer noopener",children:"GitHub"}),"."]}),Object(n.jsx)("h3",{children:"Append Editor Features"}),Object(n.jsxs)("p",{children:["The Append Editor supports"," ",Object(n.jsx)("a",{href:"https://guides.github.com/features/mastering-markdown/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Markdown"})," ","with"," ",Object(n.jsx)("a",{href:"https://katex.org/docs/support_table.html",target:"_blank",rel:"nofollow noreferrer noopener",children:"KaTeX"}),", syntax highlighting, in-line HTML, table of contents, footnotes, auto-linking,"," ",Object(n.jsx)("a",{href:"https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md",target:"_blank",rel:"nofollow noreferrer noopener",children:"emoji codes"}),", and more."," "]}),Object(n.jsxs)("p",{children:["There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and Monaco. You can read about each mode and choose which to use in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),". You can also choose default and per-note font sizes, font families, and custom styles (CSS)."]}),Object(n.jsxs)("p",{children:["The Menu",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Z,title:"Open the Menu",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(y,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"has additional options to customize the appearance of the editor, share your note, and perform actions to quickly format and edit Markdown text."]}),Object(n.jsxs)("p",{children:["A more detailed documentation of the Append Editor is available at"," ",Object(n.jsx)("a",{href:"https://appendeditor.com",target:"_blank",rel:"noopener noreferrer",children:"appendeditor.com"}),". If you like the Append Editor, please support it by giving it a star on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/stargazers",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," "]}),Object(n.jsx)("h3",{children:"How to install the Append Editor in Standard Notes"}),Object(n.jsxs)("ol",{children:[Object(n.jsxs)("li",{children:["Download, install, and sign in to the Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"Desktop"})," ","app."]}),Object(n.jsxs)("li",{children:["In the bottom left corner of the app, click ",Object(n.jsx)("b",{children:"Extensions"}),"."]}),Object(n.jsxs)("li",{children:["Click ",Object(n.jsx)("b",{children:"Import Extensions"})," and paste the following link into the input box. If you want to use the alpha version, replace"," ",Object(n.jsx)("code",{children:"beta"})," with ",Object(n.jsx)("code",{children:"alpha"}),":"," ",Object(n.jsx)("code",{children:Object(n.jsx)("a",{href:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json",target:"_blank",rel:"noopener noreferrer",children:"https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json"})})]}),Object(n.jsxs)("li",{children:["Press ",Object(n.jsx)("b",{children:"Enter"})," or ",Object(n.jsx)("b",{children:"Return"})," on your keyboard."]}),Object(n.jsxs)("li",{children:["The title of your selected note is near the top of the app. Under the title, click ",Object(n.jsx)("b",{children:"Editor"}),", click ",Object(n.jsx)("b",{children:"Append Editor"}),", and click ",Object(n.jsx)("b",{children:"Continue"})," to begin using the editor. Enjoy!"," ",Object(n.jsx)("span",{role:"img","aria-label":"clap emoji",children:"\ud83d\udc4f"})," "]})]}),Object(n.jsxs)("p",{children:["After you install the editor on the desktop app, it will automatically sync to the"," ",Object(n.jsx)("a",{href:"https://app.standardnotes.org",target:"_blank",rel:"noopener noreferrer",children:"web"})," ","and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/download",target:"_blank",rel:"noopener noreferrer",children:"mobile apps"})," ","after you sign in."]}),Object(n.jsx)("h3",{children:"What to write about"}),Object(n.jsx)("p",{children:"The Append Editor is great for writing articles, blog posts, checklists, code snippets, documentation, emails, essays, journals, lists, logs, notes, tables, todo lists, and much more. Here are some questions to help you get started with today's daily journal:"})," ",Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:"How are you? What's happening?"}),Object(n.jsx)("li",{children:"What might be affecting your mood?"}),Object(n.jsx)("li",{children:"Which feelings fit your mood and to what extent?"}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeelings,children:[Object(n.jsxs)("summary",{children:[!this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Show feelings"})],this.state.showFeelings&&[Object(n.jsx)("p",{className:"link",children:"Hide feelings"})]]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Positive Feelings:"})," bold, calm, cheerful, confident, content, eager, ecstatic, energized, engaged, enthusiastic, excited, grateful, happy, humorous, inspired, joyful, light, lively, loving, motivated, optimistic, passionate, peaceful, playful, proud, reassured, refreshed, relaxed, relieved, satisfied, secure, surprised, thrilled, wonderful"]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Negative Feelings:"})," afraid, angry, annoyed, anxious, ashamed, bored, burnt out, confused, demoralized, depressed, disappointed, disgusted, distraught, embarrassed, empty, exhausted, frustrated, furious, guilty, heavy, insecure, irritated, jealous, jittery, lethargic, lonely, nervous, numb, resentful, sad, self-conscious, sleepy, stressed, tired, winded, worried"]})]}),Object(n.jsx)("li",{children:"What thoughts are contributing to the way you're feeling?"}),Object(n.jsx)("details",{onToggle:this.onToggleShowMoreQuestions,children:Object(n.jsxs)("summary",{children:[!this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show more questions"})],this.state.showMoreQuestions&&[Object(n.jsx)("p",{className:"link",children:"Show fewer questions"})]]})}),this.state.showMoreQuestions&&[Object(n.jsxs)("div",{children:[Object(n.jsx)("li",{children:"What do you hope your life will look like in a week? a month? a year?"}),Object(n.jsx)("li",{children:"What can you do today to make your life the way you want it?"}),Object(n.jsx)("li",{children:"How will you feel when you've realized the goals that you have for yourself?"}),Object(n.jsx)("li",{children:"Who or what do you feel grateful for and why?"}),Object(n.jsx)("li",{children:"What did you enjoy about today?"})]})]]}),Object(n.jsxs)("details",{onToggle:this.onToggleShowFeedback,children:[Object(n.jsx)("summary",{children:Object(n.jsx)("p",{className:"link",children:"Need more help?"})}),this.state.showFeedback&&[Object(n.jsxs)("p",{children:["Feel free to"," ",Object(n.jsx)("a",{href:"https://appendeditor.com/contact",target:"_blank",rel:"noopener noreferrer",children:"reach out"})," ","if you have any questions, comments, concerns, or feedback."," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"}),Object(n.jsx)("br",{}),"If you find any bugs or have a feature request, please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"open an issue on GitHub"}),"."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"}),Object(n.jsx)("br",{}),"You are using version ",Object(n.jsx)("code",{children:"1.2.0"}),". The release notes and change log are available on"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/releases",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),"."]})]]}),"Click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Close Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{fill:"var(--sn-stylekit-info-color)",role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to close this section.",Object(n.jsx)("hr",{})]})}}]),o}(s.a.Component),X=function(e){var t=e.appendMode,o=e.editMode,i=e.showHelp;return Object(n.jsx)("div",{id:"intro",children:Object(n.jsxs)("details",{children:[Object(n.jsxs)("summary",{children:["Welcome to the Append Editor!"," ",Object(n.jsx)("span",{role:"img","aria-label":"wave emoji",children:"\ud83d\udc4b"})," ","Your note is empty."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})," ","Click here to get started."," ",Object(n.jsx)("span",{role:"img","aria-label":"memo emoji",children:"\ud83d\udcdd"})]}),Object(n.jsx)("p",{children:"To get started:"}),Object(n.jsxs)("ul",{children:[Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Pencil",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:W,title:"Toggle Edit Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(C,{condition:o,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Edit Mode"})]})}),Object(n.jsx)("li",{children:Object(n.jsxs)("p",{children:["Click the Plus",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:R,title:"Toggle Append Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(E,{condition:t,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to toggle ",Object(n.jsx)("b",{children:"Append Mode"})]})})]}),Object(n.jsxs)("p",{children:[Object(n.jsx)("b",{children:"View Mode"})," is currently ",Object(n.jsx)("b",{children:"on"}),". When you type in"," ",Object(n.jsx)("b",{children:"Edit Mode"}),", your note will automatically render here. In"," ",Object(n.jsx)("b",{children:"Append Mode"}),", clicking ",Object(n.jsx)("b",{children:"Append"})," will add the text in the textarea to the end of your note. Click the Eye",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:G,title:"Toggle View Mode",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(v,{condition:!0,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"to turn View Mode off and switch to ",Object(n.jsx)("b",{children:"Edit Only Mode"}),"."]}),Object(n.jsxs)("p",{children:["If you are using the demo at"," ",Object(n.jsx)("a",{href:"https://beta.appendeditor.com",target:"_blank",rel:"nofollow noreferrer noopener",children:"beta.appendeditor.com"}),", then your notes will be lost after you close the page."]}),Object(n.jsxs)("p",{children:["If you want to save your notes, then click Help",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:_,title:"Toggle show Help",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(M,{condition:i,role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and follow the instructions on how to install the Append Editor in"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/",target:"_blank",rel:"nofollow noreferrer noopener",children:"Standard Notes"}),", a free,"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software",target:"_blank",rel:"nofollow noreferrer noopener",children:"open-source"}),", and"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption",target:"_blank",rel:"nofollow noreferrer noopener",children:"end-to-end encrypted"})," ","notes app."]}),Object(n.jsxs)("p",{children:["If you like Standard Notes, please check out Standard Notes"," ",Object(n.jsx)("a",{href:"https://standardnotes.org/extensions",target:"_blank",rel:"nofollow noreferrer noopener",children:"Extended"})," ","for more editors, themes, components, and methods to backup up your data."]}),Object(n.jsxs)("p",{children:["Happy note-taking!"," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude04"})]})]})})},Q=o(309),J=o.n(Q),$=o(444),ee=o.n($),te=o(445),oe=o.n(te),ne=o(446),ie=o.n(ne),se=o(278),ae=o(880),re=o(905),ce=o(906),le=o(914),de=o(938),pe=o(1133),he=o(1139),ue=o(1141),je=o(1147),ge=o(1152),be=o(1153),fe=J()().use(ee.a).use(ae).use(re).use(ge).use(ue,{maxDepth:6}).use(he).use(je,{inlineNotes:!0}).use(oe.a,{allowDangerousHtml:!0}).use(be).use(ce).use(le).use(de,{ignoreMissing:!0}).use(pe).use(ie.a,{createElement:s.a.createElement}),xe=function(e){return fe.processSync(e).result},me=Object(se.throttle)((function(e){return e.length>1e4}),1e3),Oe=Object(se.debounce)((function(e){return xe(e)}),500),ve=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).onToggleShowHelp=function(){var e=document.getElementById("helpButton");e&&e.click()},n.renderMarkdown=function(e){return function(e,t){return t?xe(e):me(e)?Oe(e):xe(e)}(e,n.props.bypassDebounce)},n.state={showHelp:n.props.showHelp},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props.text;return Object(n.jsx)("div",{className:"sk-panel main view"+(this.props.printURL?" printURL":""),children:Object(n.jsxs)("div",{className:"sk-panel-content view",id:Ge.view,children:[!e&&[Object(n.jsx)(X,{appendMode:this.props.appendMode,editMode:this.props.editMode,showHelp:this.props.showHelp})],this.state.showHelp&&[Object(n.jsx)(q,{debugMode:this.props.debugMode,printURL:this.props.printURL})],Object(n.jsx)("div",{id:"renderedNote",className:this.props.editingMode===Xe.useDynamicEditor?"":"rendered-note-section",children:this.props.editingMode===Xe.useMonacoEditor&&"markdown"!==this.props.monacoEditorLanguage&&"html"!==this.props.monacoEditorLanguage&&e?this.renderMarkdown("```"+this.props.monacoEditorLanguage+"\n"+e+"\n```"):this.props.editingMode===Xe.useDynamicEditor?Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.props.saveText,readOnly:!0,text:e}):this.renderMarkdown(e)})]})})}}]),o}(s.a.Component),we=o(38),Me=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.autoSaveCheckBoxes()}))},n.handleTextAreaChange=function(e){var t=e.target.value;n.setState({text:t},(function(){n.autoSaveAppendText()}))},n.saveText=function(e){n.setState({text:e},(function(){n.props.autoSaveAppendText(n.state.text)}))},n.appendTextToNote=function(){n.props.appendTextToNote(),n.setState({text:""});var e=document.getElementById(Ge.appendTextArea);e&&e.focus(),n.state.useMonacoEditor&&n.setState({useMonacoEditor:!1},(function(){n.setState({useMonacoEditor:!0})})),n.state.useDynamicEditor&&n.setState({useDynamicEditor:!1},(function(){n.setState({useDynamicEditor:!0})}))},n.autoSaveAppendText=function(){var e=n.state.text;n.props.autoSaveAppendText(e)},n.autoSaveCheckBoxes=function(){var e=n.state.newLine,t=n.state.newParagraph;n.props.autoSaveCheckBoxes(e,t)},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),n.props.debugMode&&(console.log("Keys pressed: "+e.key+"KeyMap for key: "+n.props.keyMap.get(e.key)),console.log("Append Text Value: "+n.state.text)),n.props.onKeyDown(e),n.props.onKeyDownAppendTextArea(e),n.props.onKeyDownTextArea(e),(n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter")||n.props.keyMap.get("Control")&&n.props.keyMap.get("s"))&&(e.preventDefault(),n.appendTextToNote())},n.onKeyUp=function(e){n.props.keyMap.delete(e.key),n.props.onKeyUp(e)},n.state={text:n.props.text,newLine:n.props.appendNewLine,newParagraph:n.props.appendNewParagraph,useMonacoEditor:n.props.editingMode===Xe.useMonacoEditor,useDynamicEditor:n.props.editingMode===Xe.useDynamicEditor},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.state.text;return Object(n.jsxs)("div",{className:"sk-panel main appendix "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":this.props.editingMode===Xe.useDynamicEditor?"dynamicEditor":"otherEditor"),children:[Object(n.jsx)("div",{className:"sk-panel-content edit "+(this.props.editingMode===Xe.useMonacoEditor?"monacoEditor":""),children:this.state.useMonacoEditor?Object(n.jsx)(A,{fontSize:this.props.fontSize,language:this.props.monacoEditorLanguage,saveText:this.saveText,text:e}):this.state.useDynamicEditor?Object(n.jsx)("div",{id:"appendDynamicEditor",children:Object(n.jsx)(U,{debugMode:this.props.debugMode,onChange:this.saveText,readOnly:!1,text:e})}):Object(n.jsx)("textarea",{id:Ge.appendTextArea,name:"text",className:"sk-input contrast textarea append",placeholder:"Append to your note",rows:this.props.appendRows,spellCheck:"true",value:e,onChange:this.handleTextAreaChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})}),Object(n.jsxs)("div",{className:"sk-panel-row",children:[Object(n.jsxs)("form",{className:"checkBoxForm",children:[Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newLine,name:"newLine",type:"checkbox",checked:this.state.newLine,onChange:this.handleInputChange}),"New Line"]}),Object(n.jsx)("br",{}),Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Ge.newParagraph,name:"newParagraph",type:"checkbox",checked:this.state.newParagraph,onChange:this.handleInputChange}),"New Paragraph"]})]}),Object(n.jsx)("div",{className:"sk-button-group stretch",children:Object(n.jsx)("button",{type:"button",id:"appendTextButton",onClick:this.appendTextToNote,className:"sk-button info",children:Object(n.jsx)("div",{children:"Append"})})})]})]})}}]),o}(s.a.Component);Me.defaultProps={};var ye,Ce=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[i?Object(n.jsx)(f,{role:"button"}):Object(n.jsx)(x,{role:"button"}),Object(n.jsx)("p",{className:"chevron-button-caption",children:t})]})},Ee=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(O,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Se=function(e){var t=e.caption,o=e.className,i=e.condition,s=e.messageOn,a=e.messageOff,r=e.onClick,c=e.title;return Object(n.jsxs)("button",{className:o,onClick:r,title:c,children:[Object(n.jsx)(v,{condition:i,role:"button"}),Object(n.jsxs)("span",{className:"button-caption",children:[t,":",Object(n.jsxs)("b",{children:["\xa0",i?s:a]})]})]})},ke=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.onClick,a=e.title;return Object(n.jsxs)("button",{className:o,onClick:s,title:a,children:[Object(n.jsx)(C,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Te=function(e){var t=e.caption,o=e.className,i=e.fill,s=e.id,a=e.onClick,r=e.title;return Object(n.jsxs)("button",{className:o,id:s,onClick:a,title:r,children:[Object(n.jsx)(S,{fill:i,role:"button"}),Object(n.jsx)("span",{className:"button-caption",children:t})]})},Le=function(e){var t=e.className,o=e.fill,i=e.id,s=e.onClick,a=e.title;return Object(n.jsx)("button",{className:t,id:i,onClick:s,title:a,children:Object(n.jsx)(T,{fill:o,role:"button"})})},Ne="editingMode",Be="fontEdit",De="fontSize",Ae="fontView",Ve="monacoEditorLanguage",He="resetAllSettings",Ke="saveAsDefault",Ie=new RegExp(/```css\n/gm),Fe=new RegExp(/```css/gm),Pe=new RegExp(/\n```/gm),Ue=new RegExp(/```/gm),ze=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;Object(d.a)(this,o),(n=t.call(this,e)).handleInputChange=function(e){var t=e.target,o="checkbox"===t.type?t.checked:t.value,i=t.name;n.setState(Object(we.a)({},i,o)),n.props.debugMode&&console.log("Settings event name: "+e.target.name+" Value: "+e.target.value)},n.handleSelectChange=function(e){var t=e.target,o=t.value,i=t.name;n.setState(Object(we.a)({},i,o),(function(){n.props.debugMode&&console.log("Saved select. Name: "+e.target.name+" Value: "+e.target.value)}))},n.toggleShowCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles})},n.cleanCustomStyles=function(e){return e?e.replace(Ie,"").replace(Fe,"").replace(Pe,"").replace(Ue,""):e},n.saveText=function(e){n.setState({customStyles:e})},n.handleSubmit=function(){if(n.props.debugMode){var e="",t="";""===n.state.fontEdit||void 0===n.state.fontEdit?e="Default":n.state.fontEdit&&(e=n.state.fontEdit),""===n.state.fontView||void 0===n.state.fontView?t="Default":n.state.fontView&&(t=n.state.fontView),console.log("Settings.tsx handleSubmit() triggered: \n - Settings editingMode: "+n.state.editingMode+"\n - Settings fontEdit: "+n.state.fontEdit+"\n - Settings fontView: "+n.state.fontView+"\n - Your chosen font for Edit/Append is: "+e+"\n - Your chosen font for View/Print is: "+t+"\n")}n.setState({customStyles:n.cleanCustomStyles(n.state.customStyles)},(function(){n.props.debugMode&&console.log("Your custom styles: "+n.state.customStyles);var e=n.state,t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.props.onConfirm({customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,saveAsDefault:c})}))},n.loadDefaultSettings=function(){var e=n.props.defaultSettings;n.setState(Object(l.a)({},e),(function(){n.refreshCustomStyles()}))},n.refreshCustomStyles=function(){n.setState({showCustomStyles:!n.state.showCustomStyles},(function(){n.setState({showCustomStyles:!n.state.showCustomStyles})}))},n.clearCustomStyles=function(){n.setState({customStyles:""},(function(){n.refreshCustomStyles(),n.props.debugMode&&console.log("customStyles reset: "+n.state.customStyles)}));var e=document.getElementById("customStyles");e&&(e.value="",e.focus())},n.clearFontEdit=function(){n.setState({fontEdit:""});var e=document.getElementById(Be);e&&(e.value="",e.focus())},n.clearFontSize=function(){n.setState({fontSize:""});var e=document.getElementById(De);e&&(e.value="",e.focus())},n.clearFontView=function(){n.setState({fontView:""});var e=document.getElementById(Ae);e&&(e.value="",e.focus())},n.clearEditingMode=function(){n.setState({editingMode:Xe.usePlainText})},n.clearMonacoEditorLanguage=function(){n.setState({monacoEditorLanguage:"markdown"});var e=document.getElementById(Ve);e&&(e.value="markdown",e.focus())},n.clearSaveAsDefault=function(){n.setState({saveAsDefault:!1});var e=document.getElementById(Ke);e.checked=!1,e.focus()},n.clearAllSettings=function(){n.clearSaveAsDefault(),n.clearCustomStyles(),n.clearFontView(),n.clearFontEdit(),n.clearFontSize(),n.clearMonacoEditorLanguage(),n.clearEditingMode();var e=document.getElementById(He);e&&e.focus()},n.onKeyDown=function(e){n.props.keyMap.set(e.key,!0),(n.props.keyMap.get("Control")&&n.props.keyMap.get("s")||n.props.keyMap.get("Control")&&n.props.keyMap.get("Enter"))&&(e.preventDefault(),n.handleSubmit())},n.onKeyUp=function(e){n.props.keyMap.set(e.key,!1)},n.onBlur=function(e){n.props.keyMap.clear()},n.componentWillUnmount=function(){n.props.keyMap.clear()};var i="markdown";n.props.monacoEditorLanguage&&(i=n.props.monacoEditorLanguage);var s="usePlainText";return n.props.editingMode&&(s=n.props.editingMode),n.state={customStyles:n.props.customStyles,editingMode:s,fontEdit:n.props.fontEdit,fontSize:n.props.fontSize,fontView:n.props.fontView,monacoEditorLanguage:i,saveAsDefault:!1,showCustomStyles:!1},n}return Object(p.a)(o,[{key:"render",value:function(){var e=this.props,t=e.title,o=e.onCancel,i=e.confirmText,s=e.cancelText,a=e.helpLink;return Object(n.jsxs)("div",{id:"settings",className:"sk-panel main settings",children:[Object(n.jsx)("div",{className:"sk-panel-content",children:Object(n.jsxs)("div",{className:"sk-panel-section",children:[Object(n.jsxs)("datalist",{id:"fonts",children:[Object(n.jsx)("option",{value:'SFMono-Regular, Consolas, Liberation Mono, Menlo, "Ubuntu Mono", courier, monospace;'}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Arial"}),Object(n.jsx)("option",{value:"Arial Black"}),Object(n.jsx)("option",{value:"-apple-system"}),Object(n.jsx)("option",{value:"Bell MT"}),Object(n.jsx)("option",{value:"Baskerville Old Face"}),Object(n.jsx)("option",{value:"Bahnschrift Light"}),Object(n.jsx)("option",{value:"BlinkMacSystemFont"}),Object(n.jsx)("option",{value:"Bodoni MT"}),Object(n.jsx)("option",{value:"Calibri"}),Object(n.jsx)("option",{value:"Calibri Light"}),Object(n.jsx)("option",{value:"Calisto MT"}),Object(n.jsx)("option",{value:"Cambria"}),Object(n.jsx)("option",{value:"Candara"}),Object(n.jsx)("option",{value:"Candara Light"}),Object(n.jsx)("option",{value:"Cantarell"}),Object(n.jsx)("option",{value:"Centaur"}),Object(n.jsx)("option",{value:"Century"}),Object(n.jsx)("option",{value:"Century Gothic"}),Object(n.jsx)("option",{value:"Comic Sans MS"}),Object(n.jsx)("option",{value:"Consolas"}),Object(n.jsx)("option",{value:"Constantia"}),Object(n.jsx)("option",{value:"Courier New"}),Object(n.jsx)("option",{value:"Corbel"}),Object(n.jsx)("option",{value:"Corbel Light"}),Object(n.jsx)("option",{value:"DengXian"}),Object(n.jsx)("option",{value:"Ebrima"}),Object(n.jsx)("option",{value:"Droid Sans"}),Object(n.jsx)("option",{value:"Fira Sans"}),Object(n.jsx)("option",{value:"Gabriola"}),Object(n.jsx)("option",{value:"Garamond"}),Object(n.jsx)("option",{value:"Georgia"}),Object(n.jsx)("option",{value:"Helvetica"}),Object(n.jsx)("option",{value:"Helvetica Neue"}),Object(n.jsx)("option",{value:"Impact"}),Object(n.jsx)("option",{value:"KaTeX_AMS"}),Object(n.jsx)("option",{value:"KaTeX_Caligraphic"}),Object(n.jsx)("option",{value:"KaTeX_Fraktur"}),Object(n.jsx)("option",{value:"KaTeX_Main"}),Object(n.jsx)("option",{value:"KaTeX_Math"}),Object(n.jsx)("option",{value:"KaTeX_SansSerif"}),Object(n.jsx)("option",{value:"KaTeX_Script"}),Object(n.jsx)("option",{value:"KaTeX_Typewriter"}),Object(n.jsx)("option",{value:"Lato"}),Object(n.jsx)("option",{value:"Liberation Mono"}),Object(n.jsx)("option",{value:"Lucida Caligraphy"}),Object(n.jsx)("option",{value:"Lucida Sans"}),Object(n.jsx)("option",{value:"Menlo"}),Object(n.jsx)("option",{value:"Monaco"}),Object(n.jsx)("option",{value:"Monospace"}),Object(n.jsx)("option",{value:"New York"}),Object(n.jsx)("option",{value:"Oxygen"}),Object(n.jsx)("option",{value:"Palatino"}),Object(n.jsx)("option",{value:"Roboto"}),Object(n.jsx)("option",{value:"Sans-Serif"}),Object(n.jsx)("option",{value:"Segoe UI"}),Object(n.jsx)("option",{value:"SFMono-Regular"}),Object(n.jsx)("option",{value:"Serif"}),Object(n.jsx)("option",{value:"Sylfaen"}),Object(n.jsx)("option",{value:"Tahoma"}),Object(n.jsx)("option",{value:"Times New Roman"}),Object(n.jsx)("option",{value:"Trebuchet MS"}),Object(n.jsx)("option",{value:"Ubuntu"}),Object(n.jsx)("option",{value:"Verdana"}),Object(n.jsx)("option",{value:"Yu Gothic"})]}),Object(n.jsxs)("div",{className:"sk-panel-row title-section",children:[Object(n.jsx)("h1",{children:t}),Object(n.jsx)("button",{id:"undoDialog",onClick:o,title:"Close",children:Object(n.jsx)(m,{role:"button"})})]}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsxs)("p",{children:["Need help? Check out the"," ",Object(n.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:"documentation"}),". To clear all settings, click undo:\xa0"]}),Object(n.jsx)(Le,{onClick:this.clearAllSettings,title:"Reset all Settings",id:He})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"To load your personal default settings, click:\xa0"}),Object(n.jsx)("button",{onClick:this.loadDefaultSettings,title:"Load personal default settings",children:Object(n.jsx)(k,{role:"button"})})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("div",{className:"text-and-undo-button",children:[Object(n.jsx)("p",{children:"Editing Mode: "}),Object(n.jsx)(Le,{onClick:this.clearEditingMode,title:"Reset Editing Mode to Plain Textarea"})]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.usePlainText,name:Ne,value:Xe.usePlainText,className:"radio",type:"radio",checked:this.state.editingMode===Xe.usePlainText,onChange:this.handleInputChange}),"Plain Textarea: standard textarea with spellcheck (default, mobile recommended)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useCodeMirror,name:Ne,value:Xe.useCodeMirror,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useCodeMirror,onChange:this.handleInputChange}),"CodeMirror: in-line formatting for Markdown"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{children:[Object(n.jsx)("input",{id:Xe.useDynamicEditor,name:Ne,value:Xe.useDynamicEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useDynamicEditor,onChange:this.handleInputChange}),"Dynamic: live formatting for Markdown. ",Object(n.jsx)("b",{children:"warning: "}),"existing Markdown may break (not compatible with KaTeX, lists may not render properly; desktop and mobile compatible)"]})}),Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsxs)("label",{htmlFor:Xe.useMonacoEditor,children:[Object(n.jsx)("input",{id:Xe.useMonacoEditor,name:Ne,value:Xe.useMonacoEditor,type:"radio",className:"radio",checked:this.state.editingMode===Xe.useMonacoEditor,onChange:this.handleInputChange}),"Monaco: syntax highlighting for Markdown and many other programming languages, intelligent auto-completion, sophisticated search and replace (desktop recommended)"]})}),this.state.editingMode===Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ve,children:["Monaco Editor Language:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{children:Object(n.jsxs)("select",{id:Ve,name:Ve,value:this.state.monacoEditorLanguage,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{children:"abap"}),Object(n.jsx)("option",{children:"aes"}),Object(n.jsx)("option",{children:"apex"}),Object(n.jsx)("option",{children:"azcli"}),Object(n.jsx)("option",{children:"bat"}),Object(n.jsx)("option",{children:"c"}),Object(n.jsx)("option",{children:"cameligo"}),Object(n.jsx)("option",{children:"clojure"}),Object(n.jsx)("option",{children:"coffeescript"}),Object(n.jsx)("option",{children:"cpp"}),Object(n.jsx)("option",{children:"csharp"}),Object(n.jsx)("option",{children:"csp"}),Object(n.jsx)("option",{children:"css"}),Object(n.jsx)("option",{children:"dart"}),Object(n.jsx)("option",{children:"dockerfile"}),Object(n.jsx)("option",{children:"fsharp"}),Object(n.jsx)("option",{children:"go"}),Object(n.jsx)("option",{children:"graphql"}),Object(n.jsx)("option",{children:"handlebars"}),Object(n.jsx)("option",{children:"hcl"}),Object(n.jsx)("option",{children:"html"}),Object(n.jsx)("option",{children:"ini"}),Object(n.jsx)("option",{children:"java"}),Object(n.jsx)("option",{children:"javascript"}),Object(n.jsx)("option",{children:"json"}),Object(n.jsx)("option",{children:"julia"}),Object(n.jsx)("option",{children:"kotlin"}),Object(n.jsx)("option",{children:"less"}),Object(n.jsx)("option",{children:"lexon"}),Object(n.jsx)("option",{children:"lua"}),Object(n.jsx)("option",{children:"markdown"}),Object(n.jsx)("option",{children:"mips"}),Object(n.jsx)("option",{children:"msdax"}),Object(n.jsx)("option",{children:"mysql"}),Object(n.jsx)("option",{children:"objective-c"}),Object(n.jsx)("option",{children:"pascal"}),Object(n.jsx)("option",{children:"pascaligo"}),Object(n.jsx)("option",{children:"perl"}),Object(n.jsx)("option",{children:"pgsql"}),Object(n.jsx)("option",{children:"php"}),Object(n.jsx)("option",{children:"plaintext"}),Object(n.jsx)("option",{children:"postiats"}),Object(n.jsx)("option",{children:"powerquery"}),Object(n.jsx)("option",{children:"powershell"}),Object(n.jsx)("option",{children:"pug"}),Object(n.jsx)("option",{children:"python"}),Object(n.jsx)("option",{children:"r"}),Object(n.jsx)("option",{children:"razor"}),Object(n.jsx)("option",{children:"redis"}),Object(n.jsx)("option",{children:"redshift"}),Object(n.jsx)("option",{children:"restructuredtext"}),Object(n.jsx)("option",{children:"ruby"}),Object(n.jsx)("option",{children:"rust"}),Object(n.jsx)("option",{children:"sb"}),Object(n.jsx)("option",{children:"scala"}),Object(n.jsx)("option",{children:"scheme"}),Object(n.jsx)("option",{children:"scss"}),Object(n.jsx)("option",{children:"shell"}),Object(n.jsx)("option",{children:"sol"}),Object(n.jsx)("option",{children:"sql"}),Object(n.jsx)("option",{children:"st"}),Object(n.jsx)("option",{children:"swift"}),Object(n.jsx)("option",{children:"systemverilog"}),Object(n.jsx)("option",{children:"tcl"}),Object(n.jsx)("option",{children:"twig"}),Object(n.jsx)("option",{children:"typescript"}),Object(n.jsx)("option",{children:"vb"}),Object(n.jsx)("option",{children:"verilog"}),Object(n.jsx)("option",{children:"xml"}),Object(n.jsx)("option",{children:"yaml"})]})}),Object(n.jsx)(Le,{onClick:this.clearMonacoEditorLanguage,title:"Reset Monaco Editor Language to Markdown"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsx)("label",{htmlFor:De,children:"Choose a base font size: "}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsxs)("select",{id:De,name:De,value:this.state.fontSize,onChange:this.handleSelectChange,children:[Object(n.jsx)("option",{}),Object(n.jsx)("option",{children:"12px"}),Object(n.jsx)("option",{children:"13px"}),Object(n.jsx)("option",{children:"14px"}),Object(n.jsx)("option",{children:"15px"}),Object(n.jsx)("option",{children:"16px"}),Object(n.jsx)("option",{children:"17px"}),Object(n.jsx)("option",{children:"18px"}),Object(n.jsx)("option",{children:"19px"}),Object(n.jsx)("option",{children:"20px"}),Object(n.jsx)("option",{children:"21px"}),Object(n.jsx)("option",{children:"22px"}),Object(n.jsx)("option",{children:"23px"}),Object(n.jsx)("option",{children:"24px"}),Object(n.jsx)("option",{children:"25px"}),Object(n.jsx)("option",{children:"26px"}),Object(n.jsx)("option",{children:"27px"}),Object(n.jsx)("option",{children:"28px"}),Object(n.jsx)("option",{children:"29px"}),Object(n.jsx)("option",{children:"30px"})]}),Object(n.jsx)(Le,{onClick:this.clearFontSize,title:"Reset font size to 16px"})]})]}),this.state.editingMode!==Xe.useMonacoEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Be,children:["Choose a font for Edit/Append:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Be,name:Be,value:this.state.fontEdit,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontEdit,title:"Reset font for Edit/Append"})]})]})],this.state.editingMode!==Xe.useDynamicEditor&&[Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ae,children:["Choose a font for View/Print:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("input",{list:"fonts",id:Ae,name:Ae,value:this.state.fontView,onChange:this.handleInputChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,type:"text"}),Object(n.jsx)(Le,{onClick:this.clearFontView,title:"Reset font for View/Print"})]})]})],Object(n.jsxs)("section",{className:"sk-panel-row settings custom-css",children:[Object(n.jsx)(Ce,{caption:"Add custom styles (CSS):",className:"chevron-toggle-button",condition:this.state.showCustomStyles,onClick:this.toggleShowCustomStyles,title:"Toggle show add custom styles (CSS)"}),this.state.showCustomStyles&&[Object(n.jsx)(Le,{className:"custom-css-undo-button",onClick:this.clearCustomStyles,title:"Reset custom styles (CSS)"})]]}),this.state.showCustomStyles&&[Object(n.jsx)("section",{className:"sk-panel-row settings",children:Object(n.jsx)(A,{tabSize:2,language:"css",text:this.state.customStyles,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,saveText:this.saveText})})],Object(n.jsxs)("section",{className:"sk-panel-row settings",children:[Object(n.jsxs)("label",{htmlFor:Ke,children:["Save these settings as your personal default:"," "]}),Object(n.jsxs)("div",{className:"input-and-undo-button",children:[Object(n.jsx)("label",{className:"checkbox-input-label",children:Object(n.jsx)("input",{id:Ke,name:Ke,type:"checkbox",checked:this.state.saveAsDefault,onChange:this.handleInputChange})}),Object(n.jsx)(Le,{onClick:this.clearSaveAsDefault,title:"Clear save as default"})]})]})]})}),Object(n.jsx)("div",{className:"sk-panel-footer",children:Object(n.jsxs)("div",{className:"sk-button-group stretch",children:[Object(n.jsx)("button",{className:"sk-button neutral",onClick:o,children:Object(n.jsx)("div",{children:s})}),Object(n.jsx)("button",{className:"sk-button info",onClick:this.handleSubmit,children:Object(n.jsx)("div",{children:i})})]})})]})}}]),o}(s.a.Component),Re=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).state={hasError:!1},n}return Object(p.a)(o,[{key:"componentDidCatch",value:function(e,t){console.log("Error:",e,"\nError Info:",t),this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e,t;return this.state.hasError?Object(n.jsx)("div",{className:"sk-panel main",children:Object(n.jsx)("div",{className:"sk-panel-content view",children:Object(n.jsxs)("div",{id:"errorBoundary",children:[Object(n.jsx)("h1",{children:"Something went wrong."}),Object(n.jsxs)("p",{children:["Error Name: ",Object(n.jsx)("code",{children:null===(e=this.state.error)||void 0===e?void 0:e.name})]}),Object(n.jsxs)("p",{children:["Error Message: ",Object(n.jsx)("code",{children:null===(t=this.state.error)||void 0===t?void 0:t.message})]}),Object(n.jsx)("p",{children:"Please see the developer console for details."}),Object(n.jsx)("hr",{}),Object(n.jsxs)("p",{children:["Errors such as ",Object(n.jsx)("code",{children:"TypeError"})," and"," ",Object(n.jsx)("code",{children:"Cannot read property 'type' of undefined"})," usually occur when the editor is unable to process and render your notes because it contains incorrect or incomplete HTML. If you are writing in HTML, then please continue to write and refresh the View Mode when the HTML tags are closed."]}),Object(n.jsxs)("p",{children:["If you are using the Dynamic editing mode, then please switch to the Plain Textarea or Monaco editing modes in the Settings",Object(n.jsxs)("button",{className:"inline-text-and-svg",onClick:Y,title:"Open Settings",children:[Object(n.jsx)("span",{children:"\xa0"}),Object(n.jsx)(w,{role:"button"}),Object(n.jsx)("span",{children:"\xa0"})]}),"and remove or fix the text that is causing the error."]}),Object(n.jsxs)("p",{children:["If the error persists or is not related to the content of your note, then please"," ",Object(n.jsx)("a",{href:"https://github.com/TheodoreChu/append-editor/issues",target:"_blank",rel:"noopener noreferrer",children:"report the issue on GitHub"})," ","and we will try to fix it."," ",Object(n.jsx)("span",{role:"img","aria-label":"smile emoji",children:"\ud83d\ude42"})]})]})})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),o}(s.a.Component),We=o(447),_e=o.n(We),Ze=o(448),Ye=o.n(Ze);!function(e){e.chevronToggleButton="menu-button chevron-toggle-button",e.menuButton="menu-button",e.on=" on",e.off=" off"}(ye||(ye={}));var Ge,qe,Xe,Qe=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).clearTooltipTimer=void 0,n.resetMessageTimer=function(){n.clearTooltipTimer&&clearTimeout(n.clearTooltipTimer),n.clearTooltipTimer=setTimeout((function(){n.setState({displayMessageEdit:!1,displayMessageShare:!1})}),5e3)},n.showMessageEdit=function(){n.setState({displayMessageEdit:!0,displayMessageShare:!1},(function(){n.resetMessageTimer()}))},n.showMessageShare=function(){n.setState({displayMessageEdit:!1,displayMessageShare:!0},(function(){n.resetMessageTimer()}))},n.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),n.showMessageShare(),t.remove()},n.copyText=function(){n.props.text?n.setState({message:"Copied Text to clipboard"},(function(){n.copyToClipboard(n.props.text)})):n.setState({message:"No text to copy. Your note is empty"},(function(){n.showMessageShare()}))},n.copyHtml=function(){if(n.props.viewMode)if(n.props.text){var e,t=document.getElementById("renderedNote");(null===t||void 0===t||null===(e=t.firstElementChild)||void 0===e?void 0:e.innerHTML)&&(n.setState({message:"Copied HTML to clipboard"}),n.copyToClipboard(null===t||void 0===t?void 0:t.firstElementChild.innerHTML))}else n.setState({message:"No HTML to copy. Your note is empty"},(function(){n.showMessageShare()}));else n.setState({message:"Unable to copy HTML. Please turn View Mode on"},(function(){return n.showMessageShare()}))},n.formatText=function(){"markdown"!==n.props.monacoEditorLanguage&&n.props.editingMode===Xe.useMonacoEditor?n.setState({message:"Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown"},(function(){n.showMessageEdit()})):n.props.text?n.setState({message:"Formatted Markdown text with Prettier"},(function(){try{var e=_e.a.format(n.props.text,{parser:"markdown",plugins:[Ye.a]});n.props.saveText(e),n.props.refreshEdit(),n.props.refreshView(),n.showMessageEdit()}catch(t){n.setState({message:"Error formatting text: "+t},(function(){n.showMessageEdit()})),console.log("Error formatting text: "+t)}})):n.setState({message:"No text to format. Your note is empty"},(function(){n.showMessageEdit()}))},n.uncheckBoxes=function(){var e=n.props.text,t=new RegExp(/- \[x\]/gm);if(t.test(e)){var o=e.replace(t,"- [ ]");n.props.saveText(o),n.props.refreshEdit(),n.props.refreshView(),n.setState({message:"Unchecked all checkboxes"},(function(){n.showMessageEdit()}))}else n.setState({message:"No checked checkboxes found"},(function(){n.showMessageEdit()}))},n.state={message:"",displayMessageEdit:!1,displayMessageShare:!1},n}return Object(p.a)(o,[{key:"render",value:function(){return[Object(n.jsx)("div",{className:"menu-overlay",onClick:this.props.toggleShowMenu}),Object(n.jsxs)("div",{id:"menu",children:[Object(n.jsx)(Ce,{caption:"Appearance",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsView,onClick:this.props.toggleShowMenuOptionsView,title:"Toggle show options for the appearance of the editor"}),this.props.showMenuOptionsView&&[Object(n.jsx)(Se,{caption:"Borderless",className:ye.menuButton+(this.props.borderlessMode?ye.on:ye.off),condition:this.props.borderlessMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleBorderlessMode,title:"Toggle Borderless Mode. Blends borders and margins into the background for a cleaner look"}),Object(n.jsx)(Se,{caption:"Fixed Height",className:ye.menuButton+(this.props.fixedHeightMode?ye.on:ye.off),condition:this.props.fixedHeightMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFixedHeightMode,title:"Toggle Fixed Height Mode. Limits the height of the content container for easier side-by-side editing"}),Object(n.jsx)(Se,{caption:"Full Width",className:ye.menuButton+(this.props.fullWidthMode?ye.on:ye.off),condition:this.props.fullWidthMode,messageOn:"on",messageOff:"off",onClick:this.props.toggleFullWidthMode,title:"Toggle Full Width Mode for unrestricted editing. Borderless mode plus unset maximum container widths"}),Object(n.jsx)(Se,{caption:"Horizontal Overflow",className:ye.menuButton+(this.props.overflowMode?ye.on:ye.off),condition:this.props.overflowMode,messageOn:"visible",messageOff:"auto",onClick:this.props.toggleOverflowMode,title:"Toggle Horizontal Overflow. Visible is great for editing and viewing large tables and preformatted text. Works best with Full Width mode"})],Object(n.jsx)(Ce,{caption:"Share",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsShare,onClick:this.props.toggleShowMenuOptionsShare,title:"Toggle show options to share your note"}),this.props.showMenuOptionsShare&&[Object(n.jsx)(Ee,{caption:"Copy note text",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyText,title:"Copy the text of your note to your device's clipboard"}),Object(n.jsx)(Ee,{caption:"Copy rendered HTML",className:ye.menuButton,fill:"var(--sn-stylekit-success-color)",onClick:this.copyHtml,title:"Copy the rendered HTML from your note text to your device's clipboard"}),Object(n.jsx)(Te,{caption:"Print rendered note",className:"menu-button off",fill:"var(--sn-stylekit-foreground-color)",id:Ge.printButton,onClick:this.props.onConfirmPrintUrl,title:"Print rendered note. Works best on the web app in Chromium browsers (e.g., MS Edge, Google Chrome). Not available on mobile"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageShare?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)(Ce,{caption:"Actions",className:ye.chevronToggleButton,condition:this.props.showMenuOptionsEdit,onClick:this.props.toggleShowMenuOptionsEdit,title:"Toggle show actions to quickly format and edit your note"}),this.props.showMenuOptionsEdit&&[Object(n.jsx)(ke,{caption:"Format Markdown text",className:ye.menuButton,fill:"var(--sn-stylekit-warning-color)",onClick:this.formatText,title:"Format Markdown text with Prettier. WARNING: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)(ke,{caption:"Uncheck all checkboxes",className:ye.menuButton,fill:"var(--sn-stylekit-danger-color)",onClick:this.uncheckBoxes,title:"Uncheck all checkboxes. DANGER: this may cause undesired changes to your note text. Use the Note History feature to revert unwanted changes"}),Object(n.jsx)("div",{className:"notification ".concat(this.state.displayMessageEdit?"visible":"hidden"),children:Object(n.jsx)("p",{children:Object(n.jsx)("b",{children:this.state.message})})})],Object(n.jsx)("div",{className:"extra-space"})]})]}}]),o}(s.a.Component),Je=o(108),$e=o.n(Je);o(1161),o(1166),o(1167),o(1168),o(437),o(1170),o(305),o(304),o(1171);!function(e){e.appendButton="appendButton",e.appendTextArea="appendTextArea",e.appendix="appendix",e.content="content",e.edit="edit",e.editButton="editButton",e.editTextArea="editTextArea",e.header="header",e.helpButton="helpButton",e.menuButton="menuButton",e.newLine="newLine",e.newParagraph="newParagraph",e.printButton="printButton",e.settingsButton="settingsButton",e.view="view",e.viewButton="viewButton"}(Ge||(Ge={})),function(e){e.fixed="fixed",e.fixedHeader="fixed-header"}(qe||(qe={})),function(e){e.usePlainText="usePlainText",e.useCodeMirror="useCodeMirror",e.useDynamicEditor="useDynamicEditor",e.useMonacoEditor="useMonacoEditor"}(Xe||(Xe={}));var et={text:"",appendNewLine:!1,appendNewParagraph:!1,appendMode:!1,appendRows:8,appendText:"",bypassDebounce:!1,confirmPrintUrl:!1,customStyles:"",defaultSettings:{customStyles:"",editingMode:"usePlainText",fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown"},fontEdit:"",fontSize:"",fontView:"",monacoEditorLanguage:"markdown",printURL:!0,refreshEdit:!1,refreshView:!1,showAppendix:!0,showHeader:!0,showHelp:!1,showDiff:!1,settingsMode:!1},tt=0,ot=!1,nt=new Map,it=function(e){Object(h.a)(o,e);var t=Object(u.a)(o);function o(e){var n;return Object(d.a)(this,o),(n=t.call(this,e)).editorKit=void 0,n.refreshEditorTimer=void 0,n.saveTimer=void 0,n.componentDidMount=function(){n.onViewMode(),n.loadDefaultMenuState(),document.addEventListener("scroll",n.onScroll)},n.componentWillUnmount=function(){document.removeEventListener("scroll",n.onScroll)},n.configureEditorKit=function(){var e=new j.EditorKitDelegate({setEditorRawText:function(e){n.setState(Object(l.a)(Object(l.a)({},et),{},{bypassDebounce:!0,text:e}),(function(){me.cancel(),me(e),me.flush(),Oe.cancel(),me(e)&&(Oe(e),Oe.flush()),n.state.savingEditorOptions||(n.loadEditorOptions(),n.loadDefaultSettings(),n.loadMetaData()),setTimeout((function(){n.setState({bypassDebounce:!1})}),1e3)}))},clearUndoHistory:function(){},getElementsBySelector:function(){return[]}});n.editorKit=new j.EditorKit({delegate:e,mode:"plaintext",supportsFilesafe:!1})},n.refreshEditor=function(){me(n.state.text)?(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),20)):(n.refreshEditorTimer&&clearTimeout(n.refreshEditorTimer),n.refreshEditorTimer=setTimeout((function(){n.state.savingEditorOptions||(n.refreshEdit(),n.refreshView(),n.activateStyles())}),10))},n.loadDefaultSettings=function(){try{var e=n.editorKit.internal.componentManager.componentDataValueForKey("defaultSettings"),t=n.editorKit.internal.componentManager.componentDataValueForKey("editingMode");if(void 0!==e){var o=JSON.parse(e);ot,n.setState({customStyles:o.customStyles,editingMode:o.editingMode,fontEdit:o.fontEdit,fontSize:o.fontSize,fontView:o.fontView,monacoEditorLanguage:o.monacoEditorLanguage,defaultSettings:o},(function(){n.refreshEditor()}))}else if(void 0!==t){var i=n.editorKit.internal.componentManager.componentDataValueForKey("customStyles"),s=n.editorKit.internal.componentManager.componentDataValueForKey("fontEdit"),a=n.editorKit.internal.componentManager.componentDataValueForKey("fontSize"),r=n.editorKit.internal.componentManager.componentDataValueForKey("fontView"),c=n.editorKit.internal.componentManager.componentDataValueForKey("monacoEditorLanguage");ot,n.setState({customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c,defaultSettings:{customStyles:i,editingMode:t,fontEdit:s,fontSize:a,fontView:r,monacoEditorLanguage:c}},(function(){n.refreshEditor()}))}else n.refreshEditor()}catch(l){console.log("Error loading default settings:",l)}},n.loadEditorOptions=function(){try{var e=n.editorKit.internal.componentManager.componentDataValueForKey("menuOptions");if(void 0!==e){var t=JSON.parse(e);n.setState({borderlessMode:t.borderlessMode,fixedHeightMode:t.fixedHeightMode,fullWidthMode:t.fullWidthMode,overflowMode:t.overflowMode},(function(){n.refreshEditor()}))}}catch(o){console.log("Error loading editor options:",o)}},n.loadMetaData=function(){n.editorKit.internal.componentManager.streamContextItem((function(e){(e.content.appendEditorCustomStyles||e.content.appendEditorEditingMode||e.content.appendEditorFontEdit||e.content.appendEditorFontSize||e.content.appendEditorFontView||e.content.appendEditorMonacoEditorLanguage)&&n.setState({customStyles:e.content.appendEditorCustomStyles,editingMode:e.content.appendEditorEditingMode,fontEdit:e.content.appendEditorFontEdit,fontSize:e.content.appendEditorFontSize,fontView:e.content.appendEditorFontView,monacoEditorLanguage:e.content.appendEditorMonacoEditorLanguage},(function(){n.refreshEditor()})),(e.content.appendNewLine||e.content.appendNewParagraph)&&n.setState({appendNewLine:e.content.appendNewLine,appendNewParagraph:e.content.appendNewParagraph}),n.setState({appendText:e.content.appendText},(function(){n.state.text||n.state.appendText||n.state.editMode||n.onEditMode()}))}))},n.saveText=function(e){n.saveNote(e),n.setState({text:e},(function(){n.state.editingMode===Xe.useDynamicEditor?n.refreshView():n.state.viewMode&&me(e)&&(n.saveTimer&&clearTimeout(n.saveTimer),n.saveTimer=setTimeout((function(){if(n.state.fixedHeightMode){var e=document.getElementById(Ge.view);if(e){var t=e.scrollTop;n.refreshView();var o=document.getElementById(Ge.view);o&&(o.scrollTop=t)}else n.refreshView()}else n.refreshView()}),550))}))},n.saveNote=function(e){try{n.editorKit.onEditorValueChanged(e)}catch(t){console.log("Error saving note:",t)}},n.appendTextToNote=function(){if(n.state.appendText){var e=n.state.appendText,t="";t=n.state.appendNewParagraph?" \n\n"+e:n.state.appendNewLine?" \n"+e:e,n.setState({text:n.state.text.concat(t),appendText:""},(function(){var e=n.editorKit.internal.note;e&&n.editorKit.internal.componentManager.saveItemWithPresave(e,(function(){e.content.text=n.state.text,e.content.appendText=n.state.appendText})),n.refreshEdit(),n.state.editingMode===Xe.useDynamicEditor?(n.refreshView(),setTimeout((function(){n.skipToBottom()}),50)):me(n.state.text)?setTimeout((function(){n.refreshView(),n.skipToBottom()}),550):n.skipToBottom()}))}n.state.appendCodeMirror&&n.state.editingMode===Xe.useCodeMirror&&n.state.appendCodeMirror.setValue("")},n.autoSaveAppendText=function(e){n.setState({appendText:e});try{var t=n.editorKit.internal.note;t&&n.editorKit.internal.componentManager.saveItemWithPresave(t,(function(){t.content.appendText=e}))}catch(o){console.log("Error saving appendText:",o)}},n.autoSaveCheckBoxes=function(e,t){n.setState({appendNewLine:e,appendNewParagraph:t});try{var o=n.editorKit.internal.note;o&&n.editorKit.internal.componentManager.saveItemWithPresave(o,(function(){o.content.appendNewLine=e,o.content.appendNewParagraph=t}))}catch(i){console.log("Error saving checkboxes:",i)}},n.refreshEdit=function(){n.setState({refreshEdit:!n.state.refreshEdit},(function(){document.getElementById(Ge.editTextArea)&&n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea)}))},n.refreshView=function(){n.setState({refreshView:!n.state.refreshView})},n.configureCodeMirror=function(e){if(e===Ge.editTextArea){ot;var t=document.getElementById(e);if(t){var o=$e.a.fromTextArea(t,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.text});o.setSize("100%","100%"),o.on("change",(function(){var e=o.getValue();o.save(),n.saveText(e)})),o.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownEditTextArea(t),n.onKeyDownTextArea(t)})),o.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({editCodeMirror:o})}}else if(e===Ge.appendTextArea){var i=document.getElementById(Ge.appendTextArea);if(i){var s=$e.a.fromTextArea(i,{autocorrect:!0,autocapitalize:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList","Alt-F":"findPersistent"},lineNumbers:!1,lineWrapping:!0,mode:"gfm",spellcheck:!0,styleSelectedText:!0,tabindex:0,theme:"default",value:n.state.appendText});s.setSize("100%","100%"),s.on("change",(function(){var e=s.getValue();s.save(),n.autoSaveAppendText(e)})),s.on("keydown",(function(e,t){n.onKeyDown(t),n.onKeyDownAppendTextArea(t),n.onKeyDownTextArea(t)})),s.on("keyup",(function(e,t){n.onKeyUp(t)})),n.setState({appendCodeMirror:s})}}},n.onEditMode=function(){n.state.editMode?n.state.editMode&&(n.state.editingMode!==Xe.useMonacoEditor&&n.setState({viewMode:!0}),n.state.editCodeMirror&&n.state.editCodeMirror.toTextArea(),n.setState({editMode:!1},(function(){if(!n.state.appendMode){var e=document.getElementById(Ge.editButton);e&&e.focus()}}))):(n.state.appendMode&&!n.state.appendText&&n.setState({appendMode:!1}),n.setState({editMode:!0},(function(){var e=document.getElementById(Ge.editTextArea);e&&(e.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.editTextArea))})))},n.onAppendMode=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n.state.appendMode?n.state.appendMode&&(n.state.appendCodeMirror&&n.state.appendCodeMirror.toTextArea(),n.setState({appendMode:!1},(function(){if(n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),o){var e=document.getElementById(Ge.appendButton);e&&e.focus()}}))):(t&&n.setState({editMode:!1}),n.setState({appendMode:!0},(function(){if(e&&n.scrollToBottom(),o){var t=document.getElementById(Ge.appendTextArea);t&&(t.focus(),n.state.editingMode===Xe.useCodeMirror&&n.configureCodeMirror(Ge.appendTextArea))}})))},n.onViewMode=function(){n.state.viewMode||n.setState({viewMode:!0},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.appendMode&&!n.state.editMode&&n.skipToBottom()})),n.state.viewMode&&n.setState({viewMode:!1},(function(){n.state.editingMode===Xe.useMonacoEditor&&n.refreshEdit(),n.state.editMode||n.state.appendMode||n.onEditMode()}))},n.toggleShowHelp=function(){n.state.showHelp?n.setState({showHelp:!1},(function(){n.refreshView();var e=document.getElementById(Ge.helpButton);e&&e.focus()})):n.setState({showHelp:!0},(function(){n.state.viewMode?n.state.viewMode&&n.refreshView():n.onViewMode();var e=document.getElementById(Ge.helpButton);e&&e.focus(),setTimeout((function(){n.scrollToTop()}),50)}))},n.toggleShowMenu=function(){n.setState({showMenu:!n.state.showMenu},(function(){var e=document.getElementById(Ge.menuButton);e&&e.focus()}))},n.loadDefaultMenuState=function(){n.setState({showMenuOptionsEdit:!1,showMenuOptionsShare:!0,showMenuOptionsView:!0})},n.toggleShowMenuOptionsEdit=function(){n.setState({showMenuOptionsEdit:!n.state.showMenuOptionsEdit})},n.toggleShowMenuOptionsShare=function(){n.setState({showMenuOptionsShare:!n.state.showMenuOptionsShare})},n.toggleShowMenuOptionsView=function(){n.setState({showMenuOptionsView:!n.state.showMenuOptionsView})},n.toggleBorderlessMode=function(){n.setState({borderlessMode:!n.state.borderlessMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFixedHeightMode=function(){n.setState({fixedHeightMode:!n.state.fixedHeightMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleFullWidthMode=function(){n.setState({fullWidthMode:!n.state.fullWidthMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.toggleOverflowMode=function(){n.setState({overflowMode:!n.state.overflowMode},(function(){n.activateFixedHeader(),n.saveMenuOptions()}))},n.saveMenuOptions=function(){var e;e={borderlessMode:n.state.borderlessMode,fixedHeightMode:n.state.fixedHeightMode,fullWidthMode:n.state.fullWidthMode,overflowMode:n.state.overflowMode},n.saveEditorOption("menuOptions",JSON.stringify(e))},n.saveEditorOption=function(e,t){n.setState({savingEditorOptions:!0},(function(){try{n.editorKit.internal.componentManager.setComponentDataValueForKey(e,t),setTimeout((function(){n.setState({savingEditorOptions:!1},(function(){n.loadDefaultSettings(),n.loadMetaData()}))}),250)}catch(o){console.log("Error saving editor option. Your optionKey:",e,"\n - Your optionValue: ",t,"\n - The error: ",o),n.setState({savingEditorOptions:!1},(function(){n.refreshEditor(),n.loadDefaultSettings(),n.loadMetaData()}))}}))},n.onSettingsMode=function(){n.state.settingsMode?n.state.settingsMode&&n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{settingsMode:!1}),(function(){n.refreshEdit();var e=document.getElementById(Ge.settingsButton);e&&e.focus()})):(n.removeFixedHeader(),n.setState({currentState:n.state},(function(){n.setState({appendMode:!1,editMode:!1,fullWidthMode:!1,fixedHeightMode:!1,settingsMode:!0,showAppendix:!1,showHeader:!1,showMenu:!1,viewMode:!1},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))})))},n.onSaveSettings=function(e){var t=e.customStyles,o=e.editingMode,i=e.fontEdit,s=e.fontSize,a=e.fontView,r=e.monacoEditorLanguage,c=e.saveAsDefault;n.setState(Object(l.a)(Object(l.a)({},n.state.currentState),{},{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r,showAppendix:!0,showHeader:!0,settingsMode:!1}),(function(){n.refreshEditor();var e=document.getElementById(Ge.settingsButton);e&&e.focus()}));var d=n.editorKit.internal.note;d&&n.editorKit.internal.componentManager.saveItemWithPresave(d,(function(){d.content.appendEditorCustomStyles=t,d.content.appendEditorEditingMode=o,d.content.appendEditorFontEdit=i,d.content.appendEditorFontSize=s,d.content.appendEditorFontView=a,d.content.appendEditorMonacoEditorLanguage=r})),c&&n.setState({defaultSettings:{customStyles:t,editingMode:o,fontEdit:i,fontSize:s,fontView:a,monacoEditorLanguage:r}},(function(){n.saveEditorOption("defaultSettings",JSON.stringify(n.state.defaultSettings))}))},n.activateStyles=function(){var e=document.getElementById("customStyleSheet");if(e){var t=e.parentNode;t&&t.removeChild(e)}var o="";n.state.fontSize&&(o=".CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: "+n.state.fontSize+";}\n");var i="";n.state.fontEdit&&(i=".CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: "+n.state.fontEdit+";}\n");var s="";if(n.state.fontView&&(s="#renderedNote {font-family: "+n.state.fontView+";}\n"),n.state.customStyles||n.state.fontEdit||n.state.fontSize||n.state.fontView){var a=document.createElement("style");a.setAttribute("id","customStyleSheet"),a.innerHTML=o+i+s+n.state.customStyles,document.body.appendChild(a)}},n.onCancelPrint=function(){n.setState({confirmPrintUrl:!1},(function(){var e=document.getElementById(Ge.printButton);e&&e.focus()}))},n.onConfirmPrintUrl=function(){n.setState({confirmPrintUrl:!0},(function(){var e=document.getElementById("undoDialog");e&&e.focus()}))},n.onPrintUrlTrue=function(){n.setState({confirmPrintUrl:!1,printURL:!0},(function(){n.printRenderedHtml()}))},n.onPrintUrlFalse=function(){n.setState({confirmPrintUrl:!1,printURL:!1},(function(){n.printRenderedHtml()}))},n.printRenderedHtml=function(){window.print();var e=document.getElementById(Ge.printButton);e&&e.focus()},n.goDown=function(){if(document.body.scrollTop=1e7,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=1e7)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=1e7)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=1e7);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=1e7);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=1e7)}},n.scrollToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},n.skipToBottom=function(){n.goDown();var e=document.getElementById(Ge.appendix);e&&e.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"})},n.goUp=function(){if(document.body.scrollTop=0,n.state.editMode){var e=document.getElementById(Ge.editTextArea);e&&(e.scrollTop=0)}if(n.state.appendMode){var t=document.getElementById(Ge.appendTextArea);t&&(t.scrollTop=0)}if(n.state.fixedHeightMode){var o=document.getElementById(Ge.view);o&&(o.scrollTop=0);var i=document.getElementById(Ge.edit);i&&(i.scrollTop=0);var s=document.getElementsByClassName("CodeMirror-vscrollbar")[0];s&&(s.scrollTop=0)}},n.scrollToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},n.skipToTop=function(){n.goUp();var e=document.getElementById("top");e&&e.scrollIntoView({behavior:"auto",block:"start",inline:"nearest"})},n.onKeyDown=function(e){nt.set(e.key,!0),nt.get("Control")&&nt.get("e")?(e.preventDefault(),n.onEditMode()):nt.get("Control")&&!nt.get("Alt")&&(nt.get("u")||nt.get("m"))?(e.preventDefault(),n.onAppendMode()):nt.get("Control")&&!nt.get("Alt")&&nt.get("p")?(e.preventDefault(),n.onViewMode()):nt.get("Control")&&nt.get(".")?(e.preventDefault(),n.setState({appendRows:n.state.appendRows+1})):nt.get("Control")&&nt.get(",")?(e.preventDefault(),n.state.appendRows>5&&n.setState({appendRows:n.state.appendRows-1})):nt.get("Control")&&nt.get("<")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onEditMode()}))):nt.get("Control")&&nt.get(">")?(e.preventDefault(),n.setState({appendMode:!1,editMode:!1,viewMode:!1},(function(){n.onAppendMode()}))):nt.get("Control")&&nt.get("[")?(e.preventDefault(),n.skipToTop()):nt.get("Control")&&nt.get("]")?(e.preventDefault(),n.skipToBottom()):nt.get("Control")&&!nt.get("Alt")&&!nt.get("Shift")&&nt.get("w")&&nt.delete("w")},n.onKeyDownAppendTextArea=function(e){if(nt.get("Escape"))e.preventDefault(),nt.delete("Escape"),n.onAppendMode();else if(nt.get("Control")&&nt.get("Enter"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&nt.get("s"))e.preventDefault(),n.state.editingMode===Xe.useCodeMirror&&n.appendTextToNote();else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("n")){e.preventDefault();var t=document.getElementById(Ge.newLine);t&&t.click()}else if(nt.get("Control")&&!nt.get("Shift")&&nt.get("Alt")&&nt.get("p")){e.preventDefault();var o=document.getElementById(Ge.newParagraph);o&&o.click()}},n.onKeyDownEditTextArea=function(e){nt.get("Escape")&&(e.preventDefault(),nt.set("Escape",!1),n.onEditMode())},n.onKeyDownTextArea=function(e){nt.get("Shift")&&nt.get("Enter")?(e.preventDefault(),document.execCommand("insertText",!1," \n")):nt.get("Control")&&nt.get("b")?(e.preventDefault(),document.execCommand("insertText",!1,"**")):nt.get("Control")&&nt.get("h")?(e.preventDefault(),document.execCommand("insertText",!1,"#")):nt.get("Control")&&nt.get("Alt")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"![]()")):nt.get("Control")&&nt.get("i")?(e.preventDefault(),document.execCommand("insertText",!1,"*")):nt.get("Control")&&nt.get("Alt")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"`")):nt.get("Control")&&nt.get("k")?(e.preventDefault(),document.execCommand("insertText",!1,"[]()")):nt.get("Control")&&nt.get("Alt")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n1. ")):nt.get("Control")&&nt.get("l")?(e.preventDefault(),document.execCommand("insertText",!1,"\n- ")):nt.get("Control")&&nt.get("Alt")&&nt.get("u")?(e.preventDefault(),document.execCommand("insertText",!1,"~~")):(nt.get("Control")&&nt.get("q")||nt.get("Control")&&nt.get("'")||nt.get("Control")&&nt.get('"'))&&(e.preventDefault(),document.execCommand("insertText",!1,"\n> "))},n.onKeyUp=function(e){nt.delete(e.key)},n.onBlur=function(e){nt.clear()},n.onScroll=function(e){n.state.settingsMode||(window.scrollYtt&&!n.state.showMenu&&n.removeFixedHeader(),tt=window.scrollY)},n.activateFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&t&&(e.classList.add(qe.fixed),t.classList.add(qe.fixedHeader))},n.removeFixedHeader=function(){var e=document.getElementById(Ge.header),t=document.getElementById(Ge.content);e&&e.classList.remove(qe.fixed),t&&t.classList.remove(qe.fixedHeader)},n.configureEditorKit(),n.state=et,n}return Object(p.a)(o,[{key:"render",value:function(){var e=this;return[Object(n.jsx)("span",{id:"top"}),Object(n.jsxs)("div",{tabIndex:0,className:"sn-component",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onBlur:this.onBlur,children:[this.state.showHeader&&[Object(n.jsx)("div",{id:Ge.header,className:"header",children:Object(n.jsxs)("div",{className:"sk-button-group",children:[Object(n.jsx)("button",{type:"button",id:Ge.editButton,onClick:this.onEditMode,title:"Toggle Edit Mode",className:"sk-button "+(this.state.editMode?"on":"off"),children:Object(n.jsx)(C,{condition:this.state.editMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.viewButton,onClick:this.onViewMode,title:"Toggle View Mode",className:"sk-button "+(this.state.viewMode?"on":"off"),children:Object(n.jsx)(v,{condition:this.state.viewMode,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.appendButton,onClick:function(){return e.onAppendMode()},title:"Toggle Append Mode",className:"sk-button "+(this.state.appendMode?"on":"off"),children:Object(n.jsx)(E,{condition:this.state.appendMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.helpButton,onClick:this.toggleShowHelp,title:"Help",className:"sk-button "+(this.state.showHelp?"on":"off"),children:Object(n.jsx)(M,{condition:this.state.showHelp,role:"button"})}),Object(n.jsx)("button",{type:"button",id:Ge.settingsButton,onClick:this.onSettingsMode,title:"Settings",className:"sk-button "+(this.state.settingsMode?"on":"off"),children:Object(n.jsx)(w,{condition:this.state.settingsMode,role:"button"})}),Object(n.jsx)("div",{className:"sk-button divider",children:Object(n.jsx)("svg",{role:"img","aria-label":"Vertical line divider",width:"1",height:"24",viewBox:"0 0 1 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("rect",{width:"1",height:"24",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToBottomButtonHeader",onClick:this.skipToBottom,title:"Scroll to Bottom",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing down for scroll to bottom button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M6.17622 7.15015L10.0012 10.9751L13.8262 7.15015L15.0012 8.33348L10.0012 13.3335L5.00122 8.33348L6.17622 7.15015Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:"scrollToTopButtonHeader",onClick:this.skipToTop,title:"Scroll to Top",className:"sk-button off",children:Object(n.jsx)("svg",{role:"button","aria-label":"Arrow pointing up for scroll to top button",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Object(n.jsx)("path",{d:"M13.826 13.3335L10.001 9.5085L6.17597 13.3335L5.00097 12.1502L10.001 7.15017L15.001 12.1502L13.826 13.3335Z",fill:"var(--sn-stylekit-foreground-color)"})})}),Object(n.jsx)("button",{type:"button",id:Ge.menuButton,onClick:this.toggleShowMenu,title:"Toggle Menu",className:"sk-button "+(this.state.showMenu?"on":"off"),children:Object(n.jsx)(y,{condition:this.state.showMenu,role:"button"})})]})})],Object(n.jsxs)("div",{id:Ge.content,className:"content"+(this.state.borderlessMode?" borderless":"")+(this.state.fixedHeightMode?" fixed-height":"")+(this.state.fullWidthMode?" full-width":"")+(this.state.overflowMode?" overflow":""),children:[this.state.showMenu&&Object(n.jsx)(Re,{children:Object(n.jsx)(Qe,{borderlessMode:this.state.borderlessMode,editingMode:this.state.editingMode,fixedHeightMode:this.state.fixedHeightMode,fullWidthMode:this.state.fullWidthMode,monacoEditorLanguage:this.state.monacoEditorLanguage,onConfirmPrintUrl:this.onConfirmPrintUrl,overflowMode:this.state.overflowMode,refreshEdit:this.refreshEdit,refreshView:this.refreshView,saveText:this.saveText,showMenuOptionsEdit:this.state.showMenuOptionsEdit,showMenuOptionsShare:this.state.showMenuOptionsShare,showMenuOptionsView:this.state.showMenuOptionsView,text:this.state.text,toggleBorderlessMode:this.toggleBorderlessMode,toggleFixedHeightMode:this.toggleFixedHeightMode,toggleFullWidthMode:this.toggleFullWidthMode,toggleOverflowMode:this.toggleOverflowMode,toggleShowMenu:this.toggleShowMenu,toggleShowMenuOptionsEdit:this.toggleShowMenuOptionsEdit,toggleShowMenuOptionsShare:this.toggleShowMenuOptionsShare,toggleShowMenuOptionsView:this.toggleShowMenuOptionsView,viewMode:this.state.viewMode})}),this.state.settingsMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(ze,{cancelText:"Cancel",confirmText:"Save",customStyles:this.state.customStyles,debugMode:ot,defaultSettings:this.state.defaultSettings,editingMode:this.state.editingMode,fontEdit:this.state.fontEdit,fontSize:this.state.fontSize,fontView:this.state.fontView,helpLink:"https://appendeditor.com/#settings",keyMap:nt,onConfirm:this.onSaveSettings,onCancel:this.onSettingsMode,title:"Append Editor Settings",monacoEditorLanguage:this.state.monacoEditorLanguage})}),this.state.editMode&&!this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.editMode&&this.state.refreshEdit&&Object(n.jsx)(Re,{children:Object(n.jsx)(z,{debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownEditTextArea:this.onKeyDownEditTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,saveText:this.saveText,text:this.state.text,viewMode:this.state.viewMode})}),this.state.viewMode&&!this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(ve,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.viewMode&&this.state.refreshView&&Object(n.jsx)(Re,{children:Object(n.jsx)(ve,{appendMode:this.state.appendMode,bypassDebounce:this.state.bypassDebounce,debugMode:ot,editMode:this.state.editMode,editingMode:this.state.editingMode,monacoEditorLanguage:this.state.monacoEditorLanguage,printURL:this.state.printURL,showHelp:this.state.showHelp,saveText:this.saveText,text:this.state.text})}),this.state.confirmPrintUrl&&Object(n.jsxs)(Re,{children:[Object(n.jsx)(L,{title:"Would you like to print URLs?",onUndo:this.onCancelPrint,onConfirm:this.onPrintUrlTrue,onCancel:this.onPrintUrlFalse,helpLink:"https://appendeditor.com/#printing",confirmText:"Yes, print URLs",cancelText:"No, thanks"})," "]}),this.state.showDiff&&[Object(n.jsx)(Re,{children:Object(n.jsx)(V,{text:this.state.text,modifiedText:this.state.appendText,saveText:this.saveText})})]]}),this.state.showAppendix&&[Object(n.jsxs)("div",{id:Ge.appendix,className:"appendix"+(this.state.borderlessMode?" borderless":"")+(this.state.fullWidthMode?" full-width":""),children:[this.state.appendMode&&Object(n.jsx)(Re,{children:Object(n.jsx)(Me,{appendTextToNote:this.appendTextToNote,autoSaveAppendText:this.autoSaveAppendText,autoSaveCheckBoxes:this.autoSaveCheckBoxes,debugMode:ot,editingMode:this.state.editingMode,fontSize:this.state.fontSize,keyMap:nt,appendNewLine:this.state.appendNewLine,appendNewParagraph:this.state.appendNewParagraph,monacoEditorLanguage:this.state.monacoEditorLanguage,onKeyDown:this.onKeyDown,onKeyDownAppendTextArea:this.onKeyDownAppendTextArea,onKeyDownTextArea:this.onKeyDownTextArea,onKeyUp:this.onKeyUp,appendRows:this.state.appendRows,text:this.state.appendText})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToTopButton",onClick:this.scrollToTop,title:"Scroll to Top",type:"button",children:Object(n.jsx)("div",{children:" \u25b2 "})}),Object(n.jsx)("button",{className:"sk-button info",id:"scrollToBottomButton",onClick:this.scrollToBottom,title:"Scroll to Bottom",type:"button",children:Object(n.jsx)("div",{children:" \u25bc "})})]})]]})]}}]),o}(s.a.Component);o(1172);r.a.render(Object(n.jsx)(s.a.StrictMode,{children:Object(n.jsx)(it,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),c()},454:function(e,t,o){}},[[1173,3,4]]]); -//# sourceMappingURL=main.a39a299e.chunk.js.map \ No newline at end of file diff --git a/build/static/js/main.a39a299e.chunk.js.map b/build/static/js/main.a39a299e.chunk.js.map deleted file mode 100644 index 2103956b..00000000 --- a/build/static/js/main.a39a299e.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["serviceWorker.ts","reportWebVitals.ts","components/Icons.tsx","components/PrintDialog.tsx","components/Monaco.tsx","components/DynamicEditor.tsx","components/EditNote.tsx","lib/clickButton.ts","components/Help.tsx","components/Intro.tsx","lib/renderMarkdown.ts","components/ViewNote.tsx","components/AppendText.tsx","components/Buttons.tsx","components/Menu.tsx","components/Settings.tsx","components/ErrorBoundary.tsx","components/AppendEditor.tsx","index.tsx"],"names":["Boolean","window","location","hostname","match","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","infoColor","foregroundColor","ChevronIconDown","fill","role","className","aria-label","width","height","viewBox","xmlns","d","ChevronIconRight","CloseIcon","CopyIcon","EyeIcon","condition","GearIcon","HelpIcon","MenuIcon","PencilIcon","PlusIcon","fill-rule","clip-rule","PrintIcon","RefreshIcon","UndoIcon","PrintDialog","cancelText","confirmText","helpLink","onCancel","onConfirm","onUndo","title","id","onClick","href","target","rel","MonacoEditorContainerID","MonacoDiffEditorContainerID","self","MonacoEnvironment","getWorkerUrl","_moduleId","label","MonacoEditor","editor","fontSize","language","saveText","tabSize","text","theme","viewMode","divEl","useRef","scrollBeyondLastLine","useEffect","current","monaco","create","parseInt","replace","value","join","autoClosingOvertype","formatOnPaste","formatOnType","wordWrap","wrappingStrategy","onKeyDown","e","keyCode","console","log","code","ctrlKey","preventDefault","onKeyUp","onDidChangeModelContent","getValue","dispose","ref","MonacoDiffEditor","diffEditor","modifiedText","originalModel","createModel","modifiedModel","createDiffEditor","originalEditable","readOnly","setModel","original","modified","onDidChangeContent","YouTubeEmbed","videoId","this","props","attrs","matches","isSelected","src","React","DynamicEditor","handleToggleReadOnly","setState","state","handleChange","debounce","debugMode","onChange","template","undefined","placeholder","readOnlyWriteCheckboxes","defaultValue","scrollTo","hash","autoFocus","embeds","keywords","icon","alt","matcher","url","component","EditNote","handleInputChange","event","onKeyDownEditTextArea","onKeyDownTextArea","keyMap","delete","key","editingMode","EditingModes","useMonacoEditor","useDynamicEditor","HtmlElementId","edit","monacoEditorLanguage","editTextArea","name","rows","spellCheck","Component","defaultProps","clickAppendButton","appendButton","document","getElementById","click","clickEditButton","editButton","clickHelpButton","helpButton","clickMenuButton","menuButton","clickSettingsButton","settingsButton","clickViewButton","viewButton","Help","onToggleShowFeelings","showFeelings","onToggleShowMoreQuestions","showMoreQuestions","onToggleShowFeedback","showFeedback","onToggle","Intro","appendMode","editMode","showHelp","gfm","require","breaks","math","rehypeKatex","highlight","emoji","externalLinks","toc","footnotes","slug","raw","processor","unified","use","parse","maxDepth","inlineNotes","remark2rehype","allowDangerousHtml","ignoreMissing","rehype2react","createElement","processMarkdown","processSync","result","isLongString","throttle","length","renderLongMarkdown","ViewNote","onToggleShowHelp","renderMarkdown","bypassDebounce","printURL","view","AppendText","type","checked","autoSaveCheckBoxes","handleTextAreaChange","autoSaveAppendText","appendTextToNote","appendTextArea","focus","newLine","newParagraph","set","get","onKeyDownAppendTextArea","appendNewLine","appendNewParagraph","appendRows","HtmlClassName","ChevronToggleButton","caption","CopyButton","EyeButton","messageOn","messageOff","PencilButton","PrintButton","UndoButton","editingModeID","fontEditID","fontSizeID","fontViewID","monacoEditorLanguageID","resetAllSettingsID","saveAsDefaultID","startRegExp","RegExp","cssRegExp","endRegExp","codeRegExp","Settings","handleSelectChange","toggleShowCustomStyles","showCustomStyles","cleanCustomStyles","customStyles","handleSubmit","fontEditMessage","fontViewMessage","fontEdit","fontView","saveAsDefault","loadDefaultSettings","defaultSettings","refreshCustomStyles","clearCustomStyles","clearFontEdit","clearFontSize","clearFontView","clearEditingMode","usePlainText","clearMonacoEditorLanguage","clearSaveAsDefault","clearAllSettings","resetAllSettings","onBlur","clear","componentWillUnmount","useCodeMirror","htmlFor","list","ErrorBoundary","hasError","error","errorInfo","message","children","Menu","clearTooltipTimer","resetMessageTimer","clearTimeout","setTimeout","displayMessageEdit","displayMessageShare","showMessageEdit","showMessageShare","copyToClipboard","textField","body","appendChild","select","execCommand","remove","copyText","copyHtml","renderedNote","firstElementChild","innerHTML","formatText","formattedText","prettier","format","parser","plugins","parserMarkdown","refreshEdit","refreshView","uncheckBoxes","checkedBoxes","test","newText","toggleShowMenu","chevronToggleButton","showMenuOptionsView","toggleShowMenuOptionsView","borderlessMode","on","off","toggleBorderlessMode","fixedHeightMode","toggleFixedHeightMode","fullWidthMode","toggleFullWidthMode","overflowMode","toggleOverflowMode","showMenuOptionsShare","toggleShowMenuOptionsShare","printButton","onConfirmPrintUrl","showMenuOptionsEdit","toggleShowMenuOptionsEdit","initialState","appendText","confirmPrintUrl","showAppendix","showHeader","showDiff","settingsMode","last_known_scroll_position","Map","AppendEditor","editorKit","refreshEditorTimer","saveTimer","componentDidMount","onViewMode","loadDefaultMenuState","addEventListener","onScroll","removeEventListener","configureEditorKit","delegate","EditorKitDelegate","setEditorRawText","cancel","flush","savingEditorOptions","loadEditorOptions","loadMetaData","clearUndoHistory","getElementsBySelector","EditorKit","mode","supportsFilesafe","refreshEditor","activateStyles","defaultSettingsString","internal","componentManager","componentDataValueForKey","defaultEditingMode","defaultSettingsObject","JSON","defaultCustomStyles","defaultFontEdit","defaultFontSize","defaultFontView","defaultMonacoEditorLanguage","menuOptionsString","menuOptionsObject","streamContextItem","note","content","appendEditorCustomStyles","appendEditorEditingMode","appendEditorFontEdit","appendEditorFontSize","appendEditorFontView","appendEditorMonacoEditorLanguage","onEditMode","saveNote","scrollY","scrollTop","refreshedView","onEditorValueChanged","textToAppend","concat","saveItemWithPresave","skipToBottom","appendCodeMirror","setValue","configureCodeMirror","editCodeMirror","CodeMirror","fromTextArea","autocorrect","autocapitalize","extraKeys","Enter","lineNumbers","lineWrapping","spellcheck","styleSelectedText","tabindex","setSize","editCodeMirrorText","save","cm","appendCodeMirrorText","toTextArea","onAppendMode","scrollDown","closeEdit","scrollToBottom","toggleShowHelp","scrollToTop","showMenu","activateFixedHeader","saveMenuOptions","currentMenuOptions","saveEditorOption","stringify","optionKey","optionValue","setComponentDataValueForKey","onSettingsMode","currentState","removeFixedHeader","undoDialog","onSaveSettings","sheetToBeRemoved","sheetParent","parentNode","removeChild","fontSizeStyle","fontEditStyle","fontViewStyle","sheet","setAttribute","onCancelPrint","onPrintUrlTrue","printRenderedHtml","onPrintUrlFalse","print","goDown","codeMirrorEditMode","getElementsByClassName","appendix","scrollIntoView","behavior","block","inline","goUp","top","skipToTop","header","classList","add","fixed","fixedHeader","tabIndex","ReactDOM","render","StrictMode","navigator","serviceWorker","ready","registration","unregister","catch"],"mappings":"0MAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DChBN,IAYeC,EAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,gCAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,O,8CCPRQ,EAAY,gCACZC,EAAkB,sCAQXC,EAAmC,SAAC,GAAD,IAAGC,EAAH,EAAGA,KAAMC,EAAT,EAASA,KAAT,OAC9C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M7D,SACrBsF,OAAQA,GACR6F,cAAehI,KAAKU,MAAMsH,cAC1BC,mBAAoBjI,KAAKU,MAAMuH,mBAC/BrF,qBAAsB5C,KAAKU,MAAMkC,qBACjCxE,UAAW4B,KAAK5B,UAChB2J,wBAAyB/H,KAAK+H,wBAC9B7F,kBAAmBlC,KAAKkC,kBACxBtD,QAASoB,KAAKpB,QACdsJ,WAAYlI,KAAKU,MAAMwH,WACvBjL,KAAM+C,KAAKU,MAAM2O,eAIvB,wBACEpV,UAAU,iBACV8B,GAAG,oBACHC,QAASgE,KAAKkV,YACdpZ,MAAM,gBACNqL,KAAK,SALP,SAOE,6CAEF,wBACElN,UAAU,iBACV8B,GAAG,uBACHC,QAASgE,KAAKgV,eACdlZ,MAAM,mBACNqL,KAAK,SALP,SAOE,yD,GAt7D4B7G,IAAM2C,W,QC7KhD+U,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEF7U,SAASC,eAAe,SlB4HpB,kBAAmB6U,WACrBA,UAAUC,cAAcC,MACrB/e,MAAK,SAACgf,GACLA,EAAaC,gBAEdC,OAAM,SAAC9M,GACNnN,QAAQmN,MAAMA,EAAME,YkBvH5BzS,K","file":"static/js/main.a39a299e.chunk.js","sourcesContent":["// 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\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: 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: string, config?: 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: string, config?: 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 { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\n\nconst infoColor = 'var(--sn-stylekit-info-color)';\nconst foregroundColor = 'var(--sn-stylekit-foreground-color)';\n\ninterface Icons {\n condition?: boolean;\n fill?: string;\n role: string;\n}\n\nexport const ChevronIconDown: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const ChevronIconRight: React.FC = ({ fill, role }) => (\n \n \n \n \n \n);\n\nexport const CloseIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const CopyIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const EyeIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const GearIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const HelpIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const MenuIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PencilIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PlusIcon: React.FC = ({ condition, fill, role }) => (\n \n \n \n);\n\nexport const PrintIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const RefreshIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n\nexport const UndoIcon: React.FC = ({ fill, role }) => (\n \n \n \n);\n","// import { Method } from '@testing-library/react';\nimport React from 'react';\nimport { CloseIcon } from './Icons';\n\ninterface PrintDialogTypes {\n cancelText: string;\n confirmText: string;\n helpLink: string;\n onCancel: () => void;\n onConfirm: () => void;\n onUndo: () => void;\n title: string;\n}\n\nconst PrintDialog: React.FC = ({\n cancelText,\n confirmText,\n helpLink,\n onCancel,\n onConfirm,\n onUndo,\n title,\n}) => (\n
\n
\n
\n
\n
\n

{title}

\n \n
\n

\n Need help deciding? Check out the{' '}\n \n documentation\n \n .\n

\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n);\n\nexport default PrintDialog;\n","/**\n * This component is derived from the \"browser-esm-webpack-typescript-react\" found\n * at https://github.com/microsoft/monaco-editor-samples,\n * which is released under MIT, Copyright (c) 2016 Microsoft Corporation.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\nimport React, { useRef, useEffect } from 'react';\nimport * as monaco from 'monaco-editor';\n\nconst debugMode = false;\nconst MonacoEditorContainerID = 'MonacoEditorContainer';\nconst MonacoDiffEditorContainerID = 'MonacoDiffEditorContainer';\n\n/*eslint no-restricted-globals: [\"error\", \"event\", \"monaco\"]*/\n// @ts-ignore\nself.MonacoEnvironment = {\n getWorkerUrl: function (_moduleId: any, label: string) {\n if (label === 'json') {\n return './json.worker.bundle.js';\n }\n if (label === 'css') {\n return './css.worker.bundle.js';\n }\n if (label === 'html') {\n return './html.worker.bundle.js';\n }\n if (label === 'typescript' || label === 'javascript') {\n return './ts.worker.bundle.js';\n }\n return './editor.worker.bundle.js';\n },\n};\n\nconst onKeyDown = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\nconst onKeyUp = (keyCode: string, debugMode = false) => {\n if (debugMode) {\n console.log('IKeyboardEvent Up: ' + keyCode);\n }\n};\n\ninterface MonacoEditorTypes {\n fontSize?: string;\n id?: string;\n language?: string;\n onKeyDown?: Function;\n onKeyUp?: Function;\n saveText?: Function;\n tabSize?: number;\n text: string;\n theme?: string;\n viewMode?: boolean;\n}\n\nexport const MonacoEditor: React.FC = ({\n fontSize = '16',\n id = MonacoEditorContainerID,\n language = 'markdown',\n saveText,\n tabSize = 2,\n text,\n theme = 'vs-dark',\n viewMode = false,\n}) => {\n const divEl = useRef(null);\n let editor: monaco.editor.IStandaloneCodeEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n let scrollBeyondLastLine = true;\n if (viewMode) {\n scrollBeyondLastLine = false;\n }\n\n useEffect(() => {\n if (divEl.current) {\n editor = monaco.editor.create(divEl.current, {\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n language: language,\n tabSize: tabSize,\n theme: theme,\n scrollBeyondLastLine: scrollBeyondLastLine,\n value: [text].join('\\n'),\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n });\n\n // Keyboard Events\n editor.onKeyDown((e: monaco.IKeyboardEvent) => {\n onKeyDown(e.code, debugMode);\n if (e.ctrlKey && e.code === 'KeyS') {\n e.preventDefault();\n }\n });\n editor.onKeyUp((e: monaco.IKeyboardEvent) => {\n onKeyUp(e.code, debugMode);\n });\n\n // Content Change Events\n editor.onDidChangeModelContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(editor.getValue());\n }\n }\n );\n }\n return () => {\n editor.dispose();\n };\n }, []);\n return
;\n};\n\ninterface MonacoDiffEditorTypes extends MonacoEditorTypes {\n modifiedText: string;\n}\n\nexport const MonacoDiffEditor: React.FC = ({\n fontSize = '16',\n id = MonacoDiffEditorContainerID,\n language = 'markdown',\n saveText,\n text,\n modifiedText,\n theme = 'vs-dark',\n}) => {\n const divEl = useRef(null);\n let diffEditor: monaco.editor.IStandaloneDiffEditor;\n\n if (fontSize === '') {\n fontSize = '16px';\n }\n\n useEffect(() => {\n if (divEl.current) {\n const originalModel = monaco.editor.createModel(\n [text].join('\\n'),\n language\n );\n const modifiedModel = monaco.editor.createModel(\n [modifiedText].join('\\n'),\n language\n );\n\n diffEditor = monaco.editor.createDiffEditor(divEl.current, {\n // Same settings as above\n // These are variable: customizable by user or dependent on props\n fontSize: parseInt(fontSize.replace('px', '')),\n theme: theme,\n\n // These are not customizable\n autoClosingOvertype: 'auto',\n formatOnPaste: true,\n formatOnType: true,\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n\n // Specific to Diff Editor\n originalEditable: true, // for left panel\n readOnly: true, // for right panel\n });\n diffEditor.setModel({\n original: originalModel,\n modified: modifiedModel,\n });\n\n // Content Change Events\n originalModel.onDidChangeContent(\n (e: monaco.editor.IModelContentChangedEvent) => {\n if (saveText) {\n saveText(originalModel.getValue());\n }\n }\n );\n }\n return () => {\n diffEditor.dispose();\n };\n }, []);\n return (\n
\n );\n};\n","/**\n * This component is derived from the example found at\n * https://github.com/outline/rich-markdown-editor/blob/develop/example/src/index.js,\n * which is released under BSD-3 License, Copyright (c) 2020 General Outline,\n * Inc (https://www.getoutline.com/) and individual contributors.\n * This modified version is released under AGPL-3.0 as indicated in the README.md\n * in the root directory. A copy of AGPL-3.0 is available there.\n * */\n\nimport * as React from 'react';\nimport debounce from 'lodash/debounce';\nimport RichMarkdownEditor from 'rich-markdown-editor';\n\nclass YouTubeEmbed extends React.Component {\n render() {\n const { attrs } = this.props;\n const videoId = attrs.matches[1];\n\n return (\n \n );\n }\n}\n\ninterface DynamicProps {\n debugMode: boolean;\n onChange: (text: string) => void;\n readOnly: boolean;\n text: string;\n}\n\ninterface DynamicState {\n readOnly: boolean;\n template: boolean;\n value: undefined;\n}\n\nexport default class DynamicEditor extends React.Component<\n DynamicProps,\n DynamicState\n> {\n constructor(props: DynamicProps) {\n super(props);\n this.state = {\n readOnly: this.props.readOnly,\n template: false,\n value: undefined,\n };\n }\n\n handleToggleReadOnly = () => {\n this.setState({ readOnly: !this.state.readOnly });\n };\n\n handleChange = debounce((value) => {\n const text = value();\n if (this.props.debugMode) {\n console.log(text);\n }\n this.props.onChange(text);\n }, 50);\n\n render() {\n return (\n {\n if (this.props.debugMode) {\n console.log('Cancel triggered');\n }\n }}\n autoFocus\n onChange={(value) => this.handleChange(value)}\n embeds={[\n {\n title: 'YouTube',\n keywords: 'youtube video tube google',\n icon: () => (\n \n ),\n //@ts-ignore\n matcher: (url) => {\n return url.match(\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([a-zA-Z0-9_-]{11})$/i\n );\n },\n component: YouTubeEmbed,\n },\n ]}\n />\n );\n }\n}\n","import React from 'react';\nimport { EditingModes } from './AppendEditor';\nimport { MonacoEditor } from './Monaco';\nimport DynamicEditor from './DynamicEditor';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface EditProps {\n debugMode: boolean;\n editingMode?: string;\n fontSize: string;\n keyMap: any;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownEditTextArea: Function;\n onKeyDownTextArea: Function;\n saveText: Function;\n text: string;\n viewMode: boolean | undefined;\n}\n\ninterface EditState {\n text: string;\n}\n\nexport default class EditNote extends React.Component {\n static defaultProps = {\n // none\n };\n\n constructor(props: EditProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n\n this.setState(\n {\n text: value,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.saveText(this.state.text);\n }\n );\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.onKeyDown(e);\n this.props.onKeyDownEditTextArea(e);\n this.props.onKeyDownTextArea(e);\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n return (\n \n \n {this.props.editingMode === EditingModes.useMonacoEditor ? (\n \n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n \n );\n }\n}\n","import { HtmlElementId } from '../components/AppendEditor';\n\nexport const clickAppendButton = () => {\n const appendButton = document.getElementById(HtmlElementId.appendButton);\n if (appendButton) {\n appendButton.click();\n }\n};\n\nexport const clickEditButton = () => {\n const editButton = document.getElementById(HtmlElementId.editButton);\n if (editButton) {\n editButton.click();\n }\n};\n\nexport const clickHelpButton = () => {\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.click();\n }\n};\n\nexport const clickMenuButton = () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.click();\n }\n};\n\nexport const clickSettingsButton = () => {\n const settingsButton = document.getElementById(HtmlElementId.settingsButton);\n if (settingsButton) {\n settingsButton.click();\n }\n};\n\nexport const clickViewButton = () => {\n const viewButton = document.getElementById(HtmlElementId.viewButton);\n if (viewButton) {\n viewButton.click();\n }\n};\n","import React from 'react';\nimport { GearIcon, HelpIcon, MenuIcon } from './Icons';\nimport {\n clickHelpButton,\n clickMenuButton,\n clickSettingsButton,\n} from '../lib/clickButton';\n\ninterface HelpProps {\n debugMode: boolean;\n printURL: boolean;\n}\n\ninterface HelpState {\n showFeelings: boolean;\n showMoreQuestions: boolean;\n showFeedback: boolean;\n}\n\nexport default class Help extends React.Component {\n constructor(props: HelpProps) {\n super(props);\n\n this.state = {\n showFeelings: false,\n showMoreQuestions: false,\n showFeedback: false,\n };\n }\n\n onToggleShowFeelings = () => {\n this.setState({\n showFeelings: !this.state.showFeelings,\n });\n };\n\n onToggleShowMoreQuestions = () => {\n this.setState({\n showMoreQuestions: !this.state.showMoreQuestions,\n });\n };\n\n onToggleShowFeedback = () => {\n this.setState({\n showFeedback: !this.state.showFeedback,\n });\n };\n\n render() {\n return (\n
\n
\n

Append Editor Help

\n

\n The Append Editor is an unofficial{' '}\n \n editor\n {' '}\n for{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app. The Append Editor is also free software licensed under{' '}\n \n AGPL-3.0\n \n . Its source code is available on{' '}\n \n GitHub\n \n .\n

\n

Append Editor Features

\n

\n The Append Editor supports{' '}\n \n Markdown\n {' '}\n with{' '}\n \n KaTeX\n \n , syntax highlighting, in-line HTML, table of contents, footnotes,\n auto-linking,{' '}\n \n emoji codes\n \n , and more.{' '}\n

\n

\n There are four editing modes: Plain Textarea, CodeMirror, Dynamic, and\n Monaco. You can read about each mode and choose which to use in the\n Settings\n \n  \n \n  \n \n . You can also choose default and per-note font sizes, font families,\n and custom styles (CSS).\n

\n

\n The Menu\n \n  \n \n  \n \n has additional options to customize the appearance of the editor,\n share your note, and perform actions to quickly format and edit\n Markdown text.\n

\n

\n A more detailed documentation of the Append Editor is available at{' '}\n \n appendeditor.com\n \n . If you like the Append Editor, please support it by giving it a star\n on{' '}\n \n GitHub\n \n .{' '}\n \n 🙂\n {' '}\n

\n

How to install the Append Editor in Standard Notes

\n
    \n
  1. \n Download, install, and sign in to the Standard Notes{' '}\n \n Desktop\n {' '}\n app.\n
  2. \n
  3. \n In the bottom left corner of the app, click Extensions.\n
  4. \n
  5. \n Click Import Extensions and paste the following link into the\n input box. If you want to use the alpha version, replace{' '}\n beta with alpha:{' '}\n \n \n https://raw.githubusercontent.com/TheodoreChu/append-editor/main/public/beta.ext.json\n \n \n
  6. \n
  7. \n Press Enter or Return on your keyboard.\n
  8. \n
  9. \n The title of your selected note is near the top of the app. Under\n the title, click Editor, click Append Editor, and\n click Continue to begin using the editor. Enjoy!{' '}\n \n 👏\n {' '}\n
  10. \n
\n

\n After you install the editor on the desktop app, it will automatically\n sync to the{' '}\n \n web\n {' '}\n and{' '}\n \n mobile apps\n {' '}\n after you sign in.\n

\n

What to write about

\n

\n The Append Editor is great for writing articles, blog posts,\n checklists, code snippets, documentation, emails, essays, journals,\n lists, logs, notes, tables, todo lists, and much more. Here are some\n questions to help you get started with today's daily journal:\n

{' '}\n
    \n
  • How are you? What's happening?
  • \n
  • What might be affecting your mood?
  • \n
  • Which feelings fit your mood and to what extent?
  • \n
    \n \n {!this.state.showFeelings && [\n

    Show feelings

    ,\n ]}\n {this.state.showFeelings && [\n

    Hide feelings

    ,\n ]}\n
    \n
  • \n Positive Feelings: bold, calm, cheerful, confident,\n content, eager, ecstatic, energized, engaged, enthusiastic,\n excited, grateful, happy, humorous, inspired, joyful, light,\n lively, loving, motivated, optimistic, passionate, peaceful,\n playful, proud, reassured, refreshed, relaxed, relieved,\n satisfied, secure, surprised, thrilled, wonderful\n
  • \n
  • \n Negative Feelings: afraid, angry, annoyed, anxious,\n ashamed, bored, burnt out, confused, demoralized, depressed,\n disappointed, disgusted, distraught, embarrassed, empty,\n exhausted, frustrated, furious, guilty, heavy, insecure,\n irritated, jealous, jittery, lethargic, lonely, nervous, numb,\n resentful, sad, self-conscious, sleepy, stressed, tired, winded,\n worried\n
  • \n
    \n
  • What thoughts are contributing to the way you're feeling?
  • \n
    \n \n {!this.state.showMoreQuestions && [\n

    Show more questions

    ,\n ]}\n {this.state.showMoreQuestions && [\n

    Show fewer questions

    ,\n ]}\n
    \n
    \n {this.state.showMoreQuestions && [\n
    \n
  • \n What do you hope your life will look like in a week? a month? a\n year?\n
  • \n
  • \n What can you do today to make your life the way you want it?\n
  • \n
  • \n How will you feel when you've realized the goals that you have\n for yourself?\n
  • \n
  • Who or what do you feel grateful for and why?
  • \n
  • What did you enjoy about today?
  • \n
    ,\n ]}\n
\n
\n \n

Need more help?

\n
\n {this.state.showFeedback && [\n

\n Feel free to{' '}\n \n reach out\n {' '}\n if you have any questions, comments, concerns, or feedback.{' '}\n \n 👋\n \n
\n If you find any bugs or have a feature request, please{' '}\n \n open an issue on GitHub\n \n .{' '}\n \n 🙂\n \n
\n You are using version 1.2.0. The release notes and\n change log are available on{' '}\n \n GitHub\n \n .\n

,\n ]}\n
\n Click Help\n \n  \n \n  \n \n to close this section.\n
\n
\n );\n }\n}\n","import React from 'react';\nimport { EyeIcon, HelpIcon, PencilIcon, PlusIcon } from './Icons';\nimport {\n clickAppendButton,\n clickEditButton,\n clickHelpButton,\n clickViewButton,\n} from '../lib/clickButton';\n\ninterface IntroProps {\n appendMode: boolean;\n editMode: boolean;\n showHelp: boolean;\n}\n\nconst Intro: React.FC = ({ appendMode, editMode, showHelp }) => (\n
\n
\n \n Welcome to the Append Editor!{' '}\n \n 👋\n {' '}\n Your note is empty.{' '}\n \n 🙂\n {' '}\n Click here to get started.{' '}\n \n 📝\n \n \n

To get started:

\n
    \n
  • \n

    \n Click the Pencil\n \n  \n \n  \n \n to toggle Edit Mode\n

    \n
  • \n
  • \n

    \n Click the Plus\n \n  \n \n  \n \n to toggle Append Mode\n

    \n
  • \n
\n

\n View Mode is currently on. When you type in{' '}\n Edit Mode, your note will automatically render here. In{' '}\n Append Mode, clicking Append will add the text in the\n textarea to the end of your note. Click the Eye\n \n  \n \n  \n \n to turn View Mode off and switch to Edit Only Mode.\n

\n

\n If you are using the demo at{' '}\n \n beta.appendeditor.com\n \n , then your notes will be lost after you close the page.\n

\n

\n If you want to save your notes, then click Help\n \n  \n \n  \n \n and follow the instructions on how to install the Append Editor in{' '}\n \n Standard Notes\n \n , a free,{' '}\n \n open-source\n \n , and{' '}\n \n end-to-end encrypted\n {' '}\n notes app.\n

\n

\n If you like Standard Notes, please check out Standard Notes{' '}\n \n Extended\n {' '}\n for more editors, themes, components, and methods to backup up your\n data.\n

\n

\n Happy note-taking!{' '}\n \n 😄\n \n

\n
\n
\n);\n\nexport default Intro;\n","import React, { ReactNode } from 'react';\nimport unified from 'unified';\nimport parse from 'remark-parse';\nimport remark2rehype from 'remark-rehype';\nimport rehype2react from 'rehype-react';\nimport { debounce, throttle } from 'lodash';\n\nconst gfm = require('remark-gfm');\nconst breaks = require('remark-breaks');\nconst math = require('remark-math');\nconst rehypeKatex = require('rehype-katex');\nconst highlight = require('rehype-highlight');\nconst emoji = require('remark-emoji');\nconst externalLinks = require('remark-external-links');\nconst toc = require('remark-toc');\nconst footnotes = require('remark-footnotes');\nconst slug = require('remark-slug');\nconst raw = require('rehype-raw');\n\nconst processor = unified()\n .use(parse)\n .use(gfm)\n .use(breaks)\n .use(slug)\n .use(toc, { maxDepth: 6 })\n .use(externalLinks)\n .use(footnotes, { inlineNotes: true })\n .use(remark2rehype, { allowDangerousHtml: true })\n .use(raw)\n .use(math)\n .use(rehypeKatex)\n .use(highlight, { ignoreMissing: true })\n .use(emoji)\n .use(rehype2react, { createElement: React.createElement });\n\nexport const processMarkdown = (text: string) => {\n const markdown = processor.processSync(text).result as ReactNode;\n return markdown;\n};\n\n/** Throttle instead of debounce because\n * we want it to work even when typing\n * lots of characters in a short amount of time. */\nexport const isLongString = throttle((text: string) => {\n //console.log('length', text.length);\n if (text.length > 10000) {\n return true;\n } else {\n return false;\n }\n}, 1000);\n\n/** Debounce the rendering of long notes to prevent lagging.\n * There is no max on the debounce to prevent lagging\n * even for very, very long notes */\nexport const renderLongMarkdown = debounce((text: string) => {\n //console.log('renderLongMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n}, 500);\n\nexport const renderMarkdown = (text: string, bypassDebounce: boolean) => {\n if (bypassDebounce) {\n //console.log('renderBypassDebounceText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n let textIsLong = false as boolean | undefined;\n textIsLong = isLongString(text);\n //console.log('textIsLong', textIsLong);\n if (textIsLong) {\n return renderLongMarkdown(text);\n } else {\n //console.log('renderShortMarkdownText');\n const markdown = processMarkdown(text);\n return markdown;\n }\n};\n","import React from 'react';\nimport { EditingModes, HtmlElementId } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport Help from './Help';\nimport Intro from './Intro';\nimport { renderMarkdown } from '../lib/renderMarkdown';\n\ninterface ViewProps {\n appendMode: boolean;\n bypassDebounce: boolean;\n debugMode: boolean;\n editMode: boolean;\n editingMode?: string;\n monacoEditorLanguage: string;\n printURL: boolean;\n saveText: (text: string) => void;\n showHelp: boolean;\n text: string;\n}\n\ninterface ViewState {\n showHelp: boolean;\n}\n\nexport default class ViewNote extends React.Component {\n constructor(props: ViewProps) {\n super(props);\n\n this.state = {\n showHelp: this.props.showHelp,\n };\n }\n\n onToggleShowHelp = () => {\n const helpButton = document.getElementById('helpButton');\n if (helpButton) {\n helpButton.click();\n }\n };\n\n renderMarkdown = (text: string) => {\n const markdown = renderMarkdown(text, this.props.bypassDebounce);\n return markdown;\n };\n\n render() {\n const { text } = this.props;\n return (\n \n
\n {!text && [\n ,\n ]}\n {this.state.showHelp && [\n ,\n ]}\n \n {this.props.editingMode === EditingModes.useMonacoEditor &&\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.monacoEditorLanguage !== 'html' &&\n text ? (\n this.renderMarkdown(\n '```' + this.props.monacoEditorLanguage + '\\n' + text + '\\n```'\n )\n ) : this.props.editingMode === EditingModes.useDynamicEditor ? (\n \n ) : (\n this.renderMarkdown(text)\n )}\n
\n \n \n );\n }\n}\n","import React from 'react';\nimport { EditingModes } from './AppendEditor';\nimport DynamicEditor from './DynamicEditor';\nimport { MonacoEditor } from './Monaco';\n\nimport { HtmlElementId } from './AppendEditor';\n\ninterface AppendProps {\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendRows: number;\n appendTextToNote: Function;\n editingMode?: string;\n fontSize: string;\n keyMap: Map;\n debugMode: boolean;\n autoSaveAppendText: Function;\n autoSaveCheckBoxes: Function;\n monacoEditorLanguage: string;\n onKeyDown: Function;\n onKeyUp: Function;\n onKeyDownAppendTextArea: Function;\n onKeyDownTextArea: Function;\n text: string;\n}\n\ninterface AppendState {\n text: string;\n newLine: boolean;\n newParagraph: boolean;\n [x: string]: string | boolean;\n}\n\nexport default class AppendText extends React.Component<\n AppendProps,\n AppendState\n> {\n static defaultProps = {\n // none\n };\n\n constructor(props: AppendProps) {\n super(props);\n\n this.state = {\n text: this.props.text,\n newLine: this.props.appendNewLine,\n newParagraph: this.props.appendNewParagraph,\n useMonacoEditor: this.props.editingMode === EditingModes.useMonacoEditor,\n useDynamicEditor:\n this.props.editingMode === EditingModes.useDynamicEditor,\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n // This callback saves the checkboxes\n this.autoSaveCheckBoxes();\n }\n );\n };\n\n // This is an almost duplicate of the above editor. Here we don't save the checkboxes to improve performance\n handleTextAreaChange = (event: any) => {\n const target = event.target;\n const value = target.value;\n this.setState(\n {\n text: value,\n },\n () => {\n // This callback saves the append text\n this.autoSaveAppendText();\n }\n );\n };\n\n saveText = (text: string) => {\n this.setState(\n {\n text,\n },\n () => {\n this.props.autoSaveAppendText(this.state.text);\n }\n );\n };\n\n appendTextToNote = () => {\n this.props.appendTextToNote();\n this.setState({\n text: '',\n });\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n }\n // Refresh Monaco Editor after appending text to note\n if (this.state.useMonacoEditor) {\n this.setState(\n {\n useMonacoEditor: false,\n },\n () => {\n this.setState({\n useMonacoEditor: true,\n });\n }\n );\n }\n // Refresh Dynamic Editor after appending text to note\n if (this.state.useDynamicEditor) {\n this.setState(\n {\n useDynamicEditor: false,\n },\n () => {\n this.setState({\n useDynamicEditor: true,\n });\n }\n );\n }\n };\n\n autoSaveAppendText = () => {\n const text = this.state.text;\n this.props.autoSaveAppendText(text);\n };\n\n autoSaveCheckBoxes = () => {\n const newLine = this.state.newLine;\n const newParagraph = this.state.newParagraph;\n this.props.autoSaveCheckBoxes(newLine, newParagraph);\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n if (this.props.debugMode) {\n console.log(\n 'Keys pressed: ' +\n e.key +\n 'KeyMap for key: ' +\n this.props.keyMap.get(e.key)\n );\n console.log('Append Text Value: ' + this.state.text);\n }\n\n this.props.onKeyDown(e);\n this.props.onKeyDownAppendTextArea(e);\n this.props.onKeyDownTextArea(e);\n // Append Text if Ctrl and 'Enter' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('Enter')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n // Append Text if Ctrl and 's' are pressed\n else if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.appendTextToNote();\n }\n };\n\n onKeyUp = (event: React.KeyboardEvent) => {\n this.props.keyMap.delete(event.key);\n this.props.onKeyUp(event);\n };\n\n render() {\n const { text } = this.state;\n\n return (\n \n \n {this.state.useMonacoEditor ? (\n // We use this.state instead of this.props so we can easily refresh it on Append\n \n ) : this.state.useDynamicEditor ? (\n
\n \n
\n ) : (\n \n )}\n \n
\n
\n \n
\n \n
\n
\n \n
Append
\n \n
\n
\n \n );\n }\n}\n","import React from 'react';\nimport {\n ChevronIconDown,\n ChevronIconRight,\n CopyIcon,\n EyeIcon,\n PencilIcon,\n PrintIcon,\n UndoIcon,\n} from './Icons';\n\ninterface ActionButtonTypes {\n caption?: string;\n className?: string;\n fill?: string;\n id?: string;\n title: string;\n onClick: () => void;\n}\n\ninterface ConditionalButtonTypes extends ActionButtonTypes {\n condition?: boolean | undefined;\n messageOn?: string;\n messageOff?: string;\n}\n\nexport const ChevronToggleButton: React.FC = ({\n caption,\n className,\n condition,\n onClick,\n title,\n}) => (\n \n);\n\nexport const CopyButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const EyeButton: React.FC = ({\n caption,\n className,\n condition,\n messageOn,\n messageOff,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PencilButton: React.FC = ({\n caption,\n className,\n fill,\n onClick,\n title,\n}) => (\n \n);\n\nexport const PrintButton: React.FC = ({\n caption,\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n\nexport const UndoButton: React.FC = ({\n className,\n fill,\n id,\n onClick,\n title,\n}) => (\n \n);\n","import React from 'react';\nimport prettier from 'prettier';\nimport parserMarkdown from 'prettier/parser-markdown';\nimport { EditingModes } from './AppendEditor';\nimport {\n ChevronToggleButton,\n CopyButton,\n EyeButton,\n PencilButton,\n PrintButton,\n} from './Buttons';\n\n// Import types\nimport { HtmlElementId } from './AppendEditor';\n\nenum HtmlClassName {\n chevronToggleButton = 'menu-button chevron-toggle-button',\n menuButton = 'menu-button',\n on = ' on',\n off = ' off',\n}\n\ninterface MenuProps {\n borderlessMode?: boolean;\n editingMode?: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n monacoEditorLanguage: string;\n onConfirmPrintUrl: () => void;\n overflowMode?: boolean;\n refreshEdit: () => void;\n refreshView: () => void;\n saveText: (text: string) => void;\n showMenuOptionsEdit?: boolean;\n //showMenuOptionsMonacoEditor?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n text: string;\n toggleBorderlessMode: () => void;\n toggleFixedHeightMode: () => void;\n toggleFullWidthMode: () => void;\n toggleOverflowMode: () => void;\n toggleShowMenu: () => void;\n toggleShowMenuOptionsEdit: () => void;\n //toggleShowMenuOptionsMonacoEditor?: () => void;\n toggleShowMenuOptionsView: () => void;\n toggleShowMenuOptionsShare: () => void;\n viewMode?: boolean;\n}\n\ninterface MenuState {\n message?: string;\n displayMessageShare: boolean;\n displayMessageEdit: boolean;\n}\n\nexport default class Menu extends React.Component {\n clearTooltipTimer: NodeJS.Timeout | undefined;\n constructor(props: MenuProps) {\n super(props);\n this.state = {\n message: '',\n displayMessageEdit: false,\n displayMessageShare: false,\n };\n }\n\n resetMessageTimer = () => {\n if (this.clearTooltipTimer) {\n clearTimeout(this.clearTooltipTimer);\n }\n this.clearTooltipTimer = setTimeout(() => {\n this.setState({\n displayMessageEdit: false,\n displayMessageShare: false,\n });\n }, 5000);\n };\n\n showMessageEdit = () => {\n this.setState(\n {\n displayMessageEdit: true,\n displayMessageShare: false,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n showMessageShare = () => {\n this.setState(\n {\n displayMessageEdit: false,\n displayMessageShare: true,\n },\n () => {\n this.resetMessageTimer();\n }\n );\n };\n\n copyToClipboard = (text: string) => {\n const textField = document.createElement('textarea');\n textField.value = text;\n document.body.appendChild(textField);\n textField.select();\n document.execCommand('copy');\n this.showMessageShare();\n textField.remove();\n };\n\n copyText = () => {\n if (this.props.text) {\n this.setState({ message: 'Copied Text to clipboard' }, () => {\n this.copyToClipboard(this.props.text);\n });\n } else {\n this.setState({ message: 'No text to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n }\n };\n\n copyHtml = () => {\n if (!this.props.viewMode) {\n this.setState(\n { message: 'Unable to copy HTML. Please turn View Mode on' },\n () => this.showMessageShare()\n );\n } else if (!this.props.text) {\n this.setState({ message: 'No HTML to copy. Your note is empty' }, () => {\n this.showMessageShare();\n });\n } else {\n const renderedNote = document.getElementById('renderedNote');\n if (renderedNote?.firstElementChild?.innerHTML) {\n this.setState({ message: 'Copied HTML to clipboard' });\n this.copyToClipboard(renderedNote?.firstElementChild.innerHTML);\n }\n }\n };\n\n formatText = () => {\n if (\n this.props.monacoEditorLanguage !== 'markdown' &&\n this.props.editingMode === EditingModes.useMonacoEditor\n ) {\n this.setState(\n {\n message:\n 'Error: Your Monaco Editor language is not Markdown. Formatting is only available for Markdown',\n },\n () => {\n this.showMessageEdit();\n }\n );\n } else if (this.props.text) {\n this.setState(\n { message: 'Formatted Markdown text with Prettier' },\n () => {\n try {\n const formattedText = prettier.format(this.props.text, {\n parser: 'markdown',\n plugins: [parserMarkdown],\n });\n this.props.saveText(formattedText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.showMessageEdit();\n } catch (e) {\n this.setState({ message: 'Error formatting text: ' + e }, () => {\n this.showMessageEdit();\n });\n console.log('Error formatting text: ' + e);\n }\n }\n );\n } else {\n this.setState(\n { message: 'No text to format. Your note is empty' },\n () => {\n this.showMessageEdit();\n }\n );\n }\n };\n\n uncheckBoxes = () => {\n const { text } = this.props;\n const checkedBoxes = new RegExp(/- \\[x\\]/gm);\n if (checkedBoxes.test(text)) {\n const newText = text.replace(checkedBoxes, '- [ ]');\n this.props.saveText(newText);\n this.props.refreshEdit();\n this.props.refreshView();\n this.setState({ message: 'Unchecked all checkboxes' }, () => {\n this.showMessageEdit();\n });\n } else {\n this.setState({ message: 'No checked checkboxes found' }, () => {\n this.showMessageEdit();\n });\n }\n };\n\n render() {\n // You can render any custom fallback UI\n return [\n
,\n
\n \n {this.props.showMenuOptionsView && [\n ,\n ,\n ,\n ,\n ]}\n \n {this.props.showMenuOptionsShare && [\n ,\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n \n {this.props.showMenuOptionsEdit && [\n ,\n ,\n \n

\n {this.state.message}\n

\n
,\n ]}\n
\n ,\n ];\n }\n}\n","import React from 'react';\nimport { MonacoEditor } from './Monaco';\nimport {\n DefaultSettings,\n EditingModes,\n SaveSettingsInterface,\n} from './AppendEditor';\nimport { CloseIcon, RefreshIcon } from './Icons';\nimport { ChevronToggleButton, UndoButton } from './Buttons';\n\nconst customStylesID = 'customStyles';\nconst editingModeID = 'editingMode';\nconst fontEditID = 'fontEdit';\nconst fontSizeID = 'fontSize';\nconst fontViewID = 'fontView';\nconst monacoEditorLanguageID = 'monacoEditorLanguage';\nconst resetAllSettingsID = 'resetAllSettings';\nconst saveAsDefaultID = 'saveAsDefault';\n\ninterface SettingsProps {\n defaultSettings: DefaultSettings;\n customStyles: string;\n editingMode?: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n cancelText: string;\n confirmText: string;\n debugMode: boolean;\n keyMap: Map;\n onCancel: () => void;\n onConfirm: (object: SaveSettingsInterface) => void;\n title: string;\n helpLink: string;\n}\n\ninterface SettingsState {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n saveAsDefault: boolean;\n showCustomStyles: boolean;\n [x: string]: string | boolean;\n}\n\nconst startRegExp = new RegExp(/```css\\n/gm);\nconst cssRegExp = new RegExp(/```css/gm);\nconst endRegExp = new RegExp(/\\n```/gm);\nconst codeRegExp = new RegExp(/```/gm);\n\nexport default class Settings extends React.Component<\n SettingsProps,\n SettingsState\n> {\n constructor(props: SettingsProps) {\n super(props);\n let monacoEditorLanguage = 'markdown';\n if (this.props.monacoEditorLanguage) {\n monacoEditorLanguage = this.props.monacoEditorLanguage;\n }\n let editingMode = 'usePlainText';\n if (this.props.editingMode) {\n editingMode = this.props.editingMode;\n }\n this.state = {\n customStyles: this.props.customStyles,\n editingMode,\n fontEdit: this.props.fontEdit,\n fontSize: this.props.fontSize,\n fontView: this.props.fontView,\n monacoEditorLanguage,\n saveAsDefault: false,\n showCustomStyles: false, // false by default for a mobile-first experience\n };\n }\n\n handleInputChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.setState({\n [name]: value,\n });\n if (this.props.debugMode) {\n console.log(\n 'Settings event name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n };\n\n handleSelectChange = (event: React.ChangeEvent) => {\n const target = event.target;\n const value = target.value;\n const name = target.name;\n this.setState(\n {\n [name]: value,\n },\n () => {\n if (this.props.debugMode) {\n console.log(\n 'Saved select. Name: ' +\n event.target.name +\n ' Value: ' +\n event.target.value\n );\n }\n }\n );\n };\n\n toggleShowCustomStyles = () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n };\n\n cleanCustomStyles = (text: string) => {\n if (text) {\n return text\n .replace(startRegExp, '')\n .replace(cssRegExp, '')\n .replace(endRegExp, '')\n .replace(codeRegExp, '');\n } else {\n return text;\n }\n };\n\n saveText = (text: string) => {\n this.setState({\n customStyles: text,\n });\n };\n\n handleSubmit = () => {\n if (this.props.debugMode) {\n let fontEditMessage = '';\n let fontViewMessage = '';\n if (this.state.fontEdit === '' || this.state.fontEdit === undefined) {\n fontEditMessage = 'Default';\n } else if (this.state.fontEdit) {\n fontEditMessage = this.state.fontEdit;\n }\n if (this.state.fontView === '' || this.state.fontView === undefined) {\n fontViewMessage = 'Default';\n } else if (this.state.fontView) {\n fontViewMessage = this.state.fontView;\n }\n console.log(\n 'Settings.tsx handleSubmit() triggered: ' +\n '\\n - Settings editingMode: ' +\n this.state.editingMode +\n '\\n - Settings fontEdit: ' +\n this.state.fontEdit +\n '\\n - Settings fontView: ' +\n this.state.fontView +\n '\\n - Your chosen font for Edit/Append is: ' +\n fontEditMessage +\n '\\n - Your chosen font for View/Print is: ' +\n fontViewMessage +\n '\\n'\n );\n }\n this.setState(\n {\n // clean the custom styles prior to saving them\n customStyles: this.cleanCustomStyles(this.state.customStyles),\n },\n () => {\n if (this.props.debugMode) {\n console.log('Your custom styles: ' + this.state.customStyles);\n }\n const {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n } = this.state;\n this.props.onConfirm({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n });\n }\n );\n };\n\n loadDefaultSettings = () => {\n const defaultSettings = this.props.defaultSettings;\n this.setState(\n {\n ...defaultSettings,\n },\n () => {\n this.refreshCustomStyles();\n }\n );\n };\n\n refreshCustomStyles = () => {\n this.setState(\n {\n showCustomStyles: !this.state.showCustomStyles,\n },\n () => {\n this.setState({\n showCustomStyles: !this.state.showCustomStyles,\n });\n }\n );\n };\n\n clearCustomStyles = () => {\n this.setState(\n {\n customStyles: '',\n },\n () => {\n this.refreshCustomStyles();\n if (this.props.debugMode) {\n console.log('customStyles reset: ' + this.state.customStyles);\n }\n }\n );\n const customStyles = document.getElementById(\n customStylesID\n ) as HTMLTextAreaElement;\n if (customStyles) {\n customStyles.value = '';\n customStyles.focus();\n }\n };\n\n clearFontEdit = () => {\n this.setState({\n fontEdit: '',\n });\n const fontEdit = document.getElementById(fontEditID) as HTMLTextAreaElement;\n if (fontEdit) {\n fontEdit.value = '';\n fontEdit.focus();\n }\n };\n\n clearFontSize = () => {\n this.setState({\n fontSize: '',\n });\n const fontSize = document.getElementById(fontSizeID) as HTMLSelectElement;\n if (fontSize) {\n fontSize.value = '';\n fontSize.focus();\n }\n };\n\n clearFontView = () => {\n this.setState({\n fontView: '',\n });\n const fontView = document.getElementById(fontViewID) as HTMLTextAreaElement;\n if (fontView) {\n fontView.value = '';\n fontView.focus();\n }\n };\n\n clearEditingMode = () => {\n this.setState({\n editingMode: EditingModes.usePlainText,\n });\n };\n\n clearMonacoEditorLanguage = () => {\n this.setState({\n monacoEditorLanguage: 'markdown',\n });\n const monacoEditorLanguage = document.getElementById(\n monacoEditorLanguageID\n ) as HTMLSelectElement;\n if (monacoEditorLanguage) {\n monacoEditorLanguage.value = 'markdown';\n monacoEditorLanguage.focus();\n }\n };\n\n clearSaveAsDefault = () => {\n this.setState({\n saveAsDefault: false,\n });\n const saveAsDefault = document.getElementById(\n saveAsDefaultID\n ) as HTMLInputElement;\n saveAsDefault.checked = false;\n saveAsDefault.focus();\n };\n\n clearAllSettings = () => {\n // We clear from bottom settings to top settings so the focus afterwards is on top\n this.clearSaveAsDefault();\n this.clearCustomStyles();\n this.clearFontView();\n this.clearFontEdit();\n this.clearFontSize();\n this.clearMonacoEditorLanguage();\n this.clearEditingMode();\n const resetAllSettings = document.getElementById(resetAllSettingsID);\n if (resetAllSettings) {\n resetAllSettings.focus();\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, true);\n //console.log(\"Keys pressed: \" + e.key + \"KeyMap for key: \" + keyMap.get(e.key)) + \"KeyMap for Shift: \" + keyMap.get('Shift');\n // Save settings if Control and 's' are pressed\n if (this.props.keyMap.get('Control') && this.props.keyMap.get('s')) {\n e.preventDefault();\n this.handleSubmit();\n }\n // Save settings if Control and Enter are pressed\n else if (\n this.props.keyMap.get('Control') &&\n this.props.keyMap.get('Enter')\n ) {\n e.preventDefault();\n this.handleSubmit();\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent) => {\n this.props.keyMap.set(e.key, false);\n };\n\n onBlur = (e: React.FocusEvent) => {\n this.props.keyMap.clear();\n };\n\n componentWillUnmount = () => {\n this.props.keyMap.clear();\n };\n\n render() {\n //

\n const { title, onCancel, confirmText, cancelText, helpLink } = this.props;\n return (\n
\n
\n
\n \n \n \n
\n

{title}

\n \n
\n
\n
\n

\n Need help? Check out the{' '}\n \n documentation\n \n . To clear all settings, click undo: \n

\n \n
\n
\n
\n
\n

To load your personal default settings, click: 

\n \n \n \n
\n
\n
\n
\n

Editing Mode:

\n \n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n {this.state.editingMode === EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n {this.state.editingMode !== EditingModes.useMonacoEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n {this.state.editingMode !== EditingModes.useDynamicEditor && [\n
\n \n
\n \n \n
\n
,\n ]}\n
\n \n {this.state.showCustomStyles && [\n ,\n ]}\n
\n {this.state.showCustomStyles && [\n
\n \n
,\n ]}\n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n );\n }\n}\n","import React, { ErrorInfo } from 'react';\nimport { GearIcon } from './Icons';\nimport { clickSettingsButton } from '../lib/clickButton';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error?: Error;\n errorInfo?: ErrorInfo;\n}\n\n/**\n * Learn more about Error Boundaries here:\n * https://reactjs.org/docs/error-boundaries.html\n */\n\nexport default class ErrorBoundary extends React.Component<\n any,\n ErrorBoundaryState\n> {\n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log('Error:', error, '\\nError Info:', errorInfo);\n this.setState({\n error,\n errorInfo,\n });\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (\n
\n
\n
\n

Something went wrong.

\n

\n Error Name: {this.state.error?.name}\n

\n

\n Error Message: {this.state.error?.message}\n

\n

Please see the developer console for details.

\n
\n

\n Errors such as TypeError and{' '}\n Cannot read property 'type' of undefined usually\n occur when the editor is unable to process and render your notes\n because it contains incorrect or incomplete HTML. If you are\n writing in HTML, then please continue to write and refresh the\n View Mode when the HTML tags are closed.\n

\n

\n If you are using the Dynamic editing mode, then please switch to\n the Plain Textarea or Monaco editing modes in the Settings\n \n  \n \n  \n \n and remove or fix the text that is causing the error.\n

\n

\n If the error persists or is not related to the content of your\n note, then please{' '}\n \n report the issue on GitHub\n {' '}\n and we will try to fix it.{' '}\n \n 🙂\n \n

\n
\n
\n
\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport { EditorKit, EditorKitDelegate } from 'sn-editor-kit';\nimport PrintDialog from './PrintDialog';\nimport EditNote from './EditNote';\nimport ViewNote from './ViewNote';\nimport AppendText from './AppendText';\nimport Settings from './Settings';\nimport { MonacoDiffEditor } from './Monaco';\nimport ErrorBoundary from './ErrorBoundary';\nimport Menu from './Menu';\n\nimport CodeMirror, { Editor } from 'codemirror';\nimport 'codemirror/lib/codemirror';\nimport 'codemirror/mode/gfm/gfm';\n\n// CodeMirror addons\n\n// For markdown\nimport 'codemirror/addon/edit/continuelist';\n\n// For search\nimport 'codemirror/addon/search/jump-to-line';\nimport 'codemirror/addon/search/match-highlighter';\nimport 'codemirror/addon/search/matchesonscrollbar';\nimport 'codemirror/addon/search/search';\nimport 'codemirror/addon/search/searchcursor';\nimport 'codemirror/addon/dialog/dialog';\n\n// For styling selected text\nimport 'codemirror/addon/selection/mark-selection';\nimport {\n EyeIcon,\n GearIcon,\n HelpIcon,\n MenuIcon,\n PencilIcon,\n PlusIcon,\n} from './Icons';\n\nimport { isLongString, renderLongMarkdown } from '../lib/renderMarkdown';\n\nexport enum HtmlElementId {\n appendButton = 'appendButton',\n appendTextArea = 'appendTextArea',\n appendix = 'appendix',\n content = 'content',\n edit = 'edit',\n editButton = 'editButton',\n editTextArea = 'editTextArea',\n header = 'header',\n helpButton = 'helpButton',\n menuButton = 'menuButton',\n newLine = 'newLine',\n newParagraph = 'newParagraph',\n printButton = 'printButton',\n settingsButton = 'settingsButton',\n view = 'view',\n viewButton = 'viewButton',\n}\n\nexport enum HtmlClassName {\n fixed = 'fixed',\n fixedHeader = 'fixed-header',\n}\n\nexport enum EditingModes {\n usePlainText = 'usePlainText',\n useCodeMirror = 'useCodeMirror',\n useDynamicEditor = 'useDynamicEditor',\n useMonacoEditor = 'useMonacoEditor',\n}\n\nexport type DefaultSettings = {\n customStyles: string;\n editingMode: string;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n monacoEditorLanguage: string;\n};\n\nexport interface SaveSettingsInterface extends DefaultSettings {\n saveAsDefault: boolean;\n}\n\nexport type menuOptions = {\n borderlessMode?: boolean;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n};\n\nexport interface AppendInterface {\n text: string;\n appendCodeMirror?: any;\n appendNewLine: boolean;\n appendNewParagraph: boolean;\n appendMode: boolean;\n appendRows: number;\n appendText: string;\n borderlessMode?: boolean;\n bypassDebounce: boolean;\n confirmPrintUrl: boolean;\n currentState?: object;\n customStyles: string;\n defaultSettings: DefaultSettings;\n editMode?: any;\n editingMode?: string;\n editCodeMirror?: any;\n fontEdit: string;\n fontSize: string;\n fontView: string;\n fixedHeightMode?: boolean;\n fullWidthMode?: boolean;\n overflowMode?: boolean;\n keyMap?: Object;\n monacoEditorLanguage: string;\n printURL: boolean;\n refreshEdit: boolean;\n refreshView: boolean;\n saveAsDefault?: boolean;\n savingEditorOptions?: boolean;\n showAppendix: boolean;\n showDiff: boolean;\n showHeader: boolean;\n showHelp: boolean;\n showMenu?: boolean;\n showMenuOptionsEdit?: boolean;\n showMenuOptionsShare?: boolean;\n showMenuOptionsView?: boolean;\n settingsMode: boolean;\n viewMode?: boolean;\n}\n\n/**\n * Some properties are optional so\n * they do not need to be set\n * when switching between notes.\n */\n\nconst initialState = {\n text: '',\n appendNewLine: false,\n appendNewParagraph: false,\n appendMode: false,\n appendRows: 8,\n appendText: '',\n bypassDebounce: false, // We keep this as false in initialState so debounce works in the demo\n confirmPrintUrl: false,\n customStyles: '',\n defaultSettings: {\n customStyles: '',\n editingMode: 'usePlainText',\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n },\n fontEdit: '',\n fontSize: '',\n fontView: '',\n monacoEditorLanguage: 'markdown',\n printURL: true,\n refreshEdit: false,\n refreshView: false,\n showAppendix: true,\n showHeader: true,\n showHelp: false,\n showDiff: false,\n settingsMode: false,\n};\n\nlet last_known_scroll_position = 0;\n\nconst debugMode = false;\n\nlet keyMap = new Map();\n\nexport default class AppendEditor extends React.Component<{}, AppendInterface> {\n editorKit: any;\n refreshEditorTimer: NodeJS.Timeout | undefined;\n saveTimer: NodeJS.Timeout | undefined;\n\n constructor(props: AppendInterface) {\n super(props);\n this.configureEditorKit();\n this.state = initialState;\n }\n\n /**\n * This loads the first time the editor is loaded\n * This does not load every time a new note is loaded */\n componentDidMount = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.componentDidMount() triggered');\n }\n this.onViewMode();\n this.loadDefaultMenuState();\n document.addEventListener('scroll', this.onScroll);\n };\n\n componentWillUnmount = () => {\n document.removeEventListener('scroll', this.onScroll);\n };\n\n configureEditorKit = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.configureEditorKit() triggered');\n }\n let delegate = new EditorKitDelegate({\n /** This loads every time a different note is loaded\n * We turn bypassDebounce to true so\n * the editor always renders the markdown for the latest note\n */\n setEditorRawText: (text: string) => {\n this.setState(\n {\n ...initialState,\n bypassDebounce: true,\n text,\n },\n () => {\n if (debugMode) {\n console.log(\n '#################################################################################\\n' +\n 'AppendEditor.tsx:',\n '\\n - loaded text:',\n text +\n '\\n - this.configureEditorKit() callback triggered:' +\n '\\n - this.state.savingsDefaultSettings: ' +\n this.state.savingEditorOptions +\n '\\n - this.state: ' +\n JSON.stringify(this.state, null, ' ')\n );\n }\n /** Clear the debounce from the previous note and componentDidMount\n * Then call and flush the debounce so the correct markdown will render\n * the first time after turning the bypass off */\n isLongString.cancel();\n isLongString(text);\n isLongString.flush();\n renderLongMarkdown.cancel();\n if (isLongString(text)) {\n renderLongMarkdown(text);\n renderLongMarkdown.flush();\n }\n /** This prevents metadata from loading when saving editor options or default settings */\n if (!this.state.savingEditorOptions) {\n this.loadEditorOptions();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n /** Turn the debounce bypass off\n * This loads every time, even when saving editor options or default settings\n * because bypassDebounce is set to true every time\n */\n setTimeout(() => {\n this.setState({\n bypassDebounce: false,\n });\n }, 1000);\n }\n );\n },\n clearUndoHistory: () => {},\n getElementsBySelector: () => [],\n });\n\n this.editorKit = new EditorKit({\n delegate: delegate,\n mode: 'plaintext',\n supportsFilesafe: false,\n });\n };\n\n /** Expect this to run three times when loading a note:\n * once when loading editor options,\n * once when loading default settings, and\n * once when loading meta data\n * Use the timer to prevent the function from being executed when it is called\n * repeatedly, as when loading a note or saving a menu option */\n refreshEditor = () => {\n if (isLongString(this.state.text)) {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 20);\n } else {\n if (this.refreshEditorTimer) {\n clearTimeout(this.refreshEditorTimer);\n }\n this.refreshEditorTimer = setTimeout(() => {\n if (!this.state.savingEditorOptions) {\n this.refreshEdit();\n this.refreshView();\n this.activateStyles();\n }\n }, 10);\n }\n };\n\n loadDefaultSettings = () => {\n try {\n const defaultSettingsString = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'defaultSettings'\n );\n const defaultEditingMode = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'editingMode'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting() default settings loaded: ' +\n '\\n - defaultSettingsString: ' +\n defaultSettingsString,\n '\\n - typeof:',\n typeof defaultSettingsString,\n '\\n - defaultEditingMode:',\n defaultEditingMode,\n '\\n - typeof:',\n typeof defaultEditingMode\n );\n }\n if (defaultSettingsString !== undefined) {\n const defaultSettingsObject = JSON.parse(\n defaultSettingsString\n ) as DefaultSettings;\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'if (defaultSettingsString !== undefined) triggered',\n '\\n - typeof defaultSettings:',\n typeof defaultSettingsObject\n );\n }\n this.setState(\n {\n customStyles: defaultSettingsObject.customStyles,\n editingMode: defaultSettingsObject.editingMode,\n fontEdit: defaultSettingsObject.fontEdit,\n fontSize: defaultSettingsObject.fontSize,\n fontView: defaultSettingsObject.fontView,\n monacoEditorLanguage: defaultSettingsObject.monacoEditorLanguage,\n defaultSettings: defaultSettingsObject,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n defaultSettingsObject:',\n defaultSettingsObject,\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings, null, ' ')\n );\n }\n this.refreshEditor();\n }\n );\n } else if (defaultEditingMode !== undefined) {\n /** This else if loads legacy default settings introduced in v1.1.0\n * We only need to check defaultEditingMode because it is never empty if it is defined\n * */\n const defaultCustomStyles = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'customStyles'\n );\n const defaultFontEdit = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontEdit'\n );\n const defaultFontSize = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontSize'\n );\n const defaultFontView = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'fontView'\n );\n const defaultMonacoEditorLanguage = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'monacoEditorLanguage'\n );\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n loadDefaultSetting():',\n 'else if (defaultEditingMode !== undefined) triggered',\n '\\n - default customStyles: ' + defaultCustomStyles,\n '\\n - typeof:',\n typeof defaultCustomStyles +\n '\\n - default fontSize: ' +\n defaultFontSize +\n '\\n - default fontEdit: ' +\n defaultFontEdit +\n '\\n - default fontView: ' +\n defaultFontView +\n '\\n - default monacoEditorLanguage: ' +\n defaultMonacoEditorLanguage\n );\n }\n this.setState(\n {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n defaultSettings: {\n customStyles: defaultCustomStyles,\n editingMode: defaultEditingMode,\n fontEdit: defaultFontEdit,\n fontSize: defaultFontSize,\n fontView: defaultFontView,\n monacoEditorLanguage: defaultMonacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadDefaultSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n }\n );\n } else {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: loadDefaultSettings(), else, current state:',\n JSON.stringify(this.state, null, ' ')\n );\n }\n this.refreshEditor();\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading default settings:', error);\n }\n };\n\n loadEditorOptions = () => {\n try {\n const menuOptionsString = this.editorKit.internal.componentManager.componentDataValueForKey(\n 'menuOptions'\n );\n if (menuOptionsString !== undefined) {\n const menuOptionsObject = JSON.parse(menuOptionsString) as menuOptions;\n this.setState(\n {\n borderlessMode: menuOptionsObject.borderlessMode,\n fixedHeightMode: menuOptionsObject.fixedHeightMode,\n fullWidthMode: menuOptionsObject.fullWidthMode,\n overflowMode: menuOptionsObject.overflowMode,\n //showMenuOptionsEdit: menuOptionsObject.showMenuOptionsEdit,\n //showMenuOptionsShare: menuOptionsObject.showMenuOptionsShare,\n //showMenuOptionsView: menuOptionsObject.showMenuOptionsView,\n },\n () => {\n this.refreshEditor();\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error loading editor options:', error);\n }\n };\n\n // This loads the Settings and Append Text\n loadMetaData = () => {\n this.editorKit.internal.componentManager.streamContextItem((note: any) => {\n // Load editor settings\n if (\n note.content.appendEditorCustomStyles ||\n note.content.appendEditorEditingMode ||\n note.content.appendEditorFontEdit ||\n note.content.appendEditorFontSize ||\n note.content.appendEditorFontView ||\n note.content.appendEditorMonacoEditorLanguage\n ) {\n this.setState(\n {\n customStyles: note.content.appendEditorCustomStyles,\n editingMode: note.content.appendEditorEditingMode,\n fontEdit: note.content.appendEditorFontEdit,\n fontSize: note.content.appendEditorFontSize,\n fontView: note.content.appendEditorFontView,\n monacoEditorLanguage: note.content.appendEditorMonacoEditorLanguage,\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - loadMetaData() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions\n );\n }\n this.refreshEditor();\n if (debugMode) {\n console.log(\n 'editorKit metadata loaded: ' +\n '\\n - loaded customStyles: ' +\n this.state.customStyles +\n '\\n - loaded editingMode: ' +\n this.state.editingMode +\n '\\n - loaded fontEdit: ' +\n this.state.fontEdit +\n '\\n - loaded fontSize: ' +\n this.state.fontSize +\n '\\n - loaded fontView: ' +\n this.state.fontView +\n '\\n - loaded monacoEditorLanguage: ' +\n this.state.monacoEditorLanguage\n );\n }\n }\n );\n }\n // Load append settings\n if (note.content.appendNewLine || note.content.appendNewParagraph) {\n this.setState({\n appendNewLine: note.content.appendNewLine,\n appendNewParagraph: note.content.appendNewParagraph,\n });\n }\n // Finally, load appendText\n this.setState(\n {\n appendText: note.content.appendText,\n },\n () => {\n /**If both text and appendText are empty,\n * such as when creating a new note,\n * and editMode is off,\n * then open the edit mode\n */\n if (\n !this.state.text &&\n !this.state.appendText &&\n !this.state.editMode\n ) {\n this.onEditMode();\n }\n }\n );\n if (debugMode) {\n console.log(\n ' - loaded append text: ' +\n this.state.appendText +\n '\\n - loaded append newline: ' +\n this.state.appendNewLine +\n '\\n - loaded append new paragraph: ' +\n this.state.appendNewParagraph +\n '\\n - loaded editorKit internal appendText: ' +\n this.editorKit.internal.note.content.appendText\n );\n }\n });\n };\n\n saveText = (text: string) => {\n this.saveNote(text);\n this.setState(\n {\n text: text,\n },\n () => {\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n } else if (this.state.viewMode && isLongString(text)) {\n /** If the note text is long, then rendering its markdown will debounce\n * If the we stop editing for 550 milliseconds, then\n * automatically refresh the view to force the latest markdown to render\n * We use 550 because the debounce is 500.\n */\n if (this.saveTimer) {\n clearTimeout(this.saveTimer);\n }\n this.saveTimer = setTimeout(() => {\n if (this.state.fixedHeightMode) {\n /** This keeps the vertical scroll when refreshing view */\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n let scrollY = view.scrollTop;\n this.refreshView();\n /** We have to find the new view because\n * the previous one doesn't exist anymore */\n const refreshedView = document.getElementById(\n HtmlElementId.view\n );\n if (refreshedView) {\n refreshedView.scrollTop = scrollY;\n }\n } else {\n this.refreshView();\n }\n } else {\n this.refreshView();\n }\n }, 550);\n }\n if (debugMode) {\n console.log('AppendEditor.tsx: saved text:', this.state.text);\n }\n }\n );\n };\n\n saveNote = (text: string) => {\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n this.editorKit.onEditorValueChanged(text);\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving note:', error);\n }\n };\n\n // Entry operations\n\n appendTextToNote = () => {\n // Do nothing if there's no append text\n if (this.state.appendText) {\n /*\n * We usually use this.editText() to save the main text\n * However, we want to save the main text and clear the appendText\n * Consecutive calls to the component manager does not work well,\n * so we want to do both with one call to the component manager\n * This means we need multiple versions of this function depending on what we want to save */\n const { appendText } = this.state;\n let textToAppend = '';\n // We test for new paragraph first even though new line is on top and is on by default\n if (this.state.appendNewParagraph) {\n textToAppend = ' \\n\\n' + appendText;\n } else if (this.state.appendNewLine) {\n textToAppend = ' \\n' + appendText;\n } else {\n textToAppend = appendText;\n }\n this.setState(\n {\n text: this.state.text.concat(textToAppend),\n appendText: '',\n },\n () => {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.text = this.state.text; // this.editorKit.internal.note.content.text\n note.content.appendText = this.state.appendText; // this.editorKit.internal.note.content.appendText\n }\n );\n }\n this.refreshEdit();\n // Refresh view mode if using dynamic\n if (this.state.editingMode === EditingModes.useDynamicEditor) {\n this.refreshView();\n setTimeout(() => {\n this.skipToBottom();\n }, 50);\n } else if (isLongString(this.state.text)) {\n setTimeout(() => {\n this.refreshView();\n this.skipToBottom();\n }, 550);\n } else {\n this.skipToBottom();\n }\n }\n );\n }\n // Refresh appendCodeMirror\n if (\n this.state.appendCodeMirror &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.state.appendCodeMirror.setValue('');\n }\n };\n\n autoSaveAppendText = (text: string) => {\n // This code is similar to this.onAppend();, but we only save the appendText and not the main text\n this.setState({\n appendText: text,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.appendText = text;\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving appendText:', error);\n }\n };\n\n autoSaveCheckBoxes = (newLine: boolean, newParagraph: boolean) => {\n // Here we save the appendText, appendNewLine, and appendNewParagraph\n // We have an additional function for this because we only call it when the user clicks a checkbox\n this.setState({\n appendNewLine: newLine,\n appendNewParagraph: newParagraph,\n });\n // This will work in an SN context, but breaks the standalone editor, so we need to catch the error\n try {\n let note = this.editorKit.internal.note;\n if (note) {\n this.editorKit.internal.componentManager.saveItemWithPresave(\n note,\n () => {\n note.content.appendNewLine = newLine;\n note.content.appendNewParagraph = newParagraph;\n }\n );\n }\n } catch (error) {\n // Log outside debug mode\n console.log('Error saving checkboxes:', error);\n }\n };\n\n refreshEdit = () => {\n this.setState(\n {\n refreshEdit: !this.state.refreshEdit,\n },\n () => {\n // We could also check for this.state.editMode,\n // but it might not be loaded yet.\n // Checking for editTextArea checks whether editMode has loaded\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (\n editTextArea &&\n this.state.editingMode === EditingModes.useCodeMirror\n ) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n );\n };\n\n refreshView = () => {\n this.setState({\n refreshView: !this.state.refreshView,\n });\n };\n\n configureCodeMirror = (id: string) => {\n if (id === HtmlElementId.editTextArea) {\n if (debugMode) {\n console.log('this.state.text: ' + this.state.text);\n }\n const editTextArea = document.getElementById(id) as HTMLTextAreaElement;\n if (editTextArea) {\n const editCodeMirror = CodeMirror.fromTextArea(editTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.text,\n });\n editCodeMirror.setSize('100%', '100%');\n editCodeMirror.on('change', () => {\n const editCodeMirrorText = editCodeMirror.getValue();\n if (debugMode) {\n console.log('editCodeMirror value: ' + editCodeMirrorText);\n }\n editCodeMirror.save();\n this.saveText(editCodeMirrorText);\n });\n editCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownEditTextArea(event);\n this.onKeyDownTextArea(event);\n });\n editCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n editCodeMirror: editCodeMirror,\n });\n }\n } else if (id === HtmlElementId.appendTextArea) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n ) as HTMLTextAreaElement;\n if (appendTextArea) {\n const appendCodeMirror = CodeMirror.fromTextArea(appendTextArea, {\n autocorrect: true,\n autocapitalize: true,\n extraKeys: {\n Enter: 'newlineAndIndentContinueMarkdownList',\n 'Alt-F': 'findPersistent',\n },\n lineNumbers: false,\n lineWrapping: true,\n mode: 'gfm',\n spellcheck: true,\n //@ts-ignore\n styleSelectedText: true,\n tabindex: 0,\n theme: 'default',\n value: this.state.appendText,\n });\n appendCodeMirror.setSize('100%', '100%');\n appendCodeMirror.on('change', () => {\n const appendCodeMirrorText = appendCodeMirror.getValue();\n appendCodeMirror.save();\n this.autoSaveAppendText(appendCodeMirrorText);\n });\n appendCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyDown(event);\n this.onKeyDownAppendTextArea(event);\n this.onKeyDownTextArea(event);\n });\n appendCodeMirror.on('keyup', (cm: Editor, event: KeyboardEvent) => {\n this.onKeyUp(event);\n });\n this.setState({\n appendCodeMirror: appendCodeMirror,\n });\n }\n }\n };\n\n // Event Handlers\n onEditMode = () => {\n // if Append box is empty, close it and open Edit mode\n // if Edit mode is on, then close it, open View mode, and Append mode\n if (!this.state.editMode) {\n if (this.state.appendMode && !this.state.appendText) {\n this.setState({\n appendMode: false,\n });\n }\n this.setState(\n {\n editMode: true,\n },\n () => {\n const editTextArea = document.getElementById(\n HtmlElementId.editTextArea\n );\n if (editTextArea) {\n editTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.editTextArea);\n }\n }\n }\n );\n } else if (this.state.editMode) {\n /**If edit mode is on and Monaco Editor is off,\n * then turn edit mode off and turn view mode on.\n * This automatically renders the text. We do not\n * do this when Monaco is on because refreshing edit Mode\n * with Monaco Editor off allows us to resize the Monaco Editor.\n */\n if (!(this.state.editingMode === EditingModes.useMonacoEditor)) {\n this.setState({\n viewMode: true,\n });\n }\n if (this.state.editCodeMirror) {\n this.state.editCodeMirror.toTextArea();\n }\n this.setState(\n {\n editMode: false,\n },\n () => {\n // if not using append mode, focus on editButton\n if (!this.state.appendMode) {\n const editButton = document.getElementById(\n HtmlElementId.editButton\n );\n if (editButton) {\n editButton.focus();\n }\n }\n }\n );\n }\n };\n\n onAppendMode = (scrollDown = true, closeEdit = true, focus = true) => {\n if (!this.state.appendMode) {\n if (closeEdit) {\n this.setState({\n editMode: false,\n });\n }\n this.setState(\n {\n appendMode: true,\n },\n () => {\n if (scrollDown) {\n this.scrollToBottom();\n }\n if (focus) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.focus();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.configureCodeMirror(HtmlElementId.appendTextArea);\n }\n }\n }\n }\n );\n } else if (this.state.appendMode) {\n if (this.state.appendCodeMirror) {\n this.state.appendCodeMirror.toTextArea();\n }\n this.setState(\n {\n appendMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (focus) {\n const appendButton = document.getElementById(\n HtmlElementId.appendButton\n );\n if (appendButton) {\n appendButton.focus();\n }\n }\n }\n );\n }\n };\n\n onViewMode = () => {\n if (!this.state.viewMode) {\n this.setState(\n {\n viewMode: true,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (this.state.appendMode && !this.state.editMode) {\n this.skipToBottom();\n }\n }\n );\n }\n if (this.state.viewMode) {\n this.setState(\n {\n viewMode: false,\n },\n () => {\n if (this.state.editingMode === EditingModes.useMonacoEditor) {\n this.refreshEdit();\n }\n if (!this.state.editMode && !this.state.appendMode) {\n this.onEditMode();\n }\n }\n );\n }\n };\n\n toggleShowHelp = () => {\n if (!this.state.showHelp) {\n this.setState(\n {\n showHelp: true,\n },\n () => {\n if (!this.state.viewMode) {\n this.onViewMode();\n } else if (this.state.viewMode) {\n this.refreshView();\n }\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n setTimeout(() => {\n this.scrollToTop();\n }, 50);\n }\n );\n } else {\n this.setState(\n {\n showHelp: false,\n },\n () => {\n this.refreshView();\n const helpButton = document.getElementById(HtmlElementId.helpButton);\n if (helpButton) {\n helpButton.focus();\n }\n }\n );\n }\n };\n\n toggleShowMenu = () => {\n this.setState(\n {\n showMenu: !this.state.showMenu,\n },\n () => {\n const menuButton = document.getElementById(HtmlElementId.menuButton);\n if (menuButton) {\n menuButton.focus();\n }\n }\n );\n };\n\n loadDefaultMenuState = () => {\n this.setState({\n showMenuOptionsEdit: false,\n showMenuOptionsShare: true,\n showMenuOptionsView: true,\n });\n };\n\n toggleShowMenuOptionsEdit = () => {\n this.setState({ showMenuOptionsEdit: !this.state.showMenuOptionsEdit });\n };\n\n toggleShowMenuOptionsShare = () => {\n this.setState({ showMenuOptionsShare: !this.state.showMenuOptionsShare });\n };\n\n toggleShowMenuOptionsView = () => {\n this.setState({ showMenuOptionsView: !this.state.showMenuOptionsView });\n };\n\n toggleBorderlessMode = () => {\n this.setState(\n {\n borderlessMode: !this.state.borderlessMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFixedHeightMode = () => {\n this.setState(\n {\n fixedHeightMode: !this.state.fixedHeightMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleFullWidthMode = () => {\n this.setState(\n {\n fullWidthMode: !this.state.fullWidthMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n toggleOverflowMode = () => {\n this.setState(\n {\n overflowMode: !this.state.overflowMode,\n },\n () => {\n this.activateFixedHeader();\n this.saveMenuOptions();\n }\n );\n };\n\n saveMenuOptions = () => {\n let currentMenuOptions: menuOptions;\n currentMenuOptions = {\n borderlessMode: this.state.borderlessMode,\n fixedHeightMode: this.state.fixedHeightMode,\n fullWidthMode: this.state.fullWidthMode,\n overflowMode: this.state.overflowMode,\n /**These are turned off to prevent excess re-rendering of the note when opening/closing the menu */\n //showMenuOptionsEdit: this.state.showMenuOptionsEdit,\n //showMenuOptionsShare: this.state.showMenuOptionsShare,\n //showMenuOptionsView: this.state.showMenuOptionsView,\n };\n this.saveEditorOption('menuOptions', JSON.stringify(currentMenuOptions));\n };\n\n saveEditorOption = (\n optionKey: string,\n optionValue: string | boolean | undefined\n ) => {\n this.setState(\n {\n savingEditorOptions: true,\n },\n () => {\n try {\n this.editorKit.internal.componentManager.setComponentDataValueForKey(\n optionKey,\n optionValue\n );\n /** this.configureEditorKit() is triggered\n * every time setComponentDataValueForKey is triggered, but\n * savingEditorOptions prevents the callback from triggering.\n * Then, after the timeout, the new default settings or options can\n * take into effect immediately.\n * However, if you switch the note within the timeout, you will get an error.\n * I have tried 150 and 200 but they both are not long enough. 250 is short enough\n * to work, but not long enough to be easily noticeable.\n * We do not load editor options because they are optional and persist through\n * this.configureEditorKit().\n * */\n setTimeout(() => {\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }, 250);\n } catch (error) {\n console.log(\n 'Error saving editor option. Your optionKey:',\n optionKey,\n '\\n - Your optionValue: ',\n optionValue,\n '\\n - The error: ',\n error\n );\n this.setState(\n {\n savingEditorOptions: false,\n },\n () => {\n /** We use refreshEditor() if there's an error (such as in the demo)\n * But not in the actual editor because loadDefaultSettings and loadMetaData\n * will run refreshEditor() twice, and if there's no issue saving editor options,\n * then there's probably no issue loading default settings and metadata.\n * */\n this.refreshEditor();\n this.loadDefaultSettings();\n this.loadMetaData();\n }\n );\n }\n }\n );\n };\n\n onSettingsMode = () => {\n // Here we save the current state. We reload the current state if we cancel and after we save\n if (!this.state.settingsMode) {\n this.removeFixedHeader();\n this.setState(\n {\n currentState: this.state,\n },\n () => {\n /** Turn everything off and turn Settings on */\n this.setState(\n {\n appendMode: false,\n editMode: false,\n fullWidthMode: false,\n fixedHeightMode: false,\n settingsMode: true,\n showAppendix: false, // Hides the scroll up/down buttons\n showHeader: false,\n showMenu: false,\n viewMode: false,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n }\n );\n } else if (this.state.settingsMode) {\n this.setState(\n {\n ...this.state.currentState,\n settingsMode: false,\n },\n () => {\n this.refreshEdit();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n }\n };\n\n /** Restore current state but change the items that are saved from the Settings.\n * It's important to restore the current state to restore items that were turned off, such as\n * fixedHeight and fullWidth.\n */\n onSaveSettings = ({\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n saveAsDefault,\n }: SaveSettingsInterface) => {\n this.setState(\n {\n ...this.state.currentState,\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n showAppendix: true,\n showHeader: true,\n settingsMode: false,\n },\n () => {\n this.refreshEditor();\n const settingsButton = document.getElementById(\n HtmlElementId.settingsButton\n );\n if (settingsButton) {\n settingsButton.focus();\n }\n }\n );\n let note = this.editorKit.internal.note;\n if (note) {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentManager.saveItemWithPresave() triggered'\n );\n }\n this.editorKit.internal.componentManager.saveItemWithPresave(note, () => {\n note.content.appendEditorCustomStyles = customStyles;\n note.content.appendEditorEditingMode = editingMode;\n note.content.appendEditorFontEdit = fontEdit;\n note.content.appendEditorFontSize = fontSize;\n note.content.appendEditorFontView = fontView;\n note.content.appendEditorMonacoEditorLanguage = monacoEditorLanguage;\n });\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.editorKit.internal.componentManager.saveItemWithPresave() completed'\n );\n }\n }\n if (saveAsDefault) {\n this.setState(\n {\n defaultSettings: {\n customStyles,\n editingMode,\n fontEdit,\n fontSize,\n fontView,\n monacoEditorLanguage,\n },\n },\n () => {\n if (debugMode) {\n console.log(\n 'AppendEditor.tsx: \\n - onSaveSettings() this.state.savingEditorOptions: ' +\n this.state.savingEditorOptions +\n '\\n JSON.stringify(this.state.defaultSettings):',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n this.saveEditorOption(\n 'defaultSettings',\n JSON.stringify(this.state.defaultSettings)\n );\n }\n );\n }\n };\n\n activateStyles = () => {\n if (debugMode) {\n console.log('AppendEditor.tsx: \\n - this.activateStyles() triggered');\n }\n const sheetToBeRemoved = document.getElementById('customStyleSheet');\n if (sheetToBeRemoved) {\n const sheetParent = sheetToBeRemoved.parentNode;\n if (sheetParent) {\n sheetParent.removeChild(sheetToBeRemoved);\n }\n }\n // Follow the order that appears in the Settings to make the Settings cascade\n let fontSizeStyle = '';\n if (this.state.fontSize) {\n fontSizeStyle =\n '.CodeMirror, .DynamicEditor, .MonacoEditorContainer, .ProseMirror, #editTextArea, #appendTextArea, #renderedNote {font-size: ' +\n this.state.fontSize +\n ';}\\n';\n }\n let fontEditStyle = '';\n if (this.state.fontEdit) {\n fontEditStyle =\n '.CodeMirror, .DynamicEditor, .ProseMirror, #editTextArea, #appendTextArea {font-family: ' +\n this.state.fontEdit +\n ';}\\n';\n }\n let fontViewStyle = '';\n if (this.state.fontView) {\n fontViewStyle =\n '#renderedNote {font-family: ' + this.state.fontView + ';}\\n';\n }\n if (\n this.state.customStyles ||\n this.state.fontEdit ||\n this.state.fontSize ||\n this.state.fontView\n ) {\n const sheet = document.createElement('style');\n sheet.setAttribute('id', 'customStyleSheet');\n // Follow the order that appears in the Settings to make the Settings cascade\n sheet.innerHTML =\n fontSizeStyle + fontEditStyle + fontViewStyle + this.state.customStyles;\n document.body.appendChild(sheet);\n }\n };\n\n onCancelPrint = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n },\n () => {\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n }\n );\n };\n\n onConfirmPrintUrl = () => {\n this.setState(\n {\n confirmPrintUrl: true,\n },\n () => {\n const undoDialog = document.getElementById('undoDialog');\n if (undoDialog) {\n undoDialog.focus();\n }\n }\n );\n };\n\n onPrintUrlTrue = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: true,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n onPrintUrlFalse = () => {\n this.setState(\n {\n confirmPrintUrl: false,\n printURL: false,\n },\n () => {\n this.printRenderedHtml();\n }\n );\n };\n\n printRenderedHtml = () => {\n window.print();\n const printButton = document.getElementById(HtmlElementId.printButton);\n if (printButton) {\n printButton.focus();\n }\n };\n\n goDown = () => {\n document.body.scrollTop = 10000000; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 10000000;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 10000000;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 10000000;\n }\n /** Scroll down for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 10000000;\n }\n }\n };\n\n scrollToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'smooth',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToBottom = () => {\n this.goDown();\n const appendix = document.getElementById(HtmlElementId.appendix);\n if (appendix) {\n appendix.scrollIntoView({\n behavior: 'auto',\n block: 'end', // Bottom\n inline: 'nearest',\n });\n }\n };\n\n goUp = () => {\n document.body.scrollTop = 0; // for Safari\n if (this.state.editMode) {\n const editTextArea = document.getElementById(HtmlElementId.editTextArea);\n if (editTextArea) {\n editTextArea.scrollTop = 0;\n }\n }\n if (this.state.appendMode) {\n const appendTextArea = document.getElementById(\n HtmlElementId.appendTextArea\n );\n if (appendTextArea) {\n appendTextArea.scrollTop = 0;\n }\n }\n if (this.state.fixedHeightMode) {\n const view = document.getElementById(HtmlElementId.view);\n if (view) {\n view.scrollTop = 0;\n }\n /** Need edit for Dynamic */\n const edit = document.getElementById(HtmlElementId.edit);\n if (edit) {\n edit.scrollTop = 0;\n }\n /** Scroll up for CodeMirror */\n const codeMirrorList = document.getElementsByClassName(\n 'CodeMirror-vscrollbar'\n );\n const codeMirrorEditMode = codeMirrorList[0];\n if (codeMirrorEditMode) {\n codeMirrorEditMode.scrollTop = 0;\n }\n }\n };\n\n scrollToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'smooth',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n // Need both content and appendix for mobile\n // Skip to Bottom is fast \"auto\" behavior instead of \"smooth\" behavior\n skipToTop = () => {\n this.goUp();\n const top = document.getElementById('top');\n if (top) {\n top.scrollIntoView({\n behavior: 'auto',\n block: 'start', // Top\n inline: 'nearest',\n });\n }\n };\n\n onKeyDown = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.set(e.key, true);\n // Click the top Append if 'Control' and 'e' are pressed\n if (keyMap.get('Control') && keyMap.get('e')) {\n e.preventDefault();\n this.onEditMode();\n }\n // Click the top Append if 'Control' and 'u' are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n (keyMap.get('u') || keyMap.get('m'))\n ) {\n e.preventDefault();\n this.onAppendMode();\n }\n // Click view if 'Control' and 'p' are pressed\n else if (keyMap.get('Control') && !keyMap.get('Alt') && keyMap.get('p')) {\n e.preventDefault();\n this.onViewMode();\n } else if (keyMap.get('Control') && keyMap.get('.')) {\n e.preventDefault();\n this.setState({\n appendRows: this.state.appendRows + 1,\n });\n } else if (keyMap.get('Control') && keyMap.get(',')) {\n e.preventDefault();\n if (this.state.appendRows > 5) {\n this.setState({\n appendRows: this.state.appendRows - 1,\n });\n }\n } else if (keyMap.get('Control') && keyMap.get('<')) {\n // Edit only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onEditMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('>')) {\n // Append only mode\n e.preventDefault();\n this.setState(\n {\n appendMode: false,\n editMode: false,\n viewMode: false,\n },\n () => {\n this.onAppendMode();\n }\n );\n } else if (keyMap.get('Control') && keyMap.get('[')) {\n e.preventDefault();\n this.skipToTop();\n } else if (keyMap.get('Control') && keyMap.get(']')) {\n e.preventDefault();\n this.skipToBottom();\n } else if (\n keyMap.get('Control') &&\n !keyMap.get('Alt') &&\n !keyMap.get('Shift') &&\n keyMap.get('w')\n ) {\n keyMap.delete('w');\n }\n };\n\n onKeyDownAppendTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close Append Mode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.delete('Escape');\n this.onAppendMode();\n }\n // Save note if Control and Enter are pressed\n else if (keyMap.get('Control') && keyMap.get('Enter')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Save note if Control and S are pressed\n else if (keyMap.get('Control') && keyMap.get('s')) {\n e.preventDefault();\n if (this.state.editingMode === EditingModes.useCodeMirror) {\n this.appendTextToNote();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + N are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('n')\n ) {\n e.preventDefault();\n const newLine = document.getElementById(HtmlElementId.newLine);\n if (newLine) {\n newLine.click();\n }\n }\n // Toggle Append New Line if Ctrl + Alt + P are pressed\n else if (\n keyMap.get('Control') &&\n !keyMap.get('Shift') &&\n keyMap.get('Alt') &&\n keyMap.get('p')\n ) {\n e.preventDefault();\n const newParagraph = document.getElementById(HtmlElementId.newParagraph);\n if (newParagraph) {\n newParagraph.click();\n }\n }\n };\n\n onKeyDownEditTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Close EditMode if 'Escape' is pressed\n if (keyMap.get('Escape')) {\n e.preventDefault();\n keyMap.set('Escape', false);\n this.onEditMode();\n }\n };\n\n onKeyDownTextArea = (e: React.KeyboardEvent | KeyboardEvent) => {\n // Add two spaces and line break if Shift and Enter are pressed\n if (keyMap.get('Shift') && keyMap.get('Enter')) {\n e.preventDefault();\n document.execCommand('insertText', false, ' \\n');\n }\n // Add two stars if Control + b are pressed\n else if (keyMap.get('Control') && keyMap.get('b')) {\n e.preventDefault();\n document.execCommand('insertText', false, '**');\n }\n // Add header when pressing Control + H\n else if (keyMap.get('Control') && keyMap.get('h')) {\n e.preventDefault();\n document.execCommand('insertText', false, '#');\n }\n // Add image code if Control + Alt and i are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '![]()');\n }\n // Add one stars if Control + i is pressed\n else if (keyMap.get('Control') && keyMap.get('i')) {\n e.preventDefault();\n document.execCommand('insertText', false, '*');\n }\n // Add inline code if Control + Alt and k are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '`');\n }\n // Add link if Control + k are pressed\n else if (keyMap.get('Control') && keyMap.get('k')) {\n e.preventDefault();\n document.execCommand('insertText', false, '[]()');\n }\n // Add ordered list item if Control + Alt + l are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n1. ');\n }\n // Add unordered list item if Control + l are pressed\n else if (keyMap.get('Control') && keyMap.get('l')) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n- ');\n }\n // Add strike through if Control + Alt + u are pressed\n else if (keyMap.get('Control') && keyMap.get('Alt') && keyMap.get('u')) {\n e.preventDefault();\n document.execCommand('insertText', false, '~~');\n }\n // Add quote Control + q, Control + ' or Control + \" are pressed\n else if (\n (keyMap.get('Control') && keyMap.get('q')) ||\n (keyMap.get('Control') && keyMap.get(\"'\")) ||\n (keyMap.get('Control') && keyMap.get('\"'))\n ) {\n e.preventDefault();\n document.execCommand('insertText', false, '\\n> ');\n }\n };\n\n onKeyUp = (e: React.KeyboardEvent | KeyboardEvent) => {\n keyMap.delete(e.key);\n };\n\n onBlur = (e: React.FocusEvent) => {\n keyMap.clear();\n };\n\n onScroll = (e: Event) => {\n if (!this.state.settingsMode) {\n if (window.scrollY < last_known_scroll_position) {\n // If scrolling up, fix header\n this.activateFixedHeader();\n } else if (\n // If scrolling down, unfix header\n window.scrollY > last_known_scroll_position &&\n !this.state.showMenu\n ) {\n this.removeFixedHeader();\n }\n last_known_scroll_position = window.scrollY;\n }\n };\n\n activateFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n // Activate only if we have both\n if (header && content) {\n header.classList.add(HtmlClassName.fixed);\n content.classList.add(HtmlClassName.fixedHeader);\n }\n };\n\n removeFixedHeader = () => {\n const header = document.getElementById(HtmlElementId.header);\n const content = document.getElementById(HtmlElementId.content);\n /** Remove both even if you don't have both\n * This is needed for loading settings\n */\n if (header) {\n header.classList.remove(HtmlClassName.fixed);\n }\n if (content) {\n content.classList.remove(HtmlClassName.fixedHeader);\n }\n };\n\n render() {\n return [\n ,\n \n {this.state.showHeader && [\n
\n
\n \n \n \n \n \n \n this.onAppendMode()}\n title=\"Toggle Append Mode\"\n className={\n 'sk-button ' + (this.state.appendMode ? 'on' : 'off')\n }\n >\n \n \n
\n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
,\n ]}\n \n {this.state.showMenu && (\n \n \n \n )}\n {this.state.settingsMode && (\n \n \n \n )}\n {this.state.editMode && !this.state.refreshEdit && (\n \n \n \n )}\n {this.state.editMode && this.state.refreshEdit && (\n \n \n \n )}\n {this.state.viewMode && !this.state.refreshView && (\n \n \n \n )}\n {this.state.viewMode && this.state.refreshView && (\n \n \n \n )}\n {this.state.confirmPrintUrl && (\n \n {' '}\n \n )}\n\n {this.state.showDiff && [\n \n \n ,\n ]}\n \n {this.state.showAppendix && [\n \n {this.state.appendMode && (\n \n \n \n )}\n \n
\n \n \n
\n \n ,\n ]}\n ,\n ];\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.scss';\nimport * as serviceWorker from './serviceWorker';\nimport reportWebVitals from './reportWebVitals';\n\nimport AppendEditor from './components/AppendEditor';\nimport './stylesheets/main.scss';\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\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/AppendEditor.tsx b/src/components/AppendEditor.tsx index 6a5ce2e0..f1dc6af4 100644 --- a/src/components/AppendEditor.tsx +++ b/src/components/AppendEditor.tsx @@ -61,6 +61,7 @@ export enum HtmlElementId { export enum HtmlClassName { fixed = 'fixed', fixedHeader = 'fixed-header', + focused = 'focused', } export enum EditingModes { @@ -792,6 +793,18 @@ export default class AppendEditor extends React.Component<{}, AppendInterface> { editCodeMirror.save(); this.saveText(editCodeMirrorText); }); + editCodeMirror.on('blur', (cm: Editor, event: FocusEvent) => { + const content = document.getElementById(HtmlElementId.content); + if (content) { + content.classList.remove(HtmlClassName.focused); + } + }); + editCodeMirror.on('focus', (cm: Editor, event: FocusEvent) => { + const content = document.getElementById(HtmlElementId.content); + if (content) { + content.classList.add(HtmlClassName.focused); + } + }); editCodeMirror.on('keydown', (cm: Editor, event: KeyboardEvent) => { this.onKeyDown(event); this.onKeyDownEditTextArea(event); @@ -1772,7 +1785,20 @@ export default class AppendEditor extends React.Component<{}, AppendInterface> { window.scrollY > last_known_scroll_position && !this.state.showMenu ) { - this.removeFixedHeader(); + if ( + // If NOT using Edit Only mode with PlainText and CodeMirror + !( + (this.state.editingMode === undefined || + this.state.editingMode === EditingModes.usePlainText || + this.state.editingMode === EditingModes.useCodeMirror) && + this.state.editMode && + !this.state.appendMode && + !this.state.settingsMode && + !this.state.viewMode + ) + ) { + this.removeFixedHeader(); + } } last_known_scroll_position = window.scrollY; } @@ -1813,7 +1839,21 @@ export default class AppendEditor extends React.Component<{}, AppendInterface> { onBlur={this.onBlur} > {this.state.showHeader && [ -
+