diff --git a/app/common.php b/app/common.php index fd9820a..033d665 100644 --- a/app/common.php +++ b/app/common.php @@ -321,5 +321,14 @@ function show_time_ago($timestamp) function list_post_platform() { - return Nav::where('type', 12)->order('sort asc')->cache(30)->select(); + $list = Nav::where('type', 12)->order('sort asc')->cache(30)->select(); + + foreach ($list as $item) { + $desc = $item->desc; + $desc_arr = explode(PHP_EOL, $desc); + $item->home_url = $desc_arr[0] ?? ''; + $item->account = $desc_arr[1] ?? ''; + } + + return $list; } diff --git a/public/static/lib/wangeditor/css/style.css b/public/static/lib/wangeditor/css/style.css new file mode 100644 index 0000000..4e55f23 --- /dev/null +++ b/public/static/lib/wangeditor/css/style.css @@ -0,0 +1,15 @@ +:host,:root{--w-e-textarea-bg-color:#fff;--w-e-textarea-color:#333;--w-e-textarea-border-color:#ccc;--w-e-textarea-slight-border-color:#e8e8e8;--w-e-textarea-slight-color:#d4d4d4;--w-e-textarea-slight-bg-color:#f5f2f0;--w-e-textarea-selected-border-color:#b4d5ff;--w-e-textarea-handler-bg-color:#4290f7;--w-e-toolbar-color:#595959;--w-e-toolbar-bg-color:#fff;--w-e-toolbar-active-color:#333;--w-e-toolbar-active-bg-color:#f1f1f1;--w-e-toolbar-disabled-color:#999;--w-e-toolbar-border-color:#e8e8e8;--w-e-modal-button-bg-color:#fafafa;--w-e-modal-button-border-color:#d9d9d9} +.w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;margin:0;outline:none;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.no-scroll{width:100%}.w-e-text-container .w-e-scroll{height:100%;-webkit-overflow-scrolling:touch}.w-e-text-container [data-slate-editor]{outline:0;white-space:pre-wrap;word-wrap:break-word;border-top:1px solid transparent;min-height:100%;padding:0 10px}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;display:inline!important;max-width:100%;min-height:20px;min-width:20px}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{font-style:italic;left:10px;top:17px;width:90%}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);font-size:14px;padding:0 5px}.w-e-bar svg{height:14px;width:14px;fill:var(--w-e-toolbar-color)}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 5px #0000001f;position:absolute}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);display:inline-flex;height:40px;margin:0 5px;width:1px}.w-e-bar-item{display:flex;height:40px;padding:4px;position:relative;text-align:center}.w-e-bar-item,.w-e-bar-item button{align-items:center;justify-content:center}.w-e-bar-item button{background:transparent;border:none;color:var(--w-e-toolbar-color);cursor:pointer;display:inline-flex;height:32px;overflow:hidden;padding:0 8px;white-space:nowrap}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);border-radius:5px;color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);font-size:.75em;opacity:0;padding:5px 10px;position:absolute;text-align:center;top:40px;transition:opacity .6s;visibility:hidden;white-space:pre;z-index:1}.w-e-menu-tooltip-v5:after{border-color:transparent transparent var(--w-e-toolbar-active-color) transparent;border-style:solid;border-width:5px;content:"";opacity:0;position:absolute;top:30px;transition:opacity .6s;visibility:hidden}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{left:100%;top:10px}.w-e-menu-tooltip-v5.tooltip-right:after{border-color:transparent var(--w-e-toolbar-active-color) transparent transparent;left:100%;margin-left:-10px;top:16px}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;display:none;left:0;margin-top:40px;position:absolute;top:0;z-index:1}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;left:0;margin-top:40px;max-height:350px;min-width:100px;overflow-y:auto;position:absolute;top:0;z-index:1}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;padding:7px 0 7px 25px;position:relative;text-align:left;white-space:nowrap}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{left:0;margin-left:5px;margin-top:-7px;position:absolute;top:50%}.w-e-bar-bottom .w-e-select-list{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;margin-top:40px;min-width:200px;padding:10px;position:absolute;top:0;z-index:1}.w-e-bar-bottom .w-e-drop-panel{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;color:var(--w-e-toolbar-color);font-size:14px;min-height:40px;min-width:100px;padding:20px 15px 0;position:absolute;text-align:left;z-index:1}.w-e-modal .btn-close{cursor:pointer;line-height:1;padding:5px;position:absolute;right:8px;top:7px}.w-e-modal .btn-close svg{height:10px;width:10px;fill:var(--w-e-toolbar-color)}.w-e-modal .babel-container{display:block;margin-bottom:15px}.w-e-modal .babel-container span{display:block;margin-bottom:10px}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);cursor:pointer;font-weight:400;height:32px;padding:4.5px 15px;text-align:center;touch-action:manipulation;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);font-feature-settings:"tnum";font-variant:tabular-nums;padding:4.5px 11px;transition:all .3s;width:100%}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);height:1px;position:absolute;transition:width .3s;width:0}.w-e-full-screen-container{bottom:0!important;display:flex!important;flex-direction:column!important;height:100%!important;left:0!important;margin:0!important;padding:0!important;position:fixed;right:0!important;top:0!important;width:100%!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important} +.w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;margin:0;outline:none;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.no-scroll{width:100%}.w-e-text-container .w-e-scroll{height:100%;-webkit-overflow-scrolling:touch}.w-e-text-container [data-slate-editor]{outline:0;white-space:pre-wrap;word-wrap:break-word;border-top:1px solid transparent;min-height:100%;padding:0 10px}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;display:inline!important;max-width:100%;min-height:20px;min-width:20px}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{font-style:italic;left:10px;top:17px;width:90%}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);font-size:14px;padding:0 5px}.w-e-bar svg{height:14px;width:14px;fill:var(--w-e-toolbar-color)}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 5px #0000001f;position:absolute}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);display:inline-flex;height:40px;margin:0 5px;width:1px}.w-e-bar-item{display:flex;height:40px;padding:4px;position:relative;text-align:center}.w-e-bar-item,.w-e-bar-item button{align-items:center;justify-content:center}.w-e-bar-item button{background:transparent;border:none;color:var(--w-e-toolbar-color);cursor:pointer;display:inline-flex;height:32px;overflow:hidden;padding:0 8px;white-space:nowrap}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);border-radius:5px;color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);font-size:.75em;opacity:0;padding:5px 10px;position:absolute;text-align:center;top:40px;transition:opacity .6s;visibility:hidden;white-space:pre;z-index:1}.w-e-menu-tooltip-v5:after{border-color:transparent transparent var(--w-e-toolbar-active-color) transparent;border-style:solid;border-width:5px;content:"";opacity:0;position:absolute;top:30px;transition:opacity .6s;visibility:hidden}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{left:100%;top:10px}.w-e-menu-tooltip-v5.tooltip-right:after{border-color:transparent var(--w-e-toolbar-active-color) transparent transparent;left:100%;margin-left:-10px;top:16px}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;display:none;left:0;margin-top:40px;position:absolute;top:0;z-index:1}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;left:0;margin-top:40px;max-height:350px;min-width:100px;overflow-y:auto;position:absolute;top:0;z-index:1}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;padding:7px 0 7px 25px;position:relative;text-align:left;white-space:nowrap}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{left:0;margin-left:5px;margin-top:-7px;position:absolute;top:50%}.w-e-bar-bottom .w-e-select-list{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;margin-top:40px;min-width:200px;padding:10px;position:absolute;top:0;z-index:1}.w-e-bar-bottom .w-e-drop-panel{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;color:var(--w-e-toolbar-color);font-size:14px;min-height:40px;min-width:100px;padding:20px 15px 0;position:absolute;text-align:left;z-index:1}.w-e-modal .btn-close{cursor:pointer;line-height:1;padding:5px;position:absolute;right:8px;top:7px}.w-e-modal .btn-close svg{height:10px;width:10px;fill:var(--w-e-toolbar-color)}.w-e-modal .babel-container{display:block;margin-bottom:15px}.w-e-modal .babel-container span{display:block;margin-bottom:10px}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);cursor:pointer;font-weight:400;height:32px;padding:4.5px 15px;text-align:center;touch-action:manipulation;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color);font-feature-settings:"tnum";font-variant:tabular-nums;padding:4.5px 11px;transition:all .3s;width:100%}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);height:1px;position:absolute;transition:width .3s;width:0}.w-e-full-screen-container{bottom:0!important;display:flex!important;flex-direction:column!important;height:100%!important;left:0!important;margin:0!important;padding:0!important;position:fixed;right:0!important;top:0!important;width:100%!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important} +.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;font-family:monospace;padding:3px}.w-e-panel-content-color{list-style:none;text-align:left;width:230px}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);border-radius:3px 3px;cursor:pointer;display:inline-block;padding:2px}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px 3px;height:17px;width:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{line-height:1.5;margin-bottom:5px;width:100%}.w-e-panel-content-color .clear svg{height:16px;margin-bottom:-4px;width:16px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);display:block;font-size:100%;line-height:1.5;margin:10px 0;padding:10px}.w-e-panel-content-emotion{font-size:20px;list-style:none;text-align:left;width:300px}.w-e-panel-content-emotion li{border-radius:3px 3px;cursor:pointer;display:inline-block;padding:0 5px}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;display:block;height:1px}.w-e-text-container [data-slate-editor] pre>code{background-color:var(--w-e-textarea-slight-bg-color);border:1px solid var(--w-e-textarea-slight-border-color);border-radius:4px 4px;display:block;font-size:14px;padding:10px;text-indent:0}.w-e-text-container [data-slate-editor] .w-e-image-container{display:inline-block;margin:0 3px}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{overflow:hidden;position:relative}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);height:7px;position:absolute;width:7px}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;left:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;right:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{bottom:0;cursor:nesw-resize;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{bottom:0;cursor:nwse-resize;right:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover{box-shadow:none}.w-e-text-container [contenteditable=false] .w-e-image-container:hover{box-shadow:none} +.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;font-family:monospace;padding:3px}.w-e-panel-content-color{list-style:none;text-align:left;width:230px}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);border-radius:3px 3px;cursor:pointer;display:inline-block;padding:2px}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px 3px;height:17px;width:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{line-height:1.5;margin-bottom:5px;width:100%}.w-e-panel-content-color .clear svg{height:16px;margin-bottom:-4px;width:16px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);display:block;font-size:100%;line-height:1.5;margin:10px 0;padding:10px}.w-e-panel-content-emotion{font-size:20px;list-style:none;text-align:left;width:300px}.w-e-panel-content-emotion li{border-radius:3px 3px;cursor:pointer;display:inline-block;padding:0 5px}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;display:block;height:1px}.w-e-text-container [data-slate-editor] pre>code{background-color:var(--w-e-textarea-slight-bg-color);border:1px solid var(--w-e-textarea-slight-border-color);border-radius:4px 4px;display:block;font-size:14px;padding:10px;text-indent:0}.w-e-text-container [data-slate-editor] .w-e-image-container{display:inline-block;margin:0 3px}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{overflow:hidden;position:relative}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);height:7px;position:absolute;width:7px}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;left:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;right:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{bottom:0;cursor:nesw-resize;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{bottom:0;cursor:nwse-resize;right:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover{box-shadow:none}.w-e-text-container [contenteditable=false] .w-e-image-container:hover{box-shadow:none} + + +.w-e-text-container [data-slate-editor] .table-container{border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin-top:10px;overflow-x:auto;padding:10px;position:relative;width:100%}.w-e-text-container [data-slate-editor] table{border-collapse:collapse;table-layout:fixed}.w-e-text-container [data-slate-editor] table td,.w-e-text-container [data-slate-editor] table th{border:1px solid var(--w-e-textarea-border-color);line-height:1.5;min-width:30px;overflow:hidden;overflow-wrap:break-word;padding:3px 5px;white-space:pre-wrap;word-break:break-all}.w-e-text-container [data-slate-editor] table th{background-color:var(--w-e-textarea-slight-bg-color);font-weight:700;text-align:center}.w-e-text-container [data-slate-editor] table td.w-e-selected,.w-e-text-container [data-slate-editor] table th.w-e-selected{background-color:rgba(20,86,240,.18)}.w-e-text-container [data-slate-editor] table.table-selection-none ::-moz-selection{background:none}.w-e-text-container [data-slate-editor] table.table-selection-none ::selection{background:none}.w-e-text-container [data-slate-editor] .column-resizer{display:flex;height:0;left:11px;position:absolute;top:10px;width:0;z-index:1}.w-e-text-container [data-slate-editor] .column-resizer .column-resizer-item{position:relative}.w-e-text-container [data-slate-editor] .resizer-line-hotzone{cursor:col-resize;opacity:0;position:absolute;right:-3px;transition:opacity .2s ease,visibility .2s ease;visibility:hidden;width:10px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone .resizer-line{background:rgba(20,86,240,.8);height:100%;margin-left:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:2px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.visible{visibility:visible}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.highlight{opacity:1}.w-e-panel-content-table{background-color:var(--w-e-toolbar-bg-color)}.w-e-panel-content-table table{border-collapse:collapse;table-layout:fixed}.w-e-panel-content-table td,.w-e-panel-content-table th{overflow:hidden;overflow-wrap:break-word;white-space:pre-wrap;word-break:break-all}.w-e-panel-content-table td{border:1px solid var(--w-e-toolbar-border-color);cursor:pointer;height:15px;padding:3px 5px;width:20px}.w-e-panel-content-table td.active{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-modal .babel-container span.babel-container-border{display:flex}.w-e-modal .babel-container span.babel-container-border>*{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container span.babel-container-border select{width:114px}.w-e-modal .babel-container span.babel-container-border>:nth-child(n+2){margin-left:8px}.w-e-modal .babel-container span.babel-container-border input:nth-child(3){width:100px}.w-e-modal .babel-container span.babel-container-background input{width:60px}.w-e-modal .babel-container .color-group,.w-e-modal .babel-container span.babel-container-algin select,.w-e-modal .babel-container span.babel-container-background input{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container .color-group{cursor:pointer;position:relative;width:28px}.w-e-modal .babel-container .color-group .w-e-drop-panel{margin-top:28px}.w-e-modal .babel-container .color-group-block{display:block;height:80%;margin:10%;width:80%}.w-e-modal .babel-container .color-group-block svg{height:20px;margin:1px 0;width:20px} +.w-e-text-container [data-slate-editor] .table-container{border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin-top:10px;overflow-x:auto;padding:10px;position:relative;width:100%}.w-e-text-container [data-slate-editor] table{border-collapse:collapse;table-layout:fixed}.w-e-text-container [data-slate-editor] table td,.w-e-text-container [data-slate-editor] table th{border:1px solid var(--w-e-textarea-border-color);line-height:1.5;min-width:30px;overflow:hidden;overflow-wrap:break-word;padding:3px 5px;white-space:pre-wrap;word-break:break-all}.w-e-text-container [data-slate-editor] table th{background-color:var(--w-e-textarea-slight-bg-color);font-weight:700;text-align:center}.w-e-text-container [data-slate-editor] table td.w-e-selected,.w-e-text-container [data-slate-editor] table th.w-e-selected{background-color:rgba(20,86,240,.18)}.w-e-text-container [data-slate-editor] table.table-selection-none ::-moz-selection{background:none}.w-e-text-container [data-slate-editor] table.table-selection-none ::selection{background:none}.w-e-text-container [data-slate-editor] .column-resizer{display:flex;height:0;left:11px;position:absolute;top:10px;width:0;z-index:1}.w-e-text-container [data-slate-editor] .column-resizer .column-resizer-item{position:relative}.w-e-text-container [data-slate-editor] .resizer-line-hotzone{cursor:col-resize;opacity:0;position:absolute;right:-3px;transition:opacity .2s ease,visibility .2s ease;visibility:hidden;width:10px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone .resizer-line{background:rgba(20,86,240,.8);height:100%;margin-left:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:2px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.visible{visibility:visible}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.highlight{opacity:1}.w-e-panel-content-table{background-color:var(--w-e-toolbar-bg-color)}.w-e-panel-content-table table{border-collapse:collapse;table-layout:fixed}.w-e-panel-content-table td,.w-e-panel-content-table th{overflow:hidden;overflow-wrap:break-word;white-space:pre-wrap;word-break:break-all}.w-e-panel-content-table td{border:1px solid var(--w-e-toolbar-border-color);cursor:pointer;height:15px;padding:3px 5px;width:20px}.w-e-panel-content-table td.active{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-modal .babel-container span.babel-container-border{display:flex}.w-e-modal .babel-container span.babel-container-border>*{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container span.babel-container-border select{width:114px}.w-e-modal .babel-container span.babel-container-border>:nth-child(n+2){margin-left:8px}.w-e-modal .babel-container span.babel-container-border input:nth-child(3){width:100px}.w-e-modal .babel-container span.babel-container-background input{width:60px}.w-e-modal .babel-container .color-group,.w-e-modal .babel-container span.babel-container-algin select,.w-e-modal .babel-container span.babel-container-background input{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container .color-group{cursor:pointer;position:relative;width:28px}.w-e-modal .babel-container .color-group .w-e-drop-panel{margin-top:28px}.w-e-modal .babel-container .color-group-block{display:block;height:80%;margin:10%;width:80%}.w-e-modal .babel-container .color-group-block svg{height:20px;margin:1px 0;width:20px} +.w-e-textarea-video-container{background-image:linear-gradient(45deg,#eee 25%,transparent 0,transparent 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0,#fff 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin:10px auto 0;padding:10px 0;text-align:center} +.w-e-textarea-video-container{background-image:linear-gradient(45deg,#eee 25%,transparent 0,transparent 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0,#fff 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin:10px auto 0;padding:10px 0;text-align:center} + + +.w-e-text-container [data-slate-editor] pre>code{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;-webkit-hyphens:none;hyphens:none;line-height:1.5;margin:.5em 0;overflow:auto;padding:1em;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.w-e-text-container [data-slate-editor] pre>code .token.cdata,.w-e-text-container [data-slate-editor] pre>code .token.comment,.w-e-text-container [data-slate-editor] pre>code .token.doctype,.w-e-text-container [data-slate-editor] pre>code .token.prolog{color:#708090}.w-e-text-container [data-slate-editor] pre>code .token.punctuation{color:#999}.w-e-text-container [data-slate-editor] pre>code .token.namespace{opacity:.7}.w-e-text-container [data-slate-editor] pre>code .token.boolean,.w-e-text-container [data-slate-editor] pre>code .token.constant,.w-e-text-container [data-slate-editor] pre>code .token.deleted,.w-e-text-container [data-slate-editor] pre>code .token.number,.w-e-text-container [data-slate-editor] pre>code .token.property,.w-e-text-container [data-slate-editor] pre>code .token.symbol,.w-e-text-container [data-slate-editor] pre>code .token.tag{color:#905}.w-e-text-container [data-slate-editor] pre>code .token.attr-name,.w-e-text-container [data-slate-editor] pre>code .token.builtin,.w-e-text-container [data-slate-editor] pre>code .token.char,.w-e-text-container [data-slate-editor] pre>code .token.inserted,.w-e-text-container [data-slate-editor] pre>code .token.selector,.w-e-text-container [data-slate-editor] pre>code .token.string{color:#690}.w-e-text-container [data-slate-editor] pre>code .language-css .token.string,.w-e-text-container [data-slate-editor] pre>code .style .token.string,.w-e-text-container [data-slate-editor] pre>code .token.entity,.w-e-text-container [data-slate-editor] pre>code .token.operator,.w-e-text-container [data-slate-editor] pre>code .token.url{color:#9a6e3a}.w-e-text-container [data-slate-editor] pre>code .token.atrule,.w-e-text-container [data-slate-editor] pre>code .token.attr-value,.w-e-text-container [data-slate-editor] pre>code .token.keyword{color:#07a}.w-e-text-container [data-slate-editor] pre>code .token.class-name,.w-e-text-container [data-slate-editor] pre>code .token.function{color:#dd4a68}.w-e-text-container [data-slate-editor] pre>code .token.important,.w-e-text-container [data-slate-editor] pre>code .token.regex,.w-e-text-container [data-slate-editor] pre>code .token.variable{color:#e90}.w-e-text-container [data-slate-editor] pre>code .token.bold,.w-e-text-container [data-slate-editor] pre>code .token.important{font-weight:700}.w-e-text-container [data-slate-editor] pre>code .token.italic{font-style:italic}.w-e-text-container [data-slate-editor] pre>code .token.entity{cursor:help} +.w-e-text-container [data-slate-editor] pre>code{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;-webkit-hyphens:none;hyphens:none;line-height:1.5;margin:.5em 0;overflow:auto;padding:1em;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.w-e-text-container [data-slate-editor] pre>code .token.cdata,.w-e-text-container [data-slate-editor] pre>code .token.comment,.w-e-text-container [data-slate-editor] pre>code .token.doctype,.w-e-text-container [data-slate-editor] pre>code .token.prolog{color:#708090}.w-e-text-container [data-slate-editor] pre>code .token.punctuation{color:#999}.w-e-text-container [data-slate-editor] pre>code .token.namespace{opacity:.7}.w-e-text-container [data-slate-editor] pre>code .token.boolean,.w-e-text-container [data-slate-editor] pre>code .token.constant,.w-e-text-container [data-slate-editor] pre>code .token.deleted,.w-e-text-container [data-slate-editor] pre>code .token.number,.w-e-text-container [data-slate-editor] pre>code .token.property,.w-e-text-container [data-slate-editor] pre>code .token.symbol,.w-e-text-container [data-slate-editor] pre>code .token.tag{color:#905}.w-e-text-container [data-slate-editor] pre>code .token.attr-name,.w-e-text-container [data-slate-editor] pre>code .token.builtin,.w-e-text-container [data-slate-editor] pre>code .token.char,.w-e-text-container [data-slate-editor] pre>code .token.inserted,.w-e-text-container [data-slate-editor] pre>code .token.selector,.w-e-text-container [data-slate-editor] pre>code .token.string{color:#690}.w-e-text-container [data-slate-editor] pre>code .language-css .token.string,.w-e-text-container [data-slate-editor] pre>code .style .token.string,.w-e-text-container [data-slate-editor] pre>code .token.entity,.w-e-text-container [data-slate-editor] pre>code .token.operator,.w-e-text-container [data-slate-editor] pre>code .token.url{color:#9a6e3a}.w-e-text-container [data-slate-editor] pre>code .token.atrule,.w-e-text-container [data-slate-editor] pre>code .token.attr-value,.w-e-text-container [data-slate-editor] pre>code .token.keyword{color:#07a}.w-e-text-container [data-slate-editor] pre>code .token.class-name,.w-e-text-container [data-slate-editor] pre>code .token.function{color:#dd4a68}.w-e-text-container [data-slate-editor] pre>code .token.important,.w-e-text-container [data-slate-editor] pre>code .token.regex,.w-e-text-container [data-slate-editor] pre>code .token.variable{color:#e90}.w-e-text-container [data-slate-editor] pre>code .token.bold,.w-e-text-container [data-slate-editor] pre>code .token.important{font-weight:700}.w-e-text-container [data-slate-editor] pre>code .token.italic{font-style:italic}.w-e-text-container [data-slate-editor] pre>code .token.entity{cursor:help} \ No newline at end of file diff --git a/public/static/lib/wangeditor/index.js b/public/static/lib/wangeditor/index.js new file mode 100644 index 0000000..366af26 --- /dev/null +++ b/public/static/lib/wangeditor/index.js @@ -0,0 +1,28 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wangEditor={})}(this,(function(e){"use strict";var t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}function D(){return n?t:(n=1,t=function(e){try{return!!e()}catch(e){return!0}})}function w(){if(o)return r;o=1;var e=D();return r=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function A(){if(a)return i;a=1;var e=w(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return i=e?r:function(e){return function(){return n.apply(e,arguments)}},i}function S(){if(u)return s;u=1;var e=A(),t=e({}.toString),n=e("".slice);return s=function(e){return n(t(e),8,-1)}}function x(){if(c)return l;c=1;var e=A(),t=D(),n=S(),r=Object,o=e("".split);return l=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function O(){return f?d:(f=1,d=function(e){return null==e})}function T(){if(h)return p;h=1;var e=O(),t=TypeError;return p=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(v)return g;v=1;var e=x(),t=T();return g=function(n){return e(t(n))}}function B(){if(y)return m;y=1;var e=function(e){return e&&e.Math===Math&&e};return m=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof m&&m)||function(){return this}()||Function("return this")()}var k,F,P,I,R,L,_,M,j,H,z,$,U,V,G,W,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie,ae={exports:{}};function se(){return F?k:(F=1,k=!1)}function ue(){if(I)return P;I=1;var e=B(),t=Object.defineProperty;return P=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function le(){if(R)return ae.exports;R=1;var e=se(),t=B(),n=ue(),r="__core-js_shared__",o=ae.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),ae.exports}function ce(){if(_)return L;_=1;var e=le();return L=function(t,n){return e[t]||(e[t]=n||{})}}function de(){if(j)return M;j=1;var e=T(),t=Object;return M=function(n){return t(e(n))}}function fe(){if(z)return H;z=1;var e=A(),t=de(),n=e({}.hasOwnProperty);return H=Object.hasOwn||function(e,r){return n(t(e),r)}}function pe(){if(U)return $;U=1;var e=A(),t=0,n=Math.random(),r=e(1..toString);return $=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function he(){if(q)return W;q=1;var e,t,n=B(),r=function(){if(G)return V;G=1;var e=B().navigator,t=e&&e.userAgent;return V=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),W=t}function ge(){if(Y)return K;Y=1;var e=he(),t=D(),n=B().String;return K=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})),K}function ve(){if(Z)return X;Z=1;var e=ge();return X=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function me(){if(Q)return J;Q=1;var e=B(),t=ce(),n=fe(),r=pe(),o=ge(),i=ve(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return J=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function ye(){if(te)return ee;te=1;var e="object"==typeof document&&document.all;return ee=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function be(){if(re)return ne;re=1;var e=ye();return ne=function(t){return"object"==typeof t?null!==t:e(t)}}function Ee(){if(ie)return oe;ie=1;var e=be(),t=String,n=TypeError;return oe=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ce,De,we,Ae,Se={};function xe(){if(De)return Ce;De=1;var e=D();return Ce=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Oe(){if(Ae)return we;Ae=1;var e=xe(),t=D();return we=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}var Te,Ne,Be,ke,Fe,Pe,Ie,Re,Le,_e,Me,je,He,ze,$e,Ue,Ve,Ge,We,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,Ct,Dt,wt,At,St,xt,Ot,Tt,Nt,Bt,kt,Ft,Pt,It,Rt,Lt,_t,Mt={};function jt(){if(Ne)return Te;Ne=1;var e=B(),t=be(),n=e.document,r=t(n)&&t(n.createElement);return Te=function(e){return r?n.createElement(e):{}}}function Ht(){if(ke)return Be;ke=1;var e=xe(),t=D(),n=jt();return Be=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function zt(){if(Pe)return Fe;Pe=1;var e=w(),t=Function.prototype.call;return Fe=e?t.bind(t):function(){return t.apply(t,arguments)},Fe}function $t(){if(Re)return Ie;Re=1;var e=B(),t=ye();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function Ut(){if(_e)return Le;_e=1;var e=A();return Le=e({}.isPrototypeOf)}function Vt(){if(je)return Me;je=1;var e=$t(),t=ye(),n=Ut(),r=ve(),o=Object;return Me=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Gt(){if(ze)return He;ze=1;var e=String;return He=function(t){try{return e(t)}catch(e){return"Object"}}}function Wt(){if(Ue)return $e;Ue=1;var e=ye(),t=Gt(),n=TypeError;return $e=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qt(){if(Ge)return Ve;Ge=1;var e=Wt(),t=O();return Ve=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ve}function Kt(){if(Ye)return Ke;Ye=1;var e=zt(),t=be(),n=Vt(),r=qt(),o=function(){if(qe)return We;qe=1;var e=zt(),t=ye(),n=be(),r=TypeError;return We=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},We}(),i=me(),a=TypeError,s=i("toPrimitive");return Ke=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Yt(){if(Ze)return Xe;Ze=1;var e=Kt(),t=Vt();return Xe=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Xt(){if(Je)return Mt;Je=1;var e=xe(),t=Ht(),n=Oe(),r=Ee(),o=Yt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Mt.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Mt}function Zt(){if(nt)return tt;nt=1;var e=function(){if(et)return Qe;et=1;var e=Math.ceil,t=Math.floor;return Qe=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Qe}();return tt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Jt(){if(at)return it;at=1;var e=Zt(),t=Math.min;return it=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Qt(){if(ut)return st;ut=1;var e=Jt();return st=function(t){return e(t.length)}}function en(){if(ct)return lt;ct=1;var e=N(),t=function(){if(ot)return rt;ot=1;var e=Zt(),t=Math.max,n=Math.min;return rt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},rt}(),n=Qt(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return lt={includes:r(!0),indexOf:r(!1)}}function tn(){return ft?dt:(ft=1,dt={})}function nn(){if(ht)return pt;ht=1;var e=A(),t=fe(),n=N(),r=en().indexOf,o=tn(),i=e([].push);return pt=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},pt}function rn(){return vt?gt:(vt=1,gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function on(){if(bt)return Se;bt=1;var e=xe(),t=Oe(),n=Xt(),r=Ee(),o=N(),i=function(){if(yt)return mt;yt=1;var e=nn(),t=rn();return mt=Object.keys||function(n){return e(n,t)},mt}();return Se.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Se}function an(){if(wt)return Dt;wt=1;var e=ce(),t=pe(),n=e("keys");return Dt=function(e){return n[e]||(n[e]=t(e))}}function sn(){if(St)return At;St=1;var e,t=Ee(),n=on(),r=rn(),o=tn(),i=function(){if(Ct)return Et;Ct=1;var e=$t();return Et=e("document","documentElement")}(),a=jt(),s=an(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+""},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,At=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},At}function un(){return Nt?Tt:(Nt=1,Tt={})}function ln(){return Pt?Ft:(Pt=1,Ft=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function cn(){if(Rt)return It;Rt=1;var e=xe(),t=Xt(),n=ln();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function dn(){if(_t)return Lt;_t=1;var e,t,n,r=function(){if(kt)return Bt;kt=1;var e=B(),t=ye(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=be(),a=cn(),s=fe(),u=le(),l=an(),c=tn(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Lt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var fn,pn,hn={},gn={};function vn(){if(pn)return hn;pn=1;var e=xe(),t=zt(),n=function(){if(fn)return gn;fn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return gn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,gn}(),r=ln(),o=N(),i=Yt(),a=fe(),s=Ht(),u=Object.getOwnPropertyDescriptor;return hn.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},hn}var mn,yn,bn,En,Cn,Dn,wn,An={exports:{}};function Sn(){if(yn)return mn;yn=1;var e=xe(),t=fe(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return mn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function xn(){if(En)return bn;En=1;var e=A(),t=ye(),n=le(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),bn=n.inspectSource}function On(){if(Cn)return An.exports;Cn=1;var e=A(),t=D(),n=ye(),r=fe(),o=xe(),i=Sn().CONFIGURABLE,a=xn(),s=dn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),v=String(String).split("String"),m=An.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m((function(){return n(this)&&l(this).source||a(this)}),"toString"),An.exports}function Tn(){if(wn)return Dn;wn=1;var e=ye(),t=Xt(),n=On(),r=ue();return Dn=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},Dn}var Nn,Bn={};var kn,Fn,Pn,In,Rn,Ln,_n,Mn,jn,Hn,zn,$n,Un,Vn,Gn,Wn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr,cr={};function dr(){if(Pn)return Fn;Pn=1;var e=$t(),t=A(),n=function(){if(Nn)return Bn;Nn=1;var e=nn(),t=rn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(kn||(kn=1,cr.f=Object.getOwnPropertySymbols),cr),o=Ee(),i=t([].concat);return Fn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},Fn}function fr(){if(Rn)return In;Rn=1;var e=fe(),t=dr(),n=vn(),r=Xt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return ur}Cr();var Dr,wr,Ar,Sr,xr,Or,Tr,Nr={};function Br(){if(wr)return Dr;wr=1;var e={};return e[me()("toStringTag")]="z",Dr="[object z]"===String(e)}function kr(){if(Sr)return Ar;Sr=1;var e=Br(),t=ye(),n=S(),r=me()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Ar=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},Ar}!function(){if(Tr)return Nr;Tr=1;var e=Br(),t=Tn(),n=function(){if(Or)return xr;Or=1;var e=Br(),t=kr();return xr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var Fr,Pr,Ir,Rr,Lr,_r,Mr,jr,Hr,zr,$r,Ur,Vr,Gr={};function Wr(){if(Pr)return Fr;Pr=1;var e=kr(),t=String;return Fr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function qr(){if(Rr)return Ir;Rr=1;var e=Ee();return Ir=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function Kr(){if(Ur)return $r;Ur=1;var e,t,n=zt(),r=A(),o=Wr(),i=qr(),a=function(){if(_r)return Lr;_r=1;var e=D(),t=B().RegExp,n=e((function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),r=n||e((function(){return!t("a","y").sticky})),o=n||e((function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));return Lr={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=ce(),u=sn(),l=dn().get,c=function(){if(jr)return Mr;jr=1;var e=D(),t=B().RegExp;return Mr=e((function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))}(),d=function(){if(zr)return Hr;zr=1;var e=D(),t=B().RegExp;return Hr=e((function(){var e=t("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];return(b||C||E||c||d)&&(h=function(e){var t,r,a,s,c,d,D,w=this,A=l(w),S=o(e),x=A.raw;if(x)return x.lastIndex=w.lastIndex,t=n(h,x,S),w.lastIndex=x.lastIndex,t;var O=A.groups,T=E&&w.sticky,N=n(i,w),B=w.source,k=0,F=S;if(T&&(N=m(N,"y",""),-1===v(N,"g")&&(N+="g"),F=y(S,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&"\n"!==g(S,w.lastIndex-1))&&(B="(?: "+B+")",F=" "+F,k++),r=new RegExp("^(?:"+B+")",N)),C&&(r=new RegExp("^"+B+"$(?!\\s)",N)),b&&(a=w.lastIndex),s=n(p,T?r:w,F),T?s?(s.input=y(s.input,k),s[0]=y(s[0],k),s.index=w.lastIndex,w.lastIndex+=s[0].length):w.lastIndex=0:b&&s&&(w.lastIndex=w.global?s.index+s[0].length:a),C&&s&&s.length>1&&n(f,s[0],r,(function(){for(c=1;c=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Xr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Jr)return Qr;Jr=1;var e=eo().charAt,t=Wr(),n=dn(),r=br(),o=Er(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))}))}();var to,no,ro,oo,io,ao,so,uo={};function lo(){if(oo)return ro;oo=1;var e=eo().charAt;return ro=function(t,n,r){return n+(r?e(t,n).length:1)},ro}!function(){if(so)return uo;so=1;var e=zt(),t=function(){if(no)return to;no=1,Yr();var e=zt(),t=Tn(),n=Kr(),r=D(),o=me(),i=cn(),a=o("species"),s=RegExp.prototype;return to=function(u,l,c,d){var f=o(u),p=!r((function(){var e={};return e[f]=function(){return 7},7!==""[u](e)})),h=p&&!r((function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[f]=/./[f]),t.exec=function(){return e=!0,null},t[f](""),!e}));if(!p||!h||c){var g=/./[f],v=l(f,""[u],(function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}}));t(String.prototype,u,v[0]),t(s,f,v[1])}d&&i(s[f],"sham",!0)},to}(),n=Ee(),r=O(),o=Jt(),i=Wr(),a=T(),s=qt(),u=lo(),l=function(){if(ao)return io;ao=1;var e=zt(),t=Ee(),n=ye(),r=S(),o=Kr(),i=TypeError;return io=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},io}();t("match",(function(t,c,d){return[function(n){var o=a(this),u=r(n)?void 0:s(n,t);return u?e(u,n,o):new RegExp(n)[t](i(o))},function(e){var t=n(this),r=i(e),a=d(c,t,r);if(a.done)return a.value;if(!t.global)return l(t,r);var s=t.unicode;t.lastIndex=0;for(var f,p=[],h=0;null!==(f=l(t,r));){var g=i(f[0]);p[h]=g,""===g&&(t.lastIndex=u(r,o(t.lastIndex),s)),h++}return 0===h?null:p}]}))}();var co,fo,po,ho,go,vo,mo,yo,bo,Eo,Co,Do,wo,Ao,So,xo,Oo,To,No,Bo,ko,Fo,Po,Io,Ro,Lo,_o,Mo={},jo={};function Ho(){if(fo)return co;fo=1;var e=be(),t=cn();return co=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},co}function zo(){if(yo)return mo;yo=1;var e=cn(),t=function(){if(ho)return po;ho=1;var e=A(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return po=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(vo)return go;vo=1;var e=D(),t=ln();return go=!e((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)}))}(),r=Error.captureStackTrace;return mo=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},mo}function $o(){if(Do)return Co;Do=1;var e=function(){if(Eo)return bo;Eo=1;var e=S(),t=A();return bo=function(n){if("Function"===e(n))return t(n)}}(),t=Wt(),n=w(),r=e(e.bind);return Co=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Co}function Uo(){if(Ao)return wo;Ao=1;var e=me(),t=un(),n=e("iterator"),r=Array.prototype;return wo=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Vo(){if(xo)return So;xo=1;var e=kr(),t=qt(),n=O(),r=un(),o=me()("iterator");return So=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Go(){if(To)return Oo;To=1;var e=zt(),t=Wt(),n=Ee(),r=Gt(),o=Vo(),i=TypeError;return Oo=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},Oo}function Wo(){if(Bo)return No;Bo=1;var e=zt(),t=Ee(),n=qt();return No=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},No}function qo(){if(Fo)return ko;Fo=1;var e=$o(),t=zt(),n=Ee(),r=Gt(),o=Uo(),i=Qt(),a=Ut(),s=Go(),u=Vo(),l=Wo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return ko=function(p,h,g){var v,m,y,b,E,C,D,w=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),x=!(!g||!g.IS_ITERATOR),O=!(!g||!g.INTERRUPTED),T=e(h,w),N=function(e){return v&&l(v,"normal",e),new d(!0,e)},B=function(e){return A?(n(e),O?T(e[0],e[1],N):T(e[0],e[1])):O?T(e,N):T(e)};if(S)v=p.iterator;else if(x)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=B(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(C=S?p.next:v.next;!(D=t(C,v)).done;){try{E=B(D.value)}catch(e){l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},ko}function Ko(){if(Io)return Po;Io=1;var e=Wr();return Po=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Po}function Yo(){return Lo||(Lo=1,function(){if(Ro)return jo;Ro=1;var e=pr(),t=Ut(),n=hr(),r=yr(),o=fr(),i=sn(),a=cn(),s=ln(),u=Ho(),l=zo(),c=qo(),d=Ko(),f=me()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),Mo}_o||(_o=1,Yo());var Xo,Zo,Jo={};Zo||(Zo=1,function(){if(Xo)return Jo;Xo=1;var e=pr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var Qo,ei,ti,ni,ri,oi,ii={};function ai(){return ei?Qo:(ei=1,Qo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function si(){if(ni)return ti;ni=1;var e=jt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ti=t===Object.prototype?void 0:t}if(function(){if(ri)return ii;ri=1;var e=B(),t=ai(),n=si(),r=Cr(),o=cn(),i=vr(),a=me()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}ui(),li()}else global&&(null===(oi=global.navigator)||void 0===oi?void 0:oi.userAgent.match("QQBrowser"))&&(ui(),li());function ui(){"undefined"==typeof globalThis&&(window.globalThis=window)}function li(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var ci,di,fi,pi,hi,gi,vi,mi,yi,bi,Ei,Ci,Di,wi,Ai,Si,xi={};function Oi(){if(di)return ci;di=1;var e=function(e){return e&&e.Math===Math&&e};return ci=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof ci&&ci)||function(){return this}()||Function("return this")()}function Ti(){return pi?fi:(pi=1,fi=function(e){try{return!!e()}catch(e){return!0}})}function Ni(){return gi?hi:(gi=1,hi=!Ti()((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})))}function Bi(){if(mi)return vi;mi=1;var e=Ni(),t=Function.prototype,n=t.apply,r=t.call;return vi="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),vi}function ki(){if(bi)return yi;bi=1;var e=Ni(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return yi=e?r:function(e){return function(){return n.apply(e,arguments)}},yi}function Fi(){if(Ci)return Ei;Ci=1;var e=ki(),t=e({}.toString),n=e("".slice);return Ei=function(e){return n(t(e),8,-1)}}function Pi(){if(wi)return Di;wi=1;var e=Fi(),t=ki();return Di=function(n){if("Function"===e(n))return t(n)}}function Ii(){if(Si)return Ai;Si=1;var e="object"==typeof document&&document.all;return Ai=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var Ri,Li,_i,Mi,ji={};function Hi(){return Li?Ri:(Li=1,Ri=!Ti()((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})))}function zi(){if(Mi)return _i;Mi=1;var e=Ni(),t=Function.prototype.call;return _i=e?t.bind(t):function(){return t.apply(t,arguments)},_i}var $i,Ui,Vi,Gi,Wi,qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,Ca,Da,wa,Aa,Sa={};function xa(){if($i)return Sa;$i=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Sa.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Sa}function Oa(){return Vi?Ui:(Vi=1,Ui=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Ta(){if(Wi)return Gi;Wi=1;var e=ki(),t=Ti(),n=Fi(),r=Object,o=e("".split);return Gi=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Na(){return Ki?qi:(Ki=1,qi=function(e){return null==e})}function Ba(){if(Xi)return Yi;Xi=1;var e=Na(),t=TypeError;return Yi=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function ka(){if(Ji)return Zi;Ji=1;var e=Ta(),t=Ba();return Zi=function(n){return e(t(n))}}function Fa(){if(ea)return Qi;ea=1;var e=Ii();return Qi=function(t){return"object"==typeof t?null!==t:e(t)}}function Pa(){return na?ta:(na=1,ta={})}function Ia(){if(oa)return ra;oa=1;var e=Pa(),t=Oi(),n=Ii(),r=function(e){return n(e)?e:void 0};return ra=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},ra}function Ra(){return aa?ia:(aa=1,ia=ki()({}.isPrototypeOf))}function La(){if(ua)return sa;ua=1;var e=Oi().navigator,t=e&&e.userAgent;return sa=t?String(t):""}function _a(){if(ca)return la;ca=1;var e,t,n=Oi(),r=La(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),la=t}function Ma(){if(fa)return da;fa=1;var e=_a(),t=Ti(),n=Oi().String;return da=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})),da}function ja(){return ha?pa:(ha=1,pa=Ma()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Ha(){if(va)return ga;va=1;var e=Ia(),t=Ii(),n=Ra(),r=Object;return ga=ja()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function za(){if(ya)return ma;ya=1;var e=String;return ma=function(t){try{return e(t)}catch(e){return"Object"}}}function $a(){if(Ea)return ba;Ea=1;var e=Ii(),t=za(),n=TypeError;return ba=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Ua(){if(Da)return Ca;Da=1;var e=$a(),t=Na();return Ca=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ca}function Va(){if(Aa)return wa;Aa=1;var e=zi(),t=Ii(),n=Fa(),r=TypeError;return wa=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},wa}var Ga,Wa,qa,Ka,Ya,Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys,bs={exports:{}};function Es(){return Wa?Ga:(Wa=1,Ga=!0)}function Cs(){if(Ka)return qa;Ka=1;var e=Oi(),t=Object.defineProperty;return qa=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ds(){if(Ya)return bs.exports;Ya=1;var e=Es(),t=Oi(),n=Cs(),r="__core-js_shared__",o=bs.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),bs.exports}function ws(){if(Za)return Xa;Za=1;var e=Ds();return Xa=function(t,n){return e[t]||(e[t]=n||{})}}function As(){if(Qa)return Ja;Qa=1;var e=Ba(),t=Object;return Ja=function(n){return t(e(n))}}function Ss(){if(ts)return es;ts=1;var e=ki(),t=As(),n=e({}.hasOwnProperty);return es=Object.hasOwn||function(e,r){return n(t(e),r)}}function xs(){if(rs)return ns;rs=1;var e=ki(),t=0,n=Math.random(),r=e(1..toString);return ns=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function Os(){if(is)return os;is=1;var e=Oi(),t=ws(),n=Ss(),r=xs(),o=Ma(),i=ja(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return os=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Ts(){if(ss)return as;ss=1;var e=zi(),t=Fa(),n=Ha(),r=Ua(),o=Va(),i=TypeError,a=Os()("toPrimitive");return as=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Ns(){if(ls)return us;ls=1;var e=Ts(),t=Ha();return us=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Bs(){if(ds)return cs;ds=1;var e=Oi(),t=Fa(),n=e.document,r=t(n)&&t(n.createElement);return cs=function(e){return r?n.createElement(e):{}}}function ks(){if(ps)return fs;ps=1;var e=Hi(),t=Ti(),n=Bs();return fs=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function Fs(){if(hs)return ji;hs=1;var e=Hi(),t=zi(),n=xa(),r=Oa(),o=ka(),i=Ns(),a=Ss(),s=ks(),u=Object.getOwnPropertyDescriptor;return ji.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},ji}function Ps(){if(vs)return gs;vs=1;var e=Ti(),t=Ii(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return gs=r}function Is(){if(ys)return ms;ys=1;var e=Pi(),t=$a(),n=Ni(),r=e(e.bind);return ms=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},ms}var Rs,Ls,_s,Ms,js,Hs,zs,$s,Us,Vs,Gs,Ws,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu,bu={};function Eu(){return Ls?Rs:(Ls=1,Rs=Hi()&&Ti()((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})))}function Cu(){if(Ms)return _s;Ms=1;var e=Fa(),t=String,n=TypeError;return _s=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Du(){if(js)return bu;js=1;var e=Hi(),t=ks(),n=Eu(),r=Cu(),o=Ns(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return bu.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},bu}function wu(){if(zs)return Hs;zs=1;var e=Hi(),t=Du(),n=Oa();return Hs=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Au(){if(Us)return $s;Us=1;var e=Oi(),t=Bi(),n=Pi(),r=Ii(),o=Fs().f,i=Ps(),a=Pa(),s=Is(),u=wu(),l=Ss(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return $s=function(t,d){var f,p,h,g,v,m,y,b,E,C=t.target,D=t.global,w=t.stat,A=t.proto,S=D?e:w?e[C]:e[C]&&e[C].prototype,x=D?a:a[C]||u(a,C,{})[C],O=x.prototype;for(g in d)p=!(f=i(D?g:C+(w?".":"#")+g,t.forced))&&S&&l(S,g),m=x[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:d[g],(f||A||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(x,g,b),A&&(l(a,h=C+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&O&&(f||!O[g])&&u(O,g,v)))}}function Su(){if(Gs)return Vs;Gs=1;var e=Fi();return Vs=Array.isArray||function(t){return"Array"===e(t)}}function xu(){if(qs)return Ws;qs=1;var e=Math.ceil,t=Math.floor;return Ws=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Ws}function Ou(){if(Ys)return Ks;Ys=1;var e=xu();return Ks=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Tu(){if(Zs)return Xs;Zs=1;var e=Ou(),t=Math.min;return Xs=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Nu(){if(Qs)return Js;Qs=1;var e=Tu();return Js=function(t){return e(t.length)}}function Bu(){if(tu)return eu;tu=1;var e=TypeError;return eu=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function ku(){if(ru)return nu;ru=1;var e=Hi(),t=Du(),n=Oa();return nu=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function Fu(){if(iu)return ou;iu=1;var e={};return e[Os()("toStringTag")]="z",ou="[object z]"===String(e)}function Pu(){if(su)return au;su=1;var e=Fu(),t=Ii(),n=Fi(),r=Os()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return au=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},au}function Iu(){if(lu)return uu;lu=1;var e=ki(),t=Ii(),n=Ds(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),uu=n.inspectSource}function Ru(){if(du)return cu;du=1;var e=ki(),t=Ti(),n=Ii(),r=Pu(),o=Ia(),i=Iu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,cu=!s||t((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?f:d}function Lu(){if(pu)return fu;pu=1;var e=Su(),t=Ru(),n=Fa(),r=Os()("species"),o=Array;return fu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},fu}function _u(){if(gu)return hu;gu=1;var e=Lu();return hu=function(t,n){return new(e(t))(0===n?0:n)}}function Mu(){if(mu)return vu;mu=1;var e=Ti(),t=Os(),n=_a(),r=t("species");return vu=function(t){return n>=51||!e((function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},vu}var ju,Hu,zu={},$u={};function Uu(){if(Hu)return ju;Hu=1;var e=Pu(),t=String;return ju=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Vu,Gu,Wu,qu,Ku,Yu,Xu,Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul,ll={};function cl(){if(Gu)return Vu;Gu=1;var e=Ou(),t=Math.max,n=Math.min;return Vu=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Vu}function dl(){if(qu)return Wu;qu=1;var e=ka(),t=cl(),n=Nu(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Wu={includes:r(!0),indexOf:r(!1)}}function fl(){return Yu?Ku:(Yu=1,Ku={})}function pl(){if(Zu)return Xu;Zu=1;var e=ki(),t=Ss(),n=ka(),r=dl().indexOf,o=fl(),i=e([].push);return Xu=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},Xu}function hl(){return Qu?Ju:(Qu=1,Ju=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function gl(){if(tl)return el;tl=1;var e=pl(),t=hl();return el=Object.keys||function(n){return e(n,t)},el}function vl(){if(nl)return ll;nl=1;var e=Hi(),t=Eu(),n=Du(),r=Cu(),o=ka(),i=gl();return ll.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},ll}function ml(){return ol?rl:(ol=1,rl=Ia()("document","documentElement"))}function yl(){if(al)return il;al=1;var e=ws(),t=xs(),n=e("keys");return il=function(e){return n[e]||(n[e]=t(e))}}function bl(){if(ul)return sl;ul=1;var e,t=Cu(),n=vl(),r=hl(),o=fl(),i=ml(),a=Bs(),s="prototype",u="script",l=yl()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+""},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?f(e):(n=a("iframe"),o="java"+u+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,sl=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},sl}var El,Cl={};function Dl(){if(El)return Cl;El=1;var e=pl(),t=hl().concat("length","prototype");return Cl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Cl}var wl,Al,Sl,xl={};function Ol(){return Al?wl:(Al=1,wl=ki()([].slice))}function Tl(){if(Sl)return xl;Sl=1;var e=Fi(),t=ka(),n=Dl().f,r=Ol(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return xl.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},xl}var Nl,Bl,kl,Fl,Pl,Il={};function Rl(){return Nl||(Nl=1,Il.f=Object.getOwnPropertySymbols),Il}function Ll(){if(kl)return Bl;kl=1;var e=wu();return Bl=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function _l(){if(Pl)return Fl;Pl=1;var e=Du();return Fl=function(t,n,r){return e.f(t,n,r)}}var Ml,jl,Hl,zl,$l,Ul,Vl,Gl,Wl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec={};function tc(){if(Ml)return ec;Ml=1;var e=Os();return ec.f=e,ec}function nc(){if(Hl)return jl;Hl=1;var e=Pa(),t=Ss(),n=tc(),r=Du().f;return jl=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function rc(){if($l)return zl;$l=1;var e=zi(),t=Ia(),n=Os(),r=Ll();return zl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,(function(t){return e(a,this)}),{arity:1})}}function oc(){if(Vl)return Ul;Vl=1;var e=Fu(),t=Pu();return Ul=e?{}.toString:function(){return"[object "+t(this)+"]"}}function ic(){if(Wl)return Gl;Wl=1;var e=Fu(),t=Du().f,n=wu(),r=Ss(),o=oc(),i=Os()("toStringTag");return Gl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function ac(){if(Kl)return ql;Kl=1;var e=Oi(),t=Ii(),n=e.WeakMap;return ql=t(n)&&/native code/.test(String(n))}function sc(){if(Xl)return Yl;Xl=1;var e,t,n,r=ac(),o=Oi(),i=Fa(),a=wu(),s=Ss(),u=Ds(),l=yl(),c=fl(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Yl={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}function uc(){if(Jl)return Zl;Jl=1;var e=Is(),t=ki(),n=Ta(),r=As(),o=Nu(),i=_u(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return Zl={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}var lc,cc,dc,fc={};function pc(){return cc?lc:(cc=1,lc=Ma()&&!!Symbol.for&&!!Symbol.keyFor)}var hc,gc={};var vc,mc,yc,bc={};function Ec(){if(mc)return vc;mc=1;var e=ki(),t=Su(),n=Ii(),r=Fi(),o=Uu(),i=e([].push);return vc=function(e){if(n(e))return e;if(t(e)){for(var a=e.length,s=[],u=0;u=51||!t((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),h=function(e){if(!r(e))return!1;var t=e[f];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(e){var t,n,r,l,c,d=o(this),f=u(d,0),p=0;for(t=-1,r=arguments.length;t=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return bd}function zd(){return Dd?Cd:(Dd=1,Cd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function $d(){if(wd)return xd;wd=1,Hd();var e=zd(),t=Oi(),n=ic(),r=Td();for(var o in e)n(t[o],o),r[o]=r.Array;return xd}function Ud(){if(Sd)return Ad;Sd=1;var e=Wc();return $d(),Ad=e}var Vd,Gd={};var Wd;var qd;var Kd,Yd,Xd;function Zd(){if(Xd)return Yd;Xd=1;var e=Ud();return function(){if(Vd)return Gd;Vd=1;var e=Os(),t=Du().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),Wd||(Wd=1,nc()("asyncDispose")),qd||(qd=1,nc()("dispose")),Kd||(Kd=1,nc()("metadata")),Yd=e}var Jd,Qd,ef;function tf(){if(Qd)return Jd;Qd=1;var e=Ia(),t=ki(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return Jd=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var nf,rf,of;function af(){if(rf)return nf;rf=1;for(var e=ws(),t=Ia(),n=ki(),r=Ha(),o=Os(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Cf={codeAt:s(!1),charAt:s(!0)}}function _f(){return Sf?Af:(Sf=1,Hd(),function(){if(wf)return Rf;wf=1;var e=Lf().charAt,t=Uu(),n=sc(),r=Md(),o=jd(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))}))}(),Bc(),Af=tc().f("iterator"))}function Mf(){if(Of)return xf;Of=1;var e=_f();return $d(),xf=e}function jf(){return Nf?Tf:(Nf=1,Tf=Mf())}function Hf(){return kf?Bf:(kf=1,Bf=jf())}function zf(){return Pf?Ff:(Pf=1,Ff=Hf())}var $f=E(zf());function Uf(e){return Uf="function"==typeof If&&"symbol"==typeof $f?function(e){return typeof e}:function(e){return e&&"function"==typeof If&&e.constructor===If&&e!==If.prototype?"symbol":typeof e},Uf(e)}var Vf,Gf={};if(function(){if(Vf)return Gf;Vf=1;var e=pr(),t=D(),n=N(),r=vn().f,o=xe();e({target:"Object",stat:!0,forced:!o||t((function(){r(1)})),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":Uf(global))){var Wf=Object.getOwnPropertyDescriptor(global,"window");global.window&&!Wf.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}var qf,Kf={},Yf={};function Xf(){if(qf)return Yf; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ +function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return qf=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},Yf}var Zf,Jf,Qf,ep={exports:{}},tp={};function np(){if(Zf)return tp;function e(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.t-4:t.t:Array.isArray(e)?1:l(e)?2:c(e)?3:0}function i(e,t){return 2===o(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return 2===o(e)?e.get(t):e[t]}function s(e,t,n){var r=o(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function l(e){return z&&e instanceof Map}function c(e){return $&&e instanceof Set}function d(e){return e.i||e.u}function f(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X(e);delete t[W];for(var n=Y(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=h),Object.freeze(e),i&&r(e,(function(e,t){return p(t,!0)}),!0)),e}function h(){e(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(t){var n=Z[t];return n||e(18,t),n}function m(e,t){Z[e]||(Z[e]=t)}function y(){return j}function b(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function E(e){C(e),e.p.forEach(w),e.p=null}function C(e){e===j&&(j=e.l)}function D(e){return j={p:[],l:j,h:e,_:!0,m:0}}function w(e){var t=e[W];0===t.t||1===t.t?t.j():t.O=!0}function A(t,r){r.m=r.p.length;var o=r.p[0],i=void 0!==t&&t!==o;return r.h.S||v("ES5").M(r,t,i),i?(o[W].P&&(E(r),e(4)),n(t)&&(t=S(r,t),r.l||O(r,t)),r.o&&v("Patches").g(o[W],t,r.o,r.v)):t=S(r,o,[]),E(r),r.o&&r.s(r.o,r.v),t!==V?t:void 0}function S(e,t,n){if(g(t))return t;var o=t[W];if(!o)return r(t,(function(r,i){return x(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return O(e,o.u,!0),o.u;if(!o.R){o.R=!0,o.A.m--;var i=4===o.t||5===o.t?o.i=f(o.k):o.i;r(3===o.t?new Set(i):i,(function(t,r){return x(e,o,i,t,r,n)})),O(e,i,!1),n&&e.o&&v("Patches").F(o,n,e.o,e.v)}return o.i}function x(e,r,o,a,u,l){if(t(u)){var c=S(e,u,l&&r&&3!==r.t&&!i(r.D,a)?l.concat(a):void 0);if(s(o,a,c),!t(c))return;e._=!1}if(n(u)&&!g(u)){if(!e.h.K&&e.m<1)return;S(e,u),r&&r.A.l||O(e,u)}}function O(e,t,n){void 0===n&&(n=!1),e.h.K&&e._&&p(t,n)}function T(e,t){var n=e[W];return(n?d(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function B(e){e.P||(e.P=!0,e.l&&B(e.l))}function k(e){e.i||(e.i=f(e.u))}function F(e,t,n){var r=l(t)?v("MapSet").$(t,n):c(t)?v("MapSet").C(t,n):e.S?function(e,t){var n=Array.isArray(e),r={t:n?1:0,A:t?t.A:y(),P:!1,R:!1,D:{},l:t,u:e,k:null,i:null,j:null,I:!1},o=r,i=J;n&&(o=[r],i=Q);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):v("ES5").J(t,n);return(n?n.A:y()).p.push(r),r}function P(i){return t(i)||e(22,i),function e(t){if(!n(t))return t;var i,u=t[W],l=o(t);if(u){if(!u.P&&(u.t<4||!v("ES5").N(u)))return u.u;u.R=!0,i=I(t,l),u.R=!1}else i=I(t,l);return r(i,(function(t,n){u&&a(u.u,t)===n||s(i,t,e(n))})),3===l?new Set(i):i}(i)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f(e)}function R(){function e(e,t){var n=s[e];return n?n.enumerable=t:s[e]=n={configurable:!0,enumerable:t,get:function(){return J.get(this[W],e)},set:function(t){J.set(this[W],e,t)}},n}function n(e){for(var t=e.length-1;t>=0;t--){var n=e[t][W];if(!n.P)switch(n.t){case 5:a(n)&&B(n);break;case 4:o(n)&&B(n)}}}function o(e){for(var t=e.u,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==W){var s=t[a];if(void 0===s&&!i(t,a))return!0;var l=n[a],c=l&&l[W];if(c?c.u!==s:!u(l,s))return!0}}var d=!!t[W];return r.length!==Y(t).length+(d?0:1)}function a(e){var t=e.k;if(t.length!==e.u.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var s={};m("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o1?n-1:0),i=1;i1?n-1:0),i=1;i=0;r--){var o=n[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(n=n.slice(r+1));var i=v("Patches").W;return t(e)?i(e,n):this.produce(e,(function(e){return i(e,n)}))},r}(),te=new ee,ne=te.produce,re=te.produceWithPatches.bind(te),oe=te.setAutoFreeze.bind(te),ie=te.setUseProxies.bind(te),ae=te.applyPatches.bind(te),se=te.createDraft.bind(te),ue=te.finishDraft.bind(te);return tp.Immer=ee,tp.applyPatches=ae,tp.castDraft=function(e){return e},tp.castImmutable=function(e){return e},tp.createDraft=se,tp.current=P,tp.default=ne,tp.enableAllPlugins=function(){R(),_(),L()},tp.enableES5=R,tp.enableMapSet=_,tp.enablePatches=L,tp.finishDraft=ue,tp.freeze=p,tp.immerable=G,tp.isDraft=t,tp.isDraftable=n,tp.nothing=V,tp.original=function(n){return t(n)||e(23,n),n[W].u},tp.produce=ne,tp.produceWithPatches=re,tp.setAutoFreeze=oe,tp.setUseProxies=ie,tp}function rp(){return Jf||(Jf=1,ep.exports=np()),ep.exports}function op(){if(Qf)return Kf;Qf=1,Object.defineProperty(Kf,"__esModule",{value:!0});var e=Xf(),t=rp();function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}));n(O);var T=r((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=O(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0})),N=n(T);function B(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1],r=!n,o=n?j(e):e,i=F.None,a=F.None,s=0,u=null,l=B(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=Z(c,d),p=h(r?[a,f]:[f,i],2);if(i=p[0],a=p[1],J(i,F.ZWJ)&&J(a,F.ExtPict)&&!ne(r?e.substring(0,s):e.substring(0,e.length-s)))break;if(J(i,F.RI)&&J(a,F.RI)&&!(u=null!==u?!u:!!r||oe(e.substring(0,e.length-s))))break;if(i!==F.None&&a!==F.None&&ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},I=/\s/,R=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\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\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,L=/['\u2018\u2019]/,_=function(e,t,n){if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},M=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(I.test(t))return!1;if(L.test(t)){var o=P(n,r),i=_(n,o,r),a=h(i,2);if(e(a[0],a[1],r))return!0}return!R.test(t)},j=function*(e){for(var t=e.length-1,n=0;n=55296&&e<=56319},z=function(e){return e>=56320&&e<=57343};!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(F||(F={}));var $=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,U=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,V=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,G=/^[\u1100-\u115F\uA960-\uA97C]$/,W=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,q=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,K=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Y=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,X=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Z=function(e,t){var n=F.Any;return-1!==e.search($)&&(n|=F.Extend),8205===t&&(n|=F.ZWJ),t>=127462&&t<=127487&&(n|=F.RI),-1!==e.search(U)&&(n|=F.Prepend),-1!==e.search(V)&&(n|=F.SpacingMark),-1!==e.search(G)&&(n|=F.L),-1!==e.search(W)&&(n|=F.V),-1!==e.search(q)&&(n|=F.T),-1!==e.search(K)&&(n|=F.LV),-1!==e.search(Y)&&(n|=F.LVT),-1!==e.search(X)&&(n|=F.ExtPict),n};function J(e,t){return!!(e&t)}var Q=[[F.L,F.L|F.V|F.LV|F.LVT],[F.LV|F.V,F.V|F.T],[F.LVT|F.T,F.T],[F.Any,F.Extend|F.ZWJ],[F.Any,F.SpacingMark],[F.Prepend,F.Any],[F.ZWJ,F.ExtPict],[F.RI,F.RI]];function ee(e,t){return-1===Q.findIndex((function(n){return J(e,n[0])&&J(t,n[1])}))}var te=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,ne=function(e){return-1!==e.search(te)},re=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,oe=function(e){var t=e.match(re);return null!==t&&t[0].length/2%2==1},ie=function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)&&!he.isEditor(t)},ae={isAncestor:function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)},isElement:ie,isElementList:function(e){return Array.isArray(e)&&e.every((function(e){return ae.isElement(e)}))},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ie(e)&&e[n]===t},matches:function(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},se=["text"],ue=["text"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=t.voids,r=void 0!==n&&n,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l,c=he.path(e,s),d="lowest"===i,f=de(he.levels(e,{at:c,voids:r,match:u,reverse:d}));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(!Ge.isText(g)&&!xe.equals(c,v))return[g,v]}}catch(e){f.e(e)}finally{f.f()}}},addMark:function(e,t,n){e.addMark(t,n)},after:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.point(e,t,{edge:"end"}),focus:he.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},before:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.start(e,[]),focus:he.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i,reverse:!0})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteBackward(n)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteForward(n)},deleteFragment:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,n=void 0===t?"forward":t;e.deleteFragment(n)},edges:function(e,t){return[he.start(e,t),he.end(e,t)]},end:function(e,t){return he.point(e,t,{edge:"end"})},first:function(e,t){var n=he.path(e,t,{edge:"start"});return he.node(e,n)},fragment:function(e,t){var n=he.range(e,t),r=De.fragment(e,n);return r},hasBlocks:function(e,t){return t.children.some((function(t){return he.isBlock(e,t)}))},hasInlines:function(e,t){return t.children.some((function(t){return Ge.isText(t)||he.isInline(e,t)}))},hasTexts:function(e,t){return t.children.every((function(e){return Ge.isText(e)}))},insertBreak:function(e){e.insertBreak()},insertSoftBreak:function(e){e.insertSoftBreak()},insertFragment:function(e,t){e.insertFragment(t)},insertNode:function(e,t){e.insertNode(t)},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return ae.isElement(t)&&!e.isInline(t)},isEditor:function(t){var n=pe.get(t);if(void 0!==n)return n;if(!e.isPlainObject(t))return!1;var r="function"==typeof t.addMark&&"function"==typeof t.apply&&"function"==typeof t.deleteBackward&&"function"==typeof t.deleteForward&&"function"==typeof t.deleteFragment&&"function"==typeof t.insertBreak&&"function"==typeof t.insertSoftBreak&&"function"==typeof t.insertFragment&&"function"==typeof t.insertNode&&"function"==typeof t.insertText&&"function"==typeof t.isInline&&"function"==typeof t.isVoid&&"function"==typeof t.normalizeNode&&"function"==typeof t.onChange&&"function"==typeof t.removeMark&&"function"==typeof t.getDirtyPaths&&(null===t.marks||e.isPlainObject(t.marks))&&(null===t.selection||Ie.isRange(t.selection))&&De.isNodeList(t.children)&&Se.isOperationList(t.operations);return pe.set(t,r),r},isEnd:function(e,t,n){var r=he.end(e,n);return Be.equals(t,r)},isEdge:function(e,t,n){return he.isStart(e,t,n)||he.isEnd(e,t,n)},isEmpty:function(e,t){var n=t.children,r=h(n,1)[0];return 0===n.length||1===n.length&&Ge.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:function(e,t){return ae.isElement(t)&&e.isInline(t)},isNormalizing:function(e){var t=b.get(e);return void 0===t||t},isStart:function(e,t,n){if(0!==t.offset)return!1;var r=he.start(e,n);return Be.equals(t,r)},isVoid:function(e,t){return ae.isElement(t)&&e.isVoid(t)},last:function(e,t){var n=he.path(e,t,{edge:"end"});return he.node(e,n)},leaf:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n);return[De.leaf(e,r),r]},levels:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),r){var l,c=[],d=he.path(e,r),f=de(De.levels(e,d));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(u(g,v)&&(c.push([g,v]),!s&&he.isVoid(e,g)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}},marks:function(e){var t=e.marks,n=e.selection;if(!n)return null;if(t)return t;if(Ie.isExpanded(n)){var r=he.nodes(e,{match:Ge.isText}),o=h(r,1)[0];if(o){var i=h(o,1)[0];return i.text,N(i,se)}return{}}var a=n.anchor,s=a.path,u=he.leaf(e,s),l=h(u,1)[0];if(0===a.offset){var c=he.previous(e,{at:s,match:Ge.isText}),d=he.above(e,{match:function(t){return he.isBlock(e,t)}});if(c&&d){var f=h(c,2),p=f[0],g=f[1],v=h(d,2)[1];xe.isAncestor(v,g)&&(l=p)}}var m=l;return m.text,N(m,ue)},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.after(e,u,{voids:i});if(l){var c=he.last(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},node:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=De.get(e,r);return[o,r]},nodes:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.match;if(f||(f=function(){return!0}),r){var p,g;if(ve.isSpan(r))p=r[0],g=r[1];else{var v=he.path(e,r,{edge:"start"}),m=he.path(e,r,{edge:"end"});p=l?m:v,g=l?v:m}var y,b,E=De.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var n=h(t,1)[0];return!d&&he.isVoid(e,n)}}),C=[],D=de(E);try{for(D.s();!(b=D.n()).done;){var w=h(b.value,2),A=w[0],S=w[1],x=y&&0===xe.compare(S,y[1]);if("highest"!==i||!x)if(f(A,S))if("lowest"===i&&x)y=[A,S];else{var O="lowest"===i?y:[A,S];O&&(s?C.push(O):yield O),y=[A,S]}else if(s&&!x&&Ge.isText(A))return}}catch(e){D.e(e)}finally{D.f()}"lowest"===i&&y&&(s?C.push(y):yield y),s&&(yield*C)}},normalize:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,r=function(e){return v.get(e)||[]},o=function(e){var t=r(e).pop(),n=t.join(",");return function(e){return m.get(e)||new Set}(e).delete(n),t};if(he.isNormalizing(e)){if(n){var i=Array.from(De.nodes(e),(function(e){return h(e,2)[1]})),a=new Set(i.map((function(e){return e.join(",")})));v.set(e,i),m.set(e,a)}0!==r(e).length&&he.withoutNormalizing(e,(function(){var t,n=de(r(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;if(De.has(e,i)){var a=he.node(e,i),s=h(a,2),u=s[0];s[1];ae.isElement(u)&&0===u.children.length&&e.normalizeNode(a)}}}catch(e){n.e(e)}finally{n.f()}for(var l=42*r(e).length,c=0;0!==r(e).length;){if(c>l)throw new Error("\n Could not completely normalize the editor after ".concat(l," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var d=o(e);if(De.has(e,d)){var f=he.node(e,d);e.normalizeNode(f)}c++}}))}},parent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=xe.parent(r);return he.node(e,o)},path:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.depth,o=n.edge;if(xe.isPath(t))if("start"===o){var i=De.first(e,t);t=h(i,2)[1]}else if("end"===o){var a=De.last(e,t);t=h(a,2)[1]}return Ie.isRange(t)&&(t="start"===o?Ie.start(t):"end"===o?Ie.end(t):xe.common(t.anchor.path,t.focus.path)),Be.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:function(e,t){return De.has(e,t)},pathRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pathRefs(e).delete(r),r.current=null,t}};return he.pathRefs(e).add(r),r},pathRefs:function(e){var t=E.get(e);return t||(t=new Set,E.set(e,t)),t},point:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,r=void 0===n?"start":n;if(xe.isPath(t)){var o;if("end"===r){var i=De.last(e,t);o=h(i,2)[1]}else{var a=De.first(e,t);o=h(a,2)[1]}var s=De.get(e,o);if(!Ge.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(Ie.isRange(t)){var u=Ie.edges(t),l=h(u,2),c=l[0],d=l[1];return"start"===r?c:d}return t},pointRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pointRefs(e).delete(r),r.current=null,t}};return he.pointRefs(e).add(r),r},pointRefs:function(e){var t=C.get(e);return t||(t=new Set,C.set(e,t)),t},positions:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(r){var c,d=he.range(e,r),f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=s?v:g,y=!1,b="",E=0,C=0,D=0,w=de(he.nodes(e,{at:r,reverse:s,voids:l}));try{for(w.s();!(c=w.n()).done;){var A=h(c.value,2),S=A[0],x=A[1];if(ae.isElement(S)){if(!l&&e.isVoid(S)){yield he.start(e,x);continue}if(e.isInline(S))continue;if(he.hasInlines(e,S)){var O=xe.isAncestor(x,v.path)?v:he.end(e,x),T=xe.isAncestor(x,g.path)?g:he.start(e,x);b=he.string(e,{anchor:T,focus:O},{voids:l}),y=!0}}if(Ge.isText(S)){var N=xe.equals(x,m.path);for(N?(C=s?m.offset:S.text.length-m.offset,D=m.offset):(C=S.text.length,D=s?C:0),(N||y||"offset"===i)&&(yield{path:x,offset:D},y=!1);;){if(0===E){if(""===b)break;E=B(b,i,s),b=_(b,E,s)[1]}if(D=s?D-E:D+E,(C-=E)<0){E=-C;break}E=0,yield{path:x,offset:D}}}}}catch(e){w.e(e)}finally{w.f()}}function B(e,t,n){return"character"===t?P(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=P(e,t),i=_(e,o,t),a=h(i,2),s=a[0],u=a[1];if(M(s,u,t))r=!0,n+=o;else{if(r)break;n+=o}e=u}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.before(e,u,{voids:i});if(l){var c=he.first(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},range:function(e,t,n){return Ie.isRange(t)&&!n?t:{anchor:he.start(e,t),focus:he.end(e,n||t)}},rangeRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.rangeRefs(e).delete(r),r.current=null,t}};return he.rangeRefs(e).add(r),r},rangeRefs:function(e){var t=D.get(e);return t||(t=new Set,D.set(e,t)),t},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){b.set(e,t)},start:function(e,t){return he.point(e,t,{edge:"start"})},string:function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==r&&r,i=he.range(e,t),a=Ie.edges(i),s=h(a,2),u=s[0],l=s[1],c="",d=de(he.nodes(e,{at:i,match:Ge.isText,voids:o}));try{for(d.s();!(n=d.n()).done;){var f=h(n.value,2),p=f[0],g=f[1],v=p.text;xe.equals(g,l.path)&&(v=v.slice(0,l.offset)),xe.equals(g,u.path)&&(v=v.slice(u.offset)),c+=v}}catch(e){d.e(e)}finally{d.f()}return c},unhangRange:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,r=void 0!==n&&n,o=Ie.edges(t),i=h(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||Ie.isCollapsed(t))return t;var u,l=he.above(e,{at:s,match:function(t){return he.isBlock(e,t)}}),c=l?l[1]:[],d={anchor:he.start(e,a),focus:s},f=!0,p=de(he.nodes(e,{at:d,match:Ge.isText,reverse:!0,voids:r}));try{for(p.s();!(u=p.n()).done;){var g=h(u.value,2),v=g[0],m=g[1];if(f)f=!1;else if(""!==v.text||xe.isBefore(m,c)){s={path:m,offset:v.text.length};break}}}catch(e){p.e(e)}finally{p.f()}return{anchor:a,focus:s}},void:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he.above(e,ce(ce({},t),{},{match:function(t){return he.isVoid(e,t)}}))},withoutNormalizing:function(e,t){var n=he.isNormalizing(e);he.setNormalizing(e,!1);try{t()}finally{he.setNormalizing(e,n)}he.normalize(e)}},ge={isLocation:function(e){return xe.isPath(e)||Be.isPoint(e)||Ie.isRange(e)}},ve={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(xe.isPath)}},me=["children"],ye=["text"];function be(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[De.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}},child:function(e,t){if(Ge.isText(e))throw new Error("Cannot get the child of a text node: ".concat(_e.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(_e.stringify(e)));return n},children:function*(e,t){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).reverse,r=void 0!==n&&n,o=De.ancestor(e,t),i=o.children,a=r?i.length-1:0;r?a>=0:a1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},elements:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];ae.isElement(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},extractProps:function(e){return ae.isAncestor(e)?(e.children,N(e,me)):(e.text,N(e,ye))},first:function(e,t){for(var n=t.slice(),r=De.get(e,n);r&&!Ge.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment:function(e,n){if(Ge.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(_e.stringify(e)));var r=t.produce({children:e.children},(function(e){var t,r=Ie.edges(n),o=h(r,2),i=o[0],a=o[1],s=De.nodes(e,{reverse:!0,pass:function(e){var t=h(e,2)[1];return!Ie.includes(n,t)}}),u=be(s);try{for(u.s();!(t=u.n()).done;){var l=h(t.value,2)[1];if(!Ie.includes(n,l)){var c=De.parent(e,l),d=l[l.length-1];c.children.splice(d,1)}if(xe.equals(l,a.path)){var f=De.leaf(e,l);f.text=f.text.slice(0,a.offset)}if(xe.equals(l,i.path)){var p=De.leaf(e,l);p.text=p.text.slice(i.offset)}}}catch(e){u.e(e)}finally{u.f()}he.isEditor(e)&&(e.selection=null)}));return r.children},get:function(e,t){for(var n=e,r=0;r2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=De.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}},matches:function(e,t){return ae.isElement(e)&&ae.isElementProps(t)&&ae.matches(e,t)||Ge.isText(e)&&Ge.isTextProps(t)&&Ge.matches(e,t)},nodes:function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pass,r=t.reverse,o=void 0!==r&&r,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?xe.isBefore(l,s):xe.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||Ge.isText(c)||0===c.children.length||null!=n&&!1!==n([c,l])){if(0===l.length)break;if(!o){var d=xe.next(l);if(De.has(e,d)){l=d,c=De.get(e,l);continue}}if(o&&0!==l[l.length-1])l=xe.previous(l),c=De.get(e,l);else l=xe.parent(l),c=De.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;xe.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=De.get(e,l)}},parent:function(e,t){var n=xe.parent(t),r=De.get(e,n);if(Ge.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:function(e){return Ge.isText(e)?e.text:e.children.map(De.string).join("")},texts:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];Ge.isText(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.reverse,r=void 0!==n&&n,o=xe.levels(e,t);return o=r?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var n=[],r=0;rt[r])return 1}return 0},endsAfter:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i>a},endsAt:function(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return xe.equals(r,o)},endsBefore:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i0},isAfter:function(e,t){return 1===xe.compare(e,t)},isAncestor:function(e,t){return e.lengtht.length&&0===xe.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===xe.compare(e,t)},isPath:function(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])},isSibling:function(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&xe.equals(n,r)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath:function(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent:function(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous:function(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative:function(e,t){if(!xe.isAncestor(t,e)&&!xe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(t){var o=r.affinity,i=void 0===o?"forward":o;if(e&&0!==(null==e?void 0:e.length)){if(null===t)return null;switch(n.type){case"insert_node":var a=n.path;(xe.equals(a,t)||xe.endsBefore(a,t)||xe.isAncestor(a,t))&&(t[a.length-1]+=1);break;case"remove_node":var s=n.path;if(xe.equals(s,t)||xe.isAncestor(s,t))return null;xe.endsBefore(s,t)&&(t[s.length-1]-=1);break;case"merge_node":var u=n.path,l=n.position;xe.equals(u,t)||xe.endsBefore(u,t)?t[u.length-1]-=1:xe.isAncestor(u,t)&&(t[u.length-1]-=1,t[u.length]+=l);break;case"split_node":var c=n.path,d=n.position;if(xe.equals(c,t)){if("forward"===i)t[t.length-1]+=1;else if("backward"!==i)return null}else xe.endsBefore(c,t)?t[c.length-1]+=1:xe.isAncestor(c,t)&&e[c.length]>=d&&(t[c.length-1]+=1,t[c.length]-=d);break;case"move_node":var f=n.path,p=n.newPath;if(xe.equals(f,p))return;if(xe.isAncestor(f,t)||xe.equals(f,t)){var h=p.slice();return xe.endsBefore(f,p)&&f.lengtht.offset?1:0:n},isAfter:function(e,t){return 1===Be.compare(e,t)},isBefore:function(e,t){return-1===Be.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&xe.equals(e.path,t.path)},isPoint:function(t){return e.isPlainObject(t)&&"number"==typeof t.offset&&xe.isPath(t.path)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t=r.affinity,o=void 0===t?"forward":t,i=e.path,a=e.offset;switch(n.type){case"insert_node":case"move_node":e.path=xe.transform(i,n,r);break;case"insert_text":xe.equals(n.path,i)&&(n.offset1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=e.anchor,o=e.focus;return Ie.isBackward(e)===n?[r,o]:[o,r]},end:function(e){var t=Ie.edges(e),n=h(t,2)[1];return n},equals:function(e,t){return Be.equals(e.anchor,t.anchor)&&Be.equals(e.focus,t.focus)},includes:function(e,t){if(Ie.isRange(t)){if(Ie.includes(e,t.anchor)||Ie.includes(e,t.focus))return!0;var n=Ie.edges(e),r=h(n,2),o=r[0],i=r[1],a=Ie.edges(t),s=h(a,2),u=s[0],l=s[1];return Be.isBefore(o,u)&&Be.isAfter(i,l)}var c=Ie.edges(e),d=h(c,2),f=d[0],p=d[1],g=!1,v=!1;return Be.isPoint(t)?(g=Be.compare(t,f)>=0,v=Be.compare(t,p)<=0):(g=xe.compare(t,f.path)>=0,v=xe.compare(t,p.path)<=0),g&&v},intersection:function(e,t){e.anchor,e.focus;var n=N(e,Fe),r=Ie.edges(e),o=h(r,2),i=o[0],a=o[1],s=Ie.edges(t),u=h(s,2),l=u[0],c=u[1],d=Be.isBefore(i,l)?l:i,f=Be.isBefore(a,c)?a:c;return Be.isBefore(f,d)?null:function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t,o,i=r.affinity,a=void 0===i?"inward":i;if("inward"===a){var s=Ie.isCollapsed(e);Ie.isForward(e)?(t="forward",o=s?t:"backward"):(t="backward",o=s?t:"forward")}else"outward"===a?Ie.isForward(e)?(t="backward",o="forward"):(t="forward",o="backward"):(t=a,o=a);var u=Be.transform(e.anchor,n,{affinity:t}),l=Be.transform(e.focus,n,{affinity:o});if(!u||!l)return null;e.anchor=u,e.focus=l}))}},Re={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Ie.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Le=void 0,_e={setScrubber:function(e){Le=e},stringify:function(e){return JSON.stringify(e,Le)}},Me=function t(n,r){for(var o in n){var i=n[o],a=r[o];if(e.isPlainObject(i)&&e.isPlainObject(a)){if(!t(i,a))return!1}else if(Array.isArray(i)&&Array.isArray(a)){if(i.length!==a.length)return!1;for(var s=0;s=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{}).loose,r=void 0!==n&&n;function o(e){return e.text,N(e,je)}return Me(r?o(e):e,r?o(t):t)},isText:function(t){return e.isPlainObject(t)&&"string"==typeof t.text},isTextList:function(e){return Array.isArray(e)&&e.every((function(e){return Ge.isText(e)}))},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations:function(e,t){var n,r=[Ve({},e)],o=ze(t);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=(a.anchor,a.focus,N(a,He)),u=Ie.edges(a),l=h(u,2),c=l[0],d=l[1],f=[],p=0,g=c.offset,v=d.offset,m=ze(r);try{for(m.s();!(i=m.n()).done;){var y=i.value,b=y.text.length,E=p;if(p+=b,g<=E&&p<=v)Object.assign(y,s),f.push(y);else if(g!==v&&(g===p||v===E)||g>p||vE){var S=g-E;D=Ve(Ve({},C),{},{text:C.text.slice(0,S)}),C=Ve(Ve({},C),{},{text:C.text.slice(S)})}Object.assign(C,s),D&&f.push(D),f.push(C),w&&f.push(w)}}}catch(e){m.e(e)}finally{m.f()}r=f}}catch(e){o.e(e)}finally{o.f()}return r}};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ni.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t){var s,u=Ke(Ie.points(t));try{for(u.s();!(s=u.n()).done;){var c=h(s.value,2),d=c[0];t[c[1]]=Be.transform(d,n)}}catch(e){u.e(e)}finally{u.f()}}break;case"insert_text":var f=n.path,p=n.offset,g=n.text;if(0===g.length)break;var v=De.leaf(e,f),m=v.text.slice(0,p),y=v.text.slice(p);if(v.text=m+g+y,t){var b,E=Ke(Ie.points(t));try{for(E.s();!(b=E.n()).done;){var C=h(b.value,2),D=C[0];t[C[1]]=Be.transform(D,n)}}catch(e){E.e(e)}finally{E.f()}}break;case"merge_node":var w=n.path,A=De.get(e,w),S=xe.previous(w),x=De.get(e,S),O=De.parent(e,w),T=w[w.length-1];if(Ge.isText(A)&&Ge.isText(x))x.text+=A.text;else{if(Ge.isText(A)||Ge.isText(x))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(w,"] to nodes of different interfaces: ").concat(_e.stringify(A)," ").concat(_e.stringify(x)));var N;(N=x.children).push.apply(N,l(A.children))}if(O.children.splice(T,1),t){var B,k=Ke(Ie.points(t));try{for(k.s();!(B=k.n()).done;){var F=h(B.value,2),P=F[0];t[F[1]]=Be.transform(P,n)}}catch(e){k.e(e)}finally{k.f()}}break;case"move_node":var I=n.path,R=n.newPath;if(xe.isAncestor(I,R))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(R,"] because the destination is inside itself."));var L=De.get(e,I),_=De.parent(e,I),M=I[I.length-1];_.children.splice(M,1);var j=xe.transform(I,n),H=De.get(e,xe.parent(j)),z=j[j.length-1];if(H.children.splice(z,0,L),t){var $,U=Ke(Ie.points(t));try{for(U.s();!($=U.n()).done;){var V=h($.value,2),G=V[0];t[V[1]]=Be.transform(G,n)}}catch(e){U.e(e)}finally{U.f()}}break;case"remove_node":var W=n.path,q=W[W.length-1];if(De.parent(e,W).children.splice(q,1),t){var K,Y=Ke(Ie.points(t));try{for(Y.s();!(K=Y.n()).done;){var X=h(K.value,2),Z=X[0],J=X[1],Q=Be.transform(Z,n);if(null!=t&&null!=Q)t[J]=Q;else{var ee,te=void 0,ne=void 0,re=Ke(De.texts(e));try{for(re.s();!(ee=re.n()).done;){var oe=h(ee.value,2),ie=oe[0],ae=oe[1];if(-1!==xe.compare(ae,W)){ne=[ie,ae];break}te=[ie,ae]}}catch(e){re.e(e)}finally{re.f()}var se=!1;te&&ne&&(se=xe.equals(ne[1],W)?!xe.hasPrevious(ne[1]):xe.common(te[1],W).length=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.mode,u=void 0===s?"lowest":s,l=n.at,c=n.match,d=n.select;if(De.isNode(t)&&(t=[t]),0!==t.length){var f=h(t,1)[0];if(l||(l=e.selection?e.selection:e.children.length>0?he.end(e,[]):[0],d=!0),null==d&&(d=!1),Ie.isRange(l))if(o||(l=he.unhangRange(e,l)),Ie.isCollapsed(l))l=l.anchor;else{var p=Ie.edges(l),g=h(p,2)[1],v=he.pointRef(e,g);gt.delete(e,{at:l}),l=v.unref()}if(Be.isPoint(l)){null==c&&(c=Ge.isText(f)?function(e){return Ge.isText(e)}:e.isInline(f)?function(t){return Ge.isText(t)||he.isInline(e,t)}:function(t){return he.isBlock(e,t)});var m=he.nodes(e,{at:l.path,match:c,mode:u,voids:a}),y=h(m,1)[0];if(!y)return;var b=h(y,2)[1],E=he.pathRef(e,b),C=he.isEnd(e,l,b);gt.splitNodes(e,{at:l,match:c,mode:u,voids:a});var D=E.unref();l=C?xe.next(D):D}var w=xe.parent(l),A=l[l.length-1];if(a||!he.void(e,{at:w})){var S,x=tt(t);try{for(x.s();!(S=x.n()).done;){var O=S.value,T=w.concat(A);A++,e.apply({type:"insert_node",path:T,node:O}),l=xe.next(l)}}catch(e){x.e(e)}finally{x.f()}if(l=xe.previous(l),d){var N=he.end(e,l);N&>.select(e,N)}}}}))},liftNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=xe.isPath(r)?at(e,r):function(t){return he.isBlock(e,t)}),r)for(var l=he.nodes(e,{at:r,match:u,mode:i,voids:s}),c=Array.from(l,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),d=0,f=c;d1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.match,r=t.at,o=void 0===r?e.selection:r,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==n)if(xe.isPath(o)){var d=he.parent(e,o),f=h(d,1)[0];n=function(e){return f.children.includes(e)}}else n=function(t){return he.isBlock(e,t)};if(!a&&Ie.isRange(o)&&(o=he.unhangRange(e,o)),Ie.isRange(o))if(Ie.isCollapsed(o))o=o.anchor;else{var p=Ie.edges(o),g=h(p,2)[1],v=he.pointRef(e,g);gt.delete(e,{at:o}),o=v.unref(),null==t.at&>.select(e,o)}var m=he.nodes(e,{at:o,match:n,voids:u,mode:c}),y=h(m,1)[0],b=he.previous(e,{at:o,match:n,voids:u,mode:c});if(y&&b){var E=h(y,2),C=E[0],D=E[1],w=h(b,2),A=w[0],S=w[1];if(0!==D.length&&0!==S.length){var x,O,T=xe.next(S),B=xe.common(D,S),k=xe.isSibling(D,S),F=Array.from(he.levels(e,{at:D}),(function(e){return h(e,1)[0]})).slice(B.length).slice(0,-1),P=he.above(e,{at:D,mode:"highest",match:function(t){return F.includes(t)&&ot(e,t)}}),I=P&&he.pathRef(e,P[1]);if(Ge.isText(C)&&Ge.isText(A)){C.text;var R=N(C,Ze);O=A.text.length,x=R}else{if(!ae.isElement(C)||!ae.isElement(A))throw new Error("Cannot merge the node at path [".concat(D,"] with the previous sibling because it is not the same kind: ").concat(_e.stringify(C)," ").concat(_e.stringify(A)));C.children;var L=N(C,Je);O=A.children.length,x=L}k||gt.moveNodes(e,{at:D,to:T,voids:u}),I&>.removeNodes(e,{at:I.current,voids:u}),ae.isElement(A)&&he.isEmpty(e,A)||Ge.isText(A)&&""===A.text&&0!==S[S.length-1]?gt.removeNodes(e,{at:S,voids:u}):e.apply({type:"merge_node",path:T,position:O,properties:x}),I&&I.unref()}}}}))},moveNodes:function(e,t){he.withoutNormalizing(e,(function(){var n=t.to,r=t.at,o=void 0===r?e.selection:r,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=xe.isPath(o)?at(e,o):function(t){return he.isBlock(e,t)});for(var c=he.pathRef(e,n),d=he.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.hanging,r=void 0!==n&&n,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?at(e,l):function(t){return he.isBlock(e,t)}),!r&&Ie.isRange(l)&&(l=he.unhangRange(e,l));for(var d=he.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.match,o=n.at,i=void 0===o?e.selection:o,a=n.compare,s=n.merge,u=n.hanging,l=void 0!==u&&u,c=n.mode,d=void 0===c?"lowest":c,f=n.split,p=void 0!==f&&f,g=n.voids,v=void 0!==g&&g;if(i){if(null==r&&(r=xe.isPath(i)?at(e,i):function(t){return he.isBlock(e,t)}),!l&&Ie.isRange(i)&&(i=he.unhangRange(e,i)),p&&Ie.isRange(i)){if(Ie.isCollapsed(i)&&he.leaf(e,i.anchor)[0].text.length>0)return;var m=he.rangeRef(e,i,{affinity:"inward"}),y=Ie.edges(i),b=h(y,2),E=b[0],C=b[1],D="lowest"===d?"lowest":"highest",w=he.isEnd(e,C,C.path);gt.splitNodes(e,{at:C,match:r,mode:D,voids:v,always:!w});var A=he.isStart(e,E,E.path);gt.splitNodes(e,{at:E,match:r,mode:D,voids:v,always:!A}),i=m.unref(),null==n.at&>.select(e,i)}a||(a=function(e,t){return e!==t});var S,x=tt(he.nodes(e,{at:i,match:r,mode:d,voids:v}));try{for(x.s();!(S=x.n()).done;){var O=h(S.value,2),T=O[0],N=O[1],B={},k={};if(0!==N.length){var F=!1;for(var P in t)"children"!==P&&"text"!==P&&a(t[P],T[P])&&(F=!0,T.hasOwnProperty(P)&&(B[P]=T[P]),s?null!=t[P]&&(k[P]=s(T[P],t[P])):null!=t[P]&&(k[P]=t[P]));F&&e.apply({type:"set_node",path:N,properties:B,newProperties:k})}}}catch(e){x.e(e)}finally{x.f()}}}))},splitNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(null==a&&(a=function(t){return he.isBlock(e,t)}),Ie.isRange(u)&&(u=it(e,u)),xe.isPath(u)){var p=u,g=he.point(e,p),v=he.parent(e,p),m=h(v,1)[0];a=function(e){return e===m},c=g.path.length-p.length+1,u=g,f=!0}if(u){var y,b=he.pointRef(e,u,{affinity:"backward"});try{var E=he.nodes(e,{at:u,match:a,mode:r,voids:i}),C=h(E,1)[0];if(!C)return;var D=he.void(e,{at:u,mode:"highest"});if(!i&&D){var w=h(D,2),A=w[0],S=w[1];if(ae.isElement(A)&&e.isInline(A)){var x=he.after(e,S);if(!x){var O=xe.next(S);gt.insertNodes(e,{text:""},{at:O,voids:i}),x=he.point(e,O)}u=x,f=!0}c=u.path.length-S.length+1,f=!0}y=he.pointRef(e,u);var T,N=u.path.length-c,B=h(C,2)[1],k=u.path.slice(0,N),F=0===c?u.offset:u.path[N]+0,P=tt(he.levels(e,{at:k,reverse:!0,voids:i}));try{for(P.s();!(T=P.n()).done;){var I=h(T.value,2),R=I[0],L=I[1],_=!1;if(L.length2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r,o={},i=tt(t);try{for(i.s();!(r=i.n()).done;){o[r.value]=null}}catch(e){i.e(e)}finally{i.f()}gt.setNodes(e,o,n)},unwrapNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?at(e,l):function(t){return he.isBlock(e,t)}),xe.isPath(l)&&(l=he.range(e,l));var d,f=Ie.isRange(l)?he.rangeRef(e,l):null,p=he.nodes(e,{at:l,match:c,mode:r,voids:s}),g=Array.from(p,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})).reverse(),v=tt(g);try{var m=function(){var t=d.value.unref(),n=he.node(e,t),r=h(n,1)[0],o=he.range(e,t);i&&f&&(o=Ie.intersection(f.current,o)),gt.liftNodes(e,{at:o,match:function(e){return ae.isAncestor(r)&&r.children.includes(e)},voids:s})};for(v.s();!(d=v.n()).done;)m()}catch(e){v.e(e)}finally{v.f()}f&&f.unref()}}))},wrapNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.mode,o=void 0===r?"lowest":r,i=n.split,a=void 0!==i&&i,s=n.voids,u=void 0!==s&&s,l=n.match,c=n.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=xe.isPath(d)?at(e,d):e.isInline(t)?function(t){return he.isInline(e,t)||Ge.isText(t)}:function(t){return he.isBlock(e,t)}),a&&Ie.isRange(d)){var f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=he.rangeRef(e,d,{affinity:"inward"});gt.splitNodes(e,{at:v,match:l,voids:u}),gt.splitNodes(e,{at:g,match:l,voids:u}),d=m.unref(),null==n.at&>.select(e,d)}for(var y=Array.from(he.nodes(e,{at:d,match:e.isInline(t)?function(t){return he.isBlock(e,t)}:function(e){return he.isEditor(e)},mode:"lowest",voids:u})),b=0,E=y;b0){var A=function(){var n=h(w,1)[0],r=w[w.length-1],o=h(n,2)[1],i=h(r,2)[1];if(0===o.length&&0===i.length)return"continue";var a=xe.equals(o,i)?xe.parent(o):xe.common(o,i),s=he.range(e,o,i),l=he.node(e,a),c=h(l,1)[0],d=a.length+1,f=xe.next(i.slice(0,d)),p=et(et({},t),{},{children:[]});gt.insertNodes(e,p,{at:f,voids:u}),gt.moveNodes(e,{at:s,match:function(e){return ae.isAncestor(c)&&c.children.includes(e)},to:f.concat(0),voids:u})}();if("continue"===A)continue}}}}}))}},ot=function e(t,n){if(ae.isElement(n)){var r=n;return!!he.isVoid(t,n)||1===r.children.length&&e(t,r.children[0])}return!he.isEditor(n)},it=function(e,t){if(Ie.isCollapsed(t))return t.anchor;var n=Ie.edges(t),r=h(n,2)[1],o=he.pointRef(e,r);return gt.delete(e,{at:t}),o.unref()},at=function(e,t){var n=he.node(e,t),r=h(n,1)[0];return function(e){return e===r}};function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{}).edge,n=void 0===t?"anchor":t,r=e.selection;if(r)if("anchor"===n)gt.select(e,r.anchor);else if("focus"===n)gt.select(e,r.focus);else if("start"===n){var o=Ie.edges(r),i=h(o,1)[0];gt.select(e,i)}else if("end"===n){var a=Ie.edges(r),s=h(a,2)[1];gt.select(e,s)}},deselect:function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.selection,r=t.distance,o=void 0===r?1:r,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(n){"start"===c&&(c=Ie.isBackward(n)?"focus":"anchor"),"end"===c&&(c=Ie.isBackward(n)?"anchor":"focus");var d=n.anchor,f=n.focus,p={distance:o,unit:a},h={};if(null==c||"anchor"===c){var g=u?he.before(e,d,p):he.after(e,d,p);g&&(h.anchor=g)}if(null==c||"focus"===c){var v=u?he.before(e,f,p):he.after(e,f,p);v&&(h.focus=v)}gt.setSelection(e,h)}},select:function(e,t){var n=e.selection;if(t=he.range(e,t),n)gt.setSelection(e,t);else{if(!Ie.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(_e.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=n.edge,i=void 0===o?"both":o;if(r){"start"===i&&(i=Ie.isBackward(r)?"focus":"anchor"),"end"===i&&(i=Ie.isBackward(r)?"anchor":"focus");var a=r.anchor,s=r.focus,u="anchor"===i?a:s;gt.setSelection(e,g({},"anchor"===i?"anchor":"focus",ut(ut({},u),t)))}},setSelection:function(e,t){var n=e.selection,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Be.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Be.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}};function ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dt(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.reverse,r=void 0!==n&&n,o=t.unit,i=void 0===o?"character":o,a=t.distance,s=void 0===a?1:a,u=t.voids,l=void 0!==u&&u,c=t.at,d=void 0===c?e.selection:c,f=t.hanging,p=void 0!==f&&f;if(d){var g=!1;if(Ie.isRange(d)&&Ie.isCollapsed(d)&&(g=!0,d=d.anchor),Be.isPoint(d)){var v=he.void(e,{at:d,mode:"highest"});if(!l&&v){d=h(v,2)[1]}else{var m={unit:i,distance:s};d={anchor:d,focus:r?he.before(e,d,m)||he.start(e,[]):he.after(e,d,m)||he.end(e,[])},p=!0}}if(xe.isPath(d))gt.removeNodes(e,{at:d,voids:l});else if(!Ie.isCollapsed(d)){if(!p){var y=Ie.edges(d),b=h(y,2)[1],E=he.end(e,[]);Be.equals(b,E)||(d=he.unhangRange(e,d,{voids:l}))}var C=Ie.edges(d),D=h(C,2),w=D[0],A=D[1],S=he.above(e,{match:function(t){return he.isBlock(e,t)},at:w,voids:l}),x=he.above(e,{match:function(t){return he.isBlock(e,t)},at:A,voids:l}),O=S&&x&&!xe.equals(S[1],x[1]),T=xe.equals(w.path,A.path),N=l?null:he.void(e,{at:w,mode:"highest"}),B=l?null:he.void(e,{at:A,mode:"highest"});if(N){var k=he.before(e,w);k&&S&&xe.isAncestor(S[1],k.path)&&(w=k)}if(B){var F=he.after(e,A);F&&x&&xe.isAncestor(x[1],F.path)&&(A=F)}var P,I,R=[],L=ct(he.nodes(e,{at:d,voids:l}));try{for(L.s();!(I=L.n()).done;){var _=I.value,M=h(_,2),j=M[0],H=M[1];P&&0===xe.compare(H,P)||(!l&&he.isVoid(e,j)||!xe.isCommon(H,w.path)&&!xe.isCommon(H,A.path))&&(R.push(_),P=H)}}catch(e){L.e(e)}finally{L.f()}var z=Array.from(R,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),$=he.pointRef(e,w),U=he.pointRef(e,A),V="";if(!T&&!N){var G=$.current,W=he.leaf(e,G),q=h(W,1)[0],K=G.path,Y=w.offset,X=q.text.slice(Y);X.length>0&&(e.apply({type:"remove_text",path:K,offset:Y,text:X}),V=X)}for(var Z=0,J=z;Z0&&(e.apply({type:"remove_text",path:re,offset:oe,text:ie}),V=ie)}!T&&O&&U.current&&$.current&>.mergeNodes(e,{at:U.current,hanging:!0,voids:l}),g&&r&&"character"===i&&V.length>1&&V.match(/[\u0E00-\u0E7F]+/)&>.insertText(e,V.slice(0,V.length-s));var ae=$.unref(),se=U.unref(),ue=r?ae||se:se||ae;null==t.at&&ue&>.select(e,ue)}}}))},insertFragment:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.at,u=void 0===s?e.selection:s;if(t.length&&u){if(Ie.isRange(u))if(o||(u=he.unhangRange(e,u)),Ie.isCollapsed(u))u=u.anchor;else{var l=Ie.edges(u),c=h(l,2)[1];if(!a&&he.void(e,{at:c}))return;var d=he.pointRef(e,c);gt.delete(e,{at:u}),u=d.unref()}else xe.isPath(u)&&(u=he.start(e,u));if(a||!he.void(e,{at:u})){var f=he.above(e,{at:u,match:function(t){return he.isInline(e,t)},mode:"highest",voids:a});if(f){var p=h(f,2)[1];if(he.isEnd(e,u,p))u=he.after(e,p);else if(he.isStart(e,u,p)){u=he.before(e,p)}}var g,v=he.above(e,{match:function(t){return he.isBlock(e,t)},at:u,voids:a}),m=h(v,2)[1],y=he.isStart(e,u,m),b=he.isEnd(e,u,m),E=y&&b,C=!y||y&&b,D=!b,w=De.first({children:t},[]),A=h(w,2)[1],S=De.last({children:t},[]),x=h(S,2)[1],O=[],T=function(t){var n=h(t,2),r=n[0],o=n[1];return!(0===o.length)&&(!!E||!(C&&xe.isAncestor(o,A)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r))&&!(D&&xe.isAncestor(o,x)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r)))},N=ct(De.nodes({children:t},{pass:T}));try{for(N.s();!(g=N.n()).done;){var B=g.value;T(B)&&O.push(B)}}catch(e){N.e(e)}finally{N.f()}for(var k=[],F=[],P=[],I=!0,R=!1,L=0,_=O;L<_.length;L++){var M=h(_[L],1)[0];ae.isElement(M)&&!e.isInline(M)?(I=!1,R=!0,F.push(M)):I?k.push(M):P.push(M)}var j=he.nodes(e,{at:u,match:function(t){return Ge.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),H=h(j,1)[0],z=h(H,2)[1],$=he.isStart(e,u,z),U=he.isEnd(e,u,z),V=he.pathRef(e,b&&!P.length?xe.next(m):m),G=he.pathRef(e,U?xe.next(z):z);gt.splitNodes(e,{at:u,match:function(t){return R?he.isBlock(e,t):Ge.isText(t)||he.isInline(e,t)},mode:R?"lowest":"highest",always:R&&(!y||k.length>0)&&(!b||P.length>0),voids:a});var W,q=he.pathRef(e,!$||$&&U?xe.next(z):z);if(gt.insertNodes(e,k,{at:q.current,match:function(t){return Ge.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),E&&!k.length&&F.length&&!P.length&>.delete(e,{at:m,voids:a}),gt.insertNodes(e,F,{at:V.current,match:function(t){return he.isBlock(e,t)},mode:"lowest",voids:a}),gt.insertNodes(e,P,{at:G.current,match:function(t){return Ge.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),!n.at)if(P.length>0&&G.current?W=xe.previous(G.current):F.length>0&&V.current?W=xe.previous(V.current):q.current&&(W=xe.previous(q.current)),W){var K=he.end(e,W);gt.select(e,K)}q.unref(),V.unref(),G.unref()}}}))},insertText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.voids,o=void 0!==r&&r,i=n.at,a=void 0===i?e.selection:i;if(a){if(xe.isPath(a)&&(a=he.range(e,a)),Ie.isRange(a))if(Ie.isCollapsed(a))a=a.anchor;else{var s=Ie.end(a);if(!o&&he.void(e,{at:s}))return;var u=Ie.start(a),l=he.pointRef(e,u),c=he.pointRef(e,s);gt.delete(e,{at:a,voids:o});var d=l.unref(),f=c.unref();a=d||f,gt.setSelection(e,{anchor:a,focus:a})}if(o||!he.void(e,{at:a})){var p=a,h=p.path,g=p.offset;t.length>0&&e.apply({type:"insert_text",path:h,offset:g,text:t})}}}))}};function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var r=e.value;n.apply(r)}}catch(e){t.e(e)}finally{t.f()}}))})),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,r=s(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)}))})),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(e){var t=n.operations,o=n.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(n),f=a.isMerging(n);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(0!==t.length||l(e,u))),s&&f)s.operations.push(e);else{var p={operations:[e],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},n.writeHistory=function(e,t){n.history[e].push(t)},n},sp}var lp=up(),cp=function(e,t){return cp=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])},cp(e,t)};function dp(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}cp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fp=function(){return fp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vp(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function mp(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return Le(this,e).delete(e)},Oe.prototype.get=function(e){return Le(this,e).get(e)},Oe.prototype.has=function(e){return Le(this,e).has(e)},Oe.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new xe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?G(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var We=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return Ge(e)?Ne(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(Ep,Ep.exports)),Ep.exports),Ap=E(wp);var Sp=function(){if(Dp)return Cp;Dp=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n-1&&t%1==0&&t-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function C(e){return E(e)?p(e):m(e)}function D(e){return e}return Cp=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:D)}}(),xp=E(Sp),Op={};var Tp={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},Np={};function Bp(e,t){var n=e.key,r=e.factory,o=e.config,i=fp(fp({},o),t||{});if(null!=Np[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Np[n]=r,function(e,t){null!=t&&(Op[e]=t)}(n,i)}var kp=new WeakMap,Fp=new WeakMap,Pp=new WeakMap,Ip=new WeakMap,Rp=new WeakMap,Lp=new WeakMap,_p=new WeakMap,Mp=new WeakMap,jp=new WeakMap,Hp=new WeakMap,zp=new WeakMap,$p=new WeakMap,Up=new WeakMap,Vp=new WeakMap,Gp=new WeakMap,Wp=new WeakMap,qp=new WeakMap,Kp=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,Jp=new WeakMap,Qp=new WeakMap,eh=new WeakMap,th=new WeakMap,nh=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Np)e.push(t);return e},t.getConfig=function(){var e=Hp.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},rh=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function oh(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function ih(e={},t={}){Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:oh(t[n])&&oh(e[n])&&Object.keys(t[n]).length>0&&ih(e[n],t[n])}))}const ah={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function sh(){const e="undefined"!=typeof document?document:{};return ih(e,ah),e}const uh={document:ah,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function lh(){const e="undefined"!=typeof window?window:{};return ih(e,uh),e}class ch extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function dh(e=[]){const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...dh(e)):t.push(e)})),t}function fh(e,t){return Array.prototype.filter.call(e,t)}function ph(e,t){const n=lh(),r=sh();let o=[];if(!t&&e instanceof ch)return e;if(!e)return new ch(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("e.split(" "))));return this.forEach((e=>{e.classList.add(...t)})),this}function gh(...e){const t=dh(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...t)})),this}function vh(...e){const t=dh(e.map((e=>e.split(" "))));return fh(this,(e=>t.filter((t=>e.classList.contains(t))).length>0)).length>0}function mh(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n=0&&(t[(n=o.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=o.value)}var n;for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function Ch(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n=0;else n.value=e}return this}function Dh(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),ph(t).is(n))r.apply(t,o);else{const e=ph(t).parents();for(let t=0;t=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function Ah(){const e=lh();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Sh(){const e=lh();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function xh(){if(this.length>0){const e=lh(),t=sh(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function Oh(){for(let e=0;e{e.apply(t,[t,n])})),this):this}function kh(e){return ph(fh(this,e))}function Fh(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof ch)for(r=0;r{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Yh(e){Promise.resolve().then(e)}var Xh,Zh=function(e){return Object.prototype.toString.call(e)};Nh&&(ph.fn.css=Nh),Rh&&(ph.fn.append=Rh),hh&&(ph.fn.addClass=hh),gh&&(ph.fn.removeClass=gh),vh&&(ph.fn.hasClass=vh),Dh&&(ph.fn.on=Dh),Wh&&(ph.fn.focus=Wh),mh&&(ph.fn.attr=mh),yh&&(ph.fn.removeAttr=yh),Oh&&(ph.fn.hide=Oh),Th&&(ph.fn.show=Th),xh&&(ph.fn.offset=xh),Ah&&(ph.fn.width=Ah),Sh&&(ph.fn.height=Sh),_h&&(ph.fn.parent=_h),Mh&&(ph.fn.parents=Mh),Ih&&(ph.fn.is=Ih),Eh&&(ph.fn.dataset=Eh),Ch&&(ph.fn.val=Ch),Ph&&(ph.fn.text=Ph),Fh&&(ph.fn.html=Fh),Hh&&(ph.fn.children=Hh),zh&&(ph.fn.remove=zh),jh&&(ph.fn.find=jh),Bh&&(ph.fn.each=Bh),$h&&(ph.fn.empty=$h),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Xh||(Xh={}));var Jh=/\[object HTML([A-Z][a-z]*)*Element\]/,Qh=function(e){return Jh.test(Zh(e))},eg=function(e){return null!=e&&"number"==typeof e.nodeType},tg=function(e){return eg(e)&&e.nodeType===Xh.COMMENT_NODE},ng=function(e){return eg(e)&&e.nodeType===Xh.ELEMENT_NODE},rg=function(e){return"[object Selection]"===Zh(e)},og=function(e){return eg(e)&&e.nodeType===Xh.TEXT_NODE},ig=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},ag=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(tg(o)||ng(o)&&0===o.childNodes.length||ng(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},sg=function(e,t,n){return vp(ag(e,t,n),1)[0]},ug=function(e){var t,n,r="";if(og(e)&&e.nodeValue)return e.nodeValue;if(ng(e)){try{for(var o=gp(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=ug(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function lg(e,t){if(!Qh(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;og(o)?t(o,e):[Xh.ELEMENT_NODE,Xh.DOCUMENT_NODE,Xh.DOCUMENT_FRAGMENT_NODE].includes(i)&&lg(o,t)}}function cg(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Xh.ELEMENT_NODE?"":t.tagName.toLowerCase()}var dg=new RegExp(String.fromCharCode(160),"g");function fg(e){return e.replace(dg," ")}var pg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],hg=[];var gg=[];var vg={};function mg(e,t){var n=e.length;if(n){var r=e[n-1];if(ap.Text.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function yg(e,t,n){return{type:"paragraph",children:[{text:ph(e).text().replace(/\s+/gm," ")}]}}function bg(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(ng(e)){if("BR"===e.nodeName)return void(mg(n,"\n")||n.push({text:"\n"}));var r=Cg(ph(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(og(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=fg(o),mg(n,o)||n.push({text:o}))}})),n)}(e,t),r=function(e){for(var t in vg)if(e[0].matches(t))return vg[t];return yg}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach((function(r){ap.Editor.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),gg.forEach((function(n){r=n(e[0],r,t)})))})),o}function Eg(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/
/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=fg(n)};return gg.forEach((function(n){r=n(e[0],r,t)})),r}function Cg(e,t){hg.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=ph(r(e[0])))}));var n=cg(e);if("span"===n){if(e.attr("data-w-e-type"))return bg(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return gg.forEach((function(r){n=r(e[0],n,t)})),n}(ph(e[0]),t);return Array.from(r).flatMap((function(e){var n=function(e,t,n){var r=e[0];if(ng(r)){var o=Cg(e,n);return Array.isArray(o)?o.map((function(e){return fp(fp({},t),e)})):[fp(fp({},t),o)]}if(tg(r))return null;var i=og(r)?{text:r.textContent||""}:Eg(e,n);return[fp(fp({},t),i)]}(ph(e),o,t);return n||[]}))}return Eg(e,t)}if("code"===n)return"pre"===cg(e.parent())?bg(e,t):Eg(e,t);if(pg.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return fp(fp({},Cg(ph(r[0]),t)),Eg(e,t))}return Eg(e,t)}return bg(e,t)}function Dg(e,t,n){var r=ph(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Tp.DESTROYED,(function(){r.removeAttr(t)})),!1)}function wg(e,t){void 0===t&&(t="");var n=[];""===t&&(t="


"),0!==t.indexOf("<")&&(t=t.split(/\n/).map((function(e){return"

".concat(e,"

")})).join(""));var r=ph("
".concat(t,"
"));return Array.from(r.children()).forEach((function(t){var r=Cg(ph(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Ag(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Sg=[];var xg,Og,Tg={};function Ng(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"")}function Bg(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=ap.Editor.isVoid(t,e),s="";a||(s=i.map((function(e){return Ug(e,t)})).join(""));var u=function(e){return Tg[e]||Ng}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||Sg.forEach((function(t){return c=t(e,c)})),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var kg=function(){if(Og)return xg;Og=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o="[object Map]",i="[object Promise]",a="[object Set]",s="[object String]",u="[object WeakMap]",l="[object DataView]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,f="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",h="\\u20d0-\\u20f0",g="\\ufe0e\\ufe0f",v="["+f+"]",m="["+p+h+"]",y="\\ud83c[\\udffb-\\udfff]",E="[^"+f+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",A="(?:"+m+"|"+y+")"+"?",S="["+g+"]?",x=S+A+("(?:"+w+"(?:"+[E,C,D].join("|")+")"+S+A+")*"),O="(?:"+[E+m+"?",m,C,D,v].join("|")+")",T=RegExp(y+"(?="+y+")|"+O+x,"g"),N=RegExp("["+w+f+p+h+g+"]"),B="object"==typeof b&&b&&b.Object===Object&&b,k="object"==typeof self&&self&&self.Object===Object&&self,F=B||k||Function("return this")();function P(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n-1&&t%1==0&&t-1&&t%1==0&&t<=e}(t.length)&&!ve(t)}function ve(e){var t=me(e)?G.call(e):"";return t==n||t==r}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ye(e){return!!e&&"object"==typeof e}function be(e){return e?P(e,function(e){return ge(e)?se(e):le(e)}(e)):[]}return xg=function(e){if(!e)return[];if(ge(e))return function(e){return"string"==typeof e||!he(e)&&ye(e)&&G.call(e)==s}(e)?L(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ap.Range.isExpanded(t))return!1;var n=$g.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=ap.Editor.node(e,t);if(null==n)return!1;var r=vp(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function Ug(e,t){return ap.Element.isElement(e)?Bg(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g,"  ").replace(//g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=$g.getParentsNodes(t,e).some((function(e){return"pre"===$g.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"
")),o&&(r=r.replace(/ /g," ")),""===r){var i=$g.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="
"}return Sg.forEach((function(t){return r=t(e,r)})),r}(e,t)}var Vg=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Gg=function(e,t,n){var r=$g.toDOMRange(e,t).getBoundingClientRect(),o=$g.toDOMRange(e,n).getBoundingClientRect();return Vg(r,o)&&Vg(o,r)},Wg=function(e,t){var n,r,o=[];try{for(var i=gp(ap.Editor.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=vp(a.value,2),u=s[0],l=s[1],c=$g.findKey(e,u);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function qg(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):ap.Transforms.insertNodes(e,t,{mode:"highest"})}var Kg,Yg,Xg,Zg,Jg,Qg,ev,tv,nv,rv,ov,iv,av,sv,uv,lv,cv,dv,fv,pv,hv,gv,vv,mv,yv,bv,Ev,Cv,Dv,wv,Av,Sv,xv,Ov,Tv,Nv,Bv,kv,Fv,Pv,Iv=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":i.push.apply(i,mp([],vp(Wg(t,e.path)),!1));break;case"insert_node":case"remove_node":i.push.apply(i,mp([],vp(Wg(t,ap.Path.parent(e.path))),!1));break;case"merge_node":var a=ap.Path.previous(e.path);i.push.apply(i,mp([],vp(Wg(t,a)),!1));break;case"move_node":var s=ap.Path.common(ap.Path.parent(e.path),ap.Path.parent(e.newPath));i.push.apply(i,mp([],vp(Wg(t,s)),!1))}o(e);try{for(var u=gp(i),l=u.next();!l.done;l=u.next()){var c=vp(l.value,2),d=c[0],f=c[1],p=vp(ap.Editor.node(t,d),1)[0];Xp.set(p,f)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&ap.Range.isCollapsed(e.selection)){var r=ap.Editor.above(e,{match:function(t){return ap.Editor.isBlock(e,t)},at:e.selection});if(r){var o=vp(r,2)[1],a=ap.Editor.range(e,o,e.selection.anchor),s=function(e,t){var n=ap.Editor.range(e,ap.Range.end(t)),r=Array.from(ap.Editor.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(Gg(e,ap.Editor.range(e,r[o]),n))return ap.Editor.range(e,r[o],n);if(r.length<2)return ap.Editor.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)Gg(e,ap.Editor.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return ap.Editor.range(e,r[i],n)}(t,a);ap.Range.isCollapsed(s)||ap.Transforms.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&Qp.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return Ug(e,t)})).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return ap.Node.string(e)})).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":ap.Editor.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=ap.Editor.nodes(t,{at:[],universal:!0});try{for(var s=gp(a),u=s.next();!u.done;u=s.next()){var l=vp(u.value,1)[0];if(ap.Element.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=$g.findKey(t,l),d=Ag(l.type,c.id);i.push(fp(fp({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!ap.Element.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||ap.Text.isText(a)&&""===a.text},t.clear=function(){ap.Transforms.delete(t,{at:{anchor:ap.Editor.start(t,[]),focus:ap.Editor.end(t,[])}}),0===t.children.length&&ap.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return $g.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter((function(e){var t=e.nodeName;return!!og(e)||!!ng(e)&&!rh.has(t.toLowerCase())})),0!==o.length){var i=t.selection;if(null!=i){var a=null;if($g.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(og(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(pg.includes(r.toLowerCase()))l=!0;else for(var c in vg)if(u.matches(c)){l=!0;break}if(l){var d=Cg(ph(u),t);return Array.isArray(d)?(d.forEach((function(e){return qg(t,e)})),s+=1):(qg(t,d),s+=1),void($g.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!$g.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")})),s&&a&&$g.isEmptyPath(t,a)&&ap.Transforms.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=wg(t,null==e?"":e);if(ap.Transforms.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(ap.Editor.start(t,[]))}},t},Rv=1,Lv=function(e){var t=e;return t.id="wangEditor-".concat(Rv++),t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if($g.toDOMNode(t,t).focus({preventScroll:!0}),Jp.set(t,!0),e){var n=ap.Editor.end(t,[]);ap.Transforms.select(t,n)}else{var r=Qp.get(t);r?ap.Transforms.select(t,r):ap.Transforms.select(t,ap.Editor.start(t,[]))}},t.isFocused=function(){return!!Jp.get(t)},t.blur=function(){$g.toDOMNode(t,t).blur(),ap.Transforms.deselect(t),Jp.set(t,!1)},t.updateView=function(){$g.getTextarea(t).changeViewState();var e=$g.getToolbar(t);e&&e.changeToolbarState();var n=$g.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=$g.getTextarea(t);e.destroy(),kp.delete(t),Fp.delete(e);var n=$g.getToolbar(t);n&&(n.destroy(),Ip.delete(t),Pp.delete(n));var r=$g.getHoverbar(t);r&&(r.destroy(),Lp.delete(t),Rp.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=ph("#".concat(e));if(0!==r.length){var o=r[0];if(!$g.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=$g.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||$g.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=Mp.get(t);null!=e&&e.forEach((function(e){return e.hide()}))},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return $g.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=$g.getToolbar(t);n&&(e=n.$box);var r=$g.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=$g.getTextarea(t).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")}),200)}},t.getEditableContainer=function(){return $g.getTextarea(t).$textAreaContainer[0]},t},_v={exports:{}},Mv={exports:{}};function jv(){if(Yg)return Kg;Yg=1;return Kg=function(e){return null!=e}}function Hv(){if(Qg)return Jg;Qg=1;var e=function(){if(Zg)return Xg;Zg=1;var e=jv(),t={object:!0,function:!0,undefined:!0};return Xg=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Jg=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function zv(){if(rv)return nv;rv=1;var e=function(){if(tv)return ev;tv=1;var e=Hv();return ev=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return nv=function(r){return!!e(r)&&!t.test(n.call(r))}}function $v(){if(dv)return cv;dv=1;var e=(lv?uv:(lv=1,uv=function(){}))();return cv=function(t){return t!==e&&null!==t},cv}function Uv(){return gv||(gv=1,hv=(sv?av:(sv=1,av=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(pv)return fv;pv=1;var e=$v(),t=Object.keys;return fv=function(n){return t(e(n)?Object(n):n)}}()),hv}function Vv(){if(bv)return yv;bv=1;var e=Uv(),t=function(){if(mv)return vv;mv=1;var e=$v();return vv=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return yv=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a-1},xv}()),Tv}function qv(){if(Bv)return Mv.exports;Bv=1;var e=jv(),t=zv(),n=Gv(),r=function(){if(wv)return Dv;wv=1;var e=$v(),t=Array.prototype.forEach,n=Object.create;return Dv=function(r){var o=n(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)})),o},Dv}(),o=Wv(),i=Mv.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},Mv.exports}var Kv=(Pv||(Pv=1,function(e,t){var n,r,o,i,a,s,u,l=qv(),c=Fv?kv:(Fv=1,kv=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t0&&ap.Transforms.splitNodes(t,{always:!0}),t.insertText(p),c=!0}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}}},t},tm=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=$g.getLeftLengthOfMaxLength(t);r<=0||(r0){var n=e[0];if($g.getLeftLengthOfMaxLength(t)a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function om(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=ap.Element.isElement(t)&&e.isVoid(t),i=ap.Element.isElement(t)&&e.isInline(t),a=Yp.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===Xh.ELEMENT_NODE){var i=o.toLowerCase();if(qh.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=nm(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,C=l-v;if("bar"===n)return b.left="".concat(C,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?C>(m-d)/2?b.right="".concat(m-C+5,"px"):b.left="".concat(C+d+5,"px"):b.left="20px":b.left="".concat(C,"px"),o)(D=E)<0&&(D=0),b.top="".concat(D,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var D;(D=E+c)<0&&(D=0),b.top="".concat(D+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function im(e,t){Yh((function(){var n=nm(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),C=parseInt(E.toString(),10)-r;C<0&&(C=0),t.css("left","".concat(C,"px"))}if(g.indexOf("right")>=0&&c<0){var D=t.css("right"),w=parseInt(D.toString(),10)-Math.abs(c);t.css("right","".concat(w,"px"))}}}))}var am,sm,um=function(e){var t=e;return t.select=function(e){ap.Transforms.select(t,e)},t.deselect=function(){var n=t.selection,r=$g.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&ap.Transforms.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||ap.Transforms.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Qp.get(t);null!=e&&(t.focus(),ap.Transforms.select(t,e))},t.getSelectionPosition=function(){return rm(t)},t.getNodePosition=function(e){return om(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=vp(ap.Range.edges(e),2),r=n[0],o=n[1],i=vp(ap.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!ap.Point.equals(r,a)||!ap.Point.equals(o,s))},t.selectAll=function(){var e=ap.Editor.start(t,[]),n=ap.Editor.end(t,[]);ap.Transforms.select(t,{anchor:e,focus:n})},t};var lm=function(){if(sm)return am;sm=1;var e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof b&&b&&b.Object===Object&&b,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==t}(s))return e;if(h(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=h(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(n,"");var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?e:+s}return am=function(e,t,n){var r,o,i,a,s,u,l=0,c=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-l>=i}function E(){var e=p();if(b(e))return C(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?f(n,i-(e-l)):n}(e))}function C(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function D(){var e=p(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(E,t),c?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=g(t)||0,h(n)&&(c=!!n.leading,i=(v="maxWait"in n)?d(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},D.flush=function(){return void 0===s?a:C(p())},D},am}(),cm=E(lm);const dm={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class fm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||dm,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let[t,r]=e;for(let e=0;e{let[r,o]=t;for(let t=0;t{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},vm=e=>null==e?"":""+e,mm=/###/g,ym=e=>e&&e.indexOf("###")>-1?e.replace(mm,"."):e,bm=e=>!e||"string"==typeof e,Em=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o{const{obj:r,k:o}=Em(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Em(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Em(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},Dm=(e,t)=>{const{obj:n,k:r}=Em(e,t);if(n)return n[r]},wm=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):wm(e[r],t[r],n):e[r]=t[r]);return e},Am=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Sm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const xm=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Sm[e])):e;const Om=[" ",",","?","!",";"],Tm=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Nm=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e-1&&ae&&e.indexOf("_")>0?e.replace("_","-"):e;class km extends hm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=Dm(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Nm(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Cm(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Dm(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?wm(s,n,o):s={...s,...n},Cm(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var Fm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const Pm={};class Im extends hm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=pm.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Om.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Tm.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}else if(v&&"string"==typeof g&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=Im.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!Pm[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Pm[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Rm=e=>e.charAt(0).toUpperCase()+e.slice(1);class Lm{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pm.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Bm(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Bm(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Rm(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Rm(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Rm(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let _m=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Mm={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const jm=["v1","v2","v3"],Hm=["v4"],zm={zero:0,one:1,two:2,few:3,many:4,other:5};class $m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=pm.create("pluralResolver"),this.options.compatibilityJSON&&!Hm.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return _m.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Mm[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Bm("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>zm[e]-zm[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!jm.includes(this.options.compatibilityJSON)}}const Um=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=Dm(e,n);return void 0!==r?r:Dm(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Nm(e,n,r),void 0===i&&(i=Nm(t,n,r))),i},Vm=e=>e.replace(/\$/g,"$$$$");class Gm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=pm.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:xm,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Am(o):i||"{{",this.suffix=a?Am(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?Am(d):f||Am("$t("),this.nestingSuffix=p?Am(p):h||Am(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Um(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Um(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>Vm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Vm(this.escape(e)):Vm(e)}];return d.forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=vm(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=vm(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Wm=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(Bm(r),o),t[a]=s),s(n)}};class qm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=pm.create("formatter"),this.options=e,this.formats={number:Wm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Wm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Wm(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Wm(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Wm(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Wm(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e);return i}}class Km extends hm{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=pm.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=Em(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Ym=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Xm=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Zm=()=>{};class Jm extends hm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Xm(e),this.services={},this.logger=pm,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Ym();this.options={...r,...this.options,...Xm(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?pm.init(o(this.modules.logger),this.options):pm.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=qm);const n=new Lm(this.options);this.store=new km(this.options.resources,this.options);const i=this.services;i.logger=pm,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new $m(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Gm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Km(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=Zm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=gm(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zm;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=gm();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Zm),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Fm.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=gm();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=gm();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=gm();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Lm(Ym());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Jm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zm;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new Jm(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new km(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Im(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r')}function ay(){return ph('
')}function sy(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=Rg?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var uy=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=ph('
'),this.$button=ph(''),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=ph(c);oy(f),d.append(f)}else d.text(a);sy(d,c,a,u,n),n&&c&&d.append(ph(''.concat(a,""))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Yh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),Cy(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=Cy(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=Cy(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=Cy(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=Cy(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=ph(n);oy(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=Cy(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&sy(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),ly=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return dp(t,e),t.prototype.onButtonClick=function(){},t}(uy),cy=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Mp.get(e);null==t&&(t=new Set,Mp.set(e,t)),t.add(this),jp.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=jp.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=jp.get(this);e&&e.emit("modalOrPanelHide")}},e}(),dy=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=ph('
'),n}return dp(t,e),t.prototype.genSelfElem=function(){return null},t}(cy),fy=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=iy();o.$button.append(i)}return o}return dp(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=Cy(this);if(null==this.dropPanel){var n=new dy(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(uy),py=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=ph('
'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return dp(t,e),t.prototype.genSelfElem=function(){var e=this,t=ph(''.concat('',"")),n=jp.get(this);return t.on("click",(function(){e.hide(),null==n||n.restoreSelection()})),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(cy);function hy(e,t,n){var r=ph('');r.append("".concat(e,""));var o=ph(''));return r.append(o),[r[0],o[0]]}function gy(e,t){var n=ph('
'),r=ph('"));return n.append(r),[n[0],r[0]]}var vy=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=ph("body"),o.modal=null,o.menu=n,o}return dp(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=Cy(this),t=this.menu.getModalPositionNode(e);return ap.Element.isElement(t)?om(e,t,"modal"):rm(e)},t.prototype.handleModal=function(){var e=Cy(this),t=this.menu;if(null==this.modal){var n=new py(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=Cy(this),r=this.menu;if(null!=r.getModalContentElem){var o=$g.getTextarea(n),i=$g.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||im(n,e.$elem),setTimeout((function(){n.blur()}))}},t}(uy);var my=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=ph('
'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",(function(e){e.stopPropagation()})),r}return dp(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=ph("
    ");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=ph('
  • '));if(i&&a.css(i),o){var s=ph('');a.append(s),a.addClass("selected")}a.append(ph('').concat(r,""))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(cy);var yy=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=ph('
    '),this.$button=ph(''),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),sy(d,u,i,c,n),this.$elem.append(d),this.menu=t,Yh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),Cy(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=Cy(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new my(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=ph(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=Cy(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=Cy(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o'),this.$container=ph('
    '),this.$button=ph('');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=ph(n);oy(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=iy();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){ph(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),Ey=new WeakMap;function Cy(e){var t=_p.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function Dy(e,t,n){void 0===n&&(n=!1);var r=Ey.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new fy(e,t,n):a?new vy(e,t,n):new ly(e,t,n)}if("select"===o&&(r=new yy(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return Ey.set(t,r),r}function wy(e,t){var n=e.selection;return null!=n&&(!ap.Range.isCollapsed(n)&&(!$g.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!ap.Text.isText(t)))}var Ay,Sy,xy=function(){function e(){var e=this;this.$elem=ph('
    '),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=cm((function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&ap.Element.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!ap.Editor.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o}),200),Yh((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),$g.getTextarea(t).$textAreaContainer.append(n),t.on(Tp.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(Tp.SCROLL,r),t.on(Tp.FULLSCREEN,r),t.on(Tp.UNFULLSCREEN,r)})),this.lngListen=ny((function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Yh((function(){e.hoverbarItems.forEach((function(e){e.changeMenuState()}))}))},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach((function(e){if("|"!==e)t.registerSingleItem(e);else{var r=ay();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Np[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=Dy(e,r);this.hoverbarItems.push(a),_p.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),ap.Element.isElement(e)){var r=om(t,e,"bar");return n.css(r),void im(t,n)}if(ap.Text.isText(e)){r=rm(t);return n.css(r),void im(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return $g.checkNodeType(t,o)},c=vp(ap.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=Rp.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=wy),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=$g.findPath(null,e),r=$g.findPath(null,t);return ap.Path.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function Oy(){if(Sy)return Ay;Sy=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof b&&b&&b.Object===Object&&b,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return c.Date.now()};function g(t,n,r){var o,i,a,s,u,l,c=0,d=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||g&&e-c>=a}function C(){var e=h();if(E(e))return D(e);u=setTimeout(C,function(e){var t=n-(e-l);return g?p(t,a-(e-c)):t}(e))}function D(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function w(){var e=h(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return c=e,u=setTimeout(C,n),d?b(e):s}(l);if(g)return u=setTimeout(C,n),b(l)}return void 0===u&&(u=setTimeout(C,n)),s}return n=m(n)||0,v(r)&&(d=!!r.leading,a=(g="maxWait"in r)?f(m(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,o=l=i=u=void 0},w.flush=function(){return void 0===u?s:D(h())},w}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return t;if(v(e)){var u="function"==typeof e.valueOf?e.valueOf():e;e=v(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var l=i.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):o.test(e)?t:+e}return Ay=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return v(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),g(t,n,{leading:o,maxWait:n,trailing:i})}}var Ty=E(Oy());function Ny(e,t){return eg(t)&&$g.hasDOMNode(e,t,{editable:!0})}function By(e,t){if(e.getConfig().readOnly)return!1;var n=ky(e,t)&&$g.toSlateNode(e,t);return ap.Editor.isVoid(e,n)}function ky(e,t){return eg(t)&&$g.hasDOMNode(e,t)}const Fy=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Py=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Iy=(e,t)=>{if(e.clientHeight{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightit||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0,Ly=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},_y=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!Fy(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Fy(h)&&d(h);){if(h=Ly(h),h===f){p.push(h);break}null!=h&&h===document.body&&Iy(h)&&!Iy(document.documentElement)||null!=h&&Iy(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:C,right:D,bottom:w,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===s||"nearest"===s?C-S:"end"===s?w+O:C+b/2-S+O,B="center"===u?A+E/2-T+x:"end"===u?D+x:A-T;const k=[];for(let e=0;e=0&&A>=0&&w<=v&&D<=g&&C>=o&&w<=l&&A>=c&&D<=i)return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),O=parseInt(d.borderBottomWidth,10);let T=0,F=0;const P="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===s?N:"end"===s?N-v:"nearest"===s?Ry(y,y+v,v,S,O,y+N,y+N+b,b):N-v/2,F="start"===u?B:"center"===u?B-g/2:"end"===u?B-g:Ry(m,m+g,g,h,x,m+B,m+B+E,E),T=Math.max(0,T+y),F=Math.max(0,F+m);else{T="start"===s?N-o-S:"end"===s?N-l+O+I:"nearest"===s?Ry(o,l,n,S,O+I,N,N+b,b):N-(o+n/2)+I/2,F="start"===u?B-c-h:"center"===u?B-(c+r/2)+P/2:"end"===u?B-i+x+P:Ry(c,i,r,h,x+P,B,B+E,E);const{scrollLeft:e,scrollTop:a}=t;T=0===L?0:Math.max(0,Math.min(a+T/L,t.scrollHeight-n/L+I)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+P)),N+=a-T,B+=e-F}k.push({el:t,top:T,left:F})}return k},My=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function jy(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=$g.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=Wp.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=$g.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ap.Range.equals(l,r)){var c=!0;if(ap.Range.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||$g.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&$g.toDOMRange(t,r);if(g){ap.Range.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(_y(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of _y(e,My(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(v,{scrollMode:"if-needed",boundary:o.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){g&&Lg&&s.focus(),e.isUpdatingSelection=!1}))}else t.selection=$g.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Hy=new WeakMap,zy=new WeakMap;var $y,Uy={};var Vy=function(){if($y)return Uy;$y=1,Object.defineProperty(Uy,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return a(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return Uy.default=i,Uy.isHotkey=i,Uy.isCodeHotkey=function(e,t){return i(e,t)},Uy.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},Uy.parseHotkey=a,Uy.compareHotkey=s,Uy.toKeyCode=u,Uy.toKeyName=l,Uy}(),Gy={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},Wy={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},qy={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ky=function(e){var t=Gy[e],n=Wy[e],r=qy[e],o=t&&Vy.isKeyHotkey(t),i=n&&Vy.isKeyHotkey(n),a=r&&Vy.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(Rg&&i&&i(e))||!(Rg||!a||!a(e)))}},Yy={isBold:Ky("bold"),isCompose:Ky("compose"),isMoveBackward:Ky("moveBackward"),isMoveForward:Ky("moveForward"),isDeleteBackward:Ky("deleteBackward"),isDeleteForward:Ky("deleteForward"),isDeleteLineBackward:Ky("deleteLineBackward"),isDeleteLineForward:Ky("deleteLineForward"),isDeleteWordBackward:Ky("deleteWordBackward"),isDeleteWordForward:Ky("deleteWordForward"),isExtendBackward:Ky("extendBackward"),isExtendForward:Ky("extendForward"),isExtendLineBackward:Ky("extendLineBackward"),isExtendLineForward:Ky("extendLineForward"),isItalic:Ky("italic"),isMoveLineBackward:Ky("moveLineBackward"),isMoveLineForward:Ky("moveLineForward"),isMoveWordBackward:Ky("moveWordBackward"),isMoveWordForward:Ky("moveWordForward"),isRedo:Ky("redo"),isSplitBlock:Ky("splitBlock"),isTransposeCharacter:Ky("transposeCharacter"),isUndo:Ky("undo"),isTab:Ky("tab"),isSelectAll:Ky("selectAll")};function Xy(e){e.preventDefault()}var Zy={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(zg&&!o&&Ny(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=vp(r.getTargetRanges(),1)[0];if(u){var l=$g.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&ap.Range.equals(i,l)||ap.Transforms.select(n,l)}}if(i&&ap.Range.isExpanded(i)){var c=$g.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void ap.Editor.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ap.Editor.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":ap.Editor.deleteForward(n);break;case"deleteContentBackward":ap.Editor.deleteBackward(n);break;case"deleteEntireSoftLine":ap.Editor.deleteBackward(n,{unit:"line"}),ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":ap.Editor.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":ap.Editor.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":ap.Editor.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":ap.Editor.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":ap.Editor.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ap.Editor.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!th.get(n))break;"[object DataTransfer]"===Zh(s)?n.insertData(s):"string"==typeof s&&ap.Editor.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Ny(n,r.target)){var a=$g.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===$g.toDOMNode(n,n)||ng(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&eg(s)&&$g.hasDOMNode(n,s)){var u=$g.toSlateNode(n,s);if(ap.Element.isElement(u)&&!n.isVoid(u))return}if(_g){var l=a.getSelection();null==l||l.removeAllRanges()}Jp.delete(n)}}}},focus:function(e,t,n){var r=$g.toDOMNode(n,n),o=$g.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Lg&&e.target!==r?r.focus():Jp.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&ky(n,e.target)&&eg(e.target)){var r=$g.toSlateNode(n,e.target),o=$g.findPath(n,r);if(ap.Editor.hasPath(n,o))if(ap.Node.get(n,o)===r){var i=ap.Editor.start(n,o),a=ap.Editor.end(n,o),s=ap.Editor.void(n,{at:i}),u=ap.Editor.void(n,{at:a});if(s&&u&&ap.Path.equals(s[1],u[1])){var l=ap.Editor.range(n,i);ap.Transforms.select(n,l)}}}},compositionstart:function(e,t,n){if(Ny(n,e.target)){var r=n.selection;if(r&&ap.Range.isExpanded(r)&&(ap.Editor.deleteFragment(n),Promise.resolve().then((function(){jy(t,n,!0)}))),n.selection){var o=$g.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";Hy.set(n,i),zy.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(Ny(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(Hg||Lg)&&$g.cleanExposedTexNodeInSelectionBlock(n);for(var i=ap.Range.isBackward(o)?o.focus:o.anchor,a=vp(ap.Editor.node(n,[i.path[0]]),1)[0],s=0;s0&&ap.Editor.insertText(n,l.slice(0,c)),t.changeViewState()}else ap.Editor.insertText(n,l)}else{var f=$g.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(ap.Range.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=ap.Editor.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=ap.Editor.node(e,a);if(ap.Text.isText(s[0])&&ap.Text.isText(o[0]))return!0}}}(n,o)&&(n.selection=$g.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),ap.Editor.insertText(n,l)}_g||setTimeout((function(){var e=n.selection;if(null!=e){var t=zy.get(n);if(null!=t)$g.toDOMRange(n,e).startContainer!==t&&(t.textContent=Hy.get(n)||"")}}))}}}},compositionupdate:function(e,t,n){Ny(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&Ny(n,r.target)){if(function(e,t){var n=Ip.get(e),r=n&&n.getMenus(),o=Lp.get(e),i=o&&o.getMenus(),a=fp(fp({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&Vy.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),Yy.isTab(r))return Xy(r),void n.handleTab();if(Yy.isRedo(r))return Xy(r),void("function"==typeof n.redo&&n.redo());if(Yy.isUndo(r))return Xy(r),void("function"==typeof n.undo&&n.undo());if(Yy.isMoveLineBackward(r))return Xy(r),void ap.Transforms.move(n,{unit:"line",reverse:!0});if(Yy.isMoveLineForward(r))return Xy(r),void ap.Transforms.move(n,{unit:"line"});if(Yy.isExtendLineBackward(r))return Xy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus",reverse:!0});if(Yy.isExtendLineForward(r))return Xy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus"});if(Yy.isMoveBackward(r))return Xy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n,{reverse:!0}):ap.Transforms.collapse(n,{edge:"start"}));if(Yy.isMoveForward(r))return Xy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n):ap.Transforms.collapse(n,{edge:"end"}));if(Yy.isMoveWordBackward(r))return Xy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word",reverse:!0});if(Yy.isMoveWordForward(r))return Xy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word"});if(Yy.isSelectAll(r))return Xy(r),void n.selectAll();if(zg){if((Hg||_g)&&o&&(Yy.isDeleteBackward(r)||Yy.isDeleteForward(r))&&ap.Range.isCollapsed(o)){var i=ap.Node.parent(n,o.anchor.path);if(ap.Element.isElement(i)&&ap.Editor.isVoid(n,i)&&ap.Editor.isInline(n,i))return r.preventDefault(),void ap.Transforms.delete(n,{unit:"block"})}}else{if(Yy.isBold(r)||Yy.isItalic(r)||Yy.isTransposeCharacter(r))return void Xy(r);if(Yy.isSplitBlock(r))return Xy(r),void ap.Editor.insertBreak(n);if(Yy.isDeleteBackward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n));if(Yy.isDeleteForward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n));if(Yy.isDeleteLineBackward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"line"}));if(Yy.isDeleteLineForward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"line"}));if(Yy.isDeleteWordBackward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"word"}));if(Yy.isDeleteWordForward(r))return Xy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!zg&&!n.getConfig().readOnly&&Ny(n,e.target)){e.preventDefault();var r=e.key;ap.Editor.insertText(n,r)}},copy:function(e,t,n){var r=e;if(Ny(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),Ny(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(ap.Range.isExpanded(o))ap.Editor.deleteFragment(n);else{var a=ap.Node.parent(n,o.anchor.path);ap.Editor.isVoid(n,a)&&ap.Transforms.delete(n)}}},paste:function(e,t,n){th.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Ny(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void th.set(n,!1);if(_g||!zg||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(ky(n,e.target)){var r=$g.toSlateNode(n,e.target);ap.Editor.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(ky(n,r.target)&&!n.getConfig().readOnly){var o=$g.toSlateNode(n,r.target),i=$g.findPath(n,o);if(ap.Editor.isVoid(n,o)||ap.Editor.void(n,{at:i,voids:!0})){var a=ap.Editor.range(n,i);ap.Transforms.select(n,a)}var s=r.dataTransfer;if(null!=s)$g.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&ky(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&ky(n,r.target)&&null!=o&&!(zg&&_g&&o.files.length>0)){r.preventDefault();var i=n.selection,a=$g.findEventRange(n,r);ap.Transforms.select(n,a),t.isDraggingInternally&&(i&&ap.Transforms.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function Jy(e){if(Qy(e)){for(;e&&Qy(e);){e=eb(e).parent}return null!=e?e:null}return e.parentNode}function Qy(e){return 11===e.nodeType}function eb(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const tb={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return eb(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(Qy(e)){let t=e;for(;t&&Qy(t);){t=eb(t).parent}e=null!=t?t:e}Qy(t)&&(t=eb(t,e)),n&&Qy(n)&&(n=eb(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Qy(t)&&(t=eb(t,e)),e.appendChild(t)},parentNode:Jy,nextSibling:function(e){var t;if(Qy(e)){const n=eb(e),r=Jy(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:Qy};function nb(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const rb=Array.isArray;function ob(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function ib(e){return void 0===e}function ab(e){return void 0!==e}const sb=nb("",{},[],void 0,void 0);function ub(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function lb(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const cb=["create","update","remove","destroy","pre","post"];function db(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=tb;for(const t of cb)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return nb(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return nb(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0==--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i;let a,s=e.data;if(void 0!==s){const t=null===(n=s.hook)||void 0===n?void 0:n.init;ab(t)&&(t(e),s=e.data)}const l=e.children,c=e.sel;if("!"===c)ib(e.text)&&(e.text=""),e.elm=o.createComment(e.text);else if(""===c)e.elm=o.createTextNode(e.text);else if(void 0!==c){const n=c.indexOf("#"),d=c.indexOf(".",n),f=n>0?n:c.length,p=d>0?d:c.length,h=-1!==n||-1!==d?c.slice(0,Math.min(f,p)):c,g=e.elm=ab(s)&&ab(a=s.ns)?o.createElementNS(a,h,s):o.createElement(h,s);for(f0&&g.setAttribute("class",c.slice(p+1).replace(/\./g," ")),a=0;a=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r0&&o.forEach((function(e){"string"!=typeof e&&Hb(e)}))}var zb=[];var $b={};function Ub(e,t,n){return Ib(n.isInline(e)?"span":"div",null,t)}function Vb(e,t){var n,r=$g.findKey(t,e),o=t.isInline(e),i=ap.Editor.isVoid(t,e),a=Ag(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return $b[e]||Ub}(u);n=i?null:c.map((function(n,r){return Kb(n,r,e,t)}));var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=vp(ap.Node.texts(e),1),g=vp(h[0],1)[0],v=Ib(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Kb(g,0,e,t));f=Ib(p,{style:{position:"relative"}},f,v),Vp.set(g,0),Gp.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return zb.forEach((function(r){n=r(e,t)})),n}(e,f)),Yh((function(){var t=ig(a);null!=t&&(Kp.set(r,t),Yp.set(e,t),qp.set(t,e))})),f}function Gb(e,t){return void 0===t&&(t=!1),Ib("span",{"data-slate-string":!0},t?e+"\n":e)}function Wb(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),Ib("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?Ib("br",null):null)}function qb(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=$g.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=$g.findPath(n,e),s=o([e,a]),u=ap.Text.decorations(e,s),l=u.map((function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=$g.findPath(o,n),s=ap.Path.parent(a);if(ap.Editor.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?Wb(ap.Node.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==ap.Editor.string(o,s)?""===i?Wb():t&&"\n"===i.slice(-1)?Gb(i,!0):Gb(i):Wb(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return zb.forEach((function(t){n=t(e,n)})),n}(r,i),Ib("span",{"data-slate-leaf":!0},i)})),c=(i=r.id,"w-e-text-".concat(i)),d=Ib("span",{"data-slate-node":"text",id:c,key:r.id},l);return Yh((function(){var t=ig(c);null!=t&&(Kp.set(r,t),Yp.set(e,t),qp.set(t,e))})),d}function Kb(e,t,n,r){return Vp.set(e,t),Gp.set(e,n),ap.Element.isElement(e)?Vb(e,r):qb(e,n,r)}function Yb(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),pb("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map((function(e,n){var r=Kb(e,n,t,t);return Hb(r),r}));var d=zp.get(e);if(null==d&&(d=!0),d){var f=function(e){return ph(''))}(i);o.append(f),e.$textArea=f,r=f[0],(h=db([mb,xb,Fb,Eb,Ab,gb]))(r,l),zp.set(e,!1),$p.set(e,h)}else{var p=Up.get(e),h=$p.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=ig(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Zp.set(t,v)}Wp.set(t,r),Yp.set(t,r),qp.set(r,t),Up.set(e,l)}}var Xb=1,Zb=function(){function e(e){var t=this;this.id=Xb++,this.$textArea=null,this.$progressBar=ph('
    '),this.$maxLengthInfo=ph('
    '),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=Ty((function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=$g.findDocumentOrShadowRoot(t),a=i.activeElement,s=$g.toDOMNode(t,t),u=i.getSelection();if(a!==s)return Jp.delete(t),void ap.Transforms.deselect(t);if(e.latestElement=a,Jp.set(t,!0),!u)return ap.Transforms.deselect(t);var l=u.anchorNode,c=u.focusNode,d=Ny(t,l)||By(t,l),f=Ny(t,c)||By(t,c);if(d&&f){var p=$g.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});ap.Transforms.select(t,p)}}}(t,e)}),100);var n=ph(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=ph('
    ');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=ph('
    ');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Yh((function(){var e=t.editorInstance,o=$g.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(Tp.DESTROYED,(function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)})),r.on("click",(function(){return e.hidePanelOrModal()})),e.on(Tp.CHANGE,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(Tp.CHANGE,(function(){return a(e)})),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Tp.CHANGE,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Fp.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(xp(Zy,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",Ty((function(){r.emit("scroll")}),100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(Tp.CHANGE,(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-$g.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout((function(){t.hide(),t.css("width","0"),t.show()}),1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;Yb(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=ph('
    '.concat(r,"
    "));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Yh((function(){jy(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function Jb(e,t,n,r){if(Vp.set(e,t),Gp.set(e,n),ap.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach((function(t,n){return Jb(t,n,e,r)})),ap.Editor.isVoid(r,e)){var i=vp(ap.Node.texts(e),1),a=vp(i[0],1)[0];Vp.set(a,0),Gp.set(a,e)}}}var Qb=300,eE={heightWarning:{en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"}};function tE(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[em,Lv,nh,Iv,um,Qv,tm,lp.withHistory].reduce((function(e,t){return t(e)}),e)}(ap.createEditor());if(n&&function(e,t){return Dg(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Ap(Op),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return xp(t,(function(e,t){n[t]=fp(fp({},e),o[t]||{})})),delete e.MENU_CONF,fp({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);Hp.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach((function(e){l=e(l)})),function(e,t){var n=t.html,r=t.content;null!=n&&(e.children=wg(e,n)),r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new Zb(n);kp.set(l,p),Fp.set(p,l),p.changeViewState(),Yh((function(){var e=p.$scroll;null!=e&&e.height()0&&(h=new xy,Rp.set(h,l),Lp.set(l,h)),l.on(Tp.CHANGE,(function(){l.hidePanelOrModal()})),l.on(Tp.SCROLL,(function(){l.hidePanelOrModal()}))}else l.children.forEach((function(e,t){return Jb(e,t,l,l)}));var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Tp.CREATED,(function(){return g(l)})),v&&l.on(Tp.DESTROYED,(function(){return v(l)})),Yh((function(){return l.emit("created")})),l}var nE=function(){function e(e,t){var n=this;this.$toolbar=ph('
    '),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=cm((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=ph(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),Yh((function(){n.initToolbar(),n.lngListen=ny((function(){return n.initToolbar()})),n.getEditorInstance().on(Tp.CHANGE,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Ap(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){c.splice(s.index+t,0,e)})));var d=c.filter((function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)})),f=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===f)return;if("|"===t)return;var i=ay();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new by(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(e){s.includes(e)||t.registerSingleItem(e,r)})),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof by,o=this.menus,i=o[e];if(null==i){var a=Np[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=Dy(e,i,r);(this.toolbarItems.push(u),_p.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Pp.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function rE(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return Dg(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=fp({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new nE(n,i);return Pp.set(a,e),Ip.set(e,a),a}var oE,iE,aE,sE,uE,lE={exports:{}},cE={};function dE(){if(aE)return cE;aE=1,Object.defineProperty(cE,"__esModule",{value:!0}),cE.justErrorsLogger=cE.debugLogger=void 0;const e=function(){if(iE)return oE;function e(e){return e<10?`0${e}`:e.toString()}return iE=1,oE=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},sE}var pE,hE,gE,vE,mE,yE,bE,EE,CE,DE,wE,AE,SE,xE,OE,TE,NE,BE,kE,FE,PE,IE,RE,LE,_E,ME,jE,HE,zE,$E,UE,VE={};function GE(){return hE?pE:(hE=1,pE=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function WE(){if(vE)return gE;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return vE=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t=2}return r?o(r.split(";")[0]):o}}();VE.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}VE.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return VE.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter((e=>!e.isGhost));if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some((e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase()))){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce(((e,t)=>e+t.size),r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},DE}function XE(){return SE||(SE=1,AE=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n{e(...t)}))}return r.VERSION="2.1.1",xE=function(){return new r}}function JE(){if(NE)return TE;return NE=1,TE=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function QE(){return kE?BE:(kE=1,BE={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function eC(){if(UE)return $E;UE=1;var e=fE(),t=dE(),n=qE();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=YE(),l=XE(),c=Oy(),d=ZE(),f=function(){if(PE)return FE;PE=1;const e=JE(),t=QE();return FE=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=JE(),h=function(){if(RE)return IE;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}return RE=1,IE=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(_E||(_E=1,LE=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),LE),v=jE?ME:(jE=1,ME=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=zE?HE:(zE=1,HE={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),C=s("emitter"),D=s("preProcessors"),w=s("uploaders"),A=s("postProcessors"),S=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),O=s("checkRequiredMetaFields"),T=s("assertNewUploadAllowed"),N=s("checkAndCreateFileStateObject"),B=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),P=s("createUpload"),I=s("getUpload"),R=s("removeUpload"),L=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class _{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,R,{value:q}),Object.defineProperty(this,I,{value:W}),Object.defineProperty(this,P,{value:G}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,B,{value:U}),Object.defineProperty(this,N,{value:$}),Object.defineProperty(this,T,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:l()}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,w,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter((()=>this.opts),this.i18n),i(this,E)[E]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,D)[D].add(e)}removePreProcessor(e){return i(this,D)[D].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,w)[w].add(e)}removeUploader(e){return i(this,w)[w].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),i=r.filter((e=>!e.progress.uploadStarted)),a=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),s=r.filter((e=>e.progress.uploadStarted)),u=r.filter((e=>e.isPaused)),l=r.filter((e=>e.progress.uploadComplete)),c=r.filter((e=>e.error)),d=o.filter((e=>!e.isPaused)),f=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,T)[T](e);const{files:t}=this.getState();let n=i(this,N)[N](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,B)[B](),n.id}addFiles(e){i(this,T)[T]();const t={...this.getState().files},n=[],r=[];for(let o=0;o{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&i(this,B)[B](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach((e=>{n[e]&&(a[e]=n[e],delete o[e])})),Object.keys(i).forEach((e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}}));const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach((e=>{this.emit("file-removed",a[e],t)})),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,P)[P](t,{forceAllowNewUpload:!0});return i(this,L)[L](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,P)[P]([e],{forceAllowNewUpload:!0});return i(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach((e=>{i+=e.progress.bytesUploaded})),n.forEach((e=>{i+=o*(e.progress.percentage||0)/100}));let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,L)[L](e):(i(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,P)[P](...arguments)}addResultData(e,t){if(!i(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then((()=>i(this,b)[b].validateMinNumberOfFiles(t))).catch((e=>{throw i(this,S)[S](e),e})).then((()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const o=i(this,P)[P](r);return i(this,L)[L](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map((t=>e[t]));i(this,b)[b].validate(d,t)}catch(e){throw i(this,S)[S](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&i(this,x)[x](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function G(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function W(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,D)[D],...i(this,w)[w],...i(this,A)[A]];try{for(let i=r;i{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),o=r.filter((e=>!e.error)),i=r.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,R)[R](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return _.VERSION="2.3.4",$E=_}var tC,nC,rC,oC,iC,aC,sC,uC,lC={},cC=[],dC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function fC(e,t){for(var n in t)e[n]=t[n];return e}function pC(e){var t=e.parentNode;t&&t.removeChild(e)}function hC(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?tC.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return gC(e,a,r,o,null)}function gC(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++rC:o};return null==o&&null!=nC.vnode&&nC.vnode(i),i}function vC(e){return e.children}function mC(e,t){this.props=e,this.context=t}function yC(e,t){if(null==t)return e.__?yC(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?gC(p.type,p.props,p.key,null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=m[c])||f&&p.key==f.key&&p.type===f.type)m[c]=void 0;else for(d=0;d2&&(a.children=arguments.length>3?tC.call(arguments,2):n),gC(e.type,a,r||e.key,o||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+uC++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(EC)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createElement:hC,createRef:function(){return{current:null}},h:hC,hydrate:function e(t,n){RC(t,n,e)},get isValidElement(){return oC},get options(){return nC},render:RC,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n}}),KC=C(qC);function YC(){if(jC)return MC;jC=1;const e=_C?LC:(_C=1,LC=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return MC=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function XC(){if(UC)return $C;UC=1;const e=YE();return $C=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function ZC(){if(GC)return VC;GC=1;var e=KC;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=YC(),i=zC?HC:(zC=1,HC=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=XC();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i(t=null,e(...n))))),t}}((t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())})),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins((t=>{t instanceof e&&(c=t)}))}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the + +