ZDDC/zddc/internal/apps/embedded/mdedit.html

7172 lines
932 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ZDDC Markdown</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCI+CiAgPHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiByeD0iMTIiIGZpbGw9IiMxZTNhNWYiLz4KICA8ZyBmaWxsPSIjZmZmIj4KICAgIDxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjciLz4KICAgIDxwb2x5Z29uIHBvaW50cz0iNDMsMjUgNTAsMjUgMjEsNDMgMTQsNDMiLz4KICAgIDxyZWN0IHg9IjE0IiB5PSI0MyIgd2lkdGg9IjM2IiBoZWlnaHQ9IjciLz4KICA8L2c+Cjwvc3ZnPgo=">
<!-- Toast UI Editor v3.2.2 -->
<style>
/*!
* @toast-ui/editor
* @version 3.2.2 | Fri Feb 17 2023
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
* @license MIT
*/.ProseMirror{word-wrap:break-word;font-feature-settings:"liga" 0;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;position:relative;white-space:pre-wrap;white-space:break-spaces}.ProseMirror pre{white-space:pre-wrap}.ProseMirror li{position:relative}.ProseMirror-hideselection ::selection{background:transparent}.ProseMirror-hideselection ::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{border:2px solid #8cf;bottom:-2px;content:"";left:-32px;pointer-events:none;position:absolute;right:-2px;top:-2px}img.ProseMirror-separator{border:none!important;display:inline!important;margin:0!important}.auto-height,.auto-height .toastui-editor-defaultUI{height:auto}.auto-height .toastui-editor-md-container{position:relative}:not(.auto-height)>.toastui-editor-defaultUI,:not(.auto-height)>.toastui-editor-defaultUI>.toastui-editor-main{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:not(.auto-height)>.toastui-editor-defaultUI>.toastui-editor-main{-ms-flex:1;flex:1}.toastui-editor-defaultUI-toolbar:after,.toastui-editor-md-container:after{clear:both;content:"";display:block;height:0}.toastui-editor-main{box-sizing:border-box;height:inherit;min-height:0;position:relative}.toastui-editor-md-container{display:none;height:100%;overflow:hidden}.toastui-editor-md-container .toastui-editor{line-height:1.5;position:relative}.toastui-editor-md-container .toastui-editor,.toastui-editor-md-container .toastui-editor-md-preview{box-sizing:border-box;height:inherit;padding:0}.toastui-editor-md-container .toastui-editor-md-preview{height:100%;overflow:auto;padding:0 25px}.toastui-editor-md-container .toastui-editor-md-preview>p:first-child{margin-top:0!important}.toastui-editor-md-container .toastui-editor-md-preview .toastui-editor-contents{padding-top:8px}.toastui-editor-main .toastui-editor-md-tab-style>.toastui-editor,.toastui-editor-main .toastui-editor-md-tab-style>.toastui-editor-md-preview{display:none;width:100%}.toastui-editor-main .toastui-editor-md-tab-style>.active{display:block}.toastui-editor-main .toastui-editor-md-vertical-style>.toastui-editor-tabs{display:none}.toastui-editor-main .toastui-editor-md-tab-style>.toastui-editor-tabs{display:block}.toastui-editor-main .toastui-editor-md-vertical-style .toastui-editor,.toastui-editor-main .toastui-editor-md-vertical-style .toastui-editor-md-preview{width:50%}.toastui-editor-main .toastui-editor-md-splitter{background-color:#ebedf2;display:none;height:100%;left:50%;position:absolute;width:1px}.toastui-editor-main .toastui-editor-md-vertical-style .toastui-editor-md-splitter{display:block}.toastui-editor-ww-container{background-color:#fff;display:none;height:inherit;overflow:hidden}.auto-height .toastui-editor-main-container{position:relative}.toastui-editor-main-container{color:#222;height:inherit;line-height:1;position:absolute;width:100%}.toastui-editor-ww-container>.toastui-editor{height:inherit;position:relative;width:100%}.toastui-editor-ww-container .toastui-editor-contents{box-sizing:border-box;height:inherit;margin:0;overflow:auto;padding:16px 25px 0}.toastui-editor-ww-container .toastui-editor-contents p{margin:0}.toastui-editor-md-mode .toastui-editor-md-container,.toastui-editor-ww-mode .toastui-editor-ww-container{display:block;z-index:20}.toastui-editor-md-mode .toastui-editor-md-vertical-style{display:-ms-flexbox;display:flex}.toastui-editor-defaultUI.hidden,.toastui-editor-main.hidden{display:none}.toastui-editor-defaultUI .ProseMirror{padding:18px 25px}.toastui-editor-defaultUI{border:1px solid #dadde6;border-radius:4px;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,,Nanum Barun Gothic,,Malgun Gothic,sans-serif;height:100%;position:relative}.toastui-editor-defaultUI button{border:none;border-radius:2px;color:#333;cursor:pointer;font-size:13px;height:28px}.toastui-editor-defaultUI .toastui-editor-ok-button{background-color:#00a9ff;color:#fff;height:32px;min-width:63px;outline-color:#009bf2}.toastui-editor-defaultUI .toastui-editor-ok-button:hover{background-color:#009bf2}.toastui-editor-defaultUI .toastui-editor-close-button{background-color:#f7f9fc;border:1px solid #dadde6;height:32px;margin-right:5px;min-width:63px;outline-color:#cbcfdb}.toastui-editor-defaultUI .toastui-editor-close-button:hover{border-color:#cbcfdb}.toastui-editor-mode-switch{background-color:#fff;border-radius:0 0 3px 3px;border-top:1px solid #dadde6;font-size:12px;height:28px;padding-right:10px;text-align:right}.toastui-editor-mode-switch .tab-item{background:#f7f9fc;border:1px solid #dadde6;border-radius:0 0 4px 4px;box-sizing:border-box;color:#969aa5;cursor:pointer;display:inline-block;font-weight:500;height:24px;line-height:24px;margin-right:-1px;margin-top:-1px;text-align:center;width:96px}.toastui-editor-mode-switch .tab-item.active{background-color:#fff;border-top:1px solid #fff;color:#555}.toastui-editor-defaultUI .toastui-editor-md-tab-container{background:#f7f9fc;border-bottom:1px solid #ebedf2;border-top-left-radius:3px;float:left;font-size:13px;height:45px}.toastui-editor-md-tab-container .toastui-editor-tabs{height:100%;margin-left:15px}.toastui-editor-md-tab-container .tab-item{background:#eaedf1;border:1px solid #dadde6;border-radius:4px 4px 0 0;box-sizing:border-box;color:#969aa5;cursor:pointer;display:inline-block;font-size:12px;font-weight:500;height:33px;line-height:33px;margin-top:13px;text-align:center;width:70px}.toastui-editor-md-tab-container .tab-item.active{background-color:#fff;border-bottom:1px solid #fff;color:#555}.toastui-editor-md-tab-container .tab-item:last-child{margin-left:-1px}.toastui-editor-defaultUI-toolbar{background-color:#f7f9fc;border-bottom:1px solid #ebedf2;border-radius:3px 3px 0 0;display:-ms-flexbox;display:flex;height:45px;padding:0 25px}.toastui-editor-toolbar{box-sizing:border-box;height:46px}.toastui-editor-toolbar-divider{background-color:#e1e3e9;display:inline-block;height:18px;margin:14px 12px;width:1px}.toastui-editor-toolbar-group{display:-ms-flexbox;display:flex}.toastui-editor-defaultUI-toolbar button{border:1px solid #f7f9fc;border-radius:3px;box-sizing:border-box;cursor:pointer;height:32px;margin:7px 5px;padding:0;width:32px}.toastui-editor-defaultUI-toolbar button:not(:disabled):hover{background-color:#fff;border:1px solid #e4e7ee}.toastui-editor-defaultUI-toolbar .scroll-sync{color:#81858f;cursor:pointer;display:inline-block;height:10px;line-height:10px;position:relative;text-align:center;width:70px}.toastui-editor-defaultUI-toolbar .scroll-sync:before{content:"Scroll";font-size:14px;left:0;position:absolute}.toastui-editor-defaultUI-toolbar .scroll-sync.active:before{color:#00a9ff}.toastui-editor-defaultUI-toolbar .scroll-sync input{height:0;opacity:0;width:0}.toastui-editor-defaultUI-toolbar .switch{background-color:#d6d8de;border-radius:50px;bottom:0;left:45px;position:absolute;right:0;top:0;-webkit-transition:.4s;transition:.4s}.toastui-editor-defaultUI-toolbar input:checked+.switch{background-color:#acddfa}.toastui-editor-defaultUI-toolbar .switch:before{background-color:#94979f;border-radius:50%;bottom:-2px;content:"";height:14px;left:0;position:absolute;-webkit-transition:.4s;transition:.4s;width:14px}.toastui-editor-defaultUI-toolbar input:checked+.switch:before{background-color:#00a9ff;-webkit-transform:translateX(12px);-moz-transform:translateX(12px);-ms-transform:translateX(12px);transform:translateX(12px)}.toastui-editor-dropdown-toolbar .scroll-sync{margin:0 5px}.toastui-editor-dropdown-toolbar{background-color:#f7f9fc;border:1px solid #dadde6;border-radius:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);display:-ms-flexbox;display:flex;height:46px;position:absolute;z-index:30}.toastui-editor-toolbar-item-wrapper{height:32px;line-height:32px;margin:7px 5px}.toastui-editor-popup{background:#fff;border:1px solid #dadde6;border-radius:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);margin-right:auto;position:absolute;width:400px;z-index:30}.toastui-editor-popup-body{font-size:12px;padding:15px}.toastui-editor-popup-body label{color:#555;display:block;font-weight:600;margin:20px 0 5px}.toastui-editor-popup-body .toastui-editor-button-container{margin-top:20px;text-align:right}.toastui-editor-popup-body input[type=text]{border:1px solid #e1e3e9;border-radius:2px;color:#333;height:30px;padding:0 12px;width:calc(100% - 26px)}.toastui-editor-popup-body input[type=text]:focus{border-color:transparent;outline:1px solid #00a9ff}.toastui-editor-popup-body input[type=text].disabled{background-color:#f7f9fc;border-color:#e1e3e9;color:#969aa5}.toastui-editor-popup-body input[type=file]{border:none;height:1px;left:0;opacity:0;position:absolute;top:0;width:1px}.toastui-editor-popup-body input.wrong,.toastui-editor-popup-body span.wrong{border-color:#fa2828}.toastui-editor-popup-add-image .toastui-editor-popup-body,.toastui-editor-popup-add-link .toastui-editor-popup-body{padding:0 20px 20px}.toastui-editor-popup-add-image .toastui-editor-tabs{margin:5px 0 10px}.toastui-editor-popup-add-image .toastui-editor-tabs .tab-item{border-bottom:1px solid #dadde6;box-sizing:border-box;color:#333;cursor:pointer;display:inline-block;font-size:13px;font-weight:600;height:40px;line-height:40px;text-align:center;width:60px}.toastui-editor-popup-add-image .toastui-editor-tabs .tab-item:hover{border-bottom:1px solid #cbcfdb}.toastui-editor-popup-add-image .toastui-editor-tabs .tab-item.active{border-bottom:2px solid #00a9ff;color:#00a9ff}.toastui-editor-popup-add-image .toastui-editor-file-name{border:1px solid #e1e3e9;border-radius:2px;color:#dadde6;cursor:pointer;display:inline-block;height:30px;line-height:30px;overflow:hidden;padding:0 12px;text-overflow:ellipsis;white-space:nowrap;width:58%}.toastui-editor-popup-add-image .toastui-editor-file-name.has-file{color:#333}.toastui-editor-popup-add-image .toastui-editor-file-select-button{background-color:#f7f9fc;border:1px solid #dadde6;border-radius:2px;height:32px;margin-left:5px;vertical-align:top;width:33%}.toastui-editor-popup-add-image .toastui-editor-file-select-button:hover{border-color:#cbcfdb}.toastui-editor-popup-add-table{width:auto}.toastui-editor-popup-add-table .toastui-editor-table-selection{position:relative}.toastui-editor-popup-add-table .toastui-editor-table-cell{background:#fff;border:1px solid #e1e3e9;box-sizing:border-box;display:table-cell;height:20px;width:20px}.toastui-editor-popup-add-table .toastui-editor-table-cell.header{background:#f7f9fc}.toastui-editor-popup-add-table .toastui-editor-table-row{display:table-row}.toastui-editor-popup-add-table .toastui-editor-table{border-collapse:collapse;display:table}.toastui-editor-popup-add-table .toastui-editor-table-selection-layer{background:rgba(0,169,255,.1);border:1px solid #00a9ff;left:0;position:absolute;top:0;z-index:30}.toastui-editor-popup-add-table .toastui-editor-table-description{color:#333;margin:5px 0 0;text-align:center}.toastui-editor-popup-add-heading{width:auto}.toastui-editor-popup-add-heading .toastui-editor-popup-body{padding:0}.toastui-editor-popup-add-heading h1,.toastui-editor-popup-add-heading h2,.toastui-editor-popup-add-heading h3,.toastui-editor-popup-add-heading h4,.toastui-editor-popup-add-heading h5,.toastui-editor-popup-add-heading h6,.toastui-editor-popup-add-heading p,.toastui-editor-popup-add-heading ul{margin:0;padding:0}.toastui-editor-popup-add-heading ul{list-style:none;padding:5px 0}.toastui-editor-popup-add-heading ul li{cursor:pointer;padding:4px 12px}.toastui-editor-popup-add-heading ul li:hover{background-color:#dff4ff}.toastui-editor-popup-add-heading h1{font-size:24px}.toastui-editor-popup-add-heading h2{font-size:22px}.toastui-editor-popup-add-heading h3{font-size:20px}.toastui-editor-popup-add-heading h4{font-size:18px}.toastui-editor-popup-add-heading h5{font-size:16px}.toastui-editor-popup-add-heading h6{font-size:14px}.toastui-editor-context-menu{background-color:#fff;border:1px solid #dadde6;border-radius:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);color:#333;min-width:197px;padding:5px 0;position:absolute;width:auto;z-index:30}.toastui-editor-context-menu .menu-group{border-bottom:1px solid #ebedf2;font-size:13px;list-style:none;margin:0;padding:0}.toastui-editor-context-menu .menu-group:last-child{border-bottom:none!important}.toastui-editor-context-menu .menu-item{cursor:pointer;height:32px;line-height:32px;padding:0 14px}.toastui-editor-context-menu span{display:inline-block}.toastui-editor-context-menu span:before{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdIAAACSCAYAAADxT0vuAAAAAXNSR0IArs4c6QAAQABJREFUeAHtnQm8VVXZ/9e5A5PIIOWsqPlqzgNqqRnYxyzMoURARE3MCadUNDUHrpnzkIWSSYZhSIBaSlqWr17pTS1BzaEysczgjwOCMsMd9v/72+fswz7n7umcu8+5B1zr89lnTc96nmc9a3jWfIyxxkrASsBKwErASsBKwErASsBKwErASsBKwEqgKySQ6QqilqaVQDUlMHz48K0ymcw4vpenT58+pZq0LS0rASuBDV8CDRt+Fm0Oa1UCI0eOPKa9vf20urq6n6LgHqkEnyNGjDjdcZwJfN35noFGxRQpCntblPW90PkidLqVmJ+1pJ1N2m/NnDnznRLTrtfg1IOh1IN7yMTWZWZkPnXoDOrQb6PSV4tOFA/Fcccff/xBbW1tIyh75f3Vbt263fOLX/xiYTGc9de2BEIVKZ3CKxTuDTNmzJgWlQU6qlE0/stp/HtGwYXFRVTutaR5FR5mgP828LeF4SgnHLrDabzKW31R+lf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iOsK38CLsAAAAASUVORK5CYII=) no-repeat;background-size:466px 146px;content:"";display:inline-block;height:20px;margin-right:10px;vertical-align:middle;width:20px}.toastui-editor-context-menu .add-row-up:before{background-position:3px -104px}.toastui-editor-context-menu .add-row-down:before{background-position:-19px -104px}.toastui-editor-context-menu .remove-row:before{background-position:-41px -104px}.toastui-editor-context-menu .add-column-left:before{background-position:-63px -104px}.toastui-editor-context-menu .add-column-right:before{background-position:-85px -104px}.toastui-editor-context-menu .remove-column:before{background-position:-111px -104px}.toastui-editor-context-menu .align-column-left:before{background-position:-129px -104px}.toastui-editor-context-menu .align-column-center:before{background-position:-151px -104px}.toastui-editor-context-menu .align-column-right:before{background-position:-173px -104px}.toastui-editor-context-menu .remove-table:before{background-position:-197px -104px}.toastui-editor-context-menu .disabled span:before{opacity:.3}.toastui-editor-context-menu li:not(.disabled):hover{background-color:#dff4ff}.toastui-editor-context-menu li.disabled{color:#c9ccd5}.toastui-editor-tooltip{background-color:#444;border-radius:3px;color:#fff;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,,Nanum Barun Gothic,,Malgun Gothic,sans-serif;font-size:12px;padding:4px 7px;position:absolute;z-index:40}.toastui-editor-tooltip .arrow{background-color:#444;content:"";display:inline-block;height:10px;left:6px;position:absolute;top:-3px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);width:10px;z-index:-1}.toastui-editor-toolbar-icons{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdIAAACSCAYAAADxT0vuAAAAAXNSR0IArs4c6QAAQABJREFUeAHtnQm8VVXZ/9e5A5PIIOWsqPlqzgNqqRnYxyzMoURARE3MCadUNDUHrpnzkIWSSYZhSIBaSlqWr17pTS1BzaEysczgjwOCMsMd9v/72+fswz7n7umcu8+5B1zr89lnTc96nmc9a3jWfIyxxkrASsBKwErASsBKwErASsBKwErASsBKwEqgKySQ6QqilqaVQDUlMHz48K0ymc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OyGAkiK5ln3S6lnj5zsJ/Xhhy4BcTV/Ey8tGvJi2R1axQeYwzxfIshh9PQJNm/dQvzfrnSCFiR876GdRNYpBngP0+31eBFy/noUTtFRcEYY2VgJVAjUiA0f5P6NyuFDuy5a8R1qrOxsqVK7fyiDIb/TSddzfPb+3OSwB51lO/pvI5fCuob+9pmTcJZu2ZJoGzMFYCVgJWAlYCVgIbrARQmruiPFv5vicFKkXKN2GDzbDNmJWAlYCVgJWAlUDaErCz/rQlavFZCdS+BP4/vGiOsK38CLsAAAAASUVORK5CYII=) no-repeat;background-size:466px 146px}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.toastui-editor-context-menu span:before,.toastui-editor-toolbar-icons{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA6QAAAEkCAYAAAA4kPwsAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQecHGX5x2fuLp2QAAnSpYNBxUIRMRCqFENNLnQUQgQxAZTehSDSFEKHqLQEchcQiFQpURT/NBUUlCagUkIPCSHl7ub/fWbn3Zvdm92dtnuze8+7n9n3nbc87/P85p133uetlqVGEVAEFAFFQBFQBBQBRUARUAQUAUVAEVAEFAFFQBFQBBQBRUARUAQUAUVAEVAEFAFFQBFQBBQBRUARUAQUAUVAEVAEFAFFQBFQBBQBRUARUAQUAUVAEVAEFAFFQBFQBBQBRaDRELAbTSCVRxFQBBSBvorA5MmTB8ybN2888ne2tbXd2ldxULkVAUVAEVAEFAFFoH4QUIW0fp6VcqoIKAKKQCAC48eP70/A4Vyncq0hkZqamvafNWvWbeJWowgoAoqAIqAIKAKKQFYRaMkqY8qXIqAIKALVROCggw5adcmSJWMljwEDBsy55ZZb3q5mftWijTJ6ALTP51rLn4fjOBv77+vRvd9++43u6uo6AVk2g/9VayTD27ZtP41Cf9Ftt932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ch0V1jmqsEoQ6lznR8n6R4qyb27DDtYuXUT5ynuE9KJhiVZxgmy2WcWPCBIoo2HQR3DfDvdgOhP2J6mXruZZiBqpzZ4vZJ2H3HtYftZeYxUaJWue1Cil1JTRoTSHaJosIdeajbx5pxWMvFgHZM3lzaXTbvkhX9GatY0nvGnnp59/pWRnjmOQpWlpxuLLovOl3fJjCujrvPc/R71wP7/1+VlD+gzcjkMBtym9luf30f55P9eiNgHuLauMhmXCOk+Dg+9Ll53a6/w1i8l751lkOa4WecK23gG1hFWY0gRCRbPhymZpiVZeqXqEk4f/bFN47IVEz1QmSkweca7MYmVbhZ6YUhEsoaL7BxXfPFjcaBsYcW49dqN+GE/kStWIRuaWGiEthks+12BKy/aYtn7ONi6yTpZXsFsj/Lfk743iMDoXAXrRP0A9dgflJJi2Szl5led4F57jlvpECs/6vuTjuhR3dAo961VP9UoRby5eaGBuxz2Zy/3pyiWBlJEiA/s5FHaEnU170tGmBChvV5O1/Zske9dQ3upqiLdbfuL3hTpvY+q8m3ELRkrj1xLs36Md8A17jhOutYwTnYufJw89tLmvbxmhJagIVEmgaoW0yvjlXQREQASakkA77LJL42wfGmdpGiktpZBagaFRfQqNsDNGSykNldFTUQ6+3ZQFWEJlRsA6pVmzZjML1sks0hoiosy9vMoqq2wVjg7VEMNQkHbLTzEI7tOqdCoeTd1nn7dK2tjwf2F5Gsro3cVhdS4CItCcBKSQNud9kVQiIAIikIqAjZLSQNu8lGeujZiyW8pvs7mHI6W2tb/tlF28jigvcRfSmLUpw+doZDQvxM0Xb40zpbLKiE03nWtLiOpVRp1A7ZYfl6+4yTPqo5hO4nndFPt4fi+OHTv2Qb5x/Y+4P9lFQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQAREQA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o+HSIgAiLQeQTaYZfdI+YV9qGhUrGR0moKqZVGlG2bxnzGaCmloTJ6Ksrotzvv6eisHFunNGvWHiHX64xyzl8eO8bbKhwdqlmUdstPMYjgqwH/9I6mQ/F4OhKYzTvi+F82kzjtksn+3SOuyEEERKApCUghbcrbIqFEQAREIB0BGyXF5+ZlfCdN2S3jvXku2UgpCveJNDxtp+xh64hylNKm/s1jaPYcjYzmSLnJoq5lplSGWVhIY2yuLSGqVxl1MrVbfly+4qZtXnT0Q96kPs/btKvgjUc5fbHH9x6cMdG39Ws6REAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAEREAERAACviiIgAiIgAgMJ7DPPvvshMuNoeueN9xww5zhPnQmAiIgAiIgAiIgAiKQBYGeLCJRHCIgAiLQTgR839++UCiMtzyZHUMKaTvd4AzzctBBB627bNmydxDlwNixY5++6qqrFmUYvaISAREQAREQgbYnkJlCOtojCl/4whd2HRwcvIw7tlHOd+25rq6uw6677rrbck6nraKv4v5kwrfR6eV9s9otP3nzUvyNJVBF+axXsEzqh3qFsPC883bHOAVl9EOYwWyjFStW9OM+h06MM66//vpfmz8dIiACIiACIiAC5Ql0lb+c/mo4imAjCuNDe/rAGfhskDJqkm4UppWB1J0TRRX3JxO+jU4v7zvZbvnJm5fibyyBKspnvYJlUj/UIwQKZ/e+++47gzh+we/D/OJLX6yTdxdG1+/DTy92HSIgAiIgAiIgAhUIZKaQVkinEZfzHhmN56GRacXTbWV7Ncyq8Vu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y5atGi9euNTeBEQAREQAREQgXQEgo+Dp/MqX81IgAbUm2iUXYBs8+nJvyguIw2sYzifRO/+cYwEBN8AiV+XXQREQASalYApo9Rh5dZCm+jX2rTe+Ohms+ZHcomACIiACIiACIiACIiACIiACLQIAUZDvx4fEaXz7SwbEcXtmrg7SuueLZIliSkCIiACIiACIpBAoOQa0gS/chIBERABERCBhhBg1LMRa6EbkhclIgIiIAIiIAIiIAIiIAIiIAIi0GIEtBa6xW6YxBUBERABERABERABERABERABERABERABERABERCBViHw/wHIAHUN1iL6RwAAAABJRU5ErkJggg==) no-repeat;background-size:466px 146px}}.toastui-editor-toolbar-icons{background-position-y:3px}.toastui-editor-toolbar-icons:disabled{opacity:.3}.toastui-editor-toolbar-icons.heading{background-position-x:3px}.toastui-editor-toolbar-icons.bold{background-position-x:-23px}.toastui-editor-toolbar-icons.italic{background-position-x:-49px}.toastui-editor-toolbar-icons.strike{background-position-x:-75px}.toastui-editor-toolbar-icons.hrline{background-position-x:-101px}.toastui-editor-toolbar-icons.quote{background-position-x:-127px}.toastui-editor-toolbar-icons.bullet-list{background-position-x:-153px}.toastui-editor-toolbar-icons.ordered-list{background-position-x:-179px}.toastui-editor-toolbar-icons.task-list{background-position-x:-205px}.toastui-editor-toolbar-icons.indent{background-position-x:-231px}.toastui-editor-toolbar-icons.outdent{background-position-x:-257px}.toastui-editor-toolbar-icons.table{background-position-x:-283px}.toastui-editor-toolbar-icons.image{background-position-x:-309px}.toastui-editor-toolbar-icons.link{background-position-x:-334px}.toastui-editor-toolbar-icons.code{background-position-x:-361px}.toastui-editor-toolbar-icons.codeblock{background-position-x:-388px}.toastui-editor-toolbar-icons.more{background-position-x:-412px}.toastui-editor-toolbar-icons:not(:disabled).active{background-position-y:-23px}@media only screen and (max-width:480px){.toastui-editor-popup{margin-left:-150px;max-width:300px}.toastui-editor-dropdown-toolbar{max-width:none}}.ProseMirror{overflow-X:hidden;color:#222;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,,Nanum Barun Gothic,,Malgun Gothic,sans-serif;font-size:13px;height:calc(100% - 36px);overflow-y:auto}.ProseMirror .placeholder{color:#999}.ProseMirror-selectednode,.ProseMirror:focus{outline:none}.html-block.ProseMirror-selectednode,table.ProseMirror-selectednode{border-radius:2px;outline:2px solid #00a9ff}.toastui-editor-contents{font-family:Open Sans,Helvetica Neue,Helvetica,Arial,,Nanum Barun Gothic,,Malgun Gothic,sans-serif;font-size:13px;margin:0;padding:0;z-index:20}.toastui-editor-contents :not(table){box-sizing:content-box;line-height:160%}.toastui-editor-contents address,.toastui-editor-contents cite,.toastui-editor-contents dfn,.toastui-editor-contents em,.toastui-editor-contents i,.toastui-editor-contents var{font-style:italic}.toastui-editor-contents strong{font-weight:700}.toastui-editor-contents p{color:#222;margin:10px 0}.toastui-editor-contents>div>div:first-of-type h1,.toastui-editor-contents>h1:first-of-type{margin-top:14px}.toastui-editor-contents h1,.toastui-editor-contents h2,.toastui-editor-contents h3,.toastui-editor-contents h4,.toastui-editor-contents h5,.toastui-editor-contents h6{color:#222;font-weight:700}.toastui-editor-contents h1{border-bottom:3px double #999;font-size:24px;line-height:28px;margin:52px 0 15px;padding-bottom:7px}.toastui-editor-contents h2{border-bottom:1px solid #dbdbdb;font-size:22px;line-height:23px;margin:20px 0 13px;padding-bottom:7px}.toastui-editor-contents h3{font-size:20px;margin:18px 0 2px}.toastui-editor-contents h4{font-size:18px;margin:10px 0 2px}.toastui-editor-contents h3,.toastui-editor-contents h4{line-height:18px}.toastui-editor-contents h5{font-size:16px}.toastui-editor-contents h6{font-size:14px}.toastui-editor-contents h5,.toastui-editor-contents h6{line-height:17px;margin:9px 0 -4px}.toastui-editor-contents del{color:#999}.toastui-editor-contents blockquote{border-left:4px solid #e5e5e5;color:#999;margin:14px 0;padding:0 16px}.toastui-editor-contents blockquote ol,.toastui-editor-contents blockquote p,.toastui-editor-contents blockquote ul{color:#999}.toastui-editor-contents blockquote>:first-child{margin-top:0}.toastui-editor-contents blockquote>:last-child{margin-bottom:0}.toastui-editor-contents code,.toastui-editor-contents pre{border:0;border-radius:0;font-family:Consolas,Courier,Apple SD Neo,-apple-system,Lucida Grande,Apple SD Gothic Neo, ,Malgun Gothic,Segoe UI,,dotum,sans-serif}.toastui-editor-contents pre{background-color:#f4f7f8;margin:2px 0 8px;padding:18px}.toastui-editor-contents code{background-color:#f9f2f4;border-radius:2px;color:#c1798b;letter-spacing:-.3px;padding:2px 3px}.toastui-editor-contents pre code{background-color:transparent;color:inherit;padding:0;white-space:pre-wrap}.toastui-editor-contents img{box-sizing:border-box;margin:4px 0 10px;max-width:100%;vertical-align:top}.toastui-editor-contents table{border:1px solid rgba(0,0,0,.1);border-collapse:collapse;box-sizing:border-box;color:#222;margin:12px 0 14px;width:auto}.toastui-editor-contents table td,.toastui-editor-contents table th{border:1px solid rgba(0,0,0,.1);height:32px;padding:5px 14px 5px 12px}.toastui-editor-contents table th{background-color:#555;color:#fff;font-weight:300;padding-top:6px}.toastui-editor-contents th p{color:#fff;margin:0}.toastui-editor-contents td p{margin:0;padding:0 2px}.toastui-editor-contents td.toastui-editor-cell-selected{background-color:#d8dfec}.toastui-editor-contents th.toastui-editor-cell-selected{background-color:#908f8f}.toastui-editor-contents dir,.toastui-editor-contents menu,.toastui-editor-contents ol,.toastui-editor-contents ul{color:#222;display:block;list-style-type:none;margin:6px 0 10px;padding-left:24px}.toastui-editor-contents ol{counter-reset:li;list-style-type:none}.toastui-editor-contents ol>li{counter-increment:li}.toastui-editor-contents ol>li:before,.toastui-editor-contents ul>li:before{display:inline-block;position:absolute}.toastui-editor-contents ul>li:before{background-color:#ccc;border-radius:50%;content:"";height:5px;margin-left:-17px;margin-top:6px;width:5px}.toastui-editor-contents ol>li:before{color:#aaa;content:"." counter(li);direction:rtl;margin-left:-28px;text-align:right;width:24px}.toastui-editor-contents ol ol,.toastui-editor-contents ol ul,.toastui-editor-contents ul ol,.toastui-editor-contents ul ul{margin-bottom:0!important;margin-top:0!important}.toastui-editor-contents ol li,.toastui-editor-contents ul li{position:relative}.toastui-editor-contents ol p,.toastui-editor-contents ul p{margin:0}.toastui-editor-contents hr{border-top:1px solid #eee;margin:16px 0}.toastui-editor-contents a{color:#4b96e6;text-decoration:underline}.toastui-editor-contents a:hover{color:#1f70de}.toastui-editor-contents .image-link{position:relative}.toastui-editor-contents .image-link:hover:before{background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGcgc3Ryb2tlPSIjNTU1IiBzdHJva2Utd2lkdGg9IjEuNSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiPjxwYXRoIGQ9Im01LjY4NyAxMC4yOTQtMS4yODUgMS4yODhjLTEuMDUgMS4wNS0xLjAzNSAyLjc3Mi4wMzcgMy44NDRsLjEzNS4xMzVjMS4wNzIgMS4wNzIgMi43OTQgMS4wODggMy44NDQuMDM3bDIuNzItMi43MmMxLjA1MS0xLjA1IDEuMDM0LTIuNzcyLS4wMzctMy44NDNsLS4xMzYtLjEzNiIvPjxwYXRoIGQ9Im0xNC4zMDUgOS43MTMgMS4yODctMS4yOWMxLjA1Mi0xLjA1MSAxLjAzNi0yLjc3My0uMDM2LTMuODQ0bC0uMTM1LS4xMzZjLTEuMDcyLTEuMDcyLTIuNzk0LTEuMDg4LTMuODQ1LS4wMzZMOC44NTcgNy4xMjZjLTEuMDUxIDEuMDUxLTEuMDM0IDIuNzcyLjAzNyAzLjg0M2wuMTM2LjEzNiIvPjwvZz48L3N2Zz4=) no-repeat;background-position:50%;border:1px solid #c9ccd5;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);content:"";cursor:pointer;height:30px;position:absolute;right:0;width:30px}.toastui-editor-contents .task-list-item{border:0;list-style:none;margin-left:-24px;padding-left:24px}.toastui-editor-contents .task-list-item:before{background-position:50%;background-repeat:no-repeat;background-size:18px 18px;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHJlY3Qgd2lkdGg9IjE3IiBoZWlnaHQ9IjE3IiB4PSIuNSIgeT0iLjUiIHJ4PSIyIiBmaWxsPSIjRkZGIiBzdHJva2U9IiNDQ0MiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==);border-radius:2px;content:"";cursor:pointer;height:18px;left:0;margin-left:0;margin-top:0;position:absolute;top:1px;width:18px}.toastui-editor-contents .task-list-item.checked:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PHBhdGggZD0iTTE2IDBhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEtMiAySDJhMiAyIDAgMCAxLTItMlYyYTIgMiAwIDAgMSAyLTJoMTR6bS0xLjc5MyA1LjI5M2ExIDEgMCAwIDAtMS40MTQgMEw3LjUgMTAuNTg1IDUuMjA3IDguMjkzbC0uMDk0LS4wODNhMSAxIDAgMCAwLTEuMzIgMS40OTdsMyAzIC4wOTQuMDgzYTEgMSAwIDAgMCAxLjMyLS4wODNsNi02IC4wODMtLjA5NGExIDEgMCAwIDAtLjA4My0xLjMyeiIgZmlsbD0iIzRCOTZFNiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.toastui-editor-custom-block .toastui-editor-custom-block-editor{background:#f9f7fd;border:1px solid #dbd4ea;color:#452d6b}.toastui-editor-custom-block .toastui-editor-custom-block-view{padding:9px 13px 8px 12px;position:relative}.toastui-editor-custom-block.ProseMirror-selectednode .toastui-editor-custom-block-view{border:1px solid #dbd4ea;border-radius:2px}.toastui-editor-custom-block .toastui-editor-custom-block-view .tool{display:none;position:absolute;right:10px;top:7px}.toastui-editor-custom-block.ProseMirror-selectednode .toastui-editor-custom-block-view .tool{display:block}.toastui-editor-custom-block-view button{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0xNS41IDEyLjUgMiAyTDEyIDIwaC0ydi0ybDUuNS01LjV6TTE4IDEwbDIgMi0xLjUgMS41LTItMkwxOCAxMHoiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiM1NTUiLz48L3N2Zz4=) no-repeat;background-position:50%;background-size:30px 30px;border:1px solid #ccc;height:15px;margin-left:8px;padding:3px;vertical-align:middle;width:15px}.toastui-editor-custom-block-view .info{color:#5200d0;font-size:13px;font-weight:700;vertical-align:middle}.toastui-editor-contents .toastui-editor-ww-code-block{position:relative}.toastui-editor-contents .toastui-editor-ww-code-block:after{background:#e5e9ea url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGQ9Im0xNS41IDEyLjUgMiAyTDEyIDIwaC0ydi0ybDUuNS01LjV6TTE4IDEwbDIgMi0xLjUgMS41LTItMkwxOCAxMHoiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiM1NTUiLz48L3N2Zz4=) no-repeat;background-position:100%;background-size:30px 30px;border-radius:2px;color:#333;content:attr(data-language);cursor:pointer;display:inline-block;font-size:13px;font-weight:700;height:24px;padding:3px 35px 0 10px;position:absolute;right:10px;top:10px}.toastui-editor-ww-code-block-language{background-color:#fff;border:1px solid #ccc;border-radius:2px;display:inline-block;height:27px;position:fixed;right:35px;width:100px;z-index:30}.toastui-editor-ww-code-block-language input{background-color:transparent;border:none;box-sizing:border-box;height:100%;margin:0;outline:none;padding:0 10px;width:100%}.toastui-editor-contents-placeholder:before{color:grey;content:attr(data-placeholder);line-height:160%;position:absolute}.toastui-editor-md-preview .toastui-editor-contents h1{min-height:28px}.toastui-editor-md-preview .toastui-editor-contents h2{min-height:23px}.toastui-editor-md-preview .toastui-editor-contents blockquote{min-height:20px}.toastui-editor-md-preview .toastui-editor-contents li{min-height:22px}.toastui-editor-pseudo-clipboard{height:0;left:-1000px;opacity:0;position:fixed;top:-1000px;width:0;z-index:-1}.toastui-editor-contents .toastui-editor-md-preview-highlight{position:relative;z-index:0}.toastui-editor-contents .toastui-editor-md-preview-highlight:after{background-color:rgba(255,245,131,.5);border-radius:4px;bottom:-4px;content:"";left:-4px;position:absolute;right:-4px;top:-4px;z-index:-1}.toastui-editor-contents h1.toastui-editor-md-preview-highlight:after,.toastui-editor-contents h2.toastui-editor-md-preview-highlight:after{bottom:0}.toastui-editor-contents td.toastui-editor-md-preview-highlight:after,.toastui-editor-contents th.toastui-editor-md-preview-highlight:after{display:none}.toastui-editor-contents td.toastui-editor-md-preview-highlight,.toastui-editor-contents th.toastui-editor-md-preview-highlight{background-color:rgba(255,245,131,.5)}.toastui-editor-contents th.toastui-editor-md-preview-highlight{color:#222}.toastui-editor-md-heading1{font-size:24px}.toastui-editor-md-heading2{font-size:22px}.toastui-editor-md-heading3{font-size:20px}.toastui-editor-md-heading4{font-size:18px}.toastui-editor-md-heading5{font-size:16px}.toastui-editor-md-heading6{font-size:14px}.toastui-editor-md-heading.toastui-editor-md-delimiter.setext{line-height:15px}.toastui-editor-md-heading,.toastui-editor-md-list-item .toastui-editor-md-meta,.toastui-editor-md-list-item-style,.toastui-editor-md-strong{font-weight:700}.toastui-editor-md-emph{font-style:italic}.toastui-editor-md-strike{text-decoration:line-through}.toastui-editor-md-strike.toastui-editor-md-delimiter{text-decoration:none}.toastui-editor-md-block-quote,.toastui-editor-md-delimiter,.toastui-editor-md-link,.toastui-editor-md-table,.toastui-editor-md-thematic-break{color:#ccc}.toastui-editor-md-code.toastui-editor-md-delimiter{color:#aaa}.toastui-editor-md-html,.toastui-editor-md-link.toastui-editor-md-link-url.toastui-editor-md-marked-text,.toastui-editor-md-meta{color:#999}.toastui-editor-md-block-quote .toastui-editor-md-marked-text,.toastui-editor-md-list-item .toastui-editor-md-meta{color:#555}.toastui-editor-md-table .toastui-editor-md-table-cell{color:#222}.toastui-editor-md-link.toastui-editor-md-link-desc.toastui-editor-md-marked-text,.toastui-editor-md-list-item-style.toastui-editor-md-list-item-odd{color:#4b96e6}.toastui-editor-md-list-item-style.toastui-editor-md-list-item-even{color:#cb4848}.toastui-editor-md-code.toastui-editor-md-marked-text{color:#c1798b}.toastui-editor-md-code{background-color:rgba(243,229,233,.5);letter-spacing:-.3px;padding:2px 0}.toastui-editor-md-code.toastui-editor-md-start{border-bottom-left-radius:2px;border-top-left-radius:2px;padding-left:2px}.toastui-editor-md-code.toastui-editor-md-end{border-bottom-right-radius:2px;border-top-right-radius:2px;padding-right:2px}.toastui-editor-md-code-block-line-background{background-color:#f5f7f8}.toastui-editor-md-code-block-line-background.start,.toastui-editor-md-custom-block-line-background.start{margin-top:2px}.toastui-editor-md-code,.toastui-editor-md-code-block{font-family:Consolas,Courier,Lucida Grande,,Nanum Barun Gothic,,Malgun Gothic,sans-serif}.toastui-editor-md-custom-block{color:#452d6b}.toastui-editor-md-custom-block-line-background{background-color:#f9f7fd}.toastui-editor-md-custom-block .toastui-editor-md-delimiter{color:#b8b3c0}.toastui-editor-md-custom-block .toastui-editor-md-meta{color:#5200d0}
</style>
<script>
/*!
* @toast-ui/editor
* @version 3.2.2 | Fri Feb 17 2023
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.toastui=t():(e.toastui=e.toastui||{},e.toastui.Editor=t())}(self,(function(){return function(){var e={368:function(e){
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */
e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,o=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,s=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,d=c.construct;u||(u=function(e,t,n){return e.apply(t,n)}),s||(s=function(e){return e}),a||(a=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var p=x(Array.prototype.forEach),h=x(Array.prototype.pop),f=x(Array.prototype.push),m=x(String.prototype.toLowerCase),g=x(String.prototype.match),v=x(String.prototype.replace),y=x(String.prototype.indexOf),b=x(String.prototype.trim),w=x(RegExp.prototype.test),k=C(TypeError);function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function C(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function T(e,t){n&&n(e,null);for(var o=t.length;o--;){var i=t[o];if("string"==typeof i){var s=m(i);s!==i&&(r(t)||(t[o]=s),i=s)}e[i]=!0}return e}function M(e){var n=l(null),r=void 0;for(r in e)u(t,e,[r])&&(n[r]=e[r]);return n}function S(e,t){for(;null!==e;){var n=i(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=o(e)}function r(e){return console.warn("fallback value for",e),null}return r}var E=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=s(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),A=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),L=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=s(["#text"]),R=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),z=a(/<%[\s\S]*|[\s\S]*%>/gm),q=a(/^data-[\-\w.\u00B7-\uFFFF]/),V=a(/^aria-[\-\w]+$/),j=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=a(/^(?:\w+script|data):/i),_=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function W(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var J=function(){return"undefined"==typeof window?null:window},G=function(e,t){if("object"!==(void 0===e?"undefined":U(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),t=function(e){return K(e)};if(t.version="2.3.3",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,o=e.DocumentFragment,i=e.HTMLTemplateElement,a=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,d=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,x=e.Text,C=e.Comment,Z=e.DOMParser,X=e.trustedTypes,Q=l.prototype,Y=S(Q,"cloneNode"),ee=S(Q,"nextSibling"),te=S(Q,"childNodes"),ne=S(Q,"parentNode");if("function"==typeof i){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var oe=G(X,n),ie=oe&&Fe?oe.createHTML(""):"",se=r,ae=se.implementation,le=se.createNodeIterator,ce=se.createDocumentFragment,ue=se.getElementsByTagName,de=n.importNode,pe={};try{pe=M(r).documentMode?r.documentMode:{}}catch(e){}var he={};t.isSupported="function"==typeof ne&&ae&&void 0!==ae.createHTMLDocument&&9!==pe;var fe=H,me=z,ge=q,ve=V,ye=$,be=_,we=j,ke=null,xe=T({},[].concat(W(E),W(N),W(O),W(A),W(I))),Ce=null,Te=T({},[].concat(W(R),W(P),W(B),W(F))),Me=null,Se=null,Ee=!0,Ne=!0,Oe=!1,De=!1,Ae=!1,Le=!1,Ie=!1,Re=!1,Pe=!1,Be=!0,Fe=!1,He=!0,ze=!0,qe=!1,Ve={},je=null,$e=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),_e=null,Ue=T({},["audio","video","img","source","image","track"]),We=null,Je=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml",Xe=Ze,Qe=!1,Ye=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",nt=void 0,rt=null,ot=r.createElement("form"),it=function(e){rt&&rt===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=M(e),ke="ALLOWED_TAGS"in e?T({},e.ALLOWED_TAGS):xe,Ce="ALLOWED_ATTR"in e?T({},e.ALLOWED_ATTR):Te,We="ADD_URI_SAFE_ATTR"in e?T(M(Je),e.ADD_URI_SAFE_ATTR):Je,_e="ADD_DATA_URI_TAGS"in e?T(M(Ue),e.ADD_DATA_URI_TAGS):Ue,je="FORBID_CONTENTS"in e?T({},e.FORBID_CONTENTS):$e,Me="FORBID_TAGS"in e?T({},e.FORBID_TAGS):{},Se="FORBID_ATTR"in e?T({},e.FORBID_ATTR):{},Ve="USE_PROFILES"in e&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.SAFE_FOR_TEMPLATES||!1,Ae=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Be=!1!==e.RETURN_DOM_IMPORT,Fe=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||we,Xe=e.NAMESPACE||Ze,Ye=Ye=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,nt="application/xhtml+xml"===Ye?function(e){return e}:m,De&&(Ne=!1),Pe&&(Re=!0),Ve&&(ke=T({},[].concat(W(I))),Ce=[],!0===Ve.html&&(T(ke,E),T(Ce,R)),!0===Ve.svg&&(T(ke,N),T(Ce,P),T(Ce,F)),!0===Ve.svgFilters&&(T(ke,O),T(Ce,P),T(Ce,F)),!0===Ve.mathMl&&(T(ke,A),T(Ce,B),T(Ce,F))),e.ADD_TAGS&&(ke===xe&&(ke=M(ke)),T(ke,e.ADD_TAGS)),e.ADD_ATTR&&(Ce===Te&&(Ce=M(Ce)),T(Ce,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&T(We,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(je===$e&&(je=M(je)),T(je,e.FORBID_CONTENTS)),ze&&(ke["#text"]=!0),Ae&&T(ke,["html","head","body"]),ke.table&&(T(ke,["tbody"]),delete Me.tbody),s&&s(e),rt=e)},st=T({},["mi","mo","mn","ms","mtext"]),at=T({},["foreignobject","desc","title","annotation-xml"]),lt=T({},N);T(lt,O),T(lt,D);var ct=T({},A);T(ct,L);var ut=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});var n=m(e.tagName),r=m(t.tagName);if(e.namespaceURI===Ke)return t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ge?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(lt[n]);if(e.namespaceURI===Ge)return t.namespaceURI===Ze?"math"===n:t.namespaceURI===Ke?"math"===n&&at[r]:Boolean(ct[n]);if(e.namespaceURI===Ze){if(t.namespaceURI===Ke&&!at[r])return!1;if(t.namespaceURI===Ge&&!st[r])return!1;var o=T({},["title","style","font","a","script"]);return!ct[n]&&(o[n]||!lt[n])}return!1},dt=function(e){f(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},pt=function(e,n){try{f(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){f(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Ce[e])if(Re||Pe)try{dt(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ht=function(e){var t=void 0,n=void 0;if(Ie)e="<remove></remove>"+e;else{var o=g(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===Ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=oe?oe.createHTML(e):e;if(Xe===Ze)try{t=(new Z).parseFromString(i,Ye)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Qe?"":i}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),Xe===Ze?ue.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:s},ft=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},mt=function(e){return!(e instanceof x||e instanceof C||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof d&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},gt=function(e){return"object"===(void 0===a?"undefined":U(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,n,r){he[e]&&p(he[e],(function(e){e.call(t,n,r,rt)}))},yt=function(e){var n=void 0;if(vt("beforeSanitizeElements",e,null),mt(e))return dt(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return dt(e),!0;var r=nt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:ke}),!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return dt(e),!0;if("select"===r&&w(/<template/i,e.innerHTML))return dt(e),!0;if(!ke[r]||Me[r]){if(ze&&!je[r]){var o=ne(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&o)for(var s=i.length-1;s>=0;--s)o.insertBefore(Y(i[s],!0),ee(e))}return dt(e),!0}return e instanceof l&&!ut(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r||!w(/<\/no(script|embed)/i,e.innerHTML)?(De&&3===e.nodeType&&(n=e.textContent,n=v(n,fe," "),n=v(n,me," "),e.textContent!==n&&(f(t.removed,{element:e.cloneNode()}),e.textContent=n)),vt("afterSanitizeElements",e,null),!1):(dt(e),!0)},bt=function(e,t,n){if(He&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Ne&&!Se[t]&&w(ge,t));else if(Ee&&w(ve,t));else{if(!Ce[t]||Se[t])return!1;if(We[t]);else if(w(we,v(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!_e[e])if(Oe&&!w(ye,v(n,be,"")));else if(n)return!1}return!0},wt=function(e){var n=void 0,r=void 0,o=void 0,i=void 0;vt("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(i=s.length;i--;){var l=n=s[i],c=l.name,u=l.namespaceURI;if(r=b(n.value),o=nt(c),a.attrName=o,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,a),r=a.attrValue,!a.forceKeepAttr&&(pt(c,e),a.keepAttr))if(w(/\/>/i,r))pt(c,e);else{De&&(r=v(r,fe," "),r=v(r,me," "));var d=nt(e.nodeName);if(bt(d,o,r))try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),h(t.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},kt=function e(t){var n=void 0,r=ft(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof o&&e(n.content),wt(n));vt("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,i){var s=void 0,l=void 0,c=void 0,u=void 0,d=void 0;if((Qe=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!gt(r)){if("function"!=typeof r.toString)throw k("toString is not a function");if("string"!=typeof(r=r.toString()))throw k("dirty is not a string, aborting")}if(!t.isSupported){if("object"===U(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(gt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Le||it(i),t.removed=[],"string"==typeof r&&(qe=!1),qe);else if(r instanceof a)1===(l=(s=ht("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?s=l:s.appendChild(l);else{if(!Re&&!De&&!Ae&&-1===r.indexOf("<"))return oe&&Fe?oe.createHTML(r):r;if(!(s=ht(r)))return Re?null:ie}s&&Ie&&dt(s.firstChild);for(var p=ft(qe?r:s);c=p.nextNode();)3===c.nodeType&&c===u||yt(c)||(c.content instanceof o&&kt(c.content),wt(c),u=c);if(u=null,qe)return r;if(Re){if(Pe)for(d=ce.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return Be&&(d=de.call(n,d,!0)),d}var h=Ae?s.outerHTML:s.innerHTML;return De&&(h=v(h,fe," "),h=v(h,me," ")),oe&&Fe?oe.createHTML(h):h},t.setConfig=function(e){it(e),Le=!0},t.clearConfig=function(){rt=null,Le=!1},t.isValidAttribute=function(e,t,n){rt||it({});var r=nt(e),o=nt(t);return bt(r,o,n)},t.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],f(he[e],t))},t.removeHook=function(e){he[e]&&h(he[e])},t.removeHooks=function(e){he[e]&&(he[e]=[])},t.removeAllHooks=function(){he={}},t}return K()}()},928:function(e,t,n){"use strict";var r=n(322);e.exports=function(e,t,n){var o,i;if(n=n||0,!r(t))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,n);for(i=t.length,o=n;n>=0&&o<i;o+=1)if(t[o]===e)return o;return-1}},690:function(e,t,n){"use strict";var r=n(322),o=n(893),i=n(956);e.exports=function(e,t,n){r(e)?o(e,t,n):i(e,t,n)}},893:function(e){"use strict";e.exports=function(e,t,n){var r=0,o=e.length;for(n=n||null;r<o&&!1!==t.call(n,e[r],r,e);r+=1);}},956:function(e){"use strict";e.exports=function(e,t,n){var r;for(r in n=n||null,e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))break}},354:function(e,t,n){"use strict";var r=n(893);e.exports=function(e){var t;try{t=Array.prototype.slice.call(e)}catch(n){t=[],r(e,(function(e){t.push(e)}))}return t}},755:function(e){"use strict";var t="_feEventKey";e.exports=function(e,n){var r,o=e[t];return o||(o=e[t]={}),(r=o[n])||(r=o[n]=[]),r}},349:function(e,t,n){"use strict";var r=n(758),o=n(690),i=n(755);function s(e,t,n){var r,s=i(e,t);n?(o(s,(function(o,i){return n!==o.handler||(a(e,t,o.wrappedHandler),r=i,!1)})),s.splice(r,1)):(o(s,(function(n){a(e,t,n.wrappedHandler)})),s.splice(0,s.length))}function a(e,t,n){"removeEventListener"in e?e.removeEventListener(t,n):"detachEvent"in e&&e.detachEvent("on"+t,n)}e.exports=function(e,t,n){r(t)?o(t.split(/\s+/g),(function(t){s(e,t,n)})):o(t,(function(t,n){s(e,n,t)}))}},348:function(e,t,n){"use strict";var r=n(758),o=n(690),i=n(755);function s(e,t,n,r){function s(t){n.call(r||e,t||window.event)}"addEventListener"in e?e.addEventListener(t,s):"attachEvent"in e&&e.attachEvent("on"+t,s),function(e,t,n,r){var s=i(e,t),a=!1;o(s,(function(e){return e.handler!==n||(a=!0,!1)})),a||s.push({handler:n,wrappedHandler:r})}(e,t,n,s)}e.exports=function(e,t,n,i){r(t)?o(t.split(/\s+/g),(function(t){s(e,t,n,i)})):o(t,(function(t,r){s(e,r,t,n)}))}},24:function(e,t,n){"use strict";var r=n(322),o=n(929);e.exports=function(e,t){t=(t=r(t)?t.join(" "):t).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),o(e.className.baseVal)?e.className=t:e.className.baseVal=t}},204:function(e,t,n){"use strict";var r=n(690),o=n(928),i=n(902),s=n(24);e.exports=function(e){var t,n=Array.prototype.slice.call(arguments,1),a=e.classList,l=[];a?r(n,(function(t){e.classList.add(t)})):((t=i(e))&&(n=[].concat(t.split(/\s+/),n)),r(n,(function(e){o(e,l)<0&&l.push(e)})),s(e,l))}},522:function(e,t,n){"use strict";var r=n(758),o=n(690);e.exports=function(e,t,n){var i=e.style;r(t)?i[t]=n:o(t,(function(e,t){i[t]=e}))}},902:function(e,t,n){"use strict";var r=n(929);e.exports=function(e){return e&&e.className?r(e.className.baseVal)?e.className:e.className.baseVal:""}},714:function(e,t,n){"use strict";var r=n(928),o=n(902);e.exports=function(e,t){var n;return e.classList?e.classList.contains(t):(n=o(e).split(/\s+/),r(t,n)>-1)}},471:function(e,t,n){"use strict";var r=n(928),o=n(354),i=Element.prototype,s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(e){var t=this.document||this.ownerDocument;return r(this,o(t.querySelectorAll(e)))>-1};e.exports=function(e,t){return s.call(e,t)}},462:function(e,t,n){"use strict";var r=n(893),o=n(928),i=n(902),s=n(24);e.exports=function(e){var t,n,a=Array.prototype.slice.call(arguments,1),l=e.classList;l?r(a,(function(e){l.remove(e)})):(t=i(e).split(/\s+/),n=[],r(t,(function(e){o(e,a)<0&&n.push(e)})),s(e,n))}},969:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,s=Object.prototype.hasOwnProperty;for(o=1,i=arguments.length;o<i;o+=1)for(r in n=arguments[o])s.call(n,r)&&(e[r]=n[r]);return e}},254:function(e,t,n){"use strict";var r=n(956);e.exports=function(e,t){var n=document.createElement("img"),o="";return r(t,(function(e,t){o+="&"+t+"="+e})),o=o.substring(1),n.src=e+"?"+o,n.style.display="none",document.body.appendChild(n),document.body.removeChild(n),n}},391:function(e,t,n){"use strict";var r=n(929),o=n(254);e.exports=function(e,t){var n=location.hostname,i="TOAST UI "+e+" for "+n+": Statistics",s=window.localStorage.getItem(i);(r(window.tui)||!1!==window.tui.usageStatistics)&&(s&&!function(e){return(new Date).getTime()-e>6048e5}(s)||(window.localStorage.setItem(i,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||o("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:n,dp:n,dh:e,el:e,ec:"use"})}),1e3)))}},516:function(e){"use strict";e.exports=function(e,t){var n,r;return t=t||0,function(){r=Array.prototype.slice.call(arguments),window.clearTimeout(n),n=window.setTimeout((function(){e.apply(null,r)}),t)}}},423:function(e,t,n){"use strict";var r=n(516);e.exports=function(e,t){var n,o,i,s,a=!0,l=function(t){e.apply(null,t),n=null};function c(){if(s=Array.prototype.slice.call(arguments),a)return l(s),void(a=!1);i=Number(new Date),n=n||i,o(s),i-n>=t&&l(s)}return o=r(l,t=t||0),c.reset=function(){a=!0,n=null},c}},322:function(e){"use strict";e.exports=function(e){return e instanceof Array}},326:function(e){"use strict";e.exports=function(e){return"boolean"==typeof e||e instanceof Boolean}},65:function(e,t,n){"use strict";var r=n(929),o=n(934);e.exports=function(e){return!r(e)&&!o(e)}},404:function(e,t,n){"use strict";var r=n(790);e.exports=function(e){return!r(e)}},294:function(e){"use strict";e.exports=function(e){return e instanceof Function}},934:function(e){"use strict";e.exports=function(e){return null===e}},321:function(e){"use strict";e.exports=function(e){return"number"==typeof e||e instanceof Number}},73:function(e){"use strict";e.exports=function(e){return e===Object(e)}},758:function(e){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},790:function(e,t,n){"use strict";var r=n(65);e.exports=function(e){return r(e)&&!1!==e}},929:function(e){"use strict";e.exports=function(e){return void 0===e}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};return function(){"use strict";n.d(r,{default:function(){return vy}});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};Object.create;function i(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function s(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;function a(e){this.content=e}a.prototype={constructor:a,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new a(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new a(n)},addToStart:function(e,t){return new a([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new a(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new a(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=a.from(e)).size?new a(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=a.from(e)).size?new a(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=a.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},a.from=function(e){if(e instanceof a)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new a(t)};var l=a;function c(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let e=0;o.text[e]==i.text[e];e++)n++;return n}if(o.content.size||i.content.size){let e=c(o.content,i.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function u(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let e=u(s.content,a.content,n-1,r-1);if(e)return e}n-=l,r-=l}else n-=l,r-=l}}class d{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new d(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new d(n,r)}cutByIndex(e,t){return e==t?d.empty:0==e&&t==this.content.length?this:new d(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new d(r,o)}addToStart(e){return new d([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new d(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return c(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return u(this,e,t,n)}findIndex(e,t=-1){if(0==e)return h(0,e);if(e==this.size)return h(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?h(n+1,o):h(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return d.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new d(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return d.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new d(t||e,n)}static from(e){if(!e)return d.empty;if(e instanceof d)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new d([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}d.empty=new d([],0);const p={index:0,offset:0};function h(e,t){return p.index=e,p.offset=t,p}function f(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!f(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!f(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class m{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&f(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return m.none;if(e instanceof m)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}m.none=[];class g extends Error{}class v{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=b(this.content,e+this.openStart,t);return n&&new v(n,this.openStart,this.openEnd)}removeBetween(e,t){return new v(y(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return v.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new v(d.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new v(e,n,r)}}function y(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(y(i.content,t-o-1,n-o-1)))}function b(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=b(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function w(e,t,n){if(n.openStart>e.depth)throw new g("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new g("Inconsistent open depths");return k(e,t,n,0)}function k(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=k(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(d.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return S(i,E(e,o,s,t,r))}{let r=e.parent,o=r.content;return S(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return S(i,N(e,t,r))}function x(e,t){if(!t.type.compatibleContent(e.type))throw new g("Cannot join "+t.type.name+" onto "+e.type.name)}function C(e,t,n){let r=e.node(n);return x(r,t.node(n)),r}function T(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function M(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(T(e.nodeAfter,r),i++));for(let e=i;e<s;e++)T(o.child(e),r);t&&t.depth==n&&t.textOffset&&T(t.nodeBefore,r)}function S(e,t){if(!e.type.validContent(t))throw new g("Invalid content for node "+e.type.name);return e.copy(t)}function E(e,t,n,r,o){let i=e.depth>o&&C(e,t,o+1),s=r.depth>o&&C(n,r,o+1),a=[];return M(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(x(i,s),T(S(i,E(e,t,n,r,o+1)),a)):(i&&T(S(i,N(e,t,o+1)),a),M(t,n,o,a),s&&T(S(s,N(n,r,o+1)),a)),M(r,null,o,a),new d(a)}function N(e,t,n){let r=[];if(M(null,e,n,r),e.depth>n){T(S(C(e,t,n+1),N(e,t,n+1)),r)}return M(t,null,n,r),new d(r)}v.empty=new v(d.empty,0,0);class O{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return m.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new I(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new O(t,n,o)}static resolveCached(e,t){for(let n=0;n<D.length;n++){let r=D[n];if(r.pos==t&&r.doc==e)return r}let n=D[A]=O.resolve(e,t);return A=(A+1)%L,n}}let D=[],A=0,L=12;class I{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const R=Object.create(null);class P{constructor(e,t,n,r=m.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||d.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&f(this.attrs,t||e.defaultAttrs||R)&&m.sameSet(this.marks,n||m.none)}copy(e=null){return e==this.content?this:new P(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new P(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return v.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new v(a,r.depth-i,o.depth-i)}replace(e,t,n){return w(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return O.resolveCached(this,e)}resolveNoCache(e){return O.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),F(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=d.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let e=m.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!m.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=d.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}P.prototype.text=void 0;class B extends P{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):F(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new B(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new B(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function F(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class H{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new z(e,t);if(null==n.next)return H.empty;let r=q(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(W(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);W(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new H(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(U);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}}(function(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function i(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(i(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){let s=t;for(let t=0;t<e.min;t++){let t=n();o(i(e.expr,s),t),s=t}if(-1==e.max)o(i(e.expr,s),s);else for(let t=e.min;t<e.max;t++){let t=n();r(s,t),o(i(e.expr,s),t),s=t}return[r(s)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(e.exprs[r],t);if(r==e.exprs.length-1)return s;o(s,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let a=i.matchFragment(e,n);if(a&&(!t||a.validEnd))return d.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}H.empty=new H(!0);class z{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function q(e){let t=[];do{t.push(V(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function V(e){let t=[];do{t.push(j(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function j(e){let t=function(e){if(e.eat("(")){let t=q(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=_(e,t)}return t}function $(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function _(e,t){let n=$(e),r=n;return e.eat(",")&&(r="}"!=e.next?$(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function U(e,t){return t-e}function W(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(U)}function J(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function G(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function K(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new X(e[n]);return t}class Z{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=K(n.attrs),this.defaultAttrs=J(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==H.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:G(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new P(this,this.computeAttrs(e),d.from(t),m.setFrom(n))}createChecked(e=null,t,n){if(t=d.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new P(this,this.computeAttrs(e),t,m.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=d.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(d.empty,!0);return o?new P(this,e,t.append(o),m.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:m.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new Z(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class X{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Q{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=K(r.attrs),this.excluded=null;let o=J(this.attrs);this.instance=o?new m(this,o):null}create(e=null){return!e&&this.instance?this.instance:new m(this,G(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new Q(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null),this.spec={nodes:l.from(e.nodes),marks:l.from(e.marks||{}),topNode:e.topNode},this.nodes=Z.compile(this.spec.nodes,this),this.marks=Q.compile(this.spec.marks,this);let t=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let n=this.nodes[e],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=t[r]||(t[r]=H.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?ee(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:ee(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Z))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new B(n,n.defaultAttrs,e,m.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return P.fromJSON(this,e)}markFromJSON(e){return m.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ee(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class te{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new ae(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new ae(this,t,!0);return n.addAll(e,t.from,t.to),v.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(le(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ce(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=ce(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new te(e,te.schemaRules(e)))}}const ne={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},re={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},oe={ol:!0,ul:!0};function ie(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class se{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=m.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(d.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=d.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(d.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):ue(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ne.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class ae{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=ie(null,t.preserveWhitespace,0)|(n?4:0);r=o?new se(o.type,o.attrs,m.none,m.none,!0,t.topMatch||o.type.contentMatch,i):new se(n?null:e.schema.topNodeType,null,m.none,m.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();oe.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&oe.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:re.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(ne.hasOwnProperty(r))t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=m.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}addElementByRule(e,t,n){let r,o,i;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i)}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=ie(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new se(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ce(e){let t={};for(let n in e)t[n]=e[n];return t}function ue(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class de{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=he(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=de.renderSpec(he(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&de.renderSpec(he(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=de.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=pe(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return pe(e.marks)}}function pe(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function he(e){return e.document||window.document}var fe=n(956),me=n.n(fe),ge=n(969),ve=n.n(ge),ye=n(522),be=n.n(ye),we=n(204),ke=n.n(we),xe=n(462),Ce=n.n(xe),Te=n(758),Me=n.n(Te),Se=n(321),Ee=n.n(Se),Ne=n(929),Oe=n.n(Ne),De=n(934),Ae=n.n(De),Le=n(391),Ie=n.n(Le),Re=(/Mac/.test(navigator.platform),/[\u0020]+/g),Pe=/[>(){}[\]+-.!#|]/g,Be=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Fe=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,He=/[*_~`]/g,ze=/!\[.*\]\(.*\)/g,qe=/[[\]]/g,Ve=/(?:^|[^\\])\\(?!\\)/g,je=new RegExp('[&<>"]',"g");function $e(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return e}}function _e(e){return je.test(e)?e.replace(je,$e):e}function Ue(e,t){return-1!==e.indexOf(t)}var We=["rel","target","hreflang","type"],Je={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function Ge(e){if(!e)return null;var t={};return We.forEach((function(n){Oe()(e[n])||(t[n]=e[n])})),t}function Ke(e,t){for(var n="",r=0;r<t;r+=1)n+=e;return n}function Ze(e){for(var t=[],n=ze.exec(e);n;)t.push([n.index,n.index+n[0].length]),n=ze.exec(e);return e.replace(qe,(function(e,n){var r=t.some((function(e){return n>e[0]&&n<e[1]}));return r?e:"\\"+e}))}function Xe(e){var t=function(e){return"\\"+e},n=e.replace(Re," ");return Fe.test(n)&&(n=n.replace(Fe,t)),Ve.test(n)&&(n=n.replace(Ve,(function(e){return e+"\\"}))),n=n.replace(He,t),Be.test(n)&&(n=n.replace(Be,t)),function(e){var t=!1;return me()(Je,(function(n){return n.test(e)&&(t=!0),!t})),t}(n)&&(n=n.replace(Pe,t)),n}function Qe(e){return Ae()(e)||Oe()(e)}function Ye(e,t){if(null===e&&e===t)return!0;if("object"!=typeof e||"object"!=typeof t||Qe(e)||Qe(t))return e===t;for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function et(e){return e[e.length-1]}function tt(e){return"object"==typeof e&&null!==e}function nt(e,t){var n=o({},e);return e&&t&&Object.keys(t).forEach((function(e){tt(n[e])?Array.isArray(t[e])?n[e]=rt(t[e]):n.hasOwnProperty(e)?n[e]=nt(n[e],t[e]):n[e]=ot(t[e]):n[e]=t[e]})),n}function rt(e){return e.map((function(e){return tt(e)?Array.isArray(e)?rt(e):ot(e):e}))}function ot(e){var t=Object.keys(e);return t.length?t.reduce((function(t,n){return tt(e[n])?t[n]=Array.isArray(e[n])?rt(e[n]):ot(e[n]):t[n]=e[n],t}),{}):e}function it(e,t){return void 0===t&&(t={}),Object.keys(t).forEach((function(n){e.hasOwnProperty(n)&&"object"==typeof e[n]?Array.isArray(t[n])?e[n]=t[n]:it(e[n],t[n]):e[n]=t[n]})),e}function st(e,t){return e>t?[t,e]:[e,t]}const at=Math.pow(2,16);function lt(e,t){return e+t*at}function ct(e){return 65535&e}class ut{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class dt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&dt.empty)return dt.empty}recover(e){let t=0,n=ct(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/at}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+o],c=this.ranges[s+i],u=a+l;if(e<=u){let o=a+r+((l?e==a?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==(t<0?a:u)?null:lt(s/3,e-a),d=e==a?2:e==u?1:4;return(t<0?e!=a:e!=u)&&(d|=8),new ut(o,d,i)}r+=c-l}return n?e+r:new ut(e+r,0,null)}touches(e,t){let n=0,r=ct(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let a=this.ranges[t+o];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+i]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new dt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?dt.empty:new dt(e<0?[0,-e,0]:[0,0,e])}}dt.empty=new dt([]);class pt{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new pt(this.maps,this.mirror,e,t)}copy(){return new pt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new pt;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new ut(e,r,null)}}const ht=Object.create(null);class ft{getMap(){return dt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=ht[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in ht)throw new RangeError("Duplicate use of step JSON ID "+e);return ht[e]=t,t.prototype.jsonID=e,t}}class mt{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new mt(e,null)}static fail(e){return new mt(null,e)}static fromReplace(e,t,n,r){try{return mt.ok(e.replace(t,n,r))}catch(e){if(e instanceof g)return mt.fail(e.message);throw e}}}function gt(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(gt(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return d.fromArray(r)}class vt extends ft{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new v(gt(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return mt.fromReplace(e,this.from,this.to,o)}invert(){return new yt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new vt(t.pos,n.pos,this.mark)}merge(e){return e instanceof vt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new vt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new vt(t.from,t.to,e.markFromJSON(t.mark))}}ft.jsonID("addMark",vt);class yt extends ft{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new v(gt(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return mt.fromReplace(e,this.from,this.to,n)}invert(){return new vt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new yt(t.pos,n.pos,this.mark)}merge(e){return e instanceof yt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new yt(t.from,t.to,e.markFromJSON(t.mark))}}ft.jsonID("removeMark",yt);class bt extends ft{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&kt(e,this.from,this.to)?mt.fail("Structure replace would overwrite content"):mt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new dt([this.from,this.to-this.from,this.slice.size])}invert(e){return new bt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new bt(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof bt)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?v.empty:new v(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new bt(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?v.empty:new v(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new bt(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new bt(t.from,t.to,v.fromJSON(e,t.slice),!!t.structure)}}ft.jsonID("replace",bt);class wt extends ft{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(kt(e,this.from,this.gapFrom)||kt(e,this.gapTo,this.to)))return mt.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return mt.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?mt.fromReplace(e,this.from,this.to,n):mt.fail("Content does not fit in gap")}getMap(){return new dt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new wt(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new wt(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new wt(t.from,t.to,t.gapFrom,t.gapTo,v.fromJSON(e,t.slice),t.insert,!!t.structure)}}function kt(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function xt(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ct(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!xt(r,o,i))break}return null}function Tt(e){return{type:e,attrs:null}}function Mt(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function St(e,t){let n=e.resolve(t),r=n.index();return Et(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Et(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function Nt(e,t,n=t,r=v.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return Ot(o,i,r)?new bt(t,n,r):new Dt(o,i,r).fit()}function Ot(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}ft.jsonID("replaceAround",wt);class Dt{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=d.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=d.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new v(o,i,s);return e>-1?new wt(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new bt(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=It(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:s,match:a}=this.frontier[n],l=null;if(1==e&&(o?a.matchType(o.type)||(l=a.fillBefore(d.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:l};if(2==e&&o&&(i=a.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:i};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=It(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new v(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=It(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new v(At(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new v(At(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,s=n?n.content:i.content,a=i.openStart-e,l=0,c=[],{match:u,type:p}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let h=s.size+e-(i.content.size-i.openEnd);for(;l<s.childCount;){let e=s.child(l),t=u.matchType(e.type);if(!t)break;l++,(l>1||0==a||e.content.size)&&(u=t,c.push(Rt(e.mark(p.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?h:-1)))}let f=l==s.childCount;f||(h=-1),this.placed=Lt(this.placed,t,d.from(c)),this.frontier[t].match=u,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<h;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?v.empty:new v(At(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new v(At(i.content,e,l),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Pt(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=Pt(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=Pt(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Lt(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Lt(this.placed,this.depth,d.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(d.empty,!0);e.childCount&&(this.placed=Lt(this.placed,this.frontier.length,e))}}function At(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(At(e.firstChild.content,t-1,n)))}function Lt(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Lt(e.lastChild.content,t-1,n)))}function It(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Rt(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Rt(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(d.empty,!0)))),e.copy(r)}function Pt(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function Bt(e){return e.spec.defining||e.spec.definingForContent}function Ft(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Ft(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(d.empty,!0))}return e}function Ht(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}let zt=class extends Error{};zt=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(zt.prototype=Object.create(Error.prototype)).constructor=zt,zt.prototype.name="TransformError";const qt=Object.create(null);class Vt{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new jt(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=v.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(l.pos),s?v.empty:t),0==s&&Qt(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),Qt(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new Ut(e):Xt(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?Xt(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Xt(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Kt(e.node(0))}static atStart(e){return Xt(e,e,0,0,1)||new Kt(e)}static atEnd(e){return Xt(e,e,e.content.size,e.childCount,-1)||new Kt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=qt[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in qt)throw new RangeError("Duplicate use of selection JSON ID "+e);return qt[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ut.between(this.$anchor,this.$head).getBookmark()}}Vt.prototype.visible=!0;class jt{constructor(e,t){this.$from=e,this.$to=t}}let $t=!1;function _t(e){$t||e.parent.inlineContent||($t=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ut extends Vt{constructor(e,t=e){_t(e),_t(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Vt.near(n);let r=e.resolve(t.map(this.anchor));return new Ut(r.parent.inlineContent?r:n,n)}replace(e,t=v.empty){if(super.replace(e,t),t==v.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof Ut&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Wt(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ut(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=Vt.findFrom(t,n,!0)||Vt.findFrom(t,-n,!0);if(!e)return Vt.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(Vt.findFrom(e,-n,!0)||Vt.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new Ut(e,t)}}Vt.jsonID("text",Ut);class Wt{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Wt(e.map(this.anchor),e.map(this.head))}resolve(e){return Ut.between(e.resolve(this.anchor),e.resolve(this.head))}}class Jt extends Vt{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?Vt.near(o):new Jt(o)}content(){return new v(d.from(this.node),0,0)}eq(e){return e instanceof Jt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Gt(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Jt(e.resolve(t.anchor))}static create(e,t){return new Jt(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Jt.prototype.visible=!1,Vt.jsonID("node",Jt);class Gt{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Wt(n,n):new Gt(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Jt.isSelectable(n)?new Jt(t):Vt.near(t)}}class Kt extends Vt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=v.empty){if(t==v.empty){e.delete(0,e.doc.content.size);let t=Vt.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Kt(e)}map(e){return new Kt(e)}eq(e){return e instanceof Kt}getBookmark(){return Zt}}Vt.jsonID("all",Kt);const Zt={map(){return this},resolve:e=>new Kt(e)};function Xt(e,t,n,r,o,i=!1){if(t.inlineContent)return Ut.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&Jt.isSelectable(r))return Jt.create(e,n-(o<0?r.nodeSize:0))}else{let t=Xt(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function Qt(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof bt||i instanceof wt)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(Vt.near(e.doc.resolve(o),n)))}class Yt extends class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new pt}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new zt(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=v.empty){let r=Nt(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new v(d.from(n),0,0))}delete(e,t){return this.replace(e,t,v.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(Ot(o,i,r))return e.step(new bt(t,n,r));let s=Ht(o,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:o.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e].type,n=Bt(t);if(n&&o.node(l).type!=t)u=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+u+1)%(r.openStart+1),d=c[a];if(d)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],u=!0;c<0&&(u=!1,c=-c);let p=o.node(c-1),h=o.index(c-1);if(p.canReplaceWith(h,h,d.type,d.marks))return e.replace(o.before(c),u?i.after(c):n,new v(Ft(r.content,0,r.openStart,a),a,r.openEnd))}}let d=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>d));a--){let e=s[a];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new v(d.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=Ht(r,o);for(let t=0;t<i.length;t++){let n=i[t],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=d.empty,p=0;for(let e=i,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=d.from(r.node(e).copy(u)),p++):l--;let h=d.empty,f=0;for(let e=i,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,h=d.from(o.node(e).copy(h)),f++):c++;e.step(new wt(l,c,s,a,new v(u.append(h),p,f),u.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new bt(t-n,t+n,v.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=d.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=d.from(n[e].type.create(n[e].attrs,r))}let o=t.start,i=t.end;e.step(new wt(o,i,o,i,new v(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);let s=e.mapping.slice(i),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new wt(a,l,a+1,l-1,new v(d.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new wt(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new v(d.from(s),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=d.empty,s=d.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){i=d.from(o.node(e).copy(i));let t=r&&r[a];s=d.from(t?t.type.create(t.attrs,s):o.node(e).copy(s))}e.step(new bt(t,t,new v(i.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:s.push(o=new yt(c,d,u[e])));i&&i.to==c?i.to=d:a.push(i=new vt(c,d,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;i++;let a=null;if(r instanceof Q){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<a.length;e++){let n,l=a[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&l.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(s,t),to:r,step:i})}}})),o.forEach((t=>e.step(new yt(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let t=0;t<o.childCount;t++){let a=o.child(t),l=s+a.nodeSize,c=r.matchType(a.type);if(c){r=c;for(let t=0;t<a.marks.length;t++)n.allowsMarkType(a.marks[t].type)||e.step(new yt(s,l,a.marks[t]))}else i.push(new bt(s,l,v.empty));s=l}if(!r.validEnd){let t=r.fillBefore(d.empty,!0);e.replace(s,s,new v(t,0,0))}for(let t=i.length-1;t>=0;t--)e.step(i[t])}(this,e,t,n),this}}{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return m.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||m.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(Vt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function en(e,t){return t&&e?e.bind(t):e}class tn{constructor(e,t,n){this.name=e,this.init=en(t.init,n),this.apply=en(t.apply,n)}}const nn=[new tn("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new tn("selection",{init:(e,t)=>e.selection||Vt.atStart(t.doc),apply:e=>e.selection}),new tn("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new tn("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class rn{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=nn.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new tn(e.key,e.spec.state,e))}))}}class on{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new on(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new Yt(this)}static create(e){let t=new rn(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new on(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new rn(this.schema,e.plugins),n=t.fields,r=new on(t);for(let t=0;t<n.length;t++){let o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new rn(e.schema,e.plugins),o=new on(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=P.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=Vt.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=a.fromJSON.call(s,e,t[i],o))}o[r.name]=r.init(e,o)}})),o}}function sn(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=sn(o,t,{})),n[r]=o}return n}class an{constructor(e){this.spec=e,this.props={},e.props&&sn(e.props,this,this.props),this.key=e.key?e.key.key:cn("plugin")}getState(e){return e[this.key]}}const ln=Object.create(null);function cn(e){return e in ln?e+"$"+ ++ln[e]:(ln[e]=0,e+"$")}class un{constructor(e="key"){this.key=cn(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const dn="undefined"!=typeof navigator?navigator:null,pn="undefined"!=typeof document?document:null,hn=dn&&dn.userAgent||"",fn=/Edge\/(\d+)/.exec(hn),mn=/MSIE \d/.exec(hn),gn=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hn),vn=!!(mn||gn||fn),yn=mn?document.documentMode:gn?+gn[1]:fn?+fn[1]:0,bn=!vn&&/gecko\/(\d+)/i.test(hn);bn&&(/Firefox\/(\d+)/.exec(hn)||[0,0])[1];const wn=!vn&&/Chrome\/(\d+)/.exec(hn),kn=!!wn,xn=wn?+wn[1]:0,Cn=!vn&&!!dn&&/Apple Computer/.test(dn.vendor),Tn=Cn&&(/Mobile\/\w+/.test(hn)||!!dn&&dn.maxTouchPoints>2),Mn=Tn||!!dn&&/Mac/.test(dn.platform),Sn=/Android \d/.test(hn),En=!!pn&&"webkitFontSmoothing"in pn.documentElement.style,Nn=En?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,On=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Dn=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let An=null;const Ln=function(e,t,n){let r=An||(An=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},In=function(e,t,n,r){return n&&(Pn(e,t,n,r,-1)||Pn(e,t,n,r,1))},Rn=/^(img|br|input|textarea|hr)$/i;function Pn(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Bn(e))){let n=e.parentNode;if(!n||1!=n.nodeType||Fn(e)||Rn.test(e.nodeName)||"false"==e.contentEditable)return!1;t=On(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Bn(e):0}}}function Bn(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Fn(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Hn=function(e){let t=e.isCollapsed;return t&&kn&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function zn(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function qn(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Vn(e,t){return"number"==typeof e?e:e[t]}function jn(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function $n(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=Dn(s)){if(1!=s.nodeType)continue;let e=s,n=e==i.body,a=n?qn(i):jn(e),l=0,c=0;if(t.top<a.top+Vn(r,"top")?c=-(a.top-t.top+Vn(o,"top")):t.bottom>a.bottom-Vn(r,"bottom")&&(c=t.bottom-a.bottom+Vn(o,"bottom")),t.left<a.left+Vn(r,"left")?l=-(a.left-t.left+Vn(o,"left")):t.right>a.right-Vn(r,"right")&&(l=t.right-a.right+Vn(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n)break}}function _n(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Dn(r));return t}function Un(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Wn=null;function Jn(e,t){let n,r,o=2e8,i=0,s=t.top,a=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=Ln(l).getClientRects()}for(let u=0;u<e.length;u++){let d=e[u];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<o){n=l,o=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&e&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=Xn(r,1);if(n.top!=n.bottom&&Gn(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:Jn(n,r)}function Gn(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Kn(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(Gn(t,o))return Kn(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function Zn(e,t){let n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:o}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:o}=e)}let i,s=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!s||!e.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=e.dom.getBoundingClientRect();if(!Gn(t,n))return null;if(s=Kn(e.dom,t,n),!s)return null}if(Cn)for(let e=s;n&&e;e=Dn(e))e.draggable&&(n=void 0);if(s=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(s,t),n){if(bn&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(e,t,n,r){let o=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)o=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;o=t.posAfter}}n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==i&&(i=function(e,t,n){let{node:r,offset:o}=Jn(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:i,inside:a?a.posAtStart-a.border:-1}}function Xn(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Qn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Yn(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=En||bn;if(3==r.nodeType){if(!s||!Qn.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,er(Xn(Ln(r,e,t),i),i<0)}{let e=Xn(Ln(r,o,o),n);if(bn&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=Xn(Ln(r,o-1,o-1),-1);if(t.top==e.top){let n=Xn(Ln(r,o,o+1),-1);if(n.top!=e.top)return er(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==Bn(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return tr(e.getBoundingClientRect(),!1)}if(null==i&&o<Bn(r)){let e=r.childNodes[o];if(1==e.nodeType)return tr(e.getBoundingClientRect(),!0)}return tr(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==Bn(r))){let e=r.childNodes[o-1],t=3==e.nodeType?Ln(e,Bn(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return er(Xn(t,1),!1)}if(null==i&&o<Bn(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?Ln(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return er(Xn(t,-1),!0)}return er(Xn(3==r.nodeType?Ln(r):r,-n),n>=0)}function er(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function tr(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function nr(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const rr=/[\u0590-\u08ac]/;let or=null,ir=null,sr=!1;function ar(e,t,n){return or==t&&ir==n?sr:(or=t,ir=n,sr="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return nr(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Yn(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=Ln(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return rr.test(r.parent.textContent)&&a.modify?nr(e,t,(()=>{let t=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?i:s}(e,t,n))}class lr{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>On(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n,r=0,o=0;for(let t=0;r<this.children.length;r++){let n=this.children[r],i=t+n.size;if(i>e||n instanceof mr){o=e-t;break}t=i}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof cr&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?On(e.dom)+1:0}}{let e,n=!0;for(;e=r<this.children.length?this.children[r]:null,e&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?On(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,s=0;;s++){let n=this.children[s],a=i+n.size;if(-1==r&&e<=a){let o=i+n.border;if(e>=o&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=On(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=On(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(o>a&&i<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((bn||Cn)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(s=a={node:t.parentNode,offset:On(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(bn&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&Cn)&&In(s.node,s.offset,l.anchorNode,l.anchorOffset)&&In(a.node,a.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),u=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!u){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,s=i-o.border;if(e>=r&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class cr extends lr{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class ur extends lr{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class dr extends lr{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],i=o&&o(t,r,n);return i&&i.dom||(i=de.renderSpec(document,t.type.spec.toDOM(t,n))),new dr(e,t,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=dr.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=Nr(o,t,i,n)),e>0&&(o=Nr(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class pr extends lr{constructor(e,t,n,r,o,i,s,a,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,i&&this.updateChildren(a,l)}static create(e,t,n,r,o,i){let s,a=o.nodeViews[t.type.name],l=a&&a(t,o,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:i),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=de.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=Cr(c,n,t),l?s=new gr(e,t,n,r,c,u||null,d,l,o,i+1):t.isText?new fr(e,t,n,r,c,d,o):new pr(e,t,n,r,c,u||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>d.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Tr(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,a=new Sr(this,i&&i.node);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,o,t.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<o.length&&o[s].to==i){let e,t=o[s++];for(;s<o.length&&o[s].to==i;)(e||(e=[t])).push(o[s++]);if(e){e.sort(Er);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=i&&a.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let p=i+u.nodeSize;if(u.isText){let e=p;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=u.cut(e-i),u=u.cut(0,e-i),p=e,d=-1)}r(u,u.isInline&&!u.isLeaf?a.filter((e=>!e.inline)):a.slice(),t.forChild(i,u),d),i=p}}(this.node,this.innerDeco,((t,o,i)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!i&&a.syncToMarks(o==this.node.childCount?m.none:this.node.child(o).marks,n,e),a.placeWidget(t,e,r)}),((t,i,l,c)=>{let u;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,i,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(t,i,l,u,e)||a.updateNextNode(t,i,l,e,c)||a.addNode(t,i,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(i&&this.protectLocalComposition(e,i),vr(this.contentDOM,this.children,e),Tn&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Ut)||n<t||r>t+this.node.content.size)return null;let o=e.domSelection(),i=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Bn(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(o.focusNode,o.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,o=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let s=e.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return o<0?null:{node:i,pos:o,text:e}}return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new ur(this,o,t,r);e.input.compositionNodes.push(i),this.children=Nr(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(Tr(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=kr(this.dom,this.nodeDOM,wr(this.outerDeco,this.node,t),wr(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function hr(e,t,n,r,o){return Cr(r,t,e),new pr(void 0,e,t,n,r,r,r,o,0)}class fr extends pr{constructor(e,t,n,r,o,i,s){super(e,t,n,r,o,null,i,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new fr(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class mr extends lr{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class gr extends pr{constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r,o,i,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function vr(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let s=t[i],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Mr(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(a,r);if(s instanceof dr){let t=r?r.previousSibling:e.lastChild;vr(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Mr(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const yr=function(e){e&&(this.nodeName=e)};yr.prototype=Object.create(null);const br=[new yr];function wr(e,t,n){if(0==e.length)return br;let r=n?br[0]:new yr,o=[r];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s){s.nodeName&&o.push(r=new yr(s.nodeName));for(let e in s){let i=s[e];null!=i&&(n&&1==o.length&&o.push(r=new yr(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function kr(e,t,n,r){if(n==br&&r==br)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],s=n[t];if(t){let t;s&&s.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),s=br[0]),o=t}xr(o,s||br[0],i)}return o}function xr(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function Cr(e,t,n){return kr(e,e,br,wr(t,n,1!=e.nodeType))}function Tr(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Mr(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Sr{constructor(e,t){this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof dr)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[o])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=dr.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o){for(let i=this.index;i<this.top.children.length;i++){let s=this.top.children[i];if(s instanceof pr){let a=this.preMatch.matched.get(s);if(null!=a&&a!=o)return!1;let l=s.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&3!=s.dirty&&Tr(t,s.outerDeco)))&&s.update(e,t,n,r))return this.destroyBetween(this.index,i),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,o){this.top.children.splice(this.index++,0,pr.create(this.top,e,t,n,r,o)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new cr(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof dr;)t=e,e=t.children[t.children.length-1];e&&e instanceof fr&&!/\n$/.test(e.node.text)||((Cn||kn)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new mr(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function Er(e,t){return e.type.side-t.type.side}function Nr(e,t,n,r,o){let i=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Or(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(Hn(n)){for(a=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&Jt.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==Bn(e);r||o;){if(e==n)return!0;let t=On(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==Bn(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;l=new Jt(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=Hr(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)}return l}function Dr(e){return e.editable?e.hasFocus():qr(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ar(e,t=!1){let n=e.state.selection;if(Br(e,n),Dr(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&kn){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&In(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,On(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&vn&&yn<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:i,head:s}=n;!Lr||n instanceof Ut||(n.$from.parent.inlineContent||(r=Ir(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Ir(e,n.to))),e.docView.setSelection(i,s,e.root,t),Lr&&(r&&Pr(r),o&&Pr(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Dr(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Lr=Cn||kn&&xn<63;function Ir(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Cn&&o&&"false"==o.contentEditable)return Rr(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Rr(o);if(i)return Rr(i)}}function Rr(e){return e.contentEditable="true",Cn&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Pr(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Br(e,t){if(t instanceof Jt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Fr(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Fr(e)}function Fr(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Hr(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||Ut.between(t,n,r)}function zr(e){return(!e.editable||e.root.activeElement==e.dom)&&qr(e)}function qr(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Vr(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Vt.findFrom(i,t)}function jr(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $r(e,t,n){let r=e.state.selection;if(!(r instanceof Ut)){if(r instanceof Jt&&r.node.isInline)return jr(e,new Ut(t>0?r.$to:r.$from));{let n=Vr(e.state,t);return!!n&&jr(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Vr(e.state,t);return!!(n&&n instanceof Jt)&&jr(e,n)}if(!(Mn&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Jt.isSelectable(i)?jr(e,new Jt(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!En&&jr(e,new Ut(e.state.doc.resolve(t<0?s:s+i.nodeSize))))}}function _r(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ur(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Wr(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(bn&&1==n.nodeType&&r<_r(n)&&Ur(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Ur(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Gr(n))break;{let t=n.previousSibling;for(;t&&Ur(t);)o=n.parentNode,i=On(t),t=t.previousSibling;if(t)n=t,r=_r(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Kr(e,t,n,r):o&&Kr(e,t,o,i)}function Jr(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=_r(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Ur(n.childNodes[r]))break;o=n,i=++r}else{if(Gr(n))break;{let t=n.nextSibling;for(;t&&Ur(t);)o=t.parentNode,i=On(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=_r(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}o&&Kr(e,t,o,i)}function Gr(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Kr(e,t,n,r){if(Hn(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Ar(e)}),50)}function Zr(e,t,n){let r=e.state.selection;if(r instanceof Ut&&!r.empty||n.indexOf("s")>-1)return!1;if(Mn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Vr(e.state,t);if(n&&n instanceof Jt)return jr(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,s=r instanceof Kt?Vt.near(n,t):Vt.findFrom(n,t);return!!s&&jr(e,s)}return!1}function Xr(e,t){if(!(e.state.selection instanceof Ut))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Qr(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Yr(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Mn&&72==n&&"c"==r?Xr(e,-1)||Wr(e):46==n||Mn&&68==n&&"c"==r?Xr(e,1)||Jr(e):13==n||27==n||(37==n||Mn&&66==n&&"c"==r?$r(e,-1,r)||Wr(e):39==n||Mn&&70==n&&"c"==r?$r(e,1,r)||Jr(e):38==n||Mn&&80==n&&"c"==r?Zr(e,-1,r)||Wr(e):40==n||Mn&&78==n&&"c"==r?function(e){if(!Cn||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Qr(e,n,"true"),setTimeout((()=>Qr(e,n,"false")),20)}return!1}(e)||Zr(e,1,r)||Jr(e):r==(Mn?"m":"c")&&(66==n||73==n||89==n||90==n))}function eo(e,t){let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||de.fromSchema(e.state.schema),a=uo(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=lo[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function to(e,t,n,r,o){let i,s,a=o.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new v(d.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,o,r)));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=de.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=uo().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&lo[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),En&&function(e){let t=e.querySelectorAll(kn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&i.firstChild;e--)i=i.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||te.fromSchema(e.state.schema);s=t.parseSlice(i,{preserveWhitespace:!(!l&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||no.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=d.from(t.create(n[e+1],o)),i++,s++}return new v(o,i,s)}(ao(s,+u[1],+u[2]),u[4]);else if(s=v.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&oo(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=io(i[i.length-1],r.length));let t=ro(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return d.from(i)}return e}(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=ao(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const no=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ro(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,d.from(e));return e}function oo(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=oo(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(d.from(ro(n,e,o+1))))}}function io(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,io(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(d.empty,!0);return e.copy(n.append(r))}function so(e,t,n,r,o,i){let s=t<0?e.firstChild:e.lastChild,a=s.content;return o<r-1&&(a=so(a,t,n,r,o+1,i)),o>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(d.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function ao(e,t,n){return t<e.openStart&&(e=new v(so(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v(so(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const lo={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let co=null;function uo(){return co||(co=document.implementation.createHTMLDocument("title"))}const po={};let ho={};class fo{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function mo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function go(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>vo(e,t))}))}function vo(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function yo(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function bo(e){return{left:e.clientX,top:e.clientY}}function wo(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function ko(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function xo(e,t,n,r,o){return wo(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof Jt&&(n=o.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(Jt.isSelectable(t)){r=n&&o.$from.depth>0&&e>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(e);break}}return null!=r&&(ko(e,Jt.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Jt.isSelectable(r))&&(ko(e,new Jt(n),"pointer"),!0)}(e,n))}function Co(e,t,n,r){return wo(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function To(e,t,n,r){return wo(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(ko(e,Ut.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(n.inlineContent)ko(e,Ut.create(r,i+1,i+1+n.content.size),"pointer");else{if(!Jt.isSelectable(n))continue;ko(e,Jt.create(r,i),"pointer")}return!0}}(e,n,r)}function Mo(e){return Lo(e)}ho.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!No(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Sn||!kn||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Tn||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||Yr(e,n)?n.preventDefault():mo(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,zn(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},ho.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},ho.keypress=(e,t)=>{let n=t;if(No(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Mn&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Ut&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const So=Mn?"metaKey":"ctrlKey";po.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Mo(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[So]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(bo(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Eo(e,s,n,!!r)):("doubleClick"==i?Co:To)(e,s.pos,s.inside,n)?n.preventDefault():mo(e,"pointer"))};class Eo{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[So],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof Jt&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!bn||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),mo(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ar(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(bo(e))),this.allowDefault||!t?mo(this.view,"pointer"):xo(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Cn&&this.mightDrag&&!this.mightDrag.node.isAtom||kn&&!(this.view.state.selection instanceof Ut)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ko(this.view,Vt.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):mo(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),mo(this.view,"pointer"),0==e.buttons&&this.done()}}function No(e,t){return!!e.composing||!!(Cn&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}po.touchdown=e=>{Mo(e),mo(e,"pointer")},po.contextmenu=e=>Mo(e);const Oo=Sn?5e3:-1;function Do(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Lo(e)),t))}function Ao(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Lo(e,t=!1){if(!(Sn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ao(e),t||e.docView&&e.docView.dirty){let t=Or(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}ho.compositionstart=ho.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Lo(e,!0),e.markCursor=null;else if(Lo(e),bn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}Do(e,Oo)},ho.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Do(e,20))};const Io=vn&&yn<15||Tn&&Nn<604;function Ro(e,t,n,r){let o=to(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,o||v.empty))))return!0;if(!o)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),s=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}po.copy=ho.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Io?null:n.clipboardData,s=r.content(),{dom:a,text:l}=eo(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ho.paste=(e,t)=>{let n=t;if(e.composing&&!Sn)return;let r=Io?null:n.clipboardData;r&&Ro(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ro(e,r.value,null,t):Ro(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Po{constructor(e,t){this.slice=e,this.move=t}}const Bo=Mn?"altKey":"ctrlKey";po.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(bo(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof Jt?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Jt.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Jt.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=eo(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Io?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Io||n.dataTransfer.setData("text/plain",l),e.dragging=new Po(s,!n[Bo])},po.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},ho.dragover=ho.dragenter=(e,t)=>t.preventDefault(),ho.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(bo(n));if(!o)return;let i=e.state.doc.resolve(o.pos);if(!i)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=to(e,n.dataTransfer.getData(Io?"Text":"text/plain"),Io?null:n.dataTransfer.getData("text/html"),!1,i);let a=!(!r||n[Bo]);if(e.someProp("handleDrop",(t=>t(e,n,s||v.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}(e.state.doc,i.pos,s):i.pos;null==l&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&Jt.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Jt(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(Hr(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},po.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Ar(e)}),20))},po.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},po.beforeinput=(e,t)=>{if(kn&&Sn&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,zn(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in ho)po[e]=ho[e];function Fo(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Ho{constructor(e,t){this.toDOM=e,this.spec=t||$o,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new Vo(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Ho&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Fo(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class zo{constructor(e,t){this.attrs=e,this.spec=t||$o}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Vo(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof zo&&Fo(this.attrs,e.attrs)&&Fo(this.spec,e.spec)}static is(e){return e.type instanceof zo}destroy(){}}class qo{constructor(e,t){this.attrs=e,this.spec=t||$o}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Vo(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof qo&&Fo(this.attrs,e.attrs)&&Fo(this.spec,e.spec)}destroy(){}}class Vo{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Vo(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Vo(e,e,new Ho(t,n))}static inline(e,t,n,r){return new Vo(e,t,new zo(n,r))}static node(e,t,n,r){return new Vo(e,t,new qo(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof zo}}const jo=[],$o={};class _o{constructor(e,t){this.local=e.length?e:jo,this.children=t.length?t:jo}static create(e,t){return t.length?Zo(t,e,0,$o):Uo}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==Uo||0==e.maps.length?this:this.mapInner(e,t,0,0,n||$o)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice(),l=(e,t,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||e>c+i)continue;let u=a[s]+i;t>=u?a[s+1]=e<=u?-2:-1:n>=o&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){c=!0,a[t+1]=-1;continue}let l=n.map(e[t]+i),u=l-o;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,l+1,e[t]+i+1,s);r!=Uo?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=Zo(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new _o(t.sort(Xo),a)}(this.children,i||[],e,t,n,r,o):i?new _o(i.sort(Xo),jo):Uo}add(e,t){return t.length?this==Uo?_o.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=Go(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,Zo(s,e,a+1,$o)),o+=3}}));let i=Jo(o?Ko(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new _o(i.length?this.local.concat(i).sort(Xo):this.local,r||this.children)}remove(e){return 0==e.length||this==Uo?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=Uo?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new _o(r,n):Uo}forChild(e,t){if(this==Uo)return this;if(t.isLeaf)return _o.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof zo){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new _o(r.sort(Xo),jo);return n?new Wo([e,n]):e}return n||Uo}eq(e){if(this==e)return!0;if(!(e instanceof _o)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Qo(this.localsInner(e))}localsInner(e){if(this==Uo)return jo;if(e.inlineContent||!this.local.some(zo.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof zo||t.push(this.local[e]);return t}}_o.empty=new _o([],[]),_o.removeOverlap=Qo;const Uo=_o.empty;class Wo{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,$o)));return Wo.from(n)}forChild(e,t){if(t.isLeaf)return _o.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=Uo&&(o instanceof Wo?n=n.concat(o.members):n.push(o))}return Wo.from(n)}eq(e){if(!(e instanceof Wo)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?Qo(n?t:t.sort(Xo)):jo}static from(e){switch(e.length){case 0:return Uo;case 1:return e[0];default:return new Wo(e)}}}function Jo(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new Vo(o.from+t,o.to+t,o.type))}return n}function Go(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ko(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Zo(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=Go(e,t,s+n);if(a){i=!0;let e=Zo(a,t,n+s+1,r);e!=Uo&&o.push(s,s+t.nodeSize,e)}}));let s=Jo(i?Ko(e):e,-n).sort(Xo);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new _o(s,o):Uo}function Xo(e,t){return e.from-t.from||e.to-t.to}function Qo(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Yo(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Yo(t,o+1,i.copy(r.to,i.to)))}}return t}function Yo(e,t,n){for(;t<e.length&&Xo(n,e[t])>0;)t++;e.splice(t,0,n)}function ei(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=Uo&&t.push(r)})),e.cursorWrapper&&t.push(_o.create(e.state.doc,[e.cursorWrapper.deco])),Wo.from(t)}const ti={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ni=vn&&yn<=11;class ri{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class oi{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ri,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);vn&&yn<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),ni&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,ti)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(zr(this.view)){if(this.suppressingSelectionUpdates)return Ar(this.view);if(vn&&yn<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&In(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&zr(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],s);n&&(r=r<0?n.from:Math.min(n.from,r),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(i=!0))}if(bn&&s.length>1){let e=s.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(ii)return;ii=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Ar(this.view),this.currentSelection.set(t))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(vn&&yn<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?On(r)+1:0,s=n.localPosFromDOM(e.target,i,-1),a=o&&o.parentNode==e.target?On(o):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let ii=!1;function si(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Cn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Cn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function ai(e,t,n,r,o){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Or(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let i=e.state.doc.resolve(t),s=i.sharedDepth(n);t=i.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a=e.state.selection,l=function(e,t,n){let r,{node:o,fromOffset:i,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Hn(c)||r.push({node:c.focusNode,offset:c.focusOffset})),kn&&8===e.input.lastKeyCode)for(let e=s;e>i;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||te.fromSchema(e.state.schema),h=d.resolve(a),f=null,m=p.parse(o,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:si,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n);if(kn&&e.cursorWrapper&&l.sel&&l.sel.anchor==e.cursorWrapper.deco.from&&l.sel.head==l.sel.anchor){let t=e.cursorWrapper.deco.type.toDOM.nextSibling,n=t&&t.nodeValue?t.nodeValue.length:1;l.sel={anchor:l.sel.anchor+n,head:l.sel.anchor+n}}let c,u,p=e.state.doc,h=p.slice(l.from,l.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(c=e.state.selection.to,u="end"):(c=e.state.selection.from,u="start"),e.input.lastKeyCode=null;let f=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==o){r-=s+Math.max(0,i-Math.min(s,a))-i}if(s<i&&e.size<t.size){i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i}else if(a<i){i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}(h.content,l.doc.content,l.from,c,u);if((Tn&&e.input.lastIOSEnter>Date.now()-225||Sn)&&o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!f||f.endA>=f.endB)&&e.someProp("handleKeyDown",(t=>t(e,zn(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!f){if(!(r&&a instanceof Ut&&!a.empty&&a.$head.sameParent(a.$anchor))||e.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let t=li(e,e.state.doc,l.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}f={start:a.from,endA:a.to,endB:a.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&f.start==f.endB&&e.state.selection instanceof Ut&&(f.start>e.state.selection.from&&f.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?f.start=e.state.selection.from:f.endA<e.state.selection.to&&f.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(f.endB+=e.state.selection.to-f.endA,f.endA=e.state.selection.to)),vn&&yn<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>l.from&&"  "==l.doc.textBetween(f.start-l.from-1,f.start-l.from+1)&&(f.start--,f.endA--,f.endB--);let m,g=l.doc.resolveNoCache(f.start-l.from),v=l.doc.resolveNoCache(f.endB-l.from),y=p.resolve(f.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=f.endA;if((Tn&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!b&&g.pos<l.doc.content.size&&(m=Vt.findFrom(l.doc.resolve(g.pos+1),1,!0))&&m.head==v.pos)&&e.someProp("handleKeyDown",(t=>t(e,zn(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>f.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||ci(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(ci(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||ci(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,f.start,f.endA,g,v)&&e.someProp("handleKeyDown",(t=>t(e,zn(8,"Backspace")))))return void(Sn&&kn&&e.domObserver.suppressSelectionUpdates());kn&&Sn&&f.endB==f.start&&(e.input.lastAndroidDelete=Date.now()),Sn&&!b&&g.start()!=v.start()&&0==v.parentOffset&&g.depth==v.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==f.endA&&(f.endB-=2,v=l.doc.resolveNoCache(f.endB-l.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,zn(13,"Enter"))}))}),20));let w,k,x,C=f.start,T=f.endA;if(b)if(g.pos==v.pos)vn&&yn<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ar(e)),20)),w=e.state.tr.delete(C,T),k=p.resolve(f.start).marksAcross(p.resolve(f.endA));else if(f.endA==f.endB&&(x=function(e,t){let n,r,o,i=e.firstChild.marks,s=t.firstChild.marks,a=i,l=s;for(let e=0;e<s.length;e++)a=s[e].removeFromSet(a);for(let e=0;e<i.length;e++)l=i[e].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(o(t.child(e)));if(d.from(c).eq(e))return{mark:r,type:n}}(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,f.endA-y.start()))))w=e.state.tr,"add"==x.type?w.addMark(C,T,x.mark):w.removeMark(C,T,x.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let t=g.parent.textBetween(g.parentOffset,v.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,C,T,t))))return;w=e.state.tr.insertText(t,C,T)}if(w||(w=e.state.tr.replace(C,T,l.doc.slice(f.start-l.from,f.endB-l.from))),l.sel){let t=li(e,w.doc,l.sel);t&&!(kn&&Sn&&e.composing&&t.empty&&(f.start!=f.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==C||t.head==w.mapping.map(T)-1)||vn&&t.empty&&t.head==C)&&w.setSelection(t)}k&&w.ensureMarks(k),e.dispatch(w.scrollIntoView())}function li(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Hr(e,t.resolve(n.anchor),t.resolve(n.head))}function ci(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}class ui{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fo,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(mi),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=hi(this),pi(this),this.nodeViews=fi(this),this.docView=hr(this.state.doc,di(this),ei(this),this.dom,this),this.domObserver=new oi(this,((e,t,n,r)=>ai(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in po){let n=po[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!yo(e,t)||vo(e,t)||!e.editable&&t.type in ho||n(e,t)})}Cn&&e.dom.addEventListener("input",(()=>null)),go(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&go(this),this._props=e,e.plugins&&(e.plugins.forEach(mi),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;if(e.storedMarks&&this.composing&&(Ao(this),o=!0),this.state=e,t){let e=fi(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0),go(this)}this.editable=hi(this),pi(this);let i=ei(this),s=di(this),a=t?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(e.doc,s,i);!l&&e.selection.eq(n.selection)||(o=!0);let c="preserve"==a&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(i,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:_n(e.dom)}}(this);if(o){this.domObserver.stop();let t=l&&(vn||kn)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(l){let n=kn?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,s,i,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=hr(e.doc,s,i,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return In(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ar(this,t):(Br(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==a)this.dom.scrollTop=0;else if("to selection"==a){let t=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(e.selection instanceof Jt){let n=this.docView.domAfterPos(e.selection.from);1==n.nodeType&&$n(this,n.getBoundingClientRect(),t)}else $n(this,this.coordsAtPos(e.selection.head,1),t)}else c&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Un(n,0==r?0:r-t)}(c)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Wn)return e.focus(Wn);let t=_n(e);e.focus(null==Wn?{get preventScroll(){return Wn={preventScroll:!0},!0}}:void 0),Wn||(Wn=!1,Un(t,0))}(this.dom),Ar(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return Zn(this,e)}coordsAtPos(e,t=1){return Yn(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return ar(this,t||this.state,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ei(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){vo(e,t)||!po[t.type]||!e.editable&&t.type in ho||po[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function di(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[Vo.node(0,e.state.doc.content.size,t)]}function pi(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Vo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function hi(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function fi(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function mi(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var gi=n(354),vi=n.n(gi),yi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},bi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},wi="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),ki="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),xi="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Ci="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ti="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Mi=wi&&(Ci||+wi[1]<57)||xi&&Ci,Si=0;Si<10;Si++)yi[48+Si]=yi[96+Si]=String(Si);for(Si=1;Si<=24;Si++)yi[Si+111]="F"+Si;for(Si=65;Si<=90;Si++)yi[Si]=String.fromCharCode(Si+32),bi[Si]=String.fromCharCode(Si);for(var Ei in yi)bi.hasOwnProperty(Ei)||(bi[Ei]=yi[Ei]);const Ni="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Oi(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);Ni?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Di(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Ai(e){return new an({props:{handleKeyDown:Li(e)}})}function Li(e){let t=function(e){let t=Object.create(null);for(let n in e)t[Oi(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(Mi&&(e.ctrlKey||e.altKey||e.metaKey)||(ki||Ti)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?bi:yi)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,s=t[Di(o,n,!i)];if(s&&s(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=yi[n.keyCode])&&r!=o){let o=t[Di(r,n,!0)];if(o&&o(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){let r=t[Di(o,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}const Ii=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Ri(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Pi(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}const Bi=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let o=Fi(r);if(!o)return!1;let i=o.nodeAfter;if($i(e,o,t))return!0;if(0==r.parent.content.size&&(Ri(i,"start")||Jt.isSelectable(i))){let n=Nt(e.doc,r.before(),r.after(),v.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Ri(i,"start")?Vt.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Jt.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)};function Fi(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const Hi=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function zi(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const qi=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=zi(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,s.createAndFill());o.setSelection(Vt.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},Vi=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof Jt&&e.selection.node.isBlock)return!(!n.parentOffset||!Mt(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,i=e.tr;(e.selection instanceof Ut||e.selection instanceof Kt)&&i.deleteSelection();let s=0==n.depth?null:zi(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=o&&s?[{type:s}]:void 0,l=Mt(i.doc,i.mapping.map(n.pos),1,a);if(a||l||!Mt(i.doc,i.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(i.split(i.mapping.map(n.pos),1,a),!o&&!n.parentOffset&&n.parent.type!=s)){let e=i.mapping.map(n.before()),t=i.doc.resolve(e);s&&n.node(-1).canReplaceWith(t.index(),t.index()+1,s)&&i.setNodeMarkup(i.mapping.map(n.before()),s)}t(i.scrollIntoView())}return!0},ji=(e,t)=>(t&&t(e.tr.setSelection(new Kt(e.doc))),!0);function $i(e,t,n){let r,o,i=t.nodeBefore,s=t.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!St(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){let o=t.pos+s.nodeSize,a=d.empty;for(let e=r.length-1;e>=0;e--)a=d.from(r[e].create(null,a));a=d.from(i.copy(a));let l=e.tr.step(new wt(t.pos-1,o,t.pos,o,new v(a,1,0),r.length,!0)),c=o+2*r.length;St(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=Vt.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Ct(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Ri(s,"start",!0)&&Ri(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=d.empty;for(let e=o.length-1;e>=0;e--)r=d.from(o[e].copy(r));n(e.tr.step(new wt(t.pos-o.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new v(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function _i(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(Ut.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const Ui=_i(-1),Wi=_i(1);function Ji(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&function(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(Tt).concat({type:t,attrs:n}).concat(i.map(Tt)):null}(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}function Gi(e,t=null){return function(n,r){let{from:o,to:i}=n.selection,s=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(o),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(o,i,e,t).scrollIntoView()),!0)}}function Ki(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],s=0==o.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<s.length;t++){let{$from:r,$to:i}=s[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(o)i.removeMark(r.pos,a.pos,e);else{let n=r.pos,o=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function Zi(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let Xi=Zi(Ii,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let o=Pi(r);if(!o){let n=r.blockRange(),o=n&&Ct(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&$i(e,o,t))return!0;if(0==r.parent.content.size&&(Ri(i,"end")||Jt.isSelectable(i))){let n=Nt(e.doc,r.before(),r.after(),v.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Ri(i,"end")?Vt.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Jt.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0)}),((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Pi(r)}let s=i&&i.nodeBefore;return!(!s||!Jt.isSelectable(s))&&(t&&t(e.tr.setSelection(Jt.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)})),Qi=Zi(Ii,Bi,((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=Fi(r)}let s=i&&i.nodeAfter;return!(!s||!Jt.isSelectable(s))&&(t&&t(e.tr.setSelection(Jt.create(e.doc,i.pos)).scrollIntoView()),!0)}));const Yi={Enter:Zi(Hi,((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Kt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=zi(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(n,i.createAndFill());s.setSelection(Ut.create(s.doc,n+1)),t(s.scrollIntoView())}return!0}),((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Mt(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ct(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)}),Vi),"Mod-Enter":qi,Backspace:Xi,"Mod-Backspace":Xi,"Shift-Backspace":Xi,Delete:Qi,"Mod-Delete":Qi,"Mod-a":ji},es={"Ctrl-h":Yi.Backspace,"Alt-Backspace":Yi["Mod-Backspace"],"Ctrl-d":Yi.Delete,"Ctrl-Alt-Backspace":Yi["Mod-Delete"],"Alt-Delete":Yi["Mod-Delete"],"Alt-d":Yi["Mod-Delete"],"Ctrl-a":Ui,"Ctrl-e":Wi};for(let e in Yi)es[e]=Yi[e];const ts=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?es:Yi;class ns{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}function rs({rules:e}){let t=new an({state:{init:()=>null,apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>is(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&is(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function is(e,t,n,r,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+r;for(let a=0;a<o.length;a++){let c=o[a].match.exec(l),u=c&&o[a].handler(s,c,t-(c[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const ss=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1};new ns(/--$/,"—"),new ns(/\.\.\.$/,"…"),new ns(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new ns(/"$/,"”"),new ns(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,""),new ns(/'$/,"");var as=200,ls=function(){};ls.prototype.append=function(e){return e.length?(e=ls.from(e),!this.length&&e||e.length<as&&this.leafAppend(e)||this.length<as&&e.leafPrepend(this)||this.appendInner(e)):this},ls.prototype.prepend=function(e){return e.length?ls.from(e).append(this):this},ls.prototype.appendInner=function(e){return new us(this,e)},ls.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?ls.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},ls.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},ls.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},ls.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},ls.from=function(e){return e instanceof ls?e:e&&e.length?new cs(e):ls.empty};var cs=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=as)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=as)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(ls);ls.empty=new cs([]);var us=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(ls),ds=ls;class ps{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new hs(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new hs(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new ps(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new hs(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(u),t&&(i++,t=void 0),r||(a=u)}let l=i-n.depth;return l>ms&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new ps(s.append(o),i)}remapping(e,t){let n=new pt;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new ps(this.items.append(e.map((e=>new hs(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new hs(l,i,c))}else n.push(new hs(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new hs(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new ps(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new hs(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new ps(ds.from(r.reverse()),o)}}ps.empty=new ps(ds.empty,0);class hs{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new hs(t.getMap().invert(),t,this.selection)}}}class fs{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const ms=20;function gs(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function vs(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function ys(e,t,n,r){let o=ks(t),i=xs.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),c=new fs(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(xs,{redo:r,historyState:c}).scrollIntoView())}let bs=!1,ws=null;function ks(e){let t=e.plugins;if(ws!=t){bs=!1,ws=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){bs=!0;break}}return bs}const xs=new un("history"),Cs=new un("closeHistory");function Ts(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new an({key:xs,state:{init:()=>new fs(ps.empty,ps.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(xs);if(i)return i.historyState;n.getMeta(Cs)&&(e=new fs(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(xs))return s.getMeta(xs).redo?new fs(e.done.addTransform(n,void 0,r,ks(t)),e.undone,gs(n.mapping.maps[n.steps.length-1]),e.prevTime):new fs(e.done,e.undone.addTransform(n,void 0,r,ks(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new fs(e.done.rebased(n,o),e.undone.rebased(n,o),vs(e.prevRanges,n.mapping),e.prevTime):new fs(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),vs(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),i=s?vs(e.prevRanges,n.mapping):gs(n.mapping.maps[n.steps.length-1]);return new fs(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,ks(t)),ps.empty,i,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?Ms:"historyRedo"==n?Ss:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const Ms=(e,t)=>{let n=xs.getState(e);return!(!n||0==n.done.eventCount)&&(t&&ys(n,e,t,!1),!0)},Ss=(e,t)=>{let n=xs.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&ys(n,e,t,!0),!0)};function Es(e,t){var n=e.nodes.paragraph;return t?n.create(null,Me()(t)?e.text(t):t):n.createAndFill()}function Ns(e,t,n){return e.text(t,n)}function Os(e,t,n){void 0===n&&(n=t);var r=e.doc.content.size,o=r>0?r-1:1;return Ut.create(e.doc,Math.min(t,o),Math.min(n,o))}function Ds(e,t,n){var r=t.pos;return e.replaceWith(r,r,Es(n)),e.setSelection(Os(e,r+1))}function As(e){for(var t=e.state,n=e.from,r=e.startIndex,o=e.endIndex,i=e.createText,s=t.tr,a=t.doc,l=t.schema,c=r;c<=o;c+=1){var u=a.child(c),p=u.nodeSize,h=u.textContent,f=u.content,m=i(h),g=m?Ns(l,m):d.empty,v=s.mapping.map(n),y=v+f.size;s.replaceWith(v,y,g),n+=p}return s}function Ls(e,t,n,r){var o=n.length;e.split(t).delete(t-o,t).insert(e.mapping.map(t),r).setSelection(Os(e,e.mapping.map(t)-o))}function Is(e){return e.sourcepos[0][0]}function Rs(e){return e.sourcepos[1][0]}function Ps(e){return e.sourcepos[0][1]}function Bs(e){return e.sourcepos[1][1]}function Fs(e){var t=e.type;return"strike"===t||"strong"===t||"emph"===t||"code"===t||"link"===t||"image"===t}function Hs(e){return e&&("item"===e.type||"list"===e.type)}function zs(e){return Hs(e)&&"ordered"===e.listData.type}function qs(e){return Hs(e)&&"ordered"!==e.listData.type}function Vs(e){return e&&("tableCell"===e.type||"tableDelimCell"===e.type)}function js(e,t,n){for(void 0===n&&(n=!0),e=n?e:e.parent;e&&"document"!==e.type;){if(t(e))return e;e=e.parent}return null}function $s(e,t){return[e[0],e[1]+t]}function _s(e,t){return[e[0],t]}function Us(e){var t=e.firstChild.literal;switch(e.type){case"emph":return"*"+t+"*";case"strong":return"**"+t+"**";case"strike":return"~~"+t+"~~";case"code":return"`"+t+"`";case"link":case"image":var n=e,r=n.destination,o=n.title;return("link"===e.type?"":"!")+"["+t+"]("+r+(o?' "'+o+'"':"")+")";default:return null}}function Ws(e){switch(e.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function Js(e){for(var t=[],n=e.walker(),r=null;r=n.next();){var o=r.node;"text"===o.type&&t.push(o.literal)}return t.join("")}var Gs=[],Ks={},Zs=/\$\$widget\d+\s/;function Xs(e){var t=e.search(Zs);if(-1!==t){var n=e.substring(t).replace(Zs,"").replace("$$","");e=e.substring(0,t),e+=Xs(n)}return e}function Qs(e,t){return"$$"+e+" "+t+"$$"}function Ys(e,t){var n=Ks[e],r=n.rule,o=n.toDOM,i=Xs(t).match(r);return i&&(t=i[0]),o(t)}function ea(){return Gs}function ta(e){(Gs=e).forEach((function(e,t){Ks["widget"+t]=e}))}function na(e,t,n,r){return e.concat(ra(t,n,r))}function ra(e,t,n){void 0===n&&(n=0);var r=[],o=(Gs[n]||{}).rule,i=n+1;if(e=Xs(e),o&&o.test(e)){for(var s=void 0;-1!==(s=e.search(o));){var a=e.substring(0,s);a&&(r=na(r,a,t,i));var l=(e=e.substring(s)).match(o)[0],c="widget"+n;r.push(t.nodes.widget.create({info:c},t.text(Qs(c,l)))),e=e.substring(l.length)}e&&(r=na(r,e,t,i))}else e&&(r=n<Gs.length-1?na(r,e,t,i):[t.text(e)]);return r}function oa(e){for(var t,n="",r=e.walker();t=r.next();){var o=t.node;t.entering&&(o!==e&&"text"!==o.type?(n+=Us(o),r.resumeAt(e,!1),r.next()):"text"===o.type&&(n+=o.literal))}return n}function ia(){return{deleteSelection:function(){return Ii},selectAll:function(){return ji},undo:function(){return Ms},redo:function(){return Ss}}}var sa=n(322),aa=n.n(sa),la=n(714),ca=n.n(la),ua=n(471),da=n.n(ua),pa="[A-Za-z][A-Za-z0-9-]*",ha="(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)",fa="<("+pa+")("+ha+")*\\s*/?>",ma="(?:"+fa+"|</([A-Za-z][A-Za-z0-9-]*)\\s*[>])",ga=new RegExp("^"+ma,"i"),va=/<br\s*\/*>/i,ya=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,ba="</p><p>";function wa(e,t,n){var r=parseInt(e.left,10),o=parseInt(e.top,10),i=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),s=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=r&&t<=r+i&&n>=o&&n<=o+s}var ka="toastui-editor-";function xa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r],s=void 0;(s=Array.isArray(i)?i[0]?i[1]:null:i)&&n.push(""+ka+s)}return n.join(" ")}function Ca(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.map((function(e){return ka+"md-"+e})).join(" ")}function Ta(e){return e&&e.nodeType===Node.ELEMENT_NODE}function Ma(e){e.parentNode&&e.parentNode.removeChild(e)}function Sa(e,t,n){Oe()(n)&&(n=!ca()(e,t)),(n?ke():Ce())(e,t)}function Ea(e,t){var n=document.createElement("div");Me()(e)?n.innerHTML=e:n.appendChild(e);var r=n.firstChild;return t&&t.appendChild(r),r}function Na(e){var t=window.getComputedStyle(e);return["margin-left","margin-right"].reduce((function(e,n){return e+parseInt(t.getPropertyValue(n),10)}),0)+e.offsetWidth}function Oa(e,t){var n;for(n=Me()(t)?function(e){return da()(e,t)}:function(e){return e===t};e&&e!==document;){if(Ta(e)&&n(e))return e;e=e.parentNode}return null}function Da(e,t){for(var n=0,r=0;e&&e!==t;){if(n+=e.offsetTop,r+=e.offsetLeft,e.offsetParent===t.offsetParent)break;e=e.offsetParent}return{offsetTop:n,offsetLeft:r}}function Aa(e,t){Object.keys(e).forEach((function(n){Qe(e[n])?t.removeAttribute(n):t.setAttribute(n,e[n])}))}function La(e){var t=e;return t=(t=t.replace(/<img class="ProseMirror-separator" alt="">/g,"")).replace(/ class="ProseMirror-trailingBreak"/g,"")}var Ia=new un("widget"),Ra=function(){function e(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",(function(){n.rootEl=Oa(e.dom.parentElement,"."+xa("defaultUI"))})),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return e.prototype.update=function(e){var t=Ia.getState(e.state);if(this.removeWidget(),t){var n=t.node,r=t.style,o=e.coordsAtPos(t.pos),i=o.top,s=o.left,a=o.bottom-i,l=this.rootEl.getBoundingClientRect(),c=i-l.top;be()(n,{opacity:"0"}),this.rootEl.appendChild(n),be()(n,{position:"absolute",left:s-l.left+5+"px",top:("bottom"===r?c+a-5:c-a)+"px",opacity:"1"}),this.popup=n,e.focus()}},e.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},e}();function Pa(e){return new an({key:Ia,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(t){return new Ra(t,e)}})}var Ba=n(893),Fa=n.n(Ba);function Ha(e,t,n){e.emit("addImageBlobHook",t,(function(n,r){e.emit("command","addImage",{imageUrl:n,altText:r||t.name||"image"})}),n)}function za(e){var t=vi()(e).filter((function(e){return-1!==e.type.indexOf("image")}));if(1===t.length){var n=t[0];if(n)return n.getAsFile()}return null}function qa(e){var t=e.eventEmitter;return new an({props:{handleDOMEvents:{drop:function(e,n){var r,o=null===(r=n.dataTransfer)||void 0===r?void 0:r.files;return o&&Fa()(o,(function(e){return-1===e.type.indexOf("image")||(n.preventDefault(),n.stopPropagation(),Ha(t,e,n.type),!1)})),!0}}}})}var Va=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),e.prototype.setContext=function(e){this.context=e},e}();function ja(e){var t=document.createElement("span"),n=Ys(e.attrs.info,e.textContent);return t.className="tui-widget",t.appendChild(n),{dom:t}}function $a(e){return"widget"===e.type.name}var _a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(e){return{info:e.textContent.match(/\$\$(widget\d+)/)[1]}}}]}},enumerable:!1,configurable:!0}),n}(Va),Ua=function(){function e(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return e.prototype.createState=function(){return on.create({schema:this.schema,plugins:this.createPlugins()})},e.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,r=e.editorType;n.dom.addEventListener("focus",(function(){return t.emit("focus",r)})),n.dom.addEventListener("blur",(function(){return t.emit("blur",r)}))},e.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(e.prototype,"defaultPlugins",{get:function(){var e,t=this.createInputRules(),n=i(i([],this.keymaps),[Ai(o({"Shift-Enter":ts.Enter},ts)),Ts(),(e=this.placeholder,new an({props:{decorations:function(t){var n=t.doc;if(e.text&&1===n.childCount&&n.firstChild.isTextblock&&0===n.firstChild.content.size){var r=document.createElement("span");return ke()(r,"placeholder"),e.className&&ke()(r,e.className),r.textContent=e.text,_o.create(n,[Vo.widget(1,r)])}return null}}})),Pa(this.eventEmitter),qa(this.context)]);return t?n.concat(t):n},enumerable:!1,configurable:!0}),e.prototype.createInputRules=function(){var e=ea().map((function(e){var t=e.rule;return new ns(t,(function(e,n,r,o){var i=e.schema,s=e.tr,a=e.doc,l=n.input.match(new RegExp(t,"g")),c=a.resolve(r),u=c.parent,d=0;if($a(u)&&(u=c.node(c.depth-1)),u.forEach((function(e){return $a(e)&&(d+=1)})),l.length>d){var p=et(l),h=ra(p,i);return s.replaceWith(o-p.length+1,o,h)}return null}))}));return e.length?rs({rules:e}):null},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.createSchema=function(){return new Y({nodes:this.specs.nodes,marks:this.specs.marks})},e.prototype.createKeymaps=function(e){var t=ia(),n=t.undo,r=t.redo,o=this.specs.keymaps(e),i={"Mod-z":n(),"Shift-Mod-z":r()};return e?o.concat(Ai(i)):o},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map((function(t){return t(e.eventEmitter)}))},e.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout((function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())}))},e.prototype.blur=function(){this.view.dom.blur()},e.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach((function(t){delete e[t]}))},e.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(Os(t,1)).scrollIntoView()),e&&this.focus()},e.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(Os(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},e.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},e.prototype.getScrollTop=function(){return this.view.dom.scrollTop},e.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},e.prototype.setHeight=function(e){be()(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){be()(this.el,{minHeight:e+"px"})},e.prototype.getElement=function(){return this.el},e}(),Wa=Ua,Ja=n(294),Ga=n.n(Ja),Ka=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function Za(e,t,n){return e.focus(),t(n)(e.state,e.dispatch,e)}var Xa=function(){function e(e){this.specs=e}return Object.defineProperty(e.prototype,"nodes",{get:function(){return this.specs.filter((function(e){return"node"===e.type})).reduce((function(e,t){var n,r=t.name,i=t.schema;return o(o({},e),((n={})[r]=i,n))}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"marks",{get:function(){return this.specs.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n,r=t.name,i=t.schema;return o(o({},e),((n={})[r]=i,n))}),{})},enumerable:!1,configurable:!0}),e.prototype.commands=function(e,t){var n=this.specs.filter((function(e){return e.commands})).reduce((function(t,n){var r={},i=n.commands();return Ga()(i)?r[n.name]=function(t){return Za(e,i,t)}:Object.keys(i).forEach((function(t){r[t]=function(n){return Za(e,i[t],n)}})),o(o({},t),r)}),{}),r=ia();return Object.keys(r).forEach((function(t){n[t]=function(n){return Za(e,r[t],n)}})),t&&Object.keys(t).forEach((function(r){n[r]=function(n){return Za(e,t[r],n)}})),n},e.prototype.keymaps=function(e){return this.specs.filter((function(e){return e.keymaps})).map((function(e){return e.keymaps()})).map((function(t){return e||Object.keys(t).forEach((function(e){Ue(Ka,e)||delete t[e]})),Ai(t)}))},e.prototype.setContext=function(e){this.specs.forEach((function(t){t.setContext(e)}))},e}(),Qa=Xa;function Ya(e){var t=e.from,n=e.to;return e instanceof Kt?[t+1,n-1]:[t,n]}function el(e){return e.index(0)+1}function tl(e,t,n){void 0===n&&(n=1);var r=0;return e.forEach((function(e,o){$a(e)&&o+2<t&&(r+=2*n)})),r}function nl(e,t,n){void 0===n&&(n=t);var r=t===n,o=e.resolve(t),i=el(o),s=i,a=o.start(1),l=a;if(!r){var c=e.resolve(n===e.content.size?n-1:n);l=c.start(1),s=el(c),c.pos===e.content.size&&(n=e.content.size-2)}var u=Math.max(t-a+1,1),d=Math.max(n-l+1,1);return[[i,u+tl(e.child(i-1),u,-1)],[s,d+tl(e.child(s-1),d,-1)]]}function rl(e,t){for(var n=[],r=0,o=0;r<t;r+=1){var i=e.child(r);n[r]=o,o+=i.nodeSize}return n}function ol(e,t,n){var r=rl(e,n[0]),o=t[0]-1,i=n[0]-1,s=e.child(o),a=e.child(i),l=r[o],c=r[i];return l+=t[1]+tl(s,t[1]-1),c+=n[1]+tl(a,n[1]-1),[l,Math.min(c,e.content.size)]}function il(e){var t=e.$from,n=e.$to,r=e.from,o=e.to,i=t.doc;return e instanceof Kt&&(t=i.resolve(r+1),n=i.resolve(o-1)),0===t.depth&&(n=t=i.resolve(r-1)),{startFromOffset:t.start(1),endFromOffset:n.start(1),startToOffset:t.end(1),endToOffset:n.end(1),startIndex:t.index(0),endIndex:n.index(0),from:t.pos,to:n.pos}}function sl(e,t){for(var n=1,r=1,o=0,i=0;o<e.childCount;o+=1){var s=e.child(o).nodeSize;if(n=i+1,r=i+s-1,o===t)break;i+=s}return{startOffset:n,endOffset:r}}var al="heading",ll="link",cl="code",ul="meta",dl="delimiter",pl="markedText",hl={strong:2,emph:1,strike:2};function fl(e,t,n,r){return{start:e,end:t,spec:{type:n,attrs:r}}}function ml(e,t,n){var r=e.type,o=$s(t,hl[r]),i=$s(n,-hl[r]);return[fl(o,i,r),fl(t,o,dl),fl(i,n,dl)]}function gl(e,t,n,r){return[fl(e,t,ll),fl(_s(e,n[1]+1),_s(t,r),ll,{desc:!0}),fl(_s(t,r+2),$s(t,-1),ll,{url:!0})]}function vl(e,t,n,r){var i={start:t,end:n,spec:{attrs:{className:r+"-line-background",codeStart:t[0],codeEnd:n[0]}},lineBackground:!0};return"item"!==e.type&&"blockQuote"!==e.type?[o(o({},i),{end:t,spec:{attrs:{className:r+"-line-background start"}}}),o(o({},i),{start:[Math.min(t[0]+1,n[0]),t[1]]})]:null}function yl(e,t){for(var n=[];e;){var r=e.type;"paragraph"!==r&&"codeBlock"!==r||n.push(fl([Is(e),Ps(e)-1],[Rs(e),Bs(e)+1],t)),e=e.next}return n}var bl={heading:function(e,t,n){var r=e.level,o=e.headingType,i=[fl(t,n,al,{level:r})];return"atx"===o?i.push(fl(t,$s(t,r),dl)):i.push(fl(_s(n,0),n,al,{seText:!0})),i},strong:ml,emph:ml,strike:ml,link:function(e,t,n){var r=e.lastChild,o=e.extendedAutolink,i=r?Bs(r)+1:2;return o?[fl(t,n,ll,{desc:!0})]:gl(t,n,t,i)},image:function(e,t,n){var r=e.lastChild,o=r?Bs(r)+1:3,s=$s(t,1);return i([fl(t,s,ul)],gl(t,n,s,o))},code:function(e,t,n){var r=e.tickCount,o=$s(t,r),i=$s(n,-r);return[fl(t,n,cl),fl(t,o,cl,{start:!0}),fl(o,i,cl,{marked:!0}),fl(i,n,cl,{end:!0})]},codeBlock:function(e,t,n,r){var o=e.fenceOffset,i=e.fenceLength,s=e.fenceChar,a=e.info,l=e.infoPadding,c=e.parent,u=o+i,d=[fl(_s(t,1),n,"codeBlock")];s&&d.push(fl(t,$s(t,u),dl)),a&&d.push(fl($s(t,i),$s(t,i+l+a.length),ul)),new RegExp("^(\\s{0,4})("+s+"{"+i+",})").test(r)&&d.push(fl(_s(n,1),n,dl));var p=vl(c,t,n,"code-block");return p?d.concat(p):d},blockQuote:function(e,t,n){var r=e.parent&&"blockQuote"!==e.parent.type?[fl(t,n,"blockQuote")]:[];if(e.firstChild){var o=[];"paragraph"===e.firstChild.type?o=function(e){for(var t=[];e;)t.push(fl([Is(e),Ps(e)],[Rs(e),Bs(e)+1],pl)),e=e.next;return t}(e.firstChild.firstChild):"list"===e.firstChild.type&&(o=yl(e.firstChild,pl)),r=i(i([],r),o)}return r},item:function(e,t){var n=e.listData,r=n.padding,s=n.task,a=function(e){for(var t=0;e.parent.parent&&"item"===e.parent.parent.type;)e=e.parent.parent,t+=1;return["listItem",o(o({},[{odd:!0},{even:!0}][t%2]),{listStyle:!0})]}(e),l=[fl.apply(void 0,i([t,$s(t,r)],a))];return s&&(l.push(fl($s(t,r),$s(t,r+3),"taskDelimiter")),l.push(fl($s(t,r+1),$s(t,r+2),ul))),l.concat(yl(e.firstChild,pl))},customBlock:function(e,t,n){var r=e,o=r.offset,i=r.syntaxLength,s=r.info,a=r.parent,l=o+i,c=[fl(_s(t,1),n,"customBlock")];c.push(fl(t,$s(t,l),dl)),s&&c.push(fl($s(t,l),$s(t,i+s.length),ul)),c.push(fl(_s(n,1),n,dl));var u=vl(a,t,n,"custom-block");return u?c.concat(u):c}},wl={thematicBreak:"thematicBreak",table:"table",tableCell:"tableCell",htmlInline:"html"};function kl(e,t,n,r){var o=e.type;return Ga()(bl[o])?bl[o](e,t,n,r):wl[o]?[fl(t,n,wl[o])]:null}var xl={};function Cl(e){var t=e.schema,n=e.toastMark;return new an({appendTransaction:function(e,r,o){var i=e[0],s=o.tr;if(i.docChanged){var a=[];i.getMeta("editResult").forEach((function(e){var t=e.nodes,r=e.removedNodeRange;if(t.length){a=a.concat(function(e,t){var n=e.doc,r=t[0].sourcepos[0],o=et(t).sourcepos[1],i=[r[0],r[1]],s=[o[0],o[1]+1],a=[];return function(e,t,n){var r=[];xl={};for(var o=t[0]-1;o<n[0];o+=1){var i=e.child(o),s=i.attrs.codeEnd,a=i.attrs.codeStart;if(a&&s&&!Ue(r,a)){r.push(a),s=Math.min(s,e.childCount);for(var l=a-1,c=n[0],u=l;u<c;u+=1)xl[u]=!0}}}(n,r,o),a.push({start:i,end:s}),a}(s,t));for(var o=0,i=t;o<i.length;o++)for(var l=i[o].walker(),c=l.next();c;){var u=c.node;c.entering&&(a=a.concat(Ml(u,n))),c=l.next()}}else if(r)for(var d=s.doc.childCount-1,p=r.line,h=p[0],f=p[1],m=Math.min(h,d),g=Math.min(f,d),v=m;v<=g;v+=1)xl[v]=!0})),function(e,t,n){var r=e.doc,o=t.nodes.paragraph,i=rl(r,r.childCount);n.forEach((function(n){var s=n.start,a=n.end,l=n.spec,c=n.lineBackground,u=Math.min(s[0],r.childCount)-1,d=Math.min(a[0],r.childCount)-1,p=r.child(u),h=r.child(d),f=i[u],m=i[d];(f+=s[1]+tl(p,s[1]-1),m+=a[1]+tl(h,a[1]-1),l)?c?function(e,t,n,r,o){void 0===o&&(o={});for(var i=r.startIndex,s=r.endIndex,a=r.from,l=r.to,c=!1,u=i;u<=s;u+=1)delete xl[u],c=Tl(t,u,o);c&&e.setBlockType(a,l,n,o)}(e,r,o,{from:f,to:m,startIndex:u,endIndex:d},l.attrs):e.addMark(f,m,t.mark(l.type,l.attrs)):e.removeMark(f,m)})),function(e,t,n){Object.keys(xl).forEach((function(r){var o=Number(r),i=Math.min(Number(r)+1,e.doc.childCount-1),s=t[o],a=t[i]-1;o===i&&(a+=2),e.setBlockType(s,a,n)}))}(e,i,o)}(s,t,a)}return s.setMeta("widget",i.getMeta("widget"))}})}function Tl(e,t,n){return Object.keys(n).some((function(r){return n[r]!==e.child(t).attrs[r]}))}function Ml(e,t){var n=t.getLineTexts(),r=[Is(e),Ps(e)],o=[Rs(e),Bs(e)+1],i=kl(e,r,o,n[o[0]-1]);return null!=i?i:[]}var Sl=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function El(e){var t={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},n=!0;return function(e,t,n){for(void 0===n&&(n=!0),e=n?e:e.parent;e&&"document"!==e.type;)t(e),e=e.parent}(e,(function(e){var r=function(e){var t=e.type;return Hs(e)?e.listData.task?"taskList":"ordered"===e.listData.type?"orderedList":"bulletList":-1!==t.indexOf("table")?"table":Ue(Sl,t)?t:null}(e);r&&("bulletList"===r||"orderedList"===r?n&&(t[r]={active:!0},t.indent.disabled=!1,t.outdent.disabled=!1,n=!1):t[r]={active:!0})})),t}function Nl(e){var t=e.toastMark,n=e.eventEmitter;return new an({view:function(){return{update:function(e,r){var o=e.state,i=o.doc,s=o.selection;if(!(r&&r.doc.eq(i)&&r.selection.eq(s))){var a=s.from,l=o.doc.resolve(a).start(),c=a-l;a===l&&(c+=1);var u=[o.doc.content.findIndex(a).index+1,c],d=t.findNodeAtPosition(u),p=El(d);n.emit("changeToolbarState",{cursorPos:u,mdNode:d,toolbarState:p}),n.emit("setFocusedNode",d)}}}}})}var Ol=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),n}(Va),Dl=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),e.prototype.setContext=function(e){this.context=e},e}(),Al=Dl;function Ll(e,t){return Il(e,t-1)}function Il(e,t){return e.child(t).textContent}var Rl=/^\s*> ?/,Pl=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("block-quote")},0]}}},enumerable:!1,configurable:!0}),n.prototype.createBlockQuoteText=function(e,t){return t?e.replace(Rl,"").trim():"> "+e.trim()},n.prototype.extendBlockQuote=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.tr,s=t.schema,a=il(r),l=a.endFromOffset,c=a.endToOffset,u=a.endIndex,d=a.to,p=Il(o,u);if(Rl.test(p)&&d>l&&r.empty){if(!p.replace(Rl,"").trim())i.deleteRange(l,c).split(i.mapping.map(c));else{var h=p.slice(d-l).trim();Ls(i,c,h,Ns(s,e.createBlockQuoteText(h)))}return n(i),!0}return!1}},n.prototype.commands=function(){var e=this;return function(){return function(t,n){var r=t.selection,o=t.doc,i=il(r),s=i.startFromOffset,a=i.endToOffset,l=i.startIndex,c=i.endIndex,u=Rl.test(Il(o,l)),d=As({state:t,startIndex:l,endIndex:c,from:s,createText:function(t){return e.createBlockQuoteText(t,u)}});return n(d.setSelection(Os(d,d.mapping.map(a)))),!0}}},n.prototype.keymaps=function(){var e=this.commands()();return{"alt-q":e,"alt-Q":e,Enter:this.extendBlockQuote()}},n}(Al),Bl=/(^\s*)([-*+] |[\d]+\. )/,Fl=/(^\s*)([\d])+\.( \[[ xX]])? /,Hl=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,zl=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,ql=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,Vl=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,jl=/(^\s*)([-*+])( \[[ xX]]) /;function $l(e){return Fl.test(e)?"ordered":"bullet"}function _l(e){for(var t=0;e&&"document"!==e.type;)"list"===e.type&&(t+=1),e=e.parent;return t}function Ul(e,t,n,r){for(var o=e.getLineTexts().length,i=[],s=t;r?s<o:s>1;){s=r?s+1:s-1;var a=e.findFirstNodeAtLine(s),l=_l(a);if(l===n)i.push({line:s,depth:n,mdNode:a});else if(l<n)break}return i}function Wl(e,t,n,r){void 0===r&&(r=0);var o=Number.MAX_VALUE,i=0,s=t.map((function(t,s){var a=t.line;o=Math.min(a-1,o),i=Math.max(a-1,i);var l=Ll(e,a);return l="bullet"===n?function(e){if(!Bl.test(e))return"* "+e;var t=$l(e);return"bullet"===t&&zl.test(e)?e=e.replace(jl,"$1$2 "):"ordered"===t&&(e=e.replace(Fl,"$1* ")),e}(l):function(e,t){if(!Bl.test(e))return t+". "+e;var n=$l(e);if("bullet"===n||"ordered"===n&&zl.test(e))e=e.replace(zl,"$1"+t+". ");else if("ordered"===n){var r=Hl.exec(e)[3];Number(r)!==t&&(e=e.replace(Fl,"$1"+t+". "))}return e}(l,s+1+r),{text:l,line:a}}));return{changedResults:s,firstIndex:o,lastIndex:i}}function Jl(e,t){var n,r,o,i,s,a,l,c=(r=(n=t).toastMark,o=n.mdNode,i=n.line,s=_l(o),a=Ul(r,i,s,!1).reverse(),l=Ul(r,i,s,!0),a.concat([{line:i,depth:s,mdNode:o}]).concat(l));return Wl(t.doc,c,e)}var Gl={bullet:function(e){return Jl("bullet",e)},ordered:function(e){return Jl("ordered",e)},task:function(e){var t=e.mdNode,n=e.doc,r=e.line,o=Ll(n,r);return t.listData.task?o=o.replace(Vl,"$1$2"):Hs(t)&&(o=o.replace(Bl,"$1$2[ ] ")),{changedResults:[{text:o,line:r}]}}},Kl={bullet:function(e){var t=e.doc,n=e.line;return{changedResults:[{text:"* "+Ll(t,n),line:n}]}},ordered:function(e){for(var t=e.toastMark,n=e.doc,r=e.line,o=e.startLine,i=Ll(n,r),s=1,a=o,l=0,c=o-1;c>0;c-=1){var u=t.findFirstNodeAtLine(c),d=Ll(n,c)&&!!js(u,(function(e){return Hs(e)})),p=Hl.exec(Ll(n,c));if(!p&&!d)break;if(p||!d){var h=p,f=h[1],m=h[3];if(!f){s=Number(m),a=c;break}}else l+=1}return{changedResults:[{text:s+r-a-l+". "+i,line:r}]}},task:function(e){var t=e.doc,n=e.line;return{changedResults:[{text:"* [ ] "+Ll(t,n),line:n}]}}},Zl={bullet:function(e){var t=e.line,n=Ll(e.doc,t),r=ql.exec(n);return{listSyntax:""+r[1]+r[2]}},ordered:function(e){var t=e.toastMark,n=e.line,r=e.mdNode,i=e.doc,s=_l(r),a=Ll(i,n),l=Hl.exec(a),c=l[1],u=l[3],d=l[4],p=Number(u)+1,h=""+c+p+d,f=Ul(t,n,s,!0).filter((function(e){var t=Hl.exec(Ll(i,e.line));return t&&t[1].length===c.length&&!!js(e.mdNode,(function(e){return zs(e)}))}));return o({listSyntax:h},Wl(i,f,"ordered",p))}};function Xl(e,t,n,r,o){for(var i=[],s=Ll(e,n),a=Hl.exec(s);a;){var l=a[1],c=a[4],u=a[5],d=l.length;if(d===o)i.push(Ns(t,""+l+r+c+u)),r+=1,n+=1;else if(d>o){var p=Xl(e,t,n,1,d);n=p.line,i=i.concat(p.nodes)}if(d<o||n>e.childCount)break;s=Ll(e,n),a=Hl.exec(s)}return{nodes:i,line:n}}var Ql=/(^\s{1,4})(.*)/;function Yl(e,t,n){return e<t||Bl.test(n)||Rl.test(n)}function ec(e,t,n){var r=n.$from;0===r.depth&&(r=e.resolve(r.pos-1));var o=r.node(1),i=r.start(1),s=o.content.size;return o.rangeHasMark(0,s,t.marks.table)&&r.pos-i!==s&&r.pos!==i}function tc(e,t){var n=t.from,r=t.to;if("indent"===t.type){n+=4,r+=4*(t.lineLen+1)}else{var o=t.spaceLenList;n-=o[0];for(var i=0;i<o.length;i+=1)r-=o[i]}return Os(e,n,r)}var nc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(e){var t=e.attrs;return t.className?["div",{class:Ca(t.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),n.prototype.reorderList=function(e,t){for(var n=this.context,r=n.view,o=n.toastMark,i=n.schema,s=r.state,a=s.tr,l=s.selection,c=s.doc,u=o.findFirstNodeAtLine(e),d=u;u&&!qs(u)&&"document"!==u.parent.type;)if(zs(u=u.parent)){d=u;break}d&&(e=d.sourcepos[0][0]);var p=Hl.exec(Ll(c,e)),h=p[1],f=p[3],m=h.length,g=Xl(c,i,e,Number(f),m),v=g.line,y=g.nodes;t=Math.max(t,v-1);for(var b=sl(c,e-1).startOffset,w=e-1;w<=t-1;w+=1){var k=c.child(w),x=k.nodeSize,C=k.content,T=a.mapping.map(b),M=T+C.size;a.replaceWith(T,M,y[w-e+1]),b+=x}var S=Os(a,l.from,l.to);r.dispatch(a.setSelection(S))},n.prototype.indent=function(e){var t=this;return void 0===e&&(e=!1),function(){return function(n,r){var o=n.schema,i=n.selection,s=n.doc,a=il(i),l=a.from,c=a.to,u=a.startFromOffset,d=a.startIndex,p=a.endIndex;if(e&&ec(s,o,i))return!1;var h=Il(s,d);if(e&&Yl(l,c,h)||!e&&Bl.test(h)){var f=As({state:n,from:u,startIndex:d,endIndex:p,createText:function(e){return" "+e}}),m={type:"indent",from:l,to:c,lineLen:p-d};r(f.setSelection(tc(f,m))),Hl.test(h)&&t.reorderList(d+1,p+1)}else e&&r(n.tr.insert(c,Ns(o," ")));return!0}}},n.prototype.outdent=function(e){var t=this;return void 0===e&&(e=!1),function(){return function(n,r){var o=n.selection,i=n.doc,s=n.schema,a=il(o),l=a.from,c=a.to,u=a.startFromOffset,d=a.startIndex,p=a.endIndex;if(e&&ec(i,s,o))return!1;var h=Il(i,d);if(e&&Yl(l,c,h)||!e&&Bl.test(h)){var f=[],m=As({state:n,from:u,startIndex:d,endIndex:p,createText:function(e){var t=Ql.exec(e);return f.push(t?t[1].length:0),e.replace(Ql,"$2")}}),g={type:"outdent",from:l,to:c,spaceLenList:f};r(m.setSelection(tc(m,g))),Hl.test(h)&&t.reorderList(d+1,p+1)}else if(e){var v=h.slice(0,c-u),y=v.replace(/\s{1,4}$/,""),b=c-(v.length-y.length);r(n.tr.delete(b,c))}return!0}}},n.prototype.deleteLines=function(){var e=this;return function(t,n){var r=e.context.view,o=il(t.selection),i=o.startFromOffset,s=o.endToOffset;return Zi((function(){return n(t.tr.deleteRange(i,s)),!0}),Bi)(t,n,r)}},n.prototype.moveDown=function(){return function(e,t){var n=e.doc,r=e.tr,o=e.selection,i=e.schema,s=il(o),a=s.startFromOffset,l=s.endToOffset,c=s.endIndex;if(c<n.content.childCount-1){var u=n.child(c+1),d=u.nodeSize,p=u.textContent;return r.delete(l,l+d).split(a).insert(r.mapping.map(a)-2,Ns(i,p)),t(r),!0}return!1}},n.prototype.moveUp=function(){return function(e,t){var n=e.tr,r=e.doc,o=e.selection,i=e.schema,s=il(o),a=s.startFromOffset,l=s.endToOffset,c=s.startIndex;if(c>0){var u=r.child(c-1),d=u.nodeSize,p=u.textContent;return n.delete(a-d,a).split(n.mapping.map(l)).insert(n.mapping.map(l),Ns(i,p)),t(n),!0}return!1}},n.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},n.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},n}(Va),rc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),n}(Va),oc=/^#{1,6}\s/,ic=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(e){var t=e.attrs,n="heading|heading"+t.level;return t.seText&&(n+="|delimiter|setext"),["span",{class:Ca.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),n.prototype.createHeadingText=function(e,t,n){for(var r=t.replace(n,"").trim(),o="";e>0;)o+="#",e-=1;return o+" "+r},n.prototype.commands=function(){var e=this;return function(t){return function(n,r){var o=t.level,i=il(n.selection),s=i.startFromOffset,a=i.endToOffset,l=As({state:n,from:s,startIndex:i.startIndex,endIndex:i.endIndex,createText:function(t){var n=t.match(oc),r=n?n[0]:"";return e.createHeadingText(o,t,r)}});return r(l.setSelection(Os(l,l.mapping.map(a)))),!0}}},n}(Al),sc="```",ac=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("code-block")},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){var n=e.selection,r=e.schema,o=e.tr,i=il(n),s=i.startFromOffset,a=i.endToOffset,l=Ns(r,sc);return o.insert(s,l).split(s+sc.length),o.split(o.mapping.map(a)).insert(o.mapping.map(a),l),t(o.setSelection(Os(o,o.mapping.map(a)-(sc.length+2)))),!0}}},n.prototype.keepIndentation=function(){var e=this;return function(t,n){var r=t.selection,o=t.tr,i=t.doc,s=t.schema,a=e.context.toastMark,l=il(r),c=l.startFromOffset,u=l.endToOffset,d=l.endIndex,p=l.from,h=l.to,f=Il(i,d);if(p===h&&f.trim()){var m=f.match(/^\s+/);if(function(e){return e&&"codeBlock"===e.type}(a.findFirstNodeAtLine(d+1))&&m){var g=m[0],v=f.slice(h-c);return Ls(o,u,v,Ns(s,g+v)),n(o),!0}}return!1}},n.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-p":e,"Shift-Mod-P":e,Enter:this.keepIndentation()}},n}(Al),lc=/\||\s/g;function cc(e,t){for(var n="|",r=0;r<e;r+=1)n+=t?" --- |":" |";return n}var uc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("table")},0]}}},enumerable:!1,configurable:!0}),n.prototype.extendTable=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.tr,s=t.schema;if(!r.empty)return!1;var a=il(r),l=a.endFromOffset,c=a.endToOffset,u=a.endIndex,d=a.to,p=Il(o,u),h=[u+1,d-l+1],f=js(e.context.toastMark.findNodeAtPosition(h),(function(e){return Vs(e)&&("tableDelimRow"===e.parent.type||"tableBody"===e.parent.parent.type)}));if(f){var m=!p.replace(lc,"").trim(),g=cc(f.parent.parent.parent.columns.length);return m?i.deleteRange(l,c).split(i.mapping.map(c)):i.split(c).insert(i.mapping.map(c),Ns(s,g)).setSelection(Os(i,i.mapping.map(c)-2)),n(i),!0}return!1}},n.prototype.moveTableCell=function(e){var t=this;return function(n,r){var o=n.selection,i=n.tr,s=il(o),a=s.endFromOffset,l=[s.endIndex+1,s.to-a],c=js(t.context.toastMark.findNodeAtPosition(l),(function(e){return Vs(e)}));if(c){var u=c.parent,d=function(e){return e?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}(e),p=d.type,h=d.parentType,f=d.childType,m=Bs(c);if(c[p])m=Bs(c[p])-1;else{var g=u[p]||u.parent.type!==h?u[p]:u.parent[p][f];if("next"===p)m+=(g?Bs(g[f]):0)+2;else"prev"===p&&(m=g?-4:0)}return r(i.setSelection(Os(i,a+m))),!0}return!1}},n.prototype.addTable=function(){return function(e){return function(t,n){var r=t.selection,o=t.tr,s=t.schema,a=e,l=a.columnCount,c=a.rowCount,u=il(r).endToOffset,d=function(e){return[cc(e),cc(e,!0)]}(l),p=function(e,t){for(var n=[],r=0;r<t;r+=1)n.push(cc(e));return n}(l,c-1);return i(i([],d),p).forEach((function(e){o.split(o.mapping.map(u)).insert(o.mapping.map(u),Ns(s,e))})),n(o.setSelection(Os(o,u+4))),!0}}},n.prototype.commands=function(){return{addTable:this.addTable()}},n.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},n}(Al),dc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("thematic-break")},0]}}},enumerable:!1,configurable:!0}),n.prototype.hr=function(){return function(){return function(e,t){var n=e.selection,r=e.schema,o=e.tr,i=il(n),s=i.from,a=i.to,l=i.endToOffset,c=Ns(r,"***");return o.split(s).replaceWith(o.mapping.map(s),o.mapping.map(a),c).split(o.mapping.map(a)).setSelection(Os(o,o.mapping.map(l))),t(o),!0}}},n.prototype.commands=function(){return{hr:this.hr()}},n.prototype.keymaps=function(){var e=this.hr()();return{"Mod-l":e,"Mod-L":e}},n}(Al);function pc(e,t){var n=e.type;return t<=e.sourcepos[0][0]&&("codeBlock"===n||"heading"===n||n.match("table"))}var hc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(e){var t=e.attrs,n=t.odd,r=t.even,o="list-item";return t.listStyle&&(o+="|list-item-style"),n&&(o+="|list-item-odd"),r&&(o+="|list-item-even"),["span",{class:Ca.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),n.prototype.extendList=function(){var e=this;return function(t,n){var r=t.selection,o=t.doc,i=t.schema,s=t.tr,a=e.context.toastMark,l=il(r),c=l.to,u=l.startFromOffset,d=l.endFromOffset,p=l.endIndex,h=l.endToOffset,f=Il(o,p);if(!Bl.test(f)||r.from===u||!r.empty)return!1;if(!f.replace(zl,"").trim())s.deleteRange(d,h).split(s.mapping.map(h));else{var m=$l(f),g=a.findFirstNodeAtLine(p+1),v=f.slice(c-d),y={toastMark:a,mdNode:g,doc:o,line:p+1},b=Zl[m](y),w=b.listSyntax,k=b.changedResults;if(null==k?void 0:k.length){s.split(c),k.unshift({text:w+v,line:p+1}),e.changeToListPerLine(s,k,{from:c,startLine:k[0].line,endLine:et(k).line});var x=s.mapping.map(h)-v.length;s.setSelection(Os(s,x))}else{Ls(s,h,v,Ns(i,w+v))}}return n(s),!0}},n.prototype.toList=function(e){var t=this;return function(){return function(n,r){for(var o=n.doc,i=n.tr,s=n.selection,a=t.context.toastMark,l=il(s),c=l.startIndex+1,u=l.endIndex+1,d=l.endToOffset,p=[],h=c;h<=u;h+=1){var f=a.findFirstNodeAtLine(h);if(f&&pc(f,h))break;if(-1===p.indexOf(h)){var m={toastMark:a,mdNode:f,doc:o,line:h,startLine:c},g=(Hs(f)?Gl[e](m):Kl[e](m)).changedResults,v=t.changeToListPerLine(i,g,{from:sl(o,g[0].line-1).startOffset,startLine:g[0].line,endLine:et(g).line,indexDiff:1});d=Math.max(v,d),g&&(p=p.concat(g.map((function(e){return e.line}))))}}return r(i.setSelection(Os(i,i.mapping.map(d)))),!0}}},n.prototype.changeToListPerLine=function(e,t,n){for(var r=n.from,o=n.startLine,i=n.endLine,s=n.indexDiff,a=void 0===s?0:s,l=0,c=function(n){var o=e.doc.child(n),i=o.nodeSize,s=o.content,c=e.mapping.map(r),d=c+s.size,p=t.filter((function(e){return e.line-a===n}))[0];p&&(e.replaceWith(c,d,Ns(u.context.schema,p.text)),l=Math.max(l,r+s.size)),r+=i},u=this,d=o-a;d<=i-a;d+=1)c(d);return l},n.prototype.toggleTask=function(){var e=this;return function(t,n){for(var r=t.selection,o=t.tr,i=t.doc,s=t.schema,a=e.context.toastMark,l=il(r),c=l.startIndex,u=l.endIndex,d=null,p=c;p<=u;p+=1){var h=a.findFirstNodeAtLine(p+1);if(Hs(h)&&h.listData.task){var f=h.listData,m=f.checked,g=f.padding,v=m?" ":"x",y=h.sourcepos[0],b=sl(i,y[0]-1).startOffset;b+=y[1]+g,d=o.replaceWith(b,b+1,s.text(v))}}return!!d&&(n(d),!0)}},n.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},n.prototype.keymaps=function(){var e=this.toList("bullet")(),t=this.toList("ordered")(),n=this.toList("task")(),r=this.toggleTask();return{"Mod-u":e,"Mod-U":e,"Mod-o":t,"Mod-O":t,"alt-t":n,"alt-T":n,"Shift-Ctrl-x":r,"Shift-Ctrl-X":r,Enter:this.extendList()}},n}(Al);function fc(e,t){return function(){return function(n,r){var o=n.tr,i=n.selection,s=Ga()(e)?e:function(t){return e.test(t)},a=t.length,l=o.doc,c=Ya(i),u=c[0],d=c[1],p=Math.max(u-a,1),h=Math.min(d+a,l.content.size-1),f=i.content(),m=f.content.textBetween(0,f.content.size,"\n"),g=l.textBetween(p,u,"\n"),v=l.textBetween(d,h,"\n");if(m=""+g+m+v,g&&v&&s(m))o.delete(h-a,h).delete(p,p+a);else{o.insertText(t,d).insertText(t,u);var y=i.empty?Os(o,u+a):Os(o,u+a,d+a);o.setSelection(y)}return r(o),!0}}}var mc=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,gc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("strong")},0]}}},enumerable:!1,configurable:!0}),n.prototype.bold=function(){return fc(mc,"**")},n.prototype.commands=function(){return{bold:this.bold()}},n.prototype.keymaps=function(){var e=this.bold()();return{"Mod-b":e,"Mod-B":e}},n}(Al),vc=/^(~{2}).*([\s\S]*)\1$/m,yc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("strike")},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return fc(vc,"~~")},n.prototype.keymaps=function(){var e=this.commands()();return{"Mod-s":e,"Mod-S":e}},n}(Al),bc=/^(\*|_).*([\s\S]*)\1$/m,wc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("emph")},0]}}},enumerable:!1,configurable:!0}),n.prototype.italic=function(){return fc(bc,"*")},n.prototype.commands=function(){return{italic:this.italic()}},n.prototype.keymaps=function(){var e=this.italic()();return{"Mod-i":e,"Mod-I":e}},n}(Al),kc=/^(`).*([\s\S]*)\1$/m,xc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(e){var t=e.attrs,n="code";return t.start&&(n+="|delimiter|start"),t.end&&(n+="|delimiter|end"),t.marked&&(n+="|marked-text"),["span",{class:Ca.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return fc(kc,"`")},n.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-c":e,"Shift-Mod-C":e}},n}(Al),Cc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(e){var t=e.attrs,n="link";return t.url&&(n+="|link-url|marked-text"),t.desc&&(n+="|link-desc|marked-text"),["span",{class:Ca.apply(void 0,n.split("|"))},0]}}},enumerable:!1,configurable:!0}),n.prototype.addLinkOrImage=function(e){return function(t){return function(n,r){var o=n.selection,i=n.tr,s=n.schema,a=Ya(o),l=a[0],c=a[1],u=t,d=u.linkText,p=u.altText,h=u.linkUrl,f=u.imageUrl,m=d,g=h,v="";return"image"===e&&(m=p,g=f,v="!"),v+="["+(m=Ze(m))+"]("+g+")",r(i.replaceWith(l,c,Ns(s,v))),!0}}},n.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},n}(Al),Tc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Mc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("delimiter")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Sc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("meta")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Ec=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("marked-text")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Nc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("table-cell")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Oc=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("html")},0]}}},enumerable:!1,configurable:!0}),n}(Al),Dc="$$",Ac=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Ca("custom-block")},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(e){return function(t,n){var r=t.selection,o=t.schema,i=t.tr,s=il(r),a=s.startFromOffset,l=s.endToOffset;if(!(null==e?void 0:e.info))return!1;var c="$$"+e.info,u=Ns(o,c),d=Ns(o,Dc);return i.insert(a,u).split(a+c.length),i.split(i.mapping.map(l)).insert(i.mapping.map(l),d),n(i.setSelection(Os(i,i.mapping.map(l)-(Dc.length+2)))),!0}}},n}(Al),Lc=/x|backspace/i,Ic=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;var Rc="cut",Pc=/\r\n|\n|\r/,Bc=function(e){function n(t,n){var r=e.call(this,t)||this,i=n.toastMark,s=n.useCommandShortcut,a=void 0===s||s,l=n.mdPlugins,c=void 0===l?[]:l;return r.editorType="markdown",r.el.classList.add("md-mode"),r.toastMark=i,r.extraPlugins=c,r.specs=r.createSpecs(),r.schema=r.createSchema(),r.context=r.createContext(),r.keymaps=r.createKeymaps(a),r.view=r.createView(),r.commands=r.createCommands(),r.specs.setContext(o(o({},r.context),{view:r.view})),r.createClipboard(),r.eventEmitter.listen("changePreviewTabWrite",(function(e){return r.toggleActive(!0,e)})),r.eventEmitter.listen("changePreviewTabPreview",(function(){return r.toggleActive(!1)})),r.initEvent(),r}return t(n,e),n.prototype.toggleActive=function(e,t){Sa(this.el,"active",e),e?t||this.focus():this.blur()},n.prototype.createClipboard=function(){var e=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=xa("pseudo-clipboard"),this.clipboard.addEventListener("paste",(function(t){var n=t.clipboardData||window.clipboardData,r=n&&n.items;if(r){var o=vi()(r).some((function(e){return"string"===e.kind&&"text/rtf"===e.type}));if(!o){var i=za(r);i&&(t.preventDefault(),Ha(e.eventEmitter,i,t.type))}}})),this.clipboard.addEventListener("input",(function(t){var n=t.target.value;e.replaceSelection(n),t.preventDefault(),t.target.value=""})),this.el.insertBefore(this.clipboard,this.view.dom)},n.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},n.prototype.createSpecs=function(){return new Qa([new Ol,new nc,new _a,new rc,new ic,new Pl,new ac,new Ac,new uc,new Nc,new dc,new hc,new gc,new yc,new wc,new xc,new Cc,new Mc,new Tc,new Ec,new Sc,new Oc])},n.prototype.createPlugins=function(){return i([Cl(this.context),Nl(this.context),(e=this.context,t=e.schema,n=e.toastMark,new an({props:{handleDOMEvents:{keyup:function(e,r){var o,i=e.state,s=i.doc,a=i.tr,l=i.selection;if(l.empty&&Lc.test(r.key)){var c=il(l),u=c.startIndex,d=c.startFromOffset,p=[u+1,c.from-d+1],h=js(n.findNodeAtPosition(p),(function(e){var t;return"paragraph"===e.type&&"item"===(null===(t=e.parent)||void 0===t?void 0:t.type)}));if(null===(o=null==h?void 0:h.firstChild)||void 0===o?void 0:o.literal){var f=h.firstChild,m=f.literal.match(Ic);if(m){var g=f.sourcepos[0],v=m[1],y=m[2],b=m[3],w=v.length+b.length,k=sl(s,g[0]-1).startOffset,x=g[1]+k;if(y){var C=w?w+1:0;a.replaceWith(x,C+x,t.text(y)),e.dispatch(a)}else w||(a.insertText(" ",x),e.dispatch(a))}}}return!1}}}}))],this.createPluginProps()).concat(this.defaultPlugins);var e,t,n},n.prototype.createView=function(){var e=this;return new ui(this.el,{state:this.createState(),dispatchTransaction:function(t){e.updateMarkdown(t);var n=e.view.state.applyTransaction(t).state;e.view.updateState(n),e.emitChangeEvent(t)},handleKeyDown:function(t,n){return(n.metaKey||n.ctrlKey)&&"V"===n.key.toUpperCase()&&e.clipboard.focus(),e.eventEmitter.emit("keydown",e.editorType,n),!1},handleDOMEvents:{copy:function(t,n){return e.captureCopy(n)},cut:function(t,n){return e.captureCopy(n,Rc)},scroll:function(){return e.eventEmitter.emit("scroll","editor"),!0},keyup:function(t,n){return e.eventEmitter.emit("keyup",e.editorType,n),!1}},nodeViews:{widget:ja}})},n.prototype.createCommands=function(){return this.specs.commands(this.view)},n.prototype.captureCopy=function(e,t){e.preventDefault();var n=this.view.state,r=n.selection,o=n.tr;if(r.empty)return!0;var i=this.getChanged(r.content());return e.clipboardData?e.clipboardData.setData("text/plain",i):window.clipboardData.setData("Text",i),t===Rc&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",Rc)),!0},n.prototype.updateMarkdown=function(e){var t=this;e.docChanged&&e.steps.forEach((function(n,r){if(n.slice&&!(n instanceof wt)){var o=e.docs[r],i=[n.from,n.to],s=nl(o,i[0],i[1]),a=s[0],l=s[1],c=t.getChanged(n.slice);a[0]===l[0]&&a[1]===l[1]&&""===c&&(c="\n");var u=t.toastMark.editMarkdown(a,l,c);t.eventEmitter.emit("updatePreview",u),e.setMeta("editResult",u).scrollIntoView()}}))},n.prototype.getChanged=function(e){var t="",n=e.content.size;return e.content.nodesBetween(0,n,(function(e,r){e.isText?t+=e.text.slice(Math.max(0,r)-r,n-r):e.isBlock&&r>0&&(t+="\n")})),t},n.prototype.setSelection=function(e,t){void 0===t&&(t=e);var n=this.view.state.tr,r=ol(n.doc,e,t),o=r[0],i=r[1];this.view.dispatch(n.setSelection(Os(n,o,i)).scrollIntoView())},n.prototype.replaceSelection=function(e,t,n){var r,o=this.view.state,i=o.tr,s=o.schema,a=o.doc,l=e.split(Pc).map((function(e){return Es(s,ra(e,s))})),c=new v(d.from(l),1,1);if(this.focus(),t&&n){var u=ol(a,t,n),p=u[0],h=u[1];r=i.replaceRange(p,h,c)}else r=i.replaceSelection(c);this.view.dispatch(r.scrollIntoView())},n.prototype.deleteSelection=function(e,t){var n,r=this.view.state,o=r.tr,i=r.doc;if(e&&t){var s=ol(i,e,t),a=s[0],l=s[1];n=o.deleteRange(a,l)}else n=o.deleteSelection();this.view.dispatch(n.scrollIntoView())},n.prototype.getSelectedText=function(e,t){var n=this.view.state,r=n.doc,o=n.selection,i=o.from,s=o.to;if(e&&t){var a=ol(r,e,t);i=a[0],s=a[1]}return r.textBetween(i,s,"\n")},n.prototype.getSelection=function(){var e=this.view.state.selection,t=e.from,n=e.to;return nl(this.view.state.tr.doc,t,n)},n.prototype.setMarkdown=function(e,t){void 0===t&&(t=!0);var n=e.split(Pc),r=this.view.state,o=r.tr,i=r.doc,s=r.schema,a=n.map((function(e){return Es(s,ra(e,s))}));this.view.dispatch(o.replaceWith(0,i.content.size,a)),t&&this.moveCursorToEnd(!0)},n.prototype.addWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=r.doc,s=r.selection,a=n?ol(i,n,n)[0]:s.to;this.view.dispatch(o.setMeta("widget",{pos:a,node:e,style:t}))},n.prototype.replaceWithWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=r.schema,s=ol(r.doc,e,t),a=ra(n,i);this.view.dispatch(o.replaceWith(s[0],s[1],a))},n.prototype.getRangeInfoOfNode=function(e){var t=this.view.state,n=t.doc,r=t.selection,o=e||nl(n,r.from)[0],i=this.toastMark.findNodeAtPosition(o);return"text"===i.type&&"paragraph"!==i.parent.type&&(i=i.parent),i.sourcepos[1][1]+=1,{range:i.sourcepos,type:i.type}},n.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map((function(e){return Xs(e)})).join("\n")},n.prototype.getToastMark=function(){return this.toastMark},n}(Wa),Fc=Bc,Hc=n(349),zc=n.n(Hc),qc=n(348),Vc=n.n(qc),jc=function(e,t){return jc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},jc(e,t)};function $c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}jc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _c=function(){return _c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_c.apply(this,arguments)};function Uc(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var Wc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},Jc={};function Gc(e,t,n){var r,o,i,s,a,l="";for("string"!=typeof t&&(n=t,t=Gc.defaultChars),void 0===n&&(n=!0),a=function(e){var t,n,r=Jc[e];if(r)return r;for(r=Jc[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,o=e.length;r<o;r++)if(i=e.charCodeAt(r),n&&37===i&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))l+=e.slice(r,r+3),r+=2;else if(i<128)l+=a[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<o&&(s=e.charCodeAt(r+1))>=56320&&s<=57343){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[r]);return l}Gc.defaultChars=";/?:@&=+$,-_.!~*'()#",Gc.componentChars="-_.!~*'()";var Kc=Gc,Zc={},Xc={},Qc={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"",dd:"",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:"",emsp14:"",emsp:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"",Escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",exponentiale:"",ExponentialE:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",fscr:"𝒻",Fscr:"",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",Im:"",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",lscr:"𝓁",Lscr:"",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"",middot:"·",minusb:"⊟",minus:"",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",popf:"𝕡",Popf:"",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"",Prime:"″",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"",rationals:"",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"",realine:"",realpart:"",reals:"",Re:"",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",rscr:"𝓇",Rscr:"",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",ThinSpace:"",thinsp:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"",Vee:"",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},Yc={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},eu={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},tu={},nu=Wc&&Wc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tu,"__esModule",{value:!0});var ru=nu({0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}),ou=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};tu.default=function(e){return e>=55296&&e<=57343||e>1114111?"<22>":(e in ru.default&&(e=ru.default[e]),ou(e))};var iu=Wc&&Wc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.decodeHTML=Xc.decodeHTMLStrict=Xc.decodeXML=void 0;var su=iu(Qc),au=iu(Yc),lu=iu(eu),cu=iu(tu),uu=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function du(e){var t=hu(e);return function(e){return String(e).replace(uu,t)}}Xc.decodeXML=du(lu.default),Xc.decodeHTMLStrict=du(su.default);var pu=function(e,t){return e<t?1:-1};function hu(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?cu.default(parseInt(t.substr(3),16)):cu.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}Xc.decodeHTML=function(){for(var e=Object.keys(au.default).sort(pu),t=Object.keys(su.default).sort(pu),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var o=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),i=hu(su.default);function s(e){return";"!==e.substr(-1)&&(e+=";"),i(e)}return function(e){return String(e).replace(o,s)}}();var fu={},mu=Wc&&Wc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fu,"__esModule",{value:!0}),fu.escapeUTF8=fu.escape=fu.encodeNonAsciiHTML=fu.encodeHTML=fu.encodeXML=void 0;var gu=xu(mu(eu).default),vu=Cu(gu);fu.encodeXML=Nu(gu);var yu,bu,wu=xu(mu(Qc).default),ku=Cu(wu);function xu(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function Cu(e){for(var t=[],n=[],r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];1===i.length?t.push("\\"+i):n.push(i)}t.sort();for(var s=0;s<t.length-1;s++){for(var a=s;a<t.length-1&&t[a].charCodeAt(1)+1===t[a+1].charCodeAt(1);)a+=1;var l=1+a-s;l<3||t.splice(s,l,t[s]+"-"+t[a])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}fu.encodeHTML=(yu=wu,bu=ku,function(e){return e.replace(bu,(function(e){return yu[e]})).replace(Tu,Su)}),fu.encodeNonAsciiHTML=Nu(wu);var Tu=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,Mu=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function Su(e){return"&#x"+(e.length>1?Mu(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var Eu=new RegExp(vu.source+"|"+Tu.source,"g");function Nu(e){return function(t){return t.replace(Eu,(function(t){return e[t]||Su(t)}))}}fu.escape=function(e){return e.replace(Eu,Su)},fu.escapeUTF8=function(e){return e.replace(vu,Su)},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Xc,n=fu;e.decode=function(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTML)(e)},e.decodeStrict=function(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTMLStrict)(e)},e.encode=function(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)};var r=fu;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return r.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return r.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return r.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return r.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return r.encodeHTML}});var o=Xc;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return o.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return o.decodeXML}})}(Zc);var Ou="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",Du=/[\\&]/,Au="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",Lu=new RegExp("\\\\"+Au+"|"+Ou,"gi"),Iu=new RegExp('[&<>"]',"g"),Ru=function(e){return 92===e.charCodeAt(0)?e.charAt(1):Zc.decodeHTML(e)};function Pu(e){return Du.test(e)?e.replace(Lu,Ru):e}function Bu(e){try{return Kc(e)}catch(t){return e}}function Fu(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return e}}function Hu(e){return Iu.test(e)?e.replace(Iu,Fu):e}function zu(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n.join("")}function qu(e){return!e||!/[^ \t]+/.test(e)}var Vu=function(){function e(e){this.current=e,this.root=e,this.entering=!0}return e.prototype.next=function(){var e=this.current,t=this.entering;if(null===e)return null;var n=ju(e);return t&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:null===e.next?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:t,node:e}},e.prototype.resumeAt=function(e,t){this.current=e,this.entering=!0===t},e}();function ju(e){switch(e.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var $u=1,_u={};function Uu(e){delete _u[e]}var Wu=function(){function e(e,t){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,this.id="document"===e?-1:$u++,this.type=e,this.sourcepos=t,_u[this.id]=this}return e.prototype.isContainer=function(){return ju(this)},e.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},e.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},e.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},e.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},e.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},e.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},e.prototype.walker=function(){return new Vu(this)},e}(),Ju=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.open=!0,r.lineOffsets=null,r.stringContent=null,r.lastLineBlank=!1,r.lastLineChecked=!1,r.type=t,r}return $c(t,e),t}(Wu),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.listData=null,t}return $c(t,e),t}(Ju),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return $c(t,e),t}(Ju),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isFenced=!1,t.fenceChar=null,t.fenceLength=0,t.fenceOffset=-1,t.info=null,t.infoPadding=0,t}return $c(t,e),t}(Ju),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.columns=[],t}return $c(t,e),t}(Ju),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startIdx=0,t.endIdx=0,t.paddingLeft=0,t.paddingRight=0,t.ignored=!1,t}return $c(t,e),t}(Ju),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return $c(t,e),t}(Ju),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syntaxLength=0,t.offset=-1,t.info="",t}return $c(t,e),t}(Ju),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return $c(t,e),t}(Ju),nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destination=null,t.title=null,t.extendedAutolink=!1,t}return $c(t,e),t}(Wu),rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.tickCount=0,t}return $c(t,e),t}(Wu),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.info="",t}return $c(t,e),t}(Wu);function id(e,t){switch(e){case"heading":return new Ku(e,t);case"list":case"item":return new Gu(e,t);case"link":case"image":return new nd(e,t);case"codeBlock":return new Zu(e,t);case"htmlBlock":return new td(e,t);case"table":return new Xu(e,t);case"tableCell":return new Qu(e,t);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Ju(e,t);case"code":return new rd(e,t);case"refDef":return new Yu(e,t);case"customBlock":return new ed(e,t);case"customInline":return new od(e,t);default:return new Wu(e,t)}}function sd(e){return"codeBlock"===e.type}function ad(e){return"list"===e.type}function ld(e){return"refDef"===e.type}function cd(e){return"customBlock"===e.type}function ud(e,t){var n=id("text",t);return n.literal=e,n}var dd,pd="[A-Za-z][A-Za-z0-9-]*",hd="<"+pd+"(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>",fd="</"+pd+"\\s*[>]",md=new RegExp("^(?:<[A-Za-z][A-Za-z0-9-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*[>]|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|[<][?].*?[?][>]|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)","i");if(String.fromCodePoint)dd=function(e){try{return String.fromCodePoint(e)}catch(e){if(e instanceof RangeError)return String.fromCharCode(65533);throw e}};else{var gd=String.fromCharCode,vd=Math.floor;dd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,o=16384,i=[],s=-1,a=e.length;if(!a)return"";for(var l="";++s<a;){var c=Number(e[s]);if(!isFinite(c)||c<0||c>1114111||vd(c)!==c)return String.fromCharCode(65533);c<=65535?i.push(c):(n=55296+((c-=65536)>>10),r=c%1024+56320,i.push(n,r)),(s+1===a||i.length>o)&&(l+=gd.apply(void 0,i),i.length=0)}return l}}var yd=dd;function bd(e){var t=/\)+$/.exec(e);if(t){for(var n=0,r=0,o=e;r<o.length;r++){var i=o[r];"("===i?n<0?n=1:n+=1:")"===i&&(n-=1)}if(n<0){var s=Math.min(-n,t[0].length);return e.substring(0,e.length-s)}}return e}function wd(e){return e.replace(/&[A-Za-z0-9]+;$/,"")}function kd(e){return Uc(Uc([],function(e){for(var t,n=new RegExp("(www|https?://).(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+[^<\\s]*[^<?!.,:*_?~\\s]","g"),r=[];t=n.exec(e);){var o=wd(bd(t[0])),i="www"===t[1]?"http://":"";r.push({text:o,range:[t.index,t.index+o.length-1],url:""+i+o})}return r}(e)),function(e){for(var t,n=new RegExp("[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+","g"),r=[];t=n.exec(e);){var o=t[0];/[_-]+$/.test(o)||r.push({text:o,range:[t.index,t.index+o.length-1],url:"mailto:"+o})}return r}(e)).sort((function(e,t){return e.range[0]-t.range[0]}))}function xd(e){return e[e.length-1]}function Cd(e){return e.slice(1,e.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Td(e,t){Object.keys(e).forEach((function(n){t(n,e[n])}))}function Md(e){return!Object.keys(e).length}var Sd=126,Ed=39,Nd=34,Od=36,Dd="\\\\"+Au,Ad=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9D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d=/^\s/,Ud=/ *$/,Wd=/^ */,Jd=/^ *(?:\n|$)/,Gd=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,Kd=/^[^\n`\[\]\\!<&*_'"~$]+/m,Zd=function(){function e(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return e.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],r=this.lineStartNum+this.lineIdx,o=[r,e+n];return"number"==typeof t?[o,[r,t+n]]:o},e.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},e.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},e.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},e.prototype.spnl=function(){return this.match(jd),!0},e.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(Fd);if(null===n)return!1;for(var r,o=this.pos;null!==(r=this.match(Bd));)if(r===n){var i=this.subject.slice(o,this.pos-n.length),s=this.sourcepos(t,this.pos),a=i.split("\n");if(a.length>1){var l=xd(a);this.lineIdx+=a.length-1,this.linePosOffset=-(this.pos-l.length-n.length),s[1]=this.sourcepos(this.pos),i=a.join(" ")}var c=id("code",s);return i.length>0&&null!==i.match(/[^ ]/)&&" "==i[0]&&" "==i[i.length-1]?c.literal=i.slice(1,i.length-1):c.literal=i,c.tickCount=n.length,e.appendChild(c),!0}return this.pos=o,e.appendChild(ud(n,this.sourcepos(t,this.pos-1))),!0},e.prototype.parseBackslash=function(e){var t,n=this.subject;this.pos+=1;var r=this.pos;return 10===this.peek()?(this.pos+=1,t=id("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(t),this.nextLine()):Rd.test(n.charAt(this.pos))?(e.appendChild(ud(n.charAt(this.pos),this.sourcepos(r,this.pos))),this.pos+=1):e.appendChild(ud("\\",this.sourcepos(r,r))),!0},e.prototype.parseAutolink=function(e){var t,n,r,o=this.pos+1;return(t=this.match(qd))?(n=t.slice(1,t.length-1),(r=id("link",this.sourcepos(o,this.pos))).destination=Bu("mailto:"+n),r.title="",r.appendChild(ud(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(r),!0):!!(t=this.match(Vd))&&(n=t.slice(1,t.length-1),(r=id("link",this.sourcepos(o,this.pos))).destination=Bu(n),r.title="",r.appendChild(ud(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(r),!0)},e.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(md);if(null===n)return!1;var r=id("htmlInline",this.sourcepos(t,this.pos));return r.literal=n,e.appendChild(r),!0},e.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===Ed||e===Nd)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(0===t||t<2&&(e===Sd||e===Od))return this.pos=n,null;var r,o=0===n?"\n":this.subject.charAt(n-1),i=this.peek();r=-1===i?"\n":yd(i);var s,a,l=_d.test(r),c=Ad.test(r),u=_d.test(o),d=Ad.test(o),p=!l&&(!c||u||d),h=!u&&(!d||l||c);return 95===e?(s=p&&(!h||d),a=h&&(!p||c)):e===Ed||e===Nd?(s=p&&!h,a=h):e===Od?(s=!l,a=!u):(s=p,a=h),this.pos=n,{numdelims:t,canOpen:s,canClose:a}},e.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var r=n.numdelims,o=this.pos+1;this.pos+=r;var i=ud(e===Ed?"":e===Nd?"“":this.subject.slice(o-1,this.pos),this.sourcepos(o,this.pos));return t.appendChild(i),(n.canOpen||n.canClose)&&(this.options.smart||e!==Ed&&e!==Nd)&&(this.delimiters={cc:e,numdelims:r,origdelims:r,node:i,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},e.prototype.removeDelimiter=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},e.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},e.prototype.processEmphasis=function(e){var t,n,r,o,i,s,a,l=!1,c=((t={})[95]=[e,e,e],t[42]=[e,e,e],t[39]=[e],t[34]=[e],t[126]=[e],t[36]=[e],t);for(r=this.delimiters;null!==r&&r.previous!==e;)r=r.previous;for(;null!==r;){var u=r.cc,d=95===u||42===u;if(r.canClose){for(n=r.previous,a=!1;null!==n&&n!==e&&n!==c[u][d?r.origdelims%3:0];){if(l=d&&(r.canOpen||n.canClose)&&r.origdelims%3!=0&&(n.origdelims+r.origdelims)%3==0,n.cc===r.cc&&n.canOpen&&!l){a=!0;break}n=n.previous}if(o=r,d||u===Sd||u===Od)if(a){if(n){var p=r.numdelims>=2&&n.numdelims>=2?2:1,h=d?0:1;i=n.node,s=r.node;var f=d?1===p?"emph":"strong":"strike";u===Od&&(f="customInline");var m=id(f),g=i.sourcepos[1],v=s.sourcepos[0];m.sourcepos=[[g[0],g[1]-p+1],[v[0],v[1]+p-1]],i.sourcepos[1][1]-=p,s.sourcepos[0][1]+=p,i.literal=i.literal.slice(p),s.literal=s.literal.slice(p),n.numdelims-=p,r.numdelims-=p;for(var y=i.next,b=void 0;y&&y!==s;)b=y.next,y.unlink(),m.appendChild(y),y=b;if(u===Od){var w=m.firstChild,k=w.literal||"",x=k.split(/\s/)[0];m.info=x,k.length<=x.length?w.unlink():(w.sourcepos[0][1]+=x.length,w.literal=k.replace(x+" ",""))}if(i.insertAfter(m),this.removeDelimitersBetween(n,r),n.numdelims<=h&&(0===n.numdelims&&i.unlink(),this.removeDelimiter(n)),r.numdelims<=h){0===r.numdelims&&s.unlink();var C=r.next;this.removeDelimiter(r),r=C}}}else r=r.next;else u===Ed?(r.node.literal="",a&&(n.node.literal=""),r=r.next):u===Nd&&(r.node.literal="”",a&&(n.node.literal="“"),r=r.next);a||(c[u][d?o.origdelims%3:0]=o.previous,o.canOpen||this.removeDelimiter(o))}else r=r.next}for(;null!==this.delimiters&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},e.prototype.parseLinkTitle=function(){var e=this.match(Ld);return null===e?null:Pu(e.substr(1,e.length-2))},e.prototype.parseLinkDestination=function(){var e=this.match(Id);if(null===e){if(60===this.peek())return null;for(var t=this.pos,n=0,r=void 0;-1!==(r=this.peek());)if(92===r&&Rd.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(40===r)this.pos+=1,n+=1;else if(41===r){if(n<1)break;this.pos+=1,n-=1}else{if(null!==$d.exec(yd(r)))break;this.pos+=1}return this.pos===t&&41!==r||0!==n?null:Bu(Pu(e=this.subject.substr(t,this.pos-t)))}return Bu(Pu(e.substr(1,e.length-2)))},e.prototype.parseLinkLabel=function(){var e=this.match(Gd);return null===e||e.length>1001?0:e.length},e.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=ud("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},e.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,91===this.peek()){this.pos+=1;var n=ud("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{n=ud("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},e.prototype.parseCloseBracket=function(e){var t=null,n=null,r=!1;this.pos+=1;var o=this.pos,i=this.brackets;if(null===i)return e.appendChild(ud("]",this.sourcepos(o,o))),!0;if(!i.active)return e.appendChild(ud("]",this.sourcepos(o,o))),this.removeBracket(),!0;var s=i.image,a=this.pos;40===this.peek()&&(this.pos++,this.spnl()&&null!==(t=this.parseLinkDestination())&&this.spnl()&&($d.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle()),1)&&this.spnl()&&41===this.peek()?(this.pos+=1,r=!0):this.pos=a);var l="";if(!r){var c=this.pos,u=this.parseLinkLabel();if(u>2?l=this.subject.slice(c,c+u):i.bracketAfter||(l=this.subject.slice(i.index,o)),0===u&&(this.pos=a),l){l=Cd(l);var d=this.refMap[l];d&&(t=d.destination,n=d.title,r=!0)}}if(r){var p=id(s?"image":"link");p.destination=t,p.title=n||"",p.sourcepos=[i.startpos,this.sourcepos(this.pos)];for(var h=i.node.next,f=void 0;h;)f=h.next,h.unlink(),p.appendChild(h),h=f;if(e.appendChild(p),this.processEmphasis(i.previousDelimiter),this.removeBracket(),i.node.unlink(),!s)for(i=this.brackets;null!==i;)i.image||(i.active=!1),i=i.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0}return this.removeBracket(),this.pos=o,e.appendChild(ud("]",this.sourcepos(o,o))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:l}),!0},e.prototype.addBracket=function(e,t,n){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},e.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},e.prototype.parseEntity=function(e){var t,n=this.pos+1;return!!(t=this.match(Pd))&&(e.appendChild(ud(Zc.decodeHTML(t),this.sourcepos(n,this.pos))),!0)},e.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(Kd)){if(this.options.smart){var r=t.replace(Hd,"…").replace(zd,(function(e){var t=0,n=0;return e.length%3==0?n=e.length/3:e.length%2==0?t=e.length/2:e.length%3==2?(t=1,n=(e.length-2)/3):(t=2,n=(e.length-4)/3),zu("—",n)+zu("",t)}));e.appendChild(ud(r,this.sourcepos(n,this.pos)))}else{var o=ud(t,this.sourcepos(n,this.pos));e.appendChild(o)}return!0}return!1},e.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&"text"===t.type&&" "===t.literal[t.literal.length-1]){var n=" "===t.literal[t.literal.length-2],r=t.literal.length;t.literal=t.literal.replace(Ud,"");var o=r-t.literal.length;t.sourcepos[1][1]-=o,e.appendChild(id(n?"linebreak":"softbreak",this.sourcepos(this.pos-o,this.pos)))}else e.appendChild(id("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(Wd),!0},e.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,r=this.pos,o=this.parseLinkLabel();if(0===o)return 0;var i=this.subject.substr(0,o);if(58!==this.peek())return this.pos=r,0;this.pos++,this.spnl();var s=this.parseLinkDestination();if(null===s)return this.pos=r,0;var a=this.pos;this.spnl(),this.pos!==a&&(n=this.parseLinkTitle()),null===n&&(n="",this.pos=a);var l=!0;if(null===this.match(Jd)&&(""===n?l=!1:(n="",this.pos=a,l=null!==this.match(Jd))),!l)return this.pos=r,0;var c=Cd(i);if(""===c)return this.pos=r,0;var u=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=u[1][0]+1;var d=id("refDef",u);return d.title=n,d.dest=s,d.label=c,e.insertBefore(d),t[c]?this.refDefCandidateMap[d.id]=d:t[c]=$p(d),this.pos-r},e.prototype.mergeTextNodes=function(e){for(var t,n=[];t=e.next();){var r=t.entering,o=t.node;if(r&&"text"===o.type)n.push(o);else if(1===n.length)n=[];else if(n.length>1){var i=n[0],s=n[n.length-1];i.sourcepos&&s.sourcepos&&(i.sourcepos[1]=s.sourcepos[1]),i.next=s.next,i.next&&(i.next.prev=i);for(var a=1;a<n.length;a+=1)i.literal+=n[a].literal,n[a].unlink();n=[]}}},e.prototype.getReferenceDefSourcepos=function(e){for(var t=e.stringContent.split(/\n|\r\n/),n=!1,r=0,o={line:0,ch:0},i=0;i<t.length;i+=1){var s=t[i];if($d.test(s))break;if(/\:/.test(s)&&0===r){if(n)break;var a=s.indexOf(":")===s.length-1?i+1:i;o={line:a,ch:t[a].length},n=!0}var l=s.match(/'|"/g);if(l&&(r+=l.length),2===r){o={line:i,ch:s.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+o.line,o.ch]]},e.prototype.parseInline=function(e){var t,n=!1,r=this.peek();if(-1===r)return!1;switch(r){case 10:n=this.parseNewline(e);break;case 92:n=this.parseBackslash(e);break;case 96:n=this.parseBackticks(e);break;case 42:case 95:case Sd:case Od:n=this.handleDelim(r,e);break;case Ed:case Nd:n=!!(null===(t=this.options)||void 0===t?void 0:t.smart)&&this.handleDelim(r,e);break;case 91:n=this.parseOpenBracket(e);break;case 33:n=this.parseBang(e);break;case 93:n=this.parseCloseBracket(e);break;case 60:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case 38:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e)}return n||(this.pos+=1,e.appendChild(ud(yd(r),this.sourcepos(this.pos,this.pos+1)))),!0},e.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],function(e){return"heading"===e.type}(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var t=this.options,n=t.extendedAutolinks,r=t.customParser;if(n&&function(e,t){var n;"boolean"==typeof t&&(t=kd);for(var r=function(){var e=n.entering,r=n.node;if(e&&"text"===r.type&&"link"!==r.parent.type){var o=r.literal,i=t(o);if(!i||!i.length)return"continue";for(var s=0,a=r.sourcepos[0],l=a[0],c=a[1],u=function(e,t){return[[l,c+e],[l,c+t]]},d=[],p=0,h=i;p<h.length;p++){var f=h[p],m=f.range,g=f.url,v=f.text;m[0]>s&&d.push(ud(o.substring(s,m[0]),u(s,m[0]-1)));var y=id("link",u.apply(void 0,m));y.appendChild(ud(v,u.apply(void 0,m))),y.destination=g,y.extendedAutolink=!0,d.push(y),s=m[1]+1}s<o.length&&d.push(ud(o.substring(s),u(s,o.length-1)));for(var b=0,w=d;b<w.length;b++){var k=w[b];r.insertBefore(k)}r.unlink()}};n=e.next();)r()}(e.walker(),n),r&&e.firstChild)for(var o,i=e.firstChild.walker();o=i.next();){var s=o.node,a=o.entering;r[s.type]&&r[s.type](s,{entering:a,options:this.options})}},e}(),Xd=/^\[([ \txX])\][ \t]+/;var Qd=/[^ \t\f\v\r\n]/,Yd=/^(?:`{3,}|~{3,})(?= *$)/;function ep(e){for(var t=e;t;){if(t.lastLineBlank)return!0;var n=t.type;if(t.lastLineChecked||"list"!==n&&"item"!==n){t.lastLineChecked=!0;break}t.lastLineChecked=!0,t=t.lastChild}return!1}function tp(e,t){return t<e.length?e.charCodeAt(t):-1}function np(e){return!Qd.test(e)}function rp(e){return 32===e||9===e}var op=/^\$\$$/,ip={continue:function(e,t){var n=e.currentLine,r=n.match(op);if(r)return e.lastLineLength=r[0].length,e.finalize(t,e.lineNumber),2;for(var o=t.offset;o>0&&rp(tp(n,e.offset));)e.advanceOffset(1,!0),o--;return 0},finalize:function(e,t){if(null!==t.stringContent){var n=t.stringContent,r=n.indexOf("\n"),o=n.slice(0,r),i=n.slice(r+1),s=o.match(/^(\s*)(.*)/);t.info=Pu(s[2].trim()),t.literal=i,t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},sp={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},ap={continue:function(){return 0},finalize:function(e,t){for(var n=t.firstChild;n;){if(ep(n)&&n.next){t.listData.tight=!1;break}for(var r=n.firstChild;r;){if(ep(r)&&(n.next||r.next)){t.listData.tight=!1;break}r=r.next}n=n.next}},canContain:function(e){return"item"===e},acceptsLines:!1},lp={continue:function(e,t){if(e.blank){if(null===t.firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t.listData.markerOffset+t.listData.padding))return 1;e.advanceOffset(t.listData.markerOffset+t.listData.padding,!0)}return 0},finalize:function(e,t){if(t.firstChild&&"paragraph"===t.firstChild.type){var n=t.firstChild,r=n.stringContent.match(Xd);if(r){var o=r[0].length;n.stringContent=n.stringContent.substring(o-1),n.sourcepos[0][1]+=o,n.lineOffsets[0]+=o,t.listData.task=!0,t.listData.checked=/[xX]/.test(r[1])}}},canContain:function(e){return"item"!==e},acceptsLines:!1},cp={continue:function(e,t){var n=e.currentLine,r=e.indent;if(t.isFenced){var o=r<=3&&n.charAt(e.nextNonspace)===t.fenceChar&&n.slice(e.nextNonspace).match(Yd);if(o&&o[0].length>=t.fenceLength)return e.lastLineLength=e.offset+r+o[0].length,e.finalize(t,e.lineNumber),2;for(var i=t.fenceOffset;i>0&&rp(tp(n,e.offset));)e.advanceOffset(1,!0),i--}else if(r>=4)e.advanceOffset(4,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){var n;if(null!==t.stringContent){if(t.isFenced){var r=t.stringContent,o=r.indexOf("\n"),i=r.slice(0,o),s=r.slice(o+1),a=i.match(/^(\s*)(.*)/);t.infoPadding=a[1].length,t.info=Pu(a[2].trim()),t.literal=s}else t.literal=null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,"\n");t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},up={continue:function(e){return e.blank?1:0},finalize:function(e,t){if(null!==t.stringContent){for(var n,r=!1;91===tp(t.stringContent,0)&&(n=e.inlineParser.parseReference(t,e.refMap));)t.stringContent=t.stringContent.slice(n),r=!0;r&&np(t.stringContent)&&t.unlink()}},canContain:function(){return!1},acceptsLines:!0},dp={document:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},list:ap,blockQuote:{continue:function(e){var t=e.currentLine;return e.indented||62!==tp(t,e.nextNonspace)?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),rp(tp(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},item:lp,heading:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},thematicBreak:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},codeBlock:cp,htmlBlock:{continue:function(e,t){return!e.blank||6!==t.htmlBlockType&&7!==t.htmlBlockType?0:1},finalize:function(e,t){var n;t.literal=(null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,""))||null,t.stringContent=null},canContain:function(){return!1},acceptsLines:!0},paragraph:up,table:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableHead"===e||"tableBody"===e},acceptsLines:!1},tableBody:{continue:function(){return 0},finalize:function(){},canContain:function(e){return"tableRow"===e},acceptsLines:!1},tableHead:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableRow"===e||"tableDelimRow"===e},acceptsLines:!1},tableRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableCell"===e},acceptsLines:!1},tableCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},tableDelimRow:{continue:function(){return 1},finalize:function(){},canContain:function(e){return"tableDelimCell"===e},acceptsLines:!1},tableDelimCell:{continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},refDef:sp,customBlock:ip,frontMatter:sp};function pp(e){for(var t=0,n=0,r=[],o=0;o<e.length;o+=1)if("|"===e[o]&&"\\"!==e[o-1]){var i=e.substring(t,o);0===t&&qu(i)?n=o+1:r.push(i),t=o+1}t<e.length&&(qu(i=e.substring(t,e.length))||r.push(i));return[n,r]}function hp(e,t,n,r){for(var o=[],i=0,s=t;i<s.length;i++){var a=s[i],l=a.match(/^[ \t]+/),c=l?l[0].length:0,u=void 0,d=void 0;if(c===a.length)c=0,u=0,d="";else{var p=a.match(/[ \t]+$/);u=p?p[0].length:0,d=a.slice(c,a.length-u)}var h=r+c,f=id(e,[[n,r],[n,r+a.length-1]]);f.stringContent=d.replace(/\\\|/g,"|"),f.startIdx=o.length,f.endIdx=o.length,f.lineOffsets=[h-1],f.paddingLeft=c,f.paddingRight=u,o.push(f),r+=a.length+1}return o}function fp(e){var t=null,n=e.stringContent,r=n[0];return":"===n[n.length-1]?t=":"===r?"center":"right":":"===r&&(t="left"),{align:t}}var mp=/^(\$\$)(\s*[a-zA-Z])+/,gp=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,vp=/^`{3,}(?!.*`)|^~{3,}/,yp=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+hd+"|"+fd+")\\s*$","i")],bp=/^(?:=+|-+)[ \t]*$/,wp=/^#{1,6}(?:[ \t]+|$)/,kp=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,xp=/^[*+-]/,Cp=/^(\d{1,9})([.)])/;function Tp(e,t){return e.options.disallowDeepHeading&&("blockQuote"===t.type||"item"===t.type)}var Mp=[function(e){return e.indented||62!==tp(e.currentLine,e.nextNonspace)?0:(e.advanceNextNonspace(),e.advanceOffset(1,!1),rp(tp(e.currentLine,e.offset))&&e.advanceOffset(1,!0),e.closeUnmatchedBlocks(),e.addChild("blockQuote",e.nextNonspace),1)},function(e,t){var n;if(!e.indented&&!Tp(e,t)&&(n=e.currentLine.slice(e.nextNonspace).match(wp))){e.advanceNextNonspace(),e.advanceOffset(n[0].length,!1),e.closeUnmatchedBlocks();var r=e.addChild("heading",e.nextNonspace);return r.level=n[0].trim().length,r.headingType="atx",r.stringContent=e.currentLine.slice(e.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),e.advanceOffset(e.currentLine.length-e.offset),2}return 0},function(e){var t;if(!e.indented&&(t=e.currentLine.slice(e.nextNonspace).match(vp))){var n=t[0].length;e.closeUnmatchedBlocks();var r=e.addChild("codeBlock",e.nextNonspace);return r.isFenced=!0,r.fenceLength=n,r.fenceChar=t[0][0],r.fenceOffset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0},function(e,t){if(!e.indented&&60===tp(e.currentLine,e.nextNonspace)){var n=e.currentLine.slice(e.nextNonspace),r=e.options.disallowedHtmlBlockTags,o=void 0;for(o=1;o<=7;o++){var i=n.match(yp[o]);if(i){if(7===o){if("paragraph"===t.type)return 0;if(r.length>0)if(new RegExp("</?(?:"+r.join("|")+")","i").test(i[0]))return 0}return e.closeUnmatchedBlocks(),e.addChild("htmlBlock",e.offset).htmlBlockType=o,2}}}return 0},function(e,t){var n;if(null!==t.stringContent&&!e.indented&&"paragraph"===t.type&&!Tp(e,t.parent)&&(n=e.currentLine.slice(e.nextNonspace).match(bp))){e.closeUnmatchedBlocks();for(var r=void 0;91===tp(t.stringContent,0)&&(r=e.inlineParser.parseReference(t,e.refMap));)t.stringContent=t.stringContent.slice(r);if(t.stringContent.length>0){var o=id("heading",t.sourcepos);return o.level="="===n[0][0]?1:2,o.headingType="setext",o.stringContent=t.stringContent,t.insertAfter(o),t.unlink(),e.tip=o,e.advanceOffset(e.currentLine.length-e.offset,!1),2}return 0}return 0},function(e){return!e.indented&&kp.test(e.currentLine.slice(e.nextNonspace))?(e.closeUnmatchedBlocks(),e.addChild("thematicBreak",e.nextNonspace),e.advanceOffset(e.currentLine.length-e.offset,!1),2):0},function(e,t){var n,r,o,i=t;return e.indented&&"list"!==t.type||!(n=function(e,t){var n,r,o=e.currentLine.slice(e.nextNonspace),i={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:e.indent,task:!1,checked:!1};if(e.indent>=4)return null;if(n=o.match(xp))i.type="bullet",i.bulletChar=n[0][0];else{if(!(n=o.match(Cp))||"paragraph"===t.type&&"1"!==n[1])return null;i.type="ordered",i.start=parseInt(n[1],10),i.delimiter=n[2]}if(-1!==(r=tp(e.currentLine,e.nextNonspace+n[0].length))&&9!==r&&32!==r)return null;if("paragraph"===t.type&&!e.currentLine.slice(e.nextNonspace+n[0].length).match(Qd))return null;e.advanceNextNonspace(),e.advanceOffset(n[0].length,!0);var s=e.column,a=e.offset;do{e.advanceOffset(1,!0),r=tp(e.currentLine,e.offset)}while(e.column-s<5&&rp(r));var l=-1===tp(e.currentLine,e.offset),c=e.column-s;return c>=5||c<1||l?(i.padding=n[0].length+1,e.column=s,e.offset=a,rp(tp(e.currentLine,e.offset))&&e.advanceOffset(1,!0)):i.padding=n[0].length+c,i}(e,i))?0:(e.closeUnmatchedBlocks(),"list"===e.tip.type&&(r=i.listData,o=n,r.type===o.type&&r.delimiter===o.delimiter&&r.bulletChar===o.bulletChar)||((i=e.addChild("list",e.nextNonspace)).listData=n),(i=e.addChild("item",e.nextNonspace)).listData=n,1)},function(e){return e.indented&&"paragraph"!==e.tip.type&&!e.blank?(e.advanceOffset(4,!0),e.closeUnmatchedBlocks(),e.addChild("codeBlock",e.offset),2):0},function(e,t){var n=t.stringContent;if("paragraph"===t.type&&!e.indented&&!e.blank){var r=n.length-1,o=n.lastIndexOf("\n",r-1)+1,i=n.slice(o,r),s=e.currentLine.slice(e.nextNonspace),a=pp(i),l=a[0],c=a[1],u=pp(s),d=u[0],p=u[1],h=/^[ \t]*:?-+:?[ \t]*$/;if(!c.length||!p.length||p.some((function(e){return!h.test(e)}))||1===p.length&&0!==s.indexOf("|"))return 0;var f=t.lineOffsets,m=e.lineNumber-1,g=xd(f)+1,v=id("table",[[m,g],[e.lineNumber,e.offset]]);if(v.columns=p.map((function(){return{align:null}})),t.insertAfter(v),1===f.length)t.unlink();else{t.stringContent=n.slice(0,o);var y=o-(n.lastIndexOf("\n",o-2)+1)-1;e.lastLineLength=f[f.length-2]+y,e.finalize(t,m-1)}e.advanceOffset(e.currentLine.length-e.offset,!1);var b=id("tableHead",[[m,g],[e.lineNumber,e.offset]]);v.appendChild(b);var w=id("tableRow",[[m,g],[m,g+i.length-1]]),k=id("tableDelimRow",[[e.lineNumber,e.nextNonspace+1],[e.lineNumber,e.offset]]);b.appendChild(w),b.appendChild(k),hp("tableCell",c,m,g+l).forEach((function(e){w.appendChild(e)}));var x=hp("tableDelimCell",p,e.lineNumber,e.nextNonspace+1+d);return x.forEach((function(e){k.appendChild(e)})),v.columns=x.map(fp),e.tip=v,2}return 0},function(e,t){if("table"!==t.type&&"tableBody"!==t.type||!e.blank&&-1===e.currentLine.indexOf("|"))return 0;if(e.advanceOffset(e.currentLine.length-e.offset,!1),e.blank){var n=t;return"tableBody"===t.type&&(n=t.parent,e.finalize(t,e.lineNumber-1)),e.finalize(n,e.lineNumber-1),0}var r=t;"table"===t.type&&((r=e.addChild("tableBody",e.nextNonspace)).stringContent=null);var o=id("tableRow",[[e.lineNumber,e.nextNonspace+1],[e.lineNumber,e.currentLine.length]]);r.appendChild(o);var i=r.parent,s=pp(e.currentLine.slice(e.nextNonspace)),a=s[0];return hp("tableCell",s[1],e.lineNumber,e.nextNonspace+1+a).forEach((function(e,t){t>=i.columns.length&&(e.ignored=!0),o.appendChild(e)})),2},function(e){var t;if(!e.indented&&!gp.test(e.currentLine)&&(t=e.currentLine.match(mp))){var n=t[1].length;e.closeUnmatchedBlocks();var r=e.addChild("customBlock",e.nextNonspace);return r.syntaxLength=n,r.offset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0}],Sp=/^(-{3}|\+{3}|;{3})$/,Ep=function(e,t){var n=e.currentLine,r=e.lineNumber,o=e.indented;return 1===r&&!o&&"document"===t.type&&Sp.test(n)?(e.closeUnmatchedBlocks(),e.addChild("frontMatter",e.nextNonspace).stringContent=n,e.advanceNextNonspace(),e.advanceOffset(n.length,!1),2):0},Np={continue:function(e,t){var n=e.currentLine,r=n.match(Sp);return"frontMatter"===t.type&&r?(t.stringContent+=n,e.lastLineLength=r[0].length,e.finalize(t,e.lineNumber),2):0},finalize:function(e,t){null!==t.stringContent&&(t.literal=t.stringContent,t.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},Op=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],Dp=/^[#`~*+_=<>0-9-;$]/,Ap=/\r\n|\n|\r/;function Lp(){return id("document",[[1,1],[0,0]])}var Ip={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},Rp=function(){function e(e){this.options=_c(_c({},Ip),e),this.doc=Lp(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(dp.frontMatter=Np,Mp.unshift(Ep)),this.inlineParser=new Zd(this.options)}return e.prototype.advanceOffset=function(e,t){void 0===t&&(t=!1);for(var n,r,o,i=this.currentLine;e>0&&(o=i[this.offset]);)"\t"===o?(n=4-this.column%4,t?(this.partiallyConsumedTab=n>e,r=n>e?e:n,this.column+=r,this.offset+=this.partiallyConsumedTab?0:1,e-=r):(this.partiallyConsumedTab=!1,this.column+=n,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},e.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},e.prototype.findNextNonspace=function(){for(var e,t=this.currentLine,n=this.offset,r=this.column;""!==(e=t.charAt(n));)if(" "===e)n++,r++;else{if("\t"!==e)break;n++,r+=4-r%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=n,this.nextNonspaceColumn=r,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=4},e.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=zu(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+"\n"},e.prototype.addChild=function(e,t){for(;!dp[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,r=id(e,[[this.lineNumber,n],[0,0]]);return r.stringContent="",this.tip.appendChild(r),this.tip=r,r},e.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},e.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],dp[e.type].finalize(this,e),this.tip=n},e.prototype.processInlines=function(e){var t,n=this.options.customParser,r=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=r.next();){var o=t.node,i=t.entering,s=o.type;n&&n[s]&&n[s](o,{entering:i,options:this.options}),i||"paragraph"!==s&&"heading"!==s&&("tableCell"!==s||o.ignored)||this.inlineParser.parse(o)}},e.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"<22>")),this.currentLine=e;for(var n,r=!0;(n=t.lastChild)&&n.open;){switch(t=n,this.findNextNonspace(),dp[t.type].continue(this,t)){case 0:break;case 1:r=!1;break;case 2:return void(this.lastLineLength=e.length);default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!r){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var o="paragraph"!==t.type&&dp[t.type].acceptsLines,i=Mp.length;!o;){if(this.findNextNonspace(),"table"!==t.type&&"tableBody"!==t.type&&"paragraph"!==t.type&&!this.indented&&!Dp.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<i;){var a=Mp[s](this,t);if(1===a){t=this.tip;break}if(2===a){t=this.tip,o=!0;break}s++}if(s===i){this.advanceNextNonspace();break}}if(this.allClosed||this.blank||"paragraph"!==this.tip.type){this.closeUnmatchedBlocks(),this.blank&&t.lastChild&&(t.lastChild.lastLineBlank=!0);for(var l=t.type,c=this.blank&&!("blockQuote"===l||sd(t)&&t.isFenced||"item"===l&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),u=t;u;)u.lastLineBlank=c,u=u.parent;dp[l].acceptsLines?(this.addLine(),function(e){return"htmlBlock"===e.type}(t)&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&Op[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offset<e.length&&!this.blank&&(t=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}else this.addLine();this.lastLineLength=e.length},e.prototype.parse=function(e,t){this.doc=Lp(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(Ap),r=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),10===e.charCodeAt(e.length-1)&&(r-=1);for(var o=0;o<r;o++)this.incorporateLine(n[o]);for(;this.tip;)this.finalize(this.tip,r);return this.processInlines(this.doc),this.doc},e.prototype.partialParseStart=function(e,t){this.doc=Lp(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=t.length,r=0;r<n;r++)this.incorporateLine(t[r]);return this.doc},e.prototype.partialParseExtends=function(e){for(var t=0;t<e.length;t++)this.incorporateLine(e[t])},e.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},e.prototype.setRefMaps=function(e,t,n){this.refMap=e,this.refLinkCandidateMap=t,this.refDefCandidateMap=n},e.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){var t;t=e,Object.keys(t).forEach((function(e){delete t[e]}))}))},e}();function Pp(e,t){return e[0]<t[0]?1:e[0]>t[0]?-1:e[1]<t[1]?1:e[1]>t[1]?-1:0}function Bp(e,t){var n=e[0];return 1===Pp(e[1],t)?1:-1===Pp(n,t)?-1:0}function Fp(e,t){for(var n=0,r=t;n<r.length;n++){var o=r[n];e.insertBefore(o)}}function Hp(e,t){var n=e[0];return e[1][0]<t?1:n[0]>t?-1:0}function zp(e,t){for(var n=e.firstChild;n;){var r=Hp(n.sourcepos,t);if(0===r)return n;if(-1===r)return n.prev||n;n=n.next}return e.lastChild}function qp(e){return function(e){return _u[e]}(e)||null}function Vp(e,t,n){if(void 0===n&&(n=null),t)for(var r=t.walker();t&&t!==n;){e(t);var o=r.next();if(!o)break;t=o.node}}var jp=/\r\n|\n|\r/;function $p(e){return{id:e.id,title:e.title,sourcepos:e.sourcepos,unlinked:!1,destination:e.dest}}var _p=function(){function e(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(null==t?void 0:t.referenceDefinition),this.parser=new Rp(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(jp),this.root=this.parser.parse(e,this.lineTexts)}return e.prototype.updateLineTexts=function(e,t,n){var r,o=e[0],i=e[1],s=t[0],a=t[1],l=n.split(jp),c=l.length,u=this.lineTexts[o-1],d=this.lineTexts[s-1];l[0]=u.slice(0,i-1)+l[0],l[c-1]=l[c-1]+d.slice(a-1);var p=s-o+1;return(r=this.lineTexts).splice.apply(r,Uc([o-1,p],l)),c-p},e.prototype.updateRootNodeState=function(){if(1===this.lineTexts.length&&""===this.lineTexts[0])return this.root.lastLineBlank=!0,void(this.root.sourcepos=[[1,1],[1,0]]);this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;""===e[t];)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},e.prototype.replaceRangeNodes=function(e,t,n){e?(Fp(e,n),function(e,t){if(e.parent===t.parent&&e!==t){for(var n=e.next;n&&n!==t;){for(var r=n.next,o=0,i=["parent","prev","next"];o<i.length;o++){var s=i[o];n[s]&&(Uu(n[s].id),n[s]=null)}n=r}e.next=t.next,t.next?t.next.prev=e:e.parent.lastChild=e}}(e,t),[e.id,t.id].forEach((function(e){return Uu(e)})),e.unlink()):t?(Fp(t,n),Uu(t.id),t.unlink()):function(e,t){for(var n=t.length-1;n>=0;n-=1)e.prependChild(t[n])}(this.root,n)},e.prototype.getNodeRange=function(e,t){var n=zp(this.root,e[0]),r=zp(this.root,t[0]);return r&&r.next&&t[0]+1===r.next.sourcepos[0][0]&&(r=r.next),[n,r]},e.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach((function(e){e(t)}))},e.prototype.extendEndLine=function(e){for(;""===this.lineTexts[e];)e+=1;return e},e.prototype.parseRange=function(e,t,n,r){var o;e&&e.prev&&(ad(e.prev)&&function(e){var t=e.match(/^[ \t]+/);if(t&&(t[0].length>=2||/\t/.test(t[0])))return!0;var n=t?e.slice(t.length):e;return xp.test(n)||Cp.test(n)}(this.lineTexts[n-1])||function(e){return"table"===e.type}(e.prev)&&(!np(o=this.lineTexts[n-1])&&-1!==o.indexOf("|")))&&(n=(e=e.prev).sourcepos[0][0]);for(var i=this.lineTexts.slice(n-1,r),s=this.parser.partialParseStart(n,i),a=t?t.next:this.root.firstChild,l=s.lastChild,c=l&&sd(l)&&l.open,u=l&&cd(l)&&l.open,d=l&&ad(l);(c||u)&&a||d&&a&&("list"===a.type||a.sourcepos[0][1]>=2);){var p=this.extendEndLine(a.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(r,p)),e||(e=t),t=a,r=p,a=a.next}return this.parser.partialParseFinish(),{newNodes:function(e){for(var t=[],n=e.firstChild;n;)t.push(n),n=n.next;return t}(s),extStartNode:e,extEndNode:t}},e.prototype.getRemovedNodeRange=function(e,t){return!e||e&&ld(e)||t&&ld(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},e.prototype.markDeletedRefMap=function(e,t){var n=this;if(!Md(this.refMap)){var r=function(e){if(ld(e)){var t=n.refMap[e.label];t&&e.id===t.id&&(t.unlinked=!0)}};e&&Vp(r,e.parent,t),t&&Vp(r,t)}},e.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!Md(this.refMap)){var n=function(e){if(ld(e)){var n=e.label,r=t.refMap[n];r&&!r.unlinked||(t.refMap[n]=$p(e))}};e.forEach((function(e){Vp(n,e)}))}},e.prototype.replaceWithRefDefCandidate=function(){var e=this;Md(this.refDefCandidateMap)||Td(this.refDefCandidateMap,(function(t,n){var r=n.label,o=n.sourcepos,i=e.refMap[r];(!i||i.unlinked||i.sourcepos[0][0]>o[0][0])&&(e.refMap[r]=$p(n))}))},e.prototype.getRangeWithRefDef=function(e,t,n,r,o){if(this.referenceDefinition&&!Md(this.refMap)){var i=zp(this.root,e-1),s=zp(this.root,t+1);i&&ld(i)&&i!==n&&i!==r&&(e=(n=i).sourcepos[0][0]),s&&ld(s)&&s!==n&&s!==r&&(r=s,t=this.extendEndLine(r.sourcepos[1][0]+o))}return[n,r,e,t]},e.prototype.parse=function(e,t,n){void 0===n&&(n=0);var r=this.getNodeRange(e,t),o=r[0],i=r[1],s=o?Math.min(o.sourcepos[0][0],e[0]):e[0],a=this.extendEndLine((i?Math.max(i.sourcepos[1][0],t[0]):t[0])+n),l=this.parseRange.apply(this,this.getRangeWithRefDef(s,a,o,i,n)),c=l.newNodes,u=l.extStartNode,d=l.extEndNode,p=this.getRemovedNodeRange(u,d),h=d?d.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(u,d),this.replaceRangeNodes(u,d,c),this.replaceWithNewRefDefState(c)):this.replaceRangeNodes(u,d,c),{nodes:c,removedNodeRange:p,nextNode:h}},e.prototype.parseRefLink=function(){var e=this,t=[];return Md(this.refMap)||Td(this.refMap,(function(n,r){r.unlinked&&delete e.refMap[n],Td(e.refLinkCandidateMap,(function(r,o){var i=o.node;o.refLabel===n&&t.push(e.parse(i.sourcepos[0],i.sourcepos[1]))}))})),t},e.prototype.removeUnlinkedCandidate=function(){Md(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){Td(e,(function(t){(function(e){var t=qp(e);if(!t)return!0;for(;t&&"document"!==t.type;){if(!t.parent&&!t.prev&&!t.next)return!0;t=t.parent}return!1})(t)&&delete e[t]}))}))},e.prototype.editMarkdown=function(e,t,n){var r=this.updateLineTexts(e,t,n),o=this.parse(e,t,r),i=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=_c({},e);return t.forEach((function(e){delete r[e]})),r}(o,"nextNode");!function(e,t){if(e&&e.parent&&0!==t){var n,r=e.parent.walker();for(r.resumeAt(e,!0);n=r.next();){var o=n.node;n.entering&&(o.sourcepos[0][0]+=t,o.sourcepos[1][0]+=t)}}}(o.nextNode,r),this.updateRootNodeState();var s=[i];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),s=s.concat(this.parseRefLink())),this.trigger("change",s),s},e.prototype.getLineTexts=function(){return this.lineTexts},e.prototype.getRootNode=function(){return this.root},e.prototype.findNodeAtPosition=function(e){var t=function(e,t){for(var n=e,r=null;n;){var o=Bp(n.sourcepos,t);if(0===o){if(!n.firstChild)return n;r=n,n=n.firstChild}else{if(-1===o)return r;if(!n.next)return r;n=n.next}}return n}(this.root,e);return t&&t!==this.root?t:null},e.prototype.findFirstNodeAtLine=function(e){return function(e,t){for(var n=e.firstChild,r=null;n;){var o=Hp(n.sourcepos,t);if(0===o){if(n.sourcepos[0][0]===t||!n.firstChild)return n;r=n,n=n.firstChild}else{if(-1===o)break;r=n,n=n.next}}return r?function(e){for(;e.parent&&"document"!==e.parent.type&&e.parent.sourcepos[0][0]===e.sourcepos[0][0];)e=e.parent;return e}(function(e){for(;e.lastChild;)e=e.lastChild;return e}(r)):null}(this.root,e)},e.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},e.prototype.off=function(e,t){var n=this.eventHandlerMap[e],r=n.indexOf(t);n.splice(r,1)},e.prototype.findNodeById=function(e){return qp(e)},e.prototype.removeAllNode=function(){_u={}},e}(),Up=new RegExp("<(/?(?:"+["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"].join("|")+")[^>]*>)","ig");function Wp(e){return Up.test(e)?e.replace(Up,(function(e,t){return"&lt;"+t})):e}var Jp={heading:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"h"+e.level,outerNewLine:!0}},text:function(e){return{type:"text",content:e.literal}},softbreak:function(e,t){return{type:"html",content:t.options.softbreak}},linebreak:function(){return{type:"html",content:"<br />\n"}},emph:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"em"}},strong:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"strong"}},paragraph:function(e,t){var n,r=t.entering,o=null===(n=e.parent)||void 0===n?void 0:n.parent;return o&&"list"===o.type&&o.listData.tight?null:{type:r?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(e,t){var n=t.entering,r=e.listData,o=r.type,i=r.start,s="bullet"===o?"ul":"ol",a={};return"ol"===s&&null!==i&&1!==i&&(a.start=i.toString()),{type:n?"openTag":"closeTag",tagName:s,attributes:a,outerNewLine:!0}},item:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(e,t){return{type:"html",content:t.options.tagFilter?Wp(e.literal):e.literal}},htmlBlock:function(e,t){var n=t.options,r=n.tagFilter?Wp(e.literal):e.literal;return n.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:r},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:r,outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code"},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e.info,n=t?t.split(/\s+/):[],r=[];return n.length>0&&n[0].length>0&&r.push("language-"+Hu(n[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:r},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(e,t){if(t.entering){var n=e,r=n.title,o=n.destination;return{type:"openTag",tagName:"a",attributes:_c({href:Hu(o)},r&&{title:Hu(r)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var n=t.getChildrenText,r=t.skipChildren,o=e,i=o.title,s=o.destination;return r(),{type:"openTag",tagName:"img",selfClose:!0,attributes:_c({src:Hu(s),alt:n(e)},i&&{title:Hu(i)})}},customBlock:function(e,t,n){var r=e.info.trim().toLowerCase(),o=n[r];if(o)try{return o(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+r+" block node was parsed in markdown renderer: "+e)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(e){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(e,t,n){var r=e,o=r.info,i=r.firstChild,s=o.trim().toLowerCase(),a=n[s],l=t.entering;if(a)try{return a(e,t)}catch(e){console.warn("[@toast-ui/editor] - The error occurred when "+s+" inline node was parsed in markdown renderer: "+e)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+o+(i?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Gp={strike:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var n=t.entering,r=e.listData,o=r.checked,i=r.task;if(n){var s={type:"openTag",tagName:"li",outerNewLine:!0};return i?[s,{type:"openTag",tagName:"input",selfClose:!0,attributes:_c(_c({},o&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:s}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(e,t){return{type:t.entering?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(e,t){if(t.entering)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(e.lastChild)for(var r=e.parent.parent.columns.length,o=e.lastChild.endIdx+1;o<r;o+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(e,t){var n=t.entering;if(e.ignored)return{type:"text",content:""};var r=e.parent.parent,o="tableHead"===r.type?"th":"td",i=r.parent.columns[e.startIdx],s=(null==i?void 0:i.align)?{align:i.align}:null;return n?_c({type:"openTag",tagName:o,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:o,outerNewLine:!0}}},Kp={softbreak:"\n",gfm:!1,tagFilter:!1,nodeId:!1};function Zp(e){for(var t=[],n=e.walker(),r=null;r=n.next();){var o=r.node;"text"===o.type&&t.push(o.literal)}return t.join("")}var Xp=function(){function e(e){this.buffer=[],this.options=_c(_c({},Kp),e),this.convertors=this.createConvertors(),delete this.options.convertors}return e.prototype.createConvertors=function(){var e=_c({},Jp);if(this.options.gfm&&(e=_c(_c({},e),Gp)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),r=_c(_c({},Jp),Gp);n.forEach((function(n){var o=e[n],i=t[n],s=-1===Object.keys(r).indexOf(n)?n.toLowerCase():n;e[s]=o?function(e,t,n){return t.origin=function(){return o(e,t,n)},i(e,t)}:i}))}return e},e.prototype.getConvertors=function(){return this.convertors},e.prototype.getOptions=function(){return this.options},e.prototype.render=function(e){var t=this;this.buffer=[];for(var n=e.walker(),r=null,o=function(){var e=r.node,o=r.entering,s=i.convertors[e.type];if(!s)return"continue";var a=!1,l={entering:o,leaf:!ju(e),options:i.options,getChildrenText:Zp,skipChildren:function(){a=!0}},c=cd(e)||function(e){return"customInline"===e.type}(e)?s(e,l,i.convertors):s(e,l);c&&((Array.isArray(c)?c:[c]).forEach((function(n,r){"openTag"===n.type&&t.options.nodeId&&0===r&&(n.attributes||(n.attributes={}),n.attributes["data-nodeid"]=String(e.id)),t.renderHTMLNode(n)})),a&&(n.resumeAt(e,!1),n.next()))},i=this;r=n.next();)o();return this.addNewLine(),this.buffer.join("")},e.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e)}},e.prototype.generateOpenTagString=function(e){var t=this,n=e.tagName,r=e.classNames,o=e.attributes;this.buffer.push("<"+n),r&&r.length>0&&this.buffer.push(' class="'+r.join(" ")+'"'),o&&Object.keys(o).forEach((function(e){var n=o[e];t.buffer.push(" "+e+'="'+n+'"')})),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},e.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push("</"+t+">")},e.prototype.addNewLine=function(){this.buffer.length&&"\n"!==xd(xd(this.buffer))&&this.buffer.push("\n")},e.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},e.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},e.prototype.renderTextNode=function(e){this.buffer.push(Hu(e.content))},e.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},e.prototype.renderElementNode=function(e){"openTag"===e.type?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},e}(),Qp=n(368),Yp=n.n(Qp),eh=["iframe","embed"],th=[];function nh(e){Ue(eh,e)&&th.push(e.toLowerCase())}function rh(e,t){return Yp().sanitize(e,o({ADD_TAGS:th,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},t))}function oh(e,t){return e.literal.replace(new RegExp("(<\\s*"+t+"[^>]*>)|(</"+t+"\\s*[>])","ig"),"").trim()}function ih(e){var t=(e=e.match(ga)[0]).match(new RegExp(ha,"g"));return t?t.reduce((function(e,t){var n=t.trim().split("="),r=n[0],o=n.slice(1);return o.length&&(e[r]=o.join("=").replace(/'|"/g,"").trim()),e}),{}):{}}function sh(e){return vi()(e.attributes).reduce((function(e,t){return e[t.nodeName]=t.nodeValue,e}),{})}function ah(e,t,n,r){var o=r.getToDOMNode(t)(e),i=n(o.outerHTML),s=document.createElement("div");return s.innerHTML=i,{dom:o=s.firstChild,htmlAttrs:sh(o)}}var lh={htmlBlock:function(e,t,n){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:sh(e),childrenHTML:e.innerHTML}}}],toDOM:function(r){var o=ah(r,e,t,n),s=o.dom,a=o.htmlAttrs;return a.class=a.class?a.class+" html-block":"html-block",i([e,a],vi()(s.childNodes))}}},htmlInline:function(e,t,n){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:sh(e)}}}],toDOM:function(r){var o=ah(r,e,t,n).htmlAttrs;return[e,o,0]}}}};var ch=/^\s*<\s*\//,uh={paragraph:function(e,t){var n=t.entering,r=t.origin;return t.options.nodeId?{type:n?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:r()},softbreak:function(e){return{type:"html",content:e.prev&&"htmlInline"===e.prev.type&&/<br ?\/?>/.test(e.prev.literal)?"\n":"<br>\n"}},item:function(e,t){if(t.entering){var n={},r=[];return e.listData.task&&(n["data-task"]="",r.push("task-list-item"),e.listData.checked&&(r.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:r,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code",attributes:{"data-backticks":String(e.tickCount)}},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e,n=t.fenceLength,r=t.info,o=r?r.split(/\s+/):[],i=[],s={};if(n>3&&(s["data-backticks"]=n),o.length>0&&o[0].length>0){var a=o[0];i.push("lang-"+a),s["data-language"]=a}return[{type:"openTag",tagName:"pre",classNames:i},{type:"openTag",tagName:"code",attributes:s},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var n=t.origin,r=t.entering,o=t.skipChildren,i=e.info;return-1!==i.indexOf("widget")&&r?(o(),[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:Ys(i,oa(e)).outerHTML},{type:"closeTag",tagName:"span"}]):n()}};function dh(e,t){var n=o({},uh);return e&&(n.link=function(t,n){var r=n.entering,i=(0,n.origin)();return r&&(i.attributes=o(o({},i.attributes),e)),i}),t&&Object.keys(t).forEach((function(e){var r=n[e],i=t[e];r&&Ga()(i)?n[e]=function(e,t){var n=o({},t);return n.origin=function(){return r(e,t)},i(e,n)}:Ue(["htmlBlock","htmlInline"],e)&&!Ga()(i)?n[e]=function(e,t){var n=e.literal.match(ga);if(n){var r=n[0],s=n[1],a=n[3],l=(s||a).toLowerCase(),c=i[l],u=oh(e,l);if(c){var d=o({},e);return d.attrs=ih(r),d.childrenHTML=u,d.type=l,t.entering=!ch.test(e.literal),c(d,t)}}return t.origin()}:n[e]=i})),n}var ph=["list","item","blockQuote"],hh=["UL","OL","BLOCKQUOTE"];function fh(e,t){var n,r=e.child(t);return!r.childCount||1===r.childCount&&!(null===(n=r.firstChild.text)||void 0===n?void 0:n.trim())}function mh(e,t,n){var r=Is(t)-1,o=Rs(t)-1,i=n[r].getBoundingClientRect(),s=n[o].offsetTop-n[r].offsetTop+n[o].clientHeight;return{height:s<=0?n[r].clientHeight:s+gh(e,n,Math.min(o+1,e.childCount-1)),rect:i}}function gh(e,t,n){for(var r=e.childCount-1,o=0;n<=r&&fh(e,n);)o+=t[n].clientHeight,n+=1;return o}function vh(e,t){for(var n=0;e&&e!==t&&(Ue(hh,e.tagName)||(n+=e.offsetTop),e.offsetParent!==t.offsetParent);)e=e.parentElement;return n}function yh(e,t,n){return e&&t>n+e.offsetTop?yh(e.nextElementSibling,t,n)||e:null}function bh(e,t){for(var n=e.querySelector('[data-nodeid="'+t.id+'"]');!n||Fs(t);)t=t.parent,n=e.querySelector('[data-nodeid="'+t.id+'"]');return function(e){var t=e.mdNode,n=e.el;for(;(Ue(ph,t.type)||"table"===t.type)&&t.firstChild;)t=t.firstChild,n=n.firstElementChild;return{mdNode:t,el:n}}({mdNode:t,el:n})}var wh={};function kh(e){e&&(delete wh[Number(e.getAttribute("data-nodeid"))],vi()(e.children).forEach((function(e){kh(e)})))}function xh(e,t,n){var r,o=wh[r=n]&&wh[r].height,i=function(e){return wh[e]&&wh[e].offsetTop}(n),s=o||e.clientHeight,a=i||vh(e,t)||e.offsetTop;return o||function(e,t){wh[e]=wh[e]||{},wh[e].height=t}(n,s),i||function(e,t){wh[e]=wh[e]||{},wh[e].offsetTop=t}(n,a),{nodeHeight:s,offsetTop:a}}var Ch=xa("md-preview-highlight");var Th=function(){function e(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=xa("md-preview");var r=t.linkAttributes,o=t.customHTMLRenderer,i=t.sanitizer,s=t.highlight,a=void 0!==s&&s;this.renderer=new Xp({gfm:!0,nodeId:!0,convertors:dh(r,o)}),this.cursorNodeId=null,this.sanitizer=i,this.initEvent(a),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return e.prototype.initContentSection=function(){this.previewContent=Ea('<div class="'+xa("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},e.prototype.toggleActive=function(e){Sa(this.el,"active",e)},e.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),this.isViewer||(e&&(this.eventEmitter.listen("changeToolbarState",(function(e){var n=e.mdNode,r=e.cursorPos;t.updateCursorNode(n,r)})),this.eventEmitter.listen("blur",(function(){t.removeHighlight()}))),Vc()(this.el,"scroll",(function(e){t.eventEmitter.emit("scroll","preview",function(e,t){for(var n=t,r=null;n;){var o=n.firstElementChild;if(!o)break;r=n,n=yh(o,e,vh(n,t))}var i=n||r;return i===t?null:i}(e.target.scrollTop,t.previewContent))})),this.eventEmitter.listen("changePreviewTabPreview",(function(){return t.toggleActive(!0)})),this.eventEmitter.listen("changePreviewTabWrite",(function(){return t.toggleActive(!1)})))},e.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&Ce()(e,Ch)}},e.prototype.updateCursorNode=function(e,t){e&&("tableRow"===(e=js(e,(function(e){return!function(e){switch(e.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}(e)}))).type?e=function(e,t){for(var n=e.firstChild;n&&n.next&&!(Ps(n.next)>t+1);)n=n.next;return n}(e,t[1]):"tableBody"===e.type&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var r=this.getElementByNodeId(this.cursorNodeId),o=this.getElementByNodeId(n);r&&Ce()(r,Ch),o&&ke()(o,Ch),this.cursorNodeId=n}},e.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},e.prototype.update=function(e){var t=this;e.forEach((function(e){return t.replaceRangeNodes(e)})),this.eventEmitter.emit("afterPreviewRender",this)},e.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,r=e.removedNodeRange,o=this.previewContent,i=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map((function(e){return t.renderer.render(e)})).join("")));if(r){var s=r.id,a=s[0],l=s[1],c=this.getElementByNodeId(a),u=this.getElementByNodeId(l);if(c){c.insertAdjacentHTML("beforebegin",i);for(var d=c;d&&d!==u;){var p=d.nextElementSibling;Ma(d),kh(d),d=p}(null==d?void 0:d.parentNode)&&(Ma(d),kh(d))}}else o.insertAdjacentHTML("afterbegin",i)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){zc()(this.el,"scroll"),this.el=null},e.prototype.getElement=function(){return this.el},e.prototype.getHTML=function(){return La(this.previewContent.innerHTML)},e.prototype.setHTML=function(e){this.previewContent.innerHTML=e},e.prototype.setHeight=function(e){be()(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){be()(this.el,{minHeight:e+"px"})},e}(),Mh=Th;function Sh(e,t){for(var n=e.depth;n;){var r=e.node(n);if(t(r,n))return{node:r,depth:n,offset:n>0?e.before(n):0};n-=1}return null}function Eh(e){return!!Sh(e,(function(e){var t=e.type;return"listItem"===t.name||"bulletList"===t.name||"orderedList"===t.name}))}function Nh(e){return!!Sh(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function Oh(e){return Sh(e,(function(e){return"listItem"===e.type.name}))}function Dh(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({},t&&{rawHTML:t})}}}function Ah(e){return Object.keys(e).reduce((function(t,n){return"rawHTML"!==n&&e[n]&&(t[n="className"===n?"class":n]=e[n]),t}),{})}function Lh(e){return{tag:e,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce((function(t,n){var r="rawHTML"===n?"data-raw-html":n,o=e.getAttribute(r);return o&&(t[n]=Ue(["rawHTML","extended"],n)?o:Number(o)),t}),{})}}}function Ih(e){var t=e.htmlAttrs,n=e.classNames;return o(o({},t),{class:n?n.join(" "):null})}function Rh(e,t,n,r){var o=t.$from,i=t.$to,s=t.depth,a=t,l=!1;if(s>=2&&o.node(s-1).type.compatibleContent(n)&&0===t.startIndex&&o.index(s-1)){var c=e.doc.resolve(t.start-2);a=new I(c,c,s),t.endIndex<t.parent.childCount&&(t=new I(o,e.doc.resolve(i.end(s)),s)),l=!0}var u=function(e,t,n,r){var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(i){var s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}return null}(e,n),i=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(s){for(var a=(s.length?s[s.length-1]:t).contentMatch,l=r;a&&l<o;l+=1)a=a.matchType(n.child(l).type);if(a&&a.validEnd)return s}return null}(t,n);if(o&&i){var s=o.map((function(e){return{type:e}})),a=i.map((function(e){return{type:e,attrs:r}}));return s.concat({type:n}).concat(a)}return null}(a,t,n,r);return u?function(e,t,n,r,o){for(var i=t.start,s=t.end,a=t.startIndex,l=t.endIndex,c=t.parent,u=d.empty,p=n.length-1;p>=0;p-=1)u=d.from(n[p].type.create(n[p].attrs,u));e.step(new wt(i-(r?2:0),s,i,s,new v(u,0,0),n.length,!0));var h=0;for(p=0;p<n.length;p+=1)if(n[p].type===o){h=p+1;break}for(var f=n.length-h,m=i+n.length-(r?2:0),g=(p=a,l);p<g;p+=1)!(p===a)&&Mt(e.doc,m,f)&&(e.split(m,f),m+=2*f),m+=c.child(p).nodeSize;return e}(e,t,u,l,n):e}function Ph(e,t){for(var n=e.resolve(t);"paragraph"!==n.node().type.name;)t-=2,n=e.resolve(t);return Oh(n)}function Bh(e){return function(t,n){var r=t.selection,o=t.tr,i=r.$from,s=r.$to,a=i.blockRange(s);if(a){var l=Eh(i)?function(e,t,n){var r=t.$from,o=t.$to,i=Oh(r),s=Oh(o);if(i&&s)for(;s;){var a=s.offset,l=s.node,c=s.depth;l.attrs.task&&e.setNodeMarkup(a,null,{task:!1,checked:!1});var u=e.doc.resolve(a);if(u.parent.type!==n){var d=u.before(c-1);e.setNodeMarkup(d,n)}if(a===i.offset)break;s=Ph(e.doc,a)}return e}(o,a,e):Rh(o,a,e);return n(l),!0}return!1}}function Fh(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from,s=n.$to,a=i.blockRange(s);if(a){var l=Eh(i)?function(e,t){var n=t.$from,r=t.$to,o=Oh(n),i=Oh(r);if(o&&i)for(;i;){var s=i.offset,a={task:!i.node.attrs.task,checked:!1};if(e.setNodeMarkup(s,null,a),s===o.offset)break;i=Ph(e.doc,s)}return e}(r,a):Rh(r,a,o.nodes.bulletList,{task:!0});return t(l),!0}return!1}}function Hh(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,s=o.$to,a=i.blockRange(s,(function(t){var n=t.childCount,r=t.firstChild;return!!n&&r.type===e}));if(a){var l=i.node(a.depth-1).type===e?function(e,t,n){var r=t.$from,o=t.$to,i=t.end,s=t.depth,a=t.parent,l=o.end(s);return i<l&&(e.step(new wt(i-1,l,i,l,new v(d.from(n.create(null,a.copy())),1,0),1,!0)),t=new I(e.doc.resolve(r.pos),e.doc.resolve(l),s)),e.lift(t,Ct(t)),e}(r,a,e):function(e,t){for(var n=t.parent,r=t.end,o=t.endIndex-1,i=t.startIndex;o>i;o-=1)r-=n.child(o).nodeSize,e.delete(r-1,r+1);var s=e.doc.resolve(t.start),a=s.nodeAfter,l=0===t.startIndex,c=t.endIndex===n.childCount,u=s.node(-1),p=s.index(-1),h=u.canReplace(p+(l?0:1),p+1,null==a?void 0:a.content.append(c?d.empty:d.from(n)));if(a&&h){var f=s.pos,m=f+a.nodeSize;e.step(new wt(f-(l?1:0),m+(c?1:0),f+1,m-1,new v((l?d.empty:d.from(n.copy(d.empty))).append(c?d.empty:d.from(n.copy(d.empty))),l?0:1,c?0:1),l?0:1))}return e}(r,a);return n(l),!0}return!1}}function zh(){return function(){return function(e,t){var n=e.selection,r=e.schema,o=n.$from,i=n.$to;return!(!o.blockRange(i)||!Eh(o))&&function(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,s=o.$to,a=i.blockRange(s,(function(t){var n=t.childCount,r=t.firstChild;return!!n&&r.type===e}));if(a&&a.startIndex>0){var l=a.parent,c=l.child(a.startIndex-1);if(c.type!==e)return!1;var u=c.lastChild&&c.lastChild.type===l.type,p=u?d.from(e.create()):null,h=new v(d.from(e.create(null,d.from(l.type.create(null,p)))),u?3:1,0),f=a.start,m=a.end;return r.step(new wt(f-(u?3:1),m,f,m,h,1,!0)),n(r),!0}return!1}}(r.nodes.listItem)(e,t)}}}function qh(){return{indent:zh(),outdent:function(){return function(e,t){var n=e.selection,r=e.schema,o=n.$from,i=n.$to;return!(!o.blockRange(i)||!Eh(o))&&Hh(r.nodes.listItem)(e,t)}}}}var Vh=new Map,jh=function(){function e(e,t,n,r){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=r}return e.create=function(t){var n=Sh(t,(function(e){return"table"===e.type.name}));if(n){var r=n.node,o=n.depth,i=n.offset,s=Vh.get(r);if((null==s?void 0:s.tableStartPos)===i+1)return s;var a=[],l=t.start(o),c=r.child(0),u=r.child(1),d=$h(c,l),p=$h(u,l+c.nodeSize);c.forEach((function(e){return a.push(e)})),u.forEach((function(e){return a.push(e)}));var h=new e(r,a,l,d.concat(p));return Vh.set(r,h),h}return null},Object.defineProperty(e.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),e.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},e.prototype.posAt=function(e,t){for(var n=0,r=this.tableStartPos;;n+=1){var o=r+this.tableRows[n].nodeSize;if(n===e){for(var i=t;i<this.totalColumnCount&&this.rowInfo[n][i].offset<r;)i+=1;return i===this.totalColumnCount?o:this.rowInfo[n][i].offset}r=o}},e.prototype.getNodeAndPos=function(e,t){var n=this.rowInfo[e][t];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},e.prototype.extendedRowspan=function(e,t){return!1},e.prototype.extendedColspan=function(e,t){return!1},e.prototype.getRowspanCount=function(e,t){return 0},e.prototype.getColspanCount=function(e,t){return 0},e.prototype.decreaseColspanCount=function(e,t){return 0},e.prototype.decreaseRowspanCount=function(e,t){return 0},e.prototype.getColspanStartInfo=function(e,t){return null},e.prototype.getRowspanStartInfo=function(e,t){return null},e.prototype.getCellStartOffset=function(e,t){var n=this.rowInfo[e][t].offset;return this.extendedRowspan(e,t)?this.posAt(e,t):n},e.prototype.getCellEndOffset=function(e,t){var n=this.rowInfo[e][t],r=n.offset,o=n.nodeSize;return this.extendedRowspan(e,t)?this.posAt(e,t):r+o},e.prototype.getCellIndex=function(e){for(var t=0;t<this.totalRowCount;t+=1)for(var n=this.rowInfo[t],r=0;r<this.totalColumnCount;r+=1)if(n[r].offset+1>e.pos)return[t,r];return[0,0]},e.prototype.getRectOffsets=function(e,t){var n,r,o;void 0===t&&(t=e),e.pos>t.pos&&(e=(n=[t,e])[0],t=n[1]);var i=this.getCellIndex(e),s=i[0],a=i[1],l=this.getCellIndex(t),c=l[0],u=l[1];return s=(r=st(s,c))[0],c=r[1],a=(o=st(a,u))[0],u=o[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:a,endRowIdx:c,endColIdx:u})},e.prototype.getSpannedOffsets=function(e){return e},e}(),$h=function(e,t){var n=[];return e.forEach((function(e,r){var o={rowspanMap:{},colspanMap:{},length:0};e.forEach((function(e,n){for(var i=e.nodeSize,s=0;o[s];)s+=1;o[s]={offset:t+r+n+2,nodeSize:i},o.length+=1})),n.push(o)})),n};function _h(e,t){return it(jh.prototype,e),$h=t,jh}var Uh=function(e){function n(t,n){void 0===n&&(n=t);var r=this,o=t.node(0),i=jh.create(t),s=i.getRectOffsets(t,n),a=function(e,t,n){for(var r=n.startRowIdx,o=n.startColIdx,i=n.endRowIdx,s=n.endColIdx,a=[],l=r;l<=i;l+=1)for(var c=o;c<=s;c+=1){var u=t.getCellInfo(l,c),d=u.offset,p=u.nodeSize;a.push(new jt(e.resolve(d+1),e.resolve(d+p-1)))}return a}(o,i,s);return(r=e.call(this,a[0].$from,a[0].$to,a)||this).startCell=t,r.endCell=n,r.offsetMap=i,r.isCellSelection=!0,r.visible=!1,r}return t(n,e),n.prototype.map=function(e,t){var r=this.startCell.pos,o=this.endCell.pos,i=e.resolve(t.map(r)),s=e.resolve(t.map(o)),a=jh.create(i);if(this.offsetMap.totalColumnCount>a.totalColumnCount||this.offsetMap.totalRowCount>a.totalRowCount){var l={tableBody:1,tableRow:2,tableCell:3,paragraph:4}[s.parent.type.name],c=s.end(s.depth-l),u=Math.min(c-4,s.pos);return Ut.create(e,u)}return new n(i,s)},n.prototype.eq=function(e){return e instanceof n&&e.startCell.pos===this.startCell.pos&&e.endCell.pos===this.endCell.pos},n.prototype.content=function(){for(var e=this.startCell.node(-2),t=this.startCell.start(-2),n=e.child(1).firstChild,r=e.child(0).type.create(),o=e.child(1).type.create(),i=jh.create(this.startCell),s=i.getRectOffsets(this.startCell,this.endCell),a=s.startRowIdx,l=s.startColIdx,c=s.endRowIdx,u=s.endColIdx,p=!1,h=a;h<=c;h+=1){for(var f=[],m=l;m<=u;m+=1){var g=i.getCellInfo(h,m).offset,y=e.nodeAt(g-t);y&&(p="tableHeadCell"===y.type.name,i.extendedRowspan(h,m)||i.extendedColspan(h,m)?f.push(y.type.create({extended:!0})):f.push(y.copy(y.content)))}var b=n.copy(d.from(f)),w=p?r:o;w.content=w.content.append(d.from(b))}return new v(function(e,t){var n=[];return e.childCount&&n.push(e),t.childCount&&n.push(t),d.from(n)}(r,o),1,1)},n.prototype.toJSON=function(){return JSON.stringify(this)},n}(Vt),Wh=Uh;function Jh(e,t,n,r){for(var o=n.nodes,i=o.tableRow,s=o.tableBodyCell,a=o.paragraph,l=[],c=0;c<e;c+=1){for(var u=[],d=0;d<t;d+=1){var p=r&&r[c*t+d],h=a.create(null,p?n.text(p):[]);u.push(s.create(null,h))}l.push(i.create(null,u))}return l}function Gh(e,t,n,r){void 0===r&&(r=null);for(var o=n.nodes,i=o.tableHeadCell,s=o.tableBodyCell,a=o.paragraph,l=0===t?i:s,c=[],u=0;u<e;u+=1)c.push(l.create(r,a.create()));return c}function Kh(e,t){for(;e&&e!==t;){if("TD"===e.nodeName||"TH"===e.nodeName)return e;e=e.parentNode}return null}function Zh(e){return Sh(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function Xh(e){if(e instanceof Ut){var t=e.$anchor,n=Zh(t);if(n){var r=t.node(0).resolve(t.before(n.depth));return{anchor:r,head:r}}}var o=e;return{anchor:o.startCell,head:o.endCell}}function Qh(e){var t;if(e.size){var n=e.content,r=e.openStart,o=e.openEnd;if(1!==n.childCount)return null;for(;1===n.childCount&&(r>0&&o>0||"table"===(null===(t=n.firstChild)||void 0===t?void 0:t.type.name));)r-=1,o-=1,n=n.firstChild.content;if("tableHead"===n.firstChild.type.name||"tableBody"===n.firstChild.type.name)return n}return null}function Yh(e){var t=e.startRowIdx,n=e.startColIdx;return{rowCount:e.endRowIdx-t+1,columnCount:e.endColIdx-n+1}}function ef(e,t){return o(o({},e.attrs),t)}var tf=new un("cellSelection"),nf=function(){function e(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return e.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},e.prototype.handleMousedown=function(e){var t=Kh(e.target,this.view.dom);if(2!==e.button){if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}}else e.preventDefault()},e.prototype.handleMousemove=function(e){var t,n=tf.getState(this.view.state),r=this.getCellPos(e),o=this.startCellPos;n?t=this.view.state.doc.resolve(n):o!==r&&(t=o),t&&o&&r&&this.setCellSelection(o,r)},e.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),null!==tf.getState(this.view.state)&&this.view.dispatch(this.view.state.tr.setMeta(tf,-1))},e.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},e.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},e.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,r=this.view.posAtCoords({left:t,top:n});if(r){var o=this.view.state.doc,i=o.resolve(r.pos),s=Zh(i);if(s){var a=i.before(s.depth);return o.resolve(a)}}return null},e.prototype.setCellSelection=function(e,t){var n=this.view.state,r=n.selection,o=n.tr,i=null===tf.getState(this.view.state),s=new Wh(e,t);if(i||!r.eq(s)){var a=o.setSelection(s);i&&a.setMeta(tf,t.pos),this.view.dispatch(a)}},e.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},e}(),rf=nf,of=xa("cell-selected");function sf(e){var t=e.selection,n=e.doc;if(t instanceof Wh){var r=[];return t.ranges.forEach((function(e){var t=e.$from,n=e.$to;r.push(Vo.node(t.pos-1,n.pos+1,{class:of}))})),_o.create(n,r)}return null}var af=n(928),lf=n.n(af),cf=function(){function e(){this.keys=[],this.values=[]}return e.prototype.getKeyIndex=function(e){return lf()(e,this.keys)},e.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},e.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},e.prototype.has=function(e){return this.getKeyIndex(e)>-1},e.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1&&(this.keys.splice(t,1),this.values.splice(t,1),!0)},e.prototype.forEach=function(e,t){var n=this;void 0===t&&(t=this),this.values.forEach((function(r,o){r&&n.keys[o]&&e.call(t,r,n.keys[o],n)}))},e.prototype.clear=function(){this.keys=[],this.values=[]},e}(),uf=cf,df="en-US",pf=function(){function e(){this.code=df,this.langs=new uf}return e.prototype.setCode=function(e){this.code=e||df},e.prototype.setLanguage=function(e,t){var n=this;(e=[].concat(e)).forEach((function(e){if(n.langs.has(e)){var r=n.langs.get(e);n.langs.set(e,ve()(r,t))}else n.langs.set(e,t)}))},e.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(df));var r=n[e];if(!r)throw new Error('There is no text key "'+e+'" in '+t);return r},e}(),hf=new pf,ff=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function mf(e,t){return ff.map((function(n){return n.map((function(n){var r=n.action,o=n.command,i=n.payload,s=n.disableInThead,a=n.className;return{label:hf.get(r),onClick:function(){e.emit("command",o,i)},disabled:t&&!!s,className:a}}))})).concat()}function gf(e){return new an({props:{handleDOMEvents:{contextmenu:function(t,n){var r=Kh(n.target,t.dom);if(r){n.preventDefault();var o=n,i=o.clientX,s=o.clientY,a=t.dom.parentNode.getBoundingClientRect(),l=a.left,c=a.top,u="TH"===r.nodeName;return e.emit("contextmenu",{pos:{left:i-l+10+"px",top:s-c+30+"px"},menuGroups:mf(e,u),tableCell:r}),!0}return!1}}}})}var vf=["image","link","customBlock","frontMatter"],yf=["strong","strike","emph","code"],bf=["bulletList","orderedList","taskList"];function wf(e,t,n){var r=e.$from,o=e.$to,i=e.from,s=e.to,a={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return t.nodesBetween(i,s,(function(e,t,i){var s=function(e,t){var n=e.type.name;return"listItem"===n?e.attrs.task?"taskList":t.type.name:-1!==n.indexOf("table")?"table":n}(e,i);Ue(vf,s)||(Ue(bf,s)?(!function(e,t){t[e]={active:!0},bf.filter((function(t){return t!==e})).forEach((function(e){t[e]&&delete t[e]}))}(s,a),a.indent.disabled=!1,a.outdent.disabled=!1):"paragraph"===s||"text"===s?function(e,t,n,r){yf.forEach((function(o){var i=n.marks[o],s=e.marksAcross(t)||[];i.isInSet(s)&&(r[o]={active:!0})}))}(r,o,n,a):a[s]={active:!0})})),a}function kf(e){return new an({view:function(){return{update:function(t){var n=t.state,r=n.selection,o=n.doc,i=n.schema;e.emit("changeToolbarState",{toolbarState:wf(r,o,i)})}}}})}var xf=function(){function e(e,t,n,r){var o=this;this.openEditor=function(){if(o.innerEditorView)throw new Error("The editor is already opened.");o.dom.draggable=!1,o.wrapper.style.display="none",o.innerViewContainer.style.display="block",o.innerEditorView=new ui(o.innerViewContainer,{state:on.create({doc:o.node,plugins:[Ai({"Mod-z":function(){return Ms(o.innerEditorView.state,o.innerEditorView.dispatch)},"Shift-Mod-z":function(){return Ss(o.innerEditorView.state,o.innerEditorView.dispatch)},Tab:function(e,t){return t(e.tr.insertText("\t")),!0},Enter:Hi,Escape:function(){return o.cancelEditing(),!0},"Ctrl-Enter":function(){return o.saveAndFinishEditing(),!0}}),Ts()]}),dispatchTransaction:function(e){return o.dispatchInner(e)},handleDOMEvents:{mousedown:function(){return o.editorView.hasFocus()&&o.innerEditorView.focus(),!0},blur:function(){return o.saveAndFinishEditing(),!0}}}),o.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=r,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=xa("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=xa("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return e.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),r=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",r.type="button",r.addEventListener("click",(function(){return e.openEditor()})),t.appendChild(n),t.appendChild(r),this.wrapper.appendChild(t)},e.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var t=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},e.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=xa("custom-block-editor"),this.innerViewContainer.style.display="none"},e.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},e.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(Os(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},e.prototype.cancelEditing=function(){var e=function(e){let t=xs.getState(e);return t?t.done.eventCount:0}(this.innerEditorView.state);for(this.canceled=!0;e--;)Ms(this.innerEditorView.state,this.innerEditorView.dispatch),Ms(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(Ut.create(n.doc,t))),this.editorView.focus(),this.closeEditor()},e.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,r=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&Ga()(this.getPos)){for(var o=this.editorView.state.tr,i=dt.offset(this.getPos()+1),s=0;s<r.length;s+=1)for(var a=r[s].steps,l=0;l<a.length;l+=1)o.step(a[l].map(i));o.docChanged&&this.editorView.dispatch(o)}},e.prototype.update=function(e){return!!e.sameMarkup(this.node)&&(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0)},e.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},e.prototype.ignoreMutation=function(){return!0},e.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},e}(),Cf="image-link",Tf=function(){function e(e,t,n,r){var o,i=this;this.handleMousedown=function(e){e.preventDefault();var t=e.target,n=e.offsetX,r=e.offsetY;if(i.imageLink&&Ga()(i.getPos)&&ca()(t,Cf)){var o=getComputedStyle(t,":before");if(e.stopPropagation(),wa(o,n,r)){var s=i.view.state.tr,a=i.getPos();s.setSelection(Os(s,a,a+1)),i.view.dispatch(s),i.eventEmitter.emit("openPopup","link",i.imageLink.attrs)}}},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=r,this.imageLink=null!==(o=e.marks.filter((function(e){return"link"===e.type.name}))[0])&&void 0!==o?o:null,this.dom=this.createElement(),this.bindEvent()}return e.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var t=document.createElement("span");return t.className=Cf,t.appendChild(e),t}return e},e.prototype.createImageElement=function(e){var t=document.createElement("img"),n=e.attrs,r=n.imageUrl,o=n.altText,i=Ih(e.attrs);return t.src=r,o&&(t.alt=o),Aa(i,t),t},e.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},e.prototype.stopEvent=function(){return!0},e.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},e}(),Mf=function(){function e(e,t,n,r){var o=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(e){var t=e.target;if("none"!==getComputedStyle(t,":after").backgroundImage&&Ga()(o.getPos)){var n=o.view.coordsAtPos(o.getPos()),r=n.top,i=n.right;o.createLanguageEditor({top:r,right:i})}},this.handleKeydown=function(e){"Enter"===e.key&&o.input&&(e.preventDefault(),o.changeLanguage())},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=r,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return e.prototype.createElement=function(){var e=this.node.attrs.language,t=document.createElement("div");t.setAttribute("data-language",e||"text"),t.className="toastui-editor-ww-code-block";var n=this.createCodeBlockElement(),r=n.firstChild;t.appendChild(n),this.dom=t,this.contentDOM=r},e.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),t=document.createElement("code"),n=this.node.attrs.language,r=Ih(this.node.attrs);return n&&t.setAttribute("data-language",n),Aa(r,e),e.appendChild(t),e},e.prototype.createLanguageEditor=function(e){var t=this,n=e.top,r=e.right,o=document.createElement("span");o.className="toastui-editor-ww-code-block-language";var i=document.createElement("input");i.type="text",i.value=this.node.attrs.language,o.appendChild(i),this.view.dom.parentElement.appendChild(o);var s=o.clientWidth;be()(o,{top:n+10+"px",left:r-s-10+"px",width:s+"px"}),this.input=i,this.input.addEventListener("blur",(function(){return t.changeLanguage()})),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout((function(){t.input.focus()}))},e.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},e.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",(function(){e.input&&e.reset()}))},e.prototype.changeLanguage=function(){if(this.input&&Ga()(this.getPos)){var e=this.input.value;this.reset();var t=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(t,null,{language:e}),this.view.dispatch(n)}},e.prototype.reset=function(){var e;if(null===(e=this.input)||void 0===e?void 0:e.parentElement){var t=this.input.parentElement;this.input=null,Ma(t)}},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.stopEvent=function(){return!0},e.prototype.update=function(e){return!!e.sameMarkup(this.node)&&(this.node=e,!0)},e.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},e}(),Sf=/MsoListParagraph/,Ef=/style=(.|\n)*mso-/,Nf=/mso-list:(.*)/,Of=/O:P/,Df=/^(n|u|l)/;function Af(e){for(var t=[],n=document.createTreeWalker(e,1,null,!1);n.nextNode();){var r=n.currentNode;if(Ta(r)){var o=r,i=o.outerHTML,s=o.textContent,a=Ef.test(i),l=Nf.test(i);a&&!l&&s?t.push([r,!0]):(Of.test(r.nodeName)||a&&!s||l)&&t.push([r,!1])}}return t.forEach((function(e){var t=e[0];e[1]?function(e){for(var t=[];e.firstChild;)t.push(e.firstChild),e.parentNode&&e.parentNode.insertBefore(e.firstChild,e);Ma(e)}(t):Ma(t)})),e.innerHTML.trim()}function Lf(e){var t=[];return e.forEach((function(e,n){var r=t[n-1],o=function(e,t){var n=e.getAttribute("style");if(n){var r=n.match(Nf)[1].trim().split(" ")[1];return{id:t,level:parseInt(r.replace("level",""),10),prev:null,parent:null,children:[],unordered:Df.test(e.textContent||""),contents:Af(e)}}return null}(e,n);o&&(r&&function(e,t){if(t.level<e.level)t.children.push(e),e.parent=t;else{for(;t&&t.level!==e.level;)t=t.parent;t&&(e.prev=t,e.parent=t.parent,e.parent&&e.parent.children.push(e))}}(o,r),t.push(o))})),t}function If(e){var t=e[0].unordered?"ul":"ol",n=document.createElement(t);return e.forEach((function(e){var t=e.children,r=e.contents,o=document.createElement("li");o.innerHTML=r,n.appendChild(o),t.length&&n.appendChild(If(t))})),n}function Rf(e){return If(Lf(e).filter((function(e){return!e.parent})))}function Pf(e){var t=document.createElement("div");t.innerHTML=e;var n,r,o,i=[],s=(n=t,r="p.MsoListParagraph",(o=vi()(n.querySelectorAll(r))).length?o:[]);return s.forEach((function(e){var n=function(e){for(;e&&!Ta(e);)e=e.nextSibling;return!e||!Sf.test(e.className)}(e.nextSibling);if(i.push(e),n){var r=Rf(i),o=e.nextSibling;o?function(e,t){t.parentNode&&t.parentNode.insertBefore(e,t)}(r,o):function(e,t){(t=aa()(t)?vi()(t):[t]).forEach((function(t){e.appendChild(t)}))}(t,r),i=[]}Ma(e)})),""+(s.length?"<p></p>":"")+t.innerHTML}var Bf="\x3c!--StartFragment--\x3e";function Ff(e){return function(e){return Ef.test(e)}(e=function(e){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(e)&&(e="<tr>"+e+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(e)&&(e="<table>"+e+"</table>"),e}(e=function(e){var t=e.indexOf(Bf),n=e.lastIndexOf("\x3c!--EndFragment--\x3e");return t>-1&&n>-1&&(e=e.slice(t+Bf.length,n)),e.replace(/<br[^>]*>/g,ba)}(e)))&&(e=Pf(e)),e}function Hf(e,t,n){for(var r=[],o=e.childCount,i=0;i<o;i+=1)if(!e.child(i).attrs.extended){var s=i<o?n.create(e.child(i).attrs,e.child(i).content):n.createAndFill();r.push(s)}return r}function zf(e,t,n){var r=n.nodes,o=r.tableRow,i=Hf(e,0,r.tableHeadCell);return o.create(null,i)}function qf(e,t,n){var r=n.nodes,o=r.tableRow,i=Hf(e,0,r.tableBodyCell);return o.create(null,i)}function Vf(e){var t=[],n=[];"tableHead"===e.firstChild.type.name&&e.firstChild.forEach((function(e){return t.push(e)}));"tableBody"===e.lastChild.type.name&&e.lastChild.forEach((function(e){return n.push(e)}));return i(i([],t),n)}function jf(e,t,n){var r=zf(e,0,n);return n.nodes.tableHead.create(null,r)}function $f(e,t,n){var r=e.map((function(e){return qf(e,0,n)}));if(!e.length){var o=function(e,t){for(var n=t.nodes,r=n.tableRow,o=n.tableBodyCell,i=[],s=0;s<e;s+=1){var a=o.createAndFill();i.push(a)}return r.create({dummyRowForPasting:!0},i)}(t,n);r.push(o)}return n.nodes.tableBody.create(null,r)}function _f(e,t,n){var r=[],o=e.content,i=e.openStart,s=e.openEnd;return o.forEach((function(e){if("table"===e.type.name){var o=Qh(new v(d.from(e),0,0));if(o){var i=Vf(o),s="tableBody"===o.firstChild.type.name,a=function(e,t,n,r){var o=function(e){return e.reduce((function(e,t){return e.childCount>t.childCount?e:t})).childCount}(e);if(n&&r)return t.nodes.table.create(null,[$f(e,o,t)]);var i=e[0],s=e.slice(1),a=[jf(i,0,t)];return s.length&&a.push($f(s,o,t)),t.nodes.table.create(null,a)}(i,t,s,n);r.push(a)}}else r.push(e)})),new v(d.from(r),i,s)}function Uf(e){return 4*e}function Wf(e,t){var n=e.state,r=n.selection,o=n.schema,i=n.tr,s=Xh(r),a=s.anchor,l=s.head;if(a&&l){var c=Qh(t);if(!c)return!1;var u=jh.create(a),d=u.getRectOffsets(a,l),p=function(e,t,n){var r=[],o=Vf(e),i=(o[0].childCount,o.length),s=0===t.startRowIdx,a=o.slice(0,i);if(s){var l=a.shift();if(l){var c=zf(l,0,n).content;r.push(c)}}return a.forEach((function(e){if(!e.attrs.dummyRowForPasting){var t=qf(e,0,n).content;r.push(t)}})),r}(c,d,o),h=function(e,t,n){for(var r=t.startRowIdx,o=t.startColIdx,i=n.length,s=0,a=function(e){var t=n[e].childCount;n[e].forEach((function(e){var n=e.attrs.colspan;n>1&&(t+=n-1)})),s=Math.max(s,t)},l=0;l<i;l+=1)a(l);var c=r+i-1,u=o+s-1;return{startRowIdx:r,startColIdx:o,endRowIdx:c,endColIdx:u,addedRowCount:Math.max(c+1-e.totalRowCount,0),addedColumnCount:Math.max(u+1-e.totalColumnCount,0)}}(u,d,p),f=[];return function(e,t){var n=Yh(e.getSpannedOffsets(t)),r=n.rowCount,o=n.columnCount,i=Yh(t),s=i.rowCount,a=i.columnCount;return r===s&&o===a}(u,h)&&(function(e,t){for(var n=e.startRowIdx,r=e.startColIdx,o=e.endRowIdx,i=e.endColIdx,s=e.addedRowCount,a=e.addedColumnCount,l=n;l<=o-s;l+=1)t.push({rowIdx:l,startColIdx:r,endColIdx:i-a})}(h,f),h.addedColumnCount&&function(e,t,n,r,o){for(var i=r.startRowIdx,s=r.startColIdx,a=r.endRowIdx,l=r.endColIdx,c=r.addedRowCount,u=r.addedColumnCount,d=n.totalRowCount,p=0,h=0;h<d;h+=1){var f=n.getCellInfo(h,l-u),m=f.offset,g=f.nodeSize,v=e.mapping.map(m+g),y=Gh(u,h,t);if(e.insert(v,y),h>=i&&h<=a-c){var b=n.getCellInfo(h,l-u),w=e.mapping.map(b.offset),k=v+Uf(u);o[p]={rowIdx:h,startColIdx:s,endColIdx:l,dummyOffsets:[w,k]},p+=1}}}(i,o,u,h,f),h.addedRowCount&&function(e,t,n,r,o){var i=r.addedRowCount,s=r.addedColumnCount,a=r.startColIdx,l=r.endColIdx,c=e.mapping.maps.length,u=n.tableEndOffset-2,d=Jh(i,n.totalColumnCount+s,t),p=u;e.insert(e.mapping.slice(c).map(p),d);for(var h=0;h<i;h+=1){var f=p+Uf(a)+1,m=p+Uf(l+1)+1,g=p+Uf(n.totalColumnCount+s)+2;o.push({rowIdx:h+n.totalRowCount,startColIdx:a,endColIdx:l,dummyOffsets:[f,m]}),p=g}}(i,o,u,h,f),function(e,t,n,r){var o=e.mapping.maps.length;n.forEach((function(n,i){var s=n.rowIdx,a=n.startColIdx,l=n.endColIdx,c=n.dummyOffsets,u=e.mapping.slice(o),d=new v(t[i],0,0),p=c?c[0]:r.getCellStartOffset(s,a),h=c?c[1]:r.getCellEndOffset(s,l);e.replace(u.map(p),u.map(h),d)}))}(i,p,f,u),e.dispatch(i),function(e,t,n){var r=e.state,o=r.tr,i=r.doc,s=jh.create(i.resolve(n)),a=t[0],l=a.rowIdx,c=a.startColIdx,u=et(t),d=u.rowIdx,p=u.endColIdx,h=s.getCellInfo(l,c).offset,f=s.getCellInfo(d,p).offset;e.dispatch(o.setSelection(new Wh(i.resolve(h),i.resolve(f))))}(e,f,u.getCellInfo(0,0).offset)),!0}return!1}var Jf,Gf=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),n}(Va),Kf=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:o({},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"p"}],toDOM:function(e){return["p",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n}(Va),Zf=/\s{1,4}$/,Xf=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),n.prototype.addSpaces=function(){return function(e,t){var n=e.selection,r=e.tr,o=n.$from,i=n.$to;return!(!o.blockRange(i)||Eh(o)||Nh(o))&&(t(r.insertText(" ",o.pos,i.pos)),!0)}},n.prototype.removeSpaces=function(){return function(e,t){var n=e.selection,r=e.tr,o=n.$from,i=n.$to,s=n.from;if(o.blockRange(i)&&!Eh(o)&&!Nh(o)){var a=o.nodeBefore;if(a&&a.isText){var l=a.text,c=l.replace(Zf,""),u=l.length-c.length;return t(r.delete(s-u,s)),!0}}return!1}},n.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},n}(Va),Qf=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){var e=this.levels.map((function(e){return{tag:"h"+e,getAttrs:function(t){var n=t.getAttribute("data-raw-html");return o({level:e},n&&{rawHTML:n})}}}));return{attrs:o({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),content:"inline*",group:"block",defining:!0,parseDOM:e,toDOM:function(e){var t=e.attrs;return["h"+t.level,Ih(t),0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(e){return function(t,n){return Gi(t.schema.nodes[e.level?"heading":"paragraph"],e)(t,n)}}},n}(Va),Yf=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:o({language:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(e){var t=e.getAttribute("data-raw-html"),n=e.firstElementChild;return o({language:(null==n?void 0:n.getAttribute("data-language"))||null},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"pre",["code",o({"data-language":t.language},Ih(t)),0]]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){return Gi(e.schema.nodes.codeBlock)(e,t)}}},n.prototype.moveCursor=function(e){var t=this;return function(n,r){var o,i,s=n.tr,a=n.doc,l=n.schema,c=n.selection.$from;if(t.context.view.endOfTextblock(e)&&"codeBlock"===c.node().type.name){var u=c.parent.textContent.split("\n"),d="up"===e?c.start():c.end(),p="up"===e?[d,u[0].length+d]:[d-et(u).length,d],h=a.resolve("up"===e?c.before():c.after()),f="up"===e?h.nodeBefore:h.nodeAfter;if(o=c.pos,i=p[1],o>=p[0]&&o<=i&&!f){var m=Ds(s,h,l);if(m)return r(m),!0}}return!1}},n.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-p":e,"Shift-Mod-P":e,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},n}(Va),em=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[Dh("ul")],toDOM:function(e){return["ul",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n.prototype.changeList=function(){return function(e,t){return Bh(e.schema.nodes.bulletList)(e,t)}},n.prototype.commands=function(){return{bulletList:this.changeList,taskList:Fh}},n.prototype.keymaps=function(){var e=this.changeList(),t=qh(),n=t.indent,r=t.outdent;return{"Mod-u":e,"Mod-U":e,Tab:n(),"Shift-Tab":r()}},n}(Va),tm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:o({order:{default:1},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"ol",getAttrs:function(e){var t=e.getAttribute("start"),n=e.getAttribute("data-raw-html");return o({order:e.hasAttribute("start")?Number(t):1},n&&{rawHTML:n})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"ol",o({start:1===t.order?null:t.order},Ih(t)),0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){return Bh(e.schema.nodes.orderedList)(e,t)}}},n.prototype.keymaps=function(){var e=this.commands()(),t=qh(),n=t.indent,r=t.outdent;return{"Mod-o":e,"Mod-O":e,Tab:n(),"Shift-Tab":r()}},n}(Va),nm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({task:e.hasAttribute("data-task"),checked:e.hasAttribute("data-task-checked")},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs,n=t.task,r=t.checked;if(!n)return[t.rawHTML||"li",0];var i=["task-list-item"];return r&&i.push("checked"),[t.rawHTML||"li",o({class:i.join(" "),"data-task":n},r&&{"data-task-checked":r}),0]}}},enumerable:!1,configurable:!0}),n.prototype.liftToPrevListItem=function(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from,s=n.empty,a=o.nodes.listItem,l=i.parent,c=i.node(-1);if(s&&!l.childCount&&c.type===a){if(i.index(-2)>=1)return r.delete(i.start(-1)-1,i.end(-1)),t(r),!0;if(i.node(-3).type===a)return r.delete(i.start(-2)-1,i.end(-1)),t(r),!0}return!1}},n.prototype.keymaps=function(){return{Backspace:this.liftToPrevListItem(),Enter:function(e,t){return function(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,s=o.$to;if(i.depth<2||!i.sameParent(s))return!1;var a=i.node(-1);if(a.type!==e)return!1;if(0===i.parent.content.size&&i.node(-1).childCount===i.indexAfter(-1)){if(2===i.depth||i.node(-3).type!==e||i.index(-2)!==i.node(-2).childCount-1)return!1;for(var l=i.index(-1)>0,c=d.empty,u=i.depth-(l?1:2);u>=i.depth-3;u-=1)c=d.from(i.node(u).copy(c));return c=c.append(d.from(e.createAndFill())),r.replace(l?i.before():i.before(-1),i.after(-3),new v(c,l?3:2,2)),r.setSelection(Vt.near(r.doc.resolve(i.pos+(l?3:2)))),n(r),!0}var p=s.pos===i.end()?a.contentMatchAt(0).defaultType:null,h=p&&[null,{type:p}];return r.delete(i.pos,s.pos),!!Mt(r.doc,i.pos,2,h)&&(r.split(i.pos,2,h),n(r),!0)}}(e.schema.nodes.listItem)(e,t)}}},n}(Va),rm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),content:"block+",group:"block",parseDOM:[Dh("blockquote")],toDOM:function(e){return["blockquote",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){return Ji(e.schema.nodes.blockQuote)(e,t)}}},n.prototype.keymaps=function(){var e=this.commands()();return{"Alt-q":e,"Alt-Q":e}},n}(Va),om={left:function(e,t){var n=e[0],r=e[1],o=t.totalColumnCount,i=0===r;if(0!==n||!i){r-=1,i&&(n-=1,r=o-1);var s=t.getCellInfo(n,r),a=s.offset,l=s.nodeSize;return a+l-2}return null},right:function(e,t){var n=e[0],r=e[1],o=t.totalRowCount,i=t.totalColumnCount,s=r===i-1;if(n!==o-1||!s){var a=r+1,l=t.getColspanStartInfo(n,r);return(null==l?void 0:l.count)>1&&(a+=l.count-1),(s||a===i)&&(n+=1,a=0),t.getCellInfo(n,a).offset+2}return null},up:function(e,t){var n=e[0],r=e[1];if(n>0){var o=t.getCellInfo(n-1,r),i=o.offset,s=o.nodeSize;return i+s-2}return null},down:function(e,t){var n=e[0],r=e[1],o=t.totalRowCount;if(n<o-1){var i=n+1,s=t.getRowspanStartInfo(n,r);return(null==s?void 0:s.count)>1&&(i+=s.count-1),t.getCellInfo(i,r).offset+2}return null}};function im(e,t,n,r){var o=t[0],i=t[1],s=o+3,a=i>=s,l=a?o+1:i,c=function(e,t,n,r,o){var i=t[0],s=t[1],a=t[2];if(e===Jf.LEFT||e===Jf.UP){if(o&&!function(e,t,n){var r=n[0],o=n[1],i=t.resolve(e.before(r-1));return o===r&&!i.nodeBefore}(n,r,[i,s]))return!1;var l=n.before(a);if(r.resolve(l).nodeBefore)return!1}return!0}(e,[i,s,l],n,r,a),u=function(e,t,n,r,o){if(e===Jf.RIGHT||e===Jf.DOWN){if(o&&!function(e){for(var t,n,r=e.depth;r&&"tableBodyCell"!==(n=e.node(r)).type.name;){if("listItem"===n.type.name){var o=e.node(r-1).lastChild===n,i="paragraph"!==(null===(t=n.lastChild)||void 0===t?void 0:t.type.name);return!!o&&!i}r-=1}return!1}(n))return!1;var i=n.after(t);if(r.resolve(i).nodeAfter)return!1}return!0}(e,l,n,r,a);return c&&u}function sm(e,t,n){var r=n[0],o=n[1],i=t.getRowspanStartInfo(r,o),s=e===Jf.UP&&0===r,a=e===Jf.DOWN&&((null==i?void 0:i.count)>1?r+i.count-1:r)===t.totalRowCount-1;return s||a}function am(e,t,n,r){void 0===r&&(r=!1);var o=e.doc.resolve(t.tableEndOffset);return r||!o.nodeAfter?Ds(e,o,n):e.setSelection(Vt.near(o,1))}function lm(e,t,n,r){var o=(0,om[e])(n,r);if(o){var i=e===Jf.RIGHT||e===Jf.DOWN?1:-1;return t.setSelection(Vt.near(t.doc.resolve(o),i))}return null}function cm(e,t,n){var r=e.getCellInfo(t,0).offset,o=e.getCellInfo(t,n-1);return{from:r,to:o.offset+o.nodeSize}}!function(e){e.LEFT="left",e.RIGHT="right",e.UP="up",e.DOWN="down"}(Jf||(Jf={}));var um=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[Dh("table")],toDOM:function(e){return["table",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n.prototype.addTable=function(){return function(e){return void 0===e&&(e={rowCount:2,columnCount:1,data:[]}),function(t,n){var r=e.rowCount,o=e.columnCount,i=e.data,s=t.schema,a=t.selection,l=t.tr,c=a.from,u=a.to,d=a.$from;if(c===u&&!Nh(d)){var p=s.nodes,h=p.tableHead,f=p.tableBody,m=null==i?void 0:i.slice(0,o),g=null==i?void 0:i.slice(o,i.length),v=function(e,t,n){for(var r=t.nodes,o=r.tableRow,i=r.tableHeadCell,s=r.paragraph,a=[],l=0;l<e;l+=1){var c=n&&n[l],u=s.create(null,c?t.text(c):[]);a.push(i.create(null,u))}return[o.create(null,a)]}(o,s,m),y=Jh(r-1,o,s,g),b=s.nodes.table.create(null,[h.create(null,v),f.create(null,y)]);return n(l.replaceSelectionWith(b)),!0}return!1}}},n.prototype.removeTable=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=jh.create(n.$anchor);if(o){var i=o.tableStartOffset,s=o.tableEndOffset,a=i-1,l=Os(r.delete(a,s),a);return t(r.setSelection(l)),!0}return!1}}},n.prototype.addColumn=function(e){return function(){return function(t,n){var r=t.selection,o=t.tr,i=t.schema,s=Xh(r),a=s.anchor,l=s.head;if(a&&l){for(var c=jh.create(a),u=c.getRectOffsets(a,l),d=e===Jf.LEFT?u.startColIdx:u.endColIdx+1,p=Yh(u).columnCount,h=c.totalRowCount,f=0;f<h;f+=1){var m=Gh(p,f,i);o.insert(o.mapping.map(c.posAt(f,d)),m)}return n(o),!0}return!1}}},n.prototype.removeColumn=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=Xh(n),i=o.anchor,s=o.head;if(i&&s){var a=jh.create(i),l=a.getRectOffsets(i,s),c=a.totalColumnCount,u=a.totalRowCount;if(Yh(l).columnCount===c)return!1;for(var d=l.startColIdx,p=l.endColIdx,h=r.mapping.maps.length,f=0;f<u;f+=1)for(var m=p;m>=d;m-=1){var g=a.getCellInfo(f,m),v=g.offset,y=g.nodeSize,b=r.mapping.slice(h).map(v),w=b+y;r.delete(b,w)}return t(r),!0}return!1}}},n.prototype.addRow=function(e){return function(){return function(t,n){var r=t.selection,o=t.schema,i=t.tr,s=Xh(r),a=s.anchor,l=s.head;if(a&&l){var c=jh.create(a),u=c.totalColumnCount,d=c.getRectOffsets(a,l),p=Yh(d).rowCount,h=function(e,t,n){var r,o,i;return e===Jf.UP?(r=n.startRowIdx,o=0,i=-1):(r=n.endRowIdx,o=t.totalColumnCount-1,i=t.getCellInfo(r,o).nodeSize+1),{targetRowIdx:r,insertColIdx:o,nodeSize:i}}(e,c,d),f=h.targetRowIdx,m=h.insertColIdx,g=h.nodeSize;if(!(0===f)){for(var v=[],y=i.mapping.map(c.posAt(f,m))+g,b=[],w=0;w<u;w+=1)b=b.concat(Gh(1,f,o));for(var k=0;k<p;k+=1)v.push(o.nodes.tableRow.create(null,b));return n(i.insert(y,v)),!0}}return!1}}},n.prototype.removeRow=function(){return function(){return function(e,t){var n=e.selection,r=e.tr,o=Xh(n),i=o.anchor,s=o.head;if(i&&s){var a=jh.create(i),l=a.totalRowCount,c=a.totalColumnCount,u=a.getRectOffsets(i,s),d=Yh(u).rowCount,p=u.startRowIdx,h=u.endRowIdx;if(d===l-1||0===p)return!1;for(var f=h;f>=p;f-=1){var m=cm(a,f,c),g=m.from,v=m.to;r.delete(g-1,v+1)}return t(r),!0}return!1}}},n.prototype.alignColumn=function(){return function(e){return void 0===e&&(e={align:"center"}),function(t,n){var r=e.align,o=t.selection,i=t.tr,s=Xh(o),a=s.anchor,l=s.head;if(a&&l){for(var c=jh.create(a),u=c.totalRowCount,d=c.getRectOffsets(a,l),p=d.startColIdx,h=d.endColIdx,f=0;f<u;f+=1)for(var m=p;m<=h;m+=1)if(!c.extendedRowspan(f,m)&&!c.extendedColspan(f,m)){var g=c.getNodeAndPos(f,m),v=g.node,y=g.pos,b=ef(v,{align:r});i.setNodeMarkup(y,null,b)}return n(i),!0}return!1}}},n.prototype.moveToCell=function(e){return function(t,n){var r=t.selection,o=t.tr,i=t.schema,s=Xh(r),a=s.anchor,l=s.head;if(a&&l){var c=jh.create(a),u=c.getCellIndex(a),d=void 0;if(d=sm(e,c,u)?am(o,c,i):lm(e,o,u,c))return n(d),!0}return!1}},n.prototype.moveInCell=function(e){var t=this;return function(n,r){var o=n.selection,i=n.tr,s=n.doc,a=n.schema,l=o.$from;if(!t.context.view.endOfTextblock(e))return!1;var c=Sh(l,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}));if(c){var u=Sh(l,(function(e){return"paragraph"===e.type.name})),d=c.depth;if(u&&im(e,[d,u.depth],l,s)){var p=Xh(o).anchor,h=jh.create(p),f=h.getCellIndex(p),m=void 0;if(!function(e,t,n){var r=n[0],o=n[1];if(e===Jf.UP||e===Jf.DOWN)return!1;var i=t.tableStartOffset,s=t.tableEndOffset,a=t.getCellInfo(r,o),l=a.offset,c=a.nodeSize;return(e===Jf.LEFT?i:s)===(e===Jf.LEFT?l-2:l+c+3)}(e,h,f)?sm(e,h,f)?e===Jf.UP?m=function(e,t,n){var r=e.doc.resolve(t.tableStartOffset-1);return r.nodeBefore?e.setSelection(Vt.near(r,-1)):Ds(e,r,n)}(i,h,a):e===Jf.DOWN&&(m=am(i,h,a)):m=lm(e,i,f,h):m=function(e,t,n){var r=e.doc.resolve(t.before(n-3));return e.setSelection(new Jt(r))}(i,l,d),m)return r(m),!0}}return!1}},n.prototype.deleteCells=function(){return function(e,t){var n=e.schema,r=e.selection,o=e.tr,i=Xh(r),s=i.anchor,a=i.head;if(s&&a&&!(r instanceof Ut)){for(var l=jh.create(s),c=l.getRectOffsets(s,a),u=c.startRowIdx,d=c.startColIdx,p=c.endRowIdx,h=c.endColIdx,f=u;f<=p;f+=1)for(var m=d;m<=h;m+=1)if(!l.extendedRowspan(f,m)&&!l.extendedColspan(f,m)){var g=l.getNodeAndPos(f,m),v=g.node,y=g.pos,b=Gh(1,f,n,v.attrs);o.replaceWith(o.mapping.map(y),o.mapping.map(y+v.nodeSize),b)}return t(o),!0}return!1}},n.prototype.exitTable=function(){return function(e,t){var n=e.selection,r=e.tr,o=e.schema,i=n.$from;if(Sh(i,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))&&Sh(i,(function(e){return"paragraph"===e.type.name}))){var s=Xh(n).anchor;return t(am(r,jh.create(s),o,!0)),!0}return!1}},n.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn(Jf.LEFT),addColumnToRight:this.addColumn(Jf.RIGHT),removeColumn:this.removeColumn(),addRowToUp:this.addRow(Jf.UP),addRowToDown:this.addRow(Jf.DOWN),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},n.prototype.keymaps=function(){var e=this.deleteCells();return{Tab:this.moveToCell(Jf.RIGHT),"Shift-Tab":this.moveToCell(Jf.LEFT),ArrowUp:this.moveInCell(Jf.UP),ArrowDown:this.moveInCell(Jf.DOWN),ArrowLeft:this.moveInCell(Jf.LEFT),ArrowRight:this.moveInCell(Jf.RIGHT),Backspace:e,"Mod-Backspace":e,Delete:e,"Mod-Delete":e,"Mod-Enter":this.exitTable()}},n}(Va),dm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[Dh("thead")],toDOM:function(e){return["thead",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n}(Va),pm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"tbody",getAttrs:function(e){var t=e.querySelectorAll("tr")[0].children.length,n=e.getAttribute("data-raw-html");return!!t&&o({},n&&{rawHTML:n})}}],toDOM:function(e){return["tbody",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n}(Va),hm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"tr",getAttrs:function(e){var t=e.children.length,n=e.getAttribute("data-raw-html");return!!t&&o({},n&&{rawHTML:n})}}],toDOM:function(e){return["tr",Ih(e.attrs),0]}}},enumerable:!1,configurable:!0}),n}(Va),fm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:o({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),isolating:!0,parseDOM:[Lh("th")],toDOM:function(e){var t=e.attrs,n=Ah(t);return["th",o(o({},n),Ih(t)),0]}}},enumerable:!1,configurable:!0}),n}(Va),mm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[Lh("td")],toDOM:function(e){return["td",Ah(e.attrs),0]}}},enumerable:!1,configurable:!0}),n}(Va),gm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{inline:!0,attrs:o({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(e){var t=rh(e,{RETURN_DOM_FRAGMENT:!0}).firstChild,n=t.getAttribute("src")||"",r=t.getAttribute("data-raw-html"),i=t.getAttribute("alt");return o({imageUrl:n,altText:i},r&&{rawHTML:r})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"img",o(o({src:_e(t.imageUrl)},t.altText&&{alt:t.altText}),Ih(t))]}}},enumerable:!1,configurable:!0}),n.prototype.addImage=function(){return function(e){return function(t,n){var r=t.schema,i=t.tr,s=e,a=s.imageUrl,l=s.altText;if(!a)return!1;var c=r.nodes.image.createAndFill(o({imageUrl:a},l&&{altText:l}));return n(i.replaceSelectionWith(c).scrollIntoView()),!0}}},n.prototype.commands=function(){return{addImage:this.addImage()}},n}(Va),vm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(e){var t=e.attrs;return["div",Ih(t),[t.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),n.prototype.hr=function(){var e=this;return function(){return function(t,n){var r,o=t.selection,i=o.$from;if(i===o.$to){var s=t.doc,a=t.schema.nodes,l=a.thematicBreak,c=a.paragraph,u=[l.create()],d=i.node(1),p=s.child(s.childCount-1)===d,h=s.resolve(i.after(1)),f=(null===(r=i.nodeAfter)||void 0===r?void 0:r.type.name)===e.name;return(p||f)&&u.push(c.create()),n(t.tr.insert(h.pos,u).scrollIntoView()),!0}return!1}}},n.prototype.commands=function(){return{hr:this.hr()}},n.prototype.keymaps=function(){var e=this.hr()();return{"Mod-l":e,"Mod-L":e}},n}(Va),ym=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){var e=["b","strong"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({},t&&{rawHTML:t})}}}));return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"strong",Ih(t)]}}},enumerable:!1,configurable:!0}),n.prototype.bold=function(){return function(){return function(e,t){return Ki(e.schema.marks.strong)(e,t)}}},n.prototype.commands=function(){return{bold:this.bold()}},n.prototype.keymaps=function(){var e=this.bold()();return{"Mod-b":e,"Mod-B":e}},n}(Al),bm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){var e=["i","em"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({},t&&{rawHTML:t})}}}));return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"em",Ih(t)]}}},enumerable:!1,configurable:!0}),n.prototype.italic=function(){return function(){return function(e,t){return Ki(e.schema.marks.emph)(e,t)}}},n.prototype.commands=function(){return{italic:this.italic()}},n.prototype.keymaps=function(){var e=this.italic()();return{"Mod-i":e,"Mod-I":e}},n}(Al),wm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){var e=["s","del"].map((function(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({},t&&{rawHTML:t})}}}));return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:e,toDOM:function(e){var t=e.attrs;return[t.rawHTML||"del",Ih(t)]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){return Ki(e.schema.marks.strike)(e,t)}}},n.prototype.keymaps=function(){var e=this.commands()();return{"Mod-s":e,"Mod-S":e}},n}(Al),km=function(e){function n(t){var n=e.call(this)||this;return n.linkAttributes=t,n}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){var e=this;return{attrs:o({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){var t=rh(e,{RETURN_DOM_FRAGMENT:!0}).firstChild,n=t.getAttribute("href")||"",r=t.getAttribute("title")||"",i=t.getAttribute("data-raw-html");return o({linkUrl:n,title:r},i&&{rawHTML:i})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"a",o(o({href:_e(n.linkUrl)},e.linkAttributes),Ih(n))]}}},enumerable:!1,configurable:!0}),n.prototype.addLink=function(){return function(e){return function(t,n){var r=e,o=r.linkUrl,i=r.linkText,s=void 0===i?"":i,a=t.schema,l=t.tr,c=t.selection,u=c.empty,d=c.from,p=c.to;if(d&&p&&o){var h={linkUrl:o},f=a.mark("link",h);if(u&&s){var m=Ns(a,s,f);l.replaceRangeWith(d,p,m)}else l.addMark(d,p,f);return n(l.scrollIntoView()),!0}return!1}}},n.prototype.toggleLink=function(){return function(e){return function(t,n){return Ki(t.schema.marks.link,e)(t,n)}}},n.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},n}(Al),xm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{attrs:o({rawHTML:{default:null}},{htmlAttrs:{default:null},classNames:{default:null}}),parseDOM:[{tag:"code",getAttrs:function(e){var t=e.getAttribute("data-raw-html");return o({},t&&{rawHTML:t})}}],toDOM:function(e){var t=e.attrs;return[t.rawHTML||"code",Ih(t)]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t){return Ki(e.schema.marks.code)(e,t)}}},n.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-c":e,"Shift-Mod-C":e}},n}(Al),Cm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(e){return{info:e.getAttribute("data-custom-info")}}}],toDOM:function(e){return["div",{"data-custom-info":e.attrs.info||null},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(e){return function(t,n){return!!(null==e?void 0:e.info)&&Gi(t.schema.nodes.customBlock,e)(t,n)}}},n}(Va),Tm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t,n){var r=e.selection.$from;return!(!n.endOfTextblock("down")||"frontMatter"!==r.node().type.name)&&qi(e,t)}}},n.prototype.keymaps=function(){return{Enter:this.commands()()}},n}(Va),Mm=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),n.prototype.commands=function(){return function(){return function(e,t,n){var r=e.selection.$from;return!(!n.endOfTextblock("down")||"htmlComment"!==r.node().type.name)&&qi(e,t)}}},n.prototype.keymaps=function(){return{Enter:this.commands()()}},n}(Va);var Sm=xa("contents"),Em=function(e){function n(t,n){var r=e.call(this,t)||this,i=n.toDOMAdaptor,s=n.htmlSchemaMap,a=void 0===s?{}:s,l=n.linkAttributes,c=void 0===l?{}:l,u=n.useCommandShortcut,d=void 0===u||u,p=n.wwPlugins,h=void 0===p?[]:p,f=n.wwNodeViews,m=void 0===f?{}:f;return r.editorType="wysiwyg",r.el.classList.add("ww-mode"),r.toDOMAdaptor=i,r.linkAttributes=c,r.extraPlugins=h,r.pluginNodeViews=m,r.specs=r.createSpecs(),r.schema=r.createSchema(a),r.context=r.createContext(),r.keymaps=r.createKeymaps(d),r.view=r.createView(),r.commands=r.createCommands(),r.specs.setContext(o(o({},r.context),{view:r.view})),r.initEvent(),r}return t(n,e),n.prototype.createSpecs=function(){return e=this.linkAttributes,new Qa([new Gf,new Kf,new Xf,new Qf,new Yf,new em,new tm,new nm,new rm,new um,new dm,new pm,new hm,new fm,new mm,new gm,new vm,new ym,new bm,new wm,new km(e),new xm,new Cm,new Tm,new _a,new Mm]);var e},n.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},n.prototype.createSchema=function(e){return new Y({nodes:o(o({},this.specs.nodes),e.nodes),marks:o(o({},this.specs.marks),e.marks)})},n.prototype.createPlugins=function(){return i([new an({key:tf,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(tf);if(n)return-1===n?null:n;if(Ae()(t)||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:sf,createSelectionBetween:function(e){var t=e.state;return Ae()(tf.getState(t))?null:t.selection}},view:function(e){return new rf(e)}}),gf(this.eventEmitter),new an({props:{handleDOMEvents:{mousedown:function(e,t){var n=t,r=n.clientX,i=n.clientY,s=e.posAtCoords({left:r,top:i});if(s){var a=e.state,l=a.doc,c=a.tr,u=l.resolve(s.pos),d=Oh(u),p=t.target,h=getComputedStyle(p,":before"),f=t,m=f.offsetX,g=f.offsetY;if(!d||!wa(h,m,g))return!1;t.preventDefault();var v=u.before(d.depth),y=d.node.attrs;return c.setNodeMarkup(v,null,o(o({},y),{checked:!y.checked})),e.dispatch(c),!0}return!1}}}}),kf(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins)},n.prototype.createPluginNodeViews=function(){var e=this.eventEmitter,t=this.pluginNodeViews,n={};return t&&Object.keys(t).forEach((function(r){n[r]=function(n,o,i){return t[r](n,o,i,e)}})),n},n.prototype.createView=function(){var e=this,t=this.toDOMAdaptor,n=this.eventEmitter;return new ui(this.el,{state:this.createState(),attributes:{class:Sm},nodeViews:o({customBlock:function(e,n,r){return new xf(e,n,r,t)},image:function(e,t,r){return new Tf(e,t,r,n)},codeBlock:function(e,t,r){return new Mf(e,t,r,n)},widget:ja},this.createPluginNodeViews()),dispatchTransaction:function(t){var n=e.view.state.applyTransaction(t).state;e.view.updateState(n),e.emitChangeEvent(t.scrollIntoView()),e.eventEmitter.emit("setFocusedNode",n.selection.$from.node(1))},transformPastedHTML:Ff,transformPasted:function(t){return _f(t,e.schema,Nh(e.view.state.selection.$from))},handlePaste:function(e,t,n){return Wf(e,n)},handleKeyDown:function(t,n){return e.eventEmitter.emit("keydown",e.editorType,n),!1},handleDOMEvents:{paste:function(t,n){var r=n.clipboardData||window.clipboardData,o=null==r?void 0:r.items;if(o){var i=vi()(o).some((function(e){return"string"===e.kind&&"text/rtf"===e.type}));if(!i){var s=za(o);s&&(n.preventDefault(),Ha(e.eventEmitter,s,n.type))}}return!1},keyup:function(t,n){return e.eventEmitter.emit("keyup",e.editorType,n),!1},scroll:function(){return e.eventEmitter.emit("scroll","editor"),!0}}})},n.prototype.createCommands=function(){return this.specs.commands(this.view,qh())},n.prototype.getHTML=function(){return La(this.view.dom.innerHTML)},n.prototype.getModel=function(){return this.view.state.doc},n.prototype.getSelection=function(){var e=this.view.state.selection;return[e.from,e.to]},n.prototype.getSchema=function(){return this.view.state.schema},n.prototype.replaceSelection=function(e,t,n){var r=this.view.state,o=r.schema,i=r.tr,s=e.split("\n").map((function(e){return Es(o,ra(e,o))})),a=new v(d.from(s),1,1),l=Ee()(t)&&Ee()(n)?i.replaceRange(t,n,a):i.replaceSelection(a);this.view.dispatch(l),this.focus()},n.prototype.deleteSelection=function(e,t){var n=this.view.state.tr,r=Ee()(e)&&Ee()(t)?n.deleteRange(e,t):n.deleteSelection();this.view.dispatch(r.scrollIntoView())},n.prototype.getSelectedText=function(e,t){var n=this.view.state,r=n.doc,o=n.selection,i=o.from,s=o.to;return Ee()(e)&&Ee()(t)&&(i=e,s=t),r.textBetween(i,s,"\n")},n.prototype.setModel=function(e,t){void 0===t&&(t=!1);var n=this.view.state,r=n.tr,o=n.doc;this.view.dispatch(r.replaceWith(0,o.content.size,e)),t&&this.moveCursorToEnd(!0)},n.prototype.setSelection=function(e,t){void 0===t&&(t=e);var n=this.view.state.tr,r=Os(n,e,t);this.view.dispatch(n.setSelection(r).scrollIntoView())},n.prototype.addWidget=function(e,t,n){var r=this.view,o=r.dispatch,i=r.state;o(i.tr.setMeta("widget",{pos:null!=n?n:i.selection.to,node:e,style:t}))},n.prototype.replaceWithWidget=function(e,t,n){var r=this.view.state,o=r.tr,i=ra(n,r.schema);this.view.dispatch(o.replaceWith(e,t,i))},n.prototype.getRangeInfoOfNode=function(e){var t=this.view.state,n=t.doc,r=t.selection,o=e?n.resolve(e):r.$from,i=o.marks(),s=o.node(),a=o.start(),l=o.end(),c=s.type.name;if(i.length||"paragraph"===c){var u=i[i.length-1];c=u?u.type.name:"text",s.forEach((function(e,t){var n=e.isText,r=e.nodeSize,i=e.marks,s=o.pos-a;n&&t<=s&&t+r>=s&&function(e){return!e.length||Ue(e,u)}(i)&&(l=(a+=t)+r)}))}return{range:[a,l],type:c}},n}(Wa),Nm=Em,Om=n(404),Dm=n.n(Om),Am=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],Lm=function(){function e(){var e=this;this.events=new uf,this.eventTypes=Am.reduce((function(e,t){return o(o({},e),{type:t})}),{}),this.hold=!1,Am.forEach((function(t){e.addEventType(t)}))}return e.prototype.listen=function(e,t){var n=this.getTypeInfo(e),r=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),r.push(t),this.events.set(n.type,r)},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getTypeInfo(e),o=this.events.get(r.type),i=[];return!this.hold&&o&&o.forEach((function(e){var n=e.apply(void 0,t);Oe()(n)||i.push(n)})),i},e.prototype.emitReduce=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this.events.get(e);return!this.hold&&o&&o.forEach((function(e){var r=e.apply(void 0,i([t],n));Dm()(r)||(t=r)})),t},e.prototype.getTypeInfo=function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}},e.prototype.hasEventType=function(e){return!Oe()(this.eventTypes[this.getTypeInfo(e).type])},e.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},e.prototype.removeEventHandler=function(e,t){var n=this,r=this.getTypeInfo(e),o=r.type,i=r.namespace;o&&t?this.removeEventHandlerWithHandler(o,t):o&&!i?this.events.delete(o):!o&&i?this.events.forEach((function(e,t){n.removeEventHandlerWithTypeInfo(t,i)})):o&&i&&this.removeEventHandlerWithTypeInfo(o,i)},e.prototype.removeEventHandlerWithHandler=function(e,t){var n=this.events.get(e);if(n){var r=n.indexOf(t);n.indexOf(t)>=0&&n.splice(r,1)}},e.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],r=this.events.get(e);r&&(r.map((function(e){return e.namespace!==t&&n.push(e),null})),this.events.set(e,n))},e.prototype.getEvents=function(){return this.events},e.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},e}(),Im=Lm,Rm=function(){function e(e,t,n,r){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=r,this.initEvent()}return e.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",(function(t,n){e.exec(t,n)}))},e.prototype.addCommand=function(e,t,n){"markdown"===e?this.mdCommands[t]=n:this.wwCommands[t]=n},e.prototype.deleteCommand=function(e,t){"markdown"===e?delete this.mdCommands[t]:delete this.wwCommands[t]},e.prototype.exec=function(e,t){"markdown"===this.getEditorType()?this.mdCommands[e](t):this.wwCommands[e](t)},e}(),Pm=Rm;function Bm(e){return"\n"===e[e.length-1]?e.slice(0,e.length-1):e}function Fm(e,t){var n=e.schema,r=t.literal.match(ga);if(r){var o=r[1],i=r[3],s=(o||i).toLowerCase();return"htmlInline"===t.type&&!(!n.marks[s]&&!n.nodes[s])}return!1}function Hm(e){return Ue(["text","strong","emph","strike","image","link","code"],e.type)}function zm(e){return"softbreak"===(null==e?void 0:e.type)}function qm(e){var t=e.type,n=e.literal,r="htmlInline"===t&&n.match(ga);if(r){var o=r[1],i=r[3],s=o||i;if(s)return Ue(["ul","ol","li"],s.toLowerCase())}return!1}function Vm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=document.createElement("div");r.innerHTML=rh(e);var o=r.firstChild;return t.map((function(e){return o.getAttribute(e)||""}))}var jm={"b, strong":function(e,t,n){var r=e.schema.marks.strong;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},"i, em":function(e,t,n){var r=e.schema.marks.emph;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},"s, del":function(e,t,n){var r=e.schema.marks.strike;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},code:function(e,t,n){var r=e.schema.marks.code;n?e.openMark(r.create({rawHTML:n})):e.closeMark(r)},a:function(e,t,n){var r=t.literal,o=e.schema.marks.link;if(n){var i=Vm(r,"href")[0];e.openMark(o.create({linkUrl:i,rawHTML:n}))}else e.closeMark(o)},img:function(e,t,n){var r=t.literal;if(n){var i=Vm(r,"src","alt"),s=i[0],a=i[1],l=e.schema.nodes.image;e.addNode(l,o({rawHTML:n,imageUrl:s},a&&{altText:a}))}},hr:function(e,t,n){e.addNode(e.schema.nodes.thematicBreak,{rawHTML:n})},br:function(e,t){var n=e.schema.nodes.paragraph,r=t.parent,o=t.prev,i=t.next;"paragraph"===(null==r?void 0:r.type)?(zm(o)&&e.openNode(n),zm(i)?e.closeNode():i&&(e.closeNode(),e.openNode(n))):"tableCell"===(null==r?void 0:r.type)&&(o&&(Hm(o)||Fm(e,o))&&e.closeNode(),i&&(Hm(i)||Fm(e,i))&&e.openNode(n))},pre:function(e,t,n){var r,o,i=document.createElement("div");i.innerHTML=t.literal;var s=null===(o=null===(r=i.firstChild)||void 0===r?void 0:r.firstChild)||void 0===o?void 0:o.textContent;e.openNode(e.schema.nodes.codeBlock,{rawHTML:n}),e.addText(Bm(s)),e.closeNode()},"ul, ol":function(e,t,n){if("tableCell"===t.parent.type){var r=e.schema.nodes,o=r.bulletList,i=r.orderedList,s=r.paragraph,a="ul"===n?o:i;n?(t.prev&&!qm(t.prev)&&e.closeNode(),e.openNode(a,{rawHTML:n})):(e.closeNode(),t.next&&!qm(t.next)&&e.openNode(s))}},li:function(e,t,n){var r;if("tableCell"===(null===(r=t.parent)||void 0===r?void 0:r.type)){var i=e.schema.nodes,s=i.listItem,a=i.paragraph;if(n){var l=function(e){var t=e.literal;return{task:/data-task/.test(t),checked:/data-task-checked/.test(t)}}(t);t.prev&&!qm(t.prev)&&e.closeNode(),e.openNode(s,o({rawHTML:n},l)),t.next&&!qm(t.next)&&e.openNode(a)}else t.prev&&!qm(t.prev)&&e.closeNode(),e.closeNode()}}},$m=function(e){var t={};return Object.keys(e).forEach((function(n){n.split(", ").forEach((function(r){var o=r.toLowerCase();t[o]=e[n]}))})),t}(jm);function _m(e){return"htmlInline"===e.type&&va.test(e.literal)}function Um(e){vi()(e.childNodes).forEach((function(e){if(Ta(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&Um(e)}}))}var Wm={text:function(e,t){e.addText(t.literal||"")},paragraph:function(e,t,n,r){var o;if(n.entering){var i=e.schema.nodes.paragraph;"paragraph"===(null===(o=t.prev)||void 0===o?void 0:o.type)&&(e.openNode(i,r),e.closeNode()),e.openNode(i,r)}else e.closeNode()},heading:function(e,t,n,r){if(n.entering){var i=t,s=i.level,a=i.headingType;e.openNode(e.schema.nodes.heading,o({level:s,headingType:a},r))}else e.closeNode()},codeBlock:function(e,t,n){var r=e.schema.nodes.codeBlock,i=t,s=i.info,a=i.literal;e.openNode(r,o({language:s},n)),e.addText(Bm(a||"")),e.closeNode()},list:function(e,t,n,r){if(n.entering){var i=e.schema.nodes,s=i.bulletList,a=i.orderedList,l=t.listData,c=l.type,u=l.start;"bullet"===c?e.openNode(s,r):e.openNode(a,o({order:u},r))}else e.closeNode()},item:function(e,t,n,r){var i=n.entering,s=e.schema.nodes.listItem,a=t.listData,l=a.task,c=a.checked;if(i){var u=o(o(o({},l&&{task:l}),c&&{checked:c}),r);e.openNode(s,u)}else e.closeNode()},blockQuote:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.blockQuote,r):e.closeNode()},image:function(e,t,n,r){var i=n.entering,s=n.skipChildren,a=e.schema.nodes.image,l=t,c=l.destination,u=l.firstChild;i&&s&&s(),e.addNode(a,o(o({imageUrl:c},u&&{altText:u.literal}),r))},thematicBreak:function(e,t,n,r){e.addNode(e.schema.nodes.thematicBreak,r)},strong:function(e,t,n,r){var o=n.entering,i=e.schema.marks.strong;o?e.openMark(i.create(r)):e.closeMark(i)},emph:function(e,t,n,r){var o=n.entering,i=e.schema.marks.emph;o?e.openMark(i.create(r)):e.closeMark(i)},link:function(e,t,n,r){var i=n.entering,s=e.schema.marks.link,a=t,l=a.destination,c=a.title;if(i){var u=o({linkUrl:l,title:c},r);e.openMark(s.create(u))}else e.closeMark(s)},softbreak:function(e,t){if("paragraph"===t.parent.type){var n=t.prev,r=t.next;n&&!_m(n)&&e.closeNode(),r&&!_m(r)&&e.openNode(e.schema.nodes.paragraph)}},table:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.table,r):e.closeNode()},tableHead:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableHead,r):e.closeNode()},tableBody:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableBody,r):e.closeNode()},tableRow:function(e,t,n,r){n.entering?e.openNode(e.schema.nodes.tableRow,r):e.closeNode()},tableCell:function(e,t,n){var r=n.entering;if(!t.ignored){var i=function(t){return t&&(Hm(t)||Fm(e,t))};if(r){var s=e.schema.nodes,a=s.tableHeadCell,l=s.tableBodyCell,c=s.paragraph,u=t.parent.parent,d="tableHead"===u.type?a:l,p=(u.parent.columns[t.startIdx]||{}).align,h=o({},t.attrs);p&&(h.align=p),e.openNode(d,h),i(t.firstChild)&&e.openNode(c)}else i(t.lastChild)&&e.closeNode(),e.closeNode()}},strike:function(e,t,n,r){var o=n.entering,i=e.schema.marks.strike;o?e.openMark(i.create(r)):e.closeMark(i)},code:function(e,t,n,r){var o=e.schema.marks.code;e.openMark(o.create(r)),e.addText(Bm(t.literal||"")),e.closeMark(o)},customBlock:function(e,t){var n=e.schema.nodes,r=n.customBlock,o=n.paragraph,i=t,s=i.info,a=i.literal;e.openNode(r,{info:s}),e.addText(Bm(a||"")),e.closeNode(),t.next||(e.openNode(o),e.closeNode())},frontMatter:function(e,t){e.openNode(e.schema.nodes.frontMatter),e.addText(t.literal),e.closeNode()},htmlInline:function(e,t){var n=t.literal,r=n.match(ga),o=r[1],i=r[3],s=(o||i).toLowerCase(),a=e.schema.marks[s],l=rh(n);if(null==a?void 0:a.spec.attrs.htmlInline)if(o){var c=ih(l);e.openMark(a.create({htmlAttrs:c}))}else e.closeMark(a);else{var u=$m[s];u&&u(e,t,o)}},htmlBlock:function(e,t){var n=t.literal,r=document.createElement("div");if(ya.test(n))e.openNode(e.schema.nodes.htmlComment),e.addText(t.literal),e.closeNode();else{var o=n.match(ga),i=o[1],s=o[3],a=(i||s).toLowerCase(),l=e.schema.nodes[a],c=rh(n);if(null==l?void 0:l.spec.attrs.htmlBlock){var u=ih(c),d=oh(t,a);e.addNode(l,{htmlAttrs:u,childrenHTML:d})}else r.innerHTML=c,Um(r),e.convertByDOMParser(r)}},customInline:function(e,t,n){var r=n.entering,o=n.skipChildren,i=t,s=i.info,a=i.firstChild,l=e.schema;if(-1!==s.indexOf("widget")&&r){var c=oa(t);o(),e.addNode(l.nodes.widget,{info:s},[l.text(Qs(s,c))])}else{var u="$$";r&&(u+=a?s+" ":s),e.addText(u)}}};var Jm=function(){function e(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=m.none}return e.prototype.top=function(){return et(this.stack)},e.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},e.prototype.addText=function(e){if(e){var t=this.top().content,n=et(t),r=this.schema.text(e,this.marks),o=n&&(s=r,!!((i=n).isText&&s.isText&&m.sameSet(i.marks,s.marks))&&i.withText(i.text+s.text));o?t[t.length-1]=o:t.push(r)}var i,s},e.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},e.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},e.prototype.addNode=function(e,t,n){var r=e.createAndFill(t,n,this.marks);return r?(this.push(r),r):null},e.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},e.prototype.closeNode=function(){this.marks.length&&(this.marks=m.none);var e=this.stack.pop(),t=e.type,n=e.attrs,r=e.content;return this.addNode(t,n,r)},e.prototype.convertByDOMParser=function(e){var t=this;te.fromSchema(this.schema).parse(e).content.forEach((function(e){return t.push(e)}))},e.prototype.closeUnmatchedHTMLInline=function(e,t){var n;if(!t&&"htmlInline"!==e.type)for(var r=this.stack.length-1;r>=0;r-=1){var o=this.stack[r];if(!(null===(n=o.attrs)||void 0===n?void 0:n.rawHTML))break;o.content.length?this.closeNode():this.stack.pop()}},e.prototype.convert=function(e,t){for(var n=e.walker(),r=n.next(),o=function(){var e=r.node,o=r.entering,s=i.convertors[e.type],a=!1;if(s){var l={entering:o,leaf:!Ws(e),getChildrenText:Js,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:"\n"},skipChildren:function(){a=!0}};if(i.closeUnmatchedHTMLInline(e,o),s(i,e,l),(null==t?void 0:t.node)===e){var c=i.stack.reduce((function(e,t){return e+t.content.reduce((function(e,t){return e+t.nodeSize}),0)}),0)+1;t.setMappedPos(c)}}a&&(n.resumeAt(e,!1),n.next()),r=n.next()},i=this;r;)o()},e.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},e}(),Gm=Jm;var Km={text:function(e,t){var n,r=t.node,o=null!==(n=r.text)&&void 0!==n?n:"";(r.marks||[]).some((function(e){return"link"===e.type.name}))?e.text(Ze(o),!1):e.text(o)},paragraph:function(e,t){var n=t.node,r=t.parent,o=t.index,i=void 0===o?0:o;if(e.stopNewline)e.convertInline(n);else{var s=0===i,a=!s&&r.child(i-1),l=a&&0===a.childCount,c=i<r.childCount-1&&r.child(i+1),u=c&&"paragraph"===c.type.name,d=0===n.childCount;if(d&&l)e.write("<br>\n");else if(!d||l||s)e.convertInline(n),u?e.write("\n"):e.closeBlock(n);else{if("listItem"===(null==r?void 0:r.type.name)){var p=e.getDelim();e.setDelim(""),e.write("<br>"),e.setDelim(p)}e.write("\n")}}},heading:function(e,t,n){var r=t.node,o=n.delim;"atx"===r.attrs.headingType?(e.write(o+" "),e.convertInline(r),e.closeBlock(r)):(e.convertInline(r),e.ensureNewLine(),e.write(o),e.closeBlock(r))},codeBlock:function(e,t,n){var r=t.node,o=n.delim,i=n.text,s=o,a=s[0],l=s[1];e.write(a),e.ensureNewLine(),e.text(i,!1),e.ensureNewLine(),e.write(l),e.closeBlock(r)},blockQuote:function(e,t,n){var r=t.node,o=t.parent,i=n.delim;(null==o?void 0:o.type.name)===r.type.name&&e.flushClose(1),e.wrapBlock(i,null,r,(function(){return e.convertNode(r)}))},bulletList:function(e,t,n){var r=t.node,o=n.delim;e.convertList(r,Ke(" ",4),(function(){return o+" "}))},orderedList:function(e,t){var n=t.node,r=n.attrs.order||1;e.convertList(n,Ke(" ",4),(function(e){return String(r+e)+". "}))},listItem:function(e,t){var n=t.node,r=n.attrs,o=r.task,i=r.checked;o&&e.write("["+(i?"x":" ")+"] "),e.convertNode(n)},image:function(e,t,n){var r=n.attrs;e.write("!["+(null==r?void 0:r.altText)+"]("+(null==r?void 0:r.imageUrl)+")")},thematicBreak:function(e,t,n){var r=t.node,o=n.delim;e.write(o),e.closeBlock(r)},table:function(e,t){var n=t.node;e.convertNode(n),e.closeBlock(n)},tableHead:function(e,t,n){var r=t.node,o=n.delim,i=r.firstChild;e.convertNode(r);var s=null!=o?o:"";!o&&i&&i.forEach((function(e){var t=function(e,t){var n=e.length,r="",o="";return"left"===t?(r=":",n-=1):"right"===t?(o=":",n-=1):"center"===t&&(r=":",o=":",n-=2),""+r+Ke("-",Math.max(n,3))+o}(e.textContent,e.attrs.align);s+="| "+t+" "})),e.write(s+"|"),e.ensureNewLine()},tableBody:function(e,t){var n=t.node;e.convertNode(n)},tableRow:function(e,t){var n=t.node;e.convertNode(n),e.write("|"),e.ensureNewLine()},tableHeadCell:function(e,t,n){var r=t.node,o=n.delim,i=void 0===o?"| ":o;e.write(i),e.convertTableCell(r),e.write(" ")},tableBodyCell:function(e,t,n){var r=t.node,o=n.delim,i=void 0===o?"| ":o;e.write(i),e.convertTableCell(r),e.write(" ")},customBlock:function(e,t,n){var r=t.node,o=n.delim,i=n.text,s=o,a=s[0],l=s[1];e.write(a),e.ensureNewLine(),e.text(i,!1),e.ensureNewLine(),e.write(l),e.closeBlock(r)},frontMatter:function(e,t,n){var r=t.node,o=n.text;e.text(o,!1),e.closeBlock(r)},widget:function(e,t,n){var r=n.text;e.write(r)},html:function(e,t,n){var r=t.node,o=n.text;e.write(o),r.attrs.htmlBlock&&e.closeBlock(r)},htmlComment:function(e,t,n){var r=t.node,o=n.text;e.write(o),e.closeBlock(r)}};function Zm(e,t){var n=e.text,r=/`+/g,o=0;if(e.isText&&n)for(var i=r.exec(n);i;)o=Math.max(o,i[0].length),i=r.exec(n);for(var s=o>0&&t>0?" `":"`",a=0;a<o;a+=1)s+="`";return o>0&&t<0&&(s+=" "),s}function Xm(e){return e?["<"+e+">","</"+e+">"]:null}function Qm(e){return e?"<"+e+">":null}function Ym(e){return e?"</"+e+">":null}var eg={heading:function(e){var t=e.node.attrs,n=t.level,r=Ke("#",n);return"setext"===t.headingType&&(r=1===n?"===":"---"),{delim:r,rawHTML:Xm(t.rawHTML)}},codeBlock:function(e){var t=e.node,n=t.attrs,r=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:Xm(n.rawHTML),text:r}},blockQuote:function(e){return{delim:"> ",rawHTML:Xm(e.node.attrs.rawHTML)}},bulletList:function(e,t){var n=e.node,r=t.inTable,o=n.attrs.rawHTML;return r&&(o=o||"ul"),{delim:"*",rawHTML:Xm(o)}},orderedList:function(e,t){var n=e.node,r=t.inTable,o=n.attrs.rawHTML;return r&&(o=o||"ol"),{rawHTML:Xm(o)}},listItem:function(e,t){var n=e.node,r=t.inTable,o=n.attrs,i=o.task,s=o.checked,a=n.attrs.rawHTML;return r&&(a=a||"li"),{rawHTML:a?["<"+a+(i?' class="task-list-item'+(s?" checked":"")+'"':"")+(i?" data-task"+(s?" data-task-checked":""):"")+">","</"+a+">"]:null}},table:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},tableHead:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},tableBody:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},tableRow:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},tableHeadCell:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},tableBodyCell:function(e){return{rawHTML:Xm(e.node.attrs.rawHTML)}},image:function(e){var t=e.node.attrs,n=t.rawHTML,r=t.altText,o=t.imageUrl.replace(/&amp;/g,"&"),i=r?' alt="'+_e(r)+'"':"";return{rawHTML:n?"<"+n+' src="'+_e(o)+'"'+i+">":null,attrs:{altText:Ze(r||""),imageUrl:o}}},thematicBreak:function(e){return{delim:"***",rawHTML:Qm(e.node.attrs.rawHTML)}},customBlock:function(e){var t=e.node,n=t.attrs,r=t.textContent;return{delim:["$$"+n.info,"$$"],text:r}},frontMatter:function(e){return{text:e.node.textContent}},widget:function(e){return{text:e.node.textContent}},strong:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"**",rawHTML:r?Qm(o):Ym(o)}},emph:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"*",rawHTML:r?Qm(o):Ym(o)}},strike:function(e,t){var n=e.node,r=t.entering,o=n.attrs.rawHTML;return{delim:"~~",rawHTML:r?Qm(o):Ym(o)}},link:function(e,t){var n,r,o=e.node,i=t.entering,s=o.attrs,a=s.title,l=s.rawHTML,c=s.linkUrl.replace(/&amp;/g,"&"),u=a?' title="'+_e(a)+'"':"";return i?{delim:"[",rawHTML:l?"<"+l+' href="'+_e(c)+'"'+u+">":null}:{delim:"]("+c+(a?" "+(n=Ze(a),(r=-1===n.indexOf('"')?'""':-1===n.indexOf("'")?"''":"()")[0]+n+r[1]):"")+")",rawHTML:Ym(l)}},code:function(e,t){var n=e.node,r=e.parent,o=e.index,i=void 0===o?0:o,s=t.entering;return{delim:s?Zm(r.child(i),-1):Zm(r.child(i-1),1),rawHTML:s?Qm(n.attrs.rawHTML):Ym(n.attrs.rawHTML)}},htmlComment:function(e){return{text:e.node.textContent}},html:function(e,t){var n=e.node,r=t.entering,o=n.type.name,i=n.attrs.htmlAttrs,s="<"+o,a="</"+o+">";return Object.keys(i).forEach((function(e){s+=" "+e+'="'+i[e].replace(/"/g,"'")+'"'})),s+=">",n.attrs.htmlInline?{rawHTML:r?s:a}:{text:""+s+n.attrs.childrenHTML+a}}},tg={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function ng(e){var t={};return Object.keys(Km).forEach((function(n){t[n]=function(t,r){if(Km[n]){var o=e[n],i=o?o(r,{inTable:t.inTable}):{};!function(e,t){var n=t.state,r=t.nodeInfo,o=t.params,i=o.rawHTML;i?lf()(e,["heading","codeBlock"])>-1?function(e,t,n){var r=n[0],o=n[1];e.write(r),e.convertInline(t),e.write(o)}(n,r.node,i):lf()(e,["image","thematicBreak"])>-1?n.write(i):function(e,t,n){var r=t.node,o=t.parent,i=n[0],s=n[1];e.stopNewline=!0,e.write(i),e.convertNode(r),e.write(s),"doc"===(null==o?void 0:o.type.name)&&(e.closeBlock(r),e.stopNewline=!1)}(n,r,i):Km[e](n,r,o)}(n,{state:t,nodeInfo:r,params:i})}}})),t}function rg(e){Object.keys(e).forEach((function(t){var n=eg[t],r=e[t];eg[t]=n?function(e,t){return t.origin=function(){return n(e,t)},r(e,t)}:r,delete e[t]}));var t=ng(eg),n=function(e){var t={};return Object.keys(tg).forEach((function(n){t[n]=function(t,r){var i=tg[n],s=e[n],a=s&&t&&!Oe()(r)?s(t,{entering:r}):{};return o(o({},a),i)}})),t}(eg);return{nodeTypeConvertors:t,markTypeConvertors:n}}var og=function(){function e(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return e.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},e.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},e.prototype.markText=function(e,t,n,r){var o=this.getMarkConvertor(e);if(o){var i=o({node:e,parent:n,index:r},t),s=i.delim;return i.rawHTML||s}return""},e.prototype.setDelim=function(e){this.delim=e},e.prototype.getDelim=function(){return this.delim},e.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+="\n"),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var r=1;r<e;r+=1)this.result+=t+"\n"}this.closed=!1}},e.prototype.wrapBlock=function(e,t,n,r){var o=this.getDelim();this.write(t||e),this.setDelim(this.getDelim()+e),r(),this.setDelim(o),this.closeBlock(n)},e.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+="\n")},e.prototype.write=function(e){void 0===e&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},e.prototype.closeBlock=function(e){this.closed=e},e.prototype.text=function(e,t){void 0===t&&(t=!0);for(var n=e.split("\n"),r=0;r<n.length;r+=1)this.write(),this.result+=t?Xe(n[r]):n[r],r!==n.length-1&&(this.result+="\n")},e.prototype.convertBlock=function(e,t,n){var r=e.type.name,o=this.nodeTypeConvertors[r],i={node:e,parent:t,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,i):o&&o(this,i)},e.prototype.convertInline=function(e){var t=this,n=[],r="",o=function(o,i,s){var a=o?o.marks:[],l=r;r="";var c=o&&o.isText&&a.some((function(e){var n=t.getMarkConvertor(e),r=n&&n();return r&&r.removedEnclosingWhitespace}));if(c&&o&&o.text){var u=/^(\s*)(.*?)(\s*)$/m.exec(o.text),d=u[1],p=u[2],h=u[3];l+=d,r=h,(d||h)&&((o=p?o.withText(p):null)||(a=n))}for(var f=a.length&&et(a),m=f&&t.getMarkConvertor(f),g=m&&m(),v=g&&!1===g.escape,y=a.length-(v?1:0),b=0;b<y;b+=1){p=a[b];if(g&&!g.mixable)break;for(var w=0;w<n.length;w+=1){var k=n[w];if(g&&!g.mixable)break;if(p.eq(k)){b>w?a=a.slice(0,w).concat(p).concat(a.slice(w,b)).concat(a.slice(b+1,y)):w>b&&(a=a.slice(0,b).concat(a.slice(b+1,w)).concat(p).concat(a.slice(w,y)));break}}}for(var x=0;x<Math.min(n.length,y)&&a[x].eq(n[x]);)x+=1;for(;x<n.length;){var C=n.pop();C&&t.text(t.markText(C,!1,e,s),!1)}if(l&&t.text(l),o){for(;n.length<y;){p=a[n.length];n.push(p),t.text(t.markText(p,!0,e,s),!1)}v&&o.isText?t.text(t.markText(f,!0,e,s)+o.text+t.markText(f,!1,e,s+1),!1):t.convertBlock(o,e,s)}};e.forEach(o),o(null,0,e.childCount)},e.prototype.convertList=function(e,t,n){var r,o=this;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var i=null===(r=e.attrs.tight)||void 0===r||r,s=this.tightList;this.tightList=i,e.forEach((function(r,s,a){a&&i&&o.flushClose(1),o.wrapBlock(t,n(a),e,(function(){return o.convertBlock(r,e,a)}))})),this.tightList=s},e.prototype.convertTableCell=function(e){var t=this;this.stopNewline=!0,this.inTable=!0,e.forEach((function(n,r,o){Ue(["bulletList","orderedList"],n.type.name)?(t.convertBlock(n,e,o),t.closed=!1):(t.convertInline(n),o<e.childCount-1&&"paragraph"===e.child(o+1).type.name&&t.write("<br>"))})),this.stopNewline=!1,this.inTable=!1},e.prototype.convertNode=function(e,t){var n=this;return e.forEach((function(r,o,i){if(n.convertBlock(r,e,i),(null==t?void 0:t.node)===r){var s=n.result.split("\n");t.setMappedPos([s.length,et(s).length+1])}})),this.result},e}(),ig=og,sg=function(){function e(e,t,n,r){var i=this;this.setMappedPos=function(e){i.mappedPosWhenConverting=e},this.schema=e,this.eventEmitter=r,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=function(e){var t=Object.keys(e),n=o({},Wm),r=new Xp({gfm:!0,nodeId:!0,convertors:e}).getConvertors();return t.forEach((function(t){var o=Wm[t];o&&!Ue(["htmlBlock","htmlInline"],t)&&(n[t]=function(n,i,s){s.origin=function(){return r[t](i,s,r)};var a,l=e[t](i,s);if(l){var c=Array.isArray(l)?l[0]:l;a={htmlAttrs:c.attributes,classNames:c.classNames}}o(n,i,s,a)})})),n}(n),this.toMdConvertors=rg(t||{}),this.eventEmitter.listen("setFocusedNode",(function(e){return i.focusedNode=e}))}return e.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},e.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},e.prototype.toWysiwygModel=function(e){return new Gm(this.schema,this.toWwConvertors).convertNode(e,this.getInfoForPosSync())},e.prototype.toMarkdownText=function(e){var t=new ig(this.toMdConvertors).convertNode(e,this.getInfoForPosSync());return t=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",t)},e}(),ag=sg;function lg(e){var t=e.plugins,n=e.eventEmitter,r=e.usageStatistics,i=e.instance;return n.listen("mixinTableOffsetMapPrototype",_h),(null!=t?t:[]).reduce((function(e,t){var s=function(e){var t=e.plugin,n={eventEmitter:e.eventEmitter,usageStatistics:e.usageStatistics,instance:e.instance,pmState:{Plugin:an,PluginKey:un,Selection:Vt,TextSelection:Ut},pmView:{Decoration:Vo,DecorationSet:_o},pmModel:{Fragment:d},pmRules:{InputRule:ns,inputRules:rs,undoInputRule:ss},pmKeymap:{keymap:Ai},i18n:hf};if(aa()(t)){var r=t[0],o=t[1];return r(n,void 0===o?{}:o)}return t(n)}({plugin:t,eventEmitter:n,usageStatistics:r,instance:i});if(!s)throw new Error("The return value of the executed plugin is empty.");var a=s.markdownParsers,l=s.toHTMLRenderers,c=s.toMarkdownRenderers,u=s.markdownPlugins,p=s.wysiwygPlugins,h=s.wysiwygNodeViews,f=s.markdownCommands,m=s.wysiwygCommands,g=s.toolbarItems;return l&&(e.toHTMLRenderers=nt(e.toHTMLRenderers,l)),c&&(e.toMarkdownRenderers=nt(e.toMarkdownRenderers,c)),u&&(e.mdPlugins=e.mdPlugins.concat(u)),p&&(e.wwPlugins=e.wwPlugins.concat(p)),h&&(e.wwNodeViews=o(o({},e.wwNodeViews),h)),f&&(e.mdCommands=o(o({},e.mdCommands),f)),m&&(e.wwCommands=o(o({},e.wwCommands),m)),g&&(e.toolbarItems=e.toolbarItems.concat(g)),a&&(e.markdownParsers=o(o({},e.markdownParsers),a)),e}),{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var cg=function(){function e(e){var t=this;this.options=ve()({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new Im;var n,r=Ge(this.options.linkAttributes),i=lg({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},s=i.toHTMLRenderers,a=i.markdownParsers,l=this.options,c=l.customHTMLRenderer,u=l.extendedAutolinks,d=l.referenceDefinition,p=l.frontMatter,h=l.customHTMLSanitizer,f={linkAttributes:r,customHTMLRenderer:o(o({},s),c),extendedAutolinks:u,referenceDefinition:d,frontMatter:p,sanitizer:h||rh};n=f.customHTMLRenderer,["htmlBlock","htmlInline"].forEach((function(e){n[e]&&Object.keys(n[e]).forEach((function(e){return nh(e)}))})),this.options.events&&me()(this.options.events,(function(e,n){t.on(n,e)}));var m=this.options,g=m.el,v=m.initialValue,y=m.theme,b=g.innerHTML;"light"!==y&&g.classList.add(xa(y)),g.innerHTML="",this.toastMark=new _p("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:u,referenceDefinition:d,disallowDeepHeading:!0,frontMatter:p,customParser:a}),this.preview=new Mh(this.eventEmitter,o(o({},f),{isViewer:!0})),Vc()(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),v?this.setMarkdown(v):b&&this.preview.setHTML(b),g.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return e.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute("data-task-disabled")&&t.hasAttribute("data-task")&&wa(n,e.offsetX,e.offsetY)&&(Sa(t,"checked"),this.eventEmitter.emit("change",{source:"viewer",date:e}))},e.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=[t.length,et(t).length+1],r=this.toastMark.editMarkdown([1,1],n,e||"");this.eventEmitter.emit("updatePreview",r)},e.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},e.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},e.prototype.destroy=function(){zc()(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},e.prototype.isViewer=function(){return!0},e.prototype.isMarkdownMode=function(){return!1},e.prototype.isWysiwygMode=function(){return!1},e}(),ug=cg;function dg(e){return e instanceof P}function pg(e){return Ue(["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"],e)}var hg={openTag:function(e,t){var n=e,r=n.tagName,i=n.classNames,s=n.attributes,a=document.createElement(r),l={};i&&(a.className=i.join(" ")),s&&(l=o(o({},l),s)),Aa(l,a),t.push(a)},closeTag:function(e,t){if(t.length>1){var n=t.pop();et(t).appendChild(n)}},html:function(e,t){et(t).insertAdjacentHTML("beforeend",e.content)},text:function(e,t){var n=document.createTextNode(e.content);et(t).appendChild(n)}},fg=function(){function e(e,t){var n=dh(e,t),r=o(o({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(r)),this.renderer=new Xp({gfm:!0,convertors:o(o({},n),r)}),this.convertors=this.renderer.getConvertors()}return e.prototype.generateTokens=function(e){var t=function(e){var t=e.attrs,n=e.type.name,r={type:n,wysiwygNode:!0,literal:!pg(n)&&dg(e)?e.textContent:null},i={heading:{level:t.level},link:{destination:t.linkUrl,title:t.title},image:{destination:t.imageUrl},codeBlock:{info:t.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:t.order}},listItem:{type:"item",listData:{task:t.task,checked:t.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:t.align},tableBodyCell:{type:"tableCell",cellType:"body",align:t.align},customBlock:{info:t.info}}[n],s=o(o({},r),i),a=e.attrs,l=a.htmlAttrs,c=a.childrenHTML;return l?o(o({},s),{attrs:l,childrenHTML:c}):s}(e),n={entering:!0,leaf:!!dg(e)&&e.isLeaf,options:this.renderer.getOptions(),getChildrenText:function(){return dg(e)?e.textContent:""},skipChildren:function(){return!1}},r=this.convertors[e.type.name],i=r(t,n,this.convertors),s=aa()(i)?i:[i];return(pg(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,s.push({type:"text",content:dg(e)?e.textContent:""}),s=s.concat(r(t,n,this.convertors))),s},e.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach((function(e){return hg[e.type](e,n)})),n[0]},e.prototype.getToDOMNode=function(e){return Ue(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},e}(),mg=null,gg=null;function vg(e,t){var n=t.syncScrollTop,r=t.releaseEventBlock;gg&&clearTimeout(gg),n(e),gg=setTimeout((function(){r()}),15)}var yg=function(){function e(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var r=t.previewContent,o=t.el;this.previewRoot=r,this.previewEl=o,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return e.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",(function(){e.clearTimer(),e.timer=setTimeout((function(){e.syncPreviewScrollTop(!0)}),200)})),this.eventEmitter.listen("scroll",(function(t,n){e.active&&("editor"===t&&"editor"!==e.blockedScroll?e.syncPreviewScrollTop():"preview"===t&&"preview"!==e.blockedScroll&&e.syncEditorScrollTop(n))})),this.eventEmitter.listen("toggleScrollSync",(function(t){e.active=t}))},e.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos).index;return this.toastMark.findFirstNodeAtLine(n+1)},e.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,r=bh(this.previewRoot,t).el,o=(vh(r,this.previewRoot)||r.offsetTop)+r.clientHeight-.5*n;return this.latestEditorScrollTop=null,r.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top<n?null:o},e.prototype.syncPreviewScrollTop=function(e){void 0===e&&(e=!1);var t=this,n=t.editorView,r=t.previewEl,o=t.previewRoot,i=n.dom.getBoundingClientRect(),s=i.left,a=i.top,l=n.posAtCoords({left:s,top:a}),c=n.state.doc,u=this.getMdNodeAtPos(c,l);if(u&&!function(e){var t=e.type;return"htmlBlock"===t||"htmlInline"===t}(u)){var d=r.scrollTop,p=n.dom,h=p.scrollTop,f=p.scrollHeight,m=p.clientHeight,g=p.children,v=f-h<=m+18,y=v?r.scrollHeight:0;if(h&&!v){if(e){var b=this.getScrollTopByCaretPos();if(!b)return;y=b}else{var w=bh(this.previewRoot,u),k=w.el,x=mh(c,w.mdNode,g),C=x.height,T=x.rect;y=(vh(k,o)||k.offsetTop)+k.clientHeight*(a>T.top?Math.min((a-T.top)/C,1):0)}y=this.getResolvedScrollTop("editor",h,y,d),this.latestEditorScrollTop=h}y!==d&&this.run("editor",y,d)}},e.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,r=t.editorView,o=t.previewRoot,i=t.previewEl,s=r.dom,a=r.state,l=i.scrollTop,c=i.clientHeight,u=i.scrollHeight-l<=c,d=s.scrollTop,p=u?s.scrollHeight:0;if(l&&e&&!u){if(e=function(e,t){for(;!e.getAttribute("data-nodeid")&&e.parentElement!==t;)e=e.parentElement;return e}(e,o),!e.getAttribute("data-nodeid"))return;var h=s.children,f=Number(e.getAttribute("data-nodeid")),m=bh(this.previewRoot,n.findNodeById(f)),g=m.mdNode,v=m.el;p=h[Is(g)-1].offsetTop;var y=mh(a.doc,g,h).height,b=xh(v,o,f),w=b.nodeHeight;p+=function(e,t,n,r){return Math.min((e-t)/n,1)*r}(l,b.offsetTop,w,y),p=this.getResolvedScrollTop("preview",l,p,d),this.latestPreviewScrollTop=l}p!==d&&this.run("preview",p,d)},e.prototype.getResolvedScrollTop=function(e,t,n,r){var o="editor"===e?this.latestEditorScrollTop:this.latestPreviewScrollTop;return null===o?n:o<t?Math.max(n,r):Math.min(n,r)},e.prototype.run=function(e,t,n){var r,o=this;"editor"===e?(r=this.previewEl,this.blockedScroll="preview"):(r=this.editorView.dom,this.blockedScroll="editor"),function(e,t,n){var r=t-e,o=Date.now(),i=function(){var s,a=(Date.now()-o)/100;mg&&clearTimeout(mg),a<1?(s=e+r*Math.cos((1-a)*Math.PI/2),vg(Math.ceil(s),n),mg=setTimeout(i,1)):(vg(t,n),mg=null)};i()}(n,t,{syncScrollTop:function(e){return r.scrollTop=e},releaseEventBlock:function(){return o.blockedScroll=null}})},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},e}(),bg={getPopupInitialValues:function(e,t){return"link"===t.popupName?{linkText:e.getSelectedText()}:{}}};var wg=function(){function e(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=ve()({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,r=n.customHTMLRenderer,i=n.extendedAutolinks,s=n.referenceDefinition,a=n.frontMatter,l=n.customMarkdownRenderer,c=n.useCommandShortcut,u=n.initialEditType,d=n.widgetRules,p=n.customHTMLSanitizer;this.mode=u||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=hf,this.i18n.setCode(this.options.language),this.eventEmitter=new Im,ta(d);var h=Ge(this.options.linkAttributes);this.pluginInfo=lg({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var f=this.pluginInfo,m=f.toHTMLRenderers,g=f.toMarkdownRenderers,v=f.mdPlugins,y=f.wwPlugins,b=f.wwNodeViews,w=f.mdCommands,k=f.wwCommands,x=f.markdownParsers,C={linkAttributes:h,customHTMLRenderer:nt(m,r),extendedAutolinks:i,referenceDefinition:s,frontMatter:a,sanitizer:p||rh},T=new fg(h,C.customHTMLRenderer),M=function(e,t,n){var r={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach((function(o){e[o]&&Object.keys(e[o]).forEach((function(e){var i="htmlBlock"===o?"nodes":"marks";nh(e),r[i][e]=lh[o](e,t,n)}))})),r}(C.customHTMLRenderer,C.sanitizer,T);this.toastMark=new _p("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:i,referenceDefinition:s,disallowDeepHeading:!0,frontMatter:a,customParser:x}),this.mdEditor=new Fc(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:c,mdPlugins:v}),this.preview=new Mh(this.eventEmitter,o(o({},C),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new Nm(this.eventEmitter,{toDOMAdaptor:T,useCommandShortcut:c,htmlSchemaMap:M,linkAttributes:h,wwPlugins:y,wwNodeViews:b}),this.convertor=new ag(this.wwEditor.getSchema(),o(o({},g),l),dh(h,C.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new Pm(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,(function(){return t.mode})),this.options.usageStatistics&&Ie()("editor","UA-129966929-1"),this.scrollSync=new yg(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(w,k),function(e){e.eventEmitter.listen("query",(function(t,n){return bg[t](e,n)}))}(this),this.options.hooks&&me()(this.options.hooks,(function(e,n){return t.addHook(n,e)})),this.options.events&&me()(this.options.events,(function(e,n){return t.on(n,e)})),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return e.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",(function(){if("auto"!==e.height){var t=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(t)}})),function(e){e.listen("addImageBlobHook",(function(e,t){var n=new FileReader;n.onload=function(e){var n=e.target;return t(n.result)},n.readAsDataURL(e)}))}(this.eventEmitter)},e.prototype.addInitCommand=function(e,t){var n=this,r=function(e,t){Object.keys(t).forEach((function(r){n.addCommand(e,r,t[r])}))};this.addCommand("markdown","toggleScrollSync",(function(e){return n.eventEmitter.emit("toggleScrollSync",e.active),!0})),r("markdown",e),r("wysiwyg",t)},e.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},e.factory=function(t){return t.viewer?new ug(t):new e(t)},e.setLanguage=function(e,t){hf.setLanguage(e,t)},e.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},e.prototype.exec=function(e,t){this.commandManager.exec(e,t)},e.prototype.addCommand=function(e,t,n){var r=this;this.commandManager.addCommand(e,t,(function(t){void 0===t&&(t={});var o=("markdown"===e?r.mdEditor:r.wwEditor).view;n(t,o.state,o.dispatch,o)}))},e.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},e.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},e.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.focus=function(){this.getCurrentModeEditor().focus()},e.prototype.blur=function(){this.getCurrentModeEditor().blur()},e.prototype.moveCursorToEnd=function(e){void 0===e&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},e.prototype.moveCursorToStart=function(e){void 0===e&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},e.prototype.setMarkdown=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=!0),this.mdEditor.setMarkdown(e,t),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),r=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(r,t)}},e.prototype.setHTML=function(e,t){void 0===e&&(e=""),void 0===t&&(t=!0);var n=document.createElement("div");n.innerHTML=function(e){var t=e.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),n=new RegExp(ma,"ig"),r=t.match(n);return null==r||r.forEach((function(e,n){if(va.test(e)){var o=ba;if(n){var i=r[n-1].match(fa);if(i&&!/br/i.test(i[1])){var s=i[1];o="</"+s+"><"+s+">"}}t=t.replace(va,o)}})),t}(e);var r=te.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(r),t):this.wwEditor.setModel(r,t)},e.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},e.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke((function(){if(e.isMarkdownMode()){var t=e.toastMark.getRootNode(),n=e.convertor.toWysiwygModel(t);e.wwEditor.setModel(n)}}));var t=La(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return t.replace(n,"")}return t},e.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},e.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},e.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},e.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},e.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},e.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},e.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},e.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},e.prototype.setHeight=function(e){var t=this.options.el;Me()(e)&&("auto"===e?ke()(t,"auto-height"):Ce()(t,"auto-height"),this.setMinHeight(this.getMinHeight())),be()(t,{height:e}),this.height=e},e.prototype.getHeight=function(){return this.height},e.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;"auto"!==t&&this.options.el.querySelector("."+xa("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},e.prototype.getMinHeight=function(){return this.minHeight},e.prototype.isMarkdownMode=function(){return"markdown"===this.mode},e.prototype.isWysiwygMode=function(){return"wysiwyg"===this.mode},e.prototype.isViewer=function(){return!1},e.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},e.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),r=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(r)}else{r=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(r),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var o=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&Ee()(o)?this.wwEditor.setSelection(o):Array.isArray(o)&&this.mdEditor.setSelection(o)}}},e.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach((function(t,n){return e.off(n)}))},e.prototype.hide=function(){this.eventEmitter.emit("hide")},e.prototype.show=function(){this.eventEmitter.emit("show")},e.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},e.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},e.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},e.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},e.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},e.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},e.prototype.convertPosToMatchEditorMode=function(e,t,n){var r,o;void 0===t&&(t=e),void 0===n&&(n=this.mode);var i=this.mdEditor.view.state.doc,s=Array.isArray(e),a=Array.isArray(t),l=e,c=t;if(s!==a)throw new Error("Types of arguments must be same");return"markdown"!==n||s||a?"wysiwyg"===n&&s&&a&&(l=(o=ol(i,e,t))[0],c=o[1]):(l=(r=nl(i,e,t))[0],c=r[1]),[l,c]},e}(),kg=wg;var xg=n(326),Cg=n.n(xg),Tg=function(){function e(e){this.current=e,this.root=e,this.entering=!0}return e.prototype.walk=function(){var e=this.entering,t=this.current;return t?(e?t.firstChild?(this.current=t.firstChild,this.entering=!0):this.entering=!1:t===this.root?this.current=null:t.next?(this.current=t.next,this.entering=!0):(this.current=t.parent,this.entering=!1),{vnode:t,entering:e}):null},e}(),Mg=function(){function e(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return e.prototype.walker=function(){return new Tg(this)},e.removalNodes=[],e}();function Sg(e,t){var n,r=e;Cg()(e)||null==e?r=null:(Me()(e)||Ee()(e))&&(n=String(e),r=new Mg("TEXT_NODE",{nodeValue:n},[])),r&&t.push(r)}var Eg=function(e){for(var t,n,r=arguments,o=1,i="",s="",a=[0],l=function(e){1===o&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?a.push(e?r[e]:i):3===o&&(e||i)?(a[1]=e?r[e]:i,o=2):2===o&&"..."===i&&e?a[2]=it(a[2]||{},r[e]):2===o&&i&&!e?(a[2]=a[2]||{})[i]=!0:o>=5&&(5===o?((a[2]=a[2]||{})[n]=e?i?i+r[e]:r[e]:i,o=6):(e||i)&&(a[2][n]+=e?i+r[e]:i)),i=""},c=0;c<e.length;c++){c&&(1===o&&l(),l(c));for(var u=0;u<e[c].length;u++)t=e[c][u],1===o?"<"===t?(l(),a=[a,"",null],o=3):i+=t:4===o?"--"===i&&">"===t?(o=1,i=""):i=t+i[0]:s?t===s?s="":i+=t:'"'===t||"'"===t?s=t:">"===t?(l(),o=1):o&&("="===t?(o=5,n=i,i=""):"/"===t&&(o<5||">"===e[c][u+1])?(l(),3===o&&(a=a[0]),o=a,(a=a[0]).push(this.apply(null,o.slice(1))),o=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),o=2):i+=t),3===o&&"!--"===i&&(o=4,a=a[0])}return l(),a.length>2?a.slice(1):a[1]}.bind((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=[];return n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){Sg(e,o)})):Sg(e,o)})),new Mg(e,t||{},o)})),Ng=n(73),Og=n.n(Ng);function Dg(e){var t;return"TEXT_NODE"===e.type?t=document.createTextNode(e.props.nodeValue):Rg(t=document.createElement(e.type),{},e.props),t}function Ag(e,t){e.node?t.removeChild(e.node):Ag(e.firstChild,t)}function Lg(e,t,n){Object.keys(t).forEach((function(r){if(/^on/.test(r)){if(!n[r]||t[r]!==n[r]){var o=r.slice(2).toLowerCase();e.removeEventListener(o,t[r])}}else"children"===r||n[r]||function(e){return(null==e?void 0:e.nodeType)===Node.TEXT_NODE}(e)||e.removeAttribute(r)})),Rg(e,t,n,(function(e){return!Ye(t[e],n[e])}))}var Ig=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function Rg(e,t,n,r){Object.keys(n).forEach((function(o){if(!r||r(o))if(/^on/.test(o)){var i=o.slice(2).toLowerCase();e.addEventListener(i,n[o])}else"nodeValue"===o?e[o]=n[o]:"style"===o&&Og()(n[o])?function(e,t,n){t&&Object.keys(t).forEach((function(t){e.style[t]=""}));Object.keys(n).forEach((function(t){var r=n[t];e.style[t]=Ee()(r)&&!Ig.test(t)?r+"px":r}))}(e,t[o],n[o]):"children"!==o&&(!1===n[o]?e.removeAttribute(o):e.setAttribute(o,n[o]))}))}function Pg(e){if(Mg.removalNodes.forEach((function(e){return Fg(e)})),e)for(var t=void 0,n=e.walker();t=n.walk();)if(e=t.vnode,t.entering)Fg(e);else if(Ga()(e.type)){var r=e.component;if(!e.old&&r.mounted&&r.mounted(),e.old&&r.updated){var o=r.prevProps||{};r.updated(o)}}}function Bg(e){for(var t=e.parent;!t.node;)t=t.parent;return t.node}function Fg(e){if(e&&e.parent){if(e.node){var t=Bg(e);"A"===e.effect?t.appendChild(e.node):"U"===e.effect&&Lg(e.node,e.old.props,e.props)}if("D"===e.effect)for(var n=void 0,r=e.walker();n=r.walk();)if(e=n.vnode,!n.entering)if(Ga()(e.type)){var o=e.component;o.beforeDestroy&&o.beforeDestroy()}else{Ag(e,t=Bg(e))}e.ref&&(e.component?e.ref(e.component):e.node&&e.ref(e.node))}}function Hg(e,t){var n=t.props,r=t.component;return r?(r.prevProps=r.props,r.props=t.props,r):new e(n)}function zg(e){for(var t=e;e&&!e.skip;){if(Ga()(e.type)){var n=Hg(e.type,e);n.vnode=e,e.component=n,e.props.children=e.children=[n.render()],qg(e)}else e.node||(e.node=Dg(e)),qg(e);if(e.firstChild)e=e.firstChild;else{for(;e&&e.parent&&!e.next&&(e=e.parent)!==t;);e=e.next}}}function qg(e){var t=e.children,n=e.old?e.old.firstChild:null,r=null;t.forEach((function(t,o){var i=function(e,t){return e&&t&&t.type===e.type&&(!t.key||t.key===e.key)}(n,t);i&&(t.old=n,t.parent=e,t.node=n.node,t.component=n.component,t.effect="U"),t&&!i&&(t.old=null,t.parent=e,t.node=null,t.effect="A"),n&&!i&&(Mg.removalNodes.push(n),n.effect="D"),n&&(n=n.next),0===o?e.firstChild=t:t&&(r.next=t),r=t}));var o=et(t);if(!t.length)for(;n;)Mg.removalNodes.push(n),n.effect="D",n=n.next;for(;n&&o;)n&&o.old!==n&&(Mg.removalNodes.push(n),n.effect="D",n=n.next)}function Vg(e,t){var n=new Mg(e.tagName.toLowerCase(),{},[t]);return n.node=e,Mg.removalNodes=[],zg(n),Pg(n),function(){return function(e){e.effect="D",Mg.removalNodes=[e],Pg(),Mg.removalNodes=[]}(n.firstChild)}}var jg,$g=function(){function e(e){this.props=e,this.state={},this.refs={}}return e.prototype.setState=function(e){var t=o(o({},this.state),e);Ye(this.state,t)||(this.state=t,function(e){var t=e.vnode;t.effect="U",t.old=t,t.next&&(t.next.skip=!0),Mg.removalNodes=[],zg(t),Pg(t),t.next&&(t.next.skip=!1)}(this))},e}(),_g=function(e){function n(t){var n=e.call(this,t)||this;return n.state={hide:!1},n}return t(n,e),n.prototype.show=function(){this.setState({hide:!1})},n.prototype.hide=function(){this.setState({hide:!0})},n.prototype.render=function(){var e=this.props,t=e.editorType,n=e.eventEmitter;return Eg(jg||(jg=s(['\n <div class="','" style="display: ','">\n <div\n class="tab-item','"\n onClick=',"\n >\n ",'\n </div>\n <div\n class="tab-item','"\n onClick=',"\n >\n ","\n </div>\n </div>\n "],['\n <div class="','" style="display: ','">\n <div\n class="tab-item','"\n onClick=',"\n >\n ",'\n </div>\n <div\n class="tab-item','"\n onClick=',"\n >\n ","\n </div>\n </div>\n "])),xa("mode-switch"),this.state.hide?"none":"block","markdown"===t?" active":"",(function(){n.emit("needChangeMode","markdown")}),hf.get("Markdown"),"wysiwyg"===t?" active":"",(function(){n.emit("needChangeMode","wysiwyg")}),hf.get("WYSIWYG"))},n}($g),Ug=n(423),Wg=n.n(Ug),Jg=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),Gg="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Kg=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Zg="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Kg):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Xg=["top","right","bottom","left","width","height","size","weight"],Qg="undefined"!=typeof MutationObserver,Yg=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&a()}function s(){Zg(i)}function a(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return a}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Gg&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Qg?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Gg&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Xg.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),ev=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},tv=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Kg},nv=lv(0,0,0,0);function rv(e){return parseFloat(e)||0}function ov(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+rv(e["border-"+n+"-width"])}),0)}function iv(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return nv;var r=tv(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=rv(i)}return t}(r),i=o.left+o.right,s=o.top+o.bottom,a=rv(r.width),l=rv(r.height);if("border-box"===r.boxSizing&&(Math.round(a+i)!==t&&(a-=ov(r,"left","right")+i),Math.round(l+s)!==n&&(l-=ov(r,"top","bottom")+s)),!function(e){return e===tv(e).document.documentElement}(e)){var c=Math.round(a+i)-t,u=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return lv(o.left,o.top,a,l)}var sv="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof tv(e).SVGGraphicsElement}:function(e){return e instanceof tv(e).SVGElement&&"function"==typeof e.getBBox};function av(e){return Gg?sv(e)?function(e){var t=e.getBBox();return lv(0,0,t.width,t.height)}(e):iv(e):nv}function lv(e,t,n,r){return{x:e,y:t,width:n,height:r}}var cv=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=lv(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=av(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),uv=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(i.prototype);return ev(s,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),s}(t);ev(this,{target:e,contentRect:n})},dv=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Jg,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof tv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new cv(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof tv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new uv(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),pv="undefined"!=typeof WeakMap?new WeakMap:new Jg,hv=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Yg.getInstance(),r=new dv(t,n,this);pv.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){hv.prototype[e]=function(){var t;return(t=pv.get(this))[e].apply(t,arguments)}}));var fv,mv,gv,vv,yv,bv,wv,kv,xv,Cv,Tv,Mv,Sv,Ev,Nv,Ov,Dv=void 0!==Kg.ResizeObserver?Kg.ResizeObserver:hv,Av=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.execCommand=function(e){var t=Oa(e.target,"li");this.props.execCommand("heading",{level:Number(t.getAttribute("data-level"))})},n.prototype.render=function(){var e=this;return Eg(mv||(mv=s(["\n <ul\n onClick=",'\n aria-role="menu"\n aria-label="','"\n >\n ','\n <li data-type="Paragraph" aria-role="menuitem">\n <div>',"</div>\n </li>\n </ul>\n "],["\n <ul\n onClick=",'\n aria-role="menu"\n aria-label="','"\n >\n ','\n <li data-type="Paragraph" aria-role="menuitem">\n <div>',"</div>\n </li>\n </ul>\n "])),(function(t){return e.execCommand(t)}),hf.get("Headings"),[1,2,3,4,5,6].map((function(e){return Eg(fv||(fv=s(['\n <li data-level="','" data-type="Heading" aria-role="menuitem">\n <',">"," ","</$>\n </li>\n "],['\n <li data-level="','" data-type="Heading" aria-role="menuitem">\n <',">"," ","</$>\n </li>\n "])),e,"h"+e,hf.get("Heading"),e)})),hf.get("Paragraph"))},n}($g),Lv=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.toggleTab=function(e,t){this.props.onClick(e,t)},n.prototype.render=function(){var e=this;return Eg(vv||(vv=s(['\n <div class="','" aria-role="tabpanel">\n ',"\n </div>\n "],['\n <div class="','" aria-role="tabpanel">\n ',"\n </div>\n "])),xa("tabs"),this.props.tabs.map((function(t){var n=t.name,r=t.text,o=e.props.activeTab===n;return Eg(gv||(gv=s(['\n <div\n class="tab-item','"\n onClick=','\n aria-role="tab"\n aria-label="','"\n aria-selected="','"\n tabindex="','"\n >\n ',"\n </div>\n "],['\n <div\n class="tab-item','"\n onClick=','\n aria-role="tab"\n aria-label="','"\n aria-selected="','"\n tabindex="','"\n >\n ',"\n </div>\n "])),o?" active":"",(function(t){return e.toggleTab(t,n)}),hf.get(r),o?"true":"false",o?"0":"-1",hf.get(r))})))},n}($g),Iv=function(e){function n(t){var n=e.call(this,t)||this;return n.initialize=function(e){void 0===e&&(e="file");var t=n.refs.url;t.value="",n.refs.altText.value="",n.refs.file.value="",Ce()(t,"wrong"),n.setState({activeTab:e,file:null,fileNameElClassName:""})},n.execCommand=function(){"file"===n.state.activeTab?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(e,t){t!==n.state.activeTab&&n.initialize(t)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(e){var t=e.target.files;(null==t?void 0:t.length)&&n.setState({file:t[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return t(n,e),n.prototype.emitAddImageBlob=function(){var e=this,t=this.refs.file.files,n=this.refs.altText,r=" wrong";if(null==t?void 0:t.length){r="";var o=t.item(0);this.props.eventEmitter.emit("addImageBlobHook",o,(function(t,r){return e.props.execCommand("addImage",{imageUrl:t,altText:r||n.value})}),"ui")}this.setState({fileNameElClassName:r})},n.prototype.emitAddImage=function(){var e=this.refs.url,t=this.refs.altText,n=e.value,r=t.value||"image";Ce()(e,"wrong"),n.length?n&&this.props.execCommand("addImage",{imageUrl:n,altText:r}):ke()(e,"wrong")},n.prototype.preventSelectStart=function(e){e.preventDefault()},n.prototype.updated=function(){this.props.show||this.initialize()},n.prototype.render=function(){var e=this,t=this.state,n=t.activeTab,r=t.file,o=t.fileNameElClassName;return Eg(yv||(yv=s(['\n <div aria-label="','">\n <'," tabs="," activeTab="," onClick=",' />\n <div style="display:','">\n <label for="toastuiImageUrlInput">','</label>\n <input\n id="toastuiImageUrlInput"\n type="text"\n ref=','\n />\n </div>\n <div style="display:',';position: relative;">\n <label for="toastuiImageFileInput">','</label>\n <span\n class="',"",'"\n onClick=',"\n onSelectstart=","\n >\n ",'\n </span>\n <button\n type="button"\n class="','"\n onClick=',"\n >\n ",'\n </button>\n <input\n id="toastuiImageFileInput"\n type="file"\n accept="image/*"\n onChange=',"\n ref=",'\n />\n </div>\n <label for="toastuiAltTextInput">','</label>\n <input\n id="toastuiAltTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "],['\n <div aria-label="','">\n <'," tabs="," activeTab="," onClick=",' />\n <div style="display:','">\n <label for="toastuiImageUrlInput">','</label>\n <input\n id="toastuiImageUrlInput"\n type="text"\n ref=','\n />\n </div>\n <div style="display:',';position: relative;">\n <label for="toastuiImageFileInput">','</label>\n <span\n class="',"",'"\n onClick=',"\n onSelectstart=","\n >\n ",'\n </span>\n <button\n type="button"\n class="','"\n onClick=',"\n >\n ",'\n </button>\n <input\n id="toastuiImageFileInput"\n type="file"\n accept="image/*"\n onChange=',"\n ref=",'\n />\n </div>\n <label for="toastuiAltTextInput">','</label>\n <input\n id="toastuiAltTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "])),hf.get("Insert image"),Lv,this.tabs,n,this.toggleTab,"url"===n?"block":"none",hf.get("Image URL"),(function(t){return e.refs.url=t}),"file"===n?"block":"none",hf.get("Select image file"),xa("file-name"),r?" has-file":o,this.showFileSelectBox,this.preventSelectStart,r?r.name:hf.get("No file"),xa("file-select-button"),this.showFileSelectBox,hf.get("Choose a file"),this.changeFile,(function(t){return e.refs.file=t}),hf.get("Description"),(function(t){return e.refs.altText=t}),xa("button-container"),xa("close-button"),this.props.hidePopup,hf.get("Cancel"),xa("ok-button"),this.execCommand,hf.get("OK"))},n}($g),Rv=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.execCommand=function(){var e=t.refs.url,n=t.refs.text;(Ce()(e,"wrong"),Ce()(n,"wrong"),e.value.length<1)?ke()(e,"wrong"):Oe()(t.props.initialValues.linkUrl)&&n.value.length<1?ke()(n,"wrong"):t.props.execCommand("addLink",{linkUrl:e.value,linkText:n.value})},t}return t(n,e),n.prototype.initialize=function(){var e=this.props.initialValues,t=e.linkUrl,n=e.linkText,r=this.refs.url,o=this.refs.text;Ce()(r,"wrong"),Ce()(o,"wrong","disabled"),o.removeAttribute("disabled"),t&&(ke()(o,"disabled"),o.setAttribute("disabled","disabled")),r.value=t||"",o.value=n||""},n.prototype.mounted=function(){this.initialize()},n.prototype.updated=function(e){!e.show&&this.props.show&&this.initialize()},n.prototype.render=function(){var e=this;return Eg(bv||(bv=s(['\n <div aria-label="','">\n <label for="toastuiLinkUrlInput">','</label>\n <input\n id="toastuiLinkUrlInput"\n type="text"\n ref=','\n />\n <label for="toastuiLinkTextInput">','</label>\n <input\n id="toastuiLinkTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "],['\n <div aria-label="','">\n <label for="toastuiLinkUrlInput">','</label>\n <input\n id="toastuiLinkUrlInput"\n type="text"\n ref=','\n />\n <label for="toastuiLinkTextInput">','</label>\n <input\n id="toastuiLinkTextInput"\n type="text"\n ref=','\n />\n <div class="','">\n <button type="button" class="','" onClick=',">\n ",'\n </button>\n <button type="button" class="','" onClick=',">\n ","\n </button>\n </div>\n </div>\n "])),hf.get("Insert link"),hf.get("URL"),(function(t){return e.refs.url=t}),hf.get("Link text"),(function(t){return e.refs.text=t}),xa("button-container"),xa("close-button"),this.props.hidePopup,hf.get("Cancel"),xa("ok-button"),this.execCommand,hf.get("OK"))},n}($g),Pv=function(e){function n(t){var n=e.call(this,t)||this;return n.extendSelectionRange=function(e){var t=e.pageX,r=e.pageY,i=t-n.offsetRect.left,s=r-n.offsetRect.top,a=n.getSelectionRangeByOffset(i,s);n.setState(o({},a))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return t(n,e),n.prototype.getDescription=function(){return-1===this.state.colIdx?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},n.prototype.getBoundByRange=function(e,t){return{width:20*(e+1),height:20*(t+1)}},n.prototype.getRangeByOffset=function(e,t){return{colIdx:Math.floor(e/20),rowIdx:Math.floor(t/20)}},n.prototype.getTableRange=function(){var e=this.state,t=e.colIdx,n=e.rowIdx,r=Math.max(t,5),o=Math.max(n,5);return t>=5&&r<9&&(r+=1),n>=5&&o<14&&(o+=1),{colIdx:r+1,rowIdx:o+1}},n.prototype.getSelectionAreaBound=function(){var e=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),t=e.width,n=e.height;return t||n?{width:t-1,height:n-1,display:"block"}:{display:"none"}},n.prototype.getSelectionRangeByOffset=function(e,t){var n=this.getRangeByOffset(e,t);return n.rowIdx=Math.min(Math.max(n.rowIdx,1),14),n.colIdx=Math.min(Math.max(n.colIdx,1),9),n},n.prototype.updated=function(){if(this.props.show){if(-1===this.state.colIdx&&-1===this.state.rowIdx){var e=this.refs.tableEl.getBoundingClientRect(),t=e.left,n=e.top;this.offsetRect={left:window.pageXOffset+t,top:window.pageYOffset+n}}}else this.setState({colIdx:-1,rowIdx:-1})},n.prototype.createTableArea=function(e){for(var t=e.colIdx,n=e.rowIdx,r=[],o=0;o<n;o+=1){for(var i=[],a=0;a<t;a+=1){var l=xa("table-cell")+(o>0?"":" header");i.push(Eg(wv||(wv=s(['<div class="','"></div>'],['<div class="','"></div>'])),l))}r.push(Eg(kv||(kv=s(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),xa("table-row"),i))}return Eg(xv||(xv=s(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),xa("table"),r)},n.prototype.render=function(){var e=this,t=this.getTableRange(),n=this.getSelectionAreaBound();return Eg(Cv||(Cv=s(['\n <div aria-label="','">\n <div\n class="','"\n ref=',"\n onMousemove=","\n onClick=","\n >\n ",'\n <div class="','" style=','></div>\n </div>\n <p class="','">',"</p>\n </div>\n "],['\n <div aria-label="','">\n <div\n class="','"\n ref=',"\n onMousemove=","\n onClick=","\n >\n ",'\n <div class="','" style=','></div>\n </div>\n <p class="','">',"</p>\n </div>\n "])),hf.get("Insert table"),xa("table-selection"),(function(t){return e.refs.tableEl=t}),this.extendSelectionRange,this.execCommand,this.createTableArea(t),xa("table-selection-layer"),n,xa("table-description"),this.getDescription())},n}($g),Bv=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},n.prototype.updated=function(e){this.refs.el.replaceChild(this.props.body,e.body)},n.prototype.render=function(){var e=this;return Eg(Tv||(Tv=s(["<div ref=","></div>"],["<div ref=","></div>"])),(function(t){return e.refs.el=t}))},n}($g);function Fv(e){return Me()(e)?function(e){var t;switch(e){case"heading":t={name:"heading",className:"heading",tooltip:hf.get("Headings"),state:"heading"};break;case"bold":t={name:"bold",className:"bold",command:"bold",tooltip:hf.get("Bold"),state:"strong"};break;case"italic":t={name:"italic",className:"italic",command:"italic",tooltip:hf.get("Italic"),state:"emph"};break;case"strike":t={name:"strike",className:"strike",command:"strike",tooltip:hf.get("Strike"),state:"strike"};break;case"hr":t={name:"hr",className:"hrline",command:"hr",tooltip:hf.get("Line"),state:"thematicBreak"};break;case"quote":t={name:"quote",className:"quote",command:"blockQuote",tooltip:hf.get("Blockquote"),state:"blockQuote"};break;case"ul":t={name:"ul",className:"bullet-list",command:"bulletList",tooltip:hf.get("Unordered list"),state:"bulletList"};break;case"ol":t={name:"ol",className:"ordered-list",command:"orderedList",tooltip:hf.get("Ordered list"),state:"orderedList"};break;case"task":t={name:"task",className:"task-list",command:"taskList",tooltip:hf.get("Task"),state:"taskList"};break;case"table":t={name:"table",className:"table",tooltip:hf.get("Insert table"),state:"table"};break;case"image":t={name:"image",className:"image",tooltip:hf.get("Insert image")};break;case"link":t={name:"link",className:"link",tooltip:hf.get("Insert link")};break;case"code":t={name:"code",className:"code",command:"code",tooltip:hf.get("Code"),state:"code"};break;case"codeblock":t={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:hf.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":t={name:"indent",className:"indent",command:"indent",tooltip:hf.get("Indent"),state:"indent"};break;case"outdent":t={name:"outdent",className:"outdent",command:"outdent",tooltip:hf.get("Outdent"),state:"outdent"};break;case"scrollSync":t=function(){var e=document.createElement("label"),t=document.createElement("input"),n=document.createElement("span");e.className="scroll-sync active",t.type="checkbox",t.checked=!0,n.className="switch";var r=function(n){return t.addEventListener("change",(function(t){var r=t.target.checked;r?ke()(e,"active"):Ce()(e,"active"),n("toggleScrollSync",{active:r})}))};return e.appendChild(t),e.appendChild(n),{name:"scrollSync",el:e,onMounted:r}}();break;case"more":t={name:"more",className:"more",tooltip:hf.get("More")}}"scrollSync"!==t.name&&(t.className+=" "+xa("toolbar-icons"));return t}(e):e}function Hv(e,t){var n=t.el,r=t.pos,i=t.popup,a=t.initialValues;switch(e){case"heading":return{render:function(e){return Eg(Mv||(Mv=s(["<"," ..."," />"],["<"," ..."," />"])),Av,e)},className:xa("popup-add-heading"),fromEl:n,pos:r};case"link":return{render:function(e){return Eg(Sv||(Sv=s(["<"," ..."," />"],["<"," ..."," />"])),Rv,e)},className:xa("popup-add-link"),fromEl:n,pos:r,initialValues:a};case"image":return{render:function(e){return Eg(Ev||(Ev=s(["<"," ..."," />"],["<"," ..."," />"])),Iv,e)},className:xa("popup-add-image"),fromEl:n,pos:r};case"table":return{render:function(e){return Eg(Nv||(Nv=s(["<"," ..."," />"],["<"," ..."," />"])),Pv,e)},className:xa("popup-add-table"),fromEl:n,pos:r};case"customPopupBody":return i?o({render:function(e){return Eg(Ov||(Ov=s(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),Bv,e,i.body)},fromEl:n,pos:r},i):null;default:return null}}function zv(e){e.hidden=e.length===e.filter((function(e){return e.hidden})).length}function qv(e,t){return e.reduce((function(e,n){e.push(n.map((function(e){return function(e){return e.hidden="scrollSync"===e.name&&t,e}(Fv(e))})));var r=e[(e.length||1)-1];return r&&zv(r),e}),[])}var Vv,jv,$v=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleMousedown=function(e){Oa(e.target,"."+xa("popup"))||Oa(e.target,t.props.info.fromEl)||t.props.hidePopup()},t}return t(n,e),n.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},n.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},n.prototype.updated=function(e){var t=this.props,n=t.show,r=t.info;if(n&&r.pos&&e.show!==n){var i=o({},r.pos),s=this.refs.el.offsetWidth,a=Oa(this.refs.el,"."+xa("toolbar")).offsetWidth;i.left+s>=a&&(i.left=a-s-20),Ye(this.state.popupPos,i)||this.setState({popupPos:i})}},n.prototype.render=function(){var e=this,t=this.props,n=t.info,r=t.show,i=t.hidePopup,a=t.eventEmitter,l=t.execCommand,c=n||{},u=c.className,d=void 0===u?"":u,p=c.style,h=c.render,f=c.initialValues,m=void 0===f?{}:f,g=o(o({display:r?"block":"none"},p),this.state.popupPos);return Eg(Vv||(Vv=s(['\n <div\n class="'," ",'"\n style=',"\n ref=",'\n aria-role="dialog"\n >\n <div class="','">\n ',"\n </div>\n </div>\n "],['\n <div\n class="'," ",'"\n style=',"\n ref=",'\n aria-role="dialog"\n >\n <div class="','">\n ',"\n </div>\n </div>\n "])),xa("popup"),d,g,(function(t){return e.refs.el=t}),xa("popup-body"),h&&h({eventEmitter:a,show:r,hidePopup:i,execCommand:l,initialValues:m}))},n}($g);function _v(e){return function(n){function r(e){var t=n.call(this,e)||this;return t.showTooltip=function(e){var n=t.props.item.tooltip;if(!t.props.disabled&&n){var r=t.getBound(e),o=r.left+6+"px",i=r.top+6+"px";be()(t.props.tooltipRef.current,{display:"block",left:o,top:i}),t.props.tooltipRef.current.querySelector(".text").textContent=n}},t.hideTooltip=function(){be()(t.props.tooltipRef.current,"display","none")},t.state={active:!1,disabled:e.disabled},t.addEvent(),t}return t(r,n),r.prototype.addEvent=function(){var e=this,t=this.props,n=t.item,r=t.eventEmitter;n.state&&r.listen("changeToolbarState",(function(t){var r,o=null!==(r=t.toolbarState[n.state])&&void 0!==r?r:{},i=o.active,s=o.disabled;e.setState({active:!!i,disabled:null!=s?s:e.props.disabled})}))},r.prototype.getBound=function(e){var t=Da(e,Oa(e,"."+xa("toolbar"))),n=t.offsetLeft,r=t.offsetTop;return{left:n,top:e.offsetHeight+r}},r.prototype.render=function(){return Eg(jv||(jv=s(["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "],["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "])),e,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},r}($g)}var Uv,Wv,Jv,Gv,Kv,Zv,Xv,Qv,Yv,ey,ty,ny,ry,oy,iy=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var e=t.props,n=e.item,r=e.execCommand,o=e.setPopupInfo,i=e.getBound,s=e.eventEmitter,a=n.command,l=n.name,c=n.popup;if(a)r(a);else{var u=c?"customPopupBody":l,d=s.emit("query","getPopupInitialValues",{popupName:u})[0],p=Hv(u,{el:t.refs.el,pos:i(t.refs.el),popup:c,initialValues:d});p&&o(p)}},t}return t(n,e),n.prototype.mounted=function(){this.setItemWidth()},n.prototype.updated=function(e){e.item.name!==this.props.item.name&&this.setItemWidth()},n.prototype.setItemWidth=function(){var e=this.props,t=e.setItemWidth,n=e.item;t&&t(n.name,Na(this.refs.el)+(n.hidden?80:0))},n.prototype.render=function(){var e=this,t=this.props,n=t.hideTooltip,r=t.disabled,i=t.item,a=t.active,l=o({display:i.hidden?"none":null},i.style),c=(i.className||"")+(a?" active":"");return Eg(Uv||(Uv=s(["\n <button\n ref=",'\n type="button"\n style=',"\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=","\n aria-label=","\n >\n ","\n </button>\n "],["\n <button\n ref=",'\n type="button"\n style=',"\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=","\n aria-label=","\n >\n ","\n </button>\n "])),(function(t){return e.refs.el=t}),l,c,this.execCommand,this.showTooltip,n,!!r,i.text||i.tooltip||"",i.text||"")},n}($g),sy=_v(iy),ay=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.showPopup=function(){var e=Hv("customPopupBody",{el:t.refs.el,pos:t.props.getBound(t.refs.el),popup:t.props.item.popup});e&&t.props.setPopupInfo(e)},t}return t(n,e),n.prototype.mounted=function(){var e=this.props,t=e.setItemWidth,n=e.item;this.refs.el.appendChild(n.el),t&&t(n.name,Na(this.refs.el)),n.onMounted&&n.onMounted(this.props.execCommand)},n.prototype.updated=function(e){var t,n=this.props,r=n.item,o=n.active,i=n.disabled;e.active===o&&e.disabled===i||null===(t=r.onUpdated)||void 0===t||t.call(r,{active:o,disabled:i})},n.prototype.render=function(){var e=this,t=this.props,n=t.disabled,r={display:t.item.hidden?"none":"inline-block"},o=function(e){return n?null:e};return Eg(Wv||(Wv=s(["\n <div\n ref=","\n style=","\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n ></div>\n "],["\n <div\n ref=","\n style=","\n class=","\n onClick=","\n onMouseover=","\n onMouseout=","\n ></div>\n "])),(function(t){return e.refs.el=t}),r,xa("toolbar-item-wrapper"),o(this.showPopup),o(this.showTooltip),o(this.props.hideTooltip))},n}($g),ly=_v(ay),cy=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.render=function(){var e=this,t=this.props,n=t.group,r=t.hiddenDivider,o=n.hidden?{display:"none"}:null,i=r?{display:"none"}:null;return Eg(Gv||(Gv=s(['\n <div class="','" style=',">\n ",'\n <div class="','" style=',"></div>\n </div>\n "],['\n <div class="','" style=',">\n ",'\n <div class="','" style=',"></div>\n </div>\n "])),xa("toolbar-group"),o,n.map((function(t){var n=t.el?ly:sy;return Eg(Jv||(Jv=s(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),n,t.name,e.props,t)})),xa("toolbar-divider"),i)},n}($g),uy=function(e){function n(t){var n=e.call(this,t)||this;return n.handleClickDocument=function(e){var t=e.target;Oa(t,"."+xa("dropdown-toolbar"))||Oa(t,".more")||n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return t(n,e),n.prototype.getBound=function(){var e=this.props.getBound(this.refs.el);return e.top+=4,o(o({},e),{left:null,right:10})},n.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},n.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},n.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},n.prototype.render=function(){var e=this,t=this.state,n=t.showDropdown,r=t.dropdownPos,i=this.props,a=i.disabled,l=i.item,c=i.items,u=i.hideTooltip,d=c.filter((function(e){return!e.hidden})),p=d.length?null:{display:"none"},h=n?null:{display:"none"};return Eg(Zv||(Zv=s(['\n <div class="','" style=',">\n <button\n ref=",'\n type="button"\n class=',"\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=",'\n ></button>\n <div\n class="','"\n style=',"\n ref=","\n >\n ","\n </div>\n </div>\n "],['\n <div class="','" style=',">\n <button\n ref=",'\n type="button"\n class=',"\n onClick=","\n onMouseover=","\n onMouseout=","\n disabled=",'\n ></button>\n <div\n class="','"\n style=',"\n ref=","\n >\n ","\n </div>\n </div>\n "])),xa("toolbar-group"),p,(function(t){return e.refs.el=t}),l.className,(function(){return e.setState({showDropdown:!0})}),this.showTooltip,u,a,xa("dropdown-toolbar"),o(o({},h),r),(function(t){return e.refs.dropdownEl=t}),d.length?d.map((function(t,n){var r;return Eg(Kv||(Kv=s(["\n <","\n group=","\n hiddenDivider=","\n ...","\n />\n "],["\n <","\n group=","\n hiddenDivider=","\n ...","\n />\n "])),cy,t,n===d.length-1||(null===(r=d[n+1])||void 0===r?void 0:r.hidden),e.props)})):null)},n}($g),dy=_v(uy),py=function(e){function n(t){var n=e.call(this,t)||this;return n.toggleTab=function(e,t){var r=n.props.eventEmitter;if(n.state.activeTab!==t){var o="write"===t?"changePreviewTabWrite":"changePreviewTabPreview";r.emit(o),n.setState({activeTab:t})}},n.setItemWidth=function(e,t){n.itemWidthMap[e]=t},n.setPopupInfo=function(e){n.setState({showPopup:!0,popupInfo:e})},n.openPopup=function(e,t){void 0===t&&(t={});var r=n.refs.el.querySelector("."+xa("toolbar-group")+" ."+e);if(r){var o=Da(r,Oa(r,"."+xa("toolbar"))),i=o.offsetLeft,s=o.offsetTop,a=Hv(e,{el:r,pos:{left:i,top:r.offsetHeight+s},initialValues:t});a&&n.setPopupInfo(a)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(e,t){n.props.eventEmitter.emit("command",e,t),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=qv(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new Dv((function(){return n.handleResize()})),n.addEvent(),n}return t(n,e),n.prototype.insertToolbarItem=function(e,t){var n=e.groupIndex,r=e.itemIndex,o=this.initialItems[n];t=Fv(t),o?o.splice(r,0,t):this.initialItems.push([t]),this.setState(this.classifyToolbarItems())},n.prototype.removeToolbarItem=function(e){var t=this;Fa()(this.initialItems,(function(n){var r=!1;return Fa()(n,(function(o,i){return o.name!==e||(r=!0,n.splice(i,1),t.setState(t.classifyToolbarItems()),!1)})),!r}))},n.prototype.addEvent=function(){var e=this,t=this.props.eventEmitter;this.handleResize=Wg()((function(){e.setState({items:e.initialItems,dropdownItems:[]}),e.setState(e.classifyToolbarItems())}),200),t.listen("openPopup",this.openPopup)},n.prototype.appendTooltipToRoot=function(){var e='<div class="'+xa("tooltip")+'" style="display:none">\n <div class="arrow"></div>\n <span class="text"></span>\n </div>';this.tooltipRef.current=Ea(e,this.refs.el)},n.prototype.hiddenScrollSync=function(){return"wysiwyg"===this.props.editorType||"tab"===this.props.previewStyle},n.prototype.movePrevItemToDropdownToolbar=function(e,t,n,r){var o=function(e){var t=e.pop();t&&r.push(t)};if(e>1)o(n);else{var i=et(t);i&&o(i)}},n.prototype.classifyToolbarItems=function(){var e=this,t=0,n=this.refs.el.clientWidth,r=this.refs.el.querySelector("."+xa("toolbar-divider")),o=r?Na(r):0,i=[],s=[],a=!1;return this.initialItems.forEach((function(r,l){var c=[],u=[];r.forEach((function(r,o){r.hidden||((t+=e.itemWidthMap[r.name])>n-50?(a||(e.movePrevItemToDropdownToolbar(o,i,c,u),a=!0),u.push(r)):c.push(r))})),c.length&&(zv(c),i.push(c)),u.length&&(zv(u),s.push(u)),l<e.state.items.length-1&&(t+=o)})),{items:i,dropdownItems:s}},n.prototype.mounted=function(){"tab"===this.props.previewStyle&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},n.prototype.updated=function(e){var t,n,r=this.props,o=r.editorType,i=r.previewStyle,s=r.eventEmitter,a=i!==e.previewStyle,l=o!==e.editorType;if(a||l){t=this.initialItems,n=this.hiddenScrollSync(),t.forEach((function(e){e.forEach((function(e){return e.hidden="scrollSync"===e.name&&n})),zv(e)}));var c=this.classifyToolbarItems();(a||"tab"===i&&"markdown"===o)&&(s.emit("changePreviewTabWrite"),c.activeTab="write"),this.setState(c)}},n.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),Ma(this.tooltipRef.current)},n.prototype.render=function(){var e=this,t=this.props,n=t.previewStyle,r=t.eventEmitter,o=t.editorType,i=this.state,a=i.popupInfo,l=i.showPopup,c=i.activeTab,u=i.items,d=i.dropdownItems,p={eventEmitter:r,tooltipRef:this.tooltipRef,disabled:"markdown"===o&&"tab"===n&&"preview"===c,execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},h="tab"===n?{borderTopLeftRadius:0}:null;return Eg(Qv||(Qv=s(['\n <div class="','">\n <div\n class="','"\n style="display: ','"\n >\n <'," tabs="," activeTab="," onClick=",' />\n </div>\n <div\n class="','"\n ref=',"\n style=","\n >\n ","\n <","\n item=","\n items=","\n ...","\n />\n </div>\n <","\n info=","\n show=","\n eventEmitter=","\n hidePopup=","\n execCommand=","\n />\n </div>\n "],['\n <div class="','">\n <div\n class="','"\n style="display: ','"\n >\n <'," tabs="," activeTab="," onClick=",' />\n </div>\n <div\n class="','"\n ref=',"\n style=","\n >\n ","\n <","\n item=","\n items=","\n ...","\n />\n </div>\n <","\n info=","\n show=","\n eventEmitter=","\n hidePopup=","\n execCommand=","\n />\n </div>\n "])),xa("toolbar"),xa("md-tab-container"),"wysiwyg"===o||"vertical"===n?"none":"block",Lv,this.tabs,c,this.toggleTab,xa("defaultUI-toolbar"),(function(t){return e.refs.el=t}),h,u.map((function(t,n){var r;return Eg(Xv||(Xv=s(["\n <","\n group=","\n hiddenDivider=","\n setItemWidth=","\n ...","\n />\n "],["\n <","\n group=","\n hiddenDivider=","\n setItemWidth=","\n ...","\n />\n "])),cy,t,n===u.length-1||(null===(r=u[n+1])||void 0===r?void 0:r.hidden),e.setItemWidth,p)})),dy,Fv("more"),d,p,$v,a,l,r,this.hidePopup,this.execCommand)},n}($g),hy=function(e){function n(t){var n=e.call(this,t)||this;return n.handleClickDocument=function(e){Oa(e.target,"."+xa("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return t(n,e),n.prototype.addEvent=function(){var e=this;this.props.eventEmitter.listen("contextmenu",(function(t){var n=t.pos,r=t.menuGroups;e.setState({pos:n,menuGroups:r})}))},n.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},n.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},n.prototype.getMenuGroupElements=function(){var e=this,t=this.state,n=t.pos,r=t.menuGroups;return n?r.reduce((function(t,n){var r=[];return n.forEach((function(t){var n=t.label,o=t.className,i=void 0!==o&&o,a=t.disabled,l=t.onClick;r.push(Eg(Yv||(Yv=s(["\n <li\n onClick=",'\n class="menu-item','"\n aria-role="menuitem"\n >\n <span class="','">',"</span>\n </li>\n "],["\n <li\n onClick=",'\n class="menu-item','"\n aria-role="menuitem"\n >\n <span class="','">',"</span>\n </li>\n "])),(function(){a||(l(),e.setState({pos:null}))}),a?" disabled":"",i,n))})),t.push(Eg(ey||(ey=s(['<ul class="menu-group">\n ',"\n </ul>"],['<ul class="menu-group">\n ',"\n </ul>"])),r)),t}),[]):[]},n.prototype.render=function(){var e=o({display:this.state.pos?"block":"none"},this.state.pos);return Eg(ty||(ty=s(['<div class="','" style=',' aria-role="menu">\n ',"\n </div>"],['<div class="','" style=',' aria-role="menu">\n ',"\n </div>"])),xa("context-menu"),e,this.getMenuGroupElements())},n}($g),fy=function(e){function n(t){var n=e.call(this,t)||this;n.changeMode=function(e){e!==n.state.editorType&&n.setState({editorType:e})},n.changePreviewStyle=function(e){e!==n.state.previewStyle&&n.setState({previewStyle:e})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var r=t.editorType,o=t.previewStyle;return n.state={editorType:r,previewStyle:o,hide:!1},n.addEvent(),n}return t(n,e),n.prototype.mounted=function(){var e=this.props.slots,t=e.wwEditor,n=e.mdEditor,r=e.mdPreview;this.refs.wwContainer.appendChild(t),this.refs.mdContainer.insertAdjacentElement("afterbegin",n),this.refs.mdContainer.appendChild(r)},n.prototype.insertToolbarItem=function(e,t){this.toolbar.insertToolbarItem(e,t)},n.prototype.removeToolbarItem=function(e){this.toolbar.removeToolbarItem(e)},n.prototype.render=function(){var e=this,t=this.props,n=t.eventEmitter,r=t.hideModeSwitch,o=t.toolbarItems,i=t.theme,a=this.state,l=a.hide,c=a.previewStyle,u=a.editorType,d=l?" hidden":"",p=xa("markdown"===u?"md-mode":"ww-mode"),h=xa("md")+"-"+c+"-style",f=xa(["light"!==i,i+" "]);return Eg(ry||(ry=s(['\n <div\n class="',"","",'"\n ref=',"\n >\n <","\n ref=","\n eventEmitter=","\n previewStyle=","\n toolbarItems=","\n editorType=",'\n />\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','">\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','"></div>\n </div>\n <div\n class="','"\n ref=',"\n />\n </div>\n </div>\n ","\n <"," eventEmitter="," />\n </div>\n "],['\n <div\n class="',"","",'"\n ref=',"\n >\n <","\n ref=","\n eventEmitter=","\n previewStyle=","\n toolbarItems=","\n editorType=",'\n />\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','">\n <div\n class="'," ",'"\n ref=','\n >\n <div class="','"></div>\n </div>\n <div\n class="','"\n ref=',"\n />\n </div>\n </div>\n ","\n <"," eventEmitter="," />\n </div>\n "])),f,xa("defaultUI"),d,(function(t){return e.refs.el=t}),py,(function(t){return e.toolbar=t}),n,c,o,u,xa("main"),p,(function(t){return e.refs.editorSection=t}),xa("main-container"),xa("md-container"),h,(function(t){return e.refs.mdContainer=t}),xa("md-splitter"),xa("ww-container"),(function(t){return e.refs.wwContainer=t}),!r&&Eg(ny||(ny=s(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),_g,n,u),hy,n)},n.prototype.addEvent=function(){var e=this.props.eventEmitter;e.listen("hide",this.hide),e.listen("show",this.show),e.listen("changeMode",this.changeMode),e.listen("changePreviewStyle",this.changePreviewStyle)},n}($g),my=function(e){function n(t){var n,r,o=e.call(this,t)||this,i=Vg(o.options.el,Eg(oy||(oy=s(["\n <","\n ref=","\n eventEmitter=","\n slots=","\n hideModeSwitch=","\n toolbarItems=","\n previewStyle=","\n editorType=","\n theme=","\n />\n "],["\n <","\n ref=","\n eventEmitter=","\n slots=","\n hideModeSwitch=","\n toolbarItems=","\n previewStyle=","\n editorType=","\n theme=","\n />\n "])),fy,(function(e){return r=e}),o.eventEmitter,o.getEditorElements(),o.options.hideModeSwitch,o.options.toolbarItems,o.options.previewStyle,o.options.initialEditType,o.options.theme));return o.setMinHeight(o.options.minHeight),o.setHeight(o.options.height),o.defaultUI={insertToolbarItem:r.insertToolbarItem.bind(r),removeToolbarItem:r.removeToolbarItem.bind(r),destroy:i},null===(n=o.pluginInfo.toolbarItems)||void 0===n||n.forEach((function(e){var t=e.groupIndex,n=e.itemIndex,r=e.item;o.defaultUI.insertToolbarItem({groupIndex:t,itemIndex:n},r)})),o.eventEmitter.emit("loadUI",o),o}return t(n,e),n.factory=function(e){return e.viewer?new ug(e):new n(e)},n.prototype.insertToolbarItem=function(e,t){this.defaultUI.insertToolbarItem(e,t)},n.prototype.removeToolbarItem=function(e){this.defaultUI.removeToolbarItem(e)},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.defaultUI.destroy()},n}(kg),gy=my;kg.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});var vy=gy}(),r=r.default}()}));
</script>
<style>
/*
* Tailwind utility subset for mdedit
*
* This file replaces the Tailwind Play CDN. It contains only the utility
* classes actually used in template.html, hand-written to match Tailwind v3
* output exactly. If new Tailwind classes are needed in template.html, add
* them here and remove the class from this comment.
*
* Generated from: grep -o 'class="[^"]*"' template.html | tr ' ' '\n' | sort -u
* Tailwind version parity: v3.x (default spacing scale, gray palette, etc.)
*/
/* ── Reset ── */
*, ::before, ::after { box-sizing: border-box; }
/* ── Display ── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
/* .hidden lives in shared/base.css (uses !important) */
/* ── Flex direction ── */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
/* ── Flex grow ── */
.flex-1 { flex: 1 1 0%; }
/* ── Alignment ── */
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
/* ── Gap ── */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
/* ── Sizing ── */
.h-screen { height: 100vh; }
.h-full { height: 100%; }
.h-12 { height: 3rem; }
.h-6 { height: 1.5rem; }
.h-3\.5 { height: 0.875rem; }
.h-24 { height: 6rem; }
/* ── Resize ── */
.resize-none { resize: none; }
/* ── Border ── */
.border-0 { border-width: 0; }
/* ── Outline ── */
.focus\:outline-none:focus { outline: none; }
.w-full { width: 100%; }
.w-1 { width: 0.25rem; }
.w-3\.5 { width: 0.875rem; }
/* ── Positioning ── */
.relative { position: relative; }
.z-10 { z-index: 10; }
/* ── Spacing ── */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.pl-2 { padding-left: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
/* ── Typography ── */
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-center { text-align: center; }
.leading-none { line-height: 1; }
.select-none { user-select: none; }
/* ── Colors — text ── */
.text-white { color: #ffffff; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-500 { color: #6b7280; }
.text-amber-600 { color: #d97706; }
/* ── Colors — background ── */
.bg-white { background-color: #ffffff; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-transparent { background-color: transparent; }
.bg-blue-500 { background-color: #3b82f6; }
/* ── Borders ── */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.rounded { border-radius: 0.25rem; }
/* ── Opacity ── */
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
/* ── SVG ── */
.fill-current { fill: currentColor; }
/* ── Cursor ── */
.cursor-pointer { cursor: pointer; }
.cursor-col-resize { cursor: col-resize; }
/* ── Transitions ── */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 150ms; }
/* ── Pseudo-class: hover ── */
.hover\:bg-blue-500:hover { background-color: #3b82f6; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:opacity-80:hover { opacity: 0.8; }
/* ── Pseudo-class: disabled ── */
.disabled\:bg-gray-400:disabled { background-color: #9ca3af; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
/* ── Dark mode (prefers-color-scheme or manual [data-theme="dark"]) ── */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .dark\:bg-gray-700 { background-color: #374151; }
:root:not([data-theme="light"]) .dark\:bg-gray-800 { background-color: #1f2937; }
:root:not([data-theme="light"]) .dark\:bg-gray-900 { background-color: #111827; }
:root:not([data-theme="light"]) .dark\:border-gray-600 { border-color: #4b5563; }
:root:not([data-theme="light"]) .dark\:border-gray-700 { border-color: #374151; }
:root:not([data-theme="light"]) .dark\:text-gray-200 { color: #e5e7eb; }
:root:not([data-theme="light"]) .dark\:text-gray-400 { color: #9ca3af; }
:root:not([data-theme="light"]) .dark\:hover\:bg-gray-700:hover { background-color: #374151; }
:root:not([data-theme="light"]) .dark\:hover\:bg-gray-800:hover { background-color: #1f2937; }
}
/* Manual dark override */
[data-theme="dark"] .dark\:bg-gray-700 { background-color: #374151; }
[data-theme="dark"] .dark\:bg-gray-800 { background-color: #1f2937; }
[data-theme="dark"] .dark\:bg-gray-900 { background-color: #111827; }
[data-theme="dark"] .dark\:border-gray-600 { border-color: #4b5563; }
[data-theme="dark"] .dark\:border-gray-700 { border-color: #374151; }
[data-theme="dark"] .dark\:text-gray-200 { color: #e5e7eb; }
[data-theme="dark"] .dark\:text-gray-400 { color: #9ca3af; }
[data-theme="dark"] .dark\:hover\:bg-gray-700:hover { background-color: #374151; }
[data-theme="dark"] .dark\:hover\:bg-gray-800:hover { background-color: #1f2937; }
/* Manual light override — ensure bg-white/bg-gray-100 are NOT overridden by above */
[data-theme="light"] .dark\:bg-gray-700,
[data-theme="light"] .dark\:bg-gray-800,
[data-theme="light"] .dark\:bg-gray-900 { background-color: revert; }
/* ── Directional spacing (used in JS-generated elements) ── */
.ml-1 { margin-left: 0.25rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.pl-0 { padding-left: 0; }
.pl-4 { padding-left: 1rem; }
/* ── Additional missing utilities ── */
.whitespace-nowrap { white-space: nowrap; }
.text-ellipsis { text-overflow: ellipsis; }
.font-bold { font-weight: 700; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.mt-1 { margin-top: 0.25rem; }
.text-amber-500 { color: #f59e0b; }
.text-blue-600 { color: #2563eb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:underline:hover { text-decoration: underline; }
/* ==========================================================================
ZDDC Shared Base — single source of truth for tokens and primitives
Included first by every tool's build.sh via ../shared/base.css
========================================================================== */
/* ── CSS custom properties ────────────────────────────────────────────────── */
:root {
/* Brand / accent (matches zddc.varasys.io website --accent) */
--primary: #2a5a8a;
--primary-hover: #1d4060;
--primary-active: #163352;
--primary-light: #e8f0f7;
/* Semantic colours */
--success: #28a745;
--warning: #d97706;
--danger: #dc3545;
--info: #17a2b8;
/* Backgrounds */
--bg: #ffffff;
--bg-secondary: #f8f9fa;
--bg-hover: #f0f4f8;
--bg-selected: var(--primary-light);
/* Text */
--text: #212529;
--text-muted: #6c757d;
--text-light: #ffffff;
/* Borders */
--border: #dee2e6;
--border-dark: #adb5bd;
/* Shape */
--radius: 4px;
/* Typography */
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
--font-mono: 'SF Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
}
/* ── Dark mode tokens ─────────────────────────────────────────────────────── */
/* Applied via: OS preference (auto) or [data-theme="dark"] on <html> */
/* The [data-theme="light"] selector locks light mode regardless of OS pref. */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--primary: #4a90c4;
--primary-hover: #5ba3d9;
--primary-active: #6ab5e8;
--primary-light: #1a3550;
--bg: #1e1e1e;
--bg-secondary: #252526;
--bg-hover: #2d2d30;
--bg-selected: #1a3550;
--text: #d4d4d4;
--text-muted: #9d9d9d;
--text-light: #ffffff;
--border: #3e3e42;
--border-dark: #6e6e72;
}
}
/* Manual dark override — wins over media query */
[data-theme="dark"] {
--primary: #4a90c4;
--primary-hover: #5ba3d9;
--primary-active: #6ab5e8;
--primary-light: #1a3550;
--bg: #1e1e1e;
--bg-secondary: #252526;
--bg-hover: #2d2d30;
--bg-selected: #1a3550;
--text: #d4d4d4;
--text-muted: #9d9d9d;
--text-light: #ffffff;
--border: #3e3e42;
--border-dark: #6e6e72;
}
/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* ── Base document ────────────────────────────────────────────────────────── */
html, body {
height: 100%;
font-family: var(--font);
font-size: 16px;
line-height: 1.5;
color: var(--text);
background-color: var(--bg-secondary);
}
/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
font-weight: 600;
line-height: 1.2;
}
a {
color: var(--primary);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden {
display: none !important;
}
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ── Scrollbars (webkit) ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-track {
background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #a0a0a0;
}
/* ── Button primitive ─────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.4rem 0.85rem;
font-family: var(--font);
font-size: 0.875rem;
font-weight: 500;
line-height: 1.4;
text-align: center;
text-decoration: none;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border: 1px solid transparent;
border-radius: var(--radius);
transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
background: var(--bg-secondary);
color: var(--text);
}
.btn:disabled,
.btn[disabled] {
opacity: 0.5;
cursor: not-allowed;
}
.btn:not(:disabled):hover {
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.btn:not(:disabled):active {
box-shadow: none;
}
/* Variants */
.btn-primary {
background: var(--primary);
color: var(--text-light);
border-color: var(--primary);
}
.btn-primary:not(:disabled):hover {
background: var(--primary-hover);
border-color: var(--primary-hover);
color: var(--text-light);
}
.btn-primary:not(:disabled):active {
background: var(--primary-active);
border-color: var(--primary-active);
}
.btn-secondary {
background: var(--bg);
color: var(--text);
border-color: var(--border);
}
.btn-secondary:not(:disabled):hover {
background: var(--bg-secondary);
}
/* Subdued / de-emphasized variant.
Used on the "Add Local Directory" button when a tool is operating
in server (online) mode — the local-dir affordance is still
available but visually quieter, since the typical user already
has the directory loaded from the server. */
.btn.btn--subtle {
background: transparent;
color: var(--text-muted);
border-color: var(--border);
box-shadow: none;
font-weight: normal;
}
.btn.btn--subtle:not(:disabled):hover {
color: var(--text);
background: var(--bg-secondary);
}
.btn-success {
background: var(--success);
color: var(--text-light);
border-color: var(--success);
}
.btn-danger {
background: var(--danger);
color: var(--text-light);
border-color: var(--danger);
}
/* Sizes */
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
.btn-lg {
padding: 0.6rem 1.4rem;
font-size: 1rem;
}
.btn-link {
background: transparent;
border-color: transparent;
color: var(--primary);
padding-left: 0;
padding-right: 0;
}
.btn-link:not(:disabled):hover {
text-decoration: underline;
box-shadow: none;
}
/* ── App header chrome ────────────────────────────────────────────────────── */
.app-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.35rem 1rem;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
/* Left and right groups inside .app-header. Both flex-row so their
children (logo, title, action button, theme icon, etc.) lay out
horizontally rather than stacking. Left side gets a slightly
larger gap because it carries the title group and an action
button; right side is just icon buttons. */
.header-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.header-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Tool name inside the header */
.app-header__title {
font-size: 17px;
font-weight: 600;
color: var(--text);
letter-spacing: 0.01em;
white-space: nowrap;
}
/* Brand logo — sits left of the title in every tool's app-header.
Self-contained: the SVG provides its own dark blue rounded background,
so no extra wrapper styling is needed. */
.app-header__logo {
width: 26px;
height: 26px;
flex-shrink: 0;
display: block;
}
/* ── Build timestamp ──────────────────────────────────────────────────────── */
.build-timestamp {
font-size: 0.55rem;
color: var(--text-muted);
opacity: 0.7;
font-weight: 300;
white-space: nowrap;
padding-top: 0.15rem;
}
/* Title + timestamp stacked vertically on the left side of the header */
.header-title-group {
display: flex;
flex-direction: column;
gap: 0;
line-height: 1;
}
/* ── Icon buttons (help, theme, refresh) ─────────────────────────────────── */
/* Square, centered — overrides the asymmetric text-button padding/line-height */
#help-btn,
#theme-btn,
#refreshHeaderBtn {
width: 2rem;
height: 2rem;
padding: 0;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1rem;
}
/* The refresh ⟳ glyph renders slightly smaller than ◐ / ? — bump to match. */
#refreshHeaderBtn {
font-size: 1.1rem;
}
/* Toast CSS lives in shared/toast.css; loaded by every tool's build. */
/* ── Empty state ──────────────────────────────────────────────────────────── */
/* The "nothing's loaded yet" screen. By default, centers its inner
content in whatever space the parent gives it (works inside a flex
column). Tools that need to overlay an existing layout (archive,
classifier) add .empty-state--overlay; the screen pins below the
app header and on top of whatever underlying layout already exists.
Inner content uses BEM-ish .empty-state__inner with two variants:
plain (left-aligned, doc-style) and --centered (centered card). */
.empty-state {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
background: var(--bg);
}
.empty-state--overlay {
position: absolute;
top: 50px; /* clear the app-header */
left: 0;
right: 0;
bottom: 0;
z-index: 10;
flex: none;
}
.empty-state__inner {
max-width: 640px;
color: var(--text-muted);
line-height: 1.5;
}
.empty-state__inner h2 {
color: var(--text);
margin: 0 0 1rem;
font-size: 1.5rem;
}
.empty-state__inner p {
margin-bottom: 1rem;
}
.empty-state__inner ul,
.empty-state__inner ol {
margin: 1rem 0;
padding-left: 1.5rem;
}
.empty-state__inner li {
margin: 0.4rem 0;
}
.empty-state__inner .note {
font-size: 0.85rem;
font-style: italic;
}
/* Centered variant: tighter max-width + centered text. Used by tools
whose empty-state reads as a "welcome card" (archive, classifier)
rather than a doc-style page (browse). */
.empty-state__inner--centered {
max-width: 500px;
text-align: center;
padding: 2rem;
}
/* Bullet list inside an empty-state — keep the bullets left-aligned
even when the surrounding card is centered. */
.welcome-list {
text-align: left;
margin: 0.5rem auto;
max-width: 400px;
}
/* ── Theme and help icon buttons ─────────────────────────────────────────── */
#theme-btn,
#help-btn {
font-size: 1rem;
}
/* ── Help panel (shared slide-out drawer) ─────────────────────────────────── */
/* Used by all four tools. Toggle open/close via shared/help.js. */
.help-panel {
position: fixed;
top: 0;
right: 0;
width: min(420px, 85vw);
height: 100vh;
z-index: 1000;
background: var(--bg);
border-left: 1px solid var(--border);
box-shadow: -2px 0 12px rgba(0, 0, 0, 0.08);
display: flex;
flex-direction: column;
transform: translateX(100%);
transition: transform 0.25s ease;
}
.help-panel:not([hidden]) {
transform: translateX(0);
}
.help-panel[hidden] {
display: flex;
transform: translateX(100%);
pointer-events: none;
}
.help-panel__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
background: var(--bg);
}
.help-panel__title {
font-size: 1rem;
font-weight: 700;
color: var(--text);
margin: 0;
}
.help-panel__close {
background: none;
border: none;
color: var(--text-muted);
font-size: 1.35rem;
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: var(--radius);
line-height: 1;
transition: background 0.15s, color 0.15s;
}
.help-panel__close:hover {
color: var(--text);
background: var(--bg-secondary);
}
.help-panel__body {
flex: 1;
overflow-y: auto;
padding: 1rem 1rem 2rem;
font-size: 0.85rem;
line-height: 1.6;
color: var(--text);
}
.help-panel__body h3 {
font-size: 0.95rem;
font-weight: 700;
margin: 1.25rem 0 0.35rem;
color: var(--text);
border-bottom: 1px solid var(--border);
padding-bottom: 0.15rem;
}
.help-panel__body h3:first-child {
margin-top: 0;
}
.help-panel__body h4 {
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
margin: 1.25rem 0 0.3rem;
padding-left: 0.5rem;
border-left: 3px solid var(--border-dark);
color: var(--text-muted);
}
.help-panel__body p {
margin: 0 0 0.5rem;
}
.help-panel__body ol,
.help-panel__body ul {
padding-left: 1.5rem;
margin: 0.3rem 0 0.5rem;
}
.help-panel__body li {
margin-bottom: 0.3rem;
}
.help-panel__body dl {
margin: 0.3rem 0;
}
.help-panel__body dt {
font-weight: 600;
color: var(--text);
}
.help-panel__body dd {
margin: 0 0 0.5rem 1rem;
color: var(--text-muted);
}
.help-panel__body code {
font-family: var(--font-mono);
font-size: 0.8em;
background: var(--bg-secondary);
padding: 0.1em 0.3em;
border-radius: 3px;
}
.help-badge {
font-size: 0.7rem;
font-weight: 600;
padding: 0.1rem 0.35rem;
border-radius: var(--radius);
vertical-align: middle;
letter-spacing: 0.02em;
}
.help-badge--draft {
color: #2563eb;
background: #eff6ff;
}
.help-badge--published {
color: #7c3aed;
background: #f5f3ff;
}
/* Shrink main content when help panel is open */
body.help-open .app-header {
margin-right: min(420px, 85vw);
}
/* ── Column filter inputs (shared across archive, classifier, transmittal) ─── */
.column-filter {
display: block;
width: 100%;
box-sizing: border-box;
margin-top: 0.25rem;
padding: 0.2rem 0.4rem;
font-size: 0.8rem;
font-family: var(--font);
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg);
color: var(--text);
transition: border-color 0.15s;
}
.column-filter:focus {
border-color: var(--primary);
outline: none;
box-shadow: 0 0 0 1px rgba(42, 90, 138, 0.35);
}
.column-filter::placeholder {
color: var(--text-muted);
}
/* shared/toast.css — single-toast notification styles paired with
shared/toast.js. Uses BEM-ish .zddc-toast prefix to avoid collisions
with tool-local .toast classes; the old classifier rules can stay
alongside until this file is concatenated above them in the build. */
.zddc-toast {
position: fixed;
bottom: 2rem;
right: 2rem;
background: var(--bg);
color: var(--text);
padding: 0.875rem 1.25rem;
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 9000;
max-width: 400px;
font-size: 0.875rem;
cursor: pointer;
animation: zddc-toast-in 0.3s ease-out;
}
.zddc-toast--success { border-left: 4px solid var(--success); }
.zddc-toast--error { border-left: 4px solid var(--danger); }
.zddc-toast--info { border-left: 4px solid var(--info); }
.zddc-toast--warning { border-left: 4px solid var(--warning); }
.zddc-toast--fade {
animation: zddc-toast-out 0.3s ease-out forwards;
}
@keyframes zddc-toast-in {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes zddc-toast-out {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
/* shared/nav.css — lateral project-stage strip paired with shared/nav.js.
Sits as a sibling immediately under .app-header (mounted by JS).
Rendered only in online mode when a project segment is in the URL. */
.zddc-stage-strip {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.3rem 1rem;
background: var(--bg);
border-bottom: 1px solid var(--border);
font-size: 0.8rem;
line-height: 1.3;
flex-shrink: 0;
overflow-x: auto;
white-space: nowrap;
}
.zddc-stage-strip__project {
color: var(--text);
font-weight: 600;
margin-right: 0.15rem;
}
.zddc-stage-strip__divider,
.zddc-stage-strip__sep {
color: var(--text-muted);
user-select: none;
}
.zddc-stage-strip__divider {
margin-right: 0.35rem;
}
.zddc-stage {
color: var(--text-muted);
text-decoration: none;
padding: 0.1rem 0.25rem;
border-radius: var(--radius);
transition: color 0.15s, background 0.15s;
}
.zddc-stage:hover {
color: var(--text);
background: var(--bg-secondary);
text-decoration: none;
}
.zddc-stage--active {
color: var(--primary);
font-weight: 600;
}
.zddc-stage--active:hover {
color: var(--primary);
}
/* shared/logo.css — paired with shared/logo.js. The wrapping anchor
inherits the logo's box and adds a subtle hover/focus affordance
so it reads as clickable without altering the logo's visual weight. */
.app-header__logo-link {
display: inline-flex;
align-items: center;
text-decoration: none;
border-radius: var(--radius);
transition: opacity 0.15s, box-shadow 0.15s;
}
.app-header__logo-link:hover .app-header__logo,
.app-header__logo-link:focus-visible .app-header__logo {
opacity: 0.82;
}
.app-header__logo-link:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
/* mdedit component styles — reset and tokens from shared/base.css */
/* Pane resizer */
.pane-resizer:hover {
background-color: var(--primary) !important;
}
/* File tree */
.file-tree {
font-size: 0.9rem;
}
.directory-item,
.file-item {
transition: background-color 0.15s ease;
}
.dir-icon {
display: inline-flex;
align-items: center;
justify-content: center;
transform: rotate(90deg);
transition: transform 0.2s ease;
vertical-align: middle;
}
.dir-icon svg {
width: 12px;
height: 12px;
stroke: currentColor;
stroke-width: 2;
}
.directory-item.collapsed .dir-icon {
transform: rotate(0deg);
}
/* Two-line filename styles */
.filename-main {
font-size: 0.9rem;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.filename-secondary {
font-size: 0.75rem;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Active file highlighting */
.active-file {
background-color: var(--primary) !important;
color: var(--text-light) !important;
font-weight: 500;
}
.active-file * {
color: var(--text-light) !important;
}
/* ── File Tree Action Buttons ──────────────────────────────────────────────── */
.tree-actions {
display: flex;
gap: 0.25rem;
align-items: center;
margin-left: auto;
opacity: 0;
transition: opacity 0.2s ease;
}
.directory-item:hover .tree-actions,
.file-item:hover .tree-actions,
.active-file .tree-actions {
opacity: 1;
}
/* Always-visible action buttons (e.g. scratchpad download) */
.tree-actions--always { opacity: 1; }
.tree-btn:disabled,
.tree-btn.is-disabled {
opacity: 0.35;
cursor: not-allowed;
}
.tree-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.25rem;
height: 1.25rem;
padding: 0;
border: none;
background-color: transparent;
color: var(--text-muted);
cursor: pointer;
border-radius: 0.25rem;
transition: background-color 0.15s ease, color 0.15s ease;
}
.tree-btn:hover {
background-color: var(--bg-secondary);
color: var(--text);
}
.tree-btn--danger:hover {
background-color: #fee2e2;
color: #dc2626;
}
[data-theme="dark"] .tree-btn--danger:hover {
background-color: rgba(127, 29, 29, 0.5);
color: #fca5a5;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .tree-btn--danger:hover {
background-color: rgba(127, 29, 29, 0.5);
color: #fca5a5;
}
}
.tree-btn svg {
width: 1rem;
height: 1rem;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
/* Directory toggle indicator */
.directory-item {
position: relative;
}
.directory-item.collapsed .directory-contents {
display: none;
}
/* File view container */
.file-view-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
}
/* File header */
.file-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 1rem;
background-color: var(--bg-secondary);
border-bottom: 1px solid var(--border);
}
.file-title {
font-size: 1.125rem;
font-weight: 500;
color: var(--text);
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* File content area */
.file-content-area {
display: flex;
flex: 1;
overflow: hidden;
}
/* Content container */
#content-container {
flex-direction: column;
height: 100%;
}
/* Image preview */
.image-preview-container {
display: flex;
align-items: center;
justify-content: center;
background-color: var(--bg-secondary);
}
.image-preview {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* HTML preview iframe */
.html-preview-container {
width: 100%;
height: 100%;
}
.html-preview-iframe {
width: 100%;
height: 100%;
border: 0;
}
/* Dirty indicator */
.dirty-indicator {
margin-left: 0.25rem;
color: var(--warning);
font-weight: bold;
}
.is-dirty {
font-style: italic;
}
/* ── Tailwind class overrides: use CSS tokens instead of hardcoded colours ── */
/* bg-white / bg-gray-100 are used on the pane backgrounds in template.html. */
/* Override them here so they follow the design-token system (light + dark). */
.bg-white { background-color: var(--bg) !important; }
.bg-gray-100 { background-color: var(--bg-secondary) !important; }
/* ── Section headers (YAML front matter, TOC, etc.) ───────────────────────── */
/* Shared style for all collapsible/section headers inside the side pane —
keeps font, padding, weight identical to the file-tree pane header. */
.pane-section-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background-color: var(--bg-secondary);
color: var(--text);
border-bottom: 1px solid var(--border);
font-size: 0.9rem;
font-weight: 500;
user-select: none;
}
.pane-section-header .toggle-icon {
font-size: 0.75rem;
color: var(--text-muted);
width: 0.75rem;
text-align: center;
}
/* ── Front matter section ──────────────────────────────────────────────────── */
.front-matter-nav {
display: flex;
flex-direction: column;
overflow: hidden;
flex-shrink: 0;
background-color: var(--bg);
}
.front-matter-header:hover {
background-color: var(--bg-hover);
}
.front-matter-content {
flex: 1;
overflow: auto;
min-height: 0;
}
/* When collapsed, hide content; height shrinks to header */
.front-matter-nav.collapsed {
height: auto !important;
flex-shrink: 0;
}
.front-matter-nav.collapsed .front-matter-content {
display: none;
}
/* Front matter textarea fills the content area */
.front-matter-textarea {
color: var(--text);
background-color: var(--bg);
border: none;
resize: none;
font-family: var(--font-mono);
font-size: 0.8rem;
white-space: pre;
overflow: auto;
width: 100%;
height: 100%;
padding: 0.5rem 1rem;
box-sizing: border-box;
display: block;
}
.front-matter-textarea:focus {
outline: none;
}
/* ── Horizontal pane resizer (height split) ─────────────────────────────── */
.pane-resizer.horizontal {
height: 4px;
width: 100%;
cursor: row-resize;
background-color: var(--border);
flex-shrink: 0;
transition: background-color 0.15s ease;
}
.pane-resizer.horizontal:hover,
.pane-resizer.horizontal.active {
background-color: var(--primary);
}
/* ── Hidden utility (for disabled buttons) ─────────────────────────────────── */
.hide { display: none; }
/* ── File tree row layout ───────────────────────────────────────────────────── */
.tree-row {
display: flex;
align-items: center;
min-width: 0;
}
.tree-row__label {
flex: 1;
min-width: 0;
overflow: hidden;
display: flex;
align-items: center;
gap: 0.25rem;
}
/* The text wrapper inside a tree-row label. For ZDDC-conforming files and
folders, this wraps two stacked <div>s (filename-main + filename-secondary)
so the row reads top-to-bottom as title + metadata — same shape the archive
tool uses for its transmittal-folder list. For non-ZDDC entries it just
contains a single line. flex column makes the two-line case work; min-width:0
lets each line truncate independently. */
.tree-row__name {
display: flex;
flex-direction: column;
min-width: 0;
flex: 1;
line-height: 1.25;
}
/* ── New-file modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.4);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal-box {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 0.5rem;
padding: 1.5rem;
min-width: 20rem;
display: flex;
flex-direction: column;
gap: 1rem;
box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.modal-title {
font-size: 1rem;
font-weight: 600;
color: var(--text);
margin: 0;
}
.modal-input {
width: 100%;
padding: 0.4rem 0.6rem;
border: 1px solid var(--border);
border-radius: 0.25rem;
font-size: 0.9rem;
color: var(--text);
background: var(--bg);
box-sizing: border-box;
}
.modal-input:focus {
outline: 2px solid var(--primary);
outline-offset: 1px;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
}
/* File-nav pane: initial width + minimum size. Runtime resizer (resizer.js)
overrides via inline style.width when the user drags; the min-width here
is a defensive backstop. */
#file-nav {
width: 450px;
min-width: 200px;
}
/* Toast UI Editor styles */
#markdown-editor {
display: block !important;
height: 100% !important;
min-height: 500px !important;
width: 100% !important;
position: relative !important;
z-index: 10;
}
.editor-instance {
height: 100% !important;
min-height: 500px !important;
}
.toastui-editor-defaultUI {
height: 100% !important;
}
.toastui-editor-defaultUI-toolbar,
.toastui-editor-main,
.toastui-editor-main .ProseMirror,
.toastui-editor-main .toastui-editor-md-preview {
height: 100% !important;
}
/* ── Toast UI Editor — dark-theme overrides ───────────────────────────────
Toast UI ships with light-mode chrome and edit surfaces by default. In
mdedit's dark mode the editor's text (#222) falls onto the transparent
md-container, which inherits var(--bg) dark = #1e1e1e → effectively
black-on-black. Override the load-bearing surfaces with mdedit's tokens
so the editor harmonises with the rest of the chrome.
The selectors target both manual override (data-theme="dark") and the
OS-pref auto fallback (prefers-color-scheme + no data-theme="light"). */
/* Manual dark override */
[data-theme="dark"] .toastui-editor-defaultUI,
[data-theme="dark"] .toastui-editor-md-container,
[data-theme="dark"] .toastui-editor-md-preview,
[data-theme="dark"] .toastui-editor-ww-container,
[data-theme="dark"] .toastui-editor-mode-switch,
[data-theme="dark"] .toastui-editor-main,
[data-theme="dark"] .ProseMirror {
background-color: var(--bg);
color: var(--text);
}
[data-theme="dark"] .toastui-editor-defaultUI-toolbar {
background-color: var(--bg-secondary);
border-bottom-color: var(--border);
}
[data-theme="dark"] .toastui-editor-md-splitter {
background-color: var(--border);
}
[data-theme="dark"] .toastui-editor-toolbar-icons {
/* Toast UI's icons are sprite-baked dark; invert flips them to light. */
filter: invert(0.85) hue-rotate(180deg);
}
[data-theme="dark"] .toastui-editor-toolbar-divider {
background-color: var(--border);
}
[data-theme="dark"] .toastui-editor-mode-switch {
border-top-color: var(--border);
}
[data-theme="dark"] .toastui-editor-mode-switch .tab-item {
color: var(--text-muted);
}
[data-theme="dark"] .toastui-editor-mode-switch .tab-item.active {
color: var(--text);
background-color: var(--bg);
}
[data-theme="dark"] .toastui-editor-popup,
[data-theme="dark"] .toastui-editor-context-menu {
background-color: var(--bg-secondary);
color: var(--text);
border-color: var(--border);
}
/* OS-pref auto fallback (matches every selector above) */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .toastui-editor-defaultUI,
:root:not([data-theme="light"]) .toastui-editor-md-container,
:root:not([data-theme="light"]) .toastui-editor-md-preview,
:root:not([data-theme="light"]) .toastui-editor-ww-container,
:root:not([data-theme="light"]) .toastui-editor-mode-switch,
:root:not([data-theme="light"]) .toastui-editor-main,
:root:not([data-theme="light"]) .ProseMirror {
background-color: var(--bg);
color: var(--text);
}
:root:not([data-theme="light"]) .toastui-editor-defaultUI-toolbar {
background-color: var(--bg-secondary);
border-bottom-color: var(--border);
}
:root:not([data-theme="light"]) .toastui-editor-md-splitter {
background-color: var(--border);
}
:root:not([data-theme="light"]) .toastui-editor-toolbar-icons {
filter: invert(0.85) hue-rotate(180deg);
}
:root:not([data-theme="light"]) .toastui-editor-toolbar-divider {
background-color: var(--border);
}
:root:not([data-theme="light"]) .toastui-editor-mode-switch {
border-top-color: var(--border);
}
:root:not([data-theme="light"]) .toastui-editor-mode-switch .tab-item {
color: var(--text-muted);
}
:root:not([data-theme="light"]) .toastui-editor-mode-switch .tab-item.active {
color: var(--text);
background-color: var(--bg);
}
:root:not([data-theme="light"]) .toastui-editor-popup,
:root:not([data-theme="light"]) .toastui-editor-context-menu {
background-color: var(--bg-secondary);
color: var(--text);
border-color: var(--border);
}
}
/* Table of Contents styles */
.toc-pane {
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.toc-section {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.toc-container,
.toc-content {
flex: 1;
overflow-y: auto;
padding: 1rem;
}
/* Header layout — font/padding/weight come from .pane-section-header. */
.toc-header {
justify-content: space-between;
}
.toc-depth-selector {
font-size: 0.85rem;
padding: 2px 6px;
border-radius: 3px;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
}
.toc-list {
list-style: none;
padding-left: 0;
margin: 0;
font-size: 0.8rem;
}
.toc-item {
padding: 0;
margin: 0;
line-height: 1.2;
}
/* TOC heading level styles */
.toc-level-1 > a {
font-size: 0.9rem;
font-weight: 600;
color: var(--text);
}
.toc-level-2 > a {
font-size: 0.85rem;
font-weight: 600;
color: var(--text);
}
.toc-level-3 > a {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-muted);
}
.toc-level-4 > a {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
}
.toc-level-5 > a,
.toc-level-6 > a {
font-size: 0.7rem;
font-weight: 600;
color: var(--text-muted);
}
/* Nested list spacing */
.toc-list ul {
list-style: none;
padding-left: 6px;
margin: 0;
}
.toc-list li {
margin-bottom: 1px;
line-height: 1.2;
}
.toc-list li a {
display: block;
padding: 2px 6px;
color: var(--text-muted);
text-decoration: none;
border-radius: 3px;
transition: background-color 0.15s ease;
}
.toc-list li a:hover {
background-color: var(--bg-hover);
color: var(--text);
}
/* Active TOC item highlighting */
.toc-list li.toc-active {
background-color: var(--primary);
border-radius: 3px;
}
/* Use high-specificity selectors to override per-level color rules */
.toc-list li.toc-active > a,
.toc-list li.toc-active > a:hover,
.toc-list li.toc-level-1.toc-active > a,
.toc-list li.toc-level-2.toc-active > a,
.toc-list li.toc-level-3.toc-active > a,
.toc-list li.toc-level-4.toc-active > a,
.toc-list li.toc-level-5.toc-active > a,
.toc-list li.toc-level-6.toc-active > a {
color: var(--text-light);
border-bottom-color: transparent;
background-color: transparent;
}
.toc-list li.toc-level-1 {
font-weight: 700;
font-size: 1rem;
padding-left: 0px;
}
.toc-list li.toc-level-1 a {
color: var(--text);
border-bottom: 1px solid var(--primary);
padding-bottom: 2px;
}
/* Tree-style connecting lines for TOC hierarchy */
.toc-list li.toc-level-2 {
font-weight: 650;
font-size: 0.9rem;
padding-left: 16px;
position: relative;
}
.toc-list li.toc-level-2::before {
content: '';
position: absolute;
left: 6px;
top: 0;
bottom: 50%;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
width: 8px;
}
.toc-list li.toc-level-2 a {
color: var(--text);
}
.toc-list li.toc-level-3 {
font-weight: 600;
font-size: 0.8rem;
padding-left: 32px;
position: relative;
}
.toc-list li.toc-level-3::before {
content: '';
position: absolute;
left: 22px;
top: 0;
bottom: 50%;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
width: 8px;
}
.toc-list li.toc-level-3 a {
color: var(--text-muted);
}
.toc-list li.toc-level-4 {
font-weight: 600;
font-size: 0.75rem;
padding-left: 48px;
position: relative;
}
.toc-list li.toc-level-4::before {
content: '';
position: absolute;
left: 38px;
top: 0;
bottom: 50%;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
width: 8px;
}
.toc-list li.toc-level-4 a {
color: var(--text-muted);
}
.toc-list li.toc-level-5 {
font-weight: 600;
font-size: 0.7rem;
padding-left: 64px;
font-style: italic;
position: relative;
}
.toc-list li.toc-level-5::before {
content: '';
position: absolute;
left: 54px;
top: 0;
bottom: 50%;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
width: 8px;
}
.toc-list li.toc-level-5 a {
color: var(--text-muted);
}
.toc-list li.toc-level-6 {
font-weight: 600;
font-size: 0.65rem;
padding-left: 80px;
font-style: italic;
text-transform: uppercase;
letter-spacing: 0.05em;
position: relative;
}
.toc-list li.toc-level-6::before {
content: '';
position: absolute;
left: 70px;
top: 0;
bottom: 50%;
border-left: 1px solid var(--border);
border-bottom: 1px solid var(--border);
width: 8px;
}
.toc-list li.toc-level-6 a {
color: var(--text-muted);
}
/* Vertical connecting lines */
.toc-list li:not(.toc-level-1)::after {
content: '';
position: absolute;
left: 6px;
top: 50%;
bottom: -2px;
border-left: 1px solid var(--border);
z-index: -1;
}
.toc-list li.toc-level-3::after {
left: 22px;
}
.toc-list li.toc-level-4::after {
left: 38px;
}
.toc-list li.toc-level-5::after {
left: 54px;
}
.toc-list li.toc-level-6::after {
left: 70px;
}
/* Markdown content rendering styles */
.markdown-content {
line-height: 1.6;
}
.markdown-content h1,
.toastui-editor-contents h1 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 2em;
font-weight: 600;
line-height: 1.25;
margin-top: 24px;
margin-bottom: 16px;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--border);
color: var(--text);
word-wrap: break-word;
}
.markdown-content h2,
.toastui-editor-contents h2 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1.5em;
font-weight: 600;
line-height: 1.25;
margin-top: 24px;
margin-bottom: 16px;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--border);
color: var(--text);
word-wrap: break-word;
}
.markdown-content h3,
.toastui-editor-contents h3 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1.25em;
font-weight: 600;
line-height: 1.25;
margin-top: 16px;
margin-bottom: 16px;
color: var(--text);
word-wrap: break-word;
}
.markdown-content h4,
.toastui-editor-contents h4 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 1em;
font-weight: 600;
line-height: 1.25;
margin-top: 16px;
margin-bottom: 16px;
color: var(--text);
word-wrap: break-word;
}
.markdown-content h5,
.toastui-editor-contents h5 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 0.875em;
font-weight: 600;
line-height: 1.25;
margin-top: 16px;
margin-bottom: 16px;
color: var(--text);
word-wrap: break-word;
}
.markdown-content h6,
.toastui-editor-contents h6 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 0.85em;
font-weight: 600;
line-height: 1.25;
margin-top: 16px;
margin-bottom: 16px;
color: var(--text-muted);
word-wrap: break-word;
}
/* Reset margin-top for first-child headings */
.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child,
.toastui-editor-contents h1:first-child,
.toastui-editor-contents h2:first-child,
.toastui-editor-contents h3:first-child,
.toastui-editor-contents h4:first-child,
.toastui-editor-contents h5:first-child,
.toastui-editor-contents h6:first-child {
margin-top: 0;
}
/* Reduce spacing between consecutive headings */
.markdown-content h1 + h2,
.toastui-editor-contents h1 + h2 {
margin-top: 1rem;
}
.markdown-content h2 + h3,
.toastui-editor-contents h2 + h3 {
margin-top: 1.5rem;
}
.markdown-content h3 + h4,
.toastui-editor-contents h3 + h4 {
margin-top: 1.25rem;
}
.markdown-content h4 + h5,
.toastui-editor-contents h4 + h5 {
margin-top: 1rem;
}
.markdown-content h5 + h6,
.toastui-editor-contents h5 + h6 {
margin-top: 0.75rem;
}
.markdown-content p,
.toastui-editor-contents p {
margin-bottom: 1rem;
}
.markdown-content ul,
.markdown-content ol,
.toastui-editor-contents ul,
.toastui-editor-contents ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
.markdown-content ul,
.toastui-editor-contents ul {
list-style-type: disc;
}
.markdown-content ol,
.toastui-editor-contents ol {
list-style-type: decimal;
}
.markdown-content li,
.toastui-editor-contents li {
margin-bottom: 0.25rem;
}
.markdown-content code,
.toastui-editor-contents code {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 0.9em;
padding: 0.2em 0.4em;
background-color: var(--bg-secondary);
border-radius: 0.25rem;
}
.markdown-content pre,
.toastui-editor-contents pre {
margin-bottom: 1rem;
padding: 1rem;
background-color: var(--bg-secondary);
border-radius: 0.375rem;
overflow-x: auto;
}
.markdown-content pre code,
.toastui-editor-contents pre code {
background-color: transparent;
padding: 0;
border-radius: 0;
}
.markdown-content blockquote,
.toastui-editor-contents blockquote {
border-left: 4px solid var(--border);
padding-left: 1rem;
margin-left: 0;
margin-right: 0;
margin-bottom: 1rem;
color: var(--text-muted);
}
.markdown-content a,
.toastui-editor-contents a {
color: var(--primary);
text-decoration: none;
}
.markdown-content a:hover,
.toastui-editor-contents a:hover {
text-decoration: underline;
}
.markdown-content table,
.toastui-editor-contents table {
border-collapse: collapse;
width: 100%;
margin-bottom: 1rem;
}
.markdown-content th,
.markdown-content td,
.toastui-editor-contents th,
.toastui-editor-contents td {
border: 1px solid var(--border);
padding: 0.5rem;
text-align: left;
}
.markdown-content th,
.toastui-editor-contents th {
background-color: var(--bg-secondary);
font-weight: 600;
}
.markdown-content tr:nth-child(even),
.toastui-editor-contents tr:nth-child(even) {
background-color: var(--bg-hover);
}
</style>
</head>
<body>
<div id="app" class="flex flex-col h-screen w-full overflow-hidden">
<header class="app-header">
<div class="header-left">
<svg class="app-header__logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" aria-hidden="true">
<rect width="64" height="64" rx="12" fill="#1e3a5f"/>
<g fill="#fff">
<rect x="14" y="18" width="36" height="7"/>
<polygon points="43,25 50,25 21,43 14,43"/>
<rect x="14" y="43" width="36" height="7"/>
</g>
</svg>
<div class="header-title-group">
<span class="app-header__title">ZDDC Markdown</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · flag-cabin-dock</span></span>
</div>
<button id="addDirectoryBtn" class="btn btn-primary" title="Add a local directory">Add Local Directory</button>
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh directory" aria-label="Refresh"></button>
</div>
<div class="header-right">
<button id="theme-btn" class="btn btn-secondary" title="Theme: auto (follows OS)" aria-label="Theme: auto (follows OS)"></button>
<button id="help-btn" class="btn btn-secondary" title="Help">?</button>
</div>
</header>
<main class="flex-1 overflow-hidden relative">
<div class="resizable-pane horizontal flex flex-row relative w-full h-full overflow-hidden" id="root-pane" data-pane-type="root">
<div class="pane nav-pane relative flex flex-col bg-white dark:bg-gray-900 overflow-hidden" id="file-nav" data-pane-type="file-nav">
<div class="pane-header flex flex-col px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700 select-none">
<div class="flex justify-between items-center w-full">
<span>Files</span>
<div class="flex items-center gap-1">
<button id="new-file-root" class="btn btn-secondary btn-sm hidden" title="New file in root directory">+</button>
</div>
</div>
</div>
<div class="pane-content flex-1 overflow-auto p-4">
<div id="file-tree" class="file-tree py-2">
</div>
</div>
</div>
<div class="pane-resizer bg-gray-200 dark:bg-gray-700 transition-colors relative z-10 w-1 cursor-col-resize hover:bg-blue-500" data-resizer-for="file-nav"></div>
<div class="pane content-pane flex-1 relative flex flex-col bg-white dark:bg-gray-900 overflow-hidden" id="main-content">
<div id="welcome-screen" class="welcome-screen hidden flex-col items-center justify-center h-full text-gray-500 dark:text-gray-400 text-center p-6">
<p id="welcome-hint" class="text-sm">Click <strong>Scratchpad</strong> in the file list to start editing,<br>or <strong>Add Local Directory</strong> to work with files.</p>
<p id="welcome-firefox" class="text-sm text-amber-600 hidden mt-2">Your browser doesn't support the File System API.<br>Use <strong>Scratchpad</strong> to edit markdown and download as a file.</p>
</div>
<div id="content-container" class="content-container flex flex-col h-full hidden">
</div>
</div>
</div>
</main>
<footer class="status-bar flex justify-between items-center px-4 h-6 text-xs bg-gray-100 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700">
<div class="status-left flex items-center gap-6 py-1">
<button id="save-all" class="btn inline-flex items-center gap-2 px-3 py-1 text-sm bg-transparent border border-gray-300 dark:border-gray-600 rounded text-gray-800 dark:text-gray-200 cursor-pointer transition-all hover:bg-gray-200 dark:hover:bg-gray-700 h-6 leading-none" title="Save All">
<svg class="btn-icon w-3.5 h-3.5 fill-current opacity-80" viewBox="0 0 16 16" fill="currentColor">
<path d="M11.5 1H4.5a1.5 1.5 0 0 0-1.5 1.5v11a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-11a1.5 1.5 0 0 0-1.5-1.5zm-7 1h7a.5.5 0 0 1 .5.5V9H4V2.5a.5.5 0 0 1 .5-.5zM4 10h8v3.5a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5V10z"></path>
<path d="M6.5 0a.5.5 0 0 1 .5.5V2h2V.5a.5.5 0 0 1 1 0V2h1.5a.5.5 0 0 1 0 1H10v2.5a.5.5 0 0 1-1 0V3H7v2.5a.5.5 0 0 1-1 0V3H4.5a.5.5 0 0 1 0-1H6V.5a.5.5 0 0 1 .5-.5z"></path>
</svg>
Save All
</button>
<span id="folder-count" class="status-message text-sm text-gray-800 dark:text-gray-200 opacity-80">0 folders</span>
<span id="file-count" class="status-message text-sm text-gray-800 dark:text-gray-200 opacity-80">0 files</span>
<span id="unsaved-count" class="status-message text-sm text-gray-800 dark:text-gray-200 opacity-80">0 unsaved</span>
</div>
<div class="status-right flex items-center gap-4">
<a href="https://codeberg.org/VARASYS/ZDDC" target="_blank" rel="noopener noreferrer" class="source-link" title="View source code">
<svg class="source-icon fill-current transition-opacity hover:opacity-80" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true">
<path d="M5.5 11.5L1 8l4.5-3.5L4.4 3 0 8l4.4 5 1.1-1.5zm5 0L15 8l-4.5-3.5L11.6 3 16 8l-4.4 5-1.1-1.5z"></path>
</svg>
</a>
</div>
</footer>
<!-- Help Panel -->
<aside id="help-panel" class="help-panel" hidden aria-labelledby="help-panel-title">
<div class="help-panel__header">
<h2 id="help-panel-title" class="help-panel__title">Help — ZDDC Markdown</h2>
<button type="button" class="help-panel__close" id="help-panel-close" aria-label="Close">&times;</button>
</div>
<div class="help-panel__body">
<h3>What is ZDDC Markdown?</h3>
<p>ZDDC Markdown is a browser-based Markdown editor that reads and writes files directly on your local file system. Everything runs locally — no data is sent to any server.</p>
<h3>Getting Started</h3>
<ol>
<li>Click <strong>Add Local Directory</strong> to open a folder. The file tree on the left will populate with all files in that folder.</li>
<li>Click any Markdown file (<code>.md</code>) in the tree to open it in the editor.</li>
<li>Use the <strong>Scratchpad</strong> entry (always visible at the top of the tree) for temporary notes without saving to disk.</li>
</ol>
<h3>Editor Modes</h3>
<dl>
<dt>WYSIWYG</dt>
<dd>A rich-text view where formatting is rendered live. Good for composing content.</dd>
<dt>Markdown</dt>
<dd>A plain-text view showing raw Markdown syntax. Good for precise control.</dd>
</dl>
<p>Switch between modes using the toolbar buttons at the top-right of the editor.</p>
<h3>Saving Files</h3>
<dl>
<dt>Auto-save indicator</dt>
<dd>A bullet (•) next to the filename in the tree indicates unsaved changes.</dd>
<dt>Save (Ctrl+S)</dt>
<dd>Saves the currently active file.</dd>
<dt>Save All</dt>
<dd>Saves all files that have unsaved changes in one operation.</dd>
</dl>
<h3>Table of Contents</h3>
<p>When a Markdown file is open, a table of contents is generated from its headings and shown on the right side. Use the depth selector to control how many heading levels appear.</p>
<h3>Browser Compatibility</h3>
<p>File system access requires a Chromium-based browser (Chrome, Edge, Brave). In Firefox and other browsers, the <strong>Scratchpad</strong> is available for editing, and files can be saved via download.</p>
<h3>Keyboard Shortcuts</h3>
<dl>
<dt><kbd>Ctrl+S</kbd></dt>
<dd>Save the current file.</dd>
<dt><kbd>Escape</kbd></dt>
<dd>Close this help panel.</dd>
</dl>
</div>
</aside>
<!-- New-file modal -->
<div id="new-file-modal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="new-file-modal-title">
<div class="modal-box">
<h3 id="new-file-modal-title" class="modal-title">New file name</h3>
<input id="new-file-input" type="text" class="modal-input" value="untitled.md" autocomplete="off" spellcheck="false">
<div class="modal-actions">
<button id="new-file-cancel" class="btn btn-secondary">Cancel</button>
<button id="new-file-confirm" class="btn btn-primary">Create</button>
</div>
</div>
</div>
</div>
<script>
/**
* ZDDC — shared naming convention library
*
* Canonical implementation of all ZDDC filename, folder name, tracking number,
* revision, and status logic. Included in every tool's build via shared/zddc.js.
*
* Exposed as window.zddc (plain global) so it works with every tool's module
* pattern (archive globals, classifier IIFE, transmittal IIFE, mdedit globals).
*
* Public API
* ----------
* zddc.parseFilename(str) → ParsedFile | null
* zddc.parseFolder(str) → ParsedFolder | null
* zddc.parseRevision(str) → ParsedRevision
* zddc.formatFilename(parts) → string
* zddc.formatFolder(parts) → string
* zddc.compareRevisions(a, b) → number (-1 | 0 | 1)
* zddc.isValidStatus(str) → boolean
* zddc.STATUSES → string[]
*
* ParsedFile { trackingNumber, revision, status, title, extension }
* ParsedFolder { date, trackingNumber, status, title }
* ParsedRevision { base, modifier, modifierType, modifierNumber, isDraft, full }
*/
(function (root) {
'use strict';
// ── Valid status codes ───────────────────────────────────────────────────
/**
* Complete list of valid ZDDC document status codes.
* '---' denotes an unknown or not-yet-assigned status.
*/
var STATUSES = [
'---',
'IFA', 'IFB', 'IFC', 'IFD', 'IFI', 'IFP', 'IFR', 'IFU',
'REC',
'RSA', 'RSB', 'RSC', 'RSD', 'RSI',
];
var STATUS_SET = {};
for (var _i = 0; _i < STATUSES.length; _i++) {
STATUS_SET[STATUSES[_i]] = true;
}
function isValidStatus(str) {
return !!STATUS_SET[str];
}
// ── Filename parsing ─────────────────────────────────────────────────────
/**
* Canonical file regex.
* Matches: TRACKING_REVISION (STATUS) - TITLE.EXT
*
* Tracking number: no underscores, no whitespace.
* Revision: no whitespace, no parentheses.
* Status: anything inside parentheses (validated separately).
* Title: everything up to the last dot.
* Extension: after the last dot (lowercased by parseFilename).
*/
var FILE_RE = /^([^_\s]+)_([^\s()_]+)\s*\(([^)]+)\)\s*-\s*(\S.*\S|\S)\.\s*([^\s.]+)$/;
/**
* Parse a ZDDC filename.
*
* @param {string} filename
* @returns {{ trackingNumber: string, revision: string, status: string,
* title: string, extension: string, valid: boolean } | null}
* null only if filename is falsy.
* `valid` is true when all fields matched the ZDDC pattern.
*/
function parseFilename(filename) {
if (!filename) { return null; }
var match = filename.match(FILE_RE);
if (!match) {
var lastDot = filename.lastIndexOf('.');
return {
trackingNumber: '',
revision: '',
status: '',
title: lastDot > 0 ? filename.substring(0, lastDot) : filename,
extension: lastDot > 0 ? filename.substring(lastDot + 1).toLowerCase() : '',
valid: false,
};
}
return {
trackingNumber: match[1].trim(),
revision: match[2].trim(),
status: match[3].trim(),
title: match[4].trim(),
extension: match[5].toLowerCase(),
valid: true,
};
}
// ── Folder name parsing ──────────────────────────────────────────────────
/**
* Transmittal folder regex.
* Matches: YYYY-MM-DD_TRACKING (STATUS) - TITLE
*/
var FOLDER_RE = /^(\d{4}-\d{2}-\d{2})_([^_\s(]+)\s*\(([^)]+)\)\s*-\s*(.+)$/;
/**
* Parse a ZDDC transmittal folder name.
*
* @param {string} foldername
* @returns {{ date: string, trackingNumber: string, status: string,
* title: string, valid: boolean } | null}
* null only if foldername is falsy.
*/
function parseFolder(foldername) {
if (!foldername) { return null; }
var match = foldername.match(FOLDER_RE);
if (!match) {
return {
date: '',
trackingNumber: '',
status: '',
title: foldername,
valid: false,
};
}
return {
date: match[1],
trackingNumber: match[2].trim(),
status: match[3].trim(),
title: match[4].trim(),
valid: true,
};
}
// ── Revision parsing ─────────────────────────────────────────────────────
/**
* Modifier sub-regex: +LETTER DIGITS e.g. +C1, +B2, +N1, +Q1
* The draft prefix (~) may appear inside the modifier: A+~C1
*/
var MODIFIER_RE = /^\+(~?)([A-Za-z])(\d+)$/;
/**
* Parse a ZDDC revision string.
*
* Revision grammar:
* revision = ['~'] base ['+' ['~'] modifier_letter modifier_number]
* base = letter(s) | digit(s) | date(YYYY-MM-DD)
* modifier = letter + digits e.g. C1, B2, N1, Q1
*
* @param {string} revision
* @returns {{
* base: string,
* modifier: string, full modifier string e.g. '+C1', '' if none
* modifierType: string, modifier letter e.g. 'C', '' if none
* modifierNumber: number, modifier number e.g. 1, 0 if none
* modifierIsDraft: boolean,
* isDraft: boolean, true if base revision starts with ~
* full: string, original input
* }}
*/
function parseRevision(revision) {
var raw = (revision || '').toString();
// Split on '+' to separate base from optional modifier
var plusIdx = raw.indexOf('+');
var basePart = plusIdx === -1 ? raw : raw.substring(0, plusIdx);
var modifierPart = plusIdx === -1 ? '' : raw.substring(plusIdx);
// Draft flag on the base part
var isDraft = basePart.startsWith('~');
var base = isDraft ? basePart.substring(1) : basePart;
// Parse modifier
var modifier = '';
var modifierType = '';
var modifierNumber = 0;
var modifierIsDraft = false;
if (modifierPart) {
var mMatch = modifierPart.match(MODIFIER_RE);
if (mMatch) {
modifierIsDraft = mMatch[1] === '~';
modifierType = mMatch[2].toUpperCase();
modifierNumber = parseInt(mMatch[3], 10);
modifier = modifierPart;
} else {
// Unrecognised modifier — preserve as-is
modifier = modifierPart;
}
}
return {
base: base,
modifier: modifier,
modifierType: modifierType,
modifierNumber: modifierNumber,
modifierIsDraft: modifierIsDraft,
isDraft: isDraft,
full: raw,
};
}
// ── Revision comparison ──────────────────────────────────────────────────
/**
* Classify a base revision string into a sort tier:
* 0 = date (YYYY-MM-DD)
* 1 = letter(s) A, B, AA …
* 2 = number(s) 0, 1, 2, 1.5 …
* 3 = other
*/
function _baseTier(base) {
if (/^\d{4}-\d{2}-\d{2}$/.test(base)) { return 0; }
if (/^[A-Za-z]+$/.test(base)) { return 1; }
if (/^\d+(\.\d+)?$/.test(base)) { return 2; }
return 3;
}
/**
* Compare two base revision strings.
* Sort order: dates < letters < numbers < other.
*/
function _compareBase(a, b) {
var ta = _baseTier(a);
var tb = _baseTier(b);
if (ta !== tb) { return ta - tb; }
if (ta === 0) { return a < b ? -1 : a > b ? 1 : 0; } // date lexicographic = chronological
if (ta === 1) { return a.toUpperCase() < b.toUpperCase() ? -1 : a.toUpperCase() > b.toUpperCase() ? 1 : 0; }
if (ta === 2) { return parseFloat(a) - parseFloat(b); }
return a.localeCompare(b);
}
/**
* Compare two ZDDC revision strings for sort ordering.
*
* Canonical order (ascending = older → newer):
* ~A < A < A+B1 < A+C1 < A+~C2 < A+C2 < A+N1 < A+Q1
* < ~B < B < … < 0 < 1 < 2
*
* Rules:
* 1. Compare base revisions first (dates < letters < numbers).
* 2. For equal bases, draft (isDraft=true) comes before final.
* 3. For equal base+draft, no-modifier < has-modifier.
* 4. For equal base+draft+modifier presence:
* a. modifier draft comes before modifier final (modifierIsDraft).
* b. Sort modifier by type letter then by number.
*
* @param {string} a
* @param {string} b
* @returns {number} negative if a < b, 0 if equal, positive if a > b
*/
function compareRevisions(a, b) {
var pa = parseRevision(a);
var pb = parseRevision(b);
// 1. Base revision
var baseCmp = _compareBase(pa.base, pb.base);
if (baseCmp !== 0) { return baseCmp; }
// 2. Draft before final (for same base)
if (pa.isDraft !== pb.isDraft) { return pa.isDraft ? -1 : 1; }
// 3. No modifier before any modifier
var aHasMod = pa.modifier !== '';
var bHasMod = pb.modifier !== '';
if (aHasMod !== bHasMod) { return aHasMod ? 1 : -1; }
if (!aHasMod) { return 0; } // both have no modifier
// 4. Compare modifiers: type → number → draft (draft is a tie-breaker only)
// 4a. Modifier type letter (B < C < N < Q …)
if (pa.modifierType !== pb.modifierType) {
return pa.modifierType < pb.modifierType ? -1 : 1;
}
// 4b. Modifier number (1 < 2 …)
if (pa.modifierNumber !== pb.modifierNumber) {
return pa.modifierNumber - pb.modifierNumber;
}
// 4c. Draft of a modifier comes before the final modifier (same type+number)
if (pa.modifierIsDraft !== pb.modifierIsDraft) {
return pa.modifierIsDraft ? -1 : 1;
}
return 0;
}
// ── Filename / folder formatting ─────────────────────────────────────────
/**
* Build a ZDDC filename from its components.
*
* @param {{ trackingNumber: string, revision: string, status: string,
* title: string, extension: string }} parts
* @returns {string} e.g. "123456-EL-SPC-2623_A (IFR) - Specification.pdf"
*/
function formatFilename(parts) {
var tn = (parts.trackingNumber || '').trim();
var rev = (parts.revision || '').trim();
var st = (parts.status || '').trim();
var ttl = (parts.title || '').trim();
var ext = (parts.extension || '').replace(/^\./, '');
if (!tn || !rev || !st || !ttl) { return ''; }
var name = tn + '_' + rev + ' (' + st + ') - ' + ttl;
return ext ? name + '.' + ext : name;
}
/**
* Build a ZDDC transmittal folder name from its components.
*
* @param {{ date: string, trackingNumber: string, status: string,
* title: string }} parts
* @returns {string} e.g. "2025-10-31_123456-EM-SUB-0001 (IFR) - Title"
*/
function formatFolder(parts) {
var dt = (parts.date || '').trim();
var tn = (parts.trackingNumber || '').trim();
var st = (parts.status || '').trim();
var ttl = (parts.title || '').trim();
if (!dt || !tn || !st || !ttl) { return ''; }
return dt + '_' + tn + ' (' + st + ') - ' + ttl;
}
// ── Filename / extension splitting ───────────────────────────────────────
/**
* Split a filename into its base name and extension (no leading dot).
* Treats leading dot ('.gitignore') as no extension.
*
* @param {string} filename
* @returns {{ name: string, extension: string }}
*/
function splitExtension(filename) {
if (!filename) { return { name: '', extension: '' }; }
var lastDot = filename.lastIndexOf('.');
if (lastDot <= 0) { return { name: filename, extension: '' }; }
return {
name: filename.substring(0, lastDot),
extension: filename.substring(lastDot + 1).toLowerCase(),
};
}
/**
* Join a base name and extension. Tolerant of either form ('pdf' or '.pdf').
* Returns just the name when extension is empty.
*/
function joinExtension(name, extension) {
var ext = (extension || '').replace(/^\./, '');
return ext ? name + '.' + ext : name;
}
// ── Public API ───────────────────────────────────────────────────────────
root.zddc = {
STATUSES: STATUSES,
isValidStatus: isValidStatus,
parseFilename: parseFilename,
parseFolder: parseFolder,
parseRevision: parseRevision,
formatFilename: formatFilename,
formatFolder: formatFolder,
compareRevisions: compareRevisions,
splitExtension: splitExtension,
joinExtension: joinExtension,
};
}(typeof window !== 'undefined' ? window : this));
// shared/zddc-source.js — source abstraction for tools that handle
// directory trees (classifier, mdedit, transmittal, browse, archive).
//
// Two backends:
//
// 1. Local — wraps a real FileSystemDirectoryHandle from the
// File System Access API. Reads + writes go through the
// FS Access API directly.
//
// 2. HTTP — talks to zddc-server's directory listing JSON
// (Accept: application/json) for reads and the file API
// (PUT/DELETE/POST X-ZDDC-Op) for writes. Implements a
// polyfill of the FS Access API surface area the tools
// use (kind, name, values(), getFileHandle, getDirectoryHandle,
// removeEntry, getFile, createWritable, queryPermission /
// requestPermission) so existing code works unchanged.
//
// The polyfill makes auto-load possible: when zddc-server serves
// a tool at /<dir>/<tool>.html, the tool detects HTTP mode at
// startup, builds an HttpDirectoryHandle for the tool's containing
// directory, and hands it to the existing openDirectory(handle)
// flow without ever showing the file picker.
//
// Renames inside a tool today are typically done as
// "write new + remove old". With HTTP-backed handles this becomes
// PUT + DELETE — non-atomic. Tools that prefer the atomic server
// MOVE should call window.zddc.source.moveFile(srcUrl, dstUrl)
// directly instead of going through the polyfill.
(function () {
'use strict';
if (!window.zddc) window.zddc = {};
var FA = window.FileSystemDirectoryHandle || null;
// -----------------------------------------------------------------
// HTTP file API helpers
// -----------------------------------------------------------------
function joinUrl(base, name, isDir) {
if (!base.endsWith('/')) base = base + '/';
return base + encodeURIComponent(name) + (isDir ? '/' : '');
}
// Server returns directory entries with a trailing "/" on names.
// Strip it for the FS Access API name surface.
function stripSlash(name) {
return name.endsWith('/') ? name.slice(0, -1) : name;
}
async function httpListing(url) {
var resp = await fetch(url, {
headers: { 'Accept': 'application/json' },
credentials: 'same-origin'
});
if (!resp.ok) {
var err = new Error('listing ' + url + ': HTTP ' + resp.status);
err.status = resp.status;
throw err;
}
var data = await resp.json();
if (!Array.isArray(data)) {
throw new Error('listing ' + url + ': non-array body');
}
return data;
}
async function httpExists(url) {
try {
var r = await fetch(url, { method: 'HEAD', credentials: 'same-origin' });
return r.ok;
} catch (_) {
return false;
}
}
// -----------------------------------------------------------------
// HttpFileHandle — FileSystemFileHandle polyfill
// -----------------------------------------------------------------
function makeFile(blob, name, modTime) {
return new File([blob], name, {
type: blob.type,
lastModified: modTime ? modTime.getTime() : Date.now()
});
}
function HttpFileHandle(url, name, size, modTime) {
this.kind = 'file';
this.name = name;
this._url = url;
this._size = size || 0;
this._modTime = modTime || null;
this._etag = null;
}
HttpFileHandle.prototype.getFile = async function () {
var resp = await fetch(this._url, { credentials: 'same-origin' });
if (!resp.ok) {
throw new Error('GET ' + this._url + ': ' + resp.status);
}
var etag = resp.headers.get('ETag');
if (etag) this._etag = etag.replace(/"/g, '');
var lm = resp.headers.get('Last-Modified');
var modTime = lm ? new Date(lm) : this._modTime;
var blob = await resp.blob();
return makeFile(blob, this.name, modTime);
};
HttpFileHandle.prototype.createWritable = async function () {
var chunks = [];
var handle = this;
return {
async write(data) {
if (data == null) return;
if (typeof data === 'object' && data && 'type' in data && data.type === 'write') {
chunks.push(data.data);
return;
}
if (typeof data === 'object' && data && 'type' in data) {
// seek/truncate not supported by HTTP backend
throw new Error('HttpFileHandle write op not supported: ' + data.type);
}
chunks.push(data);
},
async close() {
var blob = new Blob(chunks);
var resp = await fetch(handle._url, {
method: 'PUT',
body: blob,
credentials: 'same-origin'
});
if (!resp.ok) {
var body = '';
try { body = await resp.text(); } catch (_) { /* ignore */ }
throw new Error('PUT ' + handle._url + ': ' + resp.status + ' ' + body);
}
var et = resp.headers.get('ETag');
if (et) handle._etag = et.replace(/"/g, '');
handle._size = blob.size;
},
async abort() { chunks = []; }
};
};
HttpFileHandle.prototype.queryPermission = async function () { return 'granted'; };
HttpFileHandle.prototype.requestPermission = async function () { return 'granted'; };
HttpFileHandle.prototype.isHttp = true;
HttpFileHandle.prototype.url = function () { return this._url; };
// -----------------------------------------------------------------
// HttpDirectoryHandle — FileSystemDirectoryHandle polyfill
// -----------------------------------------------------------------
function HttpDirectoryHandle(url, name) {
this.kind = 'directory';
if (!url.endsWith('/')) url = url + '/';
this._url = url;
this.name = name || guessNameFromUrl(url);
}
function guessNameFromUrl(url) {
var u = url.replace(/\/+$/, '');
var slash = u.lastIndexOf('/');
return slash >= 0 ? decodeURIComponent(u.substring(slash + 1)) : u;
}
HttpDirectoryHandle.prototype.values = function () {
var url = this._url;
return (async function* () {
var entries;
try {
entries = await httpListing(url);
} catch (e) {
return;
}
for (var i = 0; i < entries.length; i++) {
var e = entries[i];
var rawName = stripSlash(e.name);
// Listing entries can carry an explicit URL for virtual
// links (e.g. the reviewing-aggregator's received/+staged/
// entries point to canonical archive/+staging paths).
// Use it when present so navigation follows the listing's
// own routing rather than computing a synthetic child URL
// off the parent. Caddy-shape listings don't set url
// (or set it to a relative form) — joinUrl handles those.
var childUrl;
if (e.url && /^https?:\/\/|^\//.test(e.url)) {
// Absolute or root-relative: use as-is, normalised against origin.
var u = e.url;
if (u[0] === '/') {
u = location.origin + u;
}
childUrl = u;
} else {
childUrl = joinUrl(url, rawName, e.is_dir);
}
if (e.is_dir) {
yield new HttpDirectoryHandle(childUrl, rawName);
} else {
var modTime = e.mod_time ? new Date(e.mod_time) : null;
yield new HttpFileHandle(childUrl, rawName, e.size || 0, modTime);
}
}
})();
};
HttpDirectoryHandle.prototype.entries = function () {
var iter = this.values();
return (async function* () {
for (;;) {
var step = await iter.next();
if (step.done) return;
yield [step.value.name, step.value];
}
})();
};
HttpDirectoryHandle.prototype.keys = function () {
var iter = this.values();
return (async function* () {
for (;;) {
var step = await iter.next();
if (step.done) return;
yield step.value.name;
}
})();
};
HttpDirectoryHandle.prototype.getFileHandle = async function (name, opts) {
opts = opts || {};
var url = joinUrl(this._url, name, false);
var exists = await httpExists(url);
if (!exists && !opts.create) {
var err = new Error('NotFoundError: ' + name);
err.name = 'NotFoundError';
throw err;
}
return new HttpFileHandle(url, name, 0, null);
};
HttpDirectoryHandle.prototype.getDirectoryHandle = async function (name, opts) {
opts = opts || {};
var url = joinUrl(this._url, name, true);
if (opts.create) {
var resp = await fetch(url, {
method: 'POST',
headers: { 'X-ZDDC-Op': 'mkdir' },
credentials: 'same-origin'
});
if (!resp.ok && resp.status !== 200 && resp.status !== 201) {
throw new Error('mkdir ' + url + ': ' + resp.status);
}
}
return new HttpDirectoryHandle(url, name);
};
HttpDirectoryHandle.prototype.removeEntry = async function (name, opts) {
opts = opts || {};
// Probe listing to discover whether name is a file or directory.
var entries;
try {
entries = await httpListing(this._url);
} catch (e) {
throw new Error('removeEntry probe failed: ' + e.message);
}
var match = null;
for (var i = 0; i < entries.length; i++) {
if (stripSlash(entries[i].name) === name) {
match = entries[i];
break;
}
}
if (!match) {
var err = new Error('NotFoundError: ' + name);
err.name = 'NotFoundError';
throw err;
}
if (match.is_dir && !opts.recursive) {
// Server doesn't expose a recursive-delete endpoint yet,
// and FS Access API requires recursive=true to remove a
// non-empty directory anyway. Reject explicitly so the
// caller doesn't silently leave a stale tree behind.
var derr = new Error('Removing directories over HTTP is not supported');
derr.name = 'InvalidStateError';
throw derr;
}
var url = joinUrl(this._url, name, match.is_dir);
var resp = await fetch(url, { method: 'DELETE', credentials: 'same-origin' });
if (!resp.ok && resp.status !== 204) {
throw new Error('DELETE ' + url + ': ' + resp.status);
}
};
HttpDirectoryHandle.prototype.queryPermission = async function () { return 'granted'; };
HttpDirectoryHandle.prototype.requestPermission = async function () { return 'granted'; };
HttpDirectoryHandle.prototype.isHttp = true;
HttpDirectoryHandle.prototype.url = function () { return this._url; };
// -----------------------------------------------------------------
// Top-level helpers
// -----------------------------------------------------------------
// Strip a trailing tool .html (e.g. classifier.html) from a path
// to land on the "directory the tool was opened in".
function pathToDir(pathname) {
if (!pathname) return '/';
if (pathname.endsWith('/')) return pathname;
var slash = pathname.lastIndexOf('/');
return slash >= 0 ? pathname.substring(0, slash + 1) : '/';
}
// Probe the server-mode root for the current page. Returns:
//
// { handle: HttpDirectoryHandle, status: 200 } — server reachable, listing returned
// { handle: null, status: 403 } — server reachable but listing forbidden
// { handle: null, status: 0 } — not http(s), or server unreachable / non-JSON
//
// Tools that auto-load on startup distinguish 403 (show "no
// permission to list this directory" message) from 0 (fall back
// to local-mode welcome screen).
//
// Tool init pattern:
// if (location.protocol !== 'file:') {
// const r = await zddc.source.detectServerRoot();
// if (r.handle) await openDirectory(r.handle);
// else if (r.status === 403) showNoPermissionMessage();
// else showWelcome();
// } else { showWelcome(); }
async function detectServerRoot() {
if (typeof location === 'undefined') {
return { handle: null, status: 0 };
}
if (location.protocol !== 'http:' && location.protocol !== 'https:') {
return { handle: null, status: 0 };
}
var dirPath = pathToDir(location.pathname);
var url = location.origin + dirPath;
try {
await httpListing(url);
} catch (e) {
if (e && e.status === 403) {
return { handle: null, status: 403 };
}
return { handle: null, status: 0 };
}
return {
handle: new HttpDirectoryHandle(url, guessNameFromUrl(url)),
status: 200,
};
}
// Atomic file move. Path arguments are absolute URL paths
// (starting with /). Honors the file API's POST /op=move
// contract. Returns the new ETag.
async function moveFile(srcUrlPath, dstUrlPath, opts) {
opts = opts || {};
var headers = {
'X-ZDDC-Op': 'move',
'X-ZDDC-Destination': dstUrlPath
};
if (opts.ifMatch) headers['If-Match'] = opts.ifMatch;
var resp = await fetch(srcUrlPath, {
method: 'POST',
headers: headers,
credentials: 'same-origin'
});
if (!resp.ok) {
var body = '';
try { body = await resp.text(); } catch (_) { /* ignore */ }
throw new Error('move ' + srcUrlPath + ' → ' + dstUrlPath + ': ' + resp.status + ' ' + body);
}
var et = resp.headers.get('ETag');
return et ? et.replace(/"/g, '') : null;
}
// Detect at construction time whether a directory handle is the
// HTTP polyfill or a real FS Access API handle. Useful for tools
// that want to take the optimized path (e.g. atomic moveFile)
// when in HTTP mode rather than the FS-API copy+remove fallback.
function isHttpHandle(handle) {
return !!(handle && handle.isHttp === true);
}
window.zddc.source = {
HttpDirectoryHandle: HttpDirectoryHandle,
HttpFileHandle: HttpFileHandle,
detectServerRoot: detectServerRoot,
moveFile: moveFile,
isHttpHandle: isHttpHandle,
// Lower-level helpers exposed for tools that want to call the
// server directly without going through the polyfill.
httpListing: httpListing,
joinUrl: joinUrl,
stripSlash: stripSlash
};
})();
/**
* ZDDC shared theme toggle — light / dark / auto.
* Persists choice to localStorage under 'zddc-theme'.
* Works with all four tools regardless of their module pattern.
* Expects: #theme-btn in the DOM (optional — skips gracefully if absent).
*
* Theme cycle: auto → light → dark → auto …
* 'auto' honours the OS prefers-color-scheme media query (CSS handles it).
* 'light' sets data-theme="light" on <html> (overrides dark media query).
* 'dark' sets data-theme="dark" on <html>.
*/
(function () {
'use strict';
var STORAGE_KEY = 'zddc-theme';
var THEMES = ['auto', 'light', 'dark'];
var LABELS = {
auto: '◐',
light: '☀',
dark: '☾'
};
var TITLES = {
auto: 'Theme: auto (follows OS)',
light: 'Theme: light',
dark: 'Theme: dark'
};
function load() {
var stored = localStorage.getItem(STORAGE_KEY);
return THEMES.indexOf(stored) !== -1 ? stored : 'auto';
}
function apply(theme) {
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
} else if (theme === 'light') {
document.documentElement.setAttribute('data-theme', 'light');
} else {
document.documentElement.removeAttribute('data-theme');
}
}
function save(theme) {
try { localStorage.setItem(STORAGE_KEY, theme); } catch (e) {}
}
function updateButton(btn, theme) {
btn.textContent = LABELS[theme];
btn.title = TITLES[theme];
btn.setAttribute('aria-label', TITLES[theme]);
}
function next(theme) {
return THEMES[(THEMES.indexOf(theme) + 1) % THEMES.length];
}
function init() {
var current = load();
apply(current);
var btn = document.getElementById('theme-btn');
if (!btn) { return; }
updateButton(btn, current);
btn.addEventListener('click', function () {
current = next(current);
apply(current);
save(current);
updateButton(btn, current);
});
}
/* Apply theme immediately (before DOM ready) to avoid flash */
apply(load());
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
}());
// shared/toast.js — non-blocking notification helper available to every
// tool via window.zddc.toast(msg, level, opts). Originated as classifier's
// local showToast (classifier/js/excel.js); promoted here so tools that
// today use alert() or silent console.error can switch to a uniform
// non-blocking surface.
//
// Usage:
// window.zddc.toast('Saved.', 'success');
// window.zddc.toast('Could not load: ' + err.message, 'error');
// window.zddc.toast('Note', 'info', { durationMs: 3000 });
//
// Levels: 'info' (default) | 'success' | 'warning' | 'error'.
// Each tool may also expose app.notify(msg, level) as a thin wrapper —
// see ARCHITECTURE.md for the convention.
(function () {
'use strict';
if (!window.zddc) window.zddc = {};
// Don't overwrite if a tool defined its own first.
if (typeof window.zddc.toast === 'function') return;
var DEFAULT_DURATION_MS = 5000;
var FADE_MS = 300;
function toast(message, level, opts) {
opts = opts || {};
var lvl = (level === 'success' || level === 'error' ||
level === 'warning') ? level : 'info';
// Single-toast policy: dismiss any existing toast immediately
// so the new one is always the most recent. Matches the
// classifier's prior behavior and avoids stack-of-toasts UX.
var existing = document.querySelector('.zddc-toast');
if (existing) existing.remove();
var el = document.createElement('div');
el.className = 'zddc-toast zddc-toast--' + lvl;
// ARIA: errors get assertive (interrupts SR queue), others polite.
el.setAttribute('role', lvl === 'error' ? 'alert' : 'status');
el.setAttribute('aria-live', lvl === 'error' ? 'assertive' : 'polite');
el.textContent = message == null ? '' : String(message);
document.body.appendChild(el);
var dur = typeof opts.durationMs === 'number' ?
opts.durationMs : DEFAULT_DURATION_MS;
var timer = setTimeout(function () {
el.classList.add('zddc-toast--fade');
setTimeout(function () {
if (el.parentNode) el.parentNode.removeChild(el);
}, FADE_MS);
}, dur);
// Click-to-dismiss. Useful for sticky errors the user wants gone.
el.addEventListener('click', function () {
clearTimeout(timer);
if (el.parentNode) el.parentNode.removeChild(el);
});
return el;
}
window.zddc.toast = toast;
})();
// shared/nav.js — lateral navigation strip across the four canonical
// project stages (archive · working · staging · reviewing). Renders
// only when:
// 1. location.protocol is http: or https: (online — file:// has no
// project structure to navigate within), AND
// 2. a project segment can be detected from location.pathname (the
// first path segment, when it isn't a tool HTML file).
//
// The strip is inserted as a sibling of <header class="app-header">
// on DOMContentLoaded — no template changes required. Each tool just
// needs ../shared/nav.{js,css} in its build.sh.
//
// Stage URLs follow the canonical workflow folders documented at
// zddc.varasys.io/reference.html#transmittal-workflow:
// archive → <project>/archive.html (archive tool, project-root mode)
// working → <project>/working/ (directory listing → mdedit auto-serves)
// staging → <project>/staging/ (directory listing → transmittal auto-serves)
// reviewing → <project>/reviewing/ (directory listing)
//
// If a deployment doesn't have one of these folders the link will 404 —
// the strip is convention-driven, not probed. Operators on non-standard
// layouts can override by setting window.zddc.nav.disabled = true before
// DOMContentLoaded.
(function () {
'use strict';
if (!window.zddc) window.zddc = {};
if (window.zddc.nav) return; // already loaded
var STAGES = [
{ key: 'archive', label: 'Archive', target: 'archive.html' },
{ key: 'working', label: 'Working', target: 'working/' },
{ key: 'staging', label: 'Staging', target: 'staging/' },
{ key: 'reviewing', label: 'Reviewing', target: 'reviewing/' },
];
function projectSegment(pathname) {
var parts = pathname.split('/').filter(Boolean);
if (parts.length === 0) return null;
var first = parts[0];
// At deployment root (e.g. /archive.html?projects=A,B or
// /index.html) the first segment is a tool HTML — no single
// project to scope the strip to.
if (first.indexOf('.') !== -1) return null;
return first;
}
function currentStage(pathname) {
var parts = pathname.split('/').filter(Boolean);
if (parts.length < 2) return null;
var second = parts[1];
// <project>/working/... | staging/... | reviewing/... | archive/...
for (var i = 0; i < STAGES.length; i++) {
if (second === STAGES[i].key) return STAGES[i].key;
}
// <project>/archive.html → still the archive stage
if (second === 'archive.html') return 'archive';
return null;
}
function shouldRender() {
if (typeof location === 'undefined') return false;
if (location.protocol !== 'http:' && location.protocol !== 'https:') return false;
if (window.zddc.nav && window.zddc.nav.disabled) return false;
return projectSegment(location.pathname) !== null;
}
function buildStrip(project, active) {
var nav = document.createElement('nav');
nav.className = 'zddc-stage-strip';
nav.setAttribute('aria-label', 'Project stage');
var label = document.createElement('span');
label.className = 'zddc-stage-strip__project';
label.textContent = project;
nav.appendChild(label);
var sep0 = document.createElement('span');
sep0.className = 'zddc-stage-strip__divider';
sep0.setAttribute('aria-hidden', 'true');
sep0.textContent = '/';
nav.appendChild(sep0);
for (var i = 0; i < STAGES.length; i++) {
var s = STAGES[i];
var a = document.createElement('a');
a.className = 'zddc-stage';
a.href = '/' + encodeURIComponent(project) + '/' + s.target;
a.textContent = s.label;
if (s.key === active) {
a.classList.add('zddc-stage--active');
a.setAttribute('aria-current', 'page');
}
nav.appendChild(a);
if (i < STAGES.length - 1) {
var sep = document.createElement('span');
sep.className = 'zddc-stage-strip__sep';
sep.setAttribute('aria-hidden', 'true');
sep.textContent = '·';
nav.appendChild(sep);
}
}
return nav;
}
function mount() {
if (!shouldRender()) return;
var header = document.querySelector('.app-header');
if (!header) return;
// Don't double-mount if a tool's main.js calls us a second time.
if (header.previousElementSibling &&
header.previousElementSibling.classList &&
header.previousElementSibling.classList.contains('zddc-stage-strip')) {
return;
}
var project = projectSegment(location.pathname);
var active = currentStage(location.pathname);
var strip = buildStrip(project, active);
// Mount ABOVE the header — the strip is project-level chrome
// (where in the project), the header is tool-level chrome (which
// tool, theme, help). Reading order matches outer-to-inner scope.
header.parentNode.insertBefore(strip, header);
}
// Expose for tests + opt-out.
window.zddc.nav = {
mount: mount,
// Internals visible for unit tests; do not call from tools.
_projectSegment: projectSegment,
_currentStage: currentStage,
_stages: STAGES,
// Set to true before DOMContentLoaded to suppress mounting on
// deployments where the canonical folder layout doesn't apply.
disabled: false,
};
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', mount, { once: true });
} else {
mount();
}
})();
// shared/logo.js — turn the inert <svg class="app-header__logo"> on
// every tool's header into a clickable link. The destination is the
// nearest "home" the user can sensibly back out to:
//
// file:// → no wrap (no server home)
// http(s)://host/ → wrap, href = /
// http(s)://host/<tool>.html (deployment root)→ wrap, href = /
// http(s)://host/<project>/... → wrap, href = /<project>
//
// When inside a project, the logo takes the user to the project
// landing (synthetic page with the four lifecycle-stage cards + MDL
// instructions). When at the deployment root, the logo points at /
// (the project picker). Offline, the logo stays decorative — there's
// no real "home" to go to.
//
// Mounts as a sibling-replacement on DOMContentLoaded: wraps the
// existing logo SVG in an <a>, preserving classes and attributes.
// Idempotent: re-mounting on an already-wrapped logo is a no-op.
//
// Tools that want to override (e.g. a deployment that pins logo to
// an external URL) can set window.zddc.logo.disabled = true before
// DOMContentLoaded and inject their own anchor.
(function () {
'use strict';
if (!window.zddc) window.zddc = {};
if (window.zddc.logo) return;
function projectSegment(pathname) {
var parts = pathname.split('/').filter(Boolean);
if (parts.length === 0) return null;
var first = parts[0];
// Tool HTMLs at the deployment root (index.html, archive.html
// with ?projects=...) don't carry a project segment.
if (first.indexOf('.') !== -1) return null;
return first;
}
function targetHref() {
if (typeof location === 'undefined') return null;
if (location.protocol !== 'http:' && location.protocol !== 'https:') {
return null;
}
if (window.zddc.logo && window.zddc.logo.disabled) return null;
var seg = projectSegment(location.pathname);
return seg ? '/' + encodeURIComponent(seg) : '/';
}
function mount() {
var logo = document.querySelector('.app-header__logo');
if (!logo) return;
// Already wrapped (template-supplied anchor, or a previous mount).
if (logo.parentElement && logo.parentElement.tagName === 'A' &&
logo.parentElement.classList.contains('app-header__logo-link')) {
return;
}
var href = targetHref();
if (!href) return;
var a = document.createElement('a');
a.href = href;
a.className = 'app-header__logo-link';
var label = href === '/' ? 'ZDDC home' : 'Project home';
a.title = label;
a.setAttribute('aria-label', label);
logo.parentNode.insertBefore(a, logo);
a.appendChild(logo);
}
window.zddc.logo = {
mount: mount,
// Test seam.
_projectSegment: projectSegment,
_targetHref: targetHref,
disabled: false,
};
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', mount, { once: true });
} else {
mount();
}
})();
/**
* ZDDC — shared preview helpers
*
* Cross-tool helpers for previewing file types that need a decoder:
* - TIFF (UTIF.js) — multi-page, browser-PDF-viewer-style toolbar
* - ZIP listing (JSZip) — sortable file-list view
*
* Renderers operate on any document (parent window or popup window), so the
* same code works for tools whose preview opens in a popup (classifier,
* archive, transmittal) and tools that render inline (mdedit).
*
* Public API on window.zddc.preview:
* loadLibrary(url) → Promise<void>
* renderTiff(doc, container, arrayBuffer, opts) → Promise<void>
* renderZipListing(doc, container, arrayBuffer, opts) → Promise<void>
* TIFF_EXTENSIONS, IMAGE_EXTENSIONS, TEXT_EXTENSIONS, OFFICE_EXTENSIONS
* isTiff(ext), isImage(ext), isText(ext), isZip(ext), isOffice(ext)
*
* Each tool keeps its own dispatcher; this lib only owns the heavy renderers.
*/
(function (root) {
'use strict';
var TIFF_EXTENSIONS = ['tif', 'tiff'];
var IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp', 'ico'];
var TEXT_EXTENSIONS = [
'txt', 'md', 'markdown', 'json', 'xml', 'csv', 'tsv', 'log',
'html', 'htm', 'css', 'js', 'mjs', 'ts', 'tsx', 'jsx',
'py', 'rb', 'sh', 'bash', 'zsh', 'bat', 'ps1',
'yaml', 'yml', 'ini', 'cfg', 'conf', 'toml',
'c', 'cc', 'cpp', 'h', 'hpp', 'go', 'rs', 'java', 'kt',
'sql', 'env'
];
var OFFICE_EXTENSIONS = ['docx', 'xlsx', 'xls'];
function lowerExt(ext) { return (ext || '').toLowerCase(); }
function isTiff(ext) { return TIFF_EXTENSIONS.indexOf(lowerExt(ext)) !== -1; }
function isImage(ext) { return IMAGE_EXTENSIONS.indexOf(lowerExt(ext)) !== -1; }
function isText(ext) { return TEXT_EXTENSIONS.indexOf(lowerExt(ext)) !== -1; }
function isZip(ext) { return lowerExt(ext) === 'zip'; }
function isOffice(ext) { return OFFICE_EXTENSIONS.indexOf(lowerExt(ext)) !== -1; }
// ── CDN library loader (parent window cache) ─────────────────────────────
var _libCache = new Map();
function loadLibrary(url) {
if (_libCache.has(url)) return _libCache.get(url);
var p = new Promise(function (resolve, reject) {
var s = document.createElement('script');
s.src = url;
s.onload = function () { resolve(); };
s.onerror = function () { reject(new Error('Failed to load: ' + url)); };
document.head.appendChild(s);
});
_libCache.set(url, p);
return p;
}
// ── Style injection (idempotent per-document) ────────────────────────────
function injectStyles(doc, id, css) {
if (doc.getElementById(id)) return;
var style = doc.createElement('style');
style.id = id;
style.textContent = css;
doc.head.appendChild(style);
}
// ── Helpers ──────────────────────────────────────────────────────────────
function formatSize(bytes) {
if (bytes == null) return '';
if (bytes < 1024) return bytes + ' B';
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB';
if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB';
}
function formatDate(d) {
if (!d) return '';
var pad = function (n) { return n < 10 ? '0' + n : '' + n; };
return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate())
+ ' ' + pad(d.getHours()) + ':' + pad(d.getMinutes());
}
function escapeHtml(s) {
return String(s)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
}
// ── TIFF renderer ────────────────────────────────────────────────────────
var TIFF_CSS =
'.tiff-toolbar{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;' +
'background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap;font-size:.85rem;}' +
'.tiff-toolbar .tiff-btn{padding:.25rem .55rem;border:1px solid #ccc;border-radius:3px;' +
'background:#fff;cursor:pointer;font-size:.85rem;line-height:1;min-width:1.8rem;}' +
'.tiff-toolbar .tiff-btn:hover:not(:disabled){background:#e8e8e8;}' +
'.tiff-toolbar .tiff-btn:disabled{opacity:.4;cursor:default;}' +
'.tiff-toolbar .tiff-page-info{display:inline-flex;align-items:center;gap:.3rem;}' +
'.tiff-toolbar .tiff-page-input{width:3.2rem;padding:.2rem .3rem;border:1px solid #ccc;' +
'border-radius:3px;text-align:center;font-size:.85rem;}' +
'.tiff-toolbar .tiff-zoom-select{padding:.2rem .3rem;border:1px solid #ccc;border-radius:3px;' +
'background:#fff;font-size:.85rem;}' +
'.tiff-toolbar .tiff-spacer{flex:1;}' +
'.tiff-viewport{flex:1;overflow:auto;background:#525659;display:flex;align-items:flex-start;' +
'justify-content:center;padding:1rem;}' +
'.tiff-canvas{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.4);display:block;' +
'image-rendering:auto;}' +
'.tiff-error{flex:1;display:flex;align-items:center;justify-content:center;color:#900;' +
'padding:2rem;text-align:center;}';
function renderTiff(doc, container, arrayBuffer, opts) {
opts = opts || {};
injectStyles(doc, 'zddc-tiff-styles', TIFF_CSS);
return loadLibrary('https://cdn.jsdelivr.net/npm/utif@3.1.0/UTIF.js').then(function () {
var ifds;
try {
ifds = window.UTIF.decode(arrayBuffer);
} catch (e) {
container.innerHTML = '<div class="tiff-error">Failed to parse TIFF: '
+ escapeHtml(e.message || e) + '</div>';
return;
}
if (!ifds || !ifds.length) {
container.innerHTML = '<div class="tiff-error">No images found in TIFF.</div>';
return;
}
// Reset container to a flex column
container.innerHTML = '';
container.style.display = 'flex';
container.style.flexDirection = 'column';
container.style.minHeight = '0';
container.style.height = '100%';
container.style.overflow = 'hidden';
// Toolbar
var toolbar = doc.createElement('div');
toolbar.className = 'tiff-toolbar';
var btnPrev = doc.createElement('button');
btnPrev.className = 'tiff-btn'; btnPrev.type = 'button';
btnPrev.title = 'Previous page'; btnPrev.textContent = '◀';
var pageInfo = doc.createElement('span');
pageInfo.className = 'tiff-page-info';
var pageInput = doc.createElement('input');
pageInput.type = 'number'; pageInput.min = '1'; pageInput.value = '1';
pageInput.className = 'tiff-page-input';
var pageOf = doc.createElement('span');
pageOf.textContent = ' of ' + ifds.length;
pageInfo.appendChild(doc.createTextNode('Page '));
pageInfo.appendChild(pageInput);
pageInfo.appendChild(pageOf);
var btnNext = doc.createElement('button');
btnNext.className = 'tiff-btn'; btnNext.type = 'button';
btnNext.title = 'Next page'; btnNext.textContent = '▶';
var spacer = doc.createElement('span');
spacer.className = 'tiff-spacer';
var btnZoomOut = doc.createElement('button');
btnZoomOut.className = 'tiff-btn'; btnZoomOut.type = 'button';
btnZoomOut.title = 'Zoom out'; btnZoomOut.textContent = '';
var zoomSelect = doc.createElement('select');
zoomSelect.className = 'tiff-zoom-select';
var zoomOptions = [
['fit-width', 'Fit width'],
['fit-page', 'Fit page'],
['0.5', '50%'],
['0.75', '75%'],
['1', '100%'],
['1.25', '125%'],
['1.5', '150%'],
['2', '200%'],
['3', '300%'],
['4', '400%']
];
zoomOptions.forEach(function (z) {
var o = doc.createElement('option');
o.value = z[0]; o.textContent = z[1];
zoomSelect.appendChild(o);
});
zoomSelect.value = 'fit-width';
var btnZoomIn = doc.createElement('button');
btnZoomIn.className = 'tiff-btn'; btnZoomIn.type = 'button';
btnZoomIn.title = 'Zoom in'; btnZoomIn.textContent = '+';
toolbar.appendChild(btnPrev);
toolbar.appendChild(pageInfo);
toolbar.appendChild(btnNext);
toolbar.appendChild(spacer);
toolbar.appendChild(btnZoomOut);
toolbar.appendChild(zoomSelect);
toolbar.appendChild(btnZoomIn);
// Viewport with canvas
var viewport = doc.createElement('div');
viewport.className = 'tiff-viewport';
var canvas = doc.createElement('canvas');
canvas.className = 'tiff-canvas';
viewport.appendChild(canvas);
container.appendChild(toolbar);
container.appendChild(viewport);
// Render state
var currentPage = 0;
var zoom = 1;
var fitMode = 'width'; // 'width' | 'page' | null
var decoded = new Array(ifds.length);
function decodePage(i) {
if (decoded[i]) return decoded[i];
var ifd = ifds[i];
window.UTIF.decodeImage(arrayBuffer, ifd);
var rgba = window.UTIF.toRGBA8(ifd);
decoded[i] = { rgba: rgba, w: ifd.width, h: ifd.height };
return decoded[i];
}
function applyZoom() {
var page = decoded[currentPage];
if (!page) return;
var availW = viewport.clientWidth - 32; // padding
var availH = viewport.clientHeight - 32;
var scale;
if (fitMode === 'width') {
scale = availW / page.w;
} else if (fitMode === 'page') {
scale = Math.min(availW / page.w, availH / page.h);
} else {
scale = zoom;
}
if (!isFinite(scale) || scale <= 0) scale = 1;
canvas.style.width = (page.w * scale) + 'px';
canvas.style.height = (page.h * scale) + 'px';
}
function renderPage() {
var page;
try {
page = decodePage(currentPage);
} catch (e) {
container.innerHTML = '<div class="tiff-error">Failed to decode page '
+ (currentPage + 1) + ': ' + escapeHtml(e.message || e) + '</div>';
return;
}
canvas.width = page.w;
canvas.height = page.h;
var ctx = canvas.getContext('2d');
var imgData = ctx.createImageData(page.w, page.h);
imgData.data.set(page.rgba);
ctx.putImageData(imgData, 0, 0);
applyZoom();
pageInput.value = String(currentPage + 1);
btnPrev.disabled = currentPage <= 0;
btnNext.disabled = currentPage >= ifds.length - 1;
}
function setZoomFromSelect() {
var v = zoomSelect.value;
if (v === 'fit-width') { fitMode = 'width'; }
else if (v === 'fit-page') { fitMode = 'page'; }
else { fitMode = null; zoom = parseFloat(v) || 1; }
applyZoom();
}
function nudgeZoom(factor) {
if (fitMode) {
// capture current effective scale before leaving fit mode
var page = decoded[currentPage];
if (page) {
var availW = viewport.clientWidth - 32;
var availH = viewport.clientHeight - 32;
zoom = fitMode === 'width'
? availW / page.w
: Math.min(availW / page.w, availH / page.h);
} else {
zoom = 1;
}
fitMode = null;
}
zoom = Math.max(0.1, Math.min(8, zoom * factor));
// Match select option if any are close, else show as percent
var matched = false;
for (var i = 0; i < zoomSelect.options.length; i++) {
var ov = zoomSelect.options[i].value;
if (ov !== 'fit-width' && ov !== 'fit-page' && Math.abs(parseFloat(ov) - zoom) < 0.001) {
zoomSelect.value = ov; matched = true; break;
}
}
if (!matched) {
// Nearest standard step
var best = '1', bestDiff = Infinity;
for (var j = 0; j < zoomSelect.options.length; j++) {
var v2 = zoomSelect.options[j].value;
if (v2 === 'fit-width' || v2 === 'fit-page') continue;
var diff = Math.abs(parseFloat(v2) - zoom);
if (diff < bestDiff) { bestDiff = diff; best = v2; }
}
zoom = parseFloat(best);
zoomSelect.value = best;
}
applyZoom();
}
btnPrev.addEventListener('click', function () {
if (currentPage > 0) { currentPage--; renderPage(); }
});
btnNext.addEventListener('click', function () {
if (currentPage < ifds.length - 1) { currentPage++; renderPage(); }
});
pageInput.addEventListener('change', function () {
var n = parseInt(pageInput.value, 10);
if (!isNaN(n) && n >= 1 && n <= ifds.length) {
currentPage = n - 1;
renderPage();
} else {
pageInput.value = String(currentPage + 1);
}
});
zoomSelect.addEventListener('change', setZoomFromSelect);
btnZoomIn.addEventListener('click', function () { nudgeZoom(1.25); });
btnZoomOut.addEventListener('click', function () { nudgeZoom(1 / 1.25); });
// Keyboard nav (only when toolbar/viewport in focus path)
container.tabIndex = 0;
container.addEventListener('keydown', function (e) {
if (e.target === pageInput) return;
if (e.key === 'ArrowLeft' || e.key === 'PageUp') {
if (currentPage > 0) { currentPage--; renderPage(); e.preventDefault(); }
} else if (e.key === 'ArrowRight' || e.key === 'PageDown' || e.key === ' ') {
if (currentPage < ifds.length - 1) { currentPage++; renderPage(); e.preventDefault(); }
}
});
// Re-fit on viewport resize
if (typeof (doc.defaultView && doc.defaultView.ResizeObserver) === 'function') {
var ro = new doc.defaultView.ResizeObserver(function () { applyZoom(); });
ro.observe(viewport);
} else if (doc.defaultView) {
doc.defaultView.addEventListener('resize', function () { applyZoom(); });
}
renderPage();
});
}
// ── ZIP listing renderer ─────────────────────────────────────────────────
var ZIP_CSS =
'.zip-header{padding:.4rem .8rem;background:#f5f5f5;border-bottom:1px solid #ddd;' +
'font-size:.85rem;color:#444;}' +
'.zip-table-wrap{flex:1;overflow:auto;}' +
'.zip-table{width:100%;border-collapse:collapse;font-size:.85rem;font-family:' +
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;}' +
'.zip-table thead th{position:sticky;top:0;background:#f0f0f0;text-align:left;' +
'padding:.4rem .6rem;border-bottom:1px solid #ccc;cursor:pointer;user-select:none;' +
'font-weight:600;}' +
'.zip-table thead th:hover{background:#e6e6e6;}' +
'.zip-table thead th.zip-sort-asc::after{content:" ▲";font-size:.7rem;color:#888;}' +
'.zip-table thead th.zip-sort-desc::after{content:" ▼";font-size:.7rem;color:#888;}' +
'.zip-table tbody td{padding:.3rem .6rem;border-bottom:1px solid #eee;}' +
'.zip-table tbody tr:hover{background:#f6faff;}' +
'.zip-table .zip-folder{color:#888;}' +
'.zip-table .zip-name{color:#222;}' +
'.zip-table .zip-size,.zip-table .zip-date{font-variant-numeric:tabular-nums;' +
'white-space:nowrap;color:#555;}' +
'.zip-table .zip-col-size,.zip-table .zip-col-date{text-align:right;}' +
'.zip-empty{padding:2rem;text-align:center;color:#888;}';
function renderZipListing(doc, container, arrayBuffer, opts) {
opts = opts || {};
injectStyles(doc, 'zddc-zip-styles', ZIP_CSS);
return loadLibrary('https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js').then(function () {
return window.JSZip.loadAsync(arrayBuffer);
}).then(function (zip) {
var entries = [];
zip.forEach(function (relativePath, zipEntry) {
if (zipEntry.dir) return;
var size = (zipEntry._data && zipEntry._data.uncompressedSize) || 0;
entries.push({
path: relativePath,
name: relativePath.split('/').pop(),
size: size,
modified: zipEntry.date instanceof Date ? zipEntry.date : null
});
});
container.innerHTML = '';
container.style.display = 'flex';
container.style.flexDirection = 'column';
container.style.minHeight = '0';
container.style.height = '100%';
container.style.overflow = 'hidden';
var totalSize = entries.reduce(function (s, e) { return s + e.size; }, 0);
var header = doc.createElement('div');
header.className = 'zip-header';
header.textContent = entries.length + ' file' + (entries.length === 1 ? '' : 's')
+ (totalSize ? ' · ' + formatSize(totalSize) + ' uncompressed' : '');
container.appendChild(header);
if (!entries.length) {
var empty = doc.createElement('div');
empty.className = 'zip-empty';
empty.textContent = '(empty archive)';
container.appendChild(empty);
return;
}
var wrap = doc.createElement('div');
wrap.className = 'zip-table-wrap';
var table = doc.createElement('table');
table.className = 'zip-table';
var thead = doc.createElement('thead');
var trh = doc.createElement('tr');
var cols = [
{ key: 'path', label: 'Name', cls: 'zip-col-name' },
{ key: 'size', label: 'Size', cls: 'zip-col-size' },
{ key: 'modified', label: 'Modified', cls: 'zip-col-date' }
];
cols.forEach(function (c) {
var th = doc.createElement('th');
th.className = c.cls;
th.dataset.key = c.key;
th.textContent = c.label;
trh.appendChild(th);
});
thead.appendChild(trh);
table.appendChild(thead);
var tbody = doc.createElement('tbody');
table.appendChild(tbody);
wrap.appendChild(table);
container.appendChild(wrap);
var sortKey = 'path';
var sortDir = 1;
function render() {
var sorted = entries.slice().sort(function (a, b) {
var av, bv;
if (sortKey === 'size') { av = a.size; bv = b.size; }
else if (sortKey === 'modified') {
av = a.modified ? a.modified.getTime() : 0;
bv = b.modified ? b.modified.getTime() : 0;
} else {
av = a.path.toLowerCase(); bv = b.path.toLowerCase();
}
if (av < bv) return -1 * sortDir;
if (av > bv) return 1 * sortDir;
return 0;
});
tbody.innerHTML = '';
sorted.forEach(function (e) {
var tr = doc.createElement('tr');
var td1 = doc.createElement('td');
var slash = e.path.lastIndexOf('/');
if (slash >= 0) {
var folder = doc.createElement('span');
folder.className = 'zip-folder';
folder.textContent = e.path.substring(0, slash + 1);
td1.appendChild(folder);
}
var name = doc.createElement('span');
name.className = 'zip-name';
name.textContent = e.name;
td1.appendChild(name);
var td2 = doc.createElement('td');
td2.className = 'zip-size';
td2.textContent = formatSize(e.size);
var td3 = doc.createElement('td');
td3.className = 'zip-date';
td3.textContent = formatDate(e.modified);
tr.appendChild(td1); tr.appendChild(td2); tr.appendChild(td3);
tbody.appendChild(tr);
});
// Update sort arrows
var ths = thead.querySelectorAll('th');
for (var i = 0; i < ths.length; i++) {
ths[i].classList.remove('zip-sort-asc', 'zip-sort-desc');
if (ths[i].dataset.key === sortKey) {
ths[i].classList.add(sortDir > 0 ? 'zip-sort-asc' : 'zip-sort-desc');
}
}
}
thead.querySelectorAll('th').forEach(function (th) {
th.addEventListener('click', function () {
var k = th.dataset.key;
if (sortKey === k) sortDir = -sortDir;
else { sortKey = k; sortDir = 1; }
render();
});
});
render();
}).catch(function (err) {
container.innerHTML = '<div class="zip-empty">Failed to read ZIP: '
+ escapeHtml(err.message || err) + '</div>';
});
}
// ── Public API ───────────────────────────────────────────────────────────
if (!root.zddc) root.zddc = {};
root.zddc.preview = {
TIFF_EXTENSIONS: TIFF_EXTENSIONS,
IMAGE_EXTENSIONS: IMAGE_EXTENSIONS,
TEXT_EXTENSIONS: TEXT_EXTENSIONS,
OFFICE_EXTENSIONS: OFFICE_EXTENSIONS,
isTiff: isTiff,
isImage: isImage,
isText: isText,
isZip: isZip,
isOffice: isOffice,
loadLibrary: loadLibrary,
renderTiff: renderTiff,
renderZipListing: renderZipListing,
formatSize: formatSize,
formatDate: formatDate
};
})(typeof window !== 'undefined' ? window : this);
/**
* Global application state and constants
*/
// Set to true to enable verbose console logging for development.
const DEBUG = false;
// Check if File System Access API is available
const hasFileSystemAccess = 'showDirectoryPicker' in window;
// Directory and file handles
let directoryHandle = null;
let fileTree = {};
let currentFileHandle = null;
// True when the page is served over HTTP(S) and the file tree is sourced
// from the server's JSON directory listing instead of the local FS API.
let serverSourceMode = false;
// Map to store editor instances for each file
// Key: file path, Value: { editor, container, tocContainer, etc. }
const editorInstances = new Map();
// Current TOC max depth (1-6)
let tocMaxDepth = 3;
// Scratchpad ID constant
const SCRATCHPAD_ID = '__scratchpad__';
// Default scratchpad markdown — shown the first time mdedit loads.
// Acts as both a welcome message and a starter pad for quick notes.
const SCRATCHPAD_WELCOME = [
'# Welcome to ZDDC Markdown',
'',
'All editing happens locally on your computer — nothing is uploaded.',
'',
'Use this **Scratchpad** for quick notes. Download it any time with the ⬇',
'button on the Scratchpad row in the file list.',
'',
'Click **Add Local Directory** above to open a folder of Markdown files,',
'or just start typing here.',
'',
].join('\n');
/**
* Utility functions
*/
/**
* HTML-escape a string for safe insertion into innerHTML.
*/
function escapeHtml(text) {
const div = document.createElement('div');
div.textContent = text == null ? '' : String(text);
return div.innerHTML;
}
/**
* Debounce function calls
* @param {Function} func - Function to debounce
* @param {number} wait - Wait time in milliseconds
* @returns {Function} Debounced function
*/
function debounce(func, wait) {
let timeout;
return function () {
const context = this;
const args = arguments;
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(context, args), wait);
};
}
/**
* Get file type icon based on file extension
* @param {string} fileName - Name of the file
* @returns {string} Emoji icon for the file type
*/
function getFileTypeIcon(fileName) {
const extension = zddc.splitExtension(fileName).extension;
const iconMap = {
// Documents
'md': '📝',
'markdown': '📝',
'txt': '📄',
'rtf': '📄',
'doc': '📘',
'docx': '📘',
'odt': '📘',
// Web files
'html': '🌐',
'htm': '🌐',
'css': '🎨',
'js': '⚡',
'json': '📋',
'xml': '📊',
'yaml': '⚙️',
'yml': '⚙️',
// PDFs and presentations
'pdf': '📕',
'ppt': '📊',
'pptx': '📊',
'odp': '📊',
// Spreadsheets
'xls': '📗',
'xlsx': '📗',
'csv': '📊',
'ods': '📗',
// Images
'png': '🖼️',
'jpg': '🖼️',
'jpeg': '🖼️',
'gif': '🖼️',
'svg': '🖼️',
'webp': '🖼️',
'bmp': '🖼️',
// Archives
'zip': '📦',
'rar': '📦',
'tar': '📦',
'gz': '📦',
'7z': '📦',
// Code files
'py': '🐍',
'java': '☕',
'cpp': '⚙️',
'c': '⚙️',
'h': '⚙️',
'php': '🔧',
'rb': '💎',
'go': '🔵',
'rs': '🦀',
'swift': '🧡',
'kt': '💜',
// Configuration
'ini': '⚙️',
'conf': '⚙️',
'cfg': '⚙️',
'env': '⚙️',
// Other
'log': '📃',
'sql': '🗄️',
'db': '🗄️',
'sqlite': '🗄️',
};
return iconMap[extension] || '📄';
}
/**
* YAML front matter parsing and stringification
*/
/**
* Parse YAML front matter from markdown content
* @param {string} content - Full markdown content with potential front matter
* @returns {{data: Object, content: string}} Parsed front matter data and remaining content
*/
function parseFrontMatter(content) {
if (!content || !content.startsWith('---\n')) {
return {
data: {},
content: content || ''
};
}
const endMatch = content.indexOf('\n---\n', 4);
if (endMatch === -1) {
return {
data: {},
content: content
};
}
const frontMatterText = content.substring(4, endMatch);
const markdownBody = content.substring(endMatch + 5);
// Parse YAML front matter (basic key: value parsing)
const frontMatterData = {};
const lines = frontMatterText.split('\n');
for (const line of lines) {
const trimmedLine = line.trim();
if (!trimmedLine || trimmedLine.startsWith('#')) continue;
const colonIndex = trimmedLine.indexOf(':');
if (colonIndex > 0) {
const key = trimmedLine.substring(0, colonIndex).trim();
let value = trimmedLine.substring(colonIndex + 1).trim();
// Remove quotes
value = value.replace(/^["']|["']$/g, '');
// Handle arrays (basic support for [item1, item2])
if (value.startsWith('[') && value.endsWith(']')) {
value = value.slice(1, -1).split(',').map(item => item.trim().replace(/^["']|["']$/g, ''));
}
frontMatterData[key] = value;
}
}
return {
data: frontMatterData,
content: markdownBody
};
}
/**
* Stringify front matter data and combine with markdown content
* @param {string} content - Markdown content
* @param {Object} data - Front matter data object
* @returns {string} Combined YAML front matter and markdown
*/
function stringifyFrontMatter(content, data) {
if (!data || Object.keys(data).length === 0) {
return content;
}
let yamlString = '---\n';
for (const [key, value] of Object.entries(data)) {
if (Array.isArray(value)) {
yamlString += `${key}: [${value.map(v => `"${v}"`).join(', ')}]\n`;
} else {
yamlString += `${key}: "${value}"\n`;
}
}
yamlString += '---\n';
return yamlString + content;
}
/**
* Convert front matter data to YAML string for textarea display (without delimiters)
* @param {Object} data - Front matter data
* @returns {string} YAML string for textarea
*/
function stringifyFrontMatterToTextarea(data) {
if (!data || Object.keys(data).length === 0) {
return '';
}
let yamlString = '';
for (const [key, value] of Object.entries(data)) {
if (Array.isArray(value)) {
yamlString += `${key}: [${value.map(v => `"${v}"`).join(', ')}]\n`;
} else {
yamlString += `${key}: "${value}"\n`;
}
}
return yamlString.trim();
}
/**
* File management operations (create, rename, delete)
* Plain functions, no module wrapper
*/
/**
* Resolve a node in fileTree by filePath
* @param {string} filePath - Path like 'subdir/file.md' or ''
* @returns {Object|null} The node object or null if not found
*/
function resolveNode(filePath) {
if (!filePath) return fileTree;
const parts = filePath.split('/');
let node = fileTree;
for (const part of parts) {
if (!node.entries || !node.entries[part]) return null;
node = node.entries[part];
}
return node;
}
/**
* Resolve the parent directory handle for a given file path
* @param {string} filePath - Full path like 'subdir/file.md'
* @returns {FileSystemDirectoryHandle|null} Parent directory handle or null
*/
function resolveParentDirHandle(filePath) {
const parts = filePath.split('/');
if (parts.length === 1) return directoryHandle;
let node = fileTree;
for (let i = 0; i < parts.length - 1; i++) {
node = node.entries[parts[i]];
if (!node) return null;
}
return node.handle;
}
/**
* Create a new file
* @param {string} parentDirPath - '' for root, or 'subdir', 'a/b/c'
*/
async function createNewFile(parentDirPath) {
// Resolve parent directory handle first (no user activation needed for reads)
let parentHandle;
if (parentDirPath === '') {
parentHandle = directoryHandle;
} else {
const node = resolveNode(parentDirPath);
if (!node || !node.handle) {
alert('Could not locate parent directory.');
return;
}
parentHandle = node.handle;
}
// Show in-page modal and wait for user to confirm or cancel.
// Returns the filename string, or null if cancelled.
const name = await new Promise((resolve) => {
const modal = document.getElementById('new-file-modal');
const input = document.getElementById('new-file-input');
const confirmBtn = document.getElementById('new-file-confirm');
const cancelBtn = document.getElementById('new-file-cancel');
input.value = 'untitled.md';
modal.classList.remove('hidden');
input.focus();
input.select();
function cleanup() {
modal.classList.add('hidden');
confirmBtn.removeEventListener('click', onConfirm);
cancelBtn.removeEventListener('click', onCancel);
input.removeEventListener('keydown', onKey);
}
function onConfirm() {
const val = input.value.trim();
cleanup();
resolve(val || null);
}
function onCancel() {
cleanup();
resolve(null);
}
function onKey(e) {
if (e.key === 'Enter') onConfirm();
if (e.key === 'Escape') onCancel();
}
confirmBtn.addEventListener('click', onConfirm);
cancelBtn.addEventListener('click', onCancel);
input.addEventListener('keydown', onKey);
});
if (!name) {
if (DEBUG) console.log('New file creation cancelled');
return;
}
// Validate name
if (name.includes('/') || name.includes('\\')) {
alert('Invalid filename: cannot contain / or \\.');
return;
}
// Check if file already exists
try {
await parentHandle.getFileHandle(name);
const overwrite = window.confirm('A file named "' + name + '" already exists. Overwrite it?');
if (!overwrite) return;
} catch (e) {
if (e.name !== 'NotFoundError') throw e;
}
// Create the file — this must happen after the modal's button click
// which is the user activation token.
try {
const newHandle = await parentHandle.getFileHandle(name, { create: true });
const writable = await newHandle.createWritable();
await writable.write('');
await writable.close();
if (DEBUG) console.log(`Created new file: ${parentDirPath ? parentDirPath + '/' : ''}${name}`);
await refreshDirectory();
const newFilePath = parentDirPath ? parentDirPath + '/' + name : name;
const element = document.querySelector('.file-item[data-path="' + CSS.escape(newFilePath) + '"]');
if (element) {
handleFileClick(newHandle, newFilePath, element);
}
} catch (error) {
console.error('Error creating new file:', error);
alert('Error creating file: ' + error.message);
}
}
/**
* Rename a file or directory
* @param {string} filePath - Full path like 'subdir/file.md'
* @param {boolean} isDirectory - true if renaming a directory (not supported on Chrome)
*/
async function renameEntry(filePath, isDirectory) {
const currentName = filePath.split('/').pop();
const newName = window.prompt('Rename to:', currentName);
if (newName === null || newName === currentName) {
if (DEBUG) console.log('Rename cancelled or unchanged');
return;
}
// Validate name
if (newName.includes('/') || newName.includes('\\') || newName.trim() === '') {
alert('Invalid filename: cannot contain / or \\ and must not be empty.');
return;
}
// Resolve parent directory handle
const parentHandle = resolveParentDirHandle(filePath);
if (!parentHandle) {
alert('Could not locate parent directory.');
return;
}
// For files: rename via File System Access API
if (!isDirectory) {
try {
// Check if new name already exists (file or directory)
try {
const existing = await parentHandle.getFileHandle(newName);
// A file with that name exists
const overwrite = window.confirm('A file named "' + newName + '" already exists. Overwrite?');
if (!overwrite) return;
} catch (fileErr) {
if (fileErr.name === 'TypeMismatchError') {
// A directory with that name exists
window.alert('A folder named "' + newName + '" already exists. Choose a different name.');
return;
}
if (fileErr.name !== 'NotFoundError') throw fileErr;
// NotFoundError = safe to create
}
const oldHandle = resolveNode(filePath);
if (!oldHandle || !oldHandle.handle) {
alert('Could not find file to rename.');
return;
}
const file = await oldHandle.handle.getFile();
const content = await file.text();
const newHandle = await parentHandle.getFileHandle(newName, { create: true });
const writable = await newHandle.createWritable();
await writable.write(content);
await writable.close();
const newFile = await newHandle.getFile();
await parentHandle.removeEntry(currentName);
// Update editor instances
if (editorInstances.has(filePath)) {
const instance = editorInstances.get(filePath);
const newFilePath = filePath.substring(0, filePath.length - currentName.length) + newName;
// Remove old instance
const data = editorInstances.get(filePath);
if (data.fileViewContainer) {
data.fileViewContainer.classList.add('hidden');
}
editorInstances.delete(filePath);
// Re-add with new path
editorInstances.set(newFilePath, { ...data, fileHandle: newHandle, lastModified: newFile.lastModified });
// Update active state
if (instance.fileViewContainer) {
instance.fileViewContainer.classList.remove('hidden');
instance.fileViewContainer.dataset.path = newFilePath;
}
// Update fileTree entries
const parts = filePath.split('/');
const fileName = parts.pop();
const dirPath = parts.join('/');
let targetEntries = fileTree.entries;
if (dirPath) {
const dirParts = dirPath.split('/');
let current = fileTree;
for (const part of dirParts) {
current = current.entries[part];
}
targetEntries = current.entries;
}
if (targetEntries && targetEntries[currentName]) {
delete targetEntries[currentName];
targetEntries[newName] = {
name: newName,
type: 'file',
handle: newHandle
};
}
renderFileTree();
restoreActiveFile(newFilePath);
} else {
renderFileTree();
}
} catch (error) {
console.error('Error renaming file:', error);
alert('Error renaming file: ' + error.message);
}
} else {
// For directories: not supported by browser API
alert('Directory rename is not supported by the browser File System API. Please rename the folder in your OS file manager and refresh.');
}
}
/**
* Delete a file or directory
* @param {string} filePath - Full path like 'subdir/file.md' or 'subdir'
* @param {boolean} isDirectory - true if deleting a directory
*/
async function deleteEntry(filePath, isDirectory) {
const name = filePath.split('/').pop();
const message = isDirectory
? 'Delete folder "' + name + '" and all its contents?'
: 'Delete "' + name + '"?';
const ok = window.confirm(message);
if (!ok) {
if (DEBUG) console.log('Delete cancelled by user');
return;
}
// Resolve parent directory handle
const parentHandle = resolveParentDirHandle(filePath);
if (!parentHandle) {
alert('Could not locate parent directory.');
return;
}
let deleted = false;
try {
await parentHandle.removeEntry(name, { recursive: isDirectory });
deleted = true;
} catch (error) {
if (error.name === 'NotFoundError') {
// Already gone — treat as success for cleanup purposes
deleted = true;
} else {
console.error('Error deleting entry:', error);
alert('Error deleting entry: ' + error.message);
}
}
if (deleted) {
// Close editor if open
if (!isDirectory && editorInstances.has(filePath)) {
closeEditorInstance(filePath);
} else if (isDirectory) {
// Close any editors under this directory
const dirsToClose = [];
editorInstances.forEach(function(instance, key) {
if (key === filePath || key.startsWith(filePath + '/')) {
dirsToClose.push(key);
}
});
dirsToClose.forEach(function(key) {
closeEditorInstance(key);
});
}
// Remove from fileTree entries
const parts = filePath.split('/');
const entryName = parts.pop();
const dirPath = parts.join('/');
let targetEntries = fileTree.entries;
if (dirPath) {
const dirParts = dirPath.split('/');
let current = fileTree;
for (const part of dirParts) {
current = current.entries[part];
}
targetEntries = current.entries;
}
if (targetEntries && targetEntries[entryName]) {
delete targetEntries[entryName];
}
renderFileTree();
updateStatusCountsFromTree();
}
}
/**
* Close an editor instance and show welcome screen if no files open
* @param {string} filePath - Path of file to close
*/
function closeEditorInstance(filePath) {
const instance = editorInstances.get(filePath);
if (!instance) return;
if (instance.fileViewContainer) {
instance.fileViewContainer.classList.add('hidden');
}
editorInstances.delete(filePath);
// Check if any visible file-view-container children remain
const contentContainer = document.getElementById('content-container');
if (contentContainer) {
const visibleChildren = Array.from(contentContainer.querySelectorAll('.file-view-container'))
.filter(function(el) { return !el.classList.contains('hidden'); });
if (visibleChildren.length === 0) {
document.getElementById('welcome-screen').classList.remove('hidden');
contentContainer.classList.add('hidden');
}
}
}
/**
* Restore active file state after rename
* @param {string} newFilePath - New path of the file
*/
function restoreActiveFile(newFilePath) {
const element = document.querySelector('.file-item[data-path="' + CSS.escape(newFilePath) + '"]');
if (element) {
element.classList.add('active-file');
element.style.backgroundColor = '';
element.style.color = '';
}
}
/**
* Update status counts from fileTree
*/
function updateStatusCountsFromTree() {
let folderCount = 0;
let fileCount = 0;
function countEntries(entries) {
if (!entries) return;
for (const [name, item] of Object.entries(entries)) {
if (item.type === 'directory') {
folderCount++;
countEntries(item.entries);
} else if (item.type === 'file') {
fileCount++;
}
}
}
countEntries(fileTree.entries);
updateStatusCounts(folderCount, fileCount);
}
/**
* File system operations using File System Access API
*/
/**
* Open the scratchpad editor
*/
function openScratchpad() {
// Check if scratchpad already exists
if (editorInstances.has(SCRATCHPAD_ID)) {
// Just show it
const instance = editorInstances.get(SCRATCHPAD_ID);
document.getElementById('welcome-screen').classList.add('hidden');
document.getElementById('content-container').classList.remove('hidden');
// Hide all other editors, show scratchpad
editorInstances.forEach((data, path) => {
if (data.fileViewContainer) {
data.fileViewContainer.style.display = path === SCRATCHPAD_ID ? 'flex' : 'none';
}
});
return;
}
// Hide welcome screen, show content container
document.getElementById('welcome-screen').classList.add('hidden');
document.getElementById('content-container').classList.remove('hidden');
// Initialize editor with the welcome text seeded as the starting content.
initializeEditor(SCRATCHPAD_WELCOME, true, SCRATCHPAD_ID, 'Scratchpad', null, null);
// Mark as scratchpad
const instance = editorInstances.get(SCRATCHPAD_ID);
if (instance) {
instance.isScratchpad = true;
}
// Reflect non-empty starting content on the scratchpad row's download button.
updateScratchpadDownloadState();
if (DEBUG) console.log('Opened scratchpad');
}
/**
* Enable/disable the scratchpad-row download button based on whether the
* scratchpad currently holds any content. Idempotent — safe to call from
* editor change listeners.
*/
function updateScratchpadDownloadState() {
const btn = document.getElementById('scratchpad-download-btn');
if (!btn) return;
const instance = editorInstances.get(SCRATCHPAD_ID);
let hasContent = false;
if (instance && instance.editor) {
try {
hasContent = (instance.editor.getMarkdown() || '').trim().length > 0;
} catch (_) { /* editor may not be ready yet */ }
}
btn.disabled = !hasContent;
btn.classList.toggle('is-disabled', !hasContent);
}
/**
* Trigger a browser download of the current scratchpad markdown.
* No-op if the scratchpad has no content.
*/
function downloadScratchpad() {
const instance = editorInstances.get(SCRATCHPAD_ID);
if (!instance || !instance.editor) return;
let content = '';
try { content = instance.editor.getMarkdown() || ''; } catch (_) { return; }
// Pull front matter from the textarea if any
if (instance.frontMatterTextarea) {
const fmText = instance.frontMatterTextarea.value.trim();
if (fmText) content = `---\n${fmText}\n---\n${content}`;
}
if (!content.trim()) return;
// Suggest a filename derived from the first H1 if present
let suggested = 'scratchpad.md';
const h1 = content.match(/^#\s+(.+)$/m);
if (h1) {
const slug = h1[1].trim().toLowerCase()
.replace(/[^a-z0-9\s-]/g, '')
.replace(/\s+/g, '-')
.substring(0, 60);
if (slug) suggested = `${slug}.md`;
}
saveFileAs(content, suggested);
}
/**
* Save file using Save As dialog (for scratchpads or new saves)
* @param {string} content - Content to save
* @param {string} suggestedName - Suggested filename
* @returns {Promise<FileSystemFileHandle|null>} File handle if saved, null otherwise
*/
async function saveFileAs(content, suggestedName = 'untitled.md') {
if (hasFileSystemAccess) {
try {
const fileHandle = await window.showSaveFilePicker({
suggestedName: suggestedName,
types: [{
description: 'Markdown files',
accept: { 'text/markdown': ['.md', '.markdown'] }
}]
});
const writable = await fileHandle.createWritable();
await writable.write(content);
await writable.close();
if (DEBUG) console.log(`File saved as: ${fileHandle.name}`);
return fileHandle;
} catch (error) {
if (error.name === 'AbortError') {
if (DEBUG) console.log('Save cancelled by user');
return null;
}
throw error;
}
} else {
// Fallback: download as blob
const blob = new Blob([content], { type: 'text/markdown' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = suggestedName;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
if (DEBUG) console.log(`File downloaded as: ${suggestedName}`);
return null;
}
}
/**
* Open directory picker and handle selection
*/
async function openDirectory() {
try {
if (!('showDirectoryPicker' in window)) {
throw new Error('The File System API is not supported in this browser.');
}
directoryHandle = await window.showDirectoryPicker();
if (DEBUG) console.log('Directory selected:', directoryHandle.name);
// Local picker wins over any active server-source mode.
serverSourceMode = false;
updateDirectoryStatus(directoryHandle.name);
await readDirectory(directoryHandle);
} catch (error) {
if (error.name === 'AbortError') {
if (DEBUG) console.log('User cancelled the directory selection');
} else {
console.error('Error selecting directory:', error);
alert(`Error: ${error.message}`);
}
}
}
/**
* Update UI to show selected directory
* @param {string} directoryName - Name of the selected directory
*/
function updateDirectoryStatus(directoryName) {
// Standardized header pattern (across all ZDDC tools): the button
// keeps the label "Add Local Directory"; de-emphasize it once a
// directory is loaded (the user can still click to pick another)
// by applying the shared btn--subtle variant. The directory name
// is shown in the file-nav pane, not on the button.
const selectDirectoryBtn = document.getElementById('addDirectoryBtn');
if (selectDirectoryBtn) {
selectDirectoryBtn.classList.remove('btn-primary');
selectDirectoryBtn.classList.add('btn--subtle');
selectDirectoryBtn.title = `Loaded: ${directoryName} — click to switch`;
}
const refreshBtn = document.getElementById('refreshHeaderBtn');
if (refreshBtn) {
refreshBtn.classList.remove('hidden');
}
// Show new file button when directory is selected
const newFileRootBtn = document.getElementById('new-file-root');
if (newFileRootBtn) {
newFileRootBtn.classList.remove('hidden');
}
}
/**
* Read directory contents and build tree structure
* @param {FileSystemDirectoryHandle} dirHandle - Directory handle
* @param {Object} parentNode - Parent node in tree (for recursion)
* @returns {Object} Statistics about the directory
*/
async function readDirectory(dirHandle, parentNode = null) {
if (parentNode === null) {
fileTree = {
name: dirHandle.name,
type: 'directory',
handle: dirHandle,
entries: {}
};
const fileTreeElement = document.getElementById('file-tree');
if (fileTreeElement) {
fileTreeElement.innerHTML = '';
}
parentNode = fileTree;
}
try {
let stats = { folderCount: 0, fileCount: 0 };
for await (const entry of dirHandle.values()) {
if (entry.kind === 'file' && !entry.name.startsWith('_')) {
parentNode.entries[entry.name] = {
name: entry.name,
type: 'file',
handle: entry
};
stats.fileCount++;
} else if (entry.kind === 'directory' && !entry.name.startsWith('_')) {
const dirNode = {
name: entry.name,
type: 'directory',
handle: entry,
entries: {}
};
parentNode.entries[entry.name] = dirNode;
const subStats = await readDirectory(entry, dirNode);
stats.folderCount += subStats.folderCount + 1;
stats.fileCount += subStats.fileCount;
}
}
if (parentNode === fileTree) {
renderFileTree();
updateStatusCounts(stats.folderCount, stats.fileCount);
}
return stats;
} catch (error) {
console.error('Error reading directory:', error);
return { folderCount: 0, fileCount: 0 };
}
}
/**
* Save a file by its path
* @param {string} filePath - Path of the file to save
* @returns {Promise<boolean>} Whether save was successful
*/
async function saveFile(filePath) {
if (!filePath && currentFileHandle) {
filePath = currentFileHandle.name;
} else if (!filePath) {
alert('No file is currently open');
return false;
}
try {
const editorInstance = editorInstances.get(filePath);
if (!editorInstance) {
throw new Error('No editor instance found for this file');
}
if (!editorInstance.isDirty) {
if (DEBUG) console.log(`File ${filePath} is not dirty, skipping save`);
return true;
}
const fileHandle = editorInstance.fileHandle;
if (!fileHandle) {
throw new Error('No file handle available for this file');
}
// Check for external modifications
const file = await fileHandle.getFile();
const currentLastModified = file.lastModified;
const storedLastModified = editorInstance.lastModified;
if (storedLastModified && currentLastModified !== storedLastModified) {
const confirmSave = confirm(
'Warning: This file has been modified outside of the application since you opened it. ' +
'Saving will overwrite those changes. Do you want to continue?'
);
if (!confirmSave) {
if (DEBUG) console.log('Save aborted by user due to external file modifications');
return false;
}
}
// Get markdown content from editor
const markdownContent = editorInstance.editor.getMarkdown();
// Get front matter from textarea
let frontMatterData = {};
if (editorInstance.frontMatterTextarea) {
const frontMatterText = editorInstance.frontMatterTextarea.value.trim();
if (frontMatterText) {
try {
const yamlContent = `---\n${frontMatterText}\n---\n`;
const parsed = parseFrontMatter(yamlContent);
frontMatterData = parsed.data;
} catch (error) {
console.error('Error parsing front matter:', error);
throw new Error(`Invalid YAML front matter: ${error.message}`);
}
}
}
// Apply before save hooks
frontMatterData = await applyBeforeSaveHooks(frontMatterData, markdownContent, fileHandle);
// Combine front matter with markdown
const finalContent = frontMatterData && Object.keys(frontMatterData).length > 0
? stringifyFrontMatter(markdownContent, frontMatterData)
: markdownContent;
// Server-mode files are read-only: fall back to a Save-As download.
if (typeof fileHandle.createWritable !== 'function') {
const downloadName = (fileHandle.name || filePath.split('/').pop() || 'untitled.md');
await saveFileAs(finalContent, downloadName);
editorInstance.isDirty = false;
updateFileDirtyStatus(filePath, false);
updateUnsavedCount();
if (editorInstance.saveButton) editorInstance.saveButton.disabled = true;
return true;
}
// Write to file
const writable = await fileHandle.createWritable();
await writable.write(finalContent);
await writable.close();
// Update state
const updatedFile = await fileHandle.getFile();
editorInstance.lastModified = updatedFile.lastModified;
editorInstance.isDirty = false;
updateFileDirtyStatus(filePath, false);
updateUnsavedCount();
if (editorInstance.saveButton) {
editorInstance.saveButton.disabled = true;
}
if (DEBUG) console.log(`File ${filePath} saved successfully!`);
await applyAfterSaveHooks(frontMatterData, markdownContent, fileHandle);
return true;
} catch (error) {
console.error(`Error saving file ${filePath}:`, error);
alert(`Error saving file: ${error.message}`);
return false;
}
}
/**
* Save all files with unsaved changes
* @returns {Promise<{saved: number, failed: number}>}
*/
async function saveAllFiles() {
let saved = 0;
let failed = 0;
const dirtyFiles = [];
editorInstances.forEach((instance, filePath) => {
if (instance.isDirty) {
dirtyFiles.push(filePath);
}
});
if (dirtyFiles.length === 0) {
if (DEBUG) console.log('No files with unsaved changes');
return { saved, failed };
}
for (const filePath of dirtyFiles) {
try {
const success = await saveFile(filePath);
if (success) {
saved++;
} else {
failed++;
}
} catch (error) {
console.error(`Error saving file ${filePath}:`, error);
failed++;
}
}
if (failed === 0) {
if (DEBUG) console.log(`All ${saved} files saved successfully`);
} else {
if (DEBUG) console.log(`Saved ${saved} files, ${failed} files failed to save`);
}
return { saved, failed };
}
/**
* Reload file from disk
* @param {string} filePath - Path of file to reload
* @returns {Promise<boolean>} Whether reload was successful
*/
async function reloadFileFromDisk(filePath) {
try {
const editorInstance = editorInstances.get(filePath);
if (!editorInstance) {
throw new Error('No editor instance found for this file');
}
if (editorInstance.isDirty) {
const confirmReload = confirm(
'This file has unsaved changes. Reloading will discard all changes. ' +
'Do you want to continue?'
);
if (!confirmReload) {
if (DEBUG) console.log('Reload cancelled by user');
return false;
}
}
const fileHandle = editorInstance.fileHandle;
if (!fileHandle) {
throw new Error('No file handle available for this file');
}
const file = await fileHandle.getFile();
const fileContent = await file.text();
editorInstance.lastModified = file.lastModified;
if (filePath.endsWith('.md') || filePath.endsWith('.markdown')) {
const parsed = parseFrontMatter(fileContent);
if (editorInstance.frontMatterTextarea) {
const frontMatterYaml = stringifyFrontMatterToTextarea(parsed.data);
editorInstance.frontMatterTextarea.value = frontMatterYaml;
}
let currentScrollTop = 0;
try {
currentScrollTop = editorInstance.editor.getScrollTop();
} catch (error) {
if (DEBUG) console.debug('Could not get scroll position:', error);
}
editorInstance.editor.setMarkdown(parsed.content);
setTimeout(() => {
try {
editorInstance.editor.setScrollTop(currentScrollTop);
} catch (error) {
if (DEBUG) console.debug('Could not restore scroll position:', error);
}
}, 100);
if (editorInstance.tocContainer) {
try {
updateToc(parsed.content, editorInstance.tocContainer, editorInstance.editor, tocMaxDepth);
} catch (error) {
console.error('Error updating TOC during reload:', error);
}
}
} else {
editorInstance.editor.setMarkdown(fileContent);
}
editorInstance.isDirty = false;
updateFileDirtyStatus(filePath, false);
updateUnsavedCount();
if (editorInstance.saveButton) {
editorInstance.saveButton.disabled = true;
}
if (DEBUG) console.log(`File ${filePath} reloaded successfully from disk!`);
return true;
} catch (error) {
console.error(`Error reloading file ${filePath}:`, error);
alert(`Error reloading file: ${error.message}`);
return false;
}
}
/**
* Before save hook - apply modifications before saving
*/
async function applyBeforeSaveHooks(frontMatter, markdownContent, fileHandle) {
frontMatter.lastModified = new Date().toISOString();
if (!frontMatter.title) {
const firstHeading = markdownContent.match(/^#\s+(.+)$/m);
if (firstHeading) {
frontMatter.title = firstHeading[1];
}
}
const customTags = (markdownContent.match(/<(deliverable|meeting|report|trkno)>/g) || []).length;
if (customTags > 0) {
frontMatter.customTagCount = customTags;
}
return frontMatter;
}
/**
* After save hook - perform actions after saving
*/
async function applyAfterSaveHooks(frontMatter, markdownContent, fileHandle) {
const tags = ['deliverable', 'meeting', 'report', 'trkno'];
const preservedTags = tags.filter(tag => markdownContent.includes(`<${tag}>`));
if (preservedTags.length > 0) {
if (DEBUG) console.log(`Preserved custom tags: ${preservedTags.join(', ')}`);
}
}
/**
* Refresh directory from disk without losing unsaved work
*/
async function refreshDirectory() {
if (serverSourceMode) {
await loadServerDirectory();
return;
}
if (!directoryHandle) {
if (DEBUG) console.log('No directory selected, cannot refresh');
return;
}
// Get active file path from DOM before refresh
const activeFileEl = document.querySelector('.file-item.active-file');
const activeFilePath = activeFileEl ? activeFileEl.dataset.path : null;
// Get dirty files from editorInstances
const dirtyFiles = new Set();
editorInstances.forEach((instance, filePath) => {
if (instance.isDirty) {
dirtyFiles.add(filePath);
}
});
// Re-read directory (calls renderFileTree at the end)
await readDirectory(directoryHandle);
// Restore active file state
if (activeFilePath) {
const activeElement = document.querySelector(`.file-item[data-path="${activeFilePath}"]`);
if (activeElement) {
activeElement.classList.add('active-file');
}
}
// Restore dirty indicators
dirtyFiles.forEach(filePath => {
updateFileDirtyStatus(filePath, true);
});
}
/**
* Surface a clear "no permission to list this directory" message in
* the file tree pane when the server returns 403 on the initial
* listing. Distinct from "host doesn't serve JSON" so the user
* understands why the tree is empty.
*/
function showServerForbiddenMessage() {
const treeEl = document.getElementById('file-tree');
if (!treeEl) return;
treeEl.innerHTML =
'<div class="server-forbidden-message" style="padding: 1rem; color: var(--text-muted, #555); font-size: 0.875rem;">' +
'<strong>No permission to list this directory.</strong>' +
'<p style="margin: 0.5rem 0 0;">Your account does not have read access here. ' +
'Contact the document controller if you believe this is wrong.</p>' +
'</div>';
}
/**
* Build a CRUD-capable file handle backed by a URL — uses the shared
* HTTP polyfill from window.zddc.source. The polyfill's getFile() does
* a GET, and createWritable() PUTs bytes back (file API on zddc-server).
*
* Adds `_serverUrl` for legacy code paths that still expect that field.
* Marks `_readOnly: false` so editor.js leaves save buttons enabled.
*/
function createServerFileHandle(name, url) {
const handle = new window.zddc.source.HttpFileHandle(url, name);
handle._serverUrl = url;
handle._readOnly = false;
return handle;
}
/**
* Build a CRUD-capable directory handle backed by a server URL — uses
* the shared HTTP polyfill. Supports values()/entries(), getFileHandle,
* getDirectoryHandle({create}), and removeEntry() against the server
* file API. _serverUrl/_readOnly are kept for legacy probes.
*/
function createServerDirectoryHandle(name, url) {
const handle = new window.zddc.source.HttpDirectoryHandle(url, name);
handle._serverUrl = url;
handle._readOnly = false;
return handle;
}
/**
* Recursively fetch the JSON directory listing for `dirUrl` and populate
* `parentNode.entries` with synthetic handles. Returns folder/file counts.
* Uses the same Caddy/zddc-server JSON shape archive's source.js consumes.
*/
async function readServerDirectory(dirUrl, parentNode, depth) {
if (depth > 10) return { folderCount: 0, fileCount: 0 };
let items;
try {
const resp = await fetch(dirUrl, { headers: { 'Accept': 'application/json' }, cache: 'no-cache' });
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
items = await resp.json();
if (!Array.isArray(items)) throw new Error('Expected JSON array');
} catch (err) {
if (DEBUG) console.warn(`Server listing failed for ${dirUrl}:`, err);
return { folderCount: 0, fileCount: 0 };
}
const stats = { folderCount: 0, fileCount: 0 };
const subdirPromises = [];
for (const item of items) {
const rawName = item.name.endsWith('/') ? item.name.slice(0, -1) : item.name;
if (rawName.startsWith('.') || rawName.startsWith('_')) continue;
const base = dirUrl.endsWith('/') ? dirUrl : dirUrl + '/';
const childUrl = base + encodeURIComponent(rawName) + (item.is_dir ? '/' : '');
if (item.is_dir) {
const dirNode = {
name: rawName,
type: 'directory',
handle: createServerDirectoryHandle(rawName, childUrl),
entries: {},
};
parentNode.entries[rawName] = dirNode;
stats.folderCount++;
subdirPromises.push(
readServerDirectory(childUrl, dirNode, depth + 1).then((s) => {
stats.folderCount += s.folderCount;
stats.fileCount += s.fileCount;
})
);
} else {
parentNode.entries[rawName] = {
name: rawName,
type: 'file',
handle: createServerFileHandle(rawName, childUrl),
};
stats.fileCount++;
}
}
await Promise.all(subdirPromises);
return stats;
}
/**
* Detect HTTP context, fetch the directory the page lives under, and render
* the resulting subtree in the file pane. Idempotent — safe to re-call.
*/
async function loadServerDirectory() {
if (!(location.protocol === 'http:' || location.protocol === 'https:')) return;
// Compute the directory URL the file tree should be rooted at.
//
// <project>/working/ → root = <project>/working/
// <project>/working/x/y/ → root = <project>/working/x/y/
// <project>/working → root = <project>/working/ (no-slash
// canonical-folder URL — the dispatcher
// routes mdedit here directly without
// a redirect, so we infer "directory"
// from the absence of a `.` in the
// last segment rather than stripping
// back to the parent.)
// <project>/x/y/mdedit.html → root = <project>/x/y/ (the leaf
// segment IS a file; strip to parent.)
//
// The rule: if the last path segment contains a "." it's a file,
// strip it; otherwise treat the whole path as the directory.
let href = window.location.href.split('?')[0].split('#')[0];
let baseUrl;
if (href.endsWith('/')) {
baseUrl = href;
} else {
const lastSlash = href.lastIndexOf('/');
const lastSeg = lastSlash >= 0 ? href.substring(lastSlash + 1) : href;
if (lastSeg.indexOf('.') !== -1) {
// Looks like a file (has an extension) — strip to parent.
baseUrl = lastSlash >= 0 ? href.substring(0, lastSlash + 1) : href + '/';
} else {
// Looks like a directory — append the trailing slash so all
// subsequent listing URLs are computed correctly.
baseUrl = href + '/';
}
}
// Only enter server-source mode if the host actually serves JSON directory
// listings (zddc-server / Caddy). On a plain static host the probe fails
// and we must leave "Add Local Directory" visible so the user can still
// load local files.
//
// 403 means the host is a zddc-server but the user lacks `r` on this
// directory (a "no list" permission posture). Show a clear message so
// the user understands why the tree is empty.
try {
const resp = await fetch(baseUrl, { headers: { 'Accept': 'application/json' }, cache: 'no-cache' });
if (resp.status === 403) {
showServerForbiddenMessage();
return;
}
if (!resp.ok) return;
const items = await resp.json();
if (!Array.isArray(items)) return;
} catch (_) {
return;
}
serverSourceMode = true;
const rootName = (() => {
const path = baseUrl.replace(/\/$/, '');
const seg = path.substring(path.lastIndexOf('/') + 1);
return seg || baseUrl;
})();
fileTree = {
name: rootName,
type: 'directory',
handle: createServerDirectoryHandle(rootName, baseUrl),
entries: {},
};
// Surface refresh. The server now exposes a CRUD file API, so write
// controls (new file, save, delete) stay enabled — the polyfill
// routes their writes through PUT/DELETE/POST. "Add Local Directory"
// is de-emphasized so the user can still load a local folder if they
// want, but server-mode is now the default working mode.
const refreshBtn = document.getElementById('refreshHeaderBtn');
if (refreshBtn) refreshBtn.classList.remove('hidden');
const addDirBtn = document.getElementById('addDirectoryBtn');
if (addDirBtn) {
addDirBtn.classList.remove('btn-primary');
addDirBtn.classList.add('btn--subtle');
}
const stats = await readServerDirectory(baseUrl, fileTree, 0);
renderFileTree();
updateStatusCounts(stats.folderCount, stats.fileCount);
}
/**
* Start monitoring files for external changes
*/
function startFileChangeMonitoring() {
setInterval(async () => {
for (const [filePath, editorInstance] of editorInstances) {
try {
const fileHandle = editorInstance.fileHandle;
if (!fileHandle) continue;
if (fileHandle._readOnly) continue;
const file = await fileHandle.getFile();
const currentLastModified = file.lastModified;
const storedLastModified = editorInstance.lastModified;
if (storedLastModified && currentLastModified !== storedLastModified) {
if (DEBUG) console.log(`File ${filePath} changed externally`);
const action = confirm(
`File "${filePath}" has been modified by another application.\n\n` +
'Click OK to reload from disk (discards unsaved changes)\n' +
'Click Cancel to keep current version'
);
if (action) {
await reloadFileFromDisk(filePath);
} else {
editorInstance.lastModified = currentLastModified;
}
}
} catch (error) {
if (DEBUG) console.debug(`Error checking file ${filePath}:`, error.message);
}
}
}, 3000);
}
/**
* File tree rendering and navigation
*/
// Cache for lazily loaded CDN libraries
const loadedLibraries = new Map();
/**
* Lazily load a script from CDN. Returns a promise that resolves when loaded.
* Caches the promise so subsequent calls return immediately.
*/
function loadLibrary(url) {
if (loadedLibraries.has(url)) return loadedLibraries.get(url);
const promise = new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = url;
script.onload = resolve;
script.onerror = () => reject(new Error(`Failed to load library: ${url}`));
document.head.appendChild(script);
});
loadedLibraries.set(url, promise);
return promise;
}
/**
* Render the file tree in the UI
*/
/**
* Create action buttons for file/directory items
* @param {string} filePath - Full path of the file/dir
* @param {string} type - 'file' or 'directory'
*/
function createActionButtons(filePath, type) {
const actionsDiv = document.createElement('div');
actionsDiv.className = 'tree-actions';
// Server mode now supports full CRUD via the file API — drop the
// legacy short-circuit that hid the rename/delete/new-file actions.
if (type === 'directory') {
// Directory: + (new file) + ✕ (delete)
const newFileBtn = document.createElement('button');
newFileBtn.className = 'tree-btn';
newFileBtn.setAttribute('title', 'New file');
newFileBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>';
newFileBtn.onclick = (e) => {
e.stopPropagation();
createNewFile(filePath);
};
const deleteBtn = document.createElement('button');
deleteBtn.className = 'tree-btn tree-btn--danger';
deleteBtn.setAttribute('title', 'Delete');
deleteBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>';
deleteBtn.onclick = (e) => {
e.stopPropagation();
deleteEntry(filePath, true);
};
actionsDiv.appendChild(newFileBtn);
actionsDiv.appendChild(deleteBtn);
} else {
// File: ✎ (rename) + ✕ (delete)
const renameBtn = document.createElement('button');
renameBtn.className = 'tree-btn';
renameBtn.setAttribute('title', 'Rename');
renameBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/></svg>';
renameBtn.onclick = (e) => {
e.stopPropagation();
renameEntry(filePath, false);
};
const deleteBtn = document.createElement('button');
deleteBtn.className = 'tree-btn tree-btn--danger';
deleteBtn.setAttribute('title', 'Delete');
deleteBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>';
deleteBtn.onclick = (e) => {
e.stopPropagation();
deleteEntry(filePath, false);
};
actionsDiv.appendChild(renameBtn);
actionsDiv.appendChild(deleteBtn);
}
return actionsDiv;
}
function renderFileTree() {
const fileTreeElement = document.getElementById('file-tree');
if (!fileTreeElement) return;
fileTreeElement.innerHTML = '';
// Always show scratchpad at top
const scratchpadElement = document.createElement('div');
scratchpadElement.className = 'file-item tree-row px-2 py-1 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-gray-800 border-b border-gray-200 dark:border-gray-700 mb-2';
scratchpadElement.dataset.type = 'file';
scratchpadElement.dataset.path = SCRATCHPAD_ID;
scratchpadElement.dataset.name = 'Scratchpad';
const scratchLabel = document.createElement('span');
scratchLabel.className = 'tree-row__label';
scratchLabel.innerHTML = '<span class="tree-row__name"><div class="filename-main">📝 Scratchpad</div><div class="filename-secondary">Quick notes — no directory needed</div></span>';
scratchpadElement.appendChild(scratchLabel);
const scratchActions = document.createElement('div');
scratchActions.className = 'tree-actions tree-actions--always';
const scratchDownloadBtn = document.createElement('button');
scratchDownloadBtn.id = 'scratchpad-download-btn';
scratchDownloadBtn.className = 'tree-btn';
scratchDownloadBtn.title = 'Download scratchpad as a Markdown file';
scratchDownloadBtn.setAttribute('aria-label', 'Download scratchpad');
scratchDownloadBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12"/><path d="M7 10l5 5 5-5"/><path d="M5 21h14"/></svg>';
scratchDownloadBtn.disabled = true;
scratchDownloadBtn.classList.add('is-disabled');
scratchDownloadBtn.onclick = (e) => {
e.stopPropagation();
if (scratchDownloadBtn.disabled) return;
downloadScratchpad();
};
scratchActions.appendChild(scratchDownloadBtn);
scratchpadElement.appendChild(scratchActions);
scratchpadElement.addEventListener('click', (event) => {
event.stopPropagation();
openScratchpad();
document.querySelectorAll('.file-item').forEach(el => el.classList.remove('active-file'));
scratchpadElement.classList.add('active-file');
updateScratchpadDownloadState();
});
fileTreeElement.appendChild(scratchpadElement);
// Sync button state with current scratchpad content (re-renders preserve it)
updateScratchpadDownloadState();
function createFileTreeHTML(directory, parentElement, path = '') {
if (!directory || !directory.entries) return;
// Sort entries: files first, then directories, alphabetically
const sortedEntries = Object.entries(directory.entries).sort((a, b) => {
const [nameA, itemA] = a;
const [nameB, itemB] = b;
if (itemA.type !== itemB.type) {
return itemA.type === 'file' ? -1 : 1;
}
return nameA.localeCompare(nameB);
});
for (const [name, item] of sortedEntries) {
if (item.type === 'directory') {
const dirElement = document.createElement('div');
dirElement.className = 'directory-item tree-row px-2 py-1 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-gray-800 collapsed';
dirElement.dataset.type = 'directory';
const currentPath = path ? `${path}/${name}` : name;
dirElement.dataset.path = currentPath;
const dirIcon = document.createElement('span');
dirIcon.className = 'dir-icon mr-1';
dirIcon.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
const dirName = document.createElement('span');
dirName.className = 'tree-row__name';
const parsedFolder = zddc.parseFolder(name);
if (parsedFolder && parsedFolder.valid) {
const meta = `${parsedFolder.trackingNumber} (${parsedFolder.status}) — ${parsedFolder.date}`;
dirName.innerHTML = `<div class="filename-main">📁 ${escapeHtml(parsedFolder.title)}</div><div class="filename-secondary">${escapeHtml(meta)}</div>`;
} else {
// Non-ZDDC folder: still wrap in filename-main so
// typography matches the two-line entries (same font
// size + weight; just no secondary line).
dirName.innerHTML = `<div class="filename-main">📁 ${escapeHtml(name)}</div>`;
}
const dirLabel = document.createElement('span');
dirLabel.className = 'tree-row__label';
dirLabel.appendChild(dirIcon);
dirLabel.appendChild(dirName);
const dirActions = createActionButtons(currentPath, 'directory');
dirElement.appendChild(dirLabel);
dirElement.appendChild(dirActions);
parentElement.appendChild(dirElement);
const contentsElement = document.createElement('div');
contentsElement.className = 'directory-contents ml-4';
contentsElement.style.display = 'none';
parentElement.appendChild(contentsElement);
dirElement.addEventListener('click', (event) => {
event.stopPropagation();
dirElement.classList.toggle('collapsed');
const contents = dirElement.nextElementSibling;
if (contents && contents.classList.contains('directory-contents')) {
contents.style.display = dirElement.classList.contains('collapsed') ? 'none' : 'block';
}
});
createFileTreeHTML(item, contentsElement, currentPath);
} else if (item.type === 'file') {
const fileElement = document.createElement('div');
fileElement.className = 'file-item tree-row px-2 py-1 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-gray-800';
fileElement.dataset.type = 'file';
const filePath = path ? `${path}/${name}` : name;
fileElement.dataset.path = filePath;
fileElement.dataset.name = name;
const fileIcon = getFileTypeIcon(name);
// Build the inner two-line text inside a tree-row__name
// wrapper (column-flex). ZDDC-conforming filenames split
// into title + meta; "Title - filename.ext" pattern uses
// the dash as the same split. Plain names get a single
// line via filename-main only — same wrapper, just no
// secondary div, so the layout stays consistent.
let fileNameInner;
const parsed = zddc.parseFilename(name);
if (parsed && parsed.valid) {
const titleDisplay = escapeHtml(parsed.title);
const metaDisplay = escapeHtml(`${parsed.trackingNumber}_${parsed.revision} (${parsed.status})`);
fileNameInner = `<div class="filename-main">${fileIcon} ${titleDisplay}</div><div class="filename-secondary">${metaDisplay}</div>`;
} else if (name.includes(' - ')) {
const dashIdx = name.lastIndexOf(' - ');
const secondary = escapeHtml(name.substring(0, dashIdx));
const primary = escapeHtml(name.substring(dashIdx + 3).replace(/\.[^.]+$/, ''));
fileNameInner = `<div class="filename-main">${fileIcon} ${primary}</div><div class="filename-secondary">${secondary}</div>`;
} else {
fileNameInner = `<div class="filename-main">${fileIcon} ${escapeHtml(name)}</div>`;
}
const fileLabel = document.createElement('span');
fileLabel.className = 'tree-row__label';
fileLabel.innerHTML = `<span class="tree-row__name">${fileNameInner}</span>`;
const fileActions = createActionButtons(filePath, 'file');
fileElement.innerHTML = '';
fileElement.appendChild(fileLabel);
fileElement.appendChild(fileActions);
fileElement.addEventListener('click', (event) => {
event.stopPropagation();
handleFileClick(item.handle, filePath, fileElement);
});
parentElement.appendChild(fileElement);
}
}
}
createFileTreeHTML(fileTree, fileTreeElement);
}
/**
* Handle click on a file in the file tree
* @param {FileSystemFileHandle} fileHandle - The file handle
* @param {string} filePath - Path of the file
* @param {HTMLElement} fileElement - The clicked element
*/
async function handleFileClick(fileHandle, filePath, fileElement) {
try {
currentFileHandle = fileHandle;
// Remove active class from all file items
const allFileItems = document.querySelectorAll('.file-item');
allFileItems.forEach(item => {
item.classList.remove('active-file');
item.style.backgroundColor = '';
item.style.color = '';
});
// Add active class to clicked file
fileElement.classList.add('active-file');
fileElement.style.backgroundColor = '#3b82f6';
fileElement.style.color = 'white';
await displayFileContent(fileHandle, filePath);
} catch (error) {
console.error('Error handling file click:', error);
alert(`Error opening file: ${error.message}`);
}
}
/**
* Display file content in main area
* @param {FileSystemFileHandle} fileHandle - File handle
* @param {string} filePath - Path of the file
*/
async function displayFileContent(fileHandle, filePath) {
try {
currentFileHandle = fileHandle;
const file = await fileHandle.getFile();
const fileName = file.name;
const lastModified = file.lastModified;
document.getElementById('welcome-screen').classList.add('hidden');
document.getElementById('content-container').classList.remove('hidden');
const lower = fileName.toLowerCase();
const lastDot = lower.lastIndexOf('.');
const ext = lastDot >= 0 ? lower.substring(lastDot + 1) : '';
const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp', '.svg'];
const isImage = imageExtensions.some(e => lower.endsWith(e));
const isTiff = window.zddc && window.zddc.preview && window.zddc.preview.isTiff(ext);
const isZip = lower.endsWith('.zip');
const isHtml = lower.endsWith('.html') || lower.endsWith('.htm');
const isDocx = lower.endsWith('.docx');
const isXlsx = lower.endsWith('.xlsx') || lower.endsWith('.xls');
const isPdf = lower.endsWith('.pdf');
if (isImage) {
displayImagePreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isTiff) {
displayTiffPreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isZip) {
displayZipPreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isHtml) {
displayHtmlPreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isDocx) {
displayDocxPreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isXlsx) {
displayXlsxPreview(file, filePath, fileName, fileHandle, lastModified);
} else if (isPdf) {
displayPdfPreview(file, filePath, fileName, fileHandle, lastModified);
} else {
const content = await file.text();
if (fileName.toLowerCase().endsWith('.md')) {
initializeEditor(content, true, filePath, fileName, fileHandle, lastModified);
} else {
initializeEditor(content, false, filePath, fileName, fileHandle, lastModified);
}
}
} catch (error) {
console.error('Error displaying file content:', error);
alert(`Error opening file: ${error.message}`);
}
}
/**
* Display image preview
*/
async function displayImagePreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) {
alert('Error: content-container element not found!');
return;
}
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const imageContainer = document.createElement('div');
imageContainer.className = 'image-preview-container flex-1 overflow-auto p-4';
const imageElement = document.createElement('img');
imageElement.className = 'image-preview';
imageElement.alt = fileName;
const objectUrl = URL.createObjectURL(file);
imageElement.src = objectUrl;
imageContainer.appendChild(imageElement);
fileViewContainer.appendChild(imageContainer);
contentContainer.appendChild(fileViewContainer);
const instanceData = {
fileViewContainer: fileViewContainer,
fileHandle: fileHandle,
lastModified: lastModified,
isDirty: false,
objectUrl: objectUrl
};
editorInstances.set(filePath, instanceData);
}
/**
* Display TIFF preview using shared zddc.preview.renderTiff (UTIF.js + canvas).
*/
async function displayTiffPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) return;
document.querySelectorAll('.file-view-container').forEach(c => { c.style.display = 'none'; });
if (editorInstances.has(filePath)) {
const existing = editorInstances.get(filePath);
if (existing.fileViewContainer) existing.fileViewContainer.style.display = 'flex';
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const tiffContainer = document.createElement('div');
tiffContainer.className = 'flex-1 min-h-0';
tiffContainer.style.display = 'flex';
tiffContainer.style.flexDirection = 'column';
fileViewContainer.appendChild(tiffContainer);
contentContainer.appendChild(fileViewContainer);
try {
const arrayBuffer = await file.arrayBuffer();
await window.zddc.preview.renderTiff(document, tiffContainer, arrayBuffer, { fileName: fileName });
} catch (err) {
console.error('Error rendering TIFF:', err);
tiffContainer.textContent = 'Error rendering TIFF: ' + (err.message || err);
}
editorInstances.set(filePath, { fileViewContainer, fileHandle, lastModified, isDirty: false });
}
/**
* Display ZIP listing using shared zddc.preview.renderZipListing.
*/
async function displayZipPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) return;
document.querySelectorAll('.file-view-container').forEach(c => { c.style.display = 'none'; });
if (editorInstances.has(filePath)) {
const existing = editorInstances.get(filePath);
if (existing.fileViewContainer) existing.fileViewContainer.style.display = 'flex';
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const zipContainer = document.createElement('div');
zipContainer.className = 'flex-1 min-h-0';
zipContainer.style.display = 'flex';
zipContainer.style.flexDirection = 'column';
fileViewContainer.appendChild(zipContainer);
contentContainer.appendChild(fileViewContainer);
try {
const arrayBuffer = await file.arrayBuffer();
await window.zddc.preview.renderZipListing(document, zipContainer, arrayBuffer, { fileName: fileName });
} catch (err) {
console.error('Error rendering ZIP listing:', err);
zipContainer.textContent = 'Error reading ZIP: ' + (err.message || err);
}
editorInstances.set(filePath, { fileViewContainer, fileHandle, lastModified, isDirty: false });
}
/**
* Display HTML preview in sandboxed iframe
*/
async function displayHtmlPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) {
alert('Error: content-container element not found!');
return;
}
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return;
}
const htmlContent = await file.text();
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const htmlContainer = document.createElement('div');
htmlContainer.className = 'html-preview-container flex-1 overflow-hidden';
const iframe = document.createElement('iframe');
iframe.className = 'html-preview-iframe w-full h-full border-0';
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-forms allow-popups allow-modals');
iframe.setAttribute('loading', 'lazy');
iframe.srcdoc = htmlContent;
htmlContainer.appendChild(iframe);
fileViewContainer.appendChild(htmlContainer);
contentContainer.appendChild(fileViewContainer);
const instanceData = {
fileViewContainer: fileViewContainer,
fileHandle: fileHandle,
lastModified: lastModified,
isDirty: false,
iframe: iframe
};
editorInstances.set(filePath, instanceData);
iframe.addEventListener('load', () => {
try {
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
if (iframeDoc) {
iframeDoc.addEventListener('click', function (e) {
const link = e.target.closest('a');
if (link && link.getAttribute('href')) {
const href = link.getAttribute('href');
if (href.startsWith('#')) {
e.preventDefault();
const targetId = href.substring(1);
const targetElement = iframeDoc.getElementById(targetId);
if (targetElement) {
targetElement.scrollIntoView({ behavior: 'smooth' });
}
}
}
});
}
} catch (error) {
if (DEBUG) console.log('Cannot access iframe content for navigation handling:', error);
}
});
}
/**
* Display DOCX preview in main content area
*/
async function displayDocxPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) {
alert('Error: content-container element not found!');
return;
}
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const docxContainer = document.createElement('div');
docxContainer.className = 'flex-1 overflow-auto p-4';
docxContainer.innerHTML = '<div style="text-align:center;padding:2rem;color:#666;">Loading preview...</div>';
fileViewContainer.appendChild(docxContainer);
contentContainer.appendChild(fileViewContainer);
const instanceData = {
fileViewContainer: fileViewContainer,
fileHandle: fileHandle,
lastModified: lastModified,
isDirty: false
};
editorInstances.set(filePath, instanceData);
try {
await loadLibrary('https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js');
await loadLibrary('https://cdn.jsdelivr.net/npm/docx-preview@latest/dist/docx-preview.min.js');
const arrayBuffer = await file.arrayBuffer();
docxContainer.innerHTML = '';
await window.docx.renderAsync(arrayBuffer, docxContainer);
} catch (err) {
console.error('Error rendering DOCX:', err);
docxContainer.innerHTML = `<div style="text-align:center;padding:2rem;color:#c00;">Error rendering DOCX: ${err.message}</div>`;
}
}
/**
* Display XLSX/XLS preview in main content area
*/
async function displayXlsxPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) {
alert('Error: content-container element not found!');
return;
}
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const xlsxContainer = document.createElement('div');
xlsxContainer.className = 'flex-1 overflow-auto';
xlsxContainer.innerHTML = '<div style="text-align:center;padding:2rem;color:#666;">Loading preview...</div>';
fileViewContainer.appendChild(xlsxContainer);
contentContainer.appendChild(fileViewContainer);
const instanceData = {
fileViewContainer: fileViewContainer,
fileHandle: fileHandle,
lastModified: lastModified,
isDirty: false
};
editorInstances.set(filePath, instanceData);
try {
await loadLibrary('https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js');
const arrayBuffer = await file.arrayBuffer();
const workbook = XLSX.read(arrayBuffer, { type: 'array' });
xlsxContainer.innerHTML = '';
if (workbook.SheetNames.length > 1) {
const tabs = document.createElement('div');
tabs.style.cssText = 'display:flex;gap:0;border-bottom:1px solid #ddd;background:#f5f5f5;';
const tableArea = document.createElement('div');
tableArea.className = 'flex-1 overflow-auto';
workbook.SheetNames.forEach((name, i) => {
const tab = document.createElement('button');
tab.textContent = name;
tab.style.cssText = 'padding:0.4rem 1rem;cursor:pointer;border:1px solid transparent;border-bottom:none;font-size:0.85rem;background:transparent;';
if (i === 0) tab.style.cssText += 'background:white;border-color:#ddd;border-bottom-color:white;margin-bottom:-1px;font-weight:500;';
tab.onclick = () => {
tabs.querySelectorAll('button').forEach(t => { t.style.background = 'transparent'; t.style.borderColor = 'transparent'; t.style.fontWeight = 'normal'; });
tab.style.cssText = 'padding:0.4rem 1rem;cursor:pointer;border:1px solid #ddd;border-bottom-color:white;font-size:0.85rem;background:white;margin-bottom:-1px;font-weight:500;';
renderXlsxSheet(workbook, name, tableArea);
};
tabs.appendChild(tab);
});
xlsxContainer.appendChild(tabs);
xlsxContainer.appendChild(tableArea);
renderXlsxSheet(workbook, workbook.SheetNames[0], tableArea);
} else {
renderXlsxSheet(workbook, workbook.SheetNames[0], xlsxContainer);
}
} catch (err) {
console.error('Error rendering XLSX:', err);
xlsxContainer.innerHTML = `<div style="text-align:center;padding:2rem;color:#c00;">Error rendering spreadsheet: ${err.message}</div>`;
}
}
/**
* Render a single XLSX sheet as an HTML table
*/
function renderXlsxSheet(workbook, sheetName, container) {
const sheet = workbook.Sheets[sheetName];
const html = XLSX.utils.sheet_to_html(sheet, { editable: false });
container.innerHTML = html;
const table = container.querySelector('table');
if (table) {
table.style.cssText = 'border-collapse:collapse;width:100%;font-size:0.85rem;';
table.querySelectorAll('th,td').forEach(cell => {
cell.style.cssText = 'border:1px solid #ddd;padding:0.35rem 0.5rem;text-align:left;white-space:nowrap;';
});
table.querySelectorAll('th').forEach(th => {
th.style.background = '#f0f0f0';
th.style.fontWeight = '600';
});
}
}
/**
* Display PDF preview using browser's built-in PDF viewer
*/
async function displayPdfPreview(file, filePath, fileName, fileHandle, lastModified) {
const contentContainer = document.getElementById('content-container');
if (!contentContainer) return;
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return;
}
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName;
fileHeader.appendChild(fileTitle);
fileViewContainer.appendChild(fileHeader);
const pdfContainer = document.createElement('div');
pdfContainer.className = 'flex-1 overflow-hidden';
const objectUrl = URL.createObjectURL(file);
const iframe = document.createElement('iframe');
iframe.className = 'w-full h-full border-0';
iframe.src = objectUrl;
iframe.setAttribute('title', fileName);
pdfContainer.appendChild(iframe);
fileViewContainer.appendChild(pdfContainer);
contentContainer.appendChild(fileViewContainer);
editorInstances.set(filePath, {
fileViewContainer,
fileHandle,
lastModified,
isDirty: false,
objectUrl
});
}
/**
* Update status bar counts
*/
function updateStatusCounts(folderCount, fileCount) {
const folderCountElement = document.getElementById('folder-count');
const fileCountElement = document.getElementById('file-count');
if (folderCountElement) {
folderCountElement.textContent = `${folderCount} folder${folderCount !== 1 ? 's' : ''}`;
}
if (fileCountElement) {
fileCountElement.textContent = `${fileCount} file${fileCount !== 1 ? 's' : ''}`;
}
updateUnsavedCount();
}
/**
* Update unsaved count in status bar
*/
function updateUnsavedCount() {
const unsavedCountElement = document.getElementById('unsaved-count');
if (!unsavedCountElement) return;
let dirtyCount = 0;
editorInstances.forEach(instance => {
if (instance.isDirty) {
dirtyCount++;
}
});
unsavedCountElement.textContent = `${dirtyCount} unsaved`;
if (dirtyCount > 0) {
unsavedCountElement.classList.add('text-amber-500', 'font-medium');
} else {
unsavedCountElement.classList.remove('text-amber-500', 'font-medium');
}
}
/**
* Update file dirty status indicator in tree
*/
function updateFileDirtyStatus(filePath, isDirty) {
const fileElement = document.querySelector(`.file-item[data-path="${filePath}"]`);
if (!fileElement) return;
if (isDirty) {
if (!fileElement.querySelector('.dirty-indicator')) {
const indicator = document.createElement('span');
indicator.className = 'dirty-indicator ml-1 text-amber-500 font-bold';
indicator.textContent = '●';
fileElement.appendChild(indicator);
}
fileElement.classList.add('is-dirty');
} else {
const indicator = fileElement.querySelector('.dirty-indicator');
if (indicator) {
fileElement.removeChild(indicator);
}
fileElement.classList.remove('is-dirty');
}
}
/**
* Toast UI Editor initialization and management
*/
/**
* Initialize or update the Toast UI Editor for a file
* @param {string} content - Content to display
* @param {boolean} isMarkdown - Whether content is markdown
* @param {string} filePath - Path of the file
* @param {string} fileName - Name of the file
* @param {FileSystemFileHandle} fileHandle - File handle for saving
* @param {number} lastModified - Timestamp of last modification
*/
function initializeEditor(content, isMarkdown = true, filePath = '', fileName = '', fileHandle = null, lastModified = null) {
// Parse front matter
let frontMatterData = {};
let markdownBody = content;
if (isMarkdown && content) {
try {
const parsed = parseFrontMatter(content);
frontMatterData = parsed.data;
markdownBody = parsed.content;
} catch (error) {
console.error('Failed to parse front matter:', error);
}
}
const contentContainer = document.getElementById('content-container');
if (!contentContainer) {
alert('Error: content-container element not found!');
return;
}
// Hide all file view containers
document.querySelectorAll('.file-view-container').forEach(container => {
container.style.display = 'none';
});
// Check if file already has an instance
if (editorInstances.has(filePath)) {
const existingInstance = editorInstances.get(filePath);
if (existingInstance.fileViewContainer) {
existingInstance.fileViewContainer.style.display = 'flex';
}
return existingInstance.editor;
}
// Create file view container
const fileViewContainer = document.createElement('div');
fileViewContainer.className = 'file-view-container flex flex-col h-full';
// Create file header
const fileHeader = document.createElement('div');
fileHeader.className = 'file-header flex justify-between items-center px-4 py-2 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 font-medium border-b border-gray-200 dark:border-gray-700';
const fileTitle = document.createElement('span');
fileTitle.textContent = fileName || 'No file selected';
fileHeader.appendChild(fileTitle);
// Button container for alignment
const buttonContainer = document.createElement('div');
buttonContainer.className = 'flex gap-2';
// Determine if this is a scratchpad (no file handle)
const isScratchpad = !fileHandle;
const isReadOnlyHandle = !!(fileHandle && fileHandle._readOnly);
// Save button (or Save As for scratchpads / read-only server files)
const saveButton = document.createElement('button');
saveButton.className = 'btn btn-primary btn-sm';
saveButton.textContent = (isScratchpad || isReadOnlyHandle) ? 'Save As...' : 'Save File';
saveButton.disabled = !isScratchpad; // Scratchpads can always save; read-only enables on edit
buttonContainer.appendChild(saveButton);
// Reload button (only for files, not scratchpads) — icon to match file-tree refresh
let reloadButton = null;
if (!isScratchpad) {
reloadButton = document.createElement('button');
reloadButton.className = 'btn btn-secondary btn-sm';
reloadButton.textContent = '↻';
reloadButton.title = 'Reload from disk (discards unsaved changes)';
reloadButton.setAttribute('aria-label', 'Reload from disk');
buttonContainer.appendChild(reloadButton);
}
fileHeader.appendChild(buttonContainer);
fileViewContainer.appendChild(fileHeader);
// Content area
const contentArea = document.createElement('div');
contentArea.className = 'flex flex-col flex-1 overflow-hidden';
// Editor area with TOC
const editorArea = document.createElement('div');
editorArea.className = 'flex flex-row flex-1 overflow-hidden';
// TOC pane (markdown only)
let tocContainer = null;
let frontMatterTextarea = null;
if (isMarkdown) {
const tocPane = document.createElement('div');
tocPane.className = 'toc-pane bg-white dark:bg-gray-900 border-r border-gray-200 dark:border-gray-700';
tocPane.style.width = '325px';
tocPane.style.minWidth = '150px';
// Front matter section (collapsible, height-resizable)
const frontMatterNav = document.createElement('div');
frontMatterNav.className = 'front-matter-nav';
frontMatterNav.style.height = '180px';
const frontMatterHeader = document.createElement('div');
frontMatterHeader.className = 'front-matter-header pane-section-header cursor-pointer';
const toggleIcon = document.createElement('span');
toggleIcon.textContent = '▼';
toggleIcon.className = 'toggle-icon';
frontMatterHeader.appendChild(toggleIcon);
const headerText = document.createElement('span');
headerText.textContent = 'YAML Front Matter';
frontMatterHeader.appendChild(headerText);
frontMatterNav.appendChild(frontMatterHeader);
const frontMatterContent = document.createElement('div');
frontMatterContent.className = 'front-matter-content';
frontMatterTextarea = document.createElement('textarea');
frontMatterTextarea.className = 'front-matter-textarea';
frontMatterTextarea.placeholder = 'title: Document Title\ndate: 2024-01-01\ntags: [example]';
if (frontMatterData && Object.keys(frontMatterData).length > 0) {
try {
let yamlText = '';
for (const [key, value] of Object.entries(frontMatterData)) {
if (Array.isArray(value)) {
yamlText += `${key}: [${value.map(v => `"${v}"`).join(', ')}]\n`;
} else {
yamlText += `${key}: ${value}\n`;
}
}
frontMatterTextarea.value = yamlText.trim();
} catch (error) {
console.warn('Failed to stringify front matter:', error);
frontMatterTextarea.value = '';
}
}
frontMatterContent.appendChild(frontMatterTextarea);
frontMatterNav.appendChild(frontMatterContent);
tocPane.appendChild(frontMatterNav);
// Horizontal resizer between front-matter and TOC
const fmTocResizer = document.createElement('div');
fmTocResizer.className = 'pane-resizer horizontal';
tocPane.appendChild(fmTocResizer);
// TOC section
const tocSection = document.createElement('div');
tocSection.className = 'toc-section';
const tocHeader = document.createElement('div');
tocHeader.className = 'toc-header pane-section-header';
const tocTitle = document.createElement('span');
tocTitle.textContent = 'Table of Contents';
tocHeader.appendChild(tocTitle);
const tocDepthSelector = document.createElement('select');
tocDepthSelector.className = 'toc-depth-selector';
tocDepthSelector.innerHTML = `
<option value="6">All Levels</option>
<option value="1">H1 Only</option>
<option value="2">H1-H2</option>
<option value="3" selected>H1-H3</option>
<option value="4">H1-H4</option>
<option value="5">H1-H5</option>
`;
tocHeader.appendChild(tocDepthSelector);
tocSection.appendChild(tocHeader);
tocContainer = document.createElement('div');
tocContainer.className = 'toc-container toc-content';
tocSection.appendChild(tocContainer);
tocPane.appendChild(tocSection);
// Toggle: collapsed only shows the header. Hide content + horizontal resizer.
let fmIsCollapsed = false;
frontMatterHeader.addEventListener('click', () => {
fmIsCollapsed = !fmIsCollapsed;
frontMatterNav.classList.toggle('collapsed', fmIsCollapsed);
toggleIcon.textContent = fmIsCollapsed ? '▶' : '▼';
fmTocResizer.style.display = fmIsCollapsed ? 'none' : '';
if (fmIsCollapsed) {
frontMatterNav.style.height = '';
} else {
frontMatterNav.style.height = '180px';
}
});
editorArea.appendChild(tocPane);
// Vertical resizer between toc-pane and editor (placed inside editorArea)
const tocResizer = document.createElement('div');
tocResizer.className = 'pane-resizer bg-gray-200 dark:bg-gray-700 transition-colors relative z-10 w-1 cursor-col-resize hover:bg-blue-500';
tocResizer.setAttribute('data-resizer-for', 'toc-pane');
editorArea.appendChild(tocResizer);
makeResizable(tocResizer, tocPane);
// Make the front-matter / TOC split height-adjustable
makeHeightResizable(fmTocResizer, frontMatterNav, tocPane);
tocDepthSelector.addEventListener('change', function () {
const depth = parseInt(this.value);
if (editorInstance) {
const currentContent = editorInstance.getMarkdown();
updateToc(currentContent, tocContainer, editorInstance, depth);
}
});
}
// Editor container
const editorContainer = document.createElement('div');
editorContainer.className = 'editor-instance flex-1 overflow-hidden';
editorArea.appendChild(editorContainer);
contentArea.appendChild(editorArea);
fileViewContainer.appendChild(contentArea);
contentContainer.appendChild(fileViewContainer);
// Check Toast UI availability
if (typeof toastui === 'undefined') {
alert('Error: Toast UI library not loaded!');
editorContainer.innerHTML = '<div style="padding: 20px; background: #ffeeee; color: red;">Error: Toast UI library not loaded!</div>';
return;
}
let editorInstance;
try {
// Initialize Toast UI Editor
const editor = new toastui.Editor({
el: editorContainer,
height: '100%',
initialEditType: 'markdown',
previewStyle: 'vertical',
initialValue: markdownBody,
toolbarItems: [
['heading', 'bold', 'italic', 'strike'],
['hr', 'quote'],
['ul', 'ol', 'task', 'indent', 'outdent'],
['table', 'image', 'link'],
['code', 'codeblock']
]
});
editorInstance = editor;
if (!isMarkdown) {
editorInstance.changeMode('wysiwyg');
}
// Generate initial TOC
if (isMarkdown && tocContainer) {
try {
updateToc(markdownBody, tocContainer, editorInstance, tocMaxDepth);
} catch (error) {
console.error('Error generating TOC:', error);
}
const debouncedUpdateToc = debounce(() => {
const currentContent = editorInstance.getMarkdown();
updateToc(currentContent, tocContainer, editorInstance, tocMaxDepth);
}, 300);
editorInstance.on('change', () => {
debouncedUpdateToc();
const instanceData = editorInstances.get(filePath);
if (instanceData && !instanceData.isDirty) {
instanceData.isDirty = true;
updateFileDirtyStatus(filePath, true);
updateUnsavedCount();
}
saveButton.disabled = false;
if (filePath === SCRATCHPAD_ID) updateScratchpadDownloadState();
});
// Scroll listener for TOC highlighting
const mdPreview = editorInstance.getEditorElements().mdPreview;
if (mdPreview) {
let activeTimeout = null;
let lastHeader = null;
const updateActiveHeader = () => {
// Re-query live headings (TOC may have been regenerated)
const liveHeaders = mdPreview.querySelectorAll('h1, h2, h3, h4, h5, h6');
const previewRect = mdPreview.getBoundingClientRect();
// Use a threshold slightly below the top so a header touching
// the top edge counts as "active"
const threshold = previewRect.top + 4;
let activeHeader = null;
for (const header of liveHeaders) {
if (header.getBoundingClientRect().top <= threshold) {
activeHeader = header.textContent.trim();
} else {
break;
}
}
if (activeHeader !== lastHeader) {
lastHeader = activeHeader;
setActiveTocItem(tocContainer, activeHeader);
}
};
const onScroll = () => {
cancelAnimationFrame(activeTimeout);
activeTimeout = requestAnimationFrame(updateActiveHeader);
};
mdPreview.addEventListener('scroll', onScroll);
}
} else {
editorInstance.on('change', () => {
const instanceData = editorInstances.get(filePath);
if (instanceData && !instanceData.isDirty) {
instanceData.isDirty = true;
updateFileDirtyStatus(filePath, true);
updateUnsavedCount();
}
saveButton.disabled = false;
});
}
// Front matter change listener
if (frontMatterTextarea) {
frontMatterTextarea.addEventListener('input', () => {
const instanceData = editorInstances.get(filePath);
if (instanceData && !instanceData.isDirty) {
instanceData.isDirty = true;
updateFileDirtyStatus(filePath, true);
updateUnsavedCount();
}
saveButton.disabled = false;
});
}
// Button event listeners
saveButton.addEventListener('click', async () => {
if (isScratchpad) {
// For scratchpads, use Save As
const content = editorInstance.getMarkdown();
const savedHandle = await saveFileAs(content, 'untitled.md');
if (savedHandle && hasFileSystemAccess) {
// Check if saved to current directory - add to file tree
if (directoryHandle) {
try {
// Try to get the file from the directory to verify it's there
const checkHandle = await directoryHandle.getFileHandle(savedHandle.name);
// File is in current directory, add to tree
fileTree.entries[savedHandle.name] = {
name: savedHandle.name,
type: 'file',
handle: checkHandle
};
renderFileTree();
} catch (e) {
// File not in current directory, that's fine
}
}
// Clear scratchpad content after successful save
editorInstance.setMarkdown('');
saveButton.disabled = true;
const instanceData = editorInstances.get(filePath);
if (instanceData) {
instanceData.isDirty = false;
}
}
} else {
saveFile(filePath);
}
});
if (reloadButton) {
reloadButton.addEventListener('click', async () => {
await reloadFileFromDisk(filePath);
});
}
// Store instance data
const instanceData = {
editor: editor,
fileViewContainer: fileViewContainer,
tocContainer: tocContainer,
saveButton: saveButton,
reloadButton: reloadButton,
frontMatterTextarea: frontMatterTextarea,
frontMatterData: frontMatterData,
fileHandle: fileHandle,
lastModified: lastModified,
isDirty: false
};
editorInstances.set(filePath, instanceData);
return editorInstance;
} catch (error) {
console.error('Error initializing editor:', error);
alert(`Error initializing Toast UI Editor: ${error}`);
return null;
}
}
/**
* Table of Contents generation and scroll functionality
*/
/**
* Scroll to header service - uses line numbers for reliable targeting
*/
const ScrollToHeaderService = {
/**
* Scroll to a specific header in the editor by line number
* @param {Object} editorInstance - Toast UI Editor instance
* @param {string} headerText - Text content of the header (for highlighting)
* @param {number} lineIndex - 0-based line index of the header in markdown
*/
scrollToHeader(editorInstance, headerText, lineIndex) {
if (!editorInstance) {
console.warn('Editor instance not available for scrolling');
return;
}
try {
const editorElements = editorInstance.getEditorElements();
const isWysiwygMode = editorInstance.isWysiwygMode();
if (isWysiwygMode) {
// In WYSIWYG mode, find header by text (no line numbers available)
const wysiwygEditor = editorElements.wwEditor;
if (wysiwygEditor) {
const headers = wysiwygEditor.querySelectorAll('h1, h2, h3, h4, h5, h6');
for (const header of headers) {
if (header.textContent.trim() === headerText.trim()) {
// Scroll the editor container directly with 10px offset
const headerPosition = header.getBoundingClientRect().top - wysiwygEditor.getBoundingClientRect().top;
const offset = 10; // Account for fixed headers or padding
wysiwygEditor.scrollTop = headerPosition - offset;
this._highlightHeader(header);
break;
}
}
}
} else {
// In markdown mode, use line number to position cursor, then scroll preview
const lineNumber = lineIndex + 1; // Convert to 1-based
// Move cursor to the heading line in the editor
try {
editorInstance.setSelection([lineNumber, 1], [lineNumber, 1]);
} catch (e) {
if (DEBUG) console.debug('Could not set selection:', e);
}
// Scroll preview to matching header
const previewElement = editorElements.mdPreview;
if (previewElement) {
const headers = previewElement.querySelectorAll('h1, h2, h3, h4, h5, h6');
for (const header of headers) {
if (header.textContent.trim() === headerText.trim()) {
// Scroll the preview container directly with 10px offset
const headerPosition = header.getBoundingClientRect().top - previewElement.getBoundingClientRect().top;
const offset = 10; // Account for fixed headers or padding
previewElement.scrollTop = headerPosition - offset;
this._highlightHeader(header);
break;
}
}
}
}
} catch (error) {
console.error('Error scrolling to header:', error);
}
},
/**
* Highlight header briefly for visual feedback
* @param {HTMLElement} headerElement - Header to highlight
*/
_highlightHeader(headerElement) {
if (!headerElement) return;
headerElement.style.transition = 'background-color 0.3s ease';
headerElement.style.backgroundColor = '#fef3c7';
setTimeout(() => {
headerElement.style.backgroundColor = '';
setTimeout(() => {
headerElement.style.transition = '';
}, 300);
}, 1500);
}
};
/**
* Generate and update the TOC from markdown content
* @param {string} content - Markdown content
* @param {HTMLElement} tocContainer - Container for the TOC
* @param {Object} editorInstance - Toast UI Editor instance
* @param {number} maxDepth - Maximum heading level (1-6)
*/
function updateToc(content, tocContainer, editorInstance, maxDepth = 6) {
if (content === undefined || content === null || !tocContainer) {
console.warn('Missing required params for updateToc');
return;
}
tocContainer.innerHTML = '';
const tocList = document.createElement('ul');
tocList.className = 'toc-list pl-0 text-sm';
if (!content.trim()) {
const emptyMessage = document.createElement('p');
emptyMessage.className = 'text-gray-500 p-4';
emptyMessage.textContent = 'This file is empty.';
tocContainer.appendChild(emptyMessage);
return;
}
const headings = [];
const lines = content.split('\n');
lines.forEach((line, index) => {
const match = line.match(/^(#{1,6})\s+(.+)$/);
if (match) {
const level = match[1].length;
let text = match[2].trim();
// Clean markdown formatting
text = text
.replace(/\\(.)/g, '$1')
.replace(/\*\*(.*?)\*\*/g, '$1')
.replace(/\*(.*?)\*/g, '$1')
.replace(/`(.*?)`/g, '$1')
.replace(/\[(.*?)\]\(.*?\)/g, '$1')
.replace(/~~(.*?)~~/g, '$1')
.trim();
const id = text.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, '');
headings.push({
level,
text,
id,
lineIndex: index
});
}
});
let currentList = tocList;
let currentLevel = 0;
let listsStack = [tocList];
const filteredHeadings = headings.filter(heading => heading.level <= maxDepth);
if (filteredHeadings.length === 0) {
const noHeadings = document.createElement('p');
noHeadings.className = 'text-gray-500 p-4';
noHeadings.textContent = maxDepth === 6 ? 'No headings found in this document.' :
'No headings at or below level H' + maxDepth + ' found.';
tocContainer.appendChild(noHeadings);
return;
}
filteredHeadings.forEach(heading => {
const li = document.createElement('li');
li.className = `toc-item toc-level-${heading.level} py-1`;
const a = document.createElement('a');
a.innerHTML = heading.text;
a.href = '#';
a.className = 'text-blue-600 hover:text-blue-800 hover:underline cursor-pointer';
a.dataset.headerText = heading.text;
a.dataset.lineIndex = heading.lineIndex;
a.addEventListener('click', function(e) {
e.preventDefault();
if (editorInstance && ScrollToHeaderService) {
try {
ScrollToHeaderService.scrollToHeader(
editorInstance,
heading.text,
parseInt(heading.lineIndex)
);
} catch (error) {
console.error('Error in ScrollToHeaderService.scrollToHeader:', error);
}
}
});
li.appendChild(a);
if (heading.level > currentLevel) {
const nestedUl = document.createElement('ul');
nestedUl.className = 'pl-4 mt-1';
listsStack[listsStack.length - 1].appendChild(nestedUl);
listsStack.push(nestedUl);
currentList = nestedUl;
currentLevel = heading.level;
} else if (heading.level < currentLevel) {
while (heading.level < currentLevel && listsStack.length > 1) {
listsStack.pop();
currentLevel--;
}
currentList = listsStack[listsStack.length - 1];
}
currentList.appendChild(li);
});
tocContainer.appendChild(tocList);
clearActiveTocItem(tocContainer);
}
/**
* Clear active TOC item from all items within the container
* @param {HTMLElement} tocContainer - Container element holding the TOC
*/
function clearActiveTocItem(tocContainer) {
if (!tocContainer) return;
const activeItems = tocContainer.querySelectorAll('.toc-active');
activeItems.forEach(item => {
item.classList.remove('toc-active');
});
}
/**
* Set active TOC item by finding the link matching the header text
* @param {HTMLElement} tocContainer - Container element holding the TOC
* @param {string} headerText - Text of the header to match and activate
*/
function setActiveTocItem(tocContainer, headerText) {
if (!tocContainer || !headerText) return;
// First clear any existing active items
clearActiveTocItem(tocContainer);
// Find the link matching the header text
const links = tocContainer.querySelectorAll('a[data-header-text]');
for (const link of links) {
if (link.dataset.headerText === headerText) {
// Add toc-active class to the parent li element
const li = link.parentElement;
if (li) {
li.classList.add('toc-active');
}
break;
}
}
}
// Reachable at top-level scope to other concatenated mdedit JS files via the
// build's flat-IIFE-less module pattern; no window.* exports needed.
/**
* Pane resizing functionality
*/
/**
* Make an element resizable by dragging its resizer
* @param {HTMLElement} resizer - The resizer element
* @param {HTMLElement} pane - The pane to resize
*/
function makeResizable(resizer, pane) {
const initialWidth = pane.offsetWidth;
let x = 0;
let paneWidth = initialWidth;
const mouseDownHandler = function (e) {
x = e.clientX;
paneWidth = pane.offsetWidth;
document.addEventListener('mousemove', mouseMoveHandler);
document.addEventListener('mouseup', mouseUpHandler);
resizer.classList.add('active');
document.body.style.cursor = 'col-resize';
document.body.style.userSelect = 'none';
};
const mouseMoveHandler = function (e) {
const dx = e.clientX - x;
const newWidth = Math.max(150, paneWidth + dx);
pane.style.width = `${newWidth}px`;
};
const mouseUpHandler = function () {
document.removeEventListener('mousemove', mouseMoveHandler);
document.removeEventListener('mouseup', mouseUpHandler);
resizer.classList.remove('active');
document.body.style.cursor = '';
document.body.style.userSelect = '';
};
resizer.addEventListener('mousedown', mouseDownHandler);
}
/**
* Make a horizontal split height-adjustable: the resizer drags the height
* of `topPane` while it remains a sibling of the bottom section inside `container`.
*
* @param {HTMLElement} resizer - The horizontal resizer between the panes
* @param {HTMLElement} topPane - The pane whose height is set
* @param {HTMLElement} container - The flex column containing both panes
*/
function makeHeightResizable(resizer, topPane, container) {
let y = 0;
let topHeight = 0;
let containerHeight = 0;
const mouseDownHandler = (e) => {
y = e.clientY;
topHeight = topPane.offsetHeight;
containerHeight = container.offsetHeight;
document.addEventListener('mousemove', mouseMoveHandler);
document.addEventListener('mouseup', mouseUpHandler);
resizer.classList.add('active');
document.body.style.cursor = 'row-resize';
document.body.style.userSelect = 'none';
};
const mouseMoveHandler = (e) => {
const dy = e.clientY - y;
// Reserve at least 80px for the bottom pane (TOC); cap top at containerHeight - 80.
const minTop = 60;
const maxTop = Math.max(minTop, containerHeight - 100);
const newHeight = Math.max(minTop, Math.min(maxTop, topHeight + dy));
topPane.style.height = `${newHeight}px`;
};
const mouseUpHandler = () => {
document.removeEventListener('mousemove', mouseMoveHandler);
document.removeEventListener('mouseup', mouseUpHandler);
resizer.classList.remove('active');
document.body.style.cursor = '';
document.body.style.userSelect = '';
};
resizer.addEventListener('mousedown', mouseDownHandler);
}
/**
* Initialize the file navigation pane resizer
*/
function initializeFileNavResizer() {
const fileNavResizer = document.querySelector('.pane-resizer[data-resizer-for="file-nav"]');
if (fileNavResizer && !fileNavResizer.hasAttribute('data-resizer-initialized')) {
fileNavResizer.setAttribute('data-resizer-initialized', 'true');
let x = 0;
let navWidth = 0;
const mouseDownHandler = function (e) {
x = e.clientX;
const navPane = document.getElementById('file-nav');
navWidth = navPane.getBoundingClientRect().width;
document.addEventListener('mousemove', mouseMoveHandler);
document.addEventListener('mouseup', mouseUpHandler);
fileNavResizer.classList.add('bg-blue-500');
};
const mouseMoveHandler = function (e) {
const dx = e.clientX - x;
const navPane = document.getElementById('file-nav');
const newWidth = navWidth + dx;
if (newWidth >= 200) {
navPane.style.width = `${newWidth}px`;
}
};
const mouseUpHandler = function () {
document.removeEventListener('mousemove', mouseMoveHandler);
document.removeEventListener('mouseup', mouseUpHandler);
fileNavResizer.classList.remove('bg-blue-500');
};
fileNavResizer.addEventListener('mousedown', mouseDownHandler);
}
}
/**
* Event listeners setup
*/
/**
* Set up all event listeners for the application
*/
function setupEventListeners() {
// Add Local Directory button (was id="select-directory" / "refresh-directory")
const selectDirectoryBtn = document.getElementById('addDirectoryBtn');
if (selectDirectoryBtn) {
selectDirectoryBtn.addEventListener('click', openDirectory);
}
// Refresh button (now in header, was in file-nav pane)
const refreshDirectoryBtn = document.getElementById('refreshHeaderBtn');
if (refreshDirectoryBtn) {
refreshDirectoryBtn.addEventListener('click', refreshDirectory);
}
// New file (root) button
const newFileRootBtn = document.getElementById('new-file-root');
if (newFileRootBtn) {
newFileRootBtn.addEventListener('click', () => {
if (directoryHandle) {
createNewFile('');
}
});
}
// Save All button
const saveAllBtn = document.getElementById('save-all');
if (saveAllBtn) {
saveAllBtn.addEventListener('click', saveAllFiles);
}
// Warn when leaving with unsaved changes
window.addEventListener('beforeunload', function (e) {
let hasUnsavedChanges = false;
editorInstances.forEach((instanceData) => {
if (instanceData.isDirty) {
hasUnsavedChanges = true;
}
});
if (hasUnsavedChanges) {
e.preventDefault();
return 'You have unsaved changes. If you leave now, your changes will be lost.';
}
});
}
/**
* Set up TOC depth selector
*/
function setupTocDepthSelector() {
const depthSelector = document.getElementById('toc-depth-selector');
if (!depthSelector) return;
depthSelector.value = tocMaxDepth.toString();
depthSelector.addEventListener('change', function () {
tocMaxDepth = parseInt(this.value, 10);
if (currentFileHandle && currentFileHandle.name.match(/\.(md|markdown)$/i)) {
const filePath = currentFileHandle.name;
const instance = editorInstances.get(filePath);
if (instance && instance.editor && instance.tocContainer) {
const content = instance.editor.getMarkdown();
try {
updateToc(content, instance.tocContainer, instance.editor, tocMaxDepth);
} catch (error) {
console.error('Error updating TOC depth:', error);
}
}
}
});
}
/**
* Application initialization
*/
// Initialize when DOM is loaded
document.addEventListener('DOMContentLoaded', function () {
// Check File System API availability and update UI
initializeApiAvailability();
setupEventListeners();
initializeFileNavResizer();
setupTocDepthSelector();
startFileChangeMonitoring();
// Show scratchpad in file tree on startup
renderFileTree();
// Always start with scratchpad selected and loaded
openScratchpad();
const scratchpadEl = document.querySelector(`.file-item[data-path="${SCRATCHPAD_ID}"]`);
if (scratchpadEl) scratchpadEl.classList.add('active-file');
// In server (HTTP) mode, fetch and render the current directory subtree.
if (location.protocol === 'http:' || location.protocol === 'https:') {
loadServerDirectory().catch((err) => {
if (DEBUG) console.warn('Server directory load failed:', err);
});
}
});
/**
* Initialize UI based on File System API availability
*/
function initializeApiAvailability() {
const selectDirectoryBtn = document.getElementById('addDirectoryBtn');
const welcomeHint = document.getElementById('welcome-hint');
const welcomeFirefox = document.getElementById('welcome-firefox');
if (!hasFileSystemAccess) {
// Disable file system buttons in Firefox and other unsupported browsers
if (selectDirectoryBtn) {
selectDirectoryBtn.disabled = true;
selectDirectoryBtn.title = 'File System API not supported in this browser';
}
// Show Firefox warning, hide normal hint
if (welcomeHint) welcomeHint.classList.add('hidden');
if (welcomeFirefox) welcomeFirefox.classList.remove('hidden');
}
}
/**
* ZDDC shared help panel — open/close logic.
* Works with all four tools regardless of their module pattern.
* Expects: #help-btn, #help-panel, #help-panel-close in the DOM.
*/
(function () {
'use strict';
function init() {
var helpBtn = document.getElementById('help-btn');
var panel = document.getElementById('help-panel');
var closeBtn = document.getElementById('help-panel-close');
if (!helpBtn || !panel) { return; }
function isOpen() { return !panel.hidden; }
function openPanel() {
panel.hidden = false;
document.body.classList.add('help-open');
}
function closePanel() {
panel.hidden = true;
document.body.classList.remove('help-open');
}
helpBtn.addEventListener('click', function () {
if (isOpen()) { closePanel(); } else { openPanel(); }
});
if (closeBtn) {
closeBtn.addEventListener('click', closePanel);
}
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape' && isOpen()) { closePanel(); }
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
}());
</script>
</body>
</html>